/* Komisi & Belanja Iklan: private operator dashboard.
   Dials: ENERGY 1 / RHYTHM 2 / MOTION 1. Dense numeric tool: system-ui with tabular figures.
   One green accent for focus, primary action and the selected period. Red/green appear only as P&L sign. */
#evaluationPane table{min-width:1100px;font-variant-numeric:tabular-nums}
#evaluationPane td:first-child{position:sticky;left:0;background:var(--surface);min-width:150px;max-width:220px;white-space:normal}
#evaluationPane td small{display:block;color:var(--muted)}
#evaluationPane td{white-space:nowrap}
#evaluationDetail{margin-top:20px}
@media(max-width:600px){#evaluationPane td,#evaluationPane th{font-size:11px;padding:5px}#evaluationPane td:first-child{min-width:100px;max-width:140px}}
:root{color-scheme:light;
 --bg:#f0f3f8;--surface:#fff;--card:#f5f6f8;--text:#263238;--muted:#59636e;--line:#e4e8ed;--accent:#0866c6;--accent-ink:#fff;
 --pos:#17703a;--neg:#b3261e;--warn-bg:#fff8e6;--warn-line:#a87b00;--info-bg:#eaf3ff;--info-line:#0866c6;
 --r:6px;--gap:16px;--pad:20px;--ctl:40px}
html.dark{color-scheme:dark;
 --bg:#191919;--surface:#202020;--card:#272727;--text:#ececec;--muted:#b4b4b4;--line:#3a3a3a;--accent:#85baff;--accent-ink:#12243c;
 --pos:#6fd08c;--neg:#ff8a80;--warn-bg:#2d2815;--warn-line:#d8b24a;--info-bg:#1f2a21;--info-line:#9fd3a6}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif}
h1,h2,h3,p{margin:0}
[hidden]{display:none!important}
.skip{position:absolute;left:-999px;top:0;background:var(--surface);color:var(--text);padding:12px;z-index:10}
.skip:focus{left:8px;top:8px}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* controls */
button,input,select{font:inherit;min-height:var(--ctl);padding:6px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--text)}
button{cursor:pointer;font-weight:600}
button:hover:not(:disabled){border-color:var(--accent)}
button:active:not(:disabled){background:var(--card)}
button:disabled{cursor:not-allowed;color:var(--muted);background:var(--card);border-style:dashed}
button.primary:disabled{color:var(--muted);background:var(--card);border-color:var(--line)}
button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
button.primary:active:not(:disabled){filter:brightness(.92);background:var(--accent)}
select,summary,label:has(input[type=checkbox]){cursor:pointer}
label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
label input,label select{font-size:15px;color:var(--text);min-width:0;width:100%}
input[type=date]{-webkit-appearance:none;appearance:none;display:block;min-width:0;max-width:100%;width:100%;text-align:left}
input[type=date]::-webkit-date-and-time-value{text-align:left;min-width:0}
input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer}
label.check{flex-direction:row;align-items:center;gap:8px;min-height:var(--ctl);color:var(--text);font-size:14px}
label.check input{min-height:0;width:18px;height:18px;cursor:pointer}

/* page frame */
.bar,main,footer{max-width:1500px;margin:0 auto;padding-left:var(--pad);padding-right:var(--pad)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;height:56px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:baseline;gap:12px;min-width:0}
.brand h1{font-size:18px;font-weight:700;line-height:1.2}
.brand span{font-size:13px;color:var(--muted);white-space:nowrap}
.bar nav{display:flex;gap:8px}
.bar nav button{min-height:36px;padding:4px 14px}
main{display:flex;flex-direction:column;gap:var(--gap);padding-top:var(--gap);padding-bottom:var(--gap)}
#workspace{display:flex;flex-direction:column;gap:var(--gap)}
#message:not(:empty){padding:10px 14px;border:1px solid var(--accent);border-radius:var(--r);background:var(--info-bg);color:var(--text)}
footer{padding-top:8px;padding-bottom:24px;font-size:13px;color:var(--muted)}

.panel{background:var(--surface);border:1px solid transparent;border-radius:var(--r);padding:var(--pad);box-shadow:0 1px 3px rgb(0 0 0 / 5%)}
.panel.narrow{width:100%;max-width:420px;margin:48px auto}
.panel.narrow form{display:flex;flex-direction:column;gap:12px;margin:12px 0}
.head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin-bottom:12px}
.head h2{font-size:17px}
.head .head-action{margin-left:auto;min-height:36px;padding:4px 12px}
.ctx{font-size:13px;font-weight:400;color:var(--muted)}
.hint{font-size:13px;color:var(--muted);margin-top:8px}
.empty{font-size:14px;color:var(--text);padding:14px 16px;border:1px dashed var(--line);border-radius:var(--r);background:var(--card);margin-bottom:12px}
.empty:empty{display:none}
.empty button{margin-top:10px;min-height:36px}
.empty p{color:var(--text)}

/* toolbar */
.toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:12px var(--pad);background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.toolbar label.grow{flex:1 1 180px;min-width:160px}
.toolbar select{min-width:120px}
.toolbar .actions{display:flex;gap:8px;margin-left:auto}

/* source notice: one sentence, one action */
.notice{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:10px var(--pad);border:1px solid var(--warn-line);border-radius:var(--r);background:var(--warn-bg)}
.notice.info{border-color:var(--info-line);background:var(--info-bg)}
.notice p{flex:1 1 320px;color:var(--text);font-size:14px}
.notice button{min-height:36px}
#noticeMore{font-size:13px}
#noticeMore summary{cursor:pointer;color:var(--text);font-weight:600;min-height:36px;display:flex;align-items:center;gap:.3em}
#noticeMore[open]{flex-basis:100%;order:3}
#noticeMore p{margin-top:4px;color:var(--text);line-height:1.45}

/* KPI strip */
.kpi{display:grid;grid-template-columns:1.5fr repeat(7,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--r);background:var(--card);margin-bottom:var(--gap)}
.kpi-cell{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:12px 14px;border-left:1px solid var(--line)}
.kpi-cell:first-child{border-left:0}
.kpi-cell small{font-size:12px;color:var(--muted);line-height:1.25}
.kpi-cell b{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.2}
.kpi-cell.main b{font-size:26px}
.kpi-cell em{font-style:normal;font-size:12px;color:var(--muted)}
.kpi>p{grid-column:1/-1;padding:16px;color:var(--muted)}
.kpi>p.neg{color:var(--neg)}
@media(min-width:1000px){
 #overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);column-gap:24px;align-items:start}
 #overview>.head{grid-column:1/-1}
 #overview>.split,#overview #calendarPane{display:contents}
 #overview #kpi{grid-column:1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr))}
 #overview #contrib{grid-column:1;grid-row:3;margin-top:0}
 #overview #calLegend{grid-column:1;grid-row:4}
 #overview #summaryNote{grid-column:1;grid-row:5}
 #overview .calnav{grid-column:2;grid-row:2;align-self:start}
 #overview #calendar{grid-column:2;grid-row:2/6;margin-top:48px;min-width:0;align-self:stretch}
 #overview #calendar .month,#overview #calendar .cal-scroll{height:100%}
 #overview #calendar .grid7{height:100%}
 #overview #calHint{display:none}
 #overview #kpi{margin-bottom:6px}
 #overview #kpi .kpi-cell{padding:6px 8px;gap:1px}
 #overview #kpi .kpi-cell small,#overview #kpi .kpi-cell em{font-size:11px;line-height:1.2}
 #overview #kpi .kpi-cell b{font-size:15px;line-height:1.2}
 #overview #kpi .kpi-cell.main b{font-size:20px}
 #overview #contrib{display:flex;gap:4px}
 #overview #contrib h3{font-size:12px;margin:0}
 #overview .acct{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 12px;padding:6px 8px}
 #overview .acct strong{grid-column:1/-1;font-size:12px}
 #overview .acct .line{font-size:11px;gap:4px}
 #overview #calLegend{padding:7px 8px;margin-top:6px;gap:4px 8px;font-size:11px;line-height:1.25}
 #overview #calLegend::before{font-size:11px}
 #overview #calLegend li{gap:3px}
 #overview #calLegend .unit{padding-top:4px}
 #overview #summaryNote{padding:7px 8px;margin:6px 0 0;font-size:11px;line-height:1.3}
 #overview #calendar .grid7{width:100%;grid-template-columns:repeat(7,minmax(0,1fr)) minmax(82px,1.6fr);gap:3px}
 #overview #calendar .day{min-height:58px;padding:5px 2px}
 #overview #calendar .day i{font-size:11px;margin:0;padding:2px}
 #overview #calendar .day span{font-size:11px}
 #overview #calendar .dow{font-size:11px}
 #overview #calendar .wk{padding:4px;gap:2px}
 #overview #calendar .wkh{padding-left:4px;font-size:10px}
 #overview #calendar .wk-label,#overview #calendar .wk-cov{font-size:10px;padding:0;white-space:normal}
 #overview #calendar .wk-diff{font-size:11px;white-space:normal;overflow-wrap:anywhere}
 #overview #kpi .kpi-cell{grid-column:auto;border-left:0;border-top:1px solid var(--line)}
 #overview #kpi .kpi-cell:nth-child(-n+2){border-top:0}
 #overview #kpi .kpi-cell:nth-child(even){border-left:1px solid var(--line)}
}
.pos{color:var(--pos)}.neg{color:var(--neg)}.zero{color:var(--text)}.unk{color:var(--muted)}
td.diff{font-weight:600}

/* calendar 80 / contribution 20 */
.split{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--gap);align-items:start}
.calnav{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.calnav button{min-width:var(--ctl);padding:0;font-size:18px}
.caltitle{font-size:17px;font-weight:700;min-width:0}
/* one month, seven equal tracks that shrink with the pane */
.calendar{display:block}
/* full nominal rupiah needs a minimum column width: seven equal columns never shrink below --calcol;
   when the pane is narrower, the calendar scrolls sideways inside its own panel (body stays contained) */
.cal-scroll{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain;padding-bottom:2px}
#calendarPane,.calendar,.month{min-width:0;max-width:100%}
.grid7{display:grid;grid-template-columns:repeat(7,minmax(var(--calcol,118px),1fr));gap:4px}
.dow{font-size:13px;font-weight:600;color:var(--muted);text-align:center;padding-bottom:2px}
.day{display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;min-width:0;min-height:72px;padding:8px 10px;border-radius:6px;border:1px solid var(--line);background:var(--card);font-weight:400;text-align:left}
.day i{align-self:flex-start;font-style:normal;font-size:14px;line-height:1;color:var(--text);padding:3px 5px;margin:-3px -5px;border-radius:4px}
.day span{align-self:flex-end;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.day.p{background:color-mix(in srgb,var(--pos) 10%,var(--surface))}
.day.n{background:color-mix(in srgb,var(--neg) 10%,var(--surface))}
/* report period: a thin 1px line; the end date carries a filled date chip; keyboard focus is a separate 3px outline */
.day.sel{box-shadow:none;border-color:var(--line)}
.day.end i{background:var(--text);color:var(--surface);font-weight:700}
.day:focus-visible{outline:3px solid var(--text);outline-offset:2px;z-index:1}
.day.blank{visibility:hidden;border:0;padding:0;min-height:0}
.day.outside{background:var(--surface);border-style:dashed}
.day.outside i{color:var(--muted)}
.cal-pan{display:none}
@media(max-width:700px){.cal-pan{display:flex;justify-content:space-between;gap:8px;margin-top:8px}.cal-pan button{min-height:44px;font-size:12px;padding:6px 10px}}
.legend{list-style:none;display:flex;flex-wrap:wrap;gap:4px 16px;margin:10px 0 0;padding:0;font-size:13px;color:var(--muted)}
.legend li{display:flex;align-items:center;gap:6px;min-width:0}
.legend li>span{font-weight:700;font-variant-numeric:tabular-nums}
.legend .unit{display:block;flex-basis:100%;color:var(--text)}
.sw-sel{display:inline-block;width:16px;height:12px;border-radius:3px;box-shadow:inset 0 0 0 1px var(--text)}
.sw-end{font-style:normal;font-size:12px;font-weight:700;padding:1px 4px;border-radius:4px;background:var(--text);color:var(--surface)}
#contrib{display:flex;flex-direction:column;gap:8px;margin-top:16px}
#contrib h3{font-size:14px}
.acct{display:flex;flex-direction:column;gap:4px;width:100%;padding:10px;text-align:left;font-weight:400;background:var(--card)}
.acct.sel{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.acct strong{font-size:14px;overflow-wrap:anywhere}
.acct .line{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-variant-numeric:tabular-nums}
.acct .line span:first-child{color:var(--muted)}

/* campaign table */
.table-scroll{overflow-x:auto;max-width:100%;border:1px solid transparent;border-radius:var(--r)}
.scrollhint{font-size:13px;color:var(--muted);margin:0 0 8px}
/* scroll cue: a fade on the right edge marks hidden columns; it disappears once scrolled to the end */
.cue{position:relative}
.cue::after{content:"";position:absolute;top:1px;right:1px;bottom:1px;width:28px;pointer-events:none;border-radius:0 var(--r) var(--r) 0;background:linear-gradient(to right,transparent,color-mix(in srgb,var(--text) 18%,transparent));opacity:0;transition:opacity .15s}
.cue[data-more=right]::after{opacity:1}
table{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums;white-space:nowrap}
th,td{padding:8px 12px;text-align:right;border-bottom:1px solid var(--line);background:var(--surface)}
tbody tr:last-child td{border-bottom:0}
th{font-size:13px;color:var(--muted);background:var(--card)}
th button{min-height:32px;padding:0 2px;border:0;background:none;color:inherit;font-weight:600;font-size:13px}
th[aria-sort=ascending] button::after{content:" ▲"}
th[aria-sort=descending] button::after{content:" ▼"}
th:first-child,td:first-child{position:sticky;left:0;z-index:1;text-align:left;width:var(--namecol,240px);min-width:var(--namecol,240px);max-width:var(--namecol,240px);white-space:normal;box-shadow:1px 0 0 var(--line)}
td small{display:block;color:var(--muted);font-size:12px}
table.plain th:first-child,table.plain td:first-child{position:static;box-shadow:none;max-width:none}
#tableSection th:first-child,#tableSection td:first-child{width:44px;min-width:44px;max-width:44px;padding-left:6px;padding-right:6px;text-align:center;white-space:nowrap}
#tableSection th:nth-child(2),#tableSection td:nth-child(2){position:sticky;left:44px;z-index:1;text-align:left;width:var(--namecol,240px);min-width:var(--namecol,240px);max-width:var(--namecol,240px);white-space:normal;box-shadow:1px 0 0 var(--line)}
table.plain th,table.plain td{text-align:left}
table.plain td{white-space:normal}
caption{position:absolute;left:-999px}

/* technical audit (collapsed) */
.tech>summary{font-weight:600;min-height:var(--ctl);display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;list-style:none}
.tech>summary::-webkit-details-marker{display:none}
.tech>summary::before{content:"";width:8px;height:8px;border-right:2px solid var(--text);border-bottom:2px solid var(--text);transform:rotate(-45deg);margin-right:4px;flex:none}
.tech[open]>summary::before{transform:rotate(45deg)}
.tech[open]>summary{margin-bottom:12px}
.tech-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px var(--pad)}
.tech-body>section{min-width:0}
.tech-body h3{font-size:15px;margin-bottom:8px}
.tech-body .row{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-top:10px}
.kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:0;font-size:13px}
.kv dt{color:var(--muted)}
.kv dd{margin:0;overflow-wrap:anywhere}
#totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 16px;margin:12px 0 0}
#totals dt{font-size:12px;color:var(--muted)}
#totals dd{margin:0;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}
.badge{display:inline-block;padding:1px 8px;border-radius:4px;border:1px solid var(--line);font-size:12px;font-weight:600}
.badge.ok{border-color:var(--pos);color:var(--pos)}
.badge.bad{border-color:var(--neg);color:var(--neg)}
#revisions p{font-size:13px;margin-top:6px;overflow-wrap:anywhere}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}

/* tablet: contribution drops under the calendar as a row of cards */
@media(max-width:1100px){
 .kpi{grid-template-columns:repeat(4,minmax(0,1fr))}
 .kpi-cell:nth-child(n+5){border-top:1px solid var(--line)}
 .kpi-cell:nth-child(5){border-left:0}
 .kpi-cell.main{grid-column:span 2}
 .kpi-cell:last-child{grid-column:1/-1}
 .split{grid-template-columns:1fr}
 #contrib{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
 #contrib h3{grid-column:1/-1}
 .tech-body{grid-template-columns:1fr}
}
/* phone */
@media(max-width:700px){
 :root{--pad:12px;--ctl:44px;--gap:12px;--namecol:clamp(124px,38vw,150px)}
 .panel{padding:12px}
 /* header: title may wrap to two lines inside its own column; buttons keep 44px targets */
 .bar{height:auto;min-height:52px;padding-top:4px;padding-bottom:4px}
 .brand{flex:1 1 auto;min-width:0}
 .brand span{display:none}
 .brand h1{font-size:15px;line-height:1.2}
 .bar nav{flex:none;gap:6px}
 .bar nav button{min-height:44px;padding:4px 10px}
 .toolbar label{min-width:0}
 .head .ctx{flex-basis:100%}
 /* filters: three rows. Periode|Akun, Dari|Sampai, Cari + actions */
 .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}
 .toolbar label{gap:2px;font-size:12px}
 .toolbar input,.toolbar select{min-width:0}
 .toolbar label.grow{grid-column:1;min-width:0}
 .toolbar .actions{grid-column:2;margin:0;align-self:end}
 .toolbar .actions button{flex:1;padding:6px 8px}
 .head .head-action{min-height:44px}
 /* notice: text then a compact action, not a full-width slab */
 .notice{padding:10px 12px;gap:8px}
 .notice p{flex-basis:100%;font-size:13px;line-height:1.4}
 .notice{column-gap:8px;row-gap:4px}
 .notice button,#noticeMore summary{min-height:44px}
 #noticeMore summary{font-size:13px}
 #noticeAction{margin-left:auto;padding:4px 10px;font-size:14px}
 .notice .wide{display:none}
 #noticeMore{flex:0 1 auto;min-width:0}
 /* KPI: P&L alone on row one (the headline), six metrics in three rows of two, coverage as one inline line */
 .kpi{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:12px}
 /* every KPI: label on top, value directly under it, left aligned; hints sit beside the label/value, not below */
 .kpi-cell{padding:6px 10px;border-left:0;border-top:1px solid var(--line)}
 .kpi-cell:nth-child(odd){border-left:1px solid var(--line)}
 .kpi-cell.main,.kpi-cell:last-child{grid-column:1/-1;border-left:0;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:baseline}
 .kpi-cell.main{border-top:0}
 .kpi-cell.main small,.kpi-cell:last-child small{grid-column:1}
 .kpi-cell.main b,.kpi-cell:last-child b{grid-column:1;grid-row:2}
 .kpi-cell.main em,.kpi-cell:last-child em{grid-column:2;grid-row:2;align-self:baseline}
 .kpi-cell b{font-size:16px;overflow-wrap:normal;white-space:nowrap}
 .kpi-cell.main b{font-size:22px}
 .tech-body .row>*{flex:1 1 140px}
 :root{--calcol:104px;--wkcol:140px}
 .cal-scroll{scroll-snap-type:x proximity;scrollbar-width:thin;padding-bottom:8px}
 .grid7{gap:4px;--calcol:104px;--wkcol:138px}
 .dow{font-size:12px;padding:4px 0}
 .day{min-height:60px;padding:7px 8px;scroll-snap-align:start;border-radius:4px}
 .day.sel{box-shadow:none;border-color:var(--line)}
 .day.end{border-color:var(--line)}
 .day i{font-size:12px;padding:2px 4px;margin:0;align-self:flex-start}
 .day span{font-size:13px;line-height:1.4}
 .legend{padding-top:8px;border-top:1px solid var(--line)}
 .caltitle{font-size:16px;text-align:center;flex:1}
 .legend{gap:2px 12px;font-size:12px}
 #contrib{grid-template-columns:1fr}
 /* tables: same 15 columns, readable size, name column about 40% of the panel */
 th,td{padding:8px 10px}
 td{font-size:14px}
 #rows td{height:48px}
}
@media(max-width:360px){:root{--pad:10px}.panel{padding:8px}.grid7{gap:3px}.day{padding:6px 6px;min-height:56px}.day i{font-size:13px}main{padding-left:6px;padding-right:6px}.bar,footer{padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){button,input,select{border:1px solid ButtonText}.day.sel{outline:3px solid Highlight}}

/* campaign daily modal: one dialog, scrolls inside the card, page behind is locked */
.cname{display:block;min-height:0;width:100%;padding:0;border:0;background:none;color:var(--accent);font-weight:600;text-align:left;line-height:1.3}
.cname span{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;text-decoration:underline;text-underline-offset:3px}
#rows tr:hover td{background:var(--card)}
body.cm-open{overflow:hidden}
.cm{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px}
.cm-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.cm-card{position:relative;display:flex;flex-direction:column;width:min(1040px,100%);max-height:min(860px,100%);background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.cm-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:var(--pad) var(--pad) 12px;border-bottom:1px solid var(--line)}
.cm-id{min-width:0}
.cm-kicker{font-size:12px;font-weight:600;color:var(--accent);margin:0 0 4px}
.cm-head h2{font-size:20px;overflow-wrap:anywhere}
.cm-owner{font-size:13px;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}
#cmClose{flex:none;width:var(--ctl);padding:0}
.cm-scroll{overflow-y:auto;overscroll-behavior:contain;padding:var(--pad);display:flex;flex-direction:column;gap:12px}
.cm-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
.cm-controls select{min-width:140px}
.cm-cov{font-size:13px;color:var(--text);padding:8px 12px;background:var(--card);border-radius:var(--r)}
.cm-cov:empty{display:none}
.cm-table th:first-child,.cm-table td:first-child{width:auto;min-width:0;max-width:none;white-space:nowrap}
.cm-table td{padding:10px 12px;height:44px}
.cm-table tr.miss td{color:var(--muted)}
.cm-table tr.total td{position:static;font-weight:700;background:var(--card);border-top:2px solid var(--line)}
.cm-table tr.total td:first-child{white-space:nowrap}
.cm-table tr.total td:first-child small{white-space:normal;width:min-content;min-width:56px}
.cm-table tr.total small{display:block;font-weight:400;font-size:12px;color:var(--muted)}
@media(max-width:700px){
 .cm{padding:0}.cm-card{width:100%;max-height:100%;height:100%;border-radius:0;border:0}
 .cm-head{padding:8px var(--pad)}.cm-kicker{margin:0;font-size:12px}.cm-head h2{font-size:17px}
 .cm-owner{font-size:12px;margin-top:2px}
 .cm-scroll{padding:10px var(--pad);gap:8px}
 .cm-controls{gap:8px}.cm-controls label{flex:1 1 130px;gap:2px;font-size:12px}.cm-controls button{flex:1 1 100%}
 .cm-cov{padding:6px 10px;font-size:12px}
 .cm-table th,.cm-table td{padding:8px 10px}
}

/* column-level unknown reasons: one compact list directly under the table it explains */
.colnotes{list-style:none;margin:12px 0 0;padding:0;font-size:13px;line-height:1.4;color:var(--muted);display:grid;gap:6px}
.colnotes .lead{color:var(--text);font-weight:600}
.colnotes b{color:var(--text);font-weight:600}

/* weekly totals: the 8th column of the calendar grid (same rows, same heights, same horizontal scroll on phones) */
.grid7{grid-template-columns:repeat(7,minmax(var(--calcol,118px),1fr)) minmax(var(--wkcol,150px),1.1fr)}
.wkh{font-size:13px;font-weight:700;color:var(--text);text-align:left;padding:0 0 2px 10px;border-left:2px solid var(--line)}
.wk{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0;padding:6px 10px;border-radius:6px;border:1px solid var(--line);background:var(--surface)}
.wk-label{font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}
.wk-diff{font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.wk-diff.zero{color:var(--text)}
.wk-cov{font-size:12px;font-weight:600;color:var(--text);white-space:nowrap;padding:1px 6px;border-radius:4px;background:var(--card)}
.wk.blank{visibility:hidden;border:0;padding:0}
.mobile-day-name{display:none}
/* Seven mobile day columns; weekly totals occupy the following full row. */
@media(max-width:700px){
 #calendar .grid7{width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;zoom:1}
 #calendar .cal-scroll{overflow:visible;scroll-snap-type:none;padding-bottom:0}
 #calendar .cal-pan,#calendar .wkh,#calHint{display:none!important}
 #calendar .day{min-height:76px;padding:6px 1px;border-radius:4px}
 #calendar .day i{font-size:12px;margin:0;padding:2px;align-self:center}
 #calendar .day .day-amount{display:flex;flex-direction:column;align-items:center;align-self:stretch;gap:2px;font-size:10px;text-align:center}
 #calendar .day .day-amount span{align-self:center;font-size:inherit;line-height:1.3}
 #calendar .dow{font-size:12px}
 #calendar .wk{display:none}
 #calendar .wk-label{font-size:12px}
 #calendar .wk-diff{font-size:13px}
 #calendar .wk-cov{font-size:11px;padding:0;white-space:normal}
}

/* campaign modal: Facebook Reel video views trend panel */
.video-trend{margin-top:8px;padding:10px 14px;background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
.video-trend-title{font-size:13px;font-weight:700;color:var(--accent);margin:0 0 6px}
.video-row{display:flex;gap:10px;align-items:baseline;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.video-delta{font-size:12px;color:var(--muted);margin-top:2px}
.spark{display:flex;align-items:flex-end;gap:2px;height:28px;margin-top:6px}
.spark-bar{flex:1 1 0;background:var(--accent);border-radius:2px 2px 0 0;min-height:2px;transition:background .15s}
.spark-bar.spark-miss{background:var(--muted);opacity:.35}
.spark-bar:hover{opacity:.7}
.video-none{font-size:13px;color:var(--muted);margin:0}
@media(max-width:700px){
 #cmBody .cm-table th,#cmBody .cm-table td{font-size:10px;padding:6px 3px;line-height:1.3}
 #cmBody .cm-table th:first-child,#cmBody .cm-table td:first-child{min-width:42px;padding-left:4px;padding-right:4px}
 #cmBody .cm-table td small{font-size:10px;line-height:1.3}
}
/* Dedicated reading guides, separate from financial data. */
#calLegend,#summaryNote,#colNotes,#tableSection>.hint{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:14px 16px;margin-top:14px;line-height:1.6}
#calLegend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 16px}
#calLegend::before{content:'Panduan kalender';grid-column:1/-1;font-size:13px;font-weight:700;color:var(--text)}
#calLegend .unit{grid-column:1/-1;padding-top:8px;border-top:1px solid var(--line)}
#calLegend li{flex-wrap:wrap}
#summaryNote:empty{display:none}
#colNotes::before{content:'Ketersediaan data';font-size:13px;font-weight:700;color:var(--text)}
#tableSection>.hint::before{content:'Cara membaca angka';display:block;font-size:13px;font-weight:700;color:var(--text);margin-bottom:4px}
@media(max-width:700px){#calLegend{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#calLegend,#summaryNote,#colNotes,#tableSection>.hint{padding:12px;font-size:12px}}
/* CTR/CPC band colours: red/green reuse the P&L sign tokens (already AA in both themes); amber is AA on white, card and both alert backgrounds */
:root{--m-bad:var(--neg);--m-warn:#8a6400;--m-good:var(--pos)}
html.dark{--m-warn:#e3b341}
#tableSection .metric-bad{color:var(--m-bad);font-weight:800}
#tableSection .metric-yellow{color:var(--m-warn);font-weight:800}
#tableSection .metric-orange{color:var(--m-warn);font-weight:800}
#tableSection td.metric-bad,#tableSection td.metric-yellow,#tableSection td.metric-orange,#tableSection td.metric-good{font-weight:400}
#tableSection td.metric-yellow,#tableSection td.metric-orange{color:var(--m-warn)}
#tableSection .metric-good{color:var(--m-good);font-weight:800}
#tableSection th:last-child,#tableSection td.lifetime-note{width:180px}
#tableSection td.lifetime-note{font-size:11px;line-height:1.5}
#tableSection td.diff,#tableSection td.lifetime-note,#tableSection td.lifetime-note *{font-weight:400}
#cmBody .cm-table td{font-weight:400;text-align:left;font-variant-numeric:tabular-nums}
#cmBody .cm-table th{text-align:left}
@media(min-width:701px){
 .cm-card{width:min(1400px,100%)}
 .cm-scroll{padding:12px;gap:8px}
 #cmBody .cm-table{table-layout:fixed;width:100%;min-width:0}
 #cmBody .cm-table th,#cmBody .cm-table td{font-size:13px;padding:5px 2px;height:auto;min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
 #cmBody .cm-table th:first-child,#cmBody .cm-table td:first-child{width:62px;white-space:normal}
 #cmBody .cm-table th:nth-child(2),#cmBody .cm-table td:nth-child(2){width:auto;min-width:0;max-width:none;left:auto}
 #cmBody .cm-table small{font-size:12px}
}
#cmBody .cm-table td.metric-bad,#cmBody .cm-table td.neg{color:var(--m-bad)}
#cmBody .cm-table td.metric-yellow{color:var(--m-warn)}
#cmBody .cm-table td.metric-good,#cmBody .cm-table td.pos{color:var(--m-good)}
#tableSection td.lifetime-note.spend-loss-alert{background:#ffe0e0;color:#5c1515}
#tableSection td.lifetime-note.spend-watch-alert{background:#ffe2bd;color:#663600}
/* the alert backgrounds stay light in both themes, so their profit spans keep dark AA colours */
#tableSection td.spend-loss-alert .metric-bad,#tableSection td.spend-watch-alert .metric-bad{color:#9a1f18}
#tableSection td.spend-loss-alert .metric-good,#tableSection td.spend-watch-alert .metric-good{color:#14612f}
.manual-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.manual-upload-grid .panel{min-width:0;padding:10px;align-self:start}
.manual-upload-grid h2{font-size:14px;margin:0 0 4px}
.manual-upload-grid .hint{font-size:11px;margin:0 0 6px}
.manual-upload-grid .toolbar{border:0;box-shadow:none;background:none;margin:0}
.manual-upload-grid label{font-size:11px;gap:2px}
.manual-upload-grid button,.manual-upload-grid select,.manual-upload-grid input{font-size:11px;min-height:28px;padding:3px 6px}
.manual-upload-grid .check{margin:6px 0;font-size:11px}
.manual-upload-grid .check input{min-height:0;padding:0}
.manual-upload-grid p[role=status]:empty{display:none}
.manual-upload-grid p[role=status]{font-size:11px;margin:4px 0}
.manual-upload-grid input[type=file]{width:200px}

.manual-upload-grid .toolbar{display:flex;flex-wrap:wrap;padding:0;gap:6px}
.manual-upload-grid input[type=file]{max-width:100%;min-width:0}
.manual-upload-grid label{min-width:0;max-width:100%}
.manual-upload-grid p[role=status]{overflow-wrap:anywhere}
@media(max-width:800px){.manual-upload-grid{grid-template-columns:minmax(0,1fr)}}
/* Compact report controls without changing report content. */
#message:empty{display:none}
main{padding-top:8px}
#workspace{gap:8px}
#workspace>nav.toolbar{display:flex;gap:4px;padding:4px 8px;align-items:center}
#workspace>nav.toolbar button{padding:5px 12px;min-height:32px;font-size:12px}
#workspace>nav.toolbar button[aria-pressed="true"]{color:var(--accent);background:var(--info-bg);border-color:var(--accent)}
#filters{gap:8px;padding:8px 10px}
#filters label{gap:3px;font-size:11px}
#notice{padding:6px 10px;gap:4px 10px}
#notice p{font-size:12px;line-height:1.4;margin:0}
@media(min-width:701px){
 .bar{height:46px}
 .bar h1{font-size:17px}
 .bar .brand span{font-size:11px}
 #filters{display:grid;grid-template-columns:100px minmax(120px,0.8fr) 140px 140px minmax(130px,1.4fr) auto;align-items:end}
 #filters label,#filters label.grow{min-width:0}
 #filters input,#filters select{width:100%;min-width:0;min-height:32px;height:32px;padding:4px 7px;font-size:12px}
 #filters .actions button{min-height:32px;padding:5px 12px;font-size:12px}
}
@media(min-width:701px) and (max-width:950px){#filters{grid-template-columns:repeat(4,minmax(0,1fr))}#filters label.grow{grid-column:1/4}#filters .actions{grid-column:4}}
@media(max-width:700px){#workspace>nav.toolbar button{min-height:40px}#filters input,#filters select,#filters .actions button{min-height:40px}}
#tableSection table th,#tableSection table td,#tableSection table th button{text-align:left}
#tableSection table th,#tableSection table th button{overflow-wrap:normal;word-break:normal}
#tableSection table th:nth-child(7),#tableSection table th:nth-child(7) button{white-space:nowrap}
@media(min-width:701px){
 #tableSection table{table-layout:fixed;width:100%;max-width:100%;min-width:0}
 #tableSection th,#tableSection td{padding:5px 3px;font-size:clamp(11px,0.9vw,13px);border-right:1px solid var(--line);white-space:normal;overflow-wrap:anywhere}
 #tableSection th button{font-size:inherit;line-height:1.2;white-space:normal;max-width:100%;padding:0}
 #tableSection th:first-child,#tableSection td:first-child{width:28px;min-width:0;max-width:none;padding:3px}
 #tableSection th:nth-child(2),#tableSection td:nth-child(2){left:28px;width:135px;min-width:0;max-width:none}
 #tableSection .cname{font-size:inherit;line-height:1.25}
 #tableSection .cname span{white-space:normal;overflow-wrap:anywhere}
 #tableSection td small{font-size:10px;line-height:1.2}
 /* one-line amounts and unbroken single-word campaign names: 11px names fit 'promateorganizerpilot01' (156px) in a 165px column;
    11 equal metric tracks >=88px hold the longest signed Rp; panels narrower than the table scroll inside the table panel */
 #tableSection table{min-width:1340px}
 #tableSection th:nth-child(2),#tableSection td:nth-child(2){width:165px}
 #tableSection th:last-child,#tableSection td.lifetime-note{width:170px}
 #tableSection .cname,#tableSection .cname span{font-size:11px}
 #tableSection td:not(:nth-child(2)):not(.lifetime-note){white-space:nowrap;overflow-wrap:normal;font-size:11px;padding-left:2px;padding-right:2px}
}
/* Compact phone campaign table; desktop and calendar remain unchanged. */
@media(max-width:700px){
 #tableSection th,#tableSection td{font-size:10px;padding:6px 3px}
 #tableSection th button{font-size:10px;min-height:32px;padding:0;white-space:normal;line-height:1.2}
 #tableSection th:first-child,#tableSection td:first-child{width:24px;min-width:24px;max-width:24px;padding:3px;text-align:center}
 #tableSection th:nth-child(2),#tableSection td:nth-child(2){left:24px;width:76px;min-width:76px;max-width:76px}
 #tableSection .cname{font-size:10px;line-height:1.25;padding:0;min-height:32px}
 #tableSection td small{font-size:10px;line-height:1.2}
 #tableSection #rows td{height:40px}
}

/* Minimal login: no header until authenticated. */
body:not(.authed) .bar{display:none}
body:not(.authed) main{min-height:100vh;display:grid;place-items:center;padding-top:0;padding-bottom:0}
.login-min{width:min(360px,100%);display:flex;flex-direction:column;align-items:center;gap:20px;text-align:center}
.login-min[hidden]{display:none}
.login-title{font-size:40px;font-weight:700;letter-spacing:.12em;margin:0}
.login-min form{width:100%;display:flex;flex-direction:column;gap:8px}
.login-min input{width:100%;min-height:44px;text-align:center;font-size:15px}
.login-min button{width:100%;min-height:44px}
.login-quote{margin:12px 0 0;color:var(--muted)}
.login-quote .ar{font-size:20px;line-height:1.9;color:var(--text);margin-bottom:8px}
.login-quote blockquote{margin:0;font-size:13px;line-height:1.6;font-style:italic}
.login-quote figcaption{margin-top:6px;font-size:11px;letter-spacing:.04em}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@font-face{font-family:"Plex Arabic";src:url(/static/fonts/plex-arabic-400.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Plex Arabic";src:url(/static/fonts/plex-arabic-500.woff2) format("woff2");font-weight:500;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
.login-quote .ar{font-family:"Plex Arabic",system-ui,sans-serif;font-weight:500;font-size:19px;line-height:2}
.login-quote{width:min(94vw,620px)}
.login-quote .ar{white-space:nowrap;font-size:clamp(11px,3.55vw,22px);line-height:2.1;padding:0 2px}
@font-face{font-family:"Amiri Quran";src:url(/static/fonts/amiri-quran.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
.login-quote .ar{font-family:"Amiri Quran","Plex Arabic",serif;font-weight:400;font-size:clamp(13px,4.1vw,26px);line-height:2.3}
