/* ==========================================================================
   EBT weekly report — scoped dashboard styles.
   Every rule is scoped to #ebt-report so it cannot leak into the site theme.
   ========================================================================== */
#ebt-report{
  --bg:#f1f4f3; --surface:#ffffff; --ink:#10201d; --ink-2:#3c514d; --muted:#6b807c;
  --line:#dde5e3; --line-2:#eaf0ee;
  --brand:#0f5f57; --brand-2:#17827a; --brand-soft:#e6f2f0;
  --accent:#c8892a; --accent-soft:#fbf1e0;
  --ok:#1f7a4d; --warn:#b4762a; --bad:#a63a2c;
  --shadow:0 1px 2px rgba(16,32,29,.05),0 8px 24px -12px rgba(16,32,29,.18);
  --radius:14px;
}
#ebt-report *{box-sizing:border-box}
#ebt-report .wrap{max-width:1480px;margin:0 auto;padding:0 22px 64px}
#ebt-report h1, #ebt-report h2, #ebt-report h3, #ebt-report h4{margin:0;font-weight:650;letter-spacing:-.01em}
#ebt-report .num{font-variant-numeric:tabular-nums}
#ebt-report button{font:inherit;color:inherit;cursor:pointer}
#ebt-report .topbar{
  background:linear-gradient(120deg,#0d4f49 0%,#0f5f57 45%,#15776e 100%);
  color:#fff; padding:18px 0 20px; margin-bottom:18px;
  border-bottom:3px solid var(--accent);
}
#ebt-report .topbar .wrap{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding-bottom:0}
#ebt-report .logo{
  width:44px;height:44px;border-radius:11px;background:rgba(255,255,255,.14);
  display:grid;place-items:center;font-weight:800;font-size:15px;letter-spacing:.5px;
  border:1px solid rgba(255,255,255,.25); flex:none;
}
#ebt-report .topbar h1{font-size:19px;line-height:1.25}
#ebt-report .topbar .sub{font-size:12.5px;color:rgba(255,255,255,.78);margin-top:2px}
#ebt-report .topbar .spacer{flex:1}
#ebt-report .stamp{
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);
  border-radius:10px;padding:8px 13px;font-size:12px;line-height:1.5;text-align:right;
}
#ebt-report .stamp b{display:block;font-size:12.5px;color:#fff}
#ebt-report .stamp span{color:rgba(255,255,255,.75)}
#ebt-report .card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
#ebt-report .card-h{display:flex;align-items:baseline;gap:10px;padding:15px 18px 0}
#ebt-report .card-h h3{font-size:13.5px;letter-spacing:.01em}
#ebt-report .card-h .hint{font-size:11.5px;color:var(--muted);margin-left:auto}
#ebt-report .card-b{padding:14px 18px 18px}
#ebt-report .filters{position:sticky;top:var(--ebt-sticky-top,0px);z-index:40;background:var(--bg);
  border-bottom:1px solid var(--line);padding:11px 0;margin-bottom:16px}
#ebt-report .filters .wrap{padding-bottom:0;display:flex;gap:7px;align-items:center;flex-wrap:wrap}
#ebt-report .filters .spacer{margin-left:auto}
#ebt-report .filters .label{font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-right:2px}
#ebt-report .filter{position:relative}
#ebt-report .fbtn{
  display:flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--line);
  border-radius:9px;padding:6px 10px;font-size:12px;font-weight:600;color:var(--ink-2);
  transition:.15s;white-space:nowrap;
}
#ebt-report .fbtn:hover{border-color:#c3d2cf}
#ebt-report .fbtn.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
#ebt-report .fbtn .cnt{
  font-size:10.5px;font-weight:700;background:#eef2f1;color:var(--muted);
  border-radius:20px;padding:1px 7px;min-width:18px;text-align:center
}
#ebt-report .fbtn.on .cnt{background:var(--brand);color:#fff}
#ebt-report .fbtn .caret{opacity:.5;font-size:9px}
#ebt-report .panel{
  position:absolute;top:calc(100% + 6px);left:0;width:290px;max-height:340px;display:none;
  background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 18px 44px -16px rgba(16,32,29,.35);
  z-index:60;overflow:hidden;
}
#ebt-report .panel.open{display:flex;flex-direction:column}
#ebt-report .panel .search{padding:9px;border-bottom:1px solid var(--line-2)}
#ebt-report .panel input{
  width:100%;border:1px solid var(--line);border-radius:7px;padding:7px 9px;font-size:12.5px;outline:none
}
#ebt-report .panel input:focus{border-color:var(--brand-2);box-shadow:0 0 0 3px var(--brand-soft)}
#ebt-report .panel .opts{overflow-y:auto;padding:5px}
#ebt-report .opt{display:flex;align-items:center;gap:9px;padding:6px 8px;border-radius:7px;font-size:12.5px;cursor:pointer}
#ebt-report .opt:hover{background:#f4f8f7}
#ebt-report .opt input{width:14px;height:14px;accent-color:var(--brand);flex:none;cursor:pointer}
#ebt-report .opt span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ebt-report .opt .n{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
#ebt-report .panel .foot{border-top:1px solid var(--line-2);padding:7px 11px;display:flex;justify-content:space-between;font-size:11.5px}
#ebt-report .panel .foot button{background:none;border:none;color:var(--brand);font-weight:650;font-size:11.5px;padding:2px}
#ebt-report .ghost{
  background:#fff;border:1px solid var(--line);border-radius:9px;padding:7px 11px;font-size:12.5px;
  font-weight:600;color:var(--ink-2)
}
#ebt-report .ghost:hover{border-color:#c3d2cf}
#ebt-report .ghost.primary{background:var(--brand);border-color:var(--brand);color:#fff}
#ebt-report .ghost.primary:hover{background:#0c4f48}
#ebt-report .section-label{
  display:flex;align-items:center;gap:10px;margin:22px 0 10px;
  font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)
}
#ebt-report .section-label:after{content:"";flex:1;height:1px;background:var(--line)}
#ebt-report .section-label .pill{
  letter-spacing:0;text-transform:none;font-weight:600;font-size:11px;background:var(--brand-soft);
  color:var(--brand);border-radius:20px;padding:2px 9px
}
#ebt-report .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
#ebt-report .kpi{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow);position:relative;overflow:hidden}
#ebt-report .kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--brand)}
#ebt-report .kpi.alt:before{background:var(--accent)}
#ebt-report .kpi .k{font-size:11.5px;font-weight:650;color:var(--muted);letter-spacing:.02em}
#ebt-report .kpi .v{font-size:26px;font-weight:750;letter-spacing:-.02em;margin:3px 0 1px;font-variant-numeric:tabular-nums}
#ebt-report .kpi .m{font-size:11.5px;color:var(--muted)}
#ebt-report .kpi .m b{color:var(--ink-2);font-weight:650}
#ebt-report .split{display:flex;gap:14px;margin-top:6px;font-size:11px;color:var(--muted);flex-wrap:wrap}
#ebt-report .split i{font-style:normal;color:var(--ink-2);font-weight:650;font-variant-numeric:tabular-nums}
#ebt-report .grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
#ebt-report .grid.two{grid-template-columns:repeat(2,1fr)}
#ebt-report .chart{min-height:232px}
#ebt-report .barrow{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center;margin-bottom:9px}
#ebt-report .barrow .lbl{font-size:12px;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ebt-report .barrow .val{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
#ebt-report .barrow .track{grid-column:1/-1;height:7px;background:#eef2f1;border-radius:6px;overflow:hidden}
#ebt-report .barrow .fill{height:100%;border-radius:6px;background:var(--brand-2);transition:width .35s ease}
#ebt-report .vbars{display:flex;align-items:flex-end;gap:12px;height:150px;padding-top:6px}
#ebt-report .vbar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:6px}
#ebt-report .vbar .col{width:100%;background:linear-gradient(180deg,#17827a,#0f5f57);border-radius:7px 7px 0 0;min-height:3px;transition:height .35s ease}
#ebt-report .vbar .t{font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--ink-2)}
#ebt-report .vbar .x{font-size:11px;color:var(--muted);white-space:nowrap}
#ebt-report .donut{display:flex;align-items:center;gap:16px}
#ebt-report .donut svg{flex:none}
#ebt-report .legend{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1}
#ebt-report .legend .li{display:flex;align-items:center;gap:8px;font-size:12px;min-width:0}
#ebt-report .legend .dot{width:9px;height:9px;border-radius:3px;flex:none}
#ebt-report .legend .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink-2)}
#ebt-report .legend .pc{font-weight:700;font-variant-numeric:tabular-nums;font-size:11.5px}
#ebt-report .legend .ab{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums;width:52px;text-align:right}
#ebt-report .funnel .frow{display:flex;align-items:center;gap:12px;margin-bottom:11px}
#ebt-report .funnel .fname{width:96px;font-size:12px;color:var(--ink-2);flex:none}
#ebt-report .funnel .ftrack{flex:1;height:26px;background:#eef2f1;border-radius:7px;overflow:hidden;position:relative}
#ebt-report .funnel .ffill{height:100%;border-radius:7px;display:flex;align-items:center;padding-left:9px;color:#fff;font-size:11.5px;font-weight:700;transition:width .35s;min-width:70px}
#ebt-report .funnel .frate{width:52px;text-align:right;font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--ink-2);flex:none}
#ebt-report .empty{padding:26px 8px;text-align:center;color:var(--muted);font-size:12.5px}
#ebt-report .tbl-wrap{overflow:auto;max-height:640px;border-radius:10px;border:1px solid var(--line-2)}
#ebt-report table{border-collapse:separate;border-spacing:0;width:100%;font-size:12.5px}
#ebt-report thead th{
  position:sticky;top:0;z-index:5;background:#f7faf9;border-bottom:1px solid var(--line);
  font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--ink-2);padding:7px 9px;text-align:center;
  white-space:nowrap;
}
#ebt-report thead tr.g2 th{top:30px}
#ebt-report thead th.grp{background:#eef4f2;border-left:1px solid var(--line);color:var(--brand)}
#ebt-report thead th:first-child, #ebt-report thead th.l{text-align:left}
#ebt-report tbody td{padding:7px 9px;border-bottom:1px solid var(--line-2);vertical-align:middle;white-space:nowrap}
#ebt-report tbody tr:hover td{background:#f8fbfa}
#ebt-report td.n{text-align:right;font-variant-numeric:tabular-nums}
#ebt-report td.c{text-align:center}
#ebt-report td.name{font-weight:600;max-width:230px;overflow:hidden;text-overflow:ellipsis}
#ebt-report td.sep, #ebt-report th.sep{border-left:1px solid var(--line)}
#ebt-report tfoot td{position:sticky;bottom:0;background:#0f5f57;color:#fff;font-weight:700;padding:9px;border:none;font-variant-numeric:tabular-nums}
#ebt-report .tag{display:inline-block;font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:20px;background:var(--brand-soft);color:var(--brand)}
#ebt-report .tag.gray{background:#eef2f1;color:var(--ink-2)}
#ebt-report .rate{font-size:11px;font-weight:700;padding:1px 6px;border-radius:5px;background:#eef7f1;color:var(--ok)}
#ebt-report .rate.low{background:#fdf1ef;color:var(--bad)}
#ebt-report .rate.mid{background:var(--accent-soft);color:var(--warn)}
#ebt-report .toolbar{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
#ebt-report .toolbar input{border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:12.5px;min-width:200px;outline:none}
#ebt-report .toolbar input:focus{border-color:var(--brand-2);box-shadow:0 0 0 3px var(--brand-soft)}
#ebt-report .toolbar .sp{flex:1}
#ebt-report .note{
  font-size:11.5px;color:var(--ink-2);background:var(--accent-soft);border:1px solid #f0dcbc;
  border-radius:9px;padding:9px 12px;margin-top:10px;display:flex;gap:8px;align-items:flex-start
}
#ebt-report .note b{color:#8a5b16}
@media (max-width:1180px){
#ebt-report .kpis{grid-template-columns:repeat(2,1fr)}
#ebt-report .grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:760px){
#ebt-report .grid, #ebt-report .grid.two{grid-template-columns:1fr}
#ebt-report .kpis{grid-template-columns:1fr}
#ebt-report .panel{width:min(290px,88vw)}
}
@media print{
#ebt-report .filters, #ebt-report .topbar .stamp{display:none}
#ebt-report .tbl-wrap{max-height:none;overflow:visible}
#ebt-report .card{break-inside:avoid;box-shadow:none}
}

/* ---- in-site page head (the public layout already renders the navbar) ---- */
#ebt-report .ebt-head{max-width:1480px;margin:0 auto 16px;padding:0 22px;display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
#ebt-report .ebt-title{font-size:25px;font-weight:700;letter-spacing:-.02em;margin:0;color:#0f5f57}
#ebt-report .ebt-sub{font-size:12.5px;color:var(--muted);margin:3px 0 0}
#ebt-report .ebt-stamp{margin-left:auto;text-align:right;font-size:12px;color:var(--muted)}
#ebt-report .ebt-stamp b{display:block;font-size:12.5px;color:var(--ink)}

/* the public layout wraps content in section.section-bg{overflow:hidden},
   which would break the sticky filter bar and table headers */
section:has(#ebt-report){overflow:visible}

/* ---- loading state while /report/data builds or is fetched ---- */
#ebt-report #ebt-loading{display:flex;align-items:center;justify-content:center;gap:12px;
  padding:120px 20px;color:var(--muted);font-size:14px}
#ebt-report .ebt-spin{width:22px;height:22px;border:2.5px solid var(--line);
  border-top-color:var(--brand);border-radius:50%;animation:ebt-spin .8s linear infinite}
@keyframes ebt-spin{to{transform:rotate(360deg)}}
