/* BERLIAN CORP OS — Executive Cockpit
   Navy gelap · putih · merah Berlian · emas halus · status hijau/kuning/merah/biru */
:root {
  --navy-950: #071226;
  --navy-900: #0b1b33;
  --navy-800: #10264a;
  --navy-700: #183461;
  --navy-600: #24477f;
  --ink: #0f1d33;
  --ink-2: #44526a;
  --ink-3: #6b778c;
  --line: #e3e8f0;
  --line-2: #eef2f7;
  --bg: #f2f5f9;
  --card: #ffffff;
  --red: #c8102e;
  --red-600: #a60d26;
  --red-50: #fdeef0;
  --gold: #c9a24a;
  --gold-50: #faf4e4;
  --blue: #1f6fd1;
  --blue-50: #e8f1fc;
  --ok: #16a34a;
  --ok-50: #e8f7ee;
  --warn: #d99a06;
  --warn-50: #fdf5e1;
  --bad: #dc2626;
  --bad-50: #fdecec;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 29, 51, .05), 0 4px 16px rgba(15, 29, 51, .05);
  --sidebar-w: 256px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c9d4e6; display: flex; flex-direction: column; overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-logo { width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.brand-logo img { width: 40px; height: 40px; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { color: #fff; font-size: 19px; letter-spacing: .03em; font-weight: 800; line-height: 1.1; }
.brand-text small { color: #8fb2dc; font-size: 10px; letter-spacing: .24em; font-weight: 600; }
.icon-btn.sidebar-close { display: none; margin-left: auto; color: #c9d4e6; background: transparent; border-color: rgba(255, 255, 255, .15); }

.nav { padding: 12px 10px 4px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #c9d4e6; font-weight: 500; position: relative; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, var(--red) 0%, var(--red-600) 100%); color: #fff; box-shadow: 0 6px 14px rgba(200, 16, 46, .28); }
.nav-item-sm { padding: 7px 12px; font-size: 13px; }
.nav-phase { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; color: var(--gold); border: 1px solid rgba(201, 162, 74, .45); border-radius: 6px; padding: 0 5px; }
.nav-item.active .nav-phase { color: #fff; border-color: rgba(255, 255, 255, .5); }
.nav-section { padding: 14px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 10px; }
.nav-heading { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7f8ea8; padding: 0 12px 8px; font-weight: 700; }
.nav-sys { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; align-items: center; padding: 6px 12px; border-radius: 8px; color: #c9d4e6; font-size: 13px; }
.nav-sys small { grid-column: 2; color: #7f8ea8; font-size: 11px; line-height: 1.2; }
.nav-sys:hover, .nav-sys.active { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.sidebar-foot { margin-top: auto; padding: 16px 22px 20px; font-size: 11px; color: #7f8ea8; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar-foot .ver { color: var(--gold); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: #8a96aa; }
.dot-connected { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.dot-configured { background: var(--blue); }
.dot-error { background: var(--bad); }
.dot-planned { background: transparent; border: 1.5px solid #8a96aa; }
.dot-disabled { background: #4b5568; }

/* ---------- Shell & topbar ---------- */
.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 12px 28px; background: rgba(242, 245, 249, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title h1 { font-size: 18px; font-weight: 700; }
.topbar-tag { margin-left: auto; font-size: 12px; color: var(--ink-3); font-style: italic; text-align: right; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn.menu-btn { display: none; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--ink); text-decoration: none; border-color: #cfd7e3; }

.lang-switch { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.lang-switch button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 5px 9px; border-radius: 7px; cursor: pointer; }
.lang-switch button.on { background: var(--navy-900); color: #fff; }

.profile { position: relative; }
.profile summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 3px 8px 3px 3px; border-radius: 12px; }
.profile summary::-webkit-details-marker { display: none; }
.profile summary:hover { background: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: 0 0 0 2px var(--gold-50), 0 0 0 3px var(--gold); }
.profile-text { display: flex; flex-direction: column; line-height: 1.2; }
.profile-text strong { font-size: 13px; }
.profile-text small { font-size: 11.5px; color: var(--ink-3); }
.profile .menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 29, 51, .14); min-width: 210px; padding: 6px; z-index: 50; }
.profile .menu a, .profile .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.profile .menu a:hover, .profile .menu button:hover { background: var(--line-2); text-decoration: none; }
.profile .menu form { margin: 0; }

.main { padding: 24px 28px 48px; flex: 1; outline: none; }

/* ---------- Building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.card-head h2, .card-head h3, .card-head h4 { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.card-head h2 { font-size: 17px; }
.card-head h3 { font-size: 15px; }
.card-head h4 { font-size: 13.5px; }
.card-head .ic { color: var(--navy-600); }
.count { min-width: 24px; height: 22px; border-radius: 11px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 7px; }
.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-phase { background: var(--gold-50); color: #8a6a1f; border: 1px solid rgba(201, 162, 74, .35); }
.badge-connected { background: var(--ok-50); color: #0f7a37; }
.badge-planned { background: var(--line-2); color: var(--ink-2); }
.badge-error { background: var(--bad-50); color: var(--bad); }
.badge-disabled { background: #eceef2; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; background: var(--blue-50); color: #1d4f91; border-radius: 7px; padding: 3px 8px; }
.tag-sm { font-size: 10.5px; padding: 1px 6px; background: var(--line-2); color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 13.5px; border-radius: 10px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(200, 16, 46, .22); }
.btn-primary:hover { background: var(--red-600); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cbd4e1; }
.btn-outline { background: #fff; border-color: var(--red); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }

.alert { border-radius: 11px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.alert-error { background: var(--bad-50); border-color: #f6caca; color: #9b1c1c; }
.alert-warn { background: var(--warn-50); border-color: #f1dca3; color: #7a5503; }
.alert-ok { background: var(--ok-50); border-color: #bfe6cd; color: #0f6a31; }

/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 16px; }
.empty-compact { padding: 18px 10px; }
.empty-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--line-2); display: grid; place-items: center; color: var(--ink-3); }
.empty-compact .empty-ic { width: 40px; height: 40px; }
.empty-title { font-weight: 700; color: var(--ink-2); }
.empty-msg { color: var(--ink-3); font-size: 13px; max-width: 340px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field input, .field select { font: inherit; font-weight: 500; color: var(--ink); border: 1px solid #d5dce7; border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%; }
.field select[multiple] { padding: 6px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(36, 71, 127, .15); }
.field-inline { max-width: 260px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.field-error { color: var(--bad); font-weight: 600; font-size: 12px; }
.fieldset { border: 1px dashed #d5dce7; border-radius: 12px; padding: 12px 14px 14px; margin: 0; }
.fieldset legend { font-weight: 700; font-size: 12.5px; color: var(--ink-2); padding: 0 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

/* table */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.pager .muted { margin-right: auto; }
.search-inline input { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 220px; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 12px; }
.dl dt { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.checklist .ic { color: var(--red); width: 16px; height: 16px; margin-top: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.sev { width: 8px; border-radius: 4px; background: var(--blue); flex: none; }
.sev-critical { background: var(--bad); }
.sev-warning { background: var(--warn); }

.temp-pass { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.temp-pass .pass { font-size: 16px; font-weight: 700; background: #fff; padding: 8px 14px; border-radius: 9px; border: 1px dashed var(--gold); letter-spacing: .04em; user-select: all; }

.page-narrow { max-width: 760px; }

/* ---------- Command Center ---------- */
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.greet { display: flex; align-items: center; gap: 14px; }
.greet h2 { font-size: 24px; font-weight: 800; }
.greet-sun { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #ffd36b 0 45%, transparent 47%), conic-gradient(from 0deg, #ffc53d 0 6%, transparent 6% 12.5%, #ffc53d 12.5% 18.5%, transparent 18.5% 25%, #ffc53d 25% 31%, transparent 31% 37.5%, #ffc53d 37.5% 43.5%, transparent 43.5% 50%, #ffc53d 50% 56%, transparent 56% 62.5%, #ffc53d 62.5% 68.5%, transparent 68.5% 75%, #ffc53d 75% 81%, transparent 81% 87.5%, #ffc53d 87.5% 93.5%, transparent 93.5% 100%); flex: none; }
.cc-tools { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; min-width: 280px; }
.ask { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px 0 14px; flex: 1; max-width: 460px; color: var(--ink-3); }
.ask input { border: 0; background: transparent; font: inherit; padding: 11px 0; flex: 1; min-width: 0; color: var(--ink); }
.ask input:disabled { cursor: not-allowed; }
.focus { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0 18px; padding: 14px 18px; background: linear-gradient(90deg, var(--gold-50), #fff); border: 1px solid rgba(201, 162, 74, .35); border-radius: var(--radius); }
.focus-q { font-size: 40px; line-height: .8; color: var(--gold); font-weight: 800; font-family: Georgia, serif; }
.focus strong { display: block; font-size: 13px; color: #6b5317; }
.focus p { color: var(--ink-2); font-size: 13.5px; }

.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-height: 132px; }
.kpi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.kpi-ic .ic { width: 16px; height: 16px; }
.kpi-label { font-weight: 700; font-size: 13px; color: var(--ink-2); flex: 1; min-width: 0; }
.kpi-period { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--line-2); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi-na { color: #b6c0cf; }
.kpi-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi-src { margin-top: auto; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi-src .dot { width: 7px; height: 7px; }

.panels { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.panels .card-head { align-items: flex-start; }
.panels .card-head h3 { min-width: 0; }
.panels .card { margin: 0; }
.cc-side .card + .card { margin-top: 14px; }
.brief .card-head h3 .ic { color: var(--red); }
.phases { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.phases li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: var(--ink-3); font-size: 13px; }
.phases li em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--red); padding: 1px 8px; border-radius: 999px; }
.phases li.now { background: var(--red-50); color: var(--ink); font-weight: 700; }
.phases li.done { color: var(--ok); }
.ph-n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.phases li.now .ph-n { background: var(--red); border-color: var(--red); color: #fff; }

.prio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.prio-grid .card { margin: 0; }
.prio-card .card-head { margin-bottom: 8px; }

/* modul placeholder */
.module-hero { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #dbe4f3; border: 0; }
.module-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: var(--gold); display: grid; place-items: center; flex: none; }
.module-ic .ic { width: 26px; height: 26px; }
.module-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.module-row h2 { color: #fff; font-size: 20px; }
.module-text p { max-width: 720px; }
.module-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; }
.module-grid .card, .panels .card, .health .kpi { margin: 0; min-width: 0; }
.error-page .card { text-align: center; padding: 40px 24px; }
.err-code { font-size: 54px; font-weight: 800; color: var(--red); line-height: 1; margin-bottom: 8px; }
.error-page h2 { margin-bottom: 8px; }
.error-page .btn { margin-top: 18px; }

/* ---------- Login ---------- */
body.plain { min-height: 100vh; }
body.plain > .error-page { margin: 10vh auto; padding: 0 16px; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-hero { background: radial-gradient(1200px 600px at 10% 0%, var(--navy-700) 0%, transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-950)); color: #c9d4e6; display: flex; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(201, 162, 74, .25); }
.login-hero-inner { max-width: 420px; position: relative; z-index: 1; }
.hero-logo { width: 72px; height: 72px; display: block; margin-bottom: 26px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .4)) drop-shadow(0 0 22px rgba(61, 165, 245, .22)); }
.hero-logo img { width: 72px; height: 72px; display: block; }
.login-hero h2 { color: #fff; font-size: 30px; font-weight: 800; letter-spacing: .04em; }
.hero-tag { color: var(--gold); font-weight: 600; margin: 4px 0 30px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 34px; display: flex; flex-direction: column; gap: 14px; }
.hero-points li { display: flex; gap: 12px; align-items: center; }
.hero-points .ic { color: var(--gold); }
.hero-foot { font-style: italic; color: #8a98b2; font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 18px; }
.login-panel { display: flex; flex-direction: column; padding: 24px 32px; background: #fff; }
.login-top { display: flex; justify-content: flex-end; }
.login-form { width: 100%; max-width: 380px; margin: auto; display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { font-size: 26px; font-weight: 800; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .05em; color: var(--navy-900); }
.login-mobile-brand img { width: 36px; height: 36px; }

/* ---------- Mobile ---------- */
.scrim { display: none; }
.bottom-nav { display: none; }

@media (max-width: 1320px) {
  .topbar-tag { display: none; }
  .topbar-actions { margin-left: auto; }
}

@media (max-width: 1200px) {
  .cc-grid { grid-template-columns: 1fr; }
  .panels { grid-template-columns: 1fr 1fr; }
  .panel-trend { grid-column: 1 / -1; }
  .prio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-tag { display: none; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(7, 18, 38, .5); z-index: 35; }
  .icon-btn.sidebar-close { display: grid; }
  .shell { margin-left: 0; }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar-actions { margin-left: auto; }
  .topbar-title h1 { font-size: 16px; }
  .profile-text { display: none; }
  .main { padding: 16px 16px 96px; }
  .health { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 116px; padding: 12px; }
  .kpi-value { font-size: 22px; }
  .kpi-top { gap: 6px; }
  .kpi-label { flex-basis: calc(100% - 40px); }
  .kpi-period { order: 3; }
  .panels, .module-grid, .form-grid { grid-template-columns: 1fr; }
  .greet { width: 100%; }
  .greet > div:last-child { min-width: 0; }
  .cc-tools { min-width: 0; width: 100%; }
  .ask { max-width: none; }
  .greet h2 { font-size: 20px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy-900); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .08); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #9fb0ca; font-size: 10.5px; font-weight: 600; padding: 6px 2px; border-radius: 10px; text-decoration: none; }
  .bottom-nav a.active { color: #fff; background: rgba(200, 16, 46, .9); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-mobile-brand { display: flex; }
  .login-panel { padding: 18px; }
  .module-hero { flex-direction: column; }
  .form-danger { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .prio-grid { grid-template-columns: 1fr; }
  .lang-switch button { padding: 5px 7px; }
  .chip { display: none; }
  .search-inline input { min-width: 0; width: 100%; }
  .card-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* =====================================================================
   FASE 2 — komponen data
   ===================================================================== */
:root {
  --s1: #1f6fd1;      /* omzet */
  --s2: #16a34a;      /* profit */
  --s3: #c9a24a;      /* target */
  --c1: #1f6fd1; --c2: #c8102e; --c3: #16a34a; --c4: #c9a24a; --c5: #7c3aed; --c6: #0891b2;
}
.center { text-align: center; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 160px; }
.w-num { width: 120px; }
.w-prog { width: 150px; }
.page-title { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.page-title .ic { color: var(--red); }

/* status pill (warna ditentukan target) */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-on_track { background: var(--ok-50); color: #0f7a37; }
.pill-at_risk { background: var(--warn-50); color: #8a5d00; }
.pill-off_track { background: var(--bad-50); color: #b91c1c; }
.pill-completed { background: var(--blue-50); color: #1d4f91; }
.pill-no_data { background: var(--line-2); color: var(--ink-3); }
.t-on_track { color: #0f7a37; font-weight: 700; }
.t-at_risk { color: #8a5d00; font-weight: 700; }
.t-off_track { color: #b91c1c; font-weight: 700; }
.lvl { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.lvl-critical { background: #b91c1c; color: #fff; }
.lvl-at_risk { background: #f59e0b; color: #fff; }
.lvl-watch { background: #fde68a; color: #6b4e00; }
.lvl-normal { background: var(--ok-50); color: #0f7a37; }
.demo-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #8a6a1f; background: var(--gold-50); border: 1px dashed var(--gold); border-radius: 6px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }
.demo-strip { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--gold-50); border: 1px dashed rgba(201, 162, 74, .7); color: #6b5317; font-size: 12.5px; }
.tag-act { background: var(--red-50); color: var(--red); font-weight: 700; }
.count-sm { height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
.count-bad { background: var(--bad-50); color: var(--bad); }
.delta { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.delta.good { color: #0f7a37; }
.delta.bad { color: #b91c1c; }

/* periode */
.period-form { margin: 0; }
.chip-select { padding: 0 6px 0 12px; }
.chip-select select { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 8px 4px; cursor: pointer; }

/* kartu KPI */
.kpi { border-top: 3px solid transparent; }
.kpi-on_track { border-top-color: var(--ok); }
.kpi-at_risk { border-top-color: var(--warn); }
.kpi-off_track { border-top-color: var(--bad); }
.kpi-value small { font-size: 15px; color: var(--ink-3); font-weight: 700; }
.kpi-delta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; min-height: 18px; }
.kpi-target { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }

/* grafik */
.chart-wrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.dashed { stroke-dasharray: 5 5; stroke-width: 1.8; }
.chart .area { stroke: none; opacity: .09; }
.chart .dot { stroke: #fff; stroke-width: 2; }
.chart .s1 { stroke: var(--s1); fill: var(--s1); }
.chart .s2 { stroke: var(--s2); fill: var(--s2); }
.chart .s3 { stroke: var(--s3); fill: var(--s3); }
.chart .line.s1, .chart .line.s2, .chart .line.s3 { fill: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: -4px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 4px; border-radius: 2px; display: inline-block; background: var(--s1); }
.lg.s2 { background: var(--s2); }
.lg.s3 { background: var(--s3); }
.lg.dashed { background: repeating-linear-gradient(90deg, var(--s3) 0 4px, transparent 4px 7px); }
.lg.c1 { background: var(--c1); } .lg.c2 { background: var(--c2); } .lg.c3 { background: var(--c3); }
.lg.c4 { background: var(--c4); } .lg.c5 { background: var(--c5); } .lg.c6 { background: var(--c6); }
.chart-donut .donut-bg { fill: none; stroke: var(--line-2); stroke-width: 5.5; }
.chart-donut .donut-seg { fill: none; stroke-width: 5.5; }
.donut-seg.c1 { stroke: var(--c1); } .donut-seg.c2 { stroke: var(--c2); } .donut-seg.c3 { stroke: var(--c3); }
.donut-seg.c4 { stroke: var(--c4); } .donut-seg.c5 { stroke: var(--c5); } .donut-seg.c6 { stroke: var(--c6); }
.donut-c1 { font-size: 5px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.donut-c2 { font-size: 2.6px; fill: var(--ink-3); font-family: var(--font); }
.mix { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mix-chart { width: 170px; max-width: 100%; }
.mix-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.mix-legend li { display: flex; align-items: center; gap: 8px; }
.mix-legend .lg { width: 10px; height: 10px; border-radius: 3px; }
.mix-legend span { flex: 1; }
.spark { width: 64px; height: 22px; display: block; }
.spark polyline { fill: none; stroke: var(--s1); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark.sp-on_track polyline { stroke: var(--ok); }
.spark.sp-at_risk polyline { stroke: var(--warn); }
.spark.sp-off_track polyline { stroke: var(--bad); }
.pbar { width: 100%; height: 8px; display: block; }
.pbar-bg { fill: var(--line-2); }
.pbar-fg { fill: var(--ok); }
.pbar.at_risk .pbar-fg { fill: var(--warn); }
.pbar.off_track .pbar-fg { fill: var(--bad); }
.pbar.completed .pbar-fg { fill: var(--blue); }
.prog { display: flex; align-items: center; gap: 8px; }
.prog span { font-size: 12px; font-weight: 700; min-width: 36px; text-align: right; }

.table-compact th, .table-compact td { padding: 8px 6px; }

/* brief */
.brief-sub { font-size: 12px; color: var(--ink-3); margin: -8px 0 10px; }
.brief-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bi { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--line-2); border-left: 3px solid var(--blue); }
.bi-critical { background: #fdf0f0; border-left-color: var(--bad); }
.bi-at_risk { background: #fff7e8; border-left-color: var(--warn); }
.bi-watch { background: #fffbeb; border-left-color: #eab308; }
.bi-normal { background: #effaf3; border-left-color: var(--ok); }
.bi-n { width: 24px; height: 24px; border-radius: 50%; background: var(--navy-900); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; }
.bi-critical .bi-n { background: var(--bad); }
.bi-at_risk .bi-n { background: var(--warn); }
.bi-body { flex: 1; min-width: 0; }
.bi-title { font-weight: 700; color: var(--ink); display: block; line-height: 1.35; }
.bi-body p { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.bi-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.brief-full .bi { padding: 14px; align-items: center; }
.level-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.ls { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: baseline; gap: 10px; box-shadow: var(--shadow); }
.ls strong { font-size: 24px; }
.ls span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ls-critical strong { color: var(--bad); } .ls-at_risk strong { color: var(--warn); } .ls-watch strong { color: #b58900; } .ls-normal strong { color: var(--ok); }

/* prioritas */
.mini-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.mini-list li { display: grid; grid-template-columns: 8px 1fr; column-gap: 8px; align-items: baseline; }
.mini-list li small { grid-column: 2; font-size: 11.5px; }
.mini-list a { color: var(--ink); font-weight: 600; }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); transform: translateY(-1px); }
.lv-critical { background: var(--bad); } .lv-at_risk { background: var(--warn); } .lv-watch { background: #eab308; } .lv-normal { background: var(--ok); }
.more { font-size: 12.5px; font-weight: 700; }
.next-meet { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.next-meet .ic { width: 15px; height: 15px; color: var(--ink-3); margin-top: 2px; }

/* toolbar & tabs */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.toolbar form { margin: 0; }
.tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .tabs { margin-bottom: 0; }
.tabs a { padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { text-decoration: none; background: var(--line-2); }
.tabs a.on { background: var(--navy-900); color: #fff; }
.tabs a.on .count { background: rgba(255, 255, 255, .2); color: #fff; }
.tabs-sm { margin: 0; padding: 3px; }
.tabs-sm a { padding: 4px 9px; font-size: 12px; }

/* vision */
.vision { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; background: linear-gradient(135deg, #fff 0%, #f4f7fc 100%); }
.vision-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vision-top h2 { font-size: 22px; }
.vision blockquote { margin: 10px 0 8px; font-size: 16px; line-height: 1.5; color: var(--navy-800); font-weight: 600; border-left: 3px solid var(--gold); padding-left: 14px; }
.vision-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.vision-actions form { margin: 0; }
.vision-targets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.vt { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; }
.vt-ic { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; background: var(--gold-50); color: #8a6a1f; display: grid; place-items: center; }
.vt-ic .ic { width: 16px; height: 16px; }
.vt strong { font-size: 16px; }
.vt small { color: var(--ink-3); font-size: 11.5px; }
.row-now td { background: #fffaf0; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--blue-50); color: #1d4f91; border-radius: 10px; padding: 10px 12px; margin: 12px 0 6px; font-size: 13px; }
.note .ic { width: 16px; height: 16px; margin-top: 2px; }

.pillar .card-head h3 { gap: 10px; }
.pillar-code { font-size: 11px; font-weight: 800; color: #fff; background: var(--navy-700); border-radius: 6px; padding: 2px 7px; }
.pillar-desc { margin: -6px 0 10px; font-size: 13px; }
.sc-table td { vertical-align: middle; }
.inline-edit { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.inline-edit summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.inline-edit summary .ic { width: 14px; height: 14px; }
.inline-edit form { margin-top: 10px; }
.form-row { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.form-row > input, .form-row > select { font: inherit; border: 1px solid #d5dce7; border-radius: 10px; padding: 9px 11px; background: #fff; min-width: 0; }
.form-row > input:not(.w-num) { flex: 1; min-width: 150px; }
.form-wrap .field { min-width: 150px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
textarea { font: inherit; font-weight: 500; color: var(--ink); border: 1px solid #d5dce7; border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; }
.btn-link-danger { background: none; border: 0; color: var(--bad); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 0; }
.toolbar .muted.small { align-self: center; }

/* detail pages */
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head h2 { font-size: 21px; margin: 2px 0 8px; }
.detail-head > div:first-child { min-width: 0; flex: 1 1 380px; }
.detail-head p { margin-top: 8px; }
.crumb { font-size: 12px; color: var(--ink-3); margin: 0 !important; }
.meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meta-row .ic { width: 14px; height: 14px; vertical-align: -2px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions form { margin: 0; }
.stat-strip, .facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 16px 0 6px; }
.stat-strip > div, .facts > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-strip small, .facts small { color: var(--ink-3); font-weight: 600; font-size: 11.5px; }
.stat-strip strong { font-size: 19px; }
.facts strong { font-size: 14px; overflow-wrap: anywhere; }
.stat-strip em { font-style: normal; font-size: 11.5px; }
.facts { margin-bottom: 16px; }
.lock-note { display: flex; gap: 8px; align-items: center; }
.annual-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.annual-row .field { max-width: 260px; }
.big { font-size: 20px; color: var(--ink); }
.breakdown input.w-num { font: inherit; border: 1px solid #d5dce7; border-radius: 8px; padding: 5px 8px; text-align: right; width: 150px; }
.row-q td { background: var(--line-2); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.two-col > .card { margin: 0; }
.two-col h4 { font-size: 13px; margin: 10px 0 8px; color: var(--ink-2); }
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.row-list li:last-child { border-bottom: 0; }
.row-list li > div:first-child { min-width: 0; }
.row-list .right { display: flex; align-items: center; gap: 8px; flex: none; text-align: right; }
.plain-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.initiative { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.initiative:last-child { border-bottom: 0; }
.init-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.init-head b { margin-left: auto; }
.milestones { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.milestones li { display: flex; align-items: center; gap: 6px; }
.ms-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink-3); }
.ms-done .ms-dot { background: var(--ok); border-color: var(--ok); }
.ms-in_progress .ms-dot { border-color: var(--warn); }
.dstat, .kstat, .mstat { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.dstat-waiting_approval, .kstat-pending_review { background: var(--warn-50); color: #8a5d00; }
.dstat-approved, .dstat-in_progress, .kstat-active { background: var(--blue-50); color: #1d4f91; }
.dstat-completed, .mstat-done { background: var(--ok-50); color: #0f7a37; }
.dstat-rejected { background: var(--bad-50); color: #b91c1c; }
.mstat-scheduled { background: var(--blue-50); color: #1d4f91; }
.prio { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.prio-high { background: var(--bad-50); color: #b91c1c; }
.prio-medium { background: var(--warn-50); color: #8a5d00; }
.prio-low { background: var(--line-2); color: var(--ink-2); }
.review-box { border: 1px solid rgba(200, 16, 46, .25); background: linear-gradient(180deg, #fff, #fff8f8); }
.review-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.review-actions form { margin: 0; }
.reject-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.choice:hover { border-color: var(--navy-600); }
.choice input { margin-top: 4px; }
.dl-stack { grid-template-columns: 1fr; gap: 4px; }
.dl-stack dd { margin-bottom: 10px; font-weight: 500; }
.opt-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.opt-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.opt-list li.chosen { border-color: var(--ok); background: var(--ok-50); }
.opt-row { display: grid; grid-template-columns: 26px 1.2fr 1.4fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-row-agenda { grid-template-columns: 26px 1.4fr 1.4fr 80px; }
.opt-row input, .opt-row select { font: inherit; border: 1px solid #d5dce7; border-radius: 9px; padding: 8px 10px; min-width: 0; width: 100%; background: #fff; }
.opt-n { width: 24px; height: 24px; border-radius: 50%; background: var(--navy-900); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--navy-600); margin-top: 5px; flex: none; box-shadow: 0 0 0 3px var(--blue-50); }
.comments { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comments li { display: flex; gap: 10px; }
.comments p { margin-top: 2px; font-size: 13.5px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; flex: none; box-shadow: none; }

/* cascade */
.cascade-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cascade-goal { display: flex; flex-direction: column; background: var(--navy-900); color: #fff; padding: 10px 14px; border-radius: 12px; }
.cascade-goal:hover { text-decoration: none; background: var(--navy-700); }
.cascade-goal small { color: var(--gold); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cascade-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; position: relative; }
.cascade-col { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 12px; padding: 10px 12px; font-size: 13px; background: #fbfcfe; }
.cascade-col ul { margin: 8px 0 0; padding-left: 16px; color: var(--ink-2); }
.dept-chip { display: inline-block; font-size: 11px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

/* meetings */
.meet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.meet { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.meet:last-child { border-bottom: 0; }
.meet-date { width: 48px; flex: none; text-align: center; background: var(--navy-900); color: #fff; border-radius: 10px; padding: 6px 0; display: flex; flex-direction: column; }
.meet-date strong { font-size: 18px; line-height: 1.1; }
.meet-date small { font-size: 11px; color: var(--gold); text-transform: uppercase; }
.meet-body { flex: 1; min-width: 0; }
.mtype { font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-50); padding: 1px 7px; border-radius: 6px; }
.flow-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; counter-reset: st; }
.flow-steps li { counter-increment: st; font-size: 12px; font-weight: 700; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; display: flex; align-items: center; gap: 6px; }
.flow-steps li::before { content: counter(st); width: 18px; height: 18px; border-radius: 50%; background: var(--navy-900); color: #fff; display: grid; place-items: center; font-size: 10.5px; }
.agenda { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.people li { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.review-pack { margin-top: 16px; border-top: 3px solid var(--gold); }
.rp-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 4px; }
.rpm { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rpm small { color: var(--ink-3); font-weight: 600; }
.rpm strong { font-size: 18px; }
.notes { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notes .mnote { display: flex; gap: 10px; align-items: flex-start; background: var(--line-2); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.ntype { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: #fff; color: var(--ink-2); flex: none; margin-top: 1px; }
.mnote-decision .ntype { background: var(--warn-50); color: #8a5d00; }
.mnote-action .ntype { background: var(--blue-50); color: #1d4f91; }
.mnote-followup .ntype { background: var(--ok-50); color: #0f7a37; }

/* search & notif */
.search-big { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow); margin-bottom: 14px; color: var(--ink-3); }
.search-big input { flex: 1; border: 0; font: inherit; font-size: 15px; padding: 8px 0; min-width: 0; background: transparent; color: var(--ink); }
.search-big input:focus { outline: none; }
.top-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--ink-3); width: 260px; }
.top-search input { border: 0; background: transparent; font: inherit; padding: 9px 0; min-width: 0; flex: 1; color: var(--ink); }
.top-search input:focus { outline: none; }
.bell { position: relative; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.notif-list li { align-items: stretch; }
.notif-list li.unread { background: #f7faff; }
.notif-body { color: var(--ink); flex: 1; }
.notif-body:hover { text-decoration: none; }
.notif-body p { font-size: 13px; color: var(--ink-2); }
.sev-info { background: var(--blue); }

@media (max-width: 1200px) {
  .stat-strip, .facts, .rp-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vision { grid-template-columns: 1fr; }
  .top-search { width: 200px; }
}
@media (max-width: 900px) {
  .two-col, .level-summary { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .stat-strip, .facts, .rp-metrics { grid-template-columns: 1fr 1fr; }
  .top-search { display: none; }
  .opt-row, .opt-row-agenda { grid-template-columns: 26px 1fr; }
  .opt-row > :nth-child(n+3) { grid-column: 2; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .cc-tools { flex-wrap: wrap; }
  .period-form { width: 100%; }
  .period-form .chip { display: inline-flex; }
  .kpi-target .muted { font-size: 11px; }
  .vision-targets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .vision-targets { grid-template-columns: 1fr; }
  .meet { flex-wrap: wrap; }
  .breakdown input.w-num { width: 110px; }
  .chip-select { display: inline-flex !important; }
}

/* --- perbaikan tata letak Command Center (Fase 2) --- */
.panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panels .panel-trend { grid-column: 1 / -1; }
.prio-grid > .card, .cc-grid > *, .cc-main, .cc-side { min-width: 0; }
.mini-list li { grid-template-columns: 8px minmax(0, 1fr); }
.mini-list a, .mini-list small, .bi-title, .row-list a { overflow-wrap: anywhere; }
.next-meet span { min-width: 0; overflow-wrap: anywhere; }
.table-compact th { white-space: nowrap; font-size: 10.5px; }
.panels .table-compact td:first-child { white-space: normal; }
@media (max-width: 1200px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
  .chart .axis { font-size: 14px; }
}
.next-meet span { flex: 1 1 0; }
/* HP: prioritas mobile = kesehatan -> alert/brief -> keputusan & aksi -> grafik */
@media (max-width: 900px) {
  .cc { display: flex; flex-direction: column; }
  .cc-grid, .cc-main, .cc-side { display: contents; }
  .cc-head { order: 1; }
  .demo-strip { order: 2; }
  .focus { order: 3; }
  .health { order: 4; margin-top: 14px; }
  .brief { order: 5; margin-top: 14px; }
  .priorities { order: 6; }
  .panels { order: 7; }
  .system-status { order: 8; margin-top: 14px; }
}
.table th.num { text-align: right; }
.stat-strip > div > .pill, .rpm > .pill { align-self: flex-start; }
.vision + .tabs { margin-top: 16px; }
.cascade-col .dept-chip { display: block; }

/* ---------- Fase 3: Business Performance & Integrasi ---------- */
.alert-info { background: #eef4ff; border-color: #c9d9f6; color: #1d3f78; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-info .ic { width: 16px; height: 16px; flex: none; }
.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; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.perf-tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.perf .kpi-sub.small { font-size: 12px; }
.perf .kpi-src a { color: inherit; font-weight: 600; }
.catalog { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.catalog li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.catalog li:last-child { border-bottom: 0; padding-bottom: 0; }
.catalog .badge { margin-left: 6px; }
.map-src { font-size: 14px; margin: 18px 0 6px; }
.map-form { margin: 0; }
.map-form select { font: inherit; font-size: 12.5px; border: 1px solid #d5dce7; border-radius: 9px; padding: 6px 8px; background: #fff; max-width: 210px; }
.row-warn td { background: #fffaf0; }
.integ .table td small .ic { width: 12px; height: 12px; vertical-align: -2px; }
.btn.is-busy { opacity: .7; cursor: progress; }
@media (max-width: 520px) {
  .perf-tiles { grid-template-columns: minmax(0, 1fr); }
  .map-form select { max-width: 100%; flex: 1 1 140px; }
}
.two-col > *, .page > .card { min-width: 0; }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table-stack td { border: 0; padding: 3px 0; text-align: left !important; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
  .table-stack td.actions { display: flex; gap: 6px; justify-content: flex-start; }
  .table-stack .map-form { display: flex; flex-wrap: wrap; gap: 6px; }
}

/* ---------- Fase 4: AI Assistant & breakdown visi ---------- */
.ai-ask .card-head h2 { display: flex; align-items: center; gap: 8px; }
.ai-form { display: flex; gap: 8px; margin: 6px 0 12px; }
.ai-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; border: 1px solid #d5dce7; border-radius: 12px; padding: 12px 14px; background: #fff; }
.ai-form input:focus { outline: 2px solid var(--navy-900); outline-offset: 1px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ai-chips form { margin: 0; }
.ai-chips .chip { cursor: pointer; font-weight: 600; }
.ai-chips .chip:hover { border-color: var(--navy-900); color: var(--navy-900); }
.ai-block { margin-bottom: 16px; }
.ai-block h4, .ai-year h4, .ai-audit h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 14px 0 6px; }
.ai-lead { font-size: 15.5px; font-weight: 600; color: var(--ink-1, #0f172a); }
.ai-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }
.ai-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ai-recs li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.ai-recs li:last-child { border-bottom: 0; }
.ai-recs li small { display: block; margin-top: 3px; }
.ai-recs form { margin: 0; flex: none; }
.ai-fc { display: flex; flex-wrap: wrap; gap: 28px; margin: 6px 0 12px; }
.ai-fc > div { display: flex; flex-direction: column; gap: 2px; }
.ai-big { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.ai-history li { margin-bottom: 4px; }
.ai-gen { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: linear-gradient(90deg, #f3f6ff, #fff); }
.ai-gen h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.ai-gen-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ai-gen-act form { margin: 0; }
.ai-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ai-year { margin: 0; }
.ai-year .card-head input { font: inherit; border: 1px solid #d5dce7; border-radius: 8px; padding: 6px 8px; flex: 1; min-width: 0; margin-left: 10px; }
.ai-year input.w-num { width: 140px; font: inherit; border: 1px solid #d5dce7; border-radius: 8px; padding: 6px 8px; text-align: right; }
.ai-decide { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ai-decide form { margin: 0; }
.why-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--navy-900); }
.why-link .ic { width: 13px; height: 13px; }
.daily { border-left: 3px solid var(--gold); }
@media (max-width: 640px) {
  .ai-form { flex-direction: column; }
  .ai-gen { flex-direction: column; align-items: stretch; }
  .ai-gen-act { align-items: stretch; text-align: left; }
  .ai-recs li { flex-direction: column; }
  .ai-years { grid-template-columns: minmax(0, 1fr); }
  .ai-year input.w-num { width: 100%; }
}
.alert-info { flex-wrap: nowrap; align-items: flex-start; }
.alert-info .ic { margin-top: 2px; }
.ai-years > .card { margin: 0; }

/* ---------- 2FA ---------- */
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-900); }
.tfa-tabs { align-self: flex-start; }
.tfa-code { font-size: 22px !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.login-form-sub { margin-top: 0; gap: 6px; align-items: center; text-align: center; }
.login-form + .login-form-sub { margin-top: -8px; }
.login-wrap-single { grid-template-columns: 1fr; background: var(--bg, #f4f6fa); }
.login-wrap-single .login-panel { max-width: 560px; width: 100%; margin: 0 auto; background: transparent; gap: 12px; }
.tfa-setup { display: flex; flex-direction: column; gap: 12px; }
.tfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.tfa-steps li::marker { font-weight: 800; color: var(--navy-900); }
.tfa-qr { margin: 10px 0 6px; }
.tfa-qr img { width: 200px; height: 200px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; image-rendering: pixelated; }
.tfa-secret { display: inline-block; font-size: 15px; letter-spacing: .08em; padding: 8px 10px; background: var(--line-2); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.tfa-codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tfa-codes code { display: block; text-align: center; font-size: 16px; letter-spacing: .08em; padding: 8px; background: var(--line-2); border-radius: 8px; }
@media (max-width: 900px) { .login-wrap-single .login-panel { padding: 14px; } .tfa-codes code { font-size: 14px; } }

/* ---------- Fase 5: simulator, explorer, recovery ---------- */
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll .table { min-width: 560px; }
.sim-page .card, .explorer-page .card { min-width: 0; }
.sim-variant > summary { cursor: pointer; padding: 2px 0 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.sim-risks { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.sim-factors { margin: 6px 0 14px; }
.sim-factors summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.sim-compare td:first-child { font-weight: 600; }
.exp-filter { margin: 10px 0 14px; }
.exp-export { display: inline-flex; gap: 6px; margin-left: auto; }
.check-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.check-list .check { align-items: flex-start; font-weight: 500; }
.rstat { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.rstat-draft { background: var(--warn-50); color: #7a5503; }
.rstat-approved { background: var(--ok-50); color: #0f7a37; }
.rstat-rejected { background: #fdecee; color: #a3122a; }
.mstat-draft { background: var(--warn-50); color: #7a5503; }
@media (max-width: 900px) { .exp-export { margin-left: 0; } }
