/* FIL executive dashboard - responsive (phone / iPad / desktop / wall screen), light + dark */
:root {
  --blue: #0B3D91; --blue-2: #1D5FBF; --blue-soft: #EAF0F8; --green: #84BE3F; --green-d: #4F8A1E;
  --bg: #F3F5F8; --panel: #FFFFFF; --panel-2: #F7F9FB; --line: #E3E8EF; --ink: #0B1B2E; --ink-2: #44546A; --muted: #7A889C;
  --up: #1E8E4A; --down: #C8372D; --warn: #B7791F;
  --navy: #0A1E3C; --navy-2: #102C55;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-hover: 0 10px 28px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.06);
  --r: 12px; --gap: 16px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --c1: #004EA3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1422; --panel: #111E31; --panel-2: #0E1A2B; --line: #1F3048; --ink: #E8EEF7; --ink-2: #A9B8CC; --muted: #7286A1;
    --blue-soft: #13294A; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 22px rgba(0,0,0,.25); --shadow-hover: 0 8px 26px rgba(43,139,216,.22);
    --c1: #4C8FE0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1422; --panel: #111E31; --panel-2: #0E1A2B; --line: #1F3048; --ink: #E8EEF7; --ink-2: #A9B8CC; --muted: #7286A1;
  --blue-soft: #13294A; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 22px rgba(0,0,0,.25); --shadow-hover: 0 8px 26px rgba(43,139,216,.22);
  --c1: #4C8FE0; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue-2); }
.hidden { display: none !important; }

/* ---------- login ---------- */
/* login: same look as the SHERP (TSplus) portal - photo brand panel left, white card right */
.login { min-height: 100%; display: grid; grid-template-columns: 54vw 1fr; background: #F4F7FB; color: #0F1E33; }
.fil-brand { position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh;
  background: linear-gradient(90deg, rgba(3,14,30,.94) 0%, rgba(3,14,30,.86) 48%, rgba(3,14,30,.42) 100%),
              linear-gradient(135deg, rgba(6,26,51,.55) 0%, rgba(0,78,163,.45) 60%, rgba(6,26,51,.55) 100%),
              url(/img/bg.jpg) center/cover no-repeat;
  text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.fil-brand::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, #84BE3F 0 50%, #0A5CBF 50% 100%); }
.fil-brand .fil-logo { width: 210px; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.fil-brand .fil-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: #9BD452; margin: 0 0 14px; }
.fil-brand h1 { font-size: 50px; line-height: 1.06; font-weight: 700; letter-spacing: -.5px; margin: 0 0 20px; max-width: 580px; color: #fff; }
.fil-brand h1 span { color: #9BD452; }
.fil-brand .fil-lead { font-size: 19px; line-height: 1.6; font-weight: 500; max-width: 540px; margin: 0; }
.fil-feats { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.fil-feat { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: rgba(4,18,38,.82); border: 1px solid rgba(255,255,255,.30); font-size: 15px; font-weight: 600; text-shadow: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fil-feat i { width: 8px; height: 8px; border-radius: 50%; background: #84BE3F; box-shadow: 0 0 0 4px rgba(132,190,63,.22); }
.fil-brand small { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.92); letter-spacing: .3px; }
.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px 24px; }
.login-card { position: relative; width: 100%; max-width: 420px; background: #fff; color: #0F1E33; border-radius: 18px; padding: 36px 36px 26px; border: 1px solid #DCE3EC; box-shadow: 0 1px 2px rgba(15,30,51,.04), 0 18px 50px rgba(15,30,51,.10); animation: rise .5s ease both; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, #84BE3F, #004EA3); }
.fil-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.fil-head img { width: 46px; height: 46px; border-radius: 11px; }
.fil-head b { display: block; font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.fil-head span { display: block; font-size: 13px; color: #6B7C93; }
.fil-h2 { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.fil-sub { font-size: 14px; color: #5B6B80; margin: 0 0 20px; }
.login-card .field input { background: #F7F9FC; border-color: #DCE3EC; color: #0F1E33; height: 48px; }
.login-card .field input:focus { border-color: #004EA3; background: #fff; box-shadow: 0 0 0 4px rgba(0,78,163,.12); }
.login-card .field > span { color: #33475F; }
.login-card .btn-primary { background: linear-gradient(180deg, #0A5CBF, #004EA3); box-shadow: 0 8px 20px rgba(0,78,163,.25); height: 50px; }
.fil-notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: #FFF8EB; border: 1px solid #F3D9A4; }
.fil-notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke: #B26A00; }
.fil-notice p { font-size: 12.5px; line-height: 1.45; color: #6B4A12; margin: 0; }
.fil-notice b { color: #8A4B00; }
.fil-support { margin-top: 20px; padding-top: 16px; border-top: 1px solid #DCE3EC; }
.fil-shead { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: #33475F; margin: 0 0 10px; }
.fil-shead span { font-weight: 500; color: #7A8BA0; }
.fil-sbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fil-sbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 600; border: 1px solid #DCE3EC; background: #fff; color: #0F1E33; transition: .15s; line-height: 1.15; }
.fil-sbtn small { display: block; font-size: 11.5px; font-weight: 500; color: #7A8BA0; margin-top: 2px; }
.fil-sbtn svg { width: 20px; height: 20px; flex: none; }
.fil-sbtn.call svg { stroke: #004EA3; fill: none; stroke-width: 2; }
.fil-sbtn.wa svg { fill: #25D366; }
.fil-sbtn.call:hover { border-color: #004EA3; background: #F2F7FD; transform: translateY(-1px); }
.fil-sbtn.wa:hover { border-color: #25D366; background: #F1FBF4; transform: translateY(-1px); }
.fil-foot { margin-top: 18px; text-align: center; font-size: 12.5px; color: #7A8BA0; line-height: 1.7; }
.fil-foot a { color: #004EA3; text-decoration: none; }
.fil-foot .fil-partner { display: block; color: #5B6B80; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .fil-brand { min-height: 0; padding: 32px 24px 40px; }
  .fil-brand > div { margin: 26px 0 22px; }
  .fil-brand .fil-logo { width: 170px; }
  .fil-brand h1 { font-size: 32px; } .fil-brand .fil-lead { font-size: 16px; } .fil-feats { display: none; }
  .login-side { padding: 24px 16px 32px; }
}
@media (max-width: 380px) { .fil-sbtns { grid-template-columns: 1fr; } .login-card { padding: 28px 20px 20px; } }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); outline: none; transition: border .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(21,101,192,.15); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 600; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; font-size: 14px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(0,78,163,.3); }
.btn-primary:hover { background: var(--blue-2); }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-danger { background: rgba(208,54,47,.1); color: var(--down); }
.btn-block { width: 100%; padding: 13px; font-size: 16px; }
.err { color: var(--down); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.legal { margin-top: 16px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #fff; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06); }
.side .sect { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); padding: 14px 12px 6px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side .brand img { width: 38px; height: 38px; border-radius: 10px; }
.side .brand b { display: block; font-size: 15px; } .side .brand small { opacity: .75; font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: rgba(255,255,255,.72); padding: 10px 12px; border-radius: 8px; cursor: pointer; text-align: left; font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.nav button svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.active { background: rgba(255,255,255,.10); color: #fff; font-weight: 600; }
.nav button.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.side .foot { margin-top: auto; font-size: 11.5px; opacity: .75; padding: 8px; line-height: 1.5; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; padding: 12px 22px; position: relative; }
.top h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.top .subtitle { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.fresh { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.fresh i { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 2s infinite; }
.fresh.stale i { background: var(--warn); animation: none; }
.spacer { flex: 1; }
.iconbtn { border: 1px solid var(--line); background: var(--panel); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; flex: none; }
.iconbtn:hover { background: var(--blue-soft); transform: translateY(-1px); }
.iconbtn svg { width: 18px; height: 18px; }
.userchip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #004EA3, #84BE3F); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.userchip small { color: var(--muted); display: block; font-size: 11px; line-height: 1.1; }
.userchip b { font-size: 13px; line-height: 1.2; display: block; }
.menu { position: absolute; right: 18px; top: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-hover); padding: 6px; min-width: 210px; z-index: 40; animation: rise .15s ease both; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.menu button:hover { background: var(--blue-soft); }

/* filter bar */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 22px 12px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; transition: background .15s, color .15s; }
.seg button.on { background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(10,30,60,.25); }
:root[data-theme="dark"] .seg button.on { background: var(--blue-2); }
.dates { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; flex-wrap: wrap; }
.dates input, .sel { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 7px 10px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 22px 12px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 12.5px; font-weight: 600; animation: rise .2s ease both; }
.chip b { font-weight: 500; opacity: .75; }
.chip button { border: 0; background: rgba(0,78,163,.14); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; color: inherit; }
.chip.clear { background: none; color: var(--muted); cursor: pointer; padding-right: 12px; border: 0; }

.content { padding: 18px 22px 40px; display: grid; gap: var(--gap); }

/* ---------- cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kpi { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 14px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .25s ease, border-color .2s; animation: rise .35s ease both; display: flex; flex-direction: column; }
.kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--blue-2); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.kpi:hover, .kpi:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--blue-2) 25%, var(--line)); }
.kpi:hover::after { transform: scaleX(1); }
.kpi.link { cursor: pointer; }
.kpi .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; display: flex; justify-content: space-between; gap: 8px; }
.kpi .lbl em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.kpi .val { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin: 8px 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .spark { margin-top: auto; padding-top: 10px; height: 44px; }
.kpi .spark svg { width: 100%; height: 34px; display: block; overflow: visible; }
.kpi.hero { grid-column: span 2; padding: 20px 22px 16px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #17407A 100%); border-color: transparent; color: #fff; }
.kpi.hero .lbl, .kpi.hero .lbl em { color: rgba(255,255,255,.65); }
.kpi.hero .val { font-size: 40px; color: #fff; margin: 10px 0 8px; }
.kpi.hero .val small { color: rgba(255,255,255,.6); }
.kpi.hero .meta { color: rgba(255,255,255,.8); }
.kpi.hero .delta.up { background: rgba(132,190,63,.22); color: #B9E68A; } .kpi.hero .delta.down { background: rgba(255,120,110,.18); color: #FFB3AC; }
.kpi.hero .spark { height: 64px; } .kpi.hero .spark svg { height: 56px; }
.kpi.hero .bar-mini { background: rgba(255,255,255,.14); }
.kpi.hero::after { background: var(--green); }
.cmpv { color: var(--muted); font-size: 12px; }
.kpi.hero .cmpv { color: rgba(255,255,255,.6); }

/* executive brief */
.brief { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; }
.brief li { list-style: none; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.brief li b { color: var(--ink); font-weight: 600; }
.brief .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--blue-2); }
.brief .dot.good { background: var(--up); } .brief .dot.bad { background: var(--down); } .brief .dot.warn { background: var(--warn); }
.brief ul { margin: 0; padding: 0; display: contents; }
.section-t { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 8px 2px -4px; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.kpi .meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.delta.up { color: var(--up); background: rgba(46,158,74,.12); } .delta.down { color: var(--down); background: rgba(208,54,47,.1); } .delta.flat { color: var(--muted); background: var(--panel-2); }
.bar-mini { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 10px; }
.bar-mini i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #5E9A22, #84BE3F); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.bar-mini.warn i { background: linear-gradient(90deg, #C98200, #F2A93B); }
.kpi .tip { position: absolute; left: 12px; right: 12px; bottom: 10px; background: var(--ink); color: var(--panel); font-size: 12px; padding: 8px 10px; border-radius: 10px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.kpi:hover .tip { opacity: .96; transform: none; }

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; transition: box-shadow .25s; animation: rise .4s ease both; }
.card:hover { box-shadow: var(--shadow-hover); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card-h .spacer { flex: 1; }
.card-h .hint { color: var(--muted); font-size: 12px; }
.chart { position: relative; height: 280px; }
.chart.tall { height: 340px; } .chart.short { height: 230px; }

/* tables */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs button.on { color: var(--c1); border-color: var(--c1); }
.tbl-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 560px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td.r, .t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.t tbody tr { transition: background .15s; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr:hover { background: var(--blue-soft); }
.t .lbl-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.t tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.share { position: relative; display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: var(--panel-2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.share i { position: absolute; inset: 0 auto 0 0; background: var(--c1); border-radius: 99px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.red { background: rgba(208,54,47,.12); color: var(--down); } .pill.amber { background: rgba(201,130,0,.14); color: var(--warn); } .pill.green { background: rgba(46,158,74,.12); color: var(--up); } .pill.blue { background: var(--blue-soft); color: var(--c1); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }

/* drawer + modal */
.backdrop { position: fixed; inset: 0; background: rgba(8,18,33,.45); z-index: 60; animation: fade .2s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--panel); z-index: 61; box-shadow: -20px 0 60px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: slidein .25s cubic-bezier(.2,.8,.2,1) both; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-h h3 { margin: 0; font-size: 17px; flex: 1; min-width: 0; }
.drawer-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-f { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; background: var(--panel); border-radius: 18px; z-index: 61; box-shadow: 0 30px 80px rgba(0,0,0,.35); padding: 20px; animation: pop .2s ease both; }
.modal h3 { margin: 0 0 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); padding: 5px 10px; border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 12px; z-index: 90; font-size: 14px; animation: rise .2s ease both; max-width: calc(100% - 32px); }
.stat-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; }
.stat-list span { color: var(--muted); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--panel-2) 0%, var(--line) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.note { font-size: 12.5px; color: var(--muted); }
.banner { background: rgba(201,130,0,.12); color: var(--warn); border: 1px solid rgba(201,130,0,.3); padding: 10px 14px; border-radius: 12px; font-size: 13.5px; }

.tabbar { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,158,74,.5); } 70% { box-shadow: 0 0 0 8px rgba(46,158,74,0); } 100% { box-shadow: 0 0 0 0 rgba(46,158,74,0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- breakpoints ---------- */
@media (min-width: 1700px) { body { font-size: 16px; } .kpi .val { font-size: 34px; } .chart { height: 340px; } .chart.tall { height: 420px; } .content { padding: 24px 32px 48px; } }
@media (max-width: 1280px) { .kpi .val { font-size: 24px; } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 76px 1fr; }
  .side .brand > div, .nav button span, .side .foot, .side .sect { display: none; }
  .nav button.active::before { left: -12px; }
  .side .brand { justify-content: center; padding: 4px 0 16px; }
  .nav button { justify-content: center; padding: 12px; }
  .span-8, .span-7, .span-5 { grid-column: span 12; }
  .span-6, .span-4 { grid-column: span 6; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .shell { display: block; }
  .side { display: none; }
  .top-row { padding: 10px 16px; }
  .top h2 { font-size: 17px; } .top .subtitle { display: none; }
  .userchip > div:not(.avatar) { display: none; } .userchip { padding: 3px; }
  .fbar { gap: 6px; } .fbar > .note { display: none; } .fbar .sel, .fbar .btn { padding: 7px 10px; font-size: 13px; }
  .fbar, .chips { padding-left: 16px; padding-right: 16px; }
  .content { padding: 14px 16px 100px; gap: 12px; }
  .span-6, .span-4 { grid-column: span 12; }
  .kpis { gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .val { font-size: 21px; } .kpi .lbl { font-size: 10.5px; } .kpi .lbl em { display: none; }
  .kpi.hero .val { font-size: 32px; } .kpi .spark { height: 36px; } .kpi .spark svg { height: 28px; }
  .brief li { font-size: 13.5px; }
  .kpi .tip { display: none; }
  .chart { height: 240px; } .chart.tall { height: 270px; }
  .row2 { grid-template-columns: 1fr; }
  .fresh span { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(15,30,51,.08); }
  .tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 6px 2px; border-radius: 12px; cursor: pointer; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.active { color: var(--c1); background: var(--blue-soft); }
  .toast { bottom: 90px; }
}
@media print {
  .side, .tabbar, .iconbtn, .userchip, .fbar .btn, .chips .clear { display: none !important; }
  .shell { display: block; } .top { position: static; } body { background: #fff; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .tbl-wrap { max-height: none; overflow: visible; }
}
