/* ==========================================================================
   Pusat Proyek Badai — sistem desain
   Prinsip: status dulu (apa yang perlu perhatianku?), lalu rinci.
   Warna dipakai untuk ARTI (status), bukan hiasan. Status selalu ikon + kata.
   ========================================================================== */

:root {
  color-scheme: light;
  /* permukaan */
  --bg: #f4f5fa;
  --bg-glow: radial-gradient(1200px 500px at 10% -10%, #e6e8ff 0%, transparent 60%), radial-gradient(900px 400px at 100% 0%, #e7f6fb 0%, transparent 55%);
  --panel: #ffffff;
  --panel-2: #f7f8fc;
  --panel-3: #eef0f7;
  --line: #e3e6ef;
  --line-2: #d3d8e5;
  /* tinta teks */
  --ink: #12141f;
  --ink-2: #4a5068;
  --ink-3: #7b8199;
  /* merek */
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-ink: #ffffff;
  --brand-soft: #eef0ff;
  --brand-grad: linear-gradient(135deg, #5b5cf0 0%, #4338ca 60%, #312e81 100%);
  /* status (tetap; selalu berpasangan ikon + kata) */
  --good: #0aac23;      --good-ink: #0b7a1e;   --good-soft: #e8f7eb;
  --warn: #fbb315;      --warn-ink: #8a5a00;   --warn-soft: #fff6df;
  --serious: #f18a59;   --serious-ink: #a2461a;
  --bad: #dc3c3d;       --bad-ink: #b42526;    --bad-soft: #fdeceb;
  --info-ink: #1b64be;  --info-soft: #e8f1fd;
  /* seri grafik (urutan tetap) */
  --series-1: #257de0;  /* biru  */
  --series-2: #f47230;  /* oranye */
  --grid: #eceef5;
  /* bentuk */
  --r-sm: 8px; --r: 14px; --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(18, 20, 31, .05), 0 1px 1px rgba(18, 20, 31, .03);
  --shadow-2: 0 10px 30px -12px rgba(30, 27, 75, .18), 0 2px 6px rgba(18, 20, 31, .05);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* Mode gelap — langkah warna sendiri, bukan sekadar dibalik */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0c14;
    --bg-glow: radial-gradient(1100px 500px at 5% -10%, rgba(79, 70, 229, .22) 0%, transparent 60%), radial-gradient(800px 400px at 100% 0%, rgba(34, 211, 238, .08) 0%, transparent 55%);
    --panel: #121522; --panel-2: #171b2b; --panel-3: #1e2336;
    --line: #242a40; --line-2: #2f3650;
    --ink: #eceef6; --ink-2: #b3b8cc; --ink-3: #8389a3;
    --brand: #7c7ff5; --brand-2: #8b8ef7; --brand-ink: #0a0c14; --brand-soft: rgba(124, 127, 245, .14);
    --good-ink: #4ade80; --good-soft: rgba(10, 172, 35, .14);
    --warn-ink: #fbc54d; --warn-soft: rgba(251, 179, 21, .13);
    --serious-ink: #f6a37c;
    --bad-ink: #f47777; --bad-soft: rgba(220, 60, 61, .16);
    --info-ink: #84b9f3; --info-soft: rgba(51, 140, 237, .14);
    --series-1: #338ced; --series-2: #e76624;
    --grid: #1f2437;
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c14;
  --bg-glow: radial-gradient(1100px 500px at 5% -10%, rgba(79, 70, 229, .22) 0%, transparent 60%), radial-gradient(800px 400px at 100% 0%, rgba(34, 211, 238, .08) 0%, transparent 55%);
  --panel: #121522; --panel-2: #171b2b; --panel-3: #1e2336;
  --line: #242a40; --line-2: #2f3650;
  --ink: #eceef6; --ink-2: #b3b8cc; --ink-3: #8389a3;
  --brand: #7c7ff5; --brand-2: #8b8ef7; --brand-ink: #0a0c14; --brand-soft: rgba(124, 127, 245, .14);
  --good-ink: #4ade80; --good-soft: rgba(10, 172, 35, .14);
  --warn-ink: #fbc54d; --warn-soft: rgba(251, 179, 21, .13);
  --serious-ink: #f6a37c;
  --bad-ink: #f47777; --bad-soft: rgba(220, 60, 61, .16);
  --info-ink: #84b9f3; --info-soft: rgba(51, 140, 237, .14);
  --series-1: #338ced; --series-2: #e76624;
  --grid: #1f2437;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02);
}

/* ---------- dasar ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: var(--bg-glow), var(--bg); background-attachment: fixed;
  font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
[hidden] { display: none !important; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; margin: 0; }
h1 { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.sub { color: var(--ink-3); font-size: .82rem; margin: 2px 0 0; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left)) 56px; display: grid; gap: 20px; }

/* ---------- bilah atas ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .in { max-width: 1280px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.brand img { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 4px 10px rgba(67, 56, 202, .35)); }
.brand .nm { display: grid; line-height: 1.15; }
.brand .nm small { color: var(--ink-3); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; margin-left: 10px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .84rem; font-weight: 500; padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--panel-3); color: var(--ink); }
.nav a .cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--warn); color: #3a2600; font-size: .68rem; font-weight: 700; }
.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; color: var(--good-ink); background: var(--good-soft); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(10, 172, 35, .5); }
@media (prefers-reduced-motion: no-preference) { .live i { animation: ping 2s infinite; } @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(10, 172, 35, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(10, 172, 35, 0); } } }
.live.off { color: var(--bad-ink); background: var(--bad-soft); }
.live.off i { background: var(--bad); animation: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); padding: 0; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
@media (max-width: 760px) {
  .topbar .in { flex-wrap: wrap; gap: 8px 10px; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .tools { margin-left: auto; }
  .brand .nm small { display: none; }
}

/* ---------- pahlawan status ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 24px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
}
.hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--good); }
.hero .badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--good-soft); color: var(--good-ink); }
.hero .badge .ic { width: 28px; height: 28px; stroke-width: 2.2; }
.hero .t { font: 800 1.35rem/1.25 var(--display); letter-spacing: -.02em; }
.hero .d { color: var(--ink-2); margin-top: 3px; font-size: .9rem; }
.hero .when { color: var(--ink-3); font-size: .78rem; text-align: right; white-space: nowrap; }
.hero.warn::before { background: var(--warn); } .hero.warn .badge { background: var(--warn-soft); color: var(--warn-ink); }
.hero.bad::before { background: var(--bad); } .hero.bad .badge { background: var(--bad-soft); color: var(--bad-ink); }
@media (max-width: 640px) { .hero { grid-template-columns: auto minmax(0, 1fr); padding: 18px; } .hero .when { grid-column: 1 / -1; text-align: left; } .hero .t { font-size: 1.15rem; } }

/* ---------- angka ringkas ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
.kpi {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px 13px;
  display: grid; gap: 4px; box-shadow: var(--shadow-1); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
a.kpi:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kpi .l { display: flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.kpi .l .ic { width: 16px; height: 16px; color: var(--ink-3); }
.kpi .v { font: 800 1.7rem/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .h { font-size: .75rem; color: var(--ink-3); }
.kpi .st { position: absolute; top: 12px; right: 12px; font-size: .66rem; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; }
.kpi.good .st { background: var(--good-soft); color: var(--good-ink); }
.kpi.warn .st { background: var(--warn-soft); color: var(--warn-ink); }
.kpi.bad .st { background: var(--bad-soft); color: var(--bad-ink); }
.kpi.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.kpi.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }

/* ---------- kartu & tata letak ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; box-shadow: var(--shadow-1); }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.card-h .ttl { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.card-h .ttl > .ic, .sec-ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; stroke-width: 2; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 20px; align-content: start; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 10px 2px -6px; color: var(--ink-3); font: 700 .72rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* details sebagai panel lipat */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; flex: none; }
details.fold[open] > summary::after { transform: rotate(225deg); }

/* ---------- kontrol ---------- */
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"] { accent-color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 11px; padding: 10px 18px; font-weight: 650; min-height: 42px; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.alt, .ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.ghost { border-radius: 11px; padding: 8px 14px; font-weight: 550; }
.btn.alt:hover, .ghost:hover { background: var(--panel-3); filter: none; }
.lnk { background: none; border: 0; color: var(--ink-3); padding: 3px 6px; font-size: .8rem; border-radius: 6px; }
.lnk:hover { color: var(--ink); background: var(--panel-3); }
.lnk.go { color: var(--brand); font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row select { width: auto; }
.msg { margin: 0; font-size: .85rem; font-weight: 500; }
.msg.ok { color: var(--good-ink); } .msg.bad { color: var(--bad-ink); }

/* ---------- beri tugas ---------- */
.composer { background: var(--panel); position: relative; overflow: hidden; }
.composer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-grad); }
.composer textarea { min-height: 92px; resize: vertical; font-size: .98rem; background: var(--panel-2); }

/* ---------- tugas ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--panel-3); padding: 3px; border-radius: 11px; }
.tab { background: transparent; border: 0; color: var(--ink-2); padding: 5px 12px; border-radius: 8px; font-size: .8rem; font-weight: 600; }
.tab[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; padding: 13px 14px 13px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.task .bar { border-radius: 0 4px 4px 0; background: var(--line-2); }
.task.jalan .bar { background: var(--series-1); }
.task.butuh_jawaban .bar, .task.menunggu .bar { background: var(--warn); }
.task.selesai .bar { background: var(--good); }
.task.gagal .bar { background: var(--bad); }
.task .t { font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }
.task.selesai .t { color: var(--ink-2); font-weight: 550; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; color: var(--ink-2); background: var(--panel-3); white-space: nowrap; }
.chip.blue { color: var(--info-ink); background: var(--info-soft); }
.chip.red { color: var(--bad-ink); background: var(--bad-soft); }
.chip.amber { color: var(--warn-ink); background: var(--warn-soft); }
.chip.green { color: var(--good-ink); background: var(--good-soft); }
.chip.green::before { content: "✓"; font-weight: 800; }
.chip.amber::before { content: "!"; font-weight: 900; }
.chip.red:not(.prio)::before { content: "✕"; font-weight: 800; }
.chip.pulse::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .chip.pulse::before { animation: p 1.3s ease-in-out infinite; } @keyframes p { 50% { opacity: .25; } } }
.note { margin: 8px 0 0; font-size: .85rem; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.task.selesai .note { max-height: 7.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.task.selesai.open .note { max-height: none; -webkit-mask-image: none; mask-image: none; }
details.log summary { cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--ink-3); margin-top: 8px; }
details.log pre { max-height: 280px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: .74rem/1.55 var(--mono); white-space: pre-wrap; }
.answer { display: flex; gap: 8px; margin-top: 10px; } .answer input { flex: 1; background: var(--panel); }
.answer.revisi { flex-direction: column; align-items: stretch; } .answer.revisi textarea { width: 100%; background: var(--panel); resize: vertical; } .answer.revisi .rev-bawah { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .answer.revisi .thumbs:empty { display: none; } .answer.revisi .msg { margin: 0; }
.acts { display: grid; gap: 2px; justify-items: end; align-content: start; }
.empty { color: var(--ink-3); margin: 0; padding: 22px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); }
@media (max-width: 560px) { .task { grid-template-columns: 4px minmax(0, 1fr); } .acts { grid-column: 2; display: flex; flex-wrap: wrap; justify-items: start; } }

/* ---------- butuh keputusanmu ---------- */
.decide { border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line)); background: linear-gradient(180deg, var(--warn-soft), var(--panel) 120px); box-shadow: var(--shadow-2); }
.decide .card-h .ttl > .ic { background: var(--warn); color: #3a2600; }
.decide .task { background: var(--panel); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- kejadian ---------- */
.events { list-style: none; margin: 0; padding: 0; display: grid; font-size: .84rem; max-height: 430px; overflow: auto; }
.events li { display: grid; grid-template-columns: 14px 46px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); align-items: start; }
.events li:first-child { border-top: 0; }
.events li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--line-2); }
.events li.k-mati::before, .events li.k-server::before { background: var(--bad); }
.events li.k-pulih::before { background: var(--good); }
.events li.k-tugas::before { background: var(--series-1); }
.events li.k-wa::before, .events li.k-catatan::before { background: var(--brand-2); }
.events time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.events span { overflow-wrap: anywhere; color: var(--ink-2); }
.k-mati, .k-server { color: var(--bad-ink) !important; } .k-pulih { color: var(--good-ink) !important; }

/* ---------- situs ---------- */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.site { border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; background: var(--panel-2); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.site.down { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); background: var(--bad-soft); }
.site .h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.site .h > * { min-width: 0; }
.site .n { font-weight: 650; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; flex: 1; }
.site .n .dot { vertical-align: 1px; }
.site .s { font-size: .72rem; font-variant-numeric: tabular-nums; color: var(--ink-3); white-space: nowrap; }
.site.down .h .s { color: var(--bad-ink); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); flex: none; }
.down .dot { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); }
.spark { display: flex; gap: 2px; height: 16px; align-items: stretch; }
.spark i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--good) 55%, var(--panel-3)); }
.spark i.x { background: var(--bad); }
.group-h { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 8px 0 0; }
#sites { display: grid; gap: 8px; }

/* ---------- server ---------- */
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.g { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); }
.g .l { font-size: .74rem; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 6px; }
.g .l em { font-style: normal; font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.g .l em.warn { background: var(--warn-soft); color: var(--warn-ink); } .g .l em.bad { background: var(--bad-soft); color: var(--bad-ink); }
.g .v { font: 800 1.45rem/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.meter { height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 999px; }
.meter i.warn { background: var(--warn); } .meter i.bad { background: var(--bad); }
.chart { position: relative; }
.chart svg { width: 100%; height: 150px; display: block; }
.chart text { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }
.chart .legend { display: flex; gap: 16px; align-items: center; font-size: .78rem; color: var(--ink-2); margin-top: 6px; }
.chart .legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chart .tip, .hbars .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--panel); font-size: .75rem; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow-2); font-variant-numeric: tabular-nums; }
.chart .xh { position: absolute; top: 0; bottom: 28px; width: 1px; background: var(--line-2); pointer-events: none; }

/* saklar akses */
.akses { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); }
.akses > div { flex: 1; min-width: 220px; }
.akses .st { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.akses .st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.akses.hidup { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: var(--good-soft); }
.akses.hidup .st::before { background: var(--good); }
.akses.mati { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-soft); }
.akses.mati .st::before { background: var(--bad); }
.akses details { flex-basis: 100%; }
.akses summary { cursor: pointer; }
.akses pre { white-space: pre-wrap; font: .74rem/1.55 var(--mono); margin: 8px 0 0; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); overflow-wrap: anywhere; }

/* ---------- tabel ---------- */
.tbl { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); max-height: 520px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .84rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); position: sticky; top: 0; z-index: 1; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-2); }
td.msgcol { white-space: normal; min-width: 220px; max-width: 460px; color: var(--ink-2); line-height: 1.45; }
td.num, th.num { text-align: right; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--panel-3); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ok-t { color: var(--good-ink); } .pill.ok-t { background: var(--good-soft); }
.bad-t { color: var(--bad-ink); } .pill.bad-t { background: var(--bad-soft); }
.warn-t { color: var(--warn-ink); } .pill.warn-t { background: var(--warn-soft); }
.mut-t { color: var(--ink-3); }

/* ---------- formulir pengaturan ---------- */
.wa-form { display: grid; gap: 14px; margin-top: 16px; }
.wa-form fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 10px; margin: 0; background: var(--panel-2); }
.wa-form legend { padding: 0 6px; font-weight: 600; }
.wa-kat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sw { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.sw input { width: 18px; height: 18px; flex: none; }
.notes-area { min-height: 340px; font: .84rem/1.6 var(--mono) !important; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(100%, 380px); padding: 28px; gap: 16px; box-shadow: var(--shadow-2); }
.login .brand { flex-direction: column; text-align: center; gap: 12px; margin-bottom: 4px; }
.login .brand img { width: 60px; height: 60px; }
.login label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }

/* ---------- kaki ---------- */
.foot { text-align: center; color: var(--ink-3); font-size: .76rem; padding-top: 8px; }

/* ---------- pemakaian Claude ---------- */
.mini-h { font: 700 .74rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.kstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kstat { padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 3px; }
.kstat .l { font-size: .74rem; font-weight: 600; color: var(--ink-2); }
.kstat .v { font: 800 1.35rem/1.15 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kstat .h { font-size: .74rem; color: var(--ink-3); }
.split { display: flex; height: 6px; border-radius: 999px; overflow: hidden; gap: 2px; margin-top: 4px; background: var(--panel); }
.split i { display: block; border-radius: 999px; }
.hbars { display: grid; gap: 7px; position: relative; }
.hbars .tip, #k-harian .tip { position: absolute; }
.hbar { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: .82rem; }
.hbar .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-weight: 550; }
.hbar .track { display: flex; gap: 2px; height: 14px; }
.hbar .track i { display: block; height: 100%; min-width: 2px; }
.hbar .track i:first-child { border-radius: 4px 0 0 4px; }
.hbar .track i:last-child { border-radius: 0 4px 4px 0; }
.hbar .track i:only-child { border-radius: 4px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 650; }
.hbar:hover .n { color: var(--ink); }
.hbar .track:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .hbar { grid-template-columns: minmax(0, 1fr) 56px; } .hbar .track { grid-column: 1 / -1; order: 3; } }

/* ---------- lampiran gambar ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.attach { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.att-btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: .85rem; }
.attach input:focus-visible + .sub, .att-btn:focus-within { outline: 2px solid var(--brand); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; line-height: 1; display: grid; place-items: center; }
.task .thumbs { margin-top: 8px; }
.task .thumb { width: 64px; height: 64px; }
.task a.thumb:hover { border-color: var(--brand); }
.task .t { white-space: pre-wrap; }

/* lampiran media & hasil kerja */
.thumb.media { display: grid; place-items: center; text-align: center; font-size: .66rem; color: var(--ink-2); padding: 4px; width: 120px; }
.thumb.media b { display: block; font-size: 1.2rem; }
.thumb .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--brand); transition: width .2s; }
.hasil { display: grid; gap: 10px; margin-top: 10px; }
.hasil-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--panel); display: grid; gap: 6px; max-width: 420px; }
.hasil-item video { width: 100%; max-height: 520px; border-radius: 8px; background: #000; }
.hasil-item img { width: 100%; border-radius: 8px; }
.hasil-item audio { width: 100%; }
.hasil-item .ket { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .78rem; color: var(--ink-2); }
.hasil-item .ket span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hasil-h { font-size: .74rem; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin: 10px 0 -4px; }

/* ==================== RUANG (Kendali / Konten) ==================== */
.ruang { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel-3); flex: none; }
.ruang a { text-decoration: none; color: var(--ink-2); font-size: .84rem; font-weight: 650; padding: 6px 13px; border-radius: 9px; white-space: nowrap; }
.ruang a[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.ruang a .cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--warn); color: #3a2600; font-size: .68rem; font-weight: 800; }
body.di-konten #nav-kendali { visibility: hidden; }
@media (max-width: 760px) { body.di-konten #nav-kendali { display: none; } }

/* ==================== RUANG KONTEN ==================== */
.konten-hero::before { background: linear-gradient(180deg, #ec4899, #8b5cf6); }
.konten-hero .badge { background: linear-gradient(135deg, rgba(236,72,153,.15), rgba(139,92,246,.18)); color: #a21caf; }
:root[data-theme="dark"] .konten-hero .badge { color: #f0abfc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .konten-hero .badge { color: #f0abfc; } }

.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--panel-3); width: fit-content; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 16px; border-radius: 9px; font-weight: 650; font-size: .86rem; color: var(--ink-2); }
.seg input:checked + span { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }

.akun { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.akun li { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.akun .lg { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.akun .lg.yt { background: #e11d1d; } .akun .lg.tt { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.akun .nm { flex: 1; min-width: 0; } .akun .nm b { display: block; font-size: .9rem; }

.papan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .papan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .papan { grid-template-columns: minmax(0, 1fr); } }
.kolom { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 10px; align-content: start; min-height: 120px; }
.kolom h3 { font: 700 .78rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 4px 4px 2px; display: flex; justify-content: space-between; }
.kolom .kosong { color: var(--ink-3); font-size: .8rem; text-align: center; padding: 14px 6px; }
.kkartu { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 9px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; transition: border-color .15s, transform .1s; }
.kkartu:hover { border-color: var(--brand); }
.kkartu:active { transform: scale(.99); }
.kkartu .sp { width: 64px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--panel-3); display: grid; place-items: center; color: var(--ink-3); }
.kkartu .sp img { width: 100%; height: 100%; object-fit: cover; }
.kkartu .j { font-weight: 650; font-size: .86rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kkartu .chips { margin-top: 6px; }
.brand-siraj { color: #0f766e !important; background: rgba(13, 148, 136, .12) !important; }
.brand-baweanpintar { color: #1d4ed8 !important; background: rgba(37, 99, 235, .12) !important; }
:root[data-theme="dark"] .brand-siraj { color: #5eead4 !important; } :root[data-theme="dark"] .brand-baweanpintar { color: #93c5fd !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-siraj { color: #5eead4 !important; } :root:not([data-theme="light"]) .brand-baweanpintar { color: #93c5fd !important; } }

/* jendela tinjau */
.kn-dialog { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); padding: 22px; box-shadow: var(--shadow-2); }
.kn-dialog::backdrop { background: rgba(8, 10, 20, .55); backdrop-filter: blur(3px); }
.kn-d-tutup { position: absolute; top: 12px; right: 12px; margin: 0; }
.kn-d { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .kn-d { grid-template-columns: minmax(0, 1fr); } .kn-dialog { padding: 16px; } }
.kn-d video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; }
.kn-d .ph { aspect-ratio: 9 / 16; border-radius: 12px; background: var(--panel-3); display: grid; place-items: center; color: var(--ink-3); text-align: center; padding: 16px; font-size: .85rem; }
.kn-d .kanan { display: grid; gap: 14px; align-content: start; min-width: 0; }
.kn-d h2 { font-size: 1.15rem; padding-right: 40px; }
.kn-d fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0; display: grid; gap: 8px; }
.kn-d legend { font-weight: 700; font-size: .82rem; padding: 0 6px; }
.kn-d label.f { display: grid; gap: 4px; font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.kn-d textarea { min-height: 80px; }
.kn-d .aksi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kn-d .brief { font-size: .84rem; color: var(--ink-2); white-space: pre-wrap; background: var(--panel-2); border-radius: 10px; padding: 10px; }

/* ---------- saran ide konten ---------- */
.saran { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.ide { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); position: relative; }
.ide:hover { border-color: var(--line-2); }
.ide .j { font: 700 .98rem/1.35 var(--display); padding-right: 22px; }
.ide .hook { font-size: .86rem; color: var(--ink-2); font-style: italic; }
.ide .hook::before { content: "“"; } .ide .hook::after { content: "”"; }
.ide .alasan { font-size: .76rem; color: var(--ink-3); }
.ide .aksi { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ide .aksi .btn, .ide .aksi .ghost { min-height: 36px; padding: 6px 12px; font-size: .84rem; }
.ide .tutup { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-3); }
.ide .tutup:hover { background: var(--panel-3); color: var(--ink); }
.chip.jenis-viral { color: #b42318; background: rgba(240, 68, 56, .12); }
.chip.jenis-edukasi { color: var(--info-ink); background: var(--info-soft); }
.chip.jenis-seri { color: #6d28d9; background: rgba(124, 58, 237, .12); }
:root[data-theme="dark"] .chip.jenis-viral { color: #fda29b; } :root[data-theme="dark"] .chip.jenis-seri { color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.jenis-viral { color: #fda29b; } :root:not([data-theme="light"]) .chip.jenis-seri { color: #c4b5fd; } }
.saran .kosong { color: var(--ink-3); padding: 18px; text-align: center; grid-column: 1 / -1; border: 1px dashed var(--line-2); border-radius: var(--r); }
