/* ZalinLabs Studio — studio.css (vanilla, mobile-first, tanpa font eksternal) */
:root {
  --navy: #0b1f33;
  --navy-2: #12304d;
  --navy-3: #1a3a5c;
  --teal: #0f8b8d;
  --teal-2: #11a3a5;
  --teal-soft: #e0f3f3;
  --accent: #f28c28;
  --accent-soft: #fdebd6;
  --ink: #172430;
  --muted: #5b6b7b;
  --line: #dde4ea;
  --bg: #f3f6f8;
  --card: #ffffff;
  --ok: #1f8a4c;
  --ok-soft: #e2f4ea;
  --warn: #b9770e;
  --warn-soft: #fff3dc;
  --bad: #c0392b;
  --bad-soft: #fde8e5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(11, 31, 51, 0.10);
  --sidebar-w: 248px;
  --bottombar-h: 64px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; color: var(--navy); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 8px; }
a { color: var(--teal); }
code, pre { font-family: var(--mono); font-size: 0.85rem; }
pre { margin: 0; padding: 10px 12px; background: #f6f8fa; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-word; }
svg { flex: 0 0 auto; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.skip:focus { top: 8px; }

/* ---------- kerangka halaman: header / sidebar / main / footer ---------- */
.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.topbar { grid-column: 1 / -1; grid-row: 1; }
.sidebar { grid-column: 1; grid-row: 2; }
.view { grid-column: 2; grid-row: 2; }
.footer { grid-column: 1 / -1; grid-row: 3; }
.app:not(.is-authed) { grid-template-columns: minmax(0, 1fr); }
.app:not(.is-authed) .sidebar { display: none; }
.app:not(.is-authed) .view { grid-column: 1; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--navy); color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-height: 44px; }
.brand-mark { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-text small { color: #b7c7d6; font-size: 0.74rem; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { min-width: 44px; font-weight: 700; letter-spacing: 0.04em; }

.usermenu { position: relative; }
.usermenu-summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer; list-style: none; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); }
.usermenu-summary::-webkit-details-marker { display: none; }
.usermenu-summary:hover, .usermenu[open] .usermenu-summary { background: rgba(255, 255, 255, 0.14); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; }
.usermenu-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; gap: 3px; }
.usermenu-email { font-size: 0.8rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(280px, 90vw); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; z-index: 50; }
.usermenu-name { font-size: 0.9rem; word-break: break-all; }

.sidebar { background: var(--navy); color: #d6e0ea; position: sticky; top: 0; height: calc(100dvh - 65px); overflow-y: auto; }
.nav-list { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: #d6e0ea; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.nav-link:hover { background: var(--navy-2); color: #fff; }
.nav-link[aria-current="page"] { background: var(--teal); color: #fff; }
.nav-link[aria-current="page"]:hover { background: var(--teal-2); }

.view { padding: 20px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .eyebrow { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.footer { background: #fff; border-top: 1px solid var(--line); padding: 12px 20px; font-size: 0.82rem; color: var(--muted); }
.footer p { margin: 0; }
.footer-muted { color: var(--warn); }

/* ---------- kartu & grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(11, 31, 51, 0.04); }
.card + .card { margin-top: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-height: 132px; }
.kpi-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.kpi-sub { font-size: 0.82rem; color: var(--muted); }
.kpi-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.72rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- chip, badge ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1.5; background: #eceff3; color: var(--muted); }
.chip-role { background: var(--accent); color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
.chip[data-status="live"] { background: var(--ok-soft); color: var(--ok); }
.chip[data-status="snapshot"], .chip[data-status="mock"] { background: var(--warn-soft); color: var(--warn); }
.chip[data-status="not_connected"], .chip[data-status="empty"], .chip[data-status="unknown"] { background: #eceff3; color: var(--muted); }
.chip[data-status="placeholder"] { background: var(--teal-soft); color: var(--teal); }
.chip[data-status="ok"] { background: var(--ok-soft); color: var(--ok); }
.chip[data-status="stale"], .chip[data-status="error"] { background: var(--bad-soft); color: var(--bad); }
.chip[data-status="not_found"] { background: var(--warn-soft); color: var(--warn); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-scope { background: #eef2f6; color: var(--navy); font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; font-size: 0.76rem; font-weight: 700; background: #eceff3; color: var(--muted); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge[data-health="up"] { background: var(--ok-soft); color: var(--ok); }
.badge[data-health="down"] { background: var(--bad-soft); color: var(--bad); }
.badge[data-health="unknown"] { background: #eceff3; color: var(--muted); }
.badge[data-deploy="live"] { background: var(--ok-soft); color: var(--ok); }
.badge[data-deploy="build"], .badge[data-deploy="staging"] { background: var(--accent-soft); color: #a55a10; }
.badge[data-deploy="internal"] { background: var(--teal-soft); color: var(--teal); }
.badge[data-deploy="maintenance"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-level="critical"], .badge[data-level="down"] { background: var(--bad-soft); color: var(--bad); }
.badge[data-level="risk"], .badge[data-level="warning"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-level="info"] { background: var(--teal-soft); color: var(--teal); }
.badge[data-agent="online"] { background: var(--ok-soft); color: var(--ok); }
.badge[data-agent="offline"] { background: #eceff3; color: var(--muted); }
.badge[data-agent="no_activity"], .badge[data-agent="no_backup"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-agent="error"] { background: var(--bad-soft); color: var(--bad); }

/* ---------- tombol & formulir ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f1f4f7; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #e07d1c; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-danger { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: 0.85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn-linklike { background: none; border: 0; padding: 6px 4px; min-height: 44px; color: var(--teal); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.btn-linklike:hover { text-decoration: underline; }
.btn-icon { width: 44px; padding: 0; font-size: 1.3rem; line-height: 1; }
.linklike { background: none; border: 0; padding: 6px 4px; min-height: 44px; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }

.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.form .field.wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .field > span.label { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea, .input {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #c5d0d9; border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
.field textarea { min-height: 90px; resize: vertical; }
.field .help { font-size: 0.76rem; color: var(--muted); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.toolbar .field { min-width: 160px; flex: 1 1 160px; }
.toolbar .toolbar-count { margin-left: auto; align-self: center; font-size: 0.85rem; color: var(--muted); }
.input-mono { font-family: var(--mono); letter-spacing: 0.3em; font-size: 1.3rem; text-align: center; }

/* ---------- tabel ---------- */
.table-scroll { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scrollbar-width: thin; scrollbar-color: #b9c4cf transparent; }
.table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: #b9c4cf; border-radius: 8px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #98a7b5; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { position: sticky; top: 0; z-index: 1; background: #fff; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #f6f9fb; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.table .mono { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.table .clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- daftar ringkas ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.list li .list-main { min-width: 0; display: flex; flex-direction: column; }
.list li .list-main strong { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li .list-main small { color: var(--muted); }
.list li.alert-critical { border-left: 4px solid var(--bad); background: #fff8f7; }
.list li.alert-risk { border-left: 4px solid var(--accent); background: #fffbf5; }
.empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed #c5d0d9; border-radius: var(--radius-sm); }

/* ---------- bilah progres ---------- */
.bar-row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 48px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.86rem; }
.bar-row .bar-label { color: var(--navy); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
progress { width: 100%; height: 10px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; background: #e6ecf1; overflow: hidden; }
progress::-webkit-progress-bar { background: #e6ecf1; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--teal); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--teal); border-radius: 999px; }
progress[data-tone="accent"]::-webkit-progress-value { background: var(--accent); }
progress[data-tone="accent"]::-moz-progress-bar { background: var(--accent); }

.deflist { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 0.88rem; }
.deflist dt { color: var(--muted); font-weight: 600; }
.deflist dd { margin: 0; color: var(--ink); word-break: break-word; }
.skeleton-block { padding: 24px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(11, 31, 51, 0.45); border: 0; padding: 0; cursor: pointer; z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 61; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(11, 31, 51, 0.25); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--navy); color: #fff; }
.drawer-head h2 { color: #fff; margin: 0; font-size: 1.2rem; word-break: break-word; }
.drawer-head p { color: #b7c7d6; margin: 4px 0 0; font-size: 0.82rem; }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.drawer-body section + section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer-body .btn-icon { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); color: #fff; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); z-index: 90; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(560px, 92vw); font-size: 0.9rem; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast-ok { background: var(--ok); }
.toast-error { background: var(--bad); }
.toast-warn { background: var(--warn); }

/* ---------- login ---------- */
.login-wrap { min-height: calc(100dvh - 65px - 60px); display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(135deg, var(--navy) 0%, #103c4a 55%, var(--teal) 100%); }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 18px; }
.login-brand strong { font-size: 1.2rem; color: var(--navy); }
.login-brand small { color: var(--muted); font-size: 0.74rem; }
.login-card h1 { font-size: 1.3rem; text-align: center; }
.login-card .lead { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.78rem; margin: 14px 0 10px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-email-picked { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f1f5f8; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.9rem; }
.login-foot { margin-top: 16px; font-size: 0.76rem; color: var(--muted); text-align: center; }

/* ---------- mobile: sidebar jadi bilah bawah ---------- */
@media (max-width: 820px) {
  .app, .app:not(.is-authed) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .view { grid-column: 1; grid-row: 2; padding: 14px 12px calc(var(--bottombar-h) + 16px); }
  .footer { grid-column: 1; grid-row: 3; padding-bottom: calc(var(--bottombar-h) + 12px); }
  .sidebar { grid-column: 1; grid-row: 4; position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: var(--bottombar-h); z-index: 40; border-top: 1px solid rgba(255, 255, 255, 0.12); overflow: hidden; }
  .nav-list { flex-direction: row; height: 100%; padding: 0 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 3px; min-width: 74px; min-height: var(--bottombar-h); padding: 6px 8px; font-size: 0.66rem; text-align: center; border-radius: 10px 10px 0 0; }
  .topbar { padding: 8px 12px; }
  .brand-text small { display: none; }
  .usermenu-email { display: none; }
  .toast { bottom: calc(var(--bottombar-h) + 12px); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 1.6rem; }
  .deflist { grid-template-columns: 110px 1fr; }
  .table-scroll { max-height: 70vh; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- aksesibilitas & teks bantu ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.note-line { margin: 10px 0 0; }
.break-all { word-break: break-all; }
.bad-text { color: var(--bad); }

/* ---------- grafik batang CSS (event per hari) ---------- */
.chart-scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: #b9c4cf transparent; }
.chart-scroll::-webkit-scrollbar { height: 8px; }
.chart-scroll::-webkit-scrollbar-thumb { background: #b9c4cf; border-radius: 8px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; min-width: 100%; }
.chart-col { flex: 1 1 0; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.chart-bar { width: 100%; max-width: 48px; height: calc(var(--pct, 0) * 1%); min-height: 2px; background: var(--teal); border-radius: 4px 4px 0 0; }
.chart-col[data-zero="true"] .chart-bar { background: #dbe3ea; }
.chart-col[data-peak="true"] .chart-bar { background: var(--accent); }
.chart-val { font-size: 0.68rem; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-day { font-size: 0.66rem; line-height: 1; color: var(--muted); white-space: nowrap; }
.chart-foot { margin-top: 8px; }

/* ---------- agent ---------- */
.agent-grid { margin-bottom: 12px; }
.agent-card .agent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.agent-card .agent-head h3 { margin-bottom: 2px; word-break: break-word; }
.agent-card .agent-head p { margin: 0; }
.agent-card .deflist { margin-bottom: 0; }

/* ---------- proyek & tugas ---------- */
.project-grid { align-items: start; }
.project-card .project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.project-card .project-head h3 { margin-bottom: 4px; }
.project-card .project-head p { margin: 0; }
.project-card .chip-row { margin-bottom: 10px; }
.project-card .bar-row { margin-bottom: 6px; }
.task-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.task .list-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.task .list-main strong { color: var(--navy); overflow-wrap: anywhere; }
.task .list-main small { color: var(--muted); }
.task .chip-row { margin-bottom: 0; }
.task.is-done .list-main strong { text-decoration: line-through; color: var(--muted); }
.task-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #b9c4cf; background: #fff; color: transparent; cursor: pointer; }
.task-toggle:hover { border-color: var(--teal); }
.task-toggle[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.task-toggle.is-static { cursor: default; border-style: dashed; }

/* ---------- keuangan ---------- */
.money-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.money-label { color: var(--muted); font-weight: 600; }
.money-value { color: var(--navy); font-size: 1.1rem; }

/* ---------- infrastruktur ---------- */
.alert-card { border-left: 4px solid var(--accent); background: #fffbf5; }
.limits-usage { min-width: 160px; }
.bar-row.compact { grid-template-columns: minmax(60px, 1fr) 48px auto; margin-bottom: 0; }

/* ---------- keamanan ---------- */
.matrix-cell { min-width: 150px; }
.key-form { margin-top: 8px; }
.key-box { margin-top: 12px; padding: 14px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent-soft); }
.key-box code { display: block; margin: 8px 0; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.85rem; }
.key-box .form-actions { margin-top: 4px; }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .chart { height: 140px; gap: 2px; }
  .chart-col { min-width: 12px; }
  .agent-card .agent-head, .project-card .project-head { flex-direction: column; align-items: stretch; }
  .task { flex-wrap: wrap; }
  .task .chip-row { width: 100%; padding-left: 52px; }
  .bar-row { grid-template-columns: minmax(90px, 120px) 1fr 44px; }
  .matrix-cell { min-width: 130px; }
}
