@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap");
:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --sidebar: #efece5;
  --surface: #ffffff;
  --surface-2: #f6f4ef;
  --ink: #2a2723;
  --ink-2: #57524a;
  --muted: #8a857b;
  --line: #e4e0d6;
  --brand: #2a2723;
  --accent: #2d4fc4;
  --accent-soft: #eef1fb;
  --gold: #8a6a12;
  --gold-btn: #e8c97c;
  --gold-btn-ink: #3b2c05;
  --nav-active: #e8e2d4;
  --good: #0ca30c; --good-text: #2f7a3d;
  --good-bg: #edf6ee; --good-line: #b9dcbf;
  --bad-bg: #fbeeee; --bad-line: #efc2c2;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #c0392b;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --f1: #86b6ef; --f2: #5598e7; --f3: #2a78d6; --f4: #1c5cab; --f5: #104281;
  --shadow: 0 1px 2px rgba(42,39,35,.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1a17; --sidebar: #211f1c; --surface: #26241f; --surface-2: #2e2b26;
    --ink: #f1ede4; --ink-2: #c9c3b6; --muted: #968f82; --line: #3b3832;
    --brand: #f1ede4; --accent: #93a8ff; --accent-soft: #2a2e40;
    --gold: #dcb75c; --gold-btn: #c9a24a; --gold-btn-ink: #221903; --nav-active: #35312a;
    --good-text: #6fcf7f; --good-bg: #1f3022; --good-line: #2f5a37; --bad-bg: #3a2222; --bad-line: #6a3434; --critical: #ef7a6d;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --grid: #2c2c2a; --axis: #383835;
    --f1: #3987e5; --f2: #2a78d6; --f3: #256abf; --f4: #1c5cab; --f5: #184f95;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1a17; --sidebar: #211f1c; --surface: #26241f; --surface-2: #2e2b26;
  --ink: #f1ede4; --ink-2: #c9c3b6; --muted: #968f82; --line: #3b3832;
  --brand: #f1ede4; --accent: #93a8ff; --accent-soft: #2a2e40;
  --gold: #dcb75c; --gold-btn: #c9a24a; --gold-btn-ink: #221903; --nav-active: #35312a;
  --good-text: #6fcf7f; --good-bg: #1f3022; --good-line: #2f5a37; --bad-bg: #3a2222; --bad-line: #6a3434; --critical: #ef7a6d;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --grid: #2c2c2a; --axis: #383835;
  --f1: #3987e5; --f2: #2a78d6; --f3: #256abf; --f4: #1c5cab; --f5: #184f95;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Susun atur: sidebar + kandungan */
.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 40;
}
.sb-brand { padding: 26px 16px 18px; }
.sb-logo { font-size: 26px; font-weight: 600; letter-spacing: .06em; color: var(--gold); line-height: 1; }
.sb-logo span { color: var(--gold); }
.sb-tag { font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.sb-user { padding: 10px 16px 18px; border-bottom: 1px solid var(--line); }
.sb-name { font-size: 17px; }
.sb-role { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.sb-search { display: flex; align-items: center; gap: 8px; margin: 16px 12px 10px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sb-search svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.6; flex: none; }
.sb-search input { border: 0; padding: 4px 2px; background: transparent; font-size: 15px; }
.sb-search input:focus { outline: none; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16.5px; color: var(--ink-2); padding: 9px 12px; border-radius: 10px; text-align: left; margin-bottom: 2px;
}
.sb-item:hover { background: var(--nav-active); }
.sb-item.active { background: var(--nav-active); color: var(--gold); }
.sb-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sb-item .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.sb-sub { padding: 2px 0 6px 46px; display: grid; }
.sb-sub button { border: 0; background: none; text-align: left; font: inherit; font-size: 14px; color: var(--ink-2); padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.sb-sub button:hover { color: var(--ink); background: var(--nav-active); }
.sb-sub button.active { color: var(--gold); }
.sb-empty { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.sb-foot { border-top: 1px solid var(--line); padding: 10px 10px 16px; }
.sb-link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; font: inherit; font-size: 16.5px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.sb-link:hover { background: var(--nav-active); }
.sb-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sb-scrim { position: fixed; inset: 0; background: rgba(20,18,15,.4); z-index: 39; }
.sb-scrim[hidden] { display: none; }

.main { min-width: 0; }
.topstrip {
  height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 0 28px; padding-top: env(safe-area-inset-top, 0px);
}
.topstrip-brand { display: none; font-weight: 600; letter-spacing: .06em; color: var(--gold); }
.topstrip-right { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.menu-btn { display: none; font-size: 18px; padding: 4px 10px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 52px 64px 22px; max-width: 1640px; }
.page-head h1 { font-size: 34px; font-weight: 500; letter-spacing: .01em; }
.page-head h1 span { color: var(--gold); }
.page-sub { margin: 6px 0 0; font-size: 18px; color: var(--ink); }

.tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 32px 0 32px; padding: 0 32px;
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.tabs button {
  border: 0; background: none; color: var(--ink-2); padding: 12px 16px; cursor: pointer;
  font: inherit; font-size: 17px; white-space: nowrap; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); font-weight: 500; background: var(--surface); border: 1px solid var(--line); border-bottom: 3px solid var(--accent); }

.banner {
  margin: 16px 64px 0; padding: 10px 14px; border-radius: 10px;
  background: #fbf3dc; color: #5c4400; border: 1px solid #ecd9a2; font-size: 14px;
}
:root[data-theme="dark"] .banner { background: #2e2610; color: #f3dc9a; border-color: #5c4400; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { background: #2e2610; color: #f3dc9a; border-color: #5c4400; } }

main { padding: 28px 64px 80px; max-width: 1640px; }

/* Buttons & inputs */
.btn {
  font: inherit; border-radius: 8px; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.gold { background: var(--gold-btn); color: var(--gold-btn-ink); border-color: transparent; font-size: 17px; font-weight: 500; padding: 9px 16px; border-radius: 10px; }
.btn.gold:hover { filter: brightness(.97); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--critical); }
.btn.sm { padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%;
}
textarea { min-height: 64px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
label.check input { width: auto; }

/* Layout */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.section-head:first-child { margin-top: 4px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 16px 16px 60px; }
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow); min-width: 0;
}
.card h3 { margin-bottom: 8px; }
.card .sub { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }

/* Stat tiles */
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 600; margin-top: 2px; }
.stat .delta { font-size: 12px; margin-top: 2px; color: var(--muted); }
.delta.up { color: var(--good-text); }
.delta.down { color: var(--critical); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 130px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--ink-2); padding: 6px 12px; font: inherit; cursor: pointer; }
.seg button.active { background: var(--accent); color: #fff; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); white-space: nowrap; font-size: 12px; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--accent-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.pill.AWR { background: #e7f0fb; color: #1c5cab; border-color: #cde2fb; }
.pill.FDR { background: #fdeee6; color: #a3431a; border-color: #f7d3c1; }
.pill.SLS { background: #e3f6ee; color: #0b6b49; border-color: #c4ead9; }
:root[data-theme="dark"] .pill.AWR, :root[data-theme="dark"] .pill.FDR, :root[data-theme="dark"] .pill.SLS { background: var(--surface-2); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.AWR, :root:not([data-theme="light"]) .pill.FDR, :root:not([data-theme="light"]) .pill.SLS { background: var(--surface-2); color: var(--ink); } }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st-good { color: var(--good-text); }
.st-warn { color: #8a5d00; }
.st-crit { color: var(--critical); }
:root[data-theme="dark"] .st-warn { color: var(--warning); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-warn { color: var(--warning); } }

/* Kanban */
.kanban { display: grid; align-items: start; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border-radius: 12px; padding: 8px; min-height: 200px; }
.kcol.drop { outline: 2px dashed var(--accent); }
.kcol-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; padding: 4px 6px 8px; color: var(--ink-2); letter-spacing: .02em; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; font-size: 13px; }
.kcard .id { font-size: 11px; color: var(--muted); }
.kcard .t { font-weight: 600; margin: 2px 0 6px; }
.kcard .meta { display: flex; gap: 4px; flex-wrap: wrap; }
.kcard.blocked { border-left: 3px solid var(--critical); }
.gate-note { font-size: 11px; color: var(--critical); margin-top: 6px; }

/* Charts */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--ink-2); font-size: 11px; }
.chart .val { fill: var(--ink); font-weight: 600; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar-hit { cursor: default; }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: var(--shadow); max-width: 260px;
}

/* Lists */
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { padding: 8px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.rank li:last-child { border-bottom: 0; }
.rank .why { font-size: 12px; color: var(--ink-2); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(10, 18, 30, .5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal.confirm { z-index: 80; align-items: center; }
.banner.info { background: var(--accent-soft); color: var(--ink); border-color: var(--line); }
.modal-card { background: var(--surface); border-radius: 14px; width: 100%; max-width: 980px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 18px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-foot { border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-body { padding: 14px 18px; }
.ftabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.ftabs button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 5px 10px; border-radius: 999px; font: inherit; font-size: 12px; cursor: pointer; }
.ftabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.fpane { display: none; }
.fpane.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.gate { border-radius: 10px; padding: 10px 12px; background: var(--surface-2); font-size: 13px; }
.gate ul { margin: 6px 0 0; padding-left: 18px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--brand); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 120; font-size: 13px; max-width: 90vw; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.note { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ───── Pelan Konten (kad berkumpulan) ───── */
.plan-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.plan-head h2 { font-size: 26px; font-weight: 500; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-head .muted { font-size: 15.5px; color: var(--ink-2); margin-top: 6px; }
.plan-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15.5px; }
.plan-ctrl select { width: auto; min-width: 150px; font-size: 16px; padding: 7px 10px; }
.mnav { display: inline-flex; align-items: center; gap: 10px; }
.mnav button { width: 30px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink); font: inherit; }
.mnav b { font-weight: 500; font-size: 18px; min-width: 150px; text-align: center; }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot i { width: 11px; height: 11px; border-radius: 50%; background: var(--critical); display: inline-block; }
.btn.soft { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); font-size: 17px; padding: 7px 16px; border-radius: 10px; }

.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pcard-head { color: #fff; padding: 16px 16px 14px; position: relative; }
.pcard-head .kick { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.pcard-head h3 { font-size: 21px; font-weight: 600; margin: 4px 0 6px; padding-right: 110px; }
.pcard-head .who { font-size: 14.5px; opacity: .95; }
.pcard-head .who b { font-weight: 600; }
.pcard-head .badge { position: absolute; right: 16px; top: 22px; background: rgba(0,0,0,.28); padding: 4px 10px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.pcard-head .chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.pcard-head .chips span.c { border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.18); padding: 2px 8px; border-radius: 6px; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.prow { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.prow .dot.late { background: #d99a96; }
.prow .dot.done { background: #8fc79a; }
.prow .lbl { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .flag { font-weight: 600; margin-left: 6px; }
.prow .flag.late { color: var(--critical); }
.prow .flag.ok { color: var(--good-text); }
.prow .when { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.prow .when a { white-space: nowrap; flex: none; font-size: 19px; color: var(--accent); text-underline-offset: 3px; }
.prow .when .t { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.prow .ctl { display: flex; gap: 8px; align-items: center; }
.prow select { width: auto; font-size: 15px; padding: 7px 8px; min-width: 110px; }
.ap { border-radius: 8px; padding: 5px 10px; font-size: 15px; border: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.ap.ok { background: var(--good-bg); border-color: var(--good-line); color: var(--good-text); }
.ap.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--critical); }
.pcard .pempty { padding: 16px; color: var(--muted); font-size: 14px; }

/* ───── Kalendar ───── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.cal .dow { padding: 8px 10px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: var(--surface-2); }
.cal .day.out .dn { color: var(--muted); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .dn { font-size: 14px; font-weight: 500; padding: 2px 4px 4px; }
.cal .ev { display: block; width: 100%; text-align: left; border: 0; font: inherit; font-size: 12.5px; line-height: 1.3; padding: 3px 6px; margin-top: 3px; border-radius: 6px; cursor: pointer; color: var(--ink);
  background: var(--surface-2); border-left: 3px solid var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.shoot { background: transparent; border: 1px dashed var(--line); border-left: 3px dashed var(--gold); }
.cal .ev:hover { filter: brightness(.96); }
.cal .more { font-size: 12px; color: var(--muted); padding: 2px 6px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.agenda li:first-child { border-top: 0; }
.agenda .d { font-weight: 500; }
.agenda .tt { min-width: 0; }
.agenda .tt b { font-weight: 500; }
.agenda input[type=date] { width: auto; }
.daygroup { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }

/* ───── Responsif sidebar ───── */
@media (max-width: 1200px) {
  .page-head { padding: 36px 32px 18px; }
  .tabs { margin: 0 16px; padding: 0 16px; }
  main { padding: 24px 32px 80px; }
  .banner { margin: 16px 32px 0; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  .menu-btn { display: inline-block; }
  .topstrip { justify-content: space-between; padding: 0 16px; height: 56px; position: sticky; top: 0; background: var(--bg); z-index: 30; }
  .topstrip-brand { display: block; margin-right: auto; }
  .page-head { padding: 22px 16px 14px; flex-direction: column; }
  .page-head h1 { font-size: 26px; }
  .page-sub { font-size: 15.5px; }
  .tabs { margin: 0; padding: 0 8px; }
  .tabs button { font-size: 15.5px; padding: 10px 12px; }
  main { padding: 16px 16px 60px; }
  .banner { margin: 12px 16px 0; }
}
@media (max-width: 640px) {
  .prow { grid-template-columns: 12px minmax(0, 1fr); }
  .prow .ctl { grid-column: 2; }
  .cal .day { min-height: 72px; padding: 4px 2px; }
  .cal .ev { font-size: 0; height: 7px; padding: 0; border-left-width: 0; border-radius: 4px; }
  .cal .ev.shoot { border: 1px dashed var(--gold); }
  .cal .dow { padding: 6px 4px; font-size: 11px; letter-spacing: 0; }
  .agenda li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .plan-head h2 { font-size: 22px; }
}

/* ═════ Content OS: board ═════ */
:root { --red: #d24b3e; --red-soft: #fbe9e6; --yellow: #f2c544; --yellow-soft: #fdf5d8; --yellow-ink: #6b4e00; --green: #3e9a5b; --green-soft: #e6f4ea; }
:root[data-theme="dark"] { --red-soft: #3c2320; --yellow-soft: #3a3115; --yellow-ink: #f2d27a; --green-soft: #1d3324; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --red-soft: #3c2320; --yellow-soft: #3a3115; --yellow-ink: #f2d27a; --green-soft: #1d3324; } }
.adot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; flex: none; }
.acc { display: inline-flex; align-items: center; }
.board-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
h2.big { font-size: 40px; font-weight: 600; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 24px; min-width: 170px; }
.kpi b { display: block; font-size: 36px; font-weight: 600; line-height: 1.1; }
.kpi span { color: var(--ink-2); font-size: 15px; }
.kpi.warn b { color: #a0561b; }
.kpi.late { background: var(--red); border-color: var(--red); color: #fff; }
.kpi.late span { color: #fff; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; font-size: 17px; }
.chip { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 18px; cursor: pointer; display: inline-flex; align-items: center; }
.chip.on { background: #1d1c1a; color: #fff; border-color: #1d1c1a; }
:root[data-theme="dark"] .chip.on { background: #f1ede4; color: #1d1c1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: #f1ede4; color: #1d1c1a; } }
.hint { color: var(--ink-2); font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.blinkdemo { width: 34px; height: 20px; border-radius: 6px; background: var(--red); animation: blink 1.2s ease-in-out infinite; }
.legend-inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: var(--muted); }
.legend-inline .lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-left: 8px; }
.lg.red { background: var(--red); } .lg.yellow { background: var(--yellow); } .lg.green { background: var(--green); }
.filters { font-size: 16px; }
.filters select { font-size: 16px; padding: 8px 12px; min-width: 180px; }

.brow { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(120px, 1fr)); gap: 10px; align-items: stretch; }
.brow.bhead { color: var(--ink-2); font-size: 16px; padding: 4px 18px 12px; }
.brow.bhead > div:first-child { padding-left: 0; }
.bgroup { margin-bottom: 26px; }
.bg-head { display: flex; align-items: center; gap: 14px; padding: 8px 6px 12px; flex-wrap: wrap; }
.bg-head b { font-size: 20px; font-weight: 600; }
.bg-head .muted { font-size: 15px; }
.bg-head .btn { margin-left: auto; }
.avatar { width: 52px; height: 52px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }
.urgent { background: var(--red-soft); color: var(--red); font-weight: 600; padding: 4px 12px; border-radius: 999px; font-size: 15px; }
.bgroup .brow:not(.bhead) { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.bpost { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bp-acc { font-size: 15px; color: var(--ink-2); display: flex; align-items: center; }
.bp-tag { display: flex; align-items: center; gap: 8px; }
.bp-tag b { font-size: 18px; }
.ttag { color: #fff; border-radius: 7px; padding: 4px 10px; font-size: 15px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-date { font: 600 26px/1.15 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; }
.bp-topic { color: var(--ink); text-decoration: none; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-topic:hover { text-decoration: underline; }
.bp-due { font-size: 14px; color: var(--ink-2); }
.bp-due.late { color: var(--red); font-weight: 500; }
.bp-due.soon { color: #a0561b; font-weight: 500; }
.bp-due.ok { color: var(--green); }
.bcell { font: inherit; text-align: left; cursor: pointer; border-radius: 12px; padding: 12px 14px; min-height: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  border: 2px dashed var(--line); background: transparent; color: var(--ink-2); min-width: 0; }
.bcell .bc-t { font-size: 18px; font-weight: 500; }
.bcell .bc-who { font-size: 13.5px; }
.bcell .bc-sub { font-size: 13.5px; }
.bcell .bbadge { font-size: 12px; font-weight: 600; background: #fff; color: var(--red); border-radius: 6px; padding: 2px 7px; margin-left: 4px; vertical-align: 2px; }
.bcell.todo { background: var(--red); border: 2px solid var(--red); color: #fff; box-shadow: 0 0 0 4px var(--red-soft); }
.bcell.todo .bc-who { background: #fff; color: var(--red); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.bcell.wait { background: var(--yellow); border: 2px solid var(--yellow); color: #3b2c05; }
.bcell.wait .bc-who { background: rgba(255,255,255,.7); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.bcell.done { background: var(--green-soft); border: 2px solid var(--green); color: var(--green); }
.bcell.done .bc-t::before { content: "✓ "; }
.bcell.future .bc-t { color: var(--ink-2); }
.bcell.blink { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .bcell.blink, .blinkdemo { animation: none; outline: 3px solid var(--ink); } }

/* ═════ Idea submissions ═════ */
.isec { margin-bottom: 28px; }
.isec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.isec-head h3 { font-size: 20px; margin-right: 6px; }
.isec-prog { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; }
.isec-prog .progress { width: 140px; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ibox { font: inherit; text-align: left; cursor: pointer; border-radius: 14px; padding: 16px; border: 2px solid; display: flex; flex-direction: column; gap: 4px; min-height: 150px; }
.ibox.red { background: var(--red); border-color: var(--red); color: #fff; }
.ibox.red.late { box-shadow: 0 0 0 4px var(--red-soft); }
.ibox.yellow { background: var(--yellow); border-color: var(--yellow); color: #3b2c05; }
.ibox.green { background: var(--green); border-color: var(--green); color: #fff; }
.ib-k { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.ib-t { font-size: 24px; font-weight: 600; }
.ib-s { font-weight: 600; font-size: 15.5px; }
.ib-m, .ib-d { font-size: 14px; opacity: .95; }
.tcount { background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }

/* ═════ Monthly plan ═════ */
.kv3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.kv3 div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.kv3 b { display: block; font-size: 22px; font-weight: 600; }
.kv3 span { font-size: 12.5px; color: var(--muted); }
table.mini { font-size: 14px; margin-bottom: 8px; }
table.mini th { position: static; }
.minih { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 30px; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 4px; }
.barrow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow b { text-align: right; font-weight: 500; }

/* ═════ Sidebar "who am I" ═════ */
.sb-me { display: grid; gap: 2px; cursor: pointer; }
.sb-me select { margin-top: 8px; font-size: 14px; padding: 6px 8px; }

/* ═════ Modals ═════ */
.modal-card[data-kind="batch"] { max-width: 1400px; }
.modal-card[data-kind="post"] { max-width: 1180px; }
.mhead-meta { color: var(--ink-2); font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ftabs button { font-size: 14px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.tdot.todo { background: var(--red); } .tdot.wait { background: var(--yellow); } .tdot.done { background: var(--green); }
.ftabs button.active .tdot { box-shadow: 0 0 0 2px #fff; }
.stage-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sstat { font-size: 13.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.sstat.todo { background: var(--red-soft); color: var(--red); }
.sstat.wait { background: var(--yellow-soft); color: var(--yellow-ink); }
.sstat.done { background: var(--green-soft); color: var(--green); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn.approve { background: var(--green); border-color: var(--green); color: #fff; }
.gate.redo { background: var(--red-soft); color: var(--ink); margin-bottom: 10px; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.kv a { word-break: break-all; }
table.sb td, table.bt td { vertical-align: top; }
table.sb textarea, table.bt textarea { min-height: 44px; font-size: 13.5px; }
table.sb select, table.sb input, table.bt select, table.bt input { font-size: 13.5px; padding: 5px 6px; }
table.sb td:nth-child(3), table.sb td:nth-child(5) { min-width: 200px; }
table.sb td:nth-child(4) { min-width: 140px; }
table.sb td:nth-child(6) { min-width: 120px; }
table.sb td:nth-child(7) { min-width: 120px; }
table.sb tr.fix td { background: var(--red-soft); }
table.sb tr.ok td:first-child { box-shadow: inset 3px 0 var(--green); }
.nowrap { white-space: nowrap; }
table.bt td:nth-child(2) { min-width: 130px; } table.bt td:nth-child(3) { min-width: 140px; } table.bt td:nth-child(4), table.bt td:nth-child(5) { min-width: 160px; }
table.bt td:nth-child(6) { min-width: 200px; } table.bt td:nth-child(7) { min-width: 260px; } table.bt td:nth-child(8) { min-width: 120px; }
table.bt tr.miss td:first-child { box-shadow: inset 4px 0 var(--red); }
table.bt tr.submitted td { background: var(--yellow-soft); }
table.bt tr.approved td { background: var(--green-soft); }
table.bt tr.redo td { background: var(--red-soft); }
.ist { font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--surface-2); display: inline-block; }
.ist.submitted { background: var(--yellow); color: #3b2c05; } .ist.approved { background: var(--green); color: #fff; } .ist.redo { background: var(--red); color: #fff; }
.rowbtn { display: flex; gap: 4px; margin: 6px 0 4px; }
.bst .btn.sm { margin-top: 4px; }
.bhead-info { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; font-size: 14.5px; }
.ibadge { font-weight: 600; border-radius: 999px; padding: 3px 12px; }
.ibadge.red { background: var(--red); color: #fff; } .ibadge.yellow { background: var(--yellow); color: #3b2c05; } .ibadge.green { background: var(--green); color: #fff; }
.cal .more { border: 0; background: none; cursor: pointer; font: inherit; text-decoration: underline; }

@media (max-width: 1200px) {
  .brow { grid-template-columns: minmax(180px, 1.3fr) repeat(5, minmax(96px, 1fr)); gap: 8px; }
  .bcell .bc-t { font-size: 15.5px; }
}
@media (max-width: 900px) {
  h2.big { font-size: 30px; }
  .brow.bhead { display: none; }
  .bgroup .brow:not(.bhead) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bpost { grid-column: 1 / -1; }
  .bcell { min-height: 84px; padding: 8px; }
  .bcell .bc-t { font-size: 13.5px; }
  .bcell .bc-who, .bcell .bc-sub { font-size: 11.5px; }
  .kpi { min-width: 0; flex: 1; padding: 10px 14px; }
  .kpi b { font-size: 26px; }
}
@media (max-width: 640px) {
  .bgroup .brow:not(.bhead) { grid-template-columns: minmax(0, 1fr); }
  .bcell { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .chips { font-size: 15px; }
  .chip { padding: 6px 12px; }
  .kv3 { grid-template-columns: repeat(2, 1fr); }
}

/* Progress summary + submission link */
.sumwrap { margin: 4px 0 26px; }
.sumtitle { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sumtitle h3 { font-size: 19px; }
table.sumt th { font-size: 13.5px; text-align: center; }
table.sumt th:first-child { text-align: left; }
table.sumt td { vertical-align: middle; text-align: center; padding: 6px; }
table.sumt td:first-child { text-align: left; padding-left: 12px; min-width: 170px; }
table.sumt tr.tot td { background: var(--surface-2); }
.sumcell { font: inherit; width: 100%; min-width: 86px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); }
.sumcell b { font-size: 22px; font-weight: 600; }
.sumcell.zero b { color: var(--muted); font-weight: 400; }
.sumcell:hover { border-color: var(--accent); }
.sumcell.on { outline: 2px solid var(--accent); }
.sumcell.done b { color: var(--green); }
.sumcell .sw { font-size: 11.5px; font-weight: 600; background: var(--yellow); color: #3b2c05; border-radius: 999px; padding: 0 7px; }
.sumcell .sl { font-size: 11.5px; font-weight: 600; background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; }
.catfix, .fixed { display: inline-block; font-weight: 600; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 4px; }
.fixed { display: block; font-size: 15px; }
.linkcell { display: flex; gap: 6px; align-items: center; }
.linkcell input { min-width: 260px; }
.sublink { font-size: 12.5px; white-space: nowrap; }
table.bt td:nth-child(6) { min-width: 340px; }
.linkcell a { white-space: nowrap; flex: none; }
.chips-hint { margin: 0 0 0 auto; font-size: 15.5px; }
.bfilters { gap: 14px; margin-bottom: 22px; }
.bfilters select { min-width: 220px; font-size: 17px; font-weight: 500; padding: 10px 14px; border-radius: 12px; }
.bfilters select.active { border: 2px solid var(--accent); }
.bfilters a { font-size: 17px; color: var(--ink-2); }
.bfilters .legend-inline { margin-left: auto; }
@media (max-width: 900px) { .chips-hint { margin-left: 0; } .bfilters .legend-inline { margin-left: 0; } }
/* page dropdown (replaces side-by-side tabs) */
.tabs { border-bottom: 0; overflow: visible; padding-bottom: 6px; }
.viewpick { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; color: var(--ink-2); }
.viewpick select { width: auto; min-width: 260px; font: inherit; font-size: 19px; font-weight: 500; color: var(--ink); padding: 10px 16px; border-radius: 12px; border: 2px solid var(--accent); background: var(--surface); cursor: pointer; }
.prow .when a.sublink { font-size: 13px; }
main { padding-top: 40px; }
h3.stage-h { font-size: 22px; font-weight: 600; }
#progressNav { min-width: 240px; font-size: 18px; font-weight: 500; padding: 10px 14px; border-radius: 12px; }
#progressNav.active { border: 2px solid var(--accent); }
.sb-sub { padding-left: 46px; }
.prow .ctl select[data-quick] { min-width: 190px; }
table.ptab td { vertical-align: top; }
table.ptab .pdate { font-size: 18px; }
table.ptab td.pc { min-width: 220px; max-width: 300px; }
table.ptab td.capcell { min-width: 360px; width: 45%; }
table.ptab td.capcell textarea { min-height: 96px; font-size: 14px; }
table.ptab label.check { margin-bottom: 2px; }
table.ptab td.pc .acc { display: flex; margin-bottom: 2px; } table.ptab td:last-child .btn { display: block; width: 100%; margin: 0 0 6px; }
/* Editing: storyboard check */
.sbmsg { border-radius: 10px; padding: 10px 14px; font-size: 14.5px; background: var(--surface-2); }
.sbmsg.todo { background: var(--red-soft); } .sbmsg.wait { background: var(--yellow-soft); } .sbmsg.done { background: var(--green-soft); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.scard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.scard.has { border: 2px solid var(--red); }
.sframe { display: block; aspect-ratio: 9 / 16; background: #222; }
.sframe img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sframe.ph { display: grid; place-items: center; color: #ccc; font-size: 13px; padding: 10px; text-align: center; background: repeating-linear-gradient(135deg, #2a2723 0 12px, #33302b 12px 24px); }
.sbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.stime { font: 600 13px ui-monospace, Menlo, monospace; color: var(--ink-2); }
.skind { font-weight: 600; font-size: 13.5px; }
.ssaid { font-size: 13px; color: var(--ink-2); font-style: italic; }
.scard textarea { font-size: 13px; min-height: 52px; }
.sreply { font-size: 12.5px; background: var(--green-soft); border-radius: 8px; padding: 6px 8px; }
details.hround { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; background: var(--surface); }
details.hround summary { cursor: pointer; font-weight: 500; }
details.hround ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
table.bt td:nth-child(7) { min-width: 300px; }
