/* =====================================================================
   LIKE LABOR — UI theme (on top of Bootstrap 5.3)
   Primary colour: violet. Font: Anuphan (Google Fonts) with system fallbacks.
   ===================================================================== */

:root {
  --ll-font: "Anuphan", "IBM Plex Sans Thai", "Leelawadee UI", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;

  --ll-bg: #f6f5fb;
  --ll-surface: #ffffff;
  --ll-surface-2: #faf9fd;
  --ll-border: #e8e5f2;
  --ll-text: #1a1530;
  --ll-muted: #6b6785;

  /* violet primary */
  --ll-accent: #7c3aed;
  --ll-accent-rgb: 124, 58, 237;
  --ll-accent-hover: #6d28d9;
  --ll-accent-soft: #f3edff;
  --ll-accent-strong: #5b21b6;

  --ll-gold: #f5b81b;
  --ll-gold-hover: #e3a70d;

  --ll-sidebar-bg: #1d1238;
  --ll-sidebar-bg-2: #2a1756;
  --ll-sidebar-text: #bfb4e0;

  --ll-radius: 16px;
  --ll-radius-sm: 10px;
  --ll-shadow-sm: 0 1px 2px rgba(30, 20, 60, .05);
  --ll-shadow: 0 1px 2px rgba(30, 20, 60, .04), 0 8px 24px rgba(30, 20, 60, .07);
  --ll-sidebar-width: 268px;

  --bs-body-font-family: var(--ll-font);
  --bs-body-color: var(--ll-text);
  --bs-body-bg: var(--ll-bg);
  --bs-border-color: var(--ll-border);
  --bs-border-radius: var(--ll-radius-sm);
  --bs-link-color-rgb: var(--ll-accent-rgb);
  --bs-link-hover-color-rgb: 91, 33, 182;
  --bs-primary: var(--ll-accent);
  --bs-primary-rgb: var(--ll-accent-rgb);
}

html { font-size: 15px; }
@media (min-width: 992px) { html { font-size: 15.5px; } }

body {
  font-family: var(--ll-font);
  background: var(--ll-bg);
  color: var(--ll-text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .nav-link:hover, .sidebar-link:hover, .page-link:hover { text-decoration: none; }
h1, h2, h3, h4, h5 { letter-spacing: -.01em; }

/* ---------- buttons & form controls ---------- */
.btn { --bs-btn-border-radius: 10px; --bs-btn-font-weight: 500; }
.btn-lg { --bs-btn-border-radius: 12px; }
.btn-sm { --bs-btn-border-radius: 8px; }

.btn-primary {
  --bs-btn-bg: var(--ll-accent);
  --bs-btn-border-color: var(--ll-accent);
  --bs-btn-hover-bg: var(--ll-accent-hover);
  --bs-btn-hover-border-color: var(--ll-accent-hover);
  --bs-btn-active-bg: var(--ll-accent-strong);
  --bs-btn-active-border-color: var(--ll-accent-strong);
  --bs-btn-disabled-bg: var(--ll-accent);
  --bs-btn-disabled-border-color: var(--ll-accent);
  box-shadow: 0 6px 16px rgba(var(--ll-accent-rgb), .25);
}
.btn-primary:disabled, .btn-primary.disabled { box-shadow: none; opacity: .45; }

.btn-outline-primary {
  --bs-btn-color: var(--ll-accent);
  --bs-btn-border-color: rgba(var(--ll-accent-rgb), .35);
  --bs-btn-hover-bg: var(--ll-accent-soft);
  --bs-btn-hover-color: var(--ll-accent-strong);
  --bs-btn-hover-border-color: var(--ll-accent);
  --bs-btn-active-bg: var(--ll-accent);
  --bs-btn-active-border-color: var(--ll-accent);
}

.btn-light-soft {
  background: var(--ll-surface);
  border: 1px solid var(--ll-border);
  color: var(--ll-text);
}
.btn-light-soft:hover { background: var(--ll-surface-2); border-color: #d6d0e8; color: var(--ll-text); }

.btn-soft-danger { background: #fff1f3; color: #be123c; border: 1px solid #ffd7de; }
.btn-soft-danger:hover { background: #ffe4e9; color: #9f1239; border-color: #fbb6c3; }

.btn-cta {
  background: var(--ll-gold);
  border-color: var(--ll-gold);
  color: #2a1d00;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(245, 184, 27, .3);
}
.btn-cta:hover, .btn-cta:focus, .btn-cta:active { background: var(--ll-gold-hover); border-color: var(--ll-gold-hover); color: #2a1d00; }
/* Bootstrap's .btn.active would otherwise clear the gold background and text colour (current-page link in the nav). */
.btn-cta.active { background: var(--ll-gold); border-color: var(--ll-gold); color: #2a1d00; }

.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }

.form-control, .form-select {
  border-radius: 10px;
  border-color: #dcd7ea;
  padding: .58rem .85rem;
}
.form-control::placeholder { color: #aaa4c0; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--ll-accent-rgb), .6);
  box-shadow: 0 0 0 .22rem rgba(var(--ll-accent-rgb), .15);
}
.form-control:disabled, .form-select:disabled { background-color: #f3f1f8; }
.form-check-input:checked { background-color: var(--ll-accent); border-color: var(--ll-accent); }
.form-label { font-weight: 500; font-size: .88rem; color: #3b3556; margin-bottom: .35rem; }
.form-text { color: var(--ll-muted); font-size: .78rem; }
.input-group-text { border-radius: 10px; background: var(--ll-surface-2); border-color: #dcd7ea; color: var(--ll-muted); }
.required::after { content: " *"; color: #e11d48; }

/* segmented radio (e.g. employer type, status) */
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: #f0edf8; border-radius: 12px; }
.segmented .btn { --bs-btn-border-radius: 9px; border: 0; color: var(--ll-muted); padding: .4rem 1rem; }
.segmented .btn-check:checked + .btn { background: var(--ll-surface); color: var(--ll-accent-strong); box-shadow: var(--ll-shadow-sm); font-weight: 600; }

/* ---------- app shell: top navigation bar + content ---------- */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(100deg, var(--ll-sidebar-bg-2) 0%, var(--ll-sidebar-bg) 70%);
  box-shadow: 0 6px 20px rgba(29, 18, 56, .18);
}
.app-nav .navbar { padding: .55rem 0; }
.app-nav-inner { max-width: 1440px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 992px) { .app-nav-inner { padding: 0 2rem; } }
.app-nav .navbar-brand { padding: .35rem 0; margin-right: 1.75rem; }
.app-nav .brand-word { color: #fff; }
.app-nav .navbar-toggler { border-color: rgba(255, 255, 255, .25); padding: .35rem .6rem; }
.app-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(196, 181, 253, .35); }

.app-nav-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem !important;
  border-radius: 10px;
  color: var(--ll-sidebar-text) !important;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.app-nav-link i { font-size: 1.05rem; }
.app-nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff !important; }
.app-nav-link.active {
  background: rgba(167, 139, 250, .26);
  color: #fff !important;
  box-shadow: inset 0 -2px 0 #c4b5fd;
}

.app-nav .btn-cta.active { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 6px 16px rgba(245, 184, 27, .3); }

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .75rem .3rem .3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: .88rem;
}
.nav-user:hover, .nav-user[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-user .meta { font-size: .72rem; color: var(--ll-sidebar-text); line-height: 1.1; }
.nav-user .name { font-weight: 600; line-height: 1.15; }
.nav-user::after { margin-left: .2rem; }
.app-nav .dropdown-menu {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(30, 20, 60, .2);
  padding: .5rem;
  min-width: 15rem;
}
.app-nav .dropdown-item { border-radius: 8px; padding: .5rem .75rem; }
.app-nav .dropdown-item:active { background: var(--ll-accent); }
.app-nav .dropdown-header { white-space: normal; }

@media (max-width: 991.98px) {
  .app-nav .navbar-collapse { padding: .75rem 0 .5rem; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: .55rem; }
  .app-nav .navbar-nav { gap: .25rem; }
  .app-nav .nav-actions { flex-direction: column; align-items: stretch !important; margin-top: .75rem; }
  .app-nav .nav-actions .dropdown, .app-nav .nav-user { width: 100%; }
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, #a78bfa, var(--ll-accent));
  color: #fff;
  flex: 0 0 auto;
}
.avatar-sm { width: 30px; height: 30px; font-size: .78rem; }

.role-tag {
  font-size: .68rem;
  font-weight: 700;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(196, 181, 253, .22);
  color: #e9e2ff;
  letter-spacing: .04em;
}

.app-main { min-height: 100vh; display: flex; flex-direction: column; }
.app-content { padding: 1.5rem 1.25rem 3rem; max-width: 1440px; width: 100%; margin: 0 auto; }
@media (min-width: 992px) { .app-content { padding: 1.75rem 2rem 3rem; } }
.app-footer { margin-top: auto; padding: 1rem 2rem; font-size: .78rem; color: var(--ll-muted); text-align: center; }
.topbar-brand { color: var(--ll-text); }
.topbar-brand:hover { text-decoration: none; color: var(--ll-text); }

/* guest pages (not signed in) */
.guest-shell { min-height: 100vh; display: flex; flex-direction: column; }
.guest-top { padding: 1.25rem 1.5rem; }
.guest-top .brand-name { color: var(--ll-text); }

/* ---------- page header ---------- */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.page-title { font-size: 1.6rem; font-weight: 700; margin: 0; }
.page-subtitle { color: var(--ll-muted); margin: .25rem 0 0; font-size: .92rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.breadcrumb { --bs-breadcrumb-divider-color: #b0a9c8; font-size: .82rem; margin-bottom: .5rem; }
.breadcrumb a { color: var(--ll-muted); }
.breadcrumb a:hover { color: var(--ll-accent); }

/* ---------- cards ---------- */
.card {
  --bs-card-border-color: var(--ll-border);
  --bs-card-border-radius: var(--ll-radius);
  --bs-card-inner-border-radius: calc(var(--ll-radius) - 1px);
  --bs-card-cap-bg: transparent;
  box-shadow: var(--ll-shadow-sm);
}
.card-header {
  padding: 1rem 1.25rem;
  font-weight: 600;
  border-bottom-color: var(--ll-border);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.card-header .step {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
  background: var(--ll-accent);
  color: #fff;
}
.card-header .hint { font-weight: 400; font-size: .8rem; color: var(--ll-muted); }
.card-body { padding: 1.25rem; }
.card-footer { background: var(--ll-surface-2); border-top-color: var(--ll-border); padding: 1rem 1.25rem; }
.filter-card .card-body { padding: 1rem 1.25rem; }

/* ---------- tables ---------- */
.card-table { overflow: hidden; }
.table-modern { margin: 0; --bs-table-hover-bg: #f8f5ff; }
.table-modern > thead > tr > th {
  background: var(--ll-surface-2);
  color: var(--ll-muted);
  font-weight: 600;
  font-size: .78rem;
  border-bottom: 1px solid var(--ll-border);
  padding: .78rem .9rem;
  white-space: nowrap;
}
.table-modern > tbody > tr > td { padding: .8rem .9rem; border-color: #f0edf6; vertical-align: middle; }
.table-modern > tbody > tr:last-child > td { border-bottom: 0; }
.table-modern > tfoot > tr > td { padding: .85rem .9rem; background: var(--ll-surface-2); border-top: 1px solid var(--ll-border); border-bottom: 0; }
.table-modern .cell-main { font-weight: 600; }
.table-modern .cell-sub { font-size: .78rem; color: var(--ll-muted); }
.table-modern .num { font-variant-numeric: tabular-nums; }
.order-table td, .order-table th { white-space: nowrap; }
.order-table td.cell-name { white-space: normal; min-width: 12rem; }

.empty-state { text-align: center; padding: 3rem 1rem !important; color: var(--ll-muted); }
.empty-state i { display: block; font-size: 2.4rem; color: #cdc6e3; margin-bottom: .5rem; }

/* ---------- status pills (used with .badge) ---------- */
.badge.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .34rem .7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .75rem;
}
.badge.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: #fff5d9; color: #a16207; }
.status-paid { background: #e5f7ec; color: #15803d; }
.status-canceled { background: #f1eff6; color: #6b6785; }
.status-active { background: #e5f7ec; color: #15803d; }
.status-inactive { background: #f1eff6; color: #6b6785; }

/* ---------- stat cards ---------- */
.stat-card { display: flex; flex-direction: row; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; }
.stat-icon.status-pending { background: #fff5d9; color: #ca8a04; }
.stat-icon.status-paid { background: #e5f7ec; color: #16a34a; }
.stat-icon.status-canceled { background: #f1eff6; color: #6b6785; }
.stat-label { font-size: .8rem; color: var(--ll-muted); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-sub { font-size: .8rem; color: var(--ll-muted); }

/* ---------- alerts ---------- */
.alert { border-radius: 12px; border: 0; display: flex; gap: .6rem; align-items: flex-start; }
.alert > i { font-size: 1.1rem; line-height: 1.4; }
.alert-success { background: #e9f8ef; color: #166534; }
.alert-danger { background: #fdecef; color: #9f1239; }
.alert-warning { background: #fff6dd; color: #854d0e; }
.alert-secondary { background: #f1eff8; color: #4c4668; }
.alert .btn-close { margin-left: auto; }
.validation-summary-valid { display: none !important; }

/* ---------- pagination ---------- */
.pagination {
  --bs-pagination-border-radius: 8px;
  --bs-pagination-active-bg: var(--ll-accent);
  --bs-pagination-active-border-color: var(--ll-accent);
  --bs-pagination-color: var(--ll-accent);
}

/* ---------- S1 checkout bar ---------- */
.checkout-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 10;
  margin-top: 1rem;
  border-radius: 18px;
  background: linear-gradient(120deg, var(--ll-sidebar-bg-2), var(--ll-sidebar-bg));
  color: #fff;
  box-shadow: 0 14px 34px rgba(29, 18, 56, .32);
  padding: .85rem 1rem .85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.75rem;
}
.checkout-bar .label { font-size: .76rem; color: var(--ll-sidebar-text); }
.checkout-bar .value { font-size: 1.15rem; font-weight: 700; }
.checkout-bar #select-all { margin-left: auto; }

/* ---------- S2 package picker ---------- */
.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .75rem; }
.package-option {
  display: block;
  text-align: left;
  padding: .95rem 1.05rem;
  border: 1.5px solid var(--ll-border);
  border-radius: 14px;
  background: var(--ll-surface);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  margin: 0;
  position: relative;
}
.package-option:hover { border-color: rgba(var(--ll-accent-rgb), .5); }
.package-option .period { font-size: .82rem; color: var(--ll-muted); }
.package-option .price { font-size: 1.35rem; font-weight: 700; }
.package-option .price small { font-size: .78rem; font-weight: 500; color: var(--ll-muted); }
.package-option .check {
  position: absolute;
  top: .7rem;
  right: .75rem;
  color: var(--ll-accent);
  font-size: 1.1rem;
  opacity: 0;
}
.btn-check:checked + .package-option {
  border-color: var(--ll-accent);
  background: var(--ll-accent-soft);
  box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb), .14);
}
.btn-check:checked + .package-option .check { opacity: 1; }
.btn-check:focus-visible + .package-option { box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb), .3); }

.coverage-preview {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border-radius: 10px;
  background: var(--ll-accent-soft);
  color: var(--ll-accent-strong);
  font-weight: 500;
  font-size: .88rem;
}
.coverage-preview:empty { display: none; }

/* ---------- S3 payment ---------- */
.pay-card { text-align: center; }
.pay-amount { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
.pay-amount small { font-size: 1rem; font-weight: 500; color: var(--ll-muted); }
.qr-frame {
  display: inline-block;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ll-border);
  box-shadow: var(--ll-shadow);
}
.qr-image { image-rendering: pixelated; display: block; }
.pay-success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-size: 2.3rem;
  background: #e5f7ec;
  color: #16a34a;
}

.modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 60px rgba(30, 20, 60, .25); }
.spinner-border { color: var(--ll-accent); }

/* ---------- banner slots ---------- */
/* Placeholder shows the recommended image size; a real image replaces it when
   wwwroot/images/banners/{key}.(jpg|png|webp) exists. */
.banner-slot {
  position: relative;
  width: 100%;
  border-radius: var(--ll-radius);
  overflow: hidden;
}
.banner-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  text-align: center;
  padding: .75rem;
  color: var(--ll-accent-strong);
  border: 2px dashed rgba(var(--ll-accent-rgb), .35);
  border-radius: inherit;
  background:
    repeating-linear-gradient(135deg, rgba(var(--ll-accent-rgb), .045) 0 12px, transparent 12px 24px),
    var(--ll-accent-soft);
}
.banner-placeholder i { font-size: 1.6rem; opacity: .7; }
.banner-placeholder .size { font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.banner-placeholder .label { font-size: .8rem; opacity: .85; }
.banner-placeholder .path { font-size: .7rem; opacity: .65; font-family: ui-monospace, Consolas, monospace; }
.banner-slot.on-dark .banner-placeholder {
  color: #e9e2ff;
  border-color: rgba(255, 255, 255, .28);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 12px, transparent 12px 24px),
    rgba(255, 255, 255, .06);
}
.banner-slot.compact .banner-placeholder { gap: .1rem; }
.banner-slot.compact .banner-placeholder i { font-size: 1.1rem; }
.banner-slot.compact .banner-placeholder .size { font-size: .82rem; }
.banner-slot.compact .banner-placeholder .label, .banner-slot.compact .banner-placeholder .path { font-size: .65rem; }

/* ---------- auth (login) ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--ll-surface); }
@media (min-width: 992px) { .auth-shell { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 3rem;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(167, 139, 250, .45), transparent 42%),
    radial-gradient(circle at 88% 85%, rgba(245, 184, 27, .22), transparent 40%),
    linear-gradient(150deg, #2a1756 0%, #1d1238 60%, #140b29 100%);
  display: none;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 992px) { .auth-hero { display: flex; } }
.auth-hero h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.3; max-width: 30rem; margin: 0; }
.auth-hero p { color: #cfc5ef; max-width: 28rem; margin: .75rem 0 0; }
.auth-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.auth-feature { padding: .9rem; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.auth-feature i { color: #c4b5fd; font-size: 1.25rem; }
.auth-feature .t { font-weight: 600; font-size: .9rem; margin-top: .35rem; }
.auth-feature .d { font-size: .76rem; color: #bfb4e0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-form { width: 100%; max-width: 390px; }
.auth-form .brand-name { color: var(--ll-text); }
.demo-hint { font-size: .78rem; color: var(--ll-muted); background: var(--ll-surface-2); border: 1px dashed var(--ll-border); border-radius: 10px; padding: .6rem .8rem; }

/* ---------- misc ---------- */
.text-accent { color: var(--ll-accent) !important; }
.state-page { max-width: 460px; margin: 3rem auto; text-align: center; }
.state-page .code { font-size: 4.5rem; font-weight: 700; color: #ddd6f3; line-height: 1; }
.state-page .icon { font-size: 3rem; color: #cdc6e3; }

.checkout-bar .btn-cta:disabled {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .65);
  box-shadow: none;
  opacity: 1;
}
.order-table .btn-sm { --bs-btn-padding-x: .5rem; }

/* ---------- logo ---------- */
.brand-logo { display: inline-flex; align-items: center; gap: .5rem; line-height: 1; }
.brand-logo-img { height: 22px; width: auto; display: block; }
.brand-word { font-weight: 700; letter-spacing: .2em; font-size: .95rem; color: inherit; }
.brand-lg .brand-logo-img { height: 32px; }
.brand-lg .brand-word { font-size: 1.25rem; }

/* ---------- status filter chips (grey = off, violet = on) ---------- */
.status-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid #e3e0ec;
  background: #f1eff6;
  color: #5d5875;
  font-weight: 500;
  font-size: .88rem;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.status-chip:hover { background: #e9e5f3; color: var(--ll-text); }
.status-chip .count {
  min-width: 1.6rem;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: #fff;
  color: #6b6785;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
}
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-chip .dot.status-pending { background: #eab308; }
.status-chip .dot.status-paid { background: #16a34a; }
.status-chip .dot.status-canceled { background: #a8a3bd; }
.btn-check:checked + .status-chip {
  background: var(--ll-accent);
  border-color: var(--ll-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--ll-accent-rgb), .25);
}
.btn-check:checked + .status-chip .count { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-check:checked + .status-chip .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.btn-check:focus-visible + .status-chip { box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb), .3); }

/* date fields with a calendar icon */
.date-field { position: relative; }
.date-field .form-control { padding-left: 2.3rem; background-color: #fff; cursor: pointer; }
.date-field > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--ll-accent); pointer-events: none; }

/* flatpickr in the violet theme */
.flatpickr-calendar { font-family: var(--ll-font); border-radius: 14px; box-shadow: 0 16px 40px rgba(30, 20, 60, .18); border: 1px solid var(--ll-border); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus,
.flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--ll-accent); border-color: var(--ll-accent); }
.flatpickr-day.today { border-color: rgba(var(--ll-accent-rgb), .5); }
.flatpickr-day:hover { background: var(--ll-accent-soft); border-color: var(--ll-accent-soft); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 600; }

/* ---------- S1: select-to-pay toggle in the action column ---------- */
.select-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 7.5rem;
  justify-content: center;
  padding: .38rem .8rem;
  border-radius: 999px;
  border: 1.5px dashed #c9c3dc;
  background: #fff;
  color: #6b6785;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.select-toggle:hover { border-color: var(--ll-accent); color: var(--ll-accent); background: var(--ll-accent-soft); }
.select-toggle .when-on { display: none; }
.btn-check:checked + .select-toggle {
  border: 1.5px solid var(--ll-accent);
  background: var(--ll-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--ll-accent-rgb), .3);
}
.btn-check:checked + .select-toggle .when-on { display: inline; }
.btn-check:checked + .select-toggle .when-off { display: none; }
.btn-check:focus-visible + .select-toggle { box-shadow: 0 0 0 3px rgba(var(--ll-accent-rgb), .3); }
.select-blocked {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 7.5rem;
  justify-content: center;
  padding: .38rem .8rem;
  border-radius: 999px;
  background: #fdecef;
  color: #be123c;
  font-weight: 600;
  font-size: .78rem;
}
.order-table tr.is-selected > td { background: var(--ll-accent-soft); }
.order-table tr.is-selected > td:first-child { box-shadow: inset 4px 0 0 var(--ll-accent); }
.action-cell { white-space: nowrap; }
.action-cell .btn, .action-cell .select-toggle, .action-cell .select-blocked { vertical-align: middle; }
