/* Phyllis Song brand: gold #FED01A, black, cream. Flat color blocks, Montserrat headings, Poppins body. */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --sf2: #F1EEE3; --border: #D3CDBB;
  --text: #0F0F0F; --t2: #47433A; --t3: #7A735F;
  --gold: #FED01A; --gold-dk: #FEB800; --gold-lt: #FFF3BF; --black: #000000;
  --ok: #0F6B3C; --err: #B01818; --ok-bg: #D9F0E2; --err-bg: #F9D9D6; color-scheme: light;
  --r: 8px; --rlg: 14px;
  --font-head: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 2000px; margin: 0 auto; padding-inline: clamp(12px, 2vw, 32px); }

.top { background: var(--black); color: #fff; padding-block: 22px; border-bottom: 4px solid var(--gold); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top .eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.top h1 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); font-weight: 800; line-height: 1.15; color: #fff; }
.top h1 .gold { color: var(--gold); }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--black); font: inherit; font-weight: 600; text-decoration: none;
  padding: 9px 18px; border-radius: 999px; border: 2px solid var(--gold); cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--gold-dk); border-color: var(--gold-dk); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--gold-dk); background: var(--gold-lt); }
.top .btn.ghost { color: #fff; border-color: #444; }
.top .btn.ghost:hover { border-color: var(--gold); background: #1a1a1a; }
.btn.small { padding: 5px 12px; font-size: .82rem; }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--gold-dk); outline-offset: 2px; }

.weekbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.weekbar .title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.3rem, 3vw, 1.8rem); font-variant-numeric: tabular-nums; }
.weekbar .rel { color: var(--t2); font-size: .88rem; }

.tabs { display: flex; gap: 8px; margin: 14px 0 6px; border-bottom: 2px solid var(--border); flex-wrap: wrap; }
.tab { font: inherit; font-weight: 700; font-family: var(--font-head); font-size: .95rem; padding: 10px 22px; border: 0; background: transparent; color: var(--t2); cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--text); background: var(--gold-lt); }
.tab.on { color: var(--text); border-bottom-color: var(--gold); background: var(--gold-lt); }
.plan { border-left: 8px solid var(--gold); }
.plan summary { cursor: pointer; list-style: none; }
.plan summary::-webkit-details-marker { display: none; }
.plan summary h2 { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.plan .plan-sub { font-family: var(--font-body); font-size: .82rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--t2); }
.planlist { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.planlist li { padding: 10px 14px; border-radius: var(--r); border-left: 5px solid var(--border); background: var(--sf2); }
.planlist li.bad { border-left-color: var(--err); background: var(--err-bg); }
.planlist li.warn { border-left-color: var(--gold-dk); background: var(--gold-lt); }
.planlist li.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.dept { margin-top: 34px; }
.dept-h { font-size: 1.15rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); background: var(--black); padding: 10px 18px; border-radius: var(--r); border-left: 8px solid var(--gold); }
.dept > .kpis { margin-top: 14px; }
.goalbar { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 22px; border-radius: var(--rlg); border: 2px solid var(--border); background: var(--surface); }
.goalbar.hit { background: var(--ok-bg); border-color: var(--ok); }
.goalbar.miss { background: var(--err-bg); border-color: var(--err); }
.goalbar .g-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t2); }
.goalbar .g-val { font-family: var(--font-head); font-weight: 800; font-size: 2rem; line-height: 1.2; }
.goalbar .g-of { font-size: .95rem; font-weight: 600; color: var(--t2); }
.goalbar.hit .g-val, .goalbar.hit .g-status { color: var(--ok); }
.goalbar.miss .g-val, .goalbar.miss .g-status { color: var(--err); }
.goalbar .g-status { font-weight: 800; font-family: var(--font-head); font-size: 1.05rem; }
details.more { margin-top: 18px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; padding: 10px 22px; border-radius: 999px; border: 2px solid var(--gold-dk); background: var(--gold-lt); font-weight: 700; font-family: var(--font-head); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { background: var(--gold); }
details.more .s-hide { display: none; } details.more[open] .s-hide { display: inline; } details.more[open] .s-show { display: none; }
.allbtn { margin-left: auto; align-self: center; margin-bottom: 6px; background: var(--gold-lt); color: var(--text); border: 2px solid var(--gold-dk); font-weight: 700; }
.allbtn:hover { background: var(--gold); border-color: var(--gold-dk); }
/* Tables that have a Total row show only that row until "Show all numbers" is on */
.tblwrap.has-total:not(.open) table.has-total tbody tr:not(.total) { display: none; }
.tblwrap.collapsible:not(.open) .scroll { display: none; }
.rowtoggle { display: block; margin: 0 0 8px auto; background: var(--gold-lt); color: var(--text); border: 2px solid var(--gold-dk); font-weight: 700; }
.rowtoggle:hover { background: var(--gold); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rlg); padding: 16px 18px; border-top: 4px solid var(--gold); }
.kpi .lbl { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--t2); }
.kpi .val { font-family: var(--font-head); font-size: 2rem; font-weight: 800; line-height: 1.15; margin-top: 2px; }
.kpi .sub { font-size: .82rem; color: var(--t2); }
.pos { color: var(--ok); } .neg { color: var(--err); }

section.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rlg); padding: 20px; margin-top: 22px; min-width: 0; }
section.card > h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
section.card > h2::before { content: ""; width: 10px; height: 22px; background: var(--gold); border-radius: 3px; }
section.card > .sub { margin: 4px 0 12px; color: var(--t2); font-size: .88rem; }
.scroll { overflow-x: auto; margin-top: 12px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }

table.dt { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
table.dt th, table.dt td { border: 1px solid var(--border); padding: 7px 8px; text-align: center; }
table.dt td { white-space: nowrap; }
table.dt th { background: var(--sf2); font-weight: 600; font-size: .74rem; white-space: normal; line-height: 1.3; }
table.dt thead tr:first-child th { background: var(--black); color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
table.dt td.l, table.dt th.l { text-align: left; }
table.dt td.wrap-ok { white-space: normal; min-width: 220px; text-align: left; }
table.dt td.net { background: var(--gold-lt); font-weight: 700; }
table.dt td.hit { background: var(--ok-bg); } table.dt td.miss { background: var(--err-bg); }
table.dt tr.total td { background: var(--sf2); font-weight: 800; }
table.dt td.tgt { background: var(--gold-lt); font-weight: 600; }
table.dt tr.total td.hit { background: var(--ok-bg); color: var(--ok); }
table.dt tr.total td.miss { background: var(--err-bg); color: var(--err); }
.pill { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--gold-lt); border: 1px solid var(--gold-dk); font-size: .78rem; font-weight: 600; }
.pill.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.pill.bad { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.note { margin-top: 10px; font-size: .88rem; color: var(--t2); }
.note b { color: var(--text); }
.empty { padding: 22px; border: 1px dashed var(--border); border-radius: var(--r); text-align: center; color: var(--t2); margin-top: 12px; }

h3.sec { font-size: .85rem; margin: 22px 0 0; color: var(--t2); text-transform: uppercase; letter-spacing: .08em; }
.streak { display: grid; gap: 10px; margin-top: 12px; }
.streak .item { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.streak .name { font-weight: 700; }
.streak .big { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: var(--err); }
.streak .meta { font-size: .82rem; color: var(--t2); }

footer { margin-top: 56px; background: #fff; color: #1c1a16; padding-block: 30px; text-align: center; border-top: 4px solid var(--gold); }
footer img { width: min(220px, 60vw); margin: 0 auto 6px; }
footer p { margin: 0; font-size: .85rem; color: #5b554a; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.count { display: inline-block; min-width: 28px; text-align: center; padding: 0 10px; margin-left: 10px; border-radius: 999px; background: var(--gold); color: var(--black); font-size: .85rem; line-height: 1.7; letter-spacing: 0; }
.wins { padding: 12px 18px; margin-top: 16px; border-left: 8px solid var(--ok); }
.wins-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wins-head h2 { font-size: .95rem; }
.wins-sub { font-size: .8rem; color: var(--t2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--ok-bg); border: 1px solid var(--ok); font-size: .85rem; }
.chip i { font-style: normal; font-weight: 700; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.wins-none { margin-top: 6px; color: var(--t2); font-size: .9rem; }

/* Month at a glance */
.glance .sub { margin-bottom: 14px; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.gl-card { border: 1px solid var(--border); border-radius: var(--rlg); padding: 14px 16px; background: #fff; }
.gl-card h3 { margin: 0 0 2px; font-size: .95rem; text-align: center; }
.gl-sub { font-size: .75rem; color: var(--t3); text-align: center; margin-bottom: 8px; }
.gl-wide { grid-column: span 2; }
@media (max-width: 640px) { .gl-wide { grid-column: auto; } }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw.cur { background: var(--gold); border: 1px solid #000; }
.sw.prv { background: #8C8672; border: 1px solid #000; }
.sw.rest { background: #E3DED0; border: 1px solid #8C8672; }
.pie-row { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; }
.pie { width: 118px; height: 118px; border-radius: 50%; border: 1px solid #000; display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.pie span { background: #fff; border-radius: 50%; width: 70%; height: 70%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.pie span small { font-size: .65rem; font-weight: 500; color: var(--t2); }
.pie-leg { font-size: .8rem; display: grid; gap: 6px; }
.bars { display: flex; justify-content: space-around; align-items: flex-end; gap: 8px; margin-top: 6px; }
.bcat { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bpair { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 150px; width: 100%; border-bottom: 1px solid var(--border); }
.bcol { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; width: 34px; }
.bv { font-size: .72rem; font-weight: 700; height: 20px; line-height: 20px; white-space: nowrap; }
.bar { width: 100%; border: 1px solid #000; border-bottom: 0; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.cur { background: var(--gold); }
.bar.prv { background: #8C8672; }
.blab { font-size: .72rem; color: var(--t2); text-align: center; margin-top: 5px; line-height: 1.2; }
table.cmp { width: 100%; }
.bars.single .bpair { gap: 0; }
.bars.single .bcol { width: 100%; max-width: 30px; }
.bars.single { gap: 2px; }
.bars.single .bv { font-size: .62rem; }
.bars.single .blab { font-size: .62rem; }

/* Sidebar layout */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; align-items: start; }
.mainpane { min-width: 0; }
.mainpane .weekbar { margin-top: 20px; }
.side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 22px 0 24px; display: flex; flex-direction: column; gap: 4px; }
.side-logo { width: 100%; max-width: 190px; height: auto; margin: 0 0 14px 6px; }
.side-label { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--t3); margin: 14px 0 4px 12px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: .92rem; color: var(--t2); background: transparent; border: 0; border-left: 4px solid transparent; border-radius: 0 10px 10px 0; padding: 10px 14px; cursor: pointer; }
.nav:hover { background: var(--gold-lt); color: var(--text); }
.nav.on { background: var(--black); color: var(--gold); border-left-color: var(--gold); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; border: 1px solid rgba(0,0,0,.35); }
.dot.ok { background: #1E9E5A; } .dot.bad { background: #D12B2B; } .dot.none { background: #D3CDBB; }
.side-foot { margin-top: 22px; padding: 14px 6px 0 12px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.side-foot .legend { font-size: .72rem; color: var(--t2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.side-foot .legend .dot { width: 9px; height: 9px; margin-left: 4px; }
.side-foot .legend .dot:first-child { margin-left: 0; }
.upd { font-size: .74rem; color: var(--t3); }

/* Overview tiles */
.tiles { display: grid; gap: 16px; margin: 20px 0 8px; }
.tile { border: 1px solid var(--border); border-radius: var(--rlg); padding: 14px 18px 8px; background: #fff; }
.tile-h { display: flex; align-items: center; gap: 10px; }
.tile-h h3 { margin: 0; font-size: 1.02rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tile .link { margin-left: auto; font: inherit; font-weight: 700; font-size: .85rem; color: var(--text); background: var(--gold-lt); border: 1px solid var(--gold-dk); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.tile .link:hover { background: var(--gold); }
.tile .kpis { margin: 10px 0 8px; }
.tile-empty { color: var(--t3); font-size: .86rem; padding: 10px 0 12px; }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: sticky; z-index: 5; top: 0; flex-direction: row; overflow-x: auto; max-height: none; background: var(--bg); padding: 10px 0; gap: 6px; border-bottom: 1px solid var(--border); }
  .side-logo, .side-label, .side-foot { display: none; }
  .nav { width: auto; white-space: nowrap; border-left: 0; border-radius: 999px; padding: 8px 14px; border: 1px solid var(--border); }
  .nav.on { border-color: var(--black); }
}

/* Print / save as PDF: every department, expanded, no controls */
@media print {
  @page { margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .side, .weekbar button, .tabs, .rowtoggle, footer, .top .btn, .tile .link { display: none !important; }
  .shell { display: block; }
  .tblwrap.has-total:not(.open) table.has-total tbody tr:not(.total) { display: table-row !important; }
  .tblwrap.collapsible:not(.open) .scroll { display: block !important; }
  .dept { break-before: page; }
  .card, .gl-card, .kpi { break-inside: avoid; }
}
