/* KoKo Beach Hotels — Invoice Payments */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #0f1f2e;
  --ink-2: #334556;
  --muted: #647585;
  --border: #e2e7ec;
  --border-strong: #cfd7df;
  --navy: #0b2a3c;
  --navy-2: #123a52;
  --teal: #0c7a83;
  --teal-2: #0a666e;
  --teal-soft: #e4f3f4;
  --sand: #efe6d6;
  --gold: #c69a4b;
  --focus: #2b8cff;

  --pending: #a8620a; --pending-bg: #fff4de; --pending-bd: #f4d9a4;
  --approved: #0c6fa8; --approved-bg: #e5f1fa; --approved-bd: #b9d9ef;
  --suspended: #b3261e; --suspended-bg: #fdeceb; --suspended-bd: #f3c1bd;
  --paid: #17804a; --paid-bg: #e5f5ec; --paid-bd: #b5e0c7;
  --pop: #7446b0; --pop-bg: #f1eafb; --pop-bd: #d8c6f1;
  --draft: #56626e; --draft-bg: #eef1f4; --draft-bd: #d6dce2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 46, .06);
  --shadow: 0 1px 3px rgba(15, 31, 46, .06), 0 6px 20px rgba(15, 31, 46, .06);
  --shadow-lg: 0 20px 60px rgba(8, 24, 38, .25);
  --sidebar: 244px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.tnum, .amount, td.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #d5e2ea; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--teal), #13a0a8); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-weight: 750; letter-spacing: .08em; font-size: 12.5px; color: #fff; }
.brand-sub { font-size: 11px; color: #8fb0c2; letter-spacing: .06em; text-transform: uppercase; }
.brand.brand-logo { flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 20px 18px; }
.brand-logo .logo { display: block; width: 150px; height: auto; }
.auth-logo { display: block; width: 220px; height: auto; position: relative; z-index: 1; }
.auth-logo-sm { display: none; width: 170px; height: auto; margin: 0 auto 28px; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #6f93a8; padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #cfdde6; font-weight: 500; font-size: 13.5px; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(19, 160, 168, .18); color: #fff; box-shadow: inset 3px 0 0 #2fc3c9; }
.nav .badge-count { margin-left: auto; background: #e24c3f; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #8fb0c2; }
.sidebar-foot .who { color: #fff; font-weight: 600; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.topbar .crumb { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.topbar .spacer { flex: 1; }
.bell.menu-btn { display: none; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.bell:hover { background: var(--surface-2); }
.bell svg { width: 20px; height: 20px; }
.bell .dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #e24c3f; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sand); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: 13px; flex: none; }
.user-chip .nm { font-weight: 600; font-size: 13px; }
.user-chip .rl { font-size: 11.5px; color: var(--muted); }
.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .grow { flex: 1; min-width: 240px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.subtle { color: var(--muted); }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { flex: 1; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Hero (payments this period) ---------- */
.hero { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, #0f5663 100%); color: #fff; border-radius: 16px; padding: 24px 28px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(47,195,201,.25), transparent 65%); pointer-events: none; }
.hero-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #9fd3d8; font-weight: 700; }
.hero-count { font-size: 15px; color: #d7e7ee; margin-top: 8px; }
.hero-amount { font-size: 40px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero-amount .alt { display: block; font-size: 22px; font-weight: 650; color: #cfe6ea; margin-top: 2px; }
.hero-period { margin-left: auto; text-align: right; }
.hero-period .lbl { font-size: 11.5px; color: #9fc3cf; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.hero-period .rng { font-size: 16px; font-weight: 650; margin-top: 4px; }
.hero-period .nav-arrows { display: inline-flex; gap: 6px; margin-top: 10px; }
.hero-period .nav-arrows button { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; width: 34px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.hero-period .nav-arrows button:hover { background: rgba(255,255,255,.2); }
.hero-bars { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 18px; background: rgba(255,255,255,.12); position: relative; z-index: 1; }
.hero-bars span { display: block; height: 100%; }

/* ---------- Status cards ---------- */
.status-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.scard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 15px; text-align: left; cursor: pointer; font: inherit; color: inherit; position: relative; transition: transform .08s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.scard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.scard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.scard.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.scard .t { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--c); display: flex; align-items: center; gap: 6px; }
.scard .n { font-size: 26px; font-weight: 750; margin-top: 6px; font-variant-numeric: tabular-nums; }
.scard .a { font-size: 13.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.scard .a + .a { margin-top: 1px; }
.scard .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.c-pending { --c: var(--pending); } .c-approved { --c: var(--approved); } .c-suspended { --c: var(--suspended); }
.c-paid { --c: var(--paid); } .c-pop { --c: var(--pop); } .c-draft { --c: var(--draft); } .c-all { --c: var(--teal); }

/* ---------- Period selector ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button:hover { background: var(--surface-2); }
.seg button.on { background: var(--navy); color: #fff; }
.seg button .cnt { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--draft-bg); color: var(--ink-2); }
.seg button.on .cnt { background: rgba(255,255,255,.2); color: #fff; }
.custom-range { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Banner ---------- */
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; border: 1px solid; margin-top: 14px; font-size: 13.5px; }
.banner svg { width: 20px; height: 20px; flex: none; }
.banner.warn { background: var(--pending-bg); border-color: var(--pending-bd); color: #7a4706; }
.banner.danger { background: var(--suspended-bg); border-color: var(--suspended-bd); color: #8b1c16; }
.banner.info { background: var(--approved-bg); border-color: var(--approved-bd); color: #0a4e78; }
.banner.ok { background: var(--paid-bg); border-color: var(--paid-bd); color: #0f5b33; }
.banner .grow { flex: 1; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; }
table.data th { text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .arr { opacity: .35; margin-left: 4px; }
table.data th.sorted .arr { opacity: 1; color: var(--teal); }
table.data { font-size: 13.5px; }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr.click { cursor: pointer; }
table.data tbody tr.click:hover { background: #f5fafb; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { padding: 12px 14px; font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.due-over { color: var(--suspended); font-weight: 650; }
.due-soon { color: var(--pending); font-weight: 650; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: #b6c3ce; margin-bottom: 8px; }
.empty .big { font-size: 15px; font-weight: 600; color: var(--ink-2); }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.SUBMITTED { color: var(--pending); background: var(--pending-bg); border-color: var(--pending-bd); }
.pill.APPROVED { color: var(--approved); background: var(--approved-bg); border-color: var(--approved-bd); }
.pill.SUSPENDED { color: var(--suspended); background: var(--suspended-bg); border-color: var(--suspended-bd); }
.pill.PAID { color: var(--paid); background: var(--paid-bg); border-color: var(--paid-bd); }
.pill.POP { color: var(--pop); background: var(--pop-bg); border-color: var(--pop-bd); }
.pill.DRAFT, .pill.CANCELLED { color: var(--draft); background: var(--draft-bg); border-color: var(--draft-bd); }
.pill.lg { font-size: 14px; padding: 6px 14px 6px 12px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--draft-bg); color: var(--ink-2); letter-spacing: .03em; }
.tag.red { background: var(--suspended-bg); color: var(--suspended); }
.tag.teal { background: var(--teal-soft); color: var(--teal-2); }
.tag.gold { background: #fbf1dc; color: #8a6420; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 13.5px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); border-color: #b8c3cd; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-2); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--navy-2); }
.btn.danger { color: var(--suspended); border-color: var(--suspended-bd); }
.btn.danger:hover { background: var(--suspended-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 12px 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .req { color: var(--suspended); }
.field .help { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--ink); width: 100%; transition: border-color .12s, box-shadow .12s; }
.input:hover { border-color: #b3bfca; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,122,131,.15); }
.input.sm { padding: 6px 10px; font-size: 13px; }
textarea.input { min-height: 90px; resize: vertical; }
.input-group { display: flex; }
.input-group .input:first-child { border-radius: 9px 0 0 9px; }
.input-group .input:last-child { border-radius: 0 9px 9px 0; border-left: 0; }
.input-group select.input { width: auto; flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 20px; }
.form-section + .form-section { border-top: 1px solid var(--border); }
.form-section h3 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.form-section h3 .num { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; display: grid; place-items: center; }
.err-text { color: var(--suspended); font-size: 12.5px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--teal); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.radio-card input { accent-color: var(--teal); width: 17px; height: 17px; }
.radio-list { display: grid; gap: 8px; }

.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--teal); background: var(--teal-soft); }
.dropzone svg { width: 30px; height: 30px; color: var(--teal); }
.dropzone .t { font-weight: 650; color: var(--ink-2); margin-top: 4px; }
.file-list { margin-top: 10px; display: grid; gap: 6px; }
.file-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-size: 13px; }
.file-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.file-item svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.action-panel { position: sticky; top: 80px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 550; }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }
.big-amount { font-size: 32px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bank-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.bank-num { font-family: var(--mono); font-size: 16px; letter-spacing: .06em; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c, var(--teal)); }
.timeline .what { font-weight: 600; }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .why { margin-top: 4px; font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; border: 1px solid var(--border); }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.doc-icon.pop { background: var(--pop-bg); color: var(--pop); }
.doc-icon svg { width: 18px; height: 18px; }
.doc-row .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Slide to confirm ---------- */
.slider { --c: var(--teal); position: relative; height: 58px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); user-select: none; touch-action: none; overflow: hidden; }
.slider.approve { --c: #0f8a53; }
.slider.suspend { --c: var(--suspended); }
.slider.paid { --c: var(--approved); }
.slider .fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 28%, #fff); border-radius: 999px; width: 58px; }
.slider .label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--c); letter-spacing: .01em; padding-left: 50px; pointer-events: none; }
.slider .label span { background: linear-gradient(90deg, var(--c) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 30%, #fff) 50%, var(--c) 60%, var(--c) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.slider .knob { position: absolute; top: 4px; left: 4px; width: 50px; height: 50px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; cursor: grab; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 45%, transparent); z-index: 2; }
.slider .knob:active { cursor: grabbing; }
.slider .knob svg { width: 22px; height: 22px; }
.slider.done .label span { animation: none; color: var(--c); background: none; }
.slider.anim .knob, .slider.anim .fill { transition: left .25s ease, width .25s ease; }
.slider.disabled { opacity: .5; pointer-events: none; }
.action-stack { display: grid; gap: 12px; }
.action-note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 24, 38, .55); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; animation: pop .18s ease; }
.modal.wide { max-width: 980px; }
.modal-head { padding: 20px 24px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head h2 { flex: 1; font-size: 19px; }
.modal-body { padding: 12px 24px 20px; }
.modal-foot { padding: 14px 24px 20px; display: grid; gap: 12px; }
.modal-close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--muted); }
.confirm-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.confirm-box .row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.confirm-box .row:last-child { border-bottom: 0; }
.confirm-box .row span:first-child { color: var(--muted); }
.confirm-box .row span:last-child { font-weight: 650; text-align: right; }
.confirm-box .row.total { background: var(--surface-2); font-size: 17px; }
.preview-frame { width: 100%; height: 72vh; border: 0; border-radius: 10px; background: #525659; }
.preview-img { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 550; display: flex; gap: 10px; align-items: center; max-width: 420px; animation: pop .2s ease; }
.toast.ok { background: #145f3b; }
.toast.err { background: #8e1f19; }
.toast svg { width: 18px; height: 18px; flex: none; }

/* ---------- Notifications dropdown ---------- */
.notif-panel { position: absolute; top: 54px; right: 90px; width: 400px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; }
.notif-item { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); color: inherit; position: relative; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: #f3fafb; }
.notif-item.unread::before { content: ""; position: absolute; left: 6px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.notif-title { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--teal-2); }
.notif-title.INVOICE_SUSPENDED { color: var(--suspended); }
.notif-title.INVOICE_PAID { color: var(--paid); }
.notif-title.INVOICE_APPROVED { color: var(--approved); }
.notif-body { display: grid; grid-template-columns: 110px 1fr; gap: 2px 8px; font-size: 13px; margin-top: 6px; }
.notif-body span:nth-child(odd) { color: var(--muted); }
.notif-body span:nth-child(even) { font-weight: 600; }
.notif-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.notif-meta b { color: var(--teal); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: linear-gradient(160deg, #06202f 0%, var(--navy) 40%, #0e5561 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art .waves { position: absolute; left: 0; right: 0; bottom: 0; opacity: .5; }
.auth-art h1 { font-size: 38px; letter-spacing: -.02em; margin-top: auto; max-width: 480px; line-height: 1.12; }
.auth-art p { color: #b5d2dc; max-width: 440px; font-size: 15px; margin-top: 14px; }
.auth-art .feats { display: grid; gap: 10px; margin: 28px 0 64px; position: relative; z-index: 1; }
.auth-art .feat { display: flex; gap: 10px; align-items: center; color: #d9eaf0; font-size: 14px; }
.auth-art .feat svg { width: 18px; height: 18px; color: #4fd1d6; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; }
.auth-box .subtle { margin-bottom: 26px; }
.auth-box .field + .field { margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--teal); font-weight: 650; font-size: 12.5px; cursor: pointer; padding: 6px; }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.alert.err { background: var(--suspended-bg); border-color: var(--suspended-bd); color: #8b1c16; }
.alert.ok { background: var(--paid-bg); border-color: var(--paid-bd); color: #0f5b33; }
.alert.info { background: var(--approved-bg); border-color: var(--approved-bd); color: #0a4e78; }
.secure-note { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 26px; }
.secure-note svg { width: 15px; height: 15px; }
.pw-meter { height: 5px; border-radius: 9px; background: var(--border); overflow: hidden; margin-top: 6px; }
.pw-meter span { display: block; height: 100%; transition: width .2s, background .2s; }

/* ---------- Misc ---------- */
.muted-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: 13px; }
.stat-inline { display: flex; gap: 28px; flex-wrap: wrap; }
.stat-inline .s .l { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat-inline .s .v { font-size: 20px; font-weight: 750; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; display: flex; }
.bar span { height: 100%; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.filters .field > label { font-size: 11.5px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--teal-2); padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 0; cursor: pointer; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef1f4, #f7f9fa, #eef1f4); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.flex { display: flex; gap: 10px; align-items: center; } .flex.wrap { flex-wrap: wrap; } .grow { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .status-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .action-panel { position: static; order: -1; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .q { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(8,24,38,.4); z-index: 80; }
  .bell.menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 60px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .status-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-amount { font-size: 30px; }
  .hero-period { margin-left: 0; text-align: left; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-logo-sm { display: block; }
  .user-chip .txt { display: none; }
  .notif-panel { right: 12px; left: 12px; width: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .filters { grid-template-columns: 1fr 1fr; }
  table.data.responsive thead { display: none; }
  table.data.responsive tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 14px; border-bottom: 1px solid var(--border); gap: 2px 10px; }
  table.data.responsive td { border: 0; padding: 2px 0; }
  table.data.responsive td[data-hide-sm] { display: none; }
}

@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .card { box-shadow: none; }
  .hero { color: #000; background: #fff; border: 1px solid #ccc; }
  body { background: #fff; }
}

/* list rows (clickable) */
.list-row { display: flex; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); text-decoration: none; }
.card-head h2 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--teal); }
.card-head h2 svg.warn-ic { color: var(--suspended); }
.ic-sm { width: 15px; height: 15px; vertical-align: -2px; }
.timeline li .dot { border-color: var(--c, var(--teal)); }
a.list-link { color: inherit; transition: box-shadow .15s, transform .08s; }
a.list-link:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
a.list-link svg { width: 26px; height: 26px; color: var(--teal); }
tr.sel td { background: var(--teal-soft); }
.tag + .tag { margin-left: 4px; }

table.data td:first-child, table.data th:first-child { padding-left: 18px; }
table.data td:last-child, table.data th:last-child { padding-right: 18px; }
td .cell-main.nw, td.nowrap { white-space: nowrap; }
.card-head .input, .btn-row .input, .toolbar .input { width: auto; }
.card-head select.input { max-width: 220px; }
.next-nav { display: flex; justify-content: space-between; gap: 8px; }
.gap-lg { gap: 32px; }
table.imp td:nth-child(2) { min-width: 320px; }
table.imp select.dept { min-width: 170px; }
.imp-warn { font-size: 12px; color: #8a5a00; background: var(--pending-bg); border-radius: 6px; padding: 3px 8px; margin-top: 5px; display: inline-block; }
/* keep the Action column on screen even with long invoice numbers / supplier names */
table.data td .cell-main.nw { white-space: normal; overflow-wrap: anywhere; max-width: 150px; }
table.data.responsive td:nth-child(2) { max-width: 230px; }
table.data td:last-child .btn { padding: 6px 10px; }
@media (max-width: 1500px) { table.data.responsive th, table.data.responsive td { padding-left: 8px; padding-right: 8px; } }
/* demo page only */
.demo-ribbon { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 300; background: #fff8e6; color: #5c3d00; border: 1px solid #f0d28c; border-radius: 999px; padding: 7px 10px 7px 16px; font-size: 12.5px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
.demo-ribbon code { background: #fff; border: 1px solid #f0d28c; border-radius: 5px; padding: 1px 6px; font-family: var(--mono); }
.demo-ribbon button { border: 1px solid #e3be6a; background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-weight: 600; cursor: pointer; color: #5c3d00; }
@media print { .demo-ribbon { display: none; } }
/* In the hosted demo, printing and file downloads are blocked by the viewer, so hide those buttons there only. */
.demo #print, .demo #wprint, .demo #mprint, .demo #csv, .demo #wcsv, .demo #export, .demo [data-dl], .demo #pv-dl { display: none !important; }
@media (max-width: 700px) { .demo-ribbon .users { display: none; } .demo-ribbon { bottom: 8px; font-size: 11.5px; } }

/* ---------- Approver quick actions (one click) ---------- */
.quick-approve { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-approve .btn { justify-content: center; font-size: 16px; min-height: 54px; }
.quick-approve .btn:only-child { grid-column: 1 / -1; }
.btn.approve { background: var(--paid); border-color: var(--paid); color: #fff; }
.btn.approve:hover:not(:disabled) { filter: brightness(.92); }
.btn.suspend { background: #fff; border-color: var(--suspended); color: var(--suspended); }
.btn.suspend:hover:not(:disabled) { background: var(--suspended); color: #fff; }
.qa-reason { display: grid; gap: 10px; }
.qa-reason[hidden] { display: none; }
.qa-reason label { font-weight: 700; font-size: 13px; }
.qa-reason .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: inherit; }
.chip:hover, .chip:focus-visible { border-color: var(--suspended); color: var(--suspended); }

/* ---------- GM review step ---------- */
.pill.GM { color: #3f3a8f; background: #eceafd; border-color: #cfcaf7; }
.pill.RETURNED { color: #9a4b00; background: #fff1e0; border-color: #f6d2a8; }
.c-gm { --c: #5b54c6; }
.scard.c-gm .t { color: #5b54c6; }
.btn.gm { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.gm:hover:not(:disabled) { background: var(--teal-2); }
.gm-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.gm-actions .btn { justify-content: center; min-height: 50px; font-size: 15px; white-space: normal; }
@media (max-width: 900px) {
  #mine .card-head .subtle { display: none; }
  .card-head { flex-wrap: wrap; row-gap: 8px; }
  .card-head .input.sm { max-width: 100%; flex: 1 1 140px; }
}
.tag.tf { display: inline-block; margin-top: 4px; font-size: 11px; }
.to-follow { align-items: flex-start; }

/* ---------- supplier approval ---------- */
.mb-16 { margin-bottom: 16px; }
.list-row > a.grow { color: inherit; min-width: 0; }
.list-row > a.grow:hover { text-decoration: none; }
.sup-queue { border-color: var(--gold, #c9a227); }
.sup-queue .card-head { flex-wrap: wrap; }
.sup-queue .card-head h2 { flex: 0 0 auto; white-space: nowrap; }
.sup-queue .card-head .subtle { flex: 1 1 260px; }
@media (max-width: 640px) {
  .sup-queue .list-row { flex-wrap: wrap; }
  .sup-queue .list-row > a.grow { flex-basis: 100%; }
}

.next-nav { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.next-nav .btn { width: 100%; justify-content: center; }

/* ---------- purchase orders ---------- */
.pill.po-DRAFT, .pill.po-CANCELLED { color: var(--draft); background: var(--draft-bg); border-color: var(--draft-bd); }
.pill.po-PENDING { color: var(--pending); background: var(--pending-bg); border-color: var(--pending-bd); }
.pill.po-APPROVED { color: var(--approved); background: var(--approved-bg); border-color: var(--approved-bd); }
.pill.po-ORDERED, .pill.po-PART_RECEIVED { color: #6d28d9; background: #f3efff; border-color: #ddd3fb; }
.pill.po-RECEIVED { color: var(--paid); background: var(--paid-bg); border-color: var(--paid-bd); }
.pill.po-REJECTED, .pill.po-RETURNED { color: var(--suspended); background: var(--suspended-bg); border-color: var(--suspended-bd); }
.po-lines .input { min-width: 0; }
.po-lines td:first-child { min-width: 220px; }
.input.sm-in { width: 110px; }
.input.num { text-align: right; }
.po-lines .hint { margin-top: 4px; color: var(--teal-2); min-height: 0; }
.btn.full { width: 100%; justify-content: center; }
.big-amt { font-size: 26px; font-weight: 750; color: var(--navy); }
.warn-txt { color: var(--suspended); font-weight: 600; }
.toolbar .input.grow { flex: 1; min-width: 200px; }
.form-actions { justify-content: flex-end; }
@media (max-width: 700px) {
  .po-lines thead { display: none; }
  .po-lines tr { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .po-lines td { border: 0 !important; padding: 0 !important; }
  .po-lines td:first-child { grid-column: 1 / -1; min-width: 0; }
  .input.sm-in { width: 100%; }
  .form-actions .btn { flex: 1; }
}
/* printable PO */
.po-doc { position: relative; background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 36px 40px; border: 1px solid var(--border); border-radius: 12px; font-size: 13px; overflow: hidden; }
.po-doc .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #667; font-weight: 700; margin-bottom: 4px; }
.po-doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #0f3044; padding-bottom: 16px; }
.po-doc-head h1 { margin: 0; font-size: 26px; letter-spacing: .06em; color: #0f3044; }
.po-doc-head .right { text-align: right; }
.po-doc-head .big { font-size: 18px; font-weight: 700; margin: 4px 0; }
.po-logo { height: 70px; width: auto; }
.po-doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.po-doc-lines { width: 100%; border-collapse: collapse; }
.po-doc-lines th { background: #0f3044; color: #fff; text-align: left; padding: 8px; font-size: 12px; }
.po-doc-lines td { padding: 8px; border-bottom: 1px solid #ddd; }
.po-doc-lines .num { text-align: right; }
.po-doc-lines tfoot td { border-top: 2px solid #0f3044; font-size: 14px; }
.po-doc-notes, .po-doc-terms { margin-top: 18px; }
.po-doc-terms ol { margin: 4px 0 0 18px; padding: 0; color: #444; }
.po-doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.po-doc-sign .line { border-bottom: 1px solid #333; height: 44px; margin-bottom: 6px; position: relative; }
.po-doc .stamp { position: absolute; left: 10px; bottom: 6px; border: 3px solid #1a7f4b; color: #1a7f4b; font-weight: 800; letter-spacing: .12em; padding: 2px 10px; border-radius: 6px; transform: rotate(-6deg); }
.po-watermark { position: absolute; inset: 40% -10% auto; text-align: center; font-size: 44px; font-weight: 900; color: rgba(200, 30, 30, .14); transform: rotate(-18deg); pointer-events: none; }
.mb-16 { margin-bottom: 16px; }
@media print {
  .po-doc { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .po-doc-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .po-doc .stamp, .po-watermark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 700px) { .po-doc { padding: 20px; } .po-doc-parties, .po-doc-sign { grid-template-columns: 1fr; } .po-logo { height: 48px; } .po-doc-head h1 { font-size: 18px; } }

/* orange purchase-order call to action */
:root { --orange: #e8730c; --orange-2: #c75f05; }
.btn.orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.orange:hover:not(:disabled) { background: var(--orange-2); border-color: var(--orange-2); }
#nav a[data-path="/po"] { color: #ffb066; }
#nav a[data-path="/po"] svg { color: var(--orange); }
#nav a[data-path="/po"].active { background: var(--orange); color: #fff; box-shadow: inset 3px 0 0 #ffd2a6; }
#nav a[data-path="/po"].active svg { color: #fff; }
.again-row { display: flex; flex-wrap: wrap; gap: 8px; }
.again-row .btn { flex-direction: column; align-items: flex-start; gap: 2px; }
.again-row .btn .subtle { font-size: 11px; font-weight: 500; }
.budget .bar { height: 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 6px 0 4px; }
.budget .bar span { display: block; height: 100%; background: var(--teal); }
.budget.near .bar span { background: var(--orange); }
.budget.over .bar span { background: var(--suspended); }
.budget.over .cell-sub b { color: var(--suspended); }
.budget-cell { min-width: 220px; }
.po-doc-lines.check td.box { border: 1px solid #bbb; min-width: 70px; height: 34px; }
.po-doc-lines.check td.box.sm { min-width: 40px; }
.po-doc .write-line { border-bottom: 1px solid #333; height: 28px; max-width: 360px; }
.po-doc-sign.three { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .po-doc-sign.three { grid-template-columns: 1fr; } }
.scard .n.n-sm { font-size: 1.35rem; }
/* Dashboard queues: things to approve from the team = orange; my drafts = light red */
.card.q-orange { border: 1px solid #f6b779; border-left: 5px solid var(--orange); background: #fff7ef; }
.card.q-orange .card-head { background: #ffe9d4; border-bottom-color: #f6c79a; }
.card.q-orange .card-head h2, .card.q-orange .card-head h2 svg { color: #9a4a04; }
.card.q-orange .tag { background: var(--orange); color: #fff; border-color: var(--orange); }
.card.q-orange .btn.primary { background: var(--orange); border-color: var(--orange); }
.card.q-orange .btn.primary:hover:not(:disabled) { background: var(--orange-2); border-color: var(--orange-2); }
.card.q-orange .list-row:hover { background: #ffefe0; }
.card.q-draft { border: 1px solid #f3c1c1; border-left: 5px solid #e57373; background: #fff5f5; }
.card.q-draft .card-head { background: #fde4e4; border-bottom-color: #f3c9c9; }
.card.q-draft .card-head h2 { color: #a03030; }
.card.q-draft .tag { background: #f8d0d0; color: #8a2424; border-color: #f0b5b5; }
.card.q-draft .list-row:hover { background: #fdeaea; }
.rem-to { max-width: 200px; }
/* Dashboard banner split (everyone except approvers): With GM · Pending approval · Approved */
.hero-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.hero-split .hs { background: rgba(255,255,255,.07); border-radius: 12px; padding: 14px 16px; border-top: 4px solid #8f7ae6; }
.hero-split .hs-pending { border-top-color: #f0b44c; }
.hero-split .hs-approved { border-top-color: #4aa3df; }
.hero-split .hs-l { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #cfe6ea; font-weight: 700; }
.hero-split .hs-a { font-size: 26px; font-weight: 750; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hero-split .hs-c { font-size: 13px; color: #b9d3db; margin-top: 4px; }
@media (max-width: 760px) { .hero-split { grid-template-columns: 1fr; } .hero-split .hs-a { font-size: 22px; } }
/* v10: route tag, hero tiles, department groups */
.route-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: #6a54c9; background: #f3effe; border: 1px solid #ddd3fb; border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.hero-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.hero-tiles .ht { text-align: left; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); border-top: 3px solid #8f7ae6; border-radius: 10px; padding: 10px 12px; color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.hero-tiles .ht:hover { background: rgba(255,255,255,.14); }
.hero-tiles .ht.on { background: rgba(255,255,255,.22); box-shadow: 0 0 0 2px rgba(255,255,255,.5) inset; }
.hero-tiles .hs-pending { border-top-color: #f0b44c; } .hero-tiles .hs-approved { border-top-color: #4aa3df; } .hero-tiles .hs-paid { border-top-color: #43c07a; } .hero-tiles .hs-suspended { border-top-color: #e5675f; }
.hero-tiles .ht-l { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #cfe6ea; font-weight: 700; }
.hero-tiles .ht-a { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.hero-tiles .ht-c { font-size: 12px; color: #b9d3db; }
.dept-groups { display: flex; flex-direction: column; }
.dept-group { border-top: 1px solid var(--border); }
.dept-group > summary, .dept-all { list-style: none; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 18px; background: #f2f6f8; cursor: pointer; font-weight: 750; }
.dept-group > summary::-webkit-details-marker { display: none; }
.dept-group > summary::before { content: "▸"; color: var(--muted); width: 12px; }
.dept-group[open] > summary::before { content: "▾"; }
.dept-group .dg-name, .dept-all .dg-name { min-width: 160px; }
.dg-count { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.dg-appr { color: var(--approved); font-weight: 650; font-size: 12.5px; margin-left: auto; }
.dg-total { font-variant-numeric: tabular-nums; min-width: 150px; text-align: right; }
.dept-all { background: var(--navy); color: #fff; cursor: default; border-radius: 0 0 var(--radius) var(--radius); }
.dept-all .dg-count { color: #b9d3db; } .dept-all .dg-appr { color: #9fd3ff; }
@media (max-width: 760px) { .dg-appr { margin-left: 0; width: 100%; } .dg-total { min-width: 0; text-align: left; } .dept-group .dg-name { min-width: 0; } }
/* v11: F&B validation (Victoria) */
.tag.green { background: var(--paid-bg); color: var(--paid); }
.route-tag.fnb { color: #9a5a00; background: #fff4e0; border-color: #f5d9a8; }
.validate-box { display: grid; gap: 10px; }
.validate-box[hidden] { display: none; }
.val-checks { display: grid; gap: 6px; }
.val-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; line-height: 1.35; background: #fff; }
.val-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--paid); flex: none; }
.val-check:has(input:checked) { border-color: var(--paid-bd); background: var(--paid-bg); }
.val-actions { display: grid; gap: 8px; }
.val-actions .btn { justify-content: center; font-size: 15px; min-height: 50px; }
.btn.approve:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.validated-line { color: var(--paid); font-weight: 650; font-size: 13.5px; background: var(--paid-bg); border: 1px solid var(--paid-bd); border-radius: 8px; padding: 6px 10px; }
.validated-line .cell-sub { color: #2f6b4b; font-weight: 500; }

/* ---------- LOKO Sports Lounge (html.loko — set only on the LOKO site; KoKo never gets this class) ---------- */
html.loko {
  --navy: #2b1506; --navy-2: #3d1e09;
  --teal: #9c4f12; --teal-2: #823f0c; --teal-soft: #f7ece2;
  --gold: #c58a3a;
}
html.loko .sidebar { background: linear-gradient(180deg, #341a08 0%, var(--navy) 55%, #241104 100%); color: #ead9cb; }
html.loko .brand-sub { color: #d2b49b; }
html.loko .auth-art { background: linear-gradient(160deg, #1c0d03 0%, var(--navy) 45%, #5b2c0d 100%); }
html.loko .auth-art p { color: #e2c9b4; }
html.loko .auth-art .feat { color: #f1e2d5; }
html.loko .auth-art .feat svg { color: #f0a560; }
html.loko .auth-art .waves path { fill: rgba(240, 165, 96, .14); }
/* The LOKO badge is square: show it as a rounded tile rather than a wide wordmark. */
.brand-logo .logo.square { width: 76px; height: 76px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(0,0,0,.35); }
.brand-logo:has(.logo.square) { flex-direction: row; align-items: center; gap: 14px; }
.brand-logo .brand-name.loko-name { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.25; color: #fff; }
.auth-logo.square { width: 132px; height: 132px; border-radius: 24px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 14px 40px rgba(0,0,0,.4); }
.auth-logo-sm.square { width: 92px; height: 92px; border-radius: 18px; }
.po-logo.square { height: 70px; width: 70px; border-radius: 10px; }
@media (max-width: 700px) { .po-logo.square { height: 48px; width: 48px; } }
html.loko .sidebar-foot { color: #d2b49b; }
html.loko .hero { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, #6a3412 100%); }
html.loko .hero::after { background: radial-gradient(circle, rgba(240, 165, 96, .22), transparent 65%); }
html.loko .hero-label { color: #f0c79a; }
@media print { html.loko .hero { background: #fff; } }
/* Hosted demo only (DEMO=1) */
.demo-banner { position: sticky; top: 0; z-index: 200; background: #b3261e; color: #fff; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .04em; padding: 7px 12px; }
@media print { .demo-banner { display: none; } }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.demo-account { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.demo-account:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.demo-account span { font-size: 12px; color: var(--muted); }
.demo-or { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 10px; border-top: 1px solid var(--border); }
.demo-or span { position: relative; top: -9px; background: var(--surface); padding: 0 8px; }
@media (max-width: 420px) { .demo-accounts { grid-template-columns: 1fr; } }
/* Optional "attach proof of payment" link on a paid invoice (never required). */
.link-sm { display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; font-size: 13px; font-weight: 550; color: var(--teal); cursor: pointer; }
.link-sm:hover { text-decoration: underline; }
