/* Poxilo - design system */
:root {
  color-scheme: light;
  --bg: #f2f4fb;
  --bg2: #e9ecf8;
  --surface: #ffffff;
  --surface2: #f7f8fd;
  --ink: #12142b;
  --ink2: #50557a;
  --muted: #8a8fae;
  --line: #e6e8f4;
  --line2: #d6d9ec;
  --brand: #5b4bf5;
  --brand2: #8a5cf6;
  --brand3: #20b4e8;
  --grad: linear-gradient(135deg, #5b4bf5 0%, #8a5cf6 48%, #20b4e8 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,75,245,.10), rgba(32,180,232,.10));
  --shadow: 0 1px 2px rgba(25,28,70,.05), 0 8px 24px rgba(25,28,70,.06);
  --shadow-lg: 0 20px 60px rgba(25,28,70,.22);
  --side-from: #12142e;
  --side-to: #1b1749;
  --good: #0a8f0a; --good-bg: #e4f6e4;
  --warn: #9a6a00; --warn-bg: #fdf1d3;
  --bad: #c42f2f;  --bad-bg: #fde7e7;
  --info: #2a6fd0; --info-bg: #e6f0fd;
  --neutral-bg: #eceef8;
  /* categorical data colours (validated palette, fixed order) */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --radius: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f20; --bg2: #13162d; --surface: #171a34; --surface2: #1d2140;
  --ink: #eceeff; --ink2: #b5b9dc; --muted: #8387ad; --line: #272b52; --line2: #343968;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
  --side-from: #0a0b1b; --side-to: #14123a;
  --good: #4fd04f; --good-bg: rgba(60,190,60,.14);
  --warn: #f5be3a; --warn-bg: rgba(250,178,25,.14);
  --bad: #ff7b7b;  --bad-bg: rgba(230,80,80,.16);
  --info: #6ea8ff; --info-bg: rgba(60,120,230,.16);
  --neutral-bg: #232748;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --c7: #9085e9; --c8: #e66767;
  --grid: #2c2c4a; --axis: #3a3d63;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.gap-lg { gap: 18px; }
.spacer { height: 18px; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------ login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--bg); }
.login-hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 10% -10%, rgba(32,180,232,.55), transparent 60%),
              radial-gradient(700px 600px at 100% 100%, rgba(138,92,246,.7), transparent 60%), linear-gradient(160deg, #1b1553, #2a1a7a 55%, #1d3a8f);
}
.login-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -140px; border-radius: 50%; border: 90px solid rgba(255,255,255,.06); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(91,75,245,.45); }
.brand .logo svg { width: 22px; height: 22px; }
.login-hero h1 { font-size: 40px; line-height: 1.1; max-width: 520px; margin: 0 0 14px; letter-spacing: -.03em; }
.login-hero p { max-width: 460px; color: rgba(255,255,255,.78); font-size: 16px; margin: 0 0 28px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; max-width: 540px; position: relative; z-index: 1; }
.feature-pills span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; backdrop-filter: blur(4px); }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin-bottom: 4px; }
.login-card .sub { color: var(--ink2); margin-bottom: 26px; }
.login-card .field { margin-bottom: 16px; }
.hint-box { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--grad-soft); color: var(--ink2); font-size: 12.5px; }

/* ------------------------------------------------ layout */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px 14px; color: #c8cbef;
  background: linear-gradient(180deg, var(--side-from), var(--side-to)); display: flex; flex-direction: column;
}
.sidebar .brand { color: #fff; padding: 0 10px 20px; }
.nav-group { margin-top: 14px; }
.nav-group h6 { margin: 0 12px 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #7478a8; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 11px; color: #c0c4ee; cursor: pointer;
  font-weight: 500; transition: background .15s, color .15s; user-select: none;
}
.nav-item svg { font-size: 18px; opacity: .9; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(106,92,255,.95), rgba(138,92,246,.85) 55%, rgba(32,180,232,.8)); color: #fff; box-shadow: 0 8px 20px rgba(80,66,230,.35); }
.nav-item .count { margin-left: auto; background: #ff5d73; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.side-foot { margin-top: auto; padding-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
.user-chip .who { line-height: 1.2; min-width: 0; }
.user-chip .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 11.5px; color: #8e92c4; text-transform: capitalize; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.side-actions { display: flex; gap: 6px; margin-top: 8px; }
.side-actions button { flex: 1; background: rgba(255,255,255,.06); border: 0; color: #b9bdea; padding: 8px; border-radius: 10px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12.5px; }
.side-actions button:hover { background: rgba(255,255,255,.12); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 20px; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.search-box { position: relative; width: 320px; }
.search-box input[type=text] { width: 100%; padding: 9px 12px 9px 36px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.search-box input[type=text]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,75,245,.15); }
.search-box svg { position: absolute; left: 12px; top: 11px; color: var(--muted); font-size: 16px; }
.dropdown { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 40; max-height: 360px; overflow-y: auto; }
.dropdown .opt { padding: 9px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.dropdown .opt:hover, .dropdown .opt.sel { background: var(--surface2); }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink2); position: relative; font-size: 17px; }
.icon-btn:hover { color: var(--brand); border-color: var(--line2); }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; background: #ff5d73; color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 999px; min-width: 17px; text-align: center; line-height: 17px; }
.view { padding: 8px 32px 48px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; }
.page-head p { margin: 2px 0 0; color: var(--ink2); }

/* ------------------------------------------------ cards, grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card > .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 18px 20px 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-3-eq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3-eq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .app { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 18px 10px; }
  .sidebar .brand span, .nav-item span, .nav-group h6, .user-chip .who, .side-actions span { display: none; }
  .nav-item { justify-content: center; } .nav-item .count { position: absolute; margin: -14px -22px 0 0; }
  .g2, .g3, .g-main, .g-3-eq { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .login-screen { grid-template-columns: 1fr; } .login-hero { display: none; }
  .search-box { width: 200px; } .view, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* hero */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 28px 32px; margin: 4px 0 18px;
  background: radial-gradient(600px 300px at 90% 0%, rgba(32,180,232,.65), transparent 60%), radial-gradient(500px 400px at 0% 120%, rgba(138,92,246,.8), transparent 60%), linear-gradient(135deg, #3b2fc9, #5b4bf5 55%, #6a5cff);
  box-shadow: 0 18px 44px rgba(70,56,220,.32); display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); }
.hero h2 { font-size: 26px; letter-spacing: -.02em; }
.hero .sub { color: rgba(255,255,255,.8); margin-top: 4px; }
.hero .balance { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.hero .balance small { display: block; color: rgba(255,255,255,.75); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.hero .balance b { font-size: 32px; letter-spacing: -.02em; }
.hero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.hero .btn { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.hero .btn:hover { background: rgba(255,255,255,.28); }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-weight: 550; font-size: 13px; }
.kpi .label .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand); font-size: 16px; }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.kpi .spark { position: absolute; right: 16px; top: 62px; opacity: .95; }
.kpi .value { padding-right: 100px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.delta.up-good, .delta.down-good { background: var(--good-bg); color: var(--good); }
.delta.up-bad, .delta.down-bad { background: var(--bad-bg); color: var(--bad); }
.delta.flat { background: var(--neutral-bg); color: var(--ink2); }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mini { display: flex; gap: 14px; align-items: center; padding: 14px 18px; }
.mini .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--grad-soft); color: var(--brand); }
.mini b { font-size: 19px; display: block; line-height: 1.2; } .mini span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 1280px) { .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 11px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; transition: transform .1s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { background: var(--surface2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 16px rgba(91,75,245,.32); }
.btn.primary:hover { box-shadow: 0 8px 22px rgba(91,75,245,.45); filter: brightness(1.05); }
.btn.danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--surface2); color: var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--neutral-bg); color: var(--ink2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.plain::before { display: none; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.field label .req { color: var(--bad); }
.field .help { font-size: 12px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=email], input[type=tel], input[type=month], select, textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,75,245,.15); }
.checkline { display: flex; align-items: center; gap: 8px; padding: 9px 0; }
.checkline input { width: 17px; height: 17px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { background: var(--bad-bg); color: var(--bad); padding: 9px 12px; border-radius: 10px; font-weight: 550; margin-bottom: 12px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; background: var(--surface); position: sticky; top: 0; }
.t th.sortable { cursor: pointer; } .t th.sortable:hover { color: var(--ink); }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface2); }
.t tr.click { cursor: pointer; }
.t .right { text-align: right; } .t .center { text-align: center; }
.t tfoot td { font-weight: 700; background: var(--surface2); border-top: 2px solid var(--line2); }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.toolbar .search { position: relative; width: 260px; }
.toolbar .search input { padding-left: 34px; }
.toolbar .search svg { position: absolute; left: 11px; top: 11px; color: var(--muted); font-size: 15px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.pager .btn { padding: 4px 10px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; opacity: .5; }
.person { display: flex; gap: 10px; align-items: center; }
.person small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }

/* tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 13px; width: fit-content; max-width: 100%; overflow-x: auto; box-shadow: var(--shadow); }
.tab { padding: 7px 16px; border-radius: 10px; cursor: pointer; color: var(--ink2); font-weight: 600; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(91,75,245,.3); }
.tab .n { background: rgba(0,0,0,.12); border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.tab.active .n { background: rgba(255,255,255,.25); }

/* modal / toast */
.overlay { position: fixed; inset: 0; background: rgba(12,14,40,.55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: pop .18s ease; border: 1px solid var(--line); }
.modal.wide { max-width: 860px; } .modal.xl { max-width: 1040px; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 20px 24px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head h3 { font-size: 18px; } .modal-head p { margin: 2px 0 0; color: var(--ink2); }
.modal-body { padding: 14px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 380px; font-weight: 550; }
.toast.ok { background: #14803c; color: #fff; } .toast.err { background: #c42f2f; color: #fff; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; color: var(--ink2); font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow-lg); font-size: 12.5px; min-width: 150px; opacity: 0; transition: opacity .08s; }
.tip b { display: block; margin-bottom: 4px; color: var(--ink); }
.tip .tl { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--ink2); }
.tip .tl i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; }
.tip .tl span.v { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend .it { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: default; padding: 3px 6px; border-radius: 8px; }
.donut-legend .it:hover, .donut-legend .it.on { background: var(--surface2); }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .v { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }

/* bars & progress */
.bar { height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--c1); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.good > span { background: var(--good); } .bar.warn > span { background: #e7a400; } .bar.bad > span { background: #d03b3b; }
.budget-row { padding: 9px 0; } .budget-row .top { display: flex; justify-content: space-between; margin-bottom: 6px; font-weight: 550; }
.budget-row .top small { color: var(--muted); font-weight: 400; }

/* lists / insights */
.insight { display: flex; gap: 12px; padding: 11px 12px; border-radius: 12px; background: var(--surface2); margin-bottom: 8px; align-items: flex-start; }
.insight .dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 15px; }
.insight.good .dot { background: var(--good-bg); color: var(--good); } .insight.warn .dot { background: var(--warn-bg); color: var(--warn); }
.insight.bad .dot { background: var(--bad-bg); color: var(--bad); } .insight.info .dot { background: var(--info-bg); color: var(--info); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.list-row small { color: var(--muted); display: block; }
.stat-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line2); }
.stat-line:last-child { border-bottom: 0; }
.stat-line.total { font-weight: 750; border-top: 2px solid var(--line2); border-bottom: 0; margin-top: 4px; font-size: 15px; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); cursor: pointer; font-weight: 550; color: var(--ink2); font-size: 12.5px; }
.pill.active { background: var(--brand); color: #fff; border-color: transparent; }
.camp { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.camp .art { height: 84px; border-radius: 12px; background: var(--grad); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 10px 14px; color: #fff; font-weight: 700; font-size: 17px; }
.camp .art::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; border: 30px solid rgba(255,255,255,.12); right: -40px; top: -60px; }
.camp.c2 .art { background: linear-gradient(135deg, #1baf7a, #20b4e8); } .camp.c3 .art { background: linear-gradient(135deg, #eb6834, #e87ba4); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; }
.big-input { font-size: 22px !important; font-weight: 700; padding: 12px 14px !important; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.skeleton { height: 120px; border-radius: 16px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shine 1.2s infinite; }
@keyframes shine { to { background-position: -200% 0; } }

/* receipt / payslip print sheet */
.sheet { background: #fff; color: #111; padding: 28px 32px; border-radius: 12px; border: 1px solid #e5e7f1; font-size: 13px; }
.sheet h2 { font-size: 20px; margin-bottom: 2px; } .sheet .meta { color: #666; }
.sheet table { width: 100%; border-collapse: collapse; margin: 14px 0; } .sheet th, .sheet td { padding: 7px 8px; border-bottom: 1px solid #e5e7f1; text-align: left; }
.sheet td.r, .sheet th.r { text-align: right; } .sheet .tot td { font-weight: 700; border-top: 2px solid #111; }
.sheet .stamp { display: inline-block; border: 3px solid #c42f2f; color: #c42f2f; padding: 2px 14px; font-weight: 800; letter-spacing: .15em; transform: rotate(-6deg); border-radius: 6px; }
@media print {
  body * { visibility: hidden; } .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; width: 100%; } .overlay { background: none; backdrop-filter: none; padding: 0; display: block; }
  .modal { box-shadow: none; border: 0; max-width: none; max-height: none; } .modal-head, .modal-foot { display: none; } .modal-body { padding: 0; overflow: visible; } .sheet { border: 0; }
}

/* collect fees */
.stat-tile.bad-tile .ico { background: var(--bad-bg); color: var(--bad); }
.stat-tile .value { font-size: 24px; }
.collect-search { padding: 14px 18px; }
.collect-search .search-box input { font-size: 15px; padding-top: 11px; padding-bottom: 11px; }
.avatar.lg { width: 60px; height: 60px; font-size: 22px; box-shadow: 0 6px 18px rgba(91,75,245,.28); }
.profile-card { background: linear-gradient(135deg, var(--surface) 0%, var(--surface) 55%, var(--surface2) 100%); }
.profile-card .grow { flex: 1 1 300px; min-width: 0; }
.profile-stats { flex: 1 1 100%; display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-stats small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.profile-stats b { font-size: 19px; font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 99px; background: var(--line2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.pay-panel { gap: 14px; position: relative; overflow: hidden; padding-top: 24px; }
.pay-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad); }
.pay-total { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--grad-soft); }
.pay-total small { color: var(--ink2); font-weight: 600; }
.pay-total b { font-size: 22px; margin-left: auto; font-variant-numeric: tabular-nums; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--surface); color: var(--ink2); font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s; }
.mode-tile span { font-size: 18px; }
.mode-tile:hover { border-color: var(--brand); }
.mode-tile.on { border-color: var(--brand); background: var(--grad-soft); color: var(--brand); box-shadow: 0 0 0 3px rgba(91,75,245,.12); }
.pay-btn { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.pay-btn:disabled { opacity: .55; cursor: not-allowed; }
tr.row-od td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
@media (max-width: 1000px) { .hide-sm { display: none; } }
