/* ================= Portal Tim — gaya tampilan ================= */
:root {
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #1d1b19;
  --ink-2: #4a4540;
  --muted: #7a736b;
  --line: #e6e1d9;
  --line-2: #f0ece6;
  --soft: #faf8f5;

  --qc: #76263a;          /* merah marun, sama dengan spreadsheet QC */
  --qc-soft: #f7e9ec;
  --rnd: #1f5f73;         /* biru petrol untuk R&D */
  --rnd-soft: #e3f0f3;
  --accent: var(--qc);
  --accent-soft: var(--qc-soft);

  --ok: #1d7a4a;   --ok-soft: #e2f3e9;
  --warn: #9a5b00; --warn-soft: #fdf0d6;
  --err: #b42318;  --err-soft: #fde8e5;
  --info: #2457a6; --info-soft: #e6eefb;
  --violet: #6a3fb0; --violet-soft: #efe8fb;
  --grey: #6b665f; --grey-soft: #efede9;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 27, 25, .05), 0 6px 20px rgba(29, 27, 25, .04);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
body.tr-rnd { --accent: var(--rnd); --accent-soft: var(--rnd-soft); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1 { font-size: 1.65rem; line-height: 1.2; margin: .15rem 0 .2rem; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1rem 0 .4rem; }
p { margin: 0 0 .6rem; }
code { font-family: var(--mono); font-size: .86em; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; word-break: break-all; }
code.block { display: block; padding: 8px 10px; margin-bottom: 6px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 64px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.sub { color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.hint { font-weight: 400; color: var(--muted); font-size: .76rem; }
.mono, .mono-title { font-family: var(--mono); }
.mono-title { font-size: 1.45rem; letter-spacing: -.02em; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ng { color: var(--err); font-weight: 700; }
.ok-text { color: var(--ok); font-weight: 600; }
.warn-text { color: var(--err); font-weight: 600; }
.soon-text { color: var(--warn); font-weight: 600; }
.error { color: var(--err); font-weight: 500; font-size: .82rem; }
.spacer { flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; color: var(--muted); margin: 0; font-weight: 600; }
.back { font-size: .85rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.narrow { max-width: 520px; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar { background: #1d1b19; color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.logo { width: 16px; height: 16px; border-radius: 4px; background: var(--accent); transform: rotate(45deg); flex: none; box-shadow: 6px -6px 0 -2px rgba(255,255,255,.25); }
.tr-home .logo { background: linear-gradient(135deg, var(--qc) 50%, var(--rnd) 50%); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text small { color: #bdb6ac; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: rgba(255,255,255,.08); }
.who { display: flex; flex-direction: column; line-height: 1.15; font-size: .88rem; }
.who small { color: #bdb6ac; font-size: .74rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.avatar.lg { width: 42px; height: 42px; font-size: 1.05rem; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); min-width: 200px; padding: 6px; display: grid; }
.menu a, .menu button { display: block; text-align: left; padding: 9px 12px; border-radius: 7px; text-decoration: none; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.menu a:hover, .menu button:hover { background: var(--soft); color: var(--accent); }
.menu form { margin: 0; border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
.subnav { background: var(--card); border-bottom: 1px solid var(--line); color: var(--ink); }
.subnav-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a { padding: 13px 14px 11px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--accent); }
.subnav a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }

/* ---------- Komponen dasar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.pad { padding: 16px 20px; }
.stack { display: grid; gap: 14px; align-content: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #cfc7bb; background: var(--soft); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.tiny { padding: 3px 9px; font-size: .78rem; border-radius: 7px; font-weight: 600; }
.btn.block { width: 100%; }
.btn.copied { background: var(--ok-soft); border-color: #b9e0c9; color: var(--ok); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }
.danger, .linkbtn.danger { color: var(--err); }
form { margin: 0; }

input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; border: 0; accent-color: var(--accent); }
input[type=file] { background: var(--soft); padding: 6px; font-size: .85rem; }
input:disabled { background: var(--soft); color: var(--ink-2); }
textarea { resize: vertical; }
label { display: grid; gap: 5px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.inline { display: flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
label output { font-weight: 700; color: var(--accent); margin-left: 6px; }
fieldset { margin: 0; }
fieldset.plain { border: 0; padding: 0; }
legend { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; padding-top: 6px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; grid-column: 1 / -1; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--soft); flex-wrap: wrap; }
form.inline, .inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.inline input:not([type=checkbox]) { flex: 1 1 140px; width: auto; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; font-size: .93rem; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cf; }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: #f1d9a6; }
.flash-err { background: var(--err-soft); color: var(--err); border-color: #f5c6bf; }
.flash-info { background: var(--info-soft); color: var(--info); border-color: #c8d8f3; }
.flash a { font-weight: 600; }

.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.section-head.pad { margin: 0; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 44px 20px; }
.empty p { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.form-grid > fieldset.card { display: grid; gap: 12px; }
main > section, main > .card, main > form.card { margin-bottom: 16px; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; line-height: 1.6; background: var(--grey-soft); color: var(--grey); }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-err { background: var(--err-soft); color: var(--err); }
.b-accent { background: var(--accent-soft); color: var(--accent); }
.role-admin { background: #1d1b19; color: #fff; }
.role-desainer { background: var(--qc-soft); color: var(--qc); }
.role-atasan { background: var(--info-soft); color: var(--info); }
.st-draft, .st-qc { background: var(--grey-soft); color: var(--grey); }
.st-perbaikan { background: #fde9dc; color: #a2470e; }
.st-launching { background: var(--info-soft); color: var(--info); }
.st-menunggu { background: var(--violet-soft); color: var(--violet); }
.st-revisi, .dec-revisi { background: var(--warn-soft); color: var(--warn); }
.st-tahan, .dec-tahan { background: var(--info-soft); color: var(--info); }
.st-reject, .dec-reject { background: var(--err-soft); color: var(--err); }
.st-lolos, .dec-lolos { background: var(--ok-soft); color: var(--ok); }
.pr-ready { background: #fff4d6; color: #8a5a00; }
.pr-done { background: #1d7a4a; color: #fff; }
.risk-kritis { background: var(--err-soft); color: var(--err); font-size: .68rem; padding: 0 7px; }
.risk-mayor { background: var(--grey-soft); color: var(--grey); font-size: .68rem; padding: 0 7px; }
.r-ok { background: var(--ok-soft); color: var(--ok); }
.r-ng { background: var(--err); color: #fff; }
.r-na { background: var(--grey-soft); color: var(--grey); }
.cp-terbuka, .cp-baru { background: var(--err-soft); color: var(--err); }
.cp-proses { background: var(--warn-soft); color: var(--warn); }
.cp-selesai { background: var(--ok-soft); color: var(--ok); }
.w-belum { background: var(--grey-soft); color: var(--grey); }
.w-proses { background: var(--info-soft); color: var(--info); }
.w-selesai { background: var(--ok-soft); color: var(--ok); }
.w-tertunda { background: var(--warn-soft); color: var(--warn); }
.pj-berjalan { background: var(--rnd-soft); color: var(--rnd); }
.pj-tertunda { background: var(--warn-soft); color: var(--warn); }
.pj-selesai { background: var(--ok-soft); color: var(--ok); }
.pj-dibatalkan { background: var(--grey-soft); color: var(--grey); }
.pr-tinggi { background: var(--err-soft); color: var(--err); }
.pr-sedang { background: var(--warn-soft); color: var(--warn); }
.pr-rendah { background: var(--grey-soft); color: var(--grey); }
.head-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.score-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; background: var(--grey-soft); color: var(--grey); white-space: nowrap; }
.sc-full { background: var(--ok-soft); color: var(--ok); }
.sc-good { background: #eef6dc; color: #4c6a12; }
.sc-mid { background: var(--warn-soft); color: var(--warn); }
.sc-low { background: var(--err-soft); color: var(--err); }

/* ---------- Tabel ---------- */
.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfbf9; }
.table tr[data-href] { cursor: pointer; }
.table th.num { text-align: right; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table tr.inactive td { opacity: .55; }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions > * { display: inline-block; vertical-align: middle; margin-left: 6px; }
.code-link { font-family: var(--mono); font-weight: 650; color: var(--accent); text-decoration: none; font-size: .86rem; white-space: nowrap; }
.code-link:hover { text-decoration: underline; }
.rekap .findings ul { margin: 0; padding-left: 16px; font-size: .8rem; min-width: 220px; }
.rekap .fname code { font-size: .76rem; }
.rekap td.fname { min-width: 220px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
.pop { position: relative; display: inline-block; }
.pop summary { list-style: none; }
.pop summary::-webkit-details-marker { display: none; }
.pop[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(29,27,25,.35); z-index: 40; cursor: default; }
.pop-body { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 18px; text-align: left; white-space: normal; }
.pop-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.pop-title h3 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); }

/* ---------- Filter, chip, tab ---------- */
.filters { padding: 12px; display: grid; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row input[type=search] { flex: 1 1 240px; width: auto; }
.filter-row select, .filter-row input[type=date] { width: auto; }
.quick, .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .82rem; font-weight: 600; color: var(--ink-2); background: var(--card); }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.summary-line { margin: 4px 2px 10px; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs a { padding: 6px 14px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.tabs a.on { background: var(--accent); color: #fff; }
.tabs a span { font-size: .75rem; opacity: .75; margin-left: 4px; }
.tabs.inline { margin-bottom: 14px; }
.month-nav, .date-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.month-nav select, .date-nav input { width: auto; }

/* ---------- Statistik ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; text-decoration: none; }
a.kpi:hover { border-color: var(--accent); color: inherit; }
.kpi span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.kpi b { font-size: 1.65rem; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: .76rem; }
.kpi.alert { background: var(--err-soft); border-color: #f5c6bf; }
.kpi.alert b { color: var(--err); }
.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.status-strip a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; border-right: 1px solid var(--line); }
.status-strip a:last-child { border-right: 0; }
.status-strip a:hover { background: var(--soft); color: inherit; }
.status-strip b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.status-strip span { font-size: .84rem; color: var(--ink-2); line-height: 1.3; }
.status-strip a.hot { background: var(--accent-soft); }
.status-strip a.hot b { color: var(--accent); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .8rem; }
.stat.alert { background: var(--err-soft); border-color: #f5c6bf; }
.stat.alert b { color: var(--err); }
.stat.wide { grid-column: span 2; }
.hbars, .mini-bars { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.hbars li, .mini-bars li { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 32px; gap: 10px; align-items: center; font-size: .88rem; }
.mini-bars li { grid-template-columns: minmax(80px, 150px) 1fr 24px; font-size: .8rem; }
.hbars .bar, .mini-bars .bar { background: var(--line-2); border-radius: 4px; height: 10px; overflow: hidden; }
.hbars .bar i, .mini-bars .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hbars b, .mini-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { font-size: .76rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.l-spk { background: #c9bfb2; }
.l-ng { background: var(--qc); }
.l-comp { background: #e0861b; }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 190px; align-items: end; margin-bottom: 8px; }
.trend-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; gap: 2px; border-radius: 8px; padding: 6px 2px 4px; }
.trend-col.on { background: var(--accent-soft); }
.trend .bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.trend .bars i { width: 22%; max-width: 16px; min-height: 2px; border-radius: 3px 3px 0 0; position: relative; }
.trend .bars em { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .66rem; color: var(--muted); }
.trend .m { font-size: .78rem; font-weight: 600; }
.trend .fp { font-size: .72rem; color: var(--ok); font-weight: 700; }

.progress { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: 6px 0 3px; }
.progress span { display: block; height: 100%; background: var(--warn); border-radius: 999px; transition: width .3s; }
.progress.mid span { background: var(--accent); }
.progress.done span { background: var(--ok); }

/* ---------- Portal & login ---------- */
.portal { max-width: 920px; margin: 3vh auto 0; }
.portal-head { margin-bottom: 24px; }
.portal-head h1 { font-size: 2rem; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.portal-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.portal-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(29,27,25,.1); border-color: var(--c); color: inherit; }
.pc-rnd { --c: var(--rnd); --cs: var(--rnd-soft); }
.pc-qc { --c: var(--qc); --cs: var(--qc-soft); }
.pc-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--cs); color: var(--c); display: grid; place-items: center; margin-bottom: 8px; }
.pc-icon svg { width: 26px; height: 26px; }
.portal-card h2 { font-size: 1.3rem; margin: 0; }
.portal-card p { color: var(--muted); margin: 0; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.pc-stats dt { font-size: .72rem; color: var(--muted); }
.pc-stats dd { margin: 0; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-stats dd.hot { color: var(--c); }
.pc-go { font-weight: 700; color: var(--c); margin-top: 6px; }
.auth { min-height: 82vh; display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; max-width: 920px; margin: 0 auto; }
.auth-side h1 { font-size: 2.3rem; margin-top: 16px; }
.auth-side p { color: var(--muted); font-size: 1.05rem; }
.auth-side ul { padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; }
.logo.big { width: 36px; height: 36px; border-radius: 8px; display: inline-block; background: linear-gradient(135deg, var(--qc) 50%, var(--rnd) 50%); box-shadow: none; }
.auth-card h2 { font-size: 1.35rem; margin-bottom: 4px; }

/* ---------- SPK & QC ---------- */
.fn-builder { background: linear-gradient(var(--card), var(--card)) padding-box; }
.fn-preview { display: flex; gap: 8px; align-items: center; background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.fn-preview code { flex: 1; background: none; border: 0; padding: 0; font-weight: 600; }
.fn-warnings { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; }
.fn-warnings li { color: var(--warn); padding-left: 20px; position: relative; }
.fn-warnings li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.fn-warnings.ok li { color: var(--ok); }
.fn-warnings.ok li::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.fn-warnings.static { margin-top: 8px; }
.path-preview { display: grid; gap: 4px; }
.path-preview code { font-size: .78rem; }
.copyline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copyline code { flex: 0 1 auto; }
.copyline.big code { font-size: .95rem; padding: 4px 8px; font-weight: 600; }
.qc-file { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.qc-file > div { display: grid; gap: 4px; }
.qc-table td { vertical-align: top; }
.qc-table .c-no { width: 40px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qc-table .c-aspect { min-width: 220px; max-width: 340px; }
.qc-table .c-res { width: 168px; }
.qc-table textarea { min-height: 36px; font-size: .86rem; padding: 6px 8px; }
.qc-row.res-ng { background: #fff6f5; }
.qc-row.res-ng td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.qc-row.res-na { color: var(--muted); }
.qc-row.has-error { background: var(--err-soft); }
.prev-ng { margin-top: 6px; font-size: .78rem; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 4px 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--soft); }
.seg label { display: block; cursor: pointer; font-weight: 700; font-size: .8rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 11px; color: var(--muted); border-right: 1px solid var(--line); user-select: none; }
.seg label:last-child span { border-right: 0; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg-ok input:checked + span { background: var(--ok); color: #fff; }
.seg-ng input:checked + span { background: var(--err); color: #fff; }
.seg-na input:checked + span { background: var(--grey); color: #fff; }
.qc-bar { position: sticky; bottom: 0; z-index: 10; margin-top: 14px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -6px 24px rgba(0,0,0,.06); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qc-tally { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .88rem; color: var(--ink-2); }
.qc-tally b { font-variant-numeric: tabular-nums; font-size: 1.05rem; color: var(--ink); }
.qc-tally .score b { color: var(--accent); }
.qc-tally .kritis { color: var(--err); font-weight: 700; font-size: .82rem; background: var(--err-soft); padding: 3px 10px; border-radius: 999px; }
.qc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.decide { border-width: 2px; }
.decide.is-pending { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--card) 90px); }
.decision-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dec { cursor: pointer; display: block; }
.dec input { position: absolute; opacity: 0; pointer-events: none; }
.dec span { display: block; text-align: center; padding: 12px 6px; border-radius: 10px; border: 2px solid var(--line); font-weight: 800; letter-spacing: .03em; background: var(--card); }
.dec input:focus-visible + span { outline: 3px solid var(--accent-soft); }
.dec-lolos input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.dec-revisi input:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.dec-tahan input:checked + span { background: var(--info); border-color: var(--info); color: #fff; }
.dec-reject input:checked + span { background: var(--err); border-color: var(--err); color: #fff; }
.dec.disabled { cursor: not-allowed; }
.dec.disabled span { opacity: .4; text-decoration: line-through; }
label.dec.dec-lolos, label.dec { background: none; }
.note-box { background: var(--warn-soft); color: #5e3a00; border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin-bottom: 8px; }
.round > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.round > summary::-webkit-details-marker { display: none; }
.round-head { display: flex; align-items: center; gap: 8px; }
.round-head h2 { margin: 0; }
.round-head::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.round[open] .round-head::before { transform: rotate(90deg); }
.round-stats { display: flex; gap: 12px; align-items: center; font-size: .86rem; color: var(--ink-2); }
.round-stats .ng b { color: var(--err); }
.round-body { margin-top: 12px; }
.ng-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.ng-list li { border-left: 3px solid var(--err); background: #fff8f7; padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: .9rem; }
.all-items > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .86rem; margin: 6px 0; }
.res-ng td { background: #fff8f7; }
.paths { display: grid; gap: 8px; margin: 14px 0 8px; }
.path { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; background: var(--soft); opacity: .7; }
.path.current { opacity: 1; background: var(--card); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.path-label { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.path.current .path-label { color: var(--accent); }
.path code { font-size: .8rem; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
.files { list-style: none; padding: 0; margin: 0 0 12px; }
.files li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.files a { font-weight: 600; overflow-wrap: anywhere; }
.upload { display: grid; gap: 8px; }
.complaint-mini { border-left: 3px solid var(--err); padding: 4px 10px; margin-bottom: 10px; display: grid; gap: 2px; }
.timeline { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow-y: auto; }
.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.timeline li:first-child::before { background: var(--accent); }
.tl-head { font-size: .84rem; }
.danger-zone { text-align: center; padding: 10px; }
.todo { border-left: 4px solid var(--accent); }
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; }
.todo-list a { display: grid; grid-template-columns: 170px 1fr auto; grid-template-areas: "no info cta" "no what cta"; gap: 0 14px; padding: 10px 6px; border-top: 1px solid var(--line-2); text-decoration: none; align-items: center; }
.todo-list li:first-child a { border-top: 0; }
.todo-list a:hover { background: var(--soft); color: inherit; }
.todo-list .mono { grid-area: no; font-weight: 700; color: var(--accent); font-size: .86rem; }
.todo-list a > span:nth-child(2) { grid-area: info; font-weight: 600; }
.todo-list a > span:nth-child(3) { grid-area: what; }
.todo-list .cta { grid-area: cta; font-weight: 700; color: var(--accent); font-size: .85rem; white-space: nowrap; }
.aspects input, .aspects select { padding: 5px 8px; font-size: .86rem; }
.w-num { width: 76px !important; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.add-row input[name=name] { flex: 1 1 180px; width: auto; }
.add-row input[name=standard] { flex: 2 1 260px; width: auto; }
.add-row select { width: auto; }
.cat-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.cat-list li.inactive { opacity: .55; }

/* ---------- R&D ---------- */
.att { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-size: .74rem; font-weight: 800; background: var(--grey-soft); color: var(--grey); flex: none; }
.att-hadir { background: var(--ok); color: #fff; }
.att-izin { background: var(--info-soft); color: var(--info); }
.att-sakit { background: var(--violet-soft); color: var(--violet); }
.att-cuti { background: var(--warn-soft); color: var(--warn); }
.att-alpa { background: var(--err); color: #fff; }
.att-none { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.legend-att { display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.att-seg span { padding: 6px 10px; }
.att-seg .att-hadir input:checked + span { background: var(--ok); color: #fff; }
.att-seg .att-izin input:checked + span { background: var(--info); color: #fff; }
.att-seg .att-sakit input:checked + span { background: var(--violet); color: #fff; }
.att-seg .att-cuti input:checked + span { background: var(--warn); color: #fff; }
.att-seg .att-alpa input:checked + span { background: var(--err); color: #fff; }
.att-seg .att-clear input:checked + span { background: var(--line); color: var(--ink); }
.att-seg label { background: none; width: auto; height: auto; display: block; border-radius: 0; }
.time-in { display: flex; gap: 6px; align-items: center; }
.time-in input { width: 110px; }
tr.not-present .time-in { opacity: .35; pointer-events: none; }
.att-grid { font-size: .8rem; }
.att-grid th.day, .att-grid td.day { text-align: center; padding: 6px 2px; min-width: 30px; }
.att-grid th.day a { text-decoration: none; display: grid; line-height: 1.1; }
.att-grid th.day small { font-size: .62rem; font-weight: 500; text-transform: none; }
.att-grid .we { background: #faf6ef; }
.att-grid th.today { background: var(--accent); color: #fff; }
.att-grid th.today a { color: #fff; }
.att-grid .att { width: 22px; height: 22px; font-size: .68rem; }
.sticky { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 140px; }
th.sticky { background: var(--soft); }
.member-grid, .team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.team-grid { margin-bottom: 16px; }
.member-card { text-decoration: none; display: grid; gap: 12px; transition: border-color .15s; }
.member-card:hover { border-color: var(--accent); color: inherit; }
.member-card.inactive { opacity: .6; }
.mc-head, .team-card header { display: flex; align-items: center; gap: 12px; }
.mc-head > div, .team-card header > div { flex: 1; min-width: 0; }
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line-2); }
.mc-stats dt { font-size: .72rem; color: var(--muted); }
.mc-stats dd { margin: 0; font-weight: 700; }
.team-card { display: grid; gap: 8px; align-content: start; }
.team-card p { margin: 0; }
.tc-works { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: .86rem; }
.tc-works li { display: flex; gap: 6px; align-items: baseline; }
.tc-works li > span:nth-child(2) { flex: 1; min-width: 0; }
.mini-project { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mini-project:last-child { border-bottom: 0; }
.quick-work { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.quick-work select { width: auto; padding: 4px 8px; font-size: .84rem; font-weight: 600; border-radius: 999px; }
.quick-work input[type=range] { width: 110px; }
.quick-work output { font-weight: 700; font-size: .84rem; width: 38px; }
.works td:nth-child(2) { min-width: 200px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.project { display: grid; gap: 10px; align-content: start; border-top: 4px solid var(--rnd); }
.project.late { border-top-color: var(--err); }
.project header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.project header h2 { margin: 0; }
.project .desc { color: var(--ink-2); font-size: .9rem; margin: 0; }
.pj-team { font-size: .9rem; }
.pj-dates { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--ink-2); }
.pj-progress { display: grid; grid-template-columns: 1fr 44px; gap: 0 10px; align-items: center; }
.pj-progress .progress { grid-column: 1 / -1; height: 10px; }
.pj-progress output { font-weight: 800; color: var(--accent); text-align: right; }
.project footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 10px; }
.idea-list { display: grid; gap: 12px; }
.idea { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; border-left: 4px solid var(--grey-soft); }
.idea.pri-tinggi { border-left-color: var(--err); }
.idea.pri-sedang { border-left-color: #e3a43a; }
.idea-main { flex: 1; min-width: 0; }
.idea-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.idea-head h2 { margin: 0; }
.idea-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 170px; }
.idea-actions form { display: grid; }
.idea-project { display: grid; gap: 4px; max-width: 360px; }
.idea-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.idea-mini li { display: flex; gap: 8px; align-items: center; }
.idea-mini li > span:nth-child(2) { flex: 1; }
.day-h { text-align: center !important; }
.day-h small { display: block; font-weight: 500; text-transform: none; }
.day-h.today { background: var(--accent); color: #fff; }
.day-c { text-align: center; position: relative; }
.wcount { position: absolute; top: 4px; right: 4px; font-size: .62rem; font-weight: 800; background: var(--accent); color: #fff; border-radius: 999px; min-width: 15px; height: 15px; line-height: 15px; padding: 0 3px; }
.week-member { border-top: 1px solid var(--line-2); padding: 10px 0; }
.week-member > summary { cursor: pointer; }
.week-day { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 6px 0 0 12px; font-size: .88rem; }
.week-day .wd { color: var(--muted); font-size: .8rem; }
.week-day ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* ---------- Responsif ---------- */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .split, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .dash-grid, .form-grid, .portal-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; gap: 20px; min-height: auto; padding-top: 4vh; }
  .auth-side ul { display: none; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .status-strip a:nth-child(2) { border-right: 0; }
  .status-strip a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .decision-options { grid-template-columns: 1fr 1fr; }
  .idea { flex-direction: column; }
  .idea-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .todo-list a { grid-template-columns: 1fr auto; grid-template-areas: "no cta" "info cta" "what cta"; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .main { padding-top: 16px; }
  h1 { font-size: 1.4rem; }
  .who { display: none; }
  .kpis, .kpis.four { grid-template-columns: 1fr 1fr; }
  .row2, .grid3 { grid-template-columns: 1fr; }
  .stat.wide { grid-column: auto; }
  .card { padding: 16px; }
  .pagehead { align-items: flex-start; }
  .filter-row > * { flex: 1 1 45%; }
  .filter-row input[type=search] { flex-basis: 100%; }
  .trend { height: 160px; }
  .week-day { grid-template-columns: 1fr; padding-left: 0; }
  .project-grid { grid-template-columns: 1fr; }
  /* Tabel menjadi kartu di layar kecil */
  .table:not(.att-grid):not(.compact) thead { display: none; }
  .table:not(.att-grid):not(.compact), .table:not(.att-grid):not(.compact) tbody, .table:not(.att-grid):not(.compact) tr, .table:not(.att-grid):not(.compact) td { display: block; }
  .table:not(.att-grid):not(.compact) tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table:not(.att-grid):not(.compact) td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; text-align: left; }
  .table:not(.att-grid):not(.compact) td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  .table:not(.att-grid):not(.compact) td:not([data-l]) { display: block; }
  .table td.cell-actions { text-align: left; padding-top: 8px; }
  .table td.cell-actions > *:first-child { margin-left: 0; }
  .qc-table td.c-no { display: none !important; }
  .qc-table td.c-aspect { padding-top: 6px; }
  .qc-table .c-res { width: auto; }
  .qc-bar { padding: 10px; }
  .qc-actions { width: 100%; }
  .qc-actions .btn { flex: 1; }
  .rekap td.fname, .rekap .findings ul { min-width: 0; }
  .time-in input { width: 100%; }
}

/* ---------- Cetak ---------- */
@media print {
  .topbar, .subnav, .actions, .filters, .btn, .qc-bar, form[data-confirm], .pager { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; break-inside: avoid; }
  .main { padding: 0; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Alur order (revisi 3) ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 0; margin: 0 0 18px; counter-reset: s; }
.steps li { position: relative; display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--muted); padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-right: 0; }
.steps li:first-child { border-radius: 10px 0 0 10px; }
.steps li:last-child { border-radius: 0 10px 10px 0; border-right: 1px solid var(--line); }
.steps li span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .74rem; background: var(--grey-soft); color: var(--grey); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--ok); color: #fff; }
.steps li.now { color: var(--accent); background: var(--accent-soft); }
.steps li.now span { background: var(--accent); color: #fff; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.order-grid > div, .order-strip > div { display: grid; gap: 1px; align-content: start; }
.order-grid > div > span, .order-strip > div > span { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.order-grid b, .order-strip b { font-weight: 600; overflow-wrap: anywhere; }
.order-grid b .sub { font-weight: 500; }
.order-strip { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-bottom: 16px; }
.order-strip .btn { margin-left: auto; }
.paste-box textarea { font-family: var(--mono); font-size: .86rem; min-height: 190px; }
.paste-box { display: grid; gap: 10px; align-content: start; background: linear-gradient(180deg, var(--accent-soft), var(--card) 120px); }
details.raw summary { cursor: pointer; color: var(--accent); font-size: .85rem; font-weight: 600; }
details.raw pre { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .82rem; white-space: pre-wrap; margin: 8px 0 0; }
.compact-info { font-size: .85rem; background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.status-strip.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 820px) {
  .status-strip.five { grid-template-columns: 1fr 1fr; }
  .status-strip.five a { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 1px solid var(--line); border-bottom: 0; }
  .steps li:first-child { border-radius: 10px 10px 0 0; }
  .steps li:last-child { border-radius: 0 0 10px 10px; border-bottom: 1px solid var(--line); }
  .steps li:not(.done):not(.now) { display: none; }
  .order-strip .btn { margin-left: 0; }
}

/* ================= Revisi v3 ================= */
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.kpi-err { background: var(--err-soft); border-color: #f5c6bf; }
.kpi-err b { color: var(--err); }
.kpi-warn { background: var(--warn-soft); border-color: #f1d9a8; }
.kpi-warn b { color: var(--warn); }
.mt { margin-top: 12px; }
.center { text-align: center; }
.sep { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 4px; }
.pre { white-space: pre-line; }
.label-text { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.plain-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.b-grey { background: var(--grey-soft); color: var(--grey); }
.b-info { background: var(--info-soft); color: var(--info); }

/* Lebar penuh (Rekap, SKPI, Data produk) */
body.is-wide main.wrap { max-width: 1680px; }

/* Jenis pekerjaan & lampiran (Tracker Orderan) */
.wt-cetak { background: var(--grey-soft); color: var(--grey); }
.wt-cek_file { background: var(--info-soft); color: var(--info); }
.wt-desain_saja { background: var(--violet-soft); color: var(--violet); }
.fk-preview { background: var(--info-soft); color: var(--info); }
.fk-approval { background: var(--ok-soft); color: var(--ok); }
.fk-lainnya { background: var(--grey-soft); color: var(--grey); }
.service-box { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; background: var(--soft); display: grid; gap: 10px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { display: grid; gap: 2px; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); height: 100%; font-weight: 400; }
.radio-card span b { font-size: .9rem; }
.radio-card span small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.radio-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.radio-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); display: flex; flex-direction: column; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; background: #fff; }
.gallery .file-ic { aspect-ratio: 4 / 3; display: grid; place-items: center; font-weight: 700; color: var(--muted); text-decoration: none; font-size: .85rem; }
.gallery figcaption { padding: 6px 8px; font-size: .74rem; display: grid; gap: 4px; }
.gallery figcaption .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery figure.purged { opacity: .55; }
.kind-form select { font-size: .74rem; padding: 2px 6px; min-height: 0; }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); background: var(--soft); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone.flash-ok-bg { border-color: var(--ok); background: var(--ok-soft); }
.dropzone b { color: var(--ink); }
.pending { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pending:empty { display: none; }
.pending-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); display: grid; place-items: center; font-size: .7rem; text-align: center; padding: 2px; }
.pending-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pending-item small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .62rem; padding: 1px 3px; }
.pending-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; z-index: 2; }
.uploader-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.lightbox { position: fixed; inset: 0; background: rgba(15,14,13,.88); z-index: 60; display: grid; place-content: center; justify-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.4); background: #fff; }
.lightbox p { color: #ddd; font-size: .85rem; margin-top: 8px; text-align: center; }
.lb-close { position: fixed; top: 14px; right: 16px; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; }
.rev-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.rev-list li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; gap: 10px; align-items: flex-start; }
.rev-list li.over { border-color: #f5c6bf; background: var(--err-soft); }
.rev-list .n { font-weight: 700; min-width: 2.2em; color: var(--muted); }
.rev-form { display: grid; gap: 8px; }

/* Rekap lebar & aksi massal */
.bulk-bar { position: sticky; top: 64px; z-index: 15; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.bulk-bar select, .bulk-bar input { min-height: 0; padding: 5px 8px; font-size: .85rem; width: auto; }
.bulk-bar .linkbtn { color: #ddd; }
.c-check { width: 34px; text-align: center; }
.c-check input { width: 17px; height: 17px; }
.sticky-col { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line-2); }
.table th.sticky-col { background: var(--soft); z-index: 2; }
.rekap td { font-size: .86rem; }
.rekap details.findings summary { cursor: pointer; color: var(--err); font-weight: 600; font-size: .8rem; }
.rekap details.findings ul { margin: 6px 0 0; padding-left: 16px; }
.todo-print .cta { color: var(--ok); }
.usage-card { display: grid; gap: 8px; }
.usage-card .meter { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.usage-card .meter span { display: block; height: 100%; background: var(--accent); }
.cleanup-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cleanup-steps > li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.cleanup-steps > li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* Absensi 24 jam */
input.time24 { width: 78px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--mono); }
input.time24.bad { border-color: var(--err); background: var(--err-soft); }
tr.row-error td { background: var(--err-soft) !important; }
tr.row-error td:first-child { box-shadow: 3px 0 0 var(--err) inset; }
.err-list { margin: 6px 0 0; padding-left: 18px; }

/* Pekerjaan harian: kartu per anggota */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.day-card { display: grid; gap: 12px; scroll-margin-top: 80px; }
.day-card:target { box-shadow: 0 0 0 2px var(--accent); }
.day-head { display: flex; align-items: center; gap: 10px; }
.day-head > div { flex: 1; min-width: 0; }
.day-head a { text-decoration: none; }
.day-sec { border-top: 1px solid var(--line-2); padding-top: 10px; }
.day-sec h4 { margin: 0 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.day-sec h4 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checks li form { display: flex; align-items: center; gap: 8px; }
.checks li.done span { color: var(--muted); text-decoration: line-through; }
.checks.mini { margin-top: 6px; gap: 2px; font-size: .84rem; }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--card); color: #fff; font-weight: 800; font-size: .8rem; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; line-height: 1; }
.tick:hover { border-color: var(--ok); }
li.done > form > .tick, li.done .tick { background: var(--ok); border-color: var(--ok); }
.tick.sm { width: 17px; height: 17px; border-radius: 5px; font-size: .68rem; }
.stock-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--ok-soft); }
.stock-row + .stock-row { margin-top: 6px; }
.stock-row.soon { background: var(--warn-soft); }
.stock-row.late { background: var(--err-soft); }
.stock-row.soon .small { color: var(--warn); font-weight: 600; }
.stock-row.late .small { color: var(--err); font-weight: 600; }
.stock-row.ok .small { color: var(--ok); }
.task-row { display: flex; gap: 10px; justify-content: space-between; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); border-left: 4px solid var(--line); }
.task-row + .task-row { margin-top: 6px; }
.task-row.late { border-left-color: var(--err); background: #fff7f6; }
.task-row.soon { border-left-color: var(--warn); background: #fffbf2; }
.task-row.is-done { opacity: .6; border-left-color: var(--ok); }
.task-row a { text-decoration: none; }
.task-main { min-width: 0; flex: 1; }
.task-side { display: grid; gap: 6px; justify-items: end; align-content: start; flex: none; }
.pg-sm { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; width: 92px; }
.pg-sm .progress { flex: 1; margin: 0; }
.due { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.due.late { color: var(--err); }
.due.soon { color: var(--warn); }
.due.ok { color: var(--ok); }
.order-acts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.order-acts li { display: grid; gap: 1px; }
.order-acts a { text-decoration: none; font-size: .88rem; }
.day-label { margin: 10px 0 4px; font-size: .8rem; color: var(--ink-2); }
.alert-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.alert-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); }
.alert-list li.late { background: var(--err-soft); }
.alert-list a { text-decoration: none; }
.tc-works .due { white-space: normal; }

/* Tugas */
.task-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.task-prog { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.task-prog .progress { flex: 1; margin: 0; height: 9px; }
.ts-aktif { background: var(--info-soft); color: var(--info); }
.ts-selesai { background: var(--ok-soft); color: var(--ok); }
.ts-batal { background: var(--grey-soft); color: var(--grey); }
.steps-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.steps-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.steps-list li:hover { background: var(--soft); }
.steps-list li form:first-child { display: flex; align-items: center; gap: 10px; }
.steps-list li.done span { text-decoration: line-through; color: var(--muted); }
.inline-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.skpi-mini { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: .86rem; }

/* Jobdesk */
.job-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.job-list > li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; }
.job-list > li > div:first-child { flex: 1; min-width: 0; }
.job-list > li.inactive { opacity: .55; }
.mini-hist summary { cursor: pointer; font-size: .78rem; color: var(--accent); margin-top: 4px; }
.mini-hist ul { margin: 4px 0 0; padding-left: 16px; font-size: .8rem; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presets .chip { cursor: pointer; font-family: inherit; }
.add-job > summary { list-style: none; display: inline-flex; }
.add-job > summary::-webkit-details-marker { display: none; }
.att-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.att-sum b { display: block; font-size: 1.2rem; }
.att-sum span { font-size: .7rem; color: var(--muted); }
.danger-card summary { cursor: pointer; }
.tenure { margin: 0; }
details.former > summary { cursor: pointer; font-weight: 650; color: var(--ink-2); padding: 8px 0; }
.week-block { margin: 10px 0 4px 6px; }
.week-block h4 { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.week-block ul { margin: 0; padding-left: 18px; }
.mini-grid { border-collapse: collapse; font-size: .8rem; }
.mini-grid th { font-weight: 600; color: var(--muted); padding: 2px 6px; }
.mini-grid td { padding: 2px 6px; text-align: center; }
.mini-grid td:first-child { text-align: left; padding-left: 0; }
.mini-grid td.ok { color: var(--ok); font-weight: 800; }
.mini-grid td.miss { color: var(--err); }

/* SKPI */
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-content: start; }
.batch-card { text-decoration: none; display: grid; gap: 8px; }
.batch-card:hover { border-color: var(--accent); color: inherit; }
.batch-card .mc-stats { grid-template-columns: repeat(4, 1fr); }
.bc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bc-head strong { font-size: 1.15rem; }
.skpi-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.skpi-tools summary { cursor: pointer; }
.linked-tasks { display: grid; gap: 6px; font-size: .86rem; }
.sk-belum { background: var(--grey-soft); color: var(--grey); }
.sk-remedial { background: var(--warn-soft); color: var(--warn); }
.sk-lulus { background: var(--ok-soft); color: var(--ok); }
.skpi-table td { font-size: .86rem; }
.skpi-table tr.st-remedial td { background: #fffbf2; }
.skpi-table tr.st-remedial td.sticky-col { background: #fffbf2; }

/* Data produk */
.prod-line { margin-bottom: 16px; }
.prod-table td.grp { background: var(--soft); border-right: 1px solid var(--line-2); }
.prod-table tr.grp-start td { border-top: 2px solid var(--line); }
.prod-table td.stale { color: var(--err); font-weight: 600; }
.ps-aktif { background: var(--ok-soft); color: var(--ok); }
.ps-revisi { background: var(--warn-soft); color: var(--warn); }
.ps-nonaktif { background: var(--grey-soft); color: var(--grey); }
.contents-editor { display: grid; gap: 6px; }
.crow { display: grid; grid-template-columns: 90px 1fr 28px; gap: 6px; align-items: center; }
.tabs { margin-bottom: 12px; flex-wrap: wrap; }
.tabs a.tab { text-decoration: none; }
.filters.flexf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters.flexf > select, .filters.flexf > input[type=search] { width: auto; min-width: 160px; }
.filters.flexf > input[type=search] { flex: 1; }
.filters.flexf label.check { margin: 0; }
.filters.flexf .chips { flex-basis: 100%; }

@media (max-width: 1080px) {
  .kpis.five { grid-template-columns: repeat(3, 1fr); }
  .skpi-tools { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .kpis.five { grid-template-columns: 1fr 1fr; }
  .day-grid { grid-template-columns: 1fr; }
  .bulk-bar { top: 58px; }
  .sticky-col { position: static; box-shadow: none; }
  .att-sum { grid-template-columns: repeat(3, 1fr); }
  .task-row { flex-direction: column; }
  .task-side { justify-items: start; grid-auto-flow: column; align-items: center; }
  .filters.flexf > *, .filters.flexf > select, .filters.flexf > input[type=search] { width: 100%; }
  .prod-table { min-width: 760px; }
}
@media print {
  .topbar, .subnav, .actions, .bulk-bar, .c-check { display: none !important; }
}
.tc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; line-height: 1.4; }
.tc-list a { text-decoration: none; }
.tc-list a:hover { text-decoration: underline; }
.tc-list .due { white-space: normal; }
.skpi-table code { white-space: nowrap; word-break: normal; }
.timeline li > span:first-child { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.timeline li { font-size: .86rem; }
.timeline li form.inline { display: inline; }
.pass-wrap { display: flex; gap: 8px; align-items: center; }
.pass-wrap input { flex: 1; }
.aspect-hint { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--info-soft); color: var(--ink-2); font-size: .8rem; line-height: 1.45; }
.aspect-hint ol { margin: 4px 0 0; padding-left: 18px; }
.aspect-hint.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.ck-belum { background: var(--warn-soft); color: var(--warn); }
.ck-aman { background: var(--ok-soft); color: var(--ok); }
.ck-catatan { background: var(--violet-soft); color: var(--violet); }
.check-panel { border-left: 4px solid var(--accent); }
.check-panel.done { border-left-color: var(--ok); }
.check-panel .actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hold-box { border-left: 4px solid var(--warn); }
.pay-belum { background: var(--err-soft); color: var(--err); }
.pay-dp { background: var(--warn-soft); color: var(--warn); }
.pay-lunas { background: var(--ok-soft); color: var(--ok); }

/* ================= Revisi v6 ================= */
/* Jendela konfirmasi */
.cdlg-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(29,27,25,.0); display: grid; place-items: center; padding: 16px; transition: background .15s; }
.cdlg-wrap.show { background: rgba(29,27,25,.45); }
.cdlg { background: var(--card); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.3); padding: 22px 22px 18px; width: min(420px, 100%); text-align: center; transform: translateY(8px) scale(.98); opacity: 0; transition: transform .15s, opacity .15s; }
.cdlg-wrap.show .cdlg { transform: none; opacity: 1; }
.cdlg-ic { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; background: var(--accent-soft); color: var(--accent); }
.cdlg-ic.danger { background: var(--err-soft); color: var(--err); }
.cdlg h3 { margin: 0 0 6px; font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--ink); line-height: 1.35; }
.cdlg p { color: var(--ink-2); font-size: .9rem; margin: 0 0 4px; }
.cdlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.cdlg .cdlg-actions { justify-content: center; }
.cdlg .cdlg-actions .btn { min-width: 120px; }
.btn.danger-btn { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger-btn:hover { filter: brightness(.95); color: #fff; }

/* Aksi massal: lebih jelas */
.bulk-bar { gap: 12px; padding: 10px 12px; }
.bulk-bar .bulk-count { font-weight: 600; padding-right: 4px; }
.bulk-bar .bulk-date { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: #e9e4dc; font-weight: 600; margin: 0; }
.bulk-bar select, .bulk-bar input { background: #fff; color: var(--ink); border: 0; border-radius: 8px; height: 32px; padding: 4px 8px; font-size: .85rem; }
.bulk-bar select option { color: var(--ink); background: #fff; }
.bulk-bar .btn { height: 32px; }
.bulk-bar .bulk-btn { background: #fff; color: var(--ink); border-color: #fff; font-weight: 700; }
.bulk-bar .bulk-btn:hover { background: var(--accent-soft); color: var(--ink); }
.bulk-bar .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.bulk-more { position: relative; }
.bulk-more summary { cursor: pointer; font-size: .8rem; color: #e9e4dc; text-decoration: underline; list-style: none; }
.bulk-more summary::-webkit-details-marker { display: none; }
.bulk-more > div { position: absolute; top: 28px; left: 0; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 12px; display: grid; gap: 6px; z-index: 5; white-space: nowrap; }
.bulk-more .linkbtn { color: var(--ink); }
.bulk-bar .bulk-clear { margin-left: auto; color: #e9e4dc; }

/* Tandai dicetak + bukti approval */
.done-pop .pop-body { width: min(460px, calc(100vw - 32px)); }
.approval-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--soft); }
.approval-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.approval-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.small-zone { padding: 12px; font-size: .85rem; }

/* Kartu harian */
.add-item { display: flex; gap: 6px; margin-top: 6px; }
.add-item input { height: 28px; padding: 3px 8px; font-size: .82rem; }
.pg-form select { height: 28px; padding: 2px 6px; font-size: .8rem; width: 78px; }
.cal-pop { width: min(380px, calc(100vw - 32px)); }
.cal-form { display: grid; gap: 8px; }
.cal-form + .cal-form { border-top: 1px solid var(--line-2); padding-top: 10px; }
.cal-title { font-weight: 700; font-size: .9rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { font-size: .68rem; color: var(--muted); text-align: center; font-weight: 700; }
.cal-d { position: relative; cursor: pointer; margin: 0; }
.cal-d input { position: absolute; opacity: 0; pointer-events: none; }
.cal-d span { display: grid; place-items: center; height: 34px; border-radius: 8px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; background: var(--card); }
.cal-d.miss span { border-color: #f1c8c2; color: var(--err); }
.cal-d input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.cal-d.today span { box-shadow: 0 0 0 2px var(--accent) inset; }
.cal-d input:focus-visible + span { outline: 2px solid var(--accent); }

/* Absensi & lembur */
.att-help { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.att-help p { margin: 0; flex: 1; }
.ot-cell { min-width: 150px; }
.ot-val { display: inline-block; font-weight: 700; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.ot-cell.has-ot .ot-val { color: var(--violet); }
.ot-note { font-size: .8rem; height: 30px; }
.ot-text { color: var(--violet); font-weight: 700; }
.ot-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); margin-left: 2px; vertical-align: top; }

/* Kelola akun */
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 16px; margin-bottom: 16px; }
.role-legend > div { display: grid; gap: 2px; justify-items: start; }
.role-magang { background: var(--violet-soft); color: var(--violet); }
.role-leader_ops { background: var(--info-soft); color: var(--info); }
.role-holding { background: var(--warn-soft); color: var(--warn); }
.role-admin { background: var(--ink); color: #fff; }

/* SKPI */
.skpi-tools.single { grid-template-columns: 1fr; }

/* Data produk ala spreadsheet */
.prod-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.prod-top .tabs { margin: 0; }
.prod-search input { width: 280px; max-width: 100%; }
.prod-sheet { margin-bottom: 18px; overflow: hidden; }
.sheet-title { display: flex; justify-content: center; align-items: center; position: relative; background: #fbe08a; border-bottom: 1px solid #e6c65c; padding: 8px 12px; }
.sheet-title h2 { margin: 0; font-size: 1rem; color: #3a2f00; }
.sheet-actions { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
.table.sheet th { background: #fff3c4; color: #4a3d00; text-align: center; border-bottom: 1px solid #e6c65c; }
.table.sheet td { text-align: center; vertical-align: middle; border: 1px solid var(--line-2); font-size: .86rem; padding: 6px 10px; }
.table.sheet td.grp { background: var(--soft); font-weight: 600; }
.table.sheet td.grp-m { background: #ecebe7; }
.table.sheet td.total { font-weight: 600; }
.table.sheet tr.grp-start td { border-top: 2px solid var(--line); }
.table.sheet .c-vol { width: 70px; }
.table.sheet .cell-actions { text-align: right; }
.cell-edit { margin-left: 4px; text-decoration: none; opacity: .5; }
.cell-edit:hover { opacity: 1; }
.add-prod { width: min(480px, calc(100vw - 32px)); }
.choice-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: .85rem; background: var(--card); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fill-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -4px; }
.fill-chips .chip { cursor: pointer; font-size: .75rem; padding: 2px 10px; font-family: inherit; }
@media (max-width: 680px) {
  .sheet-title { justify-content: flex-start; }
  .bulk-bar .bulk-clear { margin-left: 0; }
}

/* =====================================================================
   v7 — Tampilan baru: biru, menu samping, gaya bersih
   (aturan di bawah menimpa aturan lama di atas)
   ===================================================================== */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #8a94a6;
  --line: #e4e8f0;
  --line-2: #eef1f6;
  --soft: #f8f9fc;

  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --blue-soft: #eaf1ff;
  --sky: #0ea5e9;
  --sky-soft: #e6f6fd;
  --qc: var(--blue);   --qc-soft: var(--blue-soft);
  --rnd: var(--blue);  --rnd-soft: var(--blue-soft);
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);

  --ok: #0f8a5f;    --ok-soft: #e5f6ee;
  --warn: #b45309;  --warn-soft: #fff3df;
  --err: #d92d20;   --err-soft: #fdecea;
  --info: #2563eb;  --info-soft: #eaf1ff;
  --violet: #6d4fd8; --violet-soft: #f0ecff;
  --grey: #667085;  --grey-soft: #f1f3f7;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .03);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);
  --side-w: 256px;
  --top-h: 64px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body.tr-rnd { --accent: var(--blue); --accent-soft: var(--blue-soft); }
body { font: 14.5px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a:hover { color: var(--accent); }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .74rem; letter-spacing: .06em; font-weight: 700; }
code { background: var(--soft); border-color: var(--line); border-radius: 6px; }
.eyebrow { color: var(--accent); font-size: .72rem; letter-spacing: .09em; }
.ic { flex: none; display: block; }

/* ---------- Kerangka: menu samping + bar atas ---------- */
body.has-shell { padding-left: var(--side-w); }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 14px; z-index: 50; overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 18px; }
.side .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); min-width: 0; }
.side .brand:hover { color: var(--ink); }
.logo { width: 34px; height: 34px; border-radius: 10px; transform: none; box-shadow: none; position: relative; background: linear-gradient(140deg, #3b82f6, #1d4ed8); flex: none; }
.logo::before, .logo::after { content: ""; position: absolute; background: #fff; border-radius: 2px; }
.logo::before { left: 9px; top: 9px; width: 6px; height: 16px; }
.logo::after { left: 18px; top: 9px; width: 7px; height: 7px; opacity: .75; }
.tr-home .logo { background: linear-gradient(140deg, #3b82f6, #1d4ed8); }
.side .brand-text b { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.side .brand-text small { color: var(--muted); font-size: .74rem; }
.side-x { display: none; background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.side-cta { margin: 0 4px 14px; height: 44px; border-radius: 12px; font-size: .92rem; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.side-nav { display: grid; gap: 2px; align-content: start; flex: 1; }
.side-label { margin: 14px 10px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-label:first-child { margin-top: 0; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; position: relative; background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.side-nav a .ic, .side-foot .ic { color: #98a2b3; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--soft); color: var(--ink); }
.side-nav a:hover .ic { color: var(--ink-2); }
.side-nav a.on { background: var(--blue-soft); color: var(--blue); }
.side-nav a.on .ic { color: var(--blue); }
.side-nav a.trk.cur { color: var(--ink); }
.side-nav a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: auto; }
.side-foot { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 12px; display: grid; gap: 2px; }
.side-foot form { margin: 0; }
.side-scrim { display: none; }

.topbar { position: sticky; top: 0; z-index: 30; background: rgba(244, 246, 251, .85); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); color: var(--ink); border-bottom: 1px solid transparent; }
.topbar-in { height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 28px; max-width: none; }
.menu-btn { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px; cursor: pointer; color: var(--ink); }
.crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumb span::after { content: "/"; margin-left: 8px; color: #c5cbd6; }
.crumb b { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.usermenu summary { padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); gap: 9px; }
.usermenu summary:hover { background: var(--card); border-color: #cfd6e2; }
.usermenu summary .ic { color: var(--muted); }
.who { font-size: .84rem; font-weight: 700; color: var(--ink); }
.who small { color: var(--muted); font-weight: 500; font-size: .72rem; }
.avatar { background: linear-gradient(140deg, #60a5fa, #2563eb); width: 32px; height: 32px; font-size: .85rem; }
.menu { border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; border-color: var(--line); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.menu a .ic, .menu button .ic { color: var(--muted); }
.menu a:hover, .menu button:hover { background: var(--soft); color: var(--ink); }

.wrap { max-width: 1280px; padding: 0 28px; }
.main { padding-top: 10px; padding-bottom: 72px; }
body.is-wide main.wrap { max-width: none; }
.subnav { display: none; }

/* ---------- Komponen dasar ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flush { padding: 0; }
.btn { height: 40px; padding: 0 16px; border-radius: 10px; border-color: var(--line); font-weight: 700; font-size: .88rem; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.btn:hover { border-color: #cdd4e0; background: var(--soft); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(37,99,235,.18); }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); filter: none; }
.btn.ghost { background: var(--card); }
.btn.small { height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 9px; }
.btn.tiny { height: 28px; padding: 0 10px; font-size: .76rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn .ic { margin-left: -2px; }
.linkbtn { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.linkbtn:hover { color: var(--accent); text-decoration: underline; }
.linkbtn.danger, .danger { color: var(--err); }

input, select, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select { min-height: 42px; }
input::placeholder, textarea::placeholder { color: #a7afbd; }
input:hover, select:hover, textarea:hover { border-color: #cdd4e0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
select[multiple] { background-image: none; padding-right: 12px; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
label { font-size: .84rem; font-weight: 700; color: var(--ink-2); gap: 6px; }
label.check, label.inline { font-weight: 600; }

.flash { border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: .9rem; }

.pagehead { margin: 8px 0 22px; align-items: flex-end; }
.pagehead h1 { margin-top: 2px; }
.pagehead .muted { margin: 2px 0 0; }
.section-head h2 { font-size: 1rem; }
.form-foot { background: var(--soft); border-top-color: var(--line-2); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Label status (pill lembut) ---------- */
.badge { border-radius: 8px; padding: 3px 10px; font-size: .74rem; font-weight: 700; line-height: 1.5; }
.score-pill { border-radius: 8px; padding: 2px 9px; }
.role-admin { background: var(--ink); color: #fff; }
.role-desainer { background: var(--blue-soft); color: var(--blue); }
.pr-done { background: var(--ok); }
.l-ng { background: var(--blue); }
.l-spk { background: #c7d2e5; }

/* ---------- Tabel ---------- */
.table { font-size: .88rem; }
.table th { background: var(--card); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfe; }
.table.compact td, .table.compact th { padding: 9px 12px; }
.card.flush > .table th:first-child, .card.flush .scroll-x > .table th:first-child { padding-left: 22px; }
.card.flush > .table td:first-child, .card.flush .scroll-x > .table td:first-child { padding-left: 22px; }
.rekap td, .qc-table td { vertical-align: top; }
.code-link { color: var(--blue); }
.sticky-col, .sticky { background: var(--card); }
th.sticky, .table th.sticky-col { background: var(--card); }

/* ---------- Tab bergaris bawah & chip ---------- */
.tabs { display: flex; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 4px; flex-wrap: wrap; }
.tabs a { position: relative; padding: 10px 14px 12px; border-radius: 0; color: var(--muted); font-weight: 700; font-size: .88rem; }
.tabs a:hover { color: var(--ink); background: none; }
.tabs a.on { background: none; color: var(--blue); }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--blue); }
.tabs a span { display: inline-block; min-width: 20px; text-align: center; font-size: .7rem; padding: 1px 6px; border-radius: 999px; background: var(--grey-soft); color: var(--grey); opacity: 1; margin-left: 6px; }
.tabs a.on span { background: var(--blue-soft); color: var(--blue); }
.tabs.inline { margin-bottom: 16px; }
.chip { border-radius: 999px; border: 1px solid var(--line); background: var(--card); padding: 6px 14px; font-weight: 700; font-size: .8rem; color: var(--ink-2); }
.chip:hover { border-color: #cdd4e0; color: var(--ink); }
.chip.on { background: var(--blue-soft); border-color: #bcd1fb; color: var(--blue); }
.filters { padding: 14px 16px; }
.choice span { border-radius: 10px; padding: 8px 14px; border-width: 1px; }
.choice input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

/* ---------- Statistik ---------- */
.kpi { border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-color: var(--line); gap: 4px; position: relative; }
.kpi span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.kpi b { font-size: 1.85rem; font-weight: 800; }
a.kpi:hover { border-color: #bcd1fb; box-shadow: 0 6px 18px rgba(37,99,235,.08); }
.kpi-err, .kpi.alert { background: var(--card); border-color: #f6c9c4; box-shadow: inset 4px 0 0 var(--err), var(--shadow); }
.kpi-warn { background: var(--card); border-color: #f5dbb0; box-shadow: inset 4px 0 0 #f59e0b, var(--shadow); }
.kpi-warn b { color: var(--warn); }
.status-strip { border-radius: var(--radius); box-shadow: var(--shadow); }
.status-strip a { padding: 16px 20px; }
.status-strip b { font-size: 1.55rem; font-weight: 800; }
.status-strip a.hot { background: var(--blue-soft); }
.status-strip a.hot b { color: var(--blue); }
.stat { border-radius: var(--radius); box-shadow: var(--shadow); }
.progress { height: 6px; background: #edf0f5; }
.progress span { background: #f59e0b; }
.progress.mid span { background: var(--blue); }
.hbars .bar i, .mini-bars .bar i { background: var(--blue); }
.hbars .bar, .mini-bars .bar { background: #edf0f5; height: 8px; }
.trend-col.on { background: var(--blue-soft); }

/* ---------- Pilih tracker ---------- */
.portal { max-width: 980px; }
.portal-card { border-radius: 20px; padding: 28px; }
.portal-card::before { height: 0; }
.pc-qc { --c: var(--blue); --cs: var(--blue-soft); }
.pc-rnd { --c: var(--sky); --cs: var(--sky-soft); }
.pc-icon { border-radius: 14px; }

/* ---------- Login belah dua ---------- */
body.no-shell .main { max-width: none; padding: 0; }
.auth { min-height: 100vh; max-width: none; margin: 0; display: grid; grid-template-columns: minmax(380px, 1fr) 1.15fr; gap: 0; align-items: stretch; }
.auth-form { display: grid; align-content: center; justify-items: center; padding: 48px 24px; background: var(--card); }
.auth-box { width: min(380px, 100%); }
.auth-box .logo { width: 40px; height: 40px; margin-bottom: 28px; }
.auth-box h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; display: block; }
.auth-box .lead { color: var(--muted); margin-bottom: 26px; }
.auth-box .stack { gap: 16px; }
.field-ic { position: relative; display: block; }
.field-ic > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.field-ic > input { padding-left: 42px; height: 46px; }
.field-ic .pass-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.field-ic .pass-toggle:hover { color: var(--blue); background: var(--blue-soft); }
.auth-box .btn.primary { height: 48px; font-size: .95rem; border-radius: 12px; margin-top: 4px; }
.auth-box .foot { margin-top: 26px; font-size: .8rem; color: var(--muted); text-align: center; }
.auth-art { position: relative; overflow: hidden; background: linear-gradient(150deg, #3b82f6 0%, #2563eb 45%, #1e40af 100%); color: #fff; display: grid; align-content: center; justify-items: center; padding: 48px 40px; }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.auth-art::before { width: 520px; height: 520px; right: -160px; top: -140px; }
.auth-art::after { width: 380px; height: 380px; left: -120px; bottom: -150px; }
.art-stage { position: relative; width: min(520px, 100%); height: 330px; z-index: 1; }
.art-panel { position: absolute; inset: 40px 30px 20px 50px; background: #fff; border-radius: 16px; box-shadow: 0 30px 60px rgba(15, 23, 42, .25); padding: 20px 20px 16px 120px; color: var(--ink); }
.art-panel::before { content: ""; position: absolute; left: 16px; top: 18px; bottom: 18px; width: 84px; border-radius: 10px; background: linear-gradient(var(--blue) 0 10px, transparent 10px 22px, #eef1f6 22px 30px, transparent 30px 40px, #eef1f6 40px 48px, transparent 48px 58px, #eef1f6 58px 66px, transparent 66px) top/100% 100% no-repeat, #f8f9fc; }
.art-panel h4 { margin: 0 0 12px; font-size: .9rem; }
.art-row { display: grid; grid-template-columns: 18px 1fr 54px 50px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #eef1f6; font-size: .68rem; color: var(--ink-2); }
.art-row i { width: 18px; height: 18px; border-radius: 6px; background: var(--blue-soft); }
.art-row s { text-decoration: none; height: 7px; border-radius: 4px; background: #eef1f6; display: block; }
.art-row em { font-style: normal; font-weight: 700; text-align: center; border-radius: 6px; padding: 2px 0; font-size: .62rem; }
.art-row em.ok { background: var(--ok-soft); color: var(--ok); }
.art-row em.wa { background: var(--warn-soft); color: var(--warn); }
.art-row em.bl { background: var(--blue-soft); color: var(--blue); }
.art-float { position: absolute; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, .22); padding: 12px 14px; font-size: .72rem; }
.art-chart { right: 0; top: 0; width: 150px; }
.art-chart b { display: block; margin-bottom: 8px; }
.art-chart .bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.art-chart .bars i { flex: 1; border-radius: 3px 3px 0 0; background: var(--blue); }
.art-chart .bars i:nth-child(odd) { background: #93b4f8; }
.art-tag { left: 0; bottom: 34px; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.art-tag span { width: 30px; height: 30px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: .9rem; }
.art-copy { position: relative; z-index: 1; text-align: center; margin-top: 34px; max-width: 420px; }
.art-copy h3 { color: #fff; text-transform: none; letter-spacing: -.01em; font-size: 1.4rem; font-weight: 800; margin: 0 0 8px; }
.art-copy p { color: rgba(255,255,255,.8); margin: 0; font-size: .92rem; }
.art-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.art-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.4); }
.art-dots i:first-child { width: 22px; background: #fff; }

/* ---------- Kanban Ide & Proyek ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kb-col { background: #eef1f7; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; transition: background .15s, box-shadow .15s; }
.kb-col.over { background: var(--blue-soft); box-shadow: inset 0 0 0 2px #9dbcf8; }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.kb-head h2 { margin: 0; font-size: .92rem; }
.kb-ic { width: 26px; height: 26px; border-radius: 8px; background: #fff; display: grid; place-items: center; font-size: .8rem; box-shadow: var(--shadow); }
.kb-count { margin-left: auto; font-size: .74rem; font-weight: 800; color: var(--muted); background: #fff; border-radius: 999px; padding: 1px 9px; }
.kb-berjalan .kb-ic { color: var(--blue); }
.kb-selesai .kb-ic { color: var(--ok); }
.kb-tertunda .kb-ic { color: var(--warn); }
.kb-list { display: grid; gap: 10px; align-content: start; min-height: 40px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow); cursor: default; scroll-margin-top: 90px; }
.kb-card[draggable="true"] { cursor: grab; }
.kb-card:hover { border-color: #cdd4e0; }
.kb-card.dragging { opacity: .45; transform: rotate(1.5deg); }
.kb-card.moving { opacity: .6; pointer-events: none; }
.kb-card:target { box-shadow: 0 0 0 2px var(--blue); }
.kb-card.late { box-shadow: inset 3px 0 0 var(--err), var(--shadow); }
.kb-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--grey-soft); color: var(--grey); }
.tag-idea { background: #fff4d6; color: #a15c00; }
.tag-proj { background: var(--blue-soft); color: var(--blue); }
.kb-tags .badge { font-size: .68rem; padding: 2px 8px; border-radius: 6px; }
.kb-title { margin: 0; font-size: .92rem; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; line-height: 1.35; }
.kb-title a { text-decoration: none; }
.kb-title a:hover { color: var(--blue); }
.kb-desc { margin: 0; color: var(--ink-2); font-size: .8rem; line-height: 1.45; }
.kb-prog { display: flex; align-items: center; gap: 8px; }
.kb-prog .progress { flex: 1; margin: 0; }
.kb-prog b { font-size: .74rem; }
.kb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line-2); }
.kb-due { font-weight: 700; color: var(--ink-2); }
.kb-due.late { color: var(--err); }
.kb-due.soon { color: var(--warn); }
.kb-tasks { margin-left: auto; text-decoration: none; font-weight: 700; }
.av-stack { display: inline-flex; }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff; background: linear-gradient(140deg, #60a5fa, #2563eb); border: 2px solid #fff; margin-left: -6px; }
.av:first-child { margin-left: 0; }
.av:nth-child(2) { background: linear-gradient(140deg, #34d399, #0f8a5f); }
.av:nth-child(3) { background: linear-gradient(140deg, #fbbf24, #d97706); }
.av:nth-child(4) { background: linear-gradient(140deg, #a78bfa, #6d4fd8); }
.av.more { background: var(--grey-soft); color: var(--grey); }
.kb-move select { min-height: 0; height: 30px; font-size: .76rem; padding: 2px 30px 2px 10px; border-radius: 8px; color: var(--ink-2); background-color: var(--soft); }
.kb-empty { margin: 0; text-align: center; color: var(--muted); font-size: .8rem; padding: 18px 0; border: 1.5px dashed #d5dbe6; border-radius: 12px; }
.kb-add { display: block; text-align: center; padding: 9px; border: 1.5px dashed #cfd6e2; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .82rem; }
.kb-add:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.kb-ditolak, .kb-dibatalkan { opacity: .85; }
@media (hover: hover) and (min-width: 821px) {
  [data-kanban="1"] .kb-move { display: none; }
  [data-kanban="1"] .kb-card:hover .kb-move, [data-kanban="1"] .kb-card:focus-within .kb-move { display: block; }
}

/* ---------- Lain-lain ---------- */
.bulk-bar { background: #101828; border-radius: 14px; top: calc(var(--top-h) + 6px); }
.pop-body, .cdlg { border-radius: 18px; }
.pop[open] > summary::before, .cdlg-wrap.show { background: rgba(16, 24, 40, .4); }
.steps li { background: var(--card); }
.steps li.now { background: var(--blue-soft); color: var(--blue); }
.steps li.now span { background: var(--blue); }
.timeline li:first-child::before { background: var(--blue); }
.todo { border-left: 0; box-shadow: inset 4px 0 0 var(--blue), var(--shadow); }
.project { border-top: 0; box-shadow: inset 0 4px 0 var(--blue), var(--shadow); }
.project.late { box-shadow: inset 0 4px 0 var(--err), var(--shadow); }
.day-card:target { box-shadow: 0 0 0 2px var(--blue); }
.att-grid th.today, .day-h.today { background: var(--blue); }
.wcount { background: var(--blue); }
.cal-d.today span { box-shadow: 0 0 0 2px var(--blue) inset; }
.sheet-title { background: #fde68a; }
.dropzone { border-radius: 14px; border-color: #d5dbe6; background: var(--soft); }
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* ---------- Responsif ---------- */
@media (max-width: 1080px) {
  :root { --side-w: 228px; }
  .wrap, .topbar-in { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 900px) {
  body.has-shell { padding-left: 0; }
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; width: 280px; }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .4); z-index: 45; }
  body.side-open { overflow: hidden; }
  .side-x { display: block; }
  .menu-btn { display: grid; place-items: center; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 680px) {
  .wrap, .topbar-in { padding-left: 16px; padding-right: 16px; }
  .topbar-in { gap: 10px; }
  .crumb span { display: none; }
  .usermenu summary { padding: 3px; }
  .usermenu summary > .ic { display: none; }
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; }
  .kanban { grid-auto-columns: 84%; scroll-snap-type: x mandatory; }
  .kb-col { scroll-snap-align: start; }
  .table:not(.att-grid):not(.compact) tr { padding: 12px 16px; }
  .card.flush > .table td:first-child, .card.flush .scroll-x > .table td:first-child { padding-left: 0; }
  .auth-form { align-content: start; padding-top: 12vh; }
}
@media print {
  body.has-shell { padding-left: 0; }
  .side, .side-scrim, .topbar { display: none !important; }
}
.auth-box .logo { display: block; }
code { word-break: normal; overflow-wrap: anywhere; }
td > code, td strong + code, .badge code { white-space: nowrap; overflow-wrap: normal; }
.kb-ic { color: var(--muted); }
.kb-ide .kb-ic { color: #d97706; }
.kb-due, .kb-tasks { display: inline-flex; align-items: center; gap: 4px; }
.add-item input, .pg-form select, .ot-note, .kind-form select, .bulk-bar input, .bulk-bar select, .kb-move select, .aspects input, .aspects select, .qc-table textarea, .quick-work select, input.time24 { min-height: 0 !important; }
.add-item input { height: 32px; border-radius: 8px; }
.add-item .btn { height: 32px; }
.pg-form select { height: 30px; padding-right: 26px; background-position: right 6px center; }
.kind-form select { padding-right: 24px; background-position: right 4px center; }
input.time24 { height: 38px; }
fieldset.card > legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-size: 1.02rem; font-weight: 700; color: var(--ink); }
fieldset.card > legend + * { clear: both; }
.paste-box { background: linear-gradient(180deg, var(--blue-soft), var(--card) 140px); }
@media (max-width: 680px) {
  .table:not(.att-grid):not(.compact) td { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
  .table:not(.att-grid):not(.compact) td[data-l]::before { flex: 0 0 88px; }
  .table:not(.att-grid):not(.compact) td[data-l] > div, .table:not(.att-grid):not(.compact) td[data-l] > ul, .table:not(.att-grid):not(.compact) td[data-l] > details { flex: 1 1 calc(100% - 100px); }
}
.inline-date { display: grid; gap: 4px; }
.qc-date { gap: 6px; }
.qc-date input { width: auto; min-height: 0 !important; height: 34px; padding: 4px 8px; }

/* =====================================================================
   v8 — Menu atas dua lapis (bar biru tua + bar menu putih)
   ===================================================================== */
body.has-nav { padding-left: 0; }
.appbar { background: #0f2a5c; color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.appbar-in { max-width: 1440px; margin: 0 auto; padding: 0 28px; height: 60px; display: flex; align-items: center; gap: 16px; }
body.is-wide .appbar-in, body.is-wide .menubar-in { max-width: none; }
.appbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.appbar .brand:hover { color: #fff; }
.appbar .logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(140deg, #60a5fa, #2563eb); }
.appbar .logo::before { left: 8px; top: 8px; width: 6px; height: 16px; }
.appbar .logo::after { left: 17px; top: 8px; width: 7px; height: 7px; }
.appbar .brand-text b { font-size: .98rem; font-weight: 800; }
.appbar .brand-text small { color: #9fb5dc; font-size: .7rem; }
.trk-switch, .trk-name { position: relative; margin-left: 6px; }
.trk-switch summary, .trk-name { list-style: none; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: #e6eeff; font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.trk-name { cursor: default; }
.trk-switch summary::-webkit-details-marker { display: none; }
.trk-switch summary:hover { background: rgba(255,255,255,.14); }
.trk-switch .ic, .trk-name .ic { color: #9fc0ff; }
.trk-switch .menu { left: 0; right: auto; }
.trk-switch .menu a.cur { color: var(--blue); }
.trk-switch .menu .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: auto; }
.appbar-link { display: flex; align-items: center; gap: 7px; color: #cfdcf5; text-decoration: none; font-weight: 700; font-size: .84rem; padding: 7px 12px; border-radius: 10px; }
.appbar-link:hover, .appbar-link.on { background: rgba(255,255,255,.1); color: #fff; }
.appbar .usermenu summary { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.appbar .usermenu summary:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }
.appbar .who { color: #fff; }
.appbar .who small { color: #9fb5dc; }
.appbar .usermenu summary .ic { color: #9fb5dc; }
.appbar .menu { color: var(--ink); }

.menubar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 60px; z-index: 35; box-shadow: 0 2px 10px rgba(16,24,40,.04); }
.menubar-in { max-width: 1440px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 16px; min-height: 54px; }
.menu-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; align-self: stretch; }
.menu-links::-webkit-scrollbar { display: none; }
.menu-links a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.menu-links a .ic { color: #98a2b3; }
.menu-links a:hover { color: var(--ink); background: var(--soft); }
.menu-links a.on { color: var(--blue); }
.menu-links a.on .ic { color: var(--blue); }
.menu-links a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); }
.menu-actions { display: flex; gap: 8px; flex: none; }
.menu-actions .btn { height: 38px; }
.btn.outline { background: var(--card); color: var(--blue); border: 1.5px solid var(--blue); box-shadow: none; }
.btn.outline:hover { background: var(--blue-soft); color: var(--blue-d); border-color: var(--blue-d); }
.readonly-bar, .remind-bar { padding: 10px 28px; font-size: .86rem; font-weight: 600; text-align: center; }
.readonly-bar { background: #fff4e0; color: #8a4b00; border-bottom: 1px solid #f5d9a6; }
.remind-bar { background: #fdecea; color: #a1281d; border-bottom: 1px solid #f6c9c4; }
.remind-bar a { color: inherit; }
.main { padding-top: 24px; }
.wrap { max-width: 1440px; }
body.is-readonly .bulk-bar, body.is-readonly .c-check { display: none !important; }

/* Akses tim */
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.access-card { display: grid; gap: 10px; box-shadow: inset 4px 0 0 #cbd5e1, var(--shadow); }
.access-card.is-open { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.access-card.is-locked { box-shadow: inset 4px 0 0 #f59e0b, var(--shadow); }
.access-card header { display: flex; align-items: center; gap: 12px; }
.access-card header > div { flex: 1; min-width: 0; }
.acc-state { font-size: .78rem; font-weight: 800; white-space: nowrap; }
.acc-reason { margin: 0; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Absensi */
.late-text { color: #c2410c; font-weight: 700; }
.late-val { display: block; font-size: .74rem; font-weight: 700; color: #c2410c; margin-top: 3px; min-height: 1em; }
.late-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ea580c; margin-left: 2px; vertical-align: top; }
.exp-in { background: var(--soft); }
.wide-pop { width: min(560px, calc(100vw - 32px)); }
.wh-row { display: grid; grid-template-columns: 110px 120px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.wh-row .w-num { width: 60px !important; min-height: 0 !important; height: 34px; }
.wh-days { display: flex; flex-wrap: wrap; gap: 4px; }
.wh-days .choice span { padding: 4px 8px; font-size: .74rem; border-radius: 7px; }
@media (max-width: 680px) { .wh-row { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .appbar-in, .menubar-in { padding: 0 16px; }
  .brand-text small { display: none; }
  .appbar-link span, .trk-switch summary span, .trk-name span { display: none; }
  .menubar-in { flex-wrap: wrap; gap: 0; }
  .menu-links { flex-basis: 100%; min-height: 50px; }
  .menu-actions { flex-basis: 100%; padding: 8px 0 10px; }
  .menu-actions .btn { flex: 1; }
}
@media (max-width: 680px) {
  .appbar .who { display: none; }
  .readonly-bar, .remind-bar { padding: 8px 16px; text-align: left; }
}
@media print { .appbar, .menubar, .readonly-bar, .remind-bar { display: none !important; } }
.bulk-bar { top: 122px; }
@media (max-width: 900px) { .menubar { position: static; } .bulk-bar { top: 66px; } }
.role-direktur { background: #0f2a5c; color: #fff; }
.table.sheet th.upd-grp { border-bottom: 1px solid #e6c65c; }
.table.sheet tr.sub-head th { font-size: .66rem; padding: 5px 8px; background: #fff8dc; }
.table.sheet td.upd-old + td.upd-new { border-right: 2px solid #f3e3a6; }

/* Laporan harian */
.wa-card { margin-bottom: 16px; }
.wa-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.wa-text { font-family: var(--mono); font-size: .8rem; line-height: 1.5; background: #f7faf7; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; margin-bottom: 16px; }
.report-card { display: grid; gap: 10px; }
.rep-att { display: flex; align-items: center; gap: 6px; }
.rep-flags { margin: 0; }
.rep-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rep-list li { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; align-items: baseline; }
.rep-list li > span { min-width: 0; }
.rep-list li > b { white-space: nowrap; font-size: .82rem; }
.rep-stats { margin: 0 0 6px; color: var(--ink-2); }
@media (max-width: 900px) { .wa-grid { grid-template-columns: 1fr; } }

/* SKPI: skor & nilai kuis */
.score-cell { min-width: 170px; }
.score-meter { display: grid; gap: 4px; }
.score-meter b { font-size: .95rem; }
.score-meter.pass b { color: var(--ok); }
.score-meter.fail b { color: var(--warn); }
.sm-track { position: relative; display: block; height: 6px; border-radius: 999px; background: #e9edf4; margin: 2px 0; }
.sm-pass { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--ink-2); border-radius: 1px; }
.sm-dot { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue); }
.score-meter.fail .sm-dot { background: #f59e0b; box-shadow: 0 0 0 1px #f59e0b; }
.quiz-pop { width: min(520px, calc(100vw - 32px)); }
.quiz-list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 10px; font-size: .82rem; }
.quiz-list > div { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line-2); }
.quiz-list > div:last-child { border-bottom: 0; }
.quiz-total { font-weight: 800; }
.hint { text-transform: none; letter-spacing: 0; }
.rep-list .sub { display: block; }
.rep-flags span + span { margin-left: 8px; }

/* =====================================================================
   v8.1 — kembali ke menu samping (v7); pindah tracker lewat tombol di bar atas
   ===================================================================== */
body.no-side { padding-left: 0; }
.topbar-in { gap: 12px; }
.topbar .trk-switch, .topbar .trk-name { margin-left: 0; }
.topbar .trk-switch summary, .topbar .trk-name { background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.topbar .trk-switch summary:hover { background: var(--card); border-color: #cdd4e0; }
.topbar .trk-switch .ic, .topbar .trk-name .ic { color: var(--blue); }
.topbar .trk-switch summary > .ic:last-child { color: var(--muted); }
.topbar .crumb { flex: 1; padding-left: 4px; }
.top-link { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .84rem; padding: 7px 12px; border-radius: 10px; border: 1px solid transparent; }
.top-link .ic { color: var(--muted); }
.top-link:hover, .top-link.on { background: var(--card); border-color: var(--line); color: var(--ink); }
.top-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); margin-right: 6px; }
.top-brand:hover { color: var(--ink); }
.top-brand .brand-text b { font-size: 1rem; font-weight: 800; }
.top-brand .brand-text small { color: var(--muted); font-size: .72rem; }
.side-cta.second { margin-top: -6px; box-shadow: none; }
.btn.outline.side-cta { background: var(--card); }
.topbar .readonly-bar, .topbar .remind-bar { padding: 8px 28px; }
.bulk-bar { top: calc(var(--top-h) + 6px); }
body.no-side .wrap { max-width: 1280px; }
@media (max-width: 900px) {
  .bulk-bar { top: calc(var(--top-h) + 4px); }
  .topbar .crumb { display: none; }
  .topbar .trk-switch summary span, .topbar .trk-name span, .top-link span { display: none; }
  .topbar-in { justify-content: space-between; }
  .topbar .usermenu { margin-left: auto; }
}
@media (max-width: 680px) {
  .top-brand .brand-text small { display: none; }
  .topbar .readonly-bar, .topbar .remind-bar { padding: 8px 16px; }
}

/* v9 — Data produk */
.sheet-actions { top: 0; bottom: 0; transform: none; align-items: center; }
.hist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hist-edit { display: inline; }
.hist-edit summary { list-style: none; cursor: pointer; }
.hist-edit summary::-webkit-details-marker { display: none; }
.hist-edit[open] { display: block; flex-basis: 100%; }
.hist-edit form { margin: 6px 0 4px; gap: 6px; }
.hist-edit input, .hist-edit select { min-height: 0 !important; height: 32px; padding: 3px 8px; font-size: .8rem; width: auto; }
.hist-edit input[name=note] { flex: 1 1 120px; }

/* Hak akses peran */
.perm-table th, .perm-table td { vertical-align: top; }
.perm-table .sticky-col { min-width: 230px; max-width: 280px; }
.perm-role { min-width: 150px; text-transform: none; letter-spacing: 0; }
.perm-role .role-name { min-height: 0 !important; height: 32px; padding: 4px 8px; font-weight: 700; font-size: .82rem; }
.perm-group td { background: var(--soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 16px; }
.perm-feature { font-weight: 600; font-size: .86rem; }
.perm-cell select { min-height: 0 !important; height: 32px; padding: 3px 28px 3px 10px; font-size: .82rem; font-weight: 700; width: 100%; }
.perm-cell.lv-view select { background-color: var(--blue-soft); border-color: #bcd1fb; color: var(--blue); }
.perm-cell.lv-edit select { background-color: var(--ok-soft); border-color: #a8dcc4; color: var(--ok); }
.perm-extra { font-size: .74rem; font-weight: 600; margin-top: 5px; color: var(--ink-2); }
.perm-extra input:disabled + * , .perm-cell.lv-none .perm-extra { opacity: .45; }
.narrow-card { max-width: 720px; }

/* ===== v9: SKPI nilai, status, keuangan ===== */
.err-text { color: var(--err); font-weight: 700; }
.sk-berjalan { background: var(--info-soft); color: var(--info); }
.sk-perbaikan { background: var(--warn-soft); color: var(--warn); }
.sk-remedial { background: var(--err-soft); color: var(--err); }
.skpi-table tr.st-remedial td, .skpi-table tr.st-remedial td.sticky-col { background: #fff7f6; }
.skpi-table tr.st-perbaikan td, .skpi-table tr.st-perbaikan td.sticky-col { background: #fffbf2; }
.quiz-cell { min-width: 70px; }
.quiz-cell .progress { margin-top: 4px; }
.quiz-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.warn-btn { background: #fff4e0; border-color: #f5dbb0; color: var(--warn); }
.warn-btn:hover { background: #ffecc7; }
.score-pop { width: min(460px, calc(100vw - 32px)); }
.score-list { display: grid; gap: 4px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.score-row { display: grid; grid-template-columns: 44px 1fr 74px; gap: 8px; align-items: center; margin: 0; padding: 3px 6px; border-radius: 8px; font-weight: 500; }
.score-row:nth-child(odd) { background: var(--soft, #f6f8fb); }
.score-row .sp { font-weight: 700; color: var(--ink-2); font-size: .8rem; }
.score-row .st { font-size: .82rem; }
.score-row input { padding: 5px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.score-row.empty input { background: #fffbf2; border-color: #f5dbb0; }
.score-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--grey-soft); font-size: .84rem; }
.score-sum.pass { background: var(--ok-soft); color: var(--ok); }
.score-sum.fail { background: var(--warn-soft); color: var(--warn); }
[data-wa-remedial] { width: min(460px, calc(100vw - 32px)); }
.finance-card { margin-bottom: 14px; display: grid; gap: 14px; }
.fin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fin { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.fin span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.fin b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.fin small { color: var(--muted); font-size: .74rem; }
.fin.net { background: var(--ok-soft); border-color: #bfe5d2; }
.fin.net b { color: var(--ok); }
.fin-copy { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fin-copy .chip { cursor: pointer; font-family: inherit; }
.fin-form { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.fin-form > div { display: flex; gap: 8px; align-items: center; }
.fin-form input[type=date] { width: auto; }
.fin-files { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fin-files > div { display: grid; gap: 6px; align-content: start; }
.upload-inline input[type=file] { font-size: .8rem; max-width: 100%; }
.table .total-row td { background: var(--soft, #f6f8fb); border-top: 2px solid var(--line); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .fin-grid { grid-template-columns: 1fr 1fr; }
  .fin-files { grid-template-columns: 1fr; }
  .table td.num { text-align: left; }
  .table .total-row td[colspan] { display: none; }
}

/* ===== v9: rekap absensi di HP ===== */
.att-rekap-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.compact-nav { flex-wrap: nowrap; }
.compact-nav select { min-width: 0; width: auto; }
.legend-att { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .78rem; color: var(--muted); }
.legend-att > span { display: inline-flex; gap: 4px; align-items: center; }
.att-cards { display: none; }
.att-grid-hint { display: none; }
.att-grid td.day[data-day-info] { cursor: pointer; }
.att-grid td.day.picked { outline: 2px solid var(--blue, #2563eb); outline-offset: -2px; }
.day-tip { position: fixed; z-index: 90; max-width: min(320px, calc(100vw - 24px)); background: #0f172a; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: .8rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(15,23,42,.25); }
.day-tip b { display: block; font-size: .74rem; color: #cbd5e1; font-weight: 600; margin-bottom: 2px; }
@media (max-width: 760px) {
  .att-rekap-bar { gap: 8px; }
  .compact-nav { width: 100%; }
  .compact-nav select { flex: 1; }
  .att-rekap-bar > .legend-att { order: 2; width: 100%; }
  .att-rekap-bar > .btn { order: 3; width: 100%; justify-content: center; }
  .ac-counts span.zero { opacity: .4; }
  .att-cards { display: grid; gap: 10px; margin-bottom: 14px; }
  .att-card { padding: 12px 14px; display: grid; gap: 8px; }
  .ac-counts { display: flex; flex-wrap: wrap; gap: 10px; font-size: .84rem; }
  .ac-counts span { display: inline-flex; align-items: center; gap: 4px; }
  .ac-counts .ng b { color: var(--err); }
  .ac-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
  .ac-stats dt { font-size: .7rem; color: var(--muted); }
  .ac-stats dd { margin: 0; font-weight: 700; font-size: .86rem; }
  .att-grid-hint { display: block; margin: 0 0 6px; }
  .att-grid .sum { display: none; }
  .att-grid th.sticky, .att-grid td.sticky { max-width: 110px; white-space: normal; font-size: .76rem; }
}
.table td.num { white-space: nowrap; }

/* ===== v9.1: SKPI tombol nilai & lampiran keuangan ===== */
.name-link { all: unset; cursor: pointer; font-weight: 700; color: var(--ink); border-bottom: 1px dashed transparent; }
.name-link:hover, .name-link:focus-visible { color: var(--blue, #2563eb); border-bottom-color: currentColor; }
button.quiz-count { all: unset; cursor: pointer; font-weight: 700; font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line); }
button.quiz-count:hover, button.quiz-count:focus-visible { color: var(--blue, #2563eb); border-bottom-color: currentColor; }
button.quiz-count.ok-text { color: var(--ok); }
.fin-files { grid-template-columns: repeat(3, 1fr); }
.fin-file { display: grid; gap: 8px; align-content: start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fin-file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fin-file-list li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fin-thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--soft, #f6f8fb); text-decoration: none; }
.fin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fin-doc { font-size: .66rem; font-weight: 800; color: var(--err); }
.fin-file-meta { display: grid; min-width: 0; flex: 1; font-size: .8rem; }
.fin-file-meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-file .uploader-foot { display: flex; }
.fin-file .dropzone { padding: 10px; font-size: .8rem; }
.uploader.is-target .dropzone { border-color: var(--blue, #2563eb); }
.fin-form { gap: 10px 22px; }
@media (max-width: 760px) { .fin-files { grid-template-columns: 1fr; } }

/* ===== v9.2: SPK gabungan ===== */
.order-items, .order-add { grid-column: 1 / -1; }
.order-items { display: grid; gap: 14px; }
.order-item { position: relative; display: grid; gap: 12px; }
.order-item > legend { grid-column: 1 / -1; }
.order-item > .row2 { clear: none; }
.order-item .item-remove { z-index: 1; }
@media (min-width: 900px) {
  .order-item { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .order-item > label:last-child { grid-column: 1 / -1; }
}
.order-item .item-remove { position: absolute; top: 14px; right: 16px; }
.fee-wrap { display: grid; gap: 6px; align-content: start; }
.fee-wrap > .check { min-height: 20px; }
.order-item label { align-content: start; }
.fee-wrap .check { margin: 0; }
.group-box { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; padding: 12px 16px; }
.group-box > strong { flex-basis: 100%; }
.group-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex-basis: 100%; }
.group-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--soft, #f6f8fb); }
.group-list li.is-current { outline: 1px solid var(--blue, #2563eb); background: var(--blue-soft, #eaf1ff); }
.group-list li a { font-weight: 700; }
.join-check { margin-top: -4px; color: var(--warn); }
.grp-badge { font-size: .66rem; vertical-align: middle; }
.rekap tr.grp-row td:first-child, .table tr.grp-row td:first-child { box-shadow: inset 3px 0 0 var(--blue, #2563eb); }
.table tr.grp-row:not(.grp-first) td { border-top-color: transparent; }

/* ===== v9.3: tabel siswa SKPI ringkas ===== */
.skpi-table td { vertical-align: middle; }
.skpi-table th, .skpi-table td { padding-left: 8px; padding-right: 8px; }
.skpi-table th.c-check, .skpi-table td.c-check { width: 28px; padding-left: 12px; padding-right: 2px; }
.skpi-table .quiz-cell { min-width: 70px; }
.skpi-table .name-cell { min-width: 130px; }
.skpi-table .contact-cell .pw code { font-size: .7rem; }
.skpi-table .name-cell .note { color: var(--warn); }
.skpi-table .contact-cell { min-width: 150px; max-width: 190px; }
.skpi-table .contact-cell .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skpi-table .score-cell { min-width: 110px; }
.skpi-table .cert-cell { min-width: 150px; max-width: 180px; }
.skpi-table .cert-no { font-size: .74rem; font-weight: 700; }
.skpi-table .cert-cell .sub { font-size: .7rem; }
.skpi-table td.cell-actions { white-space: nowrap; text-align: right; }
.skpi-table td.cell-actions > details { display: inline-block; vertical-align: middle; }
.hidden-summary > summary { display: block; width: 0; height: 0; padding: 0; margin: 0; font-size: 0; overflow: visible; }
.more-menu[open] > summary::before { background: transparent; }
.more-menu .pop-body { position: absolute; top: calc(100% + 6px); left: auto; right: 0; transform: none; width: auto; box-shadow: 0 12px 30px rgba(15,23,42,.18); }
.menu-list { display: grid; gap: 2px; padding: 6px !important; min-width: 210px; }
.menu-item { all: unset; display: block; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--soft, #f6f8fb); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.day-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }

/* ===== v9.3: notifikasi & real-time ===== */
.notif-menu { position: relative; }
.notif-menu summary { list-style: none; cursor: pointer; position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.notif-menu summary::-webkit-details-marker { display: none; }
.notif-menu .bell { font-size: 1.05rem; line-height: 1; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
.notif-count[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.18); padding: 8px; z-index: 60; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-list { display: grid; gap: 2px; }
.notif-item { display: flex; gap: 10px; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.notif-item:hover { background: var(--soft, #f6f8fb); }
.notif-item.unread { background: var(--blue-soft, #eaf1ff); }
.notif-item.fresh { animation: notifIn .5s ease; }
.ni-ic { flex: 0 0 24px; text-align: center; font-size: 1.1rem; line-height: 1.3; }
.ni-tx { display: grid; gap: 2px; min-width: 0; }
.ni-tx b { font-size: .84rem; }
.ni-tx small { color: var(--ink-2); font-size: .76rem; overflow-wrap: anywhere; }
.ni-tx em { font-style: normal; color: var(--muted); font-size: .7rem; }
.notif-empty { padding: 10px 8px; margin: 0; }
.notif-push { display: block; margin: 6px 8px 2px; }
@keyframes notifIn { from { background: #fff3c4; } to { background: var(--blue-soft, #eaf1ff); } }
.rt-toast { position: fixed; z-index: 120; right: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); background: #0f172a; color: #fff; border-radius: 12px; padding: 12px 40px 12px 14px; font-size: .86rem; box-shadow: 0 16px 40px rgba(15,23,42,.3); animation: toastIn .25s ease; }
.rt-toast + .rt-toast { bottom: 84px; }
.rt-toast a { color: #93c5fd; }
.rt-toast.warn { background: #7c2d12; }
.rt-toast.ok { background: #065f46; }
.rt-x { all: unset; position: absolute; right: 10px; top: 8px; cursor: pointer; font-size: 1.1rem; opacity: .8; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) { .notif-menu summary { width: 36px; height: 36px; } .rt-toast { left: 12px; right: 12px; bottom: 12px; } }
.notif-head [data-notif-all] { margin-left: auto; width: auto; }
.skpi-table .cert-st { display: flex; flex-wrap: wrap; gap: 0 8px; } .skpi-table .cert-st span { white-space: nowrap; }
.skpi-table .cert-no { hyphens: none; }
@media (max-width: 760px) {
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .skpi-table td[data-l] { display: grid !important; grid-template-columns: 88px minmax(0, 1fr); column-gap: 8px; align-items: start; }
  .skpi-table td[data-l]::before { grid-row: 1 / span 6; }
  .skpi-table td[data-l] > * { grid-column: 2; }
  .skpi-table .contact-cell, .skpi-table .cert-cell, .skpi-table .name-cell { max-width: none; }
  .skpi-table .contact-cell .sub { white-space: normal; overflow-wrap: anywhere; }
}
