/* =====================================================================
   TARPON PORTAL - tampilan dibuat BESAR & JELAS supaya mudah dipakai
   di PC, tablet, maupun HP.
   ===================================================================== */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #f7f7f4;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #7b7f86;
  --line: #e1e0d9;
  --line-2: #cfcdc4;
  --navy: #1f3864;
  --navy-2: #2b4c86;
  --primary: #1f5fbf;
  --primary-ink: #ffffff;
  --good: #0ca30c; --good-bg: #e6f6e6; --good-ink: #075e07;
  --warn: #fab219; --warn-bg: #fff4d6; --warn-ink: #7a5200;
  --serious: #ec835a; --serious-bg: #fdebe3; --serious-ink: #8a3a17;
  --bad: #d03b3b; --bad-bg: #fbe7e7; --bad-ink: #8f1f1f;
  --info: #2a78d6; --info-bg: #e6f0fb; --info-ink: #174a88;
  --plan: #fff2cc; --plan-line: #e8c547; --plan-ink: #6b5200;
  --dpr: #e2efda; --dpr-line: #7fb069; --dpr-ink: #2f5a1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.05);
  --sidebar: 268px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
[v-cloak] { display: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.bold { font-weight: 700; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-s { margin-bottom: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nw { flex-wrap: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4, .g5 { grid-template-columns: minmax(0, 1fr); } .g4.keep2, .g5.keep2, .g3.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- LAYOUT ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--navy); color: #fff; flex: 0 0 var(--sidebar); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; }
.brand-img { width: 180px; max-width: 100%; height: auto; display: block; }
.login-logo { width: 260px; max-width: 80%; height: auto; display: block; margin: 0 auto 14px; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; }
.brand-name { font-weight: 800; letter-spacing: .5px; }
.brand-sub { font-size: .72rem; opacity: .75; }
.nav { padding: 10px 10px 20px; }
.nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; opacity: .55; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; color: #e8edf7; padding: 11px 12px; border-radius: 10px; font-weight: 600; font-size: .98rem; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.active { background: #fff; color: var(--navy); }
.nav a .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.nav a .soon { margin-left: auto; font-size: .65rem; background: rgba(255,255,255,.15); padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.nav a.active .soon { background: var(--surface-2); }
.nav .sub { margin: 2px 0 6px 22px; border-left: 2px solid rgba(255,255,255,.15); padding-left: 6px; }
.nav .sub a { font-weight: 500; font-size: .93rem; padding: 8px 10px; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(243,244,241,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 22px; }
.topbar .title { font-weight: 800; font-size: 1.15rem; }
.topbar .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.content { padding: 22px; max-width: 1500px; width: 100%; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.backdrop { display: none; }
@media (max-width: 960px) {
  :root { font-size: 16.5px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .btn.menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 8px 16px; }
  .user-chip .uname { display: none; }
}

/* ---------------- CARD ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flat { box-shadow: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title h3 { margin: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 22px 0 10px; }

/* ---------------- BUTTON ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; white-space: nowrap; user-select: none; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #184f9f; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.good:hover { background: #098a09; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #3b2800; }
.btn.plan { background: #f6d55c; border-color: #e0bb2c; color: #3b2d00; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn.xl { min-height: 64px; font-size: 1.15rem; padding: 14px 26px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 48px; }
.btn.sm.icon { width: 38px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.row.nw .btn-row { flex-wrap: nowrap; }

/* Kartu aksi besar (menu utama supervisor, dll) */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.action { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); cursor: pointer; text-align: left; box-shadow: var(--shadow); min-height: 96px; color: var(--ink); }
.action:hover { border-color: var(--primary); transform: translateY(-1px); }
.action .ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 54px; color: #fff; }
.action .t { font-weight: 800; font-size: 1.08rem; }
.action .d { font-size: .88rem; color: var(--ink-2); }
.action.plan { background: var(--plan); border-color: var(--plan-line); }
.action.dpr { background: var(--dpr); border-color: var(--dpr-line); }

/* ---------------- FORM ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field .hint { font-size: .82rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 1.02rem; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,95,191,.15); }
.input.sm { min-height: 40px; padding: 6px 10px; font-size: .95rem; border-radius: 9px; border-width: 1.5px; }
.input.big { font-size: 1.4rem; font-weight: 700; text-align: center; }
.input-group { display: flex; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; }

/* Tombol pilihan besar */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 50px; min-width: 56px; padding: 8px 16px; border-radius: 12px; border: 2px solid var(--line-2); background: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.choice:hover { border-color: var(--primary); }
.choice.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.choice .sub { display: block; font-size: .72rem; font-weight: 500; opacity: .8; }
.choices.col { flex-direction: column; } .choices.col .choice { justify-content: flex-start; text-align: left; }
.choices.sm .choice { min-height: 42px; min-width: 46px; padding: 6px 12px; font-size: .95rem; }

/* Stepper angka */
.stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 52px; border: 0; background: var(--surface-2); font-size: 1.5rem; font-weight: 800; cursor: pointer; }
.stepper button:active { background: var(--line); }
.stepper input { width: 80px; border: 0; text-align: center; font-size: 1.3rem; font-weight: 800; min-height: 50px; }
.stepper input:focus { outline: none; }

/* Pemilih dengan pencarian */
.picker-btn { width: 100%; min-height: 52px; text-align: left; padding: 10px 44px 10px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; cursor: pointer; position: relative; font-weight: 600; }
.picker-btn:hover { border-color: var(--primary); }
.picker-btn.is-empty { color: var(--muted); font-weight: 500; }
.picker-btn::after { content: ''; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); }
.picker-btn.disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.pick-list { max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--line); margin: 10px -18px -18px; }
.pick-item { padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 12px; align-items: center; }
.pick-item:hover { background: var(--info-bg); }
.pick-item.on { background: var(--info-bg); font-weight: 700; }
.pick-item .box { width: 24px; height: 24px; border: 2px solid var(--line-2); border-radius: 6px; flex: 0 0 24px; display: grid; place-items: center; }
.pick-item.on .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick-item .sub { font-size: .8rem; color: var(--muted); }

/* ---------------- CHIP / BADGE ---------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good-ink); border-color: #bfe6bf; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #f5dc9a; }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: #f1c0c0; }
.chip.info { background: var(--info-bg); color: var(--info-ink); border-color: #c3daf5; }
.chip.serious { background: var(--serious-bg); color: var(--serious-ink); border-color: #f5c9b6; }
.chip.plan { background: var(--plan); color: var(--plan-ink); border-color: var(--plan-line); }
.chip.dpr { background: var(--dpr); color: var(--dpr-ink); border-color: var(--dpr-line); }
.chip .d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge { min-width: 22px; height: 22px; border-radius: 11px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; padding: 0 6px; }

/* ---------------- STAT TILE ---------------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .label { font-size: .88rem; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat .value small { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.stat .foot { font-size: .82rem; color: var(--muted); }
.stat .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.stat.hero .value { font-size: 3.1rem; }
.meter { height: 10px; border-radius: 6px; background: #e6eefb; overflow: hidden; }
.meter > div { height: 100%; background: var(--info); border-radius: 6px; }
.meter.good { background: #dff2df; } .meter.good > div { background: var(--good); }
.meter.bad { background: #f7dcdc; } .meter.bad > div { background: var(--bad); }
.meter.warn { background: #fdefcb; } .meter.warn > div { background: var(--warn); }

/* ---------------- TABLE ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.t th { background: var(--surface-2); text-align: left; padding: 10px 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #f6f9ff; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.row-bad td { background: #fff6f6; }
table.t tr.row-good td { background: #f7fcf7; }
table.t tr.row-leave td { background: #f4f8fe; }
.table-scroll { max-height: 70vh; overflow: auto; }

/* ---------------- MODAL / TOAST ---------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 18px; position: relative; }
.modal.wide { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 1.2rem; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 700px) { .modal-bg { padding: 0; align-items: stretch; } .modal { border-radius: 0; min-height: 100vh; } .modal-foot .btn { flex: 1; } }
.toasts { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(560px, 94vw); }
.toast { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); width: 100%; display: flex; gap: 10px; align-items: center; }
.toast.good { background: #0b7a0b; } .toast.bad { background: #b52f2f; }

/* ---------------- LOGIN ---------------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 14px; background: linear-gradient(160deg, #1f3864 0%, #2b4c86 45%, #f3f4f1 45.1%); }
.login-box { width: 100%; max-width: 980px; }
.login-head { color: #fff; text-align: center; margin-bottom: 22px; }
.login-head .brand-logo { margin: 0 auto 10px; width: 64px; height: 64px; font-size: 1.6rem; border-radius: 18px; }
.login-head h1 { font-size: 1.8rem; margin-bottom: 4px; }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.18); padding: 22px; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dept-tile { border: 2px solid var(--line); border-radius: 16px; padding: 16px 12px; cursor: pointer; text-align: center; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 130px; justify-content: center; }
.dept-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.dept-tile .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.dept-tile .n { font-weight: 800; font-size: 1rem; line-height: 1.15; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.name-tile { border: 2px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; display: flex; gap: 12px; align-items: center; background: #fff; text-align: left; }
.name-tile:hover { border-color: var(--primary); }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--navy); }
.pin-dots span.on { background: var(--navy); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 0 auto; }
.keypad button { height: 68px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.keypad button:active { background: var(--info-bg); }
.keypad button.act { font-size: 1rem; }

/* ---------------- DPR EDITOR ---------------- */
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.steps .s { flex: 1 1 150px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.steps .s .n { width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .9rem; }
.steps .s.on { border-color: var(--primary); } .steps .s.on .n { background: var(--primary); color: #fff; }
.steps .s.done .n { background: var(--good); color: #fff; }
.act-card { border-radius: 16px; border: 2px solid var(--plan-line); background: #fff; overflow: hidden; }
.act-card .plan-part { background: var(--plan); padding: 14px 16px; }
.act-card .dpr-part { background: var(--dpr); padding: 14px 16px; border-top: 2px dashed var(--dpr-line); }
.act-card .ttl { font-weight: 800; font-size: 1.05rem; }
.act-no { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 36px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 14px; margin-top: 10px; }
.kv > div { background: rgba(255,255,255,.65); border-radius: 10px; padding: 6px 10px; }
.kv .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); font-weight: 700; }
.kv .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(0,0,0,.12); }
.item-row:last-child { border-bottom: 0; }
.item-row .tag { flex: 1 1 auto; font-weight: 700; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; word-break: break-all; }
.item-row .qty { width: 110px; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--plan-line); border-radius: 10px; padding: 4px 6px 4px 10px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; font-weight: 700; margin: 3px; }
.tag-chip button { border: 0; background: var(--bad-bg); color: var(--bad-ink); border-radius: 7px; width: 26px; height: 26px; cursor: pointer; font-weight: 800; }
.term-btns { display: flex; gap: 6px; }
.term-btns button { min-width: 54px; min-height: 42px; border-radius: 10px; border: 2px solid var(--dpr-line); background: #fff; font-weight: 800; cursor: pointer; }
.term-btns button.on { background: #2f7d1c; color: #fff; border-color: #2f7d1c; }
.sum-box { border-radius: 16px; padding: 16px; }
.sum-box.plan { background: var(--plan); border: 2px solid var(--plan-line); }
.sum-box.dpr { background: var(--dpr); border: 2px solid var(--dpr-line); }
.sum-box .big { font-size: 1.9rem; font-weight: 800; }
.sticky-bar { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 12px 16px; margin: 16px -22px -22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; z-index: 20; backdrop-filter: blur(4px); }
@media (max-width: 960px) { .sticky-bar { margin: 16px -16px -16px; } .sticky-bar .btn { flex: 1; } }
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.alert.bad { background: var(--bad-bg); border-color: #f1c0c0; color: var(--bad-ink); }
.alert.warn { background: var(--warn-bg); border-color: #f5dc9a; color: var(--warn-ink); }
.alert.info { background: var(--info-bg); border-color: #c3daf5; color: var(--info-ink); }
.alert.good { background: var(--good-bg); border-color: #bfe6bf; color: var(--good-ink); }

/* ---------------- CHART ---------------- */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; } .chart-box.short { height: 200px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dev { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dev .st { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; }
.dev .st.up { background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }
.dev .st.down { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.dev .st.unk { background: var(--line-2); }
.dept-card { border-radius: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; cursor: pointer; box-shadow: var(--shadow); }
.dept-card:hover { border-color: var(--primary); }
.dept-card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: 0 0 48px; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .big { font-size: 2.4rem; }
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 16px; font-weight: 700; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { min-width: 160px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: sp 0.8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.notif-panel { position: absolute; right: 12px; top: 58px; width: min(420px, 94vw); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); z-index: 60; max-height: 70vh; overflow-y: auto; }
.notif-panel .n { padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif-panel .n:hover { background: var(--surface-2); }
.pre { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: var(--surface-2); padding: 12px; border-radius: 10px; border: 1px solid var(--line); max-height: 420px; overflow: auto; }
.wa-preview { white-space: pre-wrap; background: #e7ffdb; border: 1px solid #b9e6a3; border-radius: 12px; padding: 14px; font-size: .9rem; max-height: 480px; overflow: auto; }
@media print { .sidebar, .topbar, .sticky-bar, .no-print { display: none !important; } .content { padding: 0; } .card { box-shadow: none; } }
table.t.compact td, table.t.compact th { padding: 8px 8px; }
@media (max-width: 700px) {
  .modal-bg { display: block; padding: 0; }
  .modal { min-height: 100vh; border-radius: 0; }
  .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dept-tile { min-height: 112px; padding: 12px 8px; }
  .dept-tile .ic { width: 46px; height: 46px; }
  .name-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { flex-wrap: nowrap; gap: 6px; }
  .steps .s { flex: 1 1 0; padding: 8px; font-size: .82rem; gap: 6px; min-width: 0; }
  .steps .s .n { width: 24px; height: 24px; flex: 0 0 24px; }
  .sticky-bar { gap: 8px; padding: 10px 12px; }
  .sticky-bar .grow { flex-basis: 100%; }
  .sticky-bar .btn { flex: 1 1 0; min-width: 0; white-space: normal; font-size: .9rem; padding: 8px 10px; min-height: 46px; }
  .page-head h1 { font-size: 1.35rem; }
  .action { min-height: 80px; padding: 14px; }
  .action .ic { width: 46px; height: 46px; flex-basis: 46px; }
  .stat .value { font-size: 1.7rem; }
  .stat.hero .value { font-size: 2.4rem; }
}

/* ---------------- MATERIAL v1.1 ---------------- */
.ret-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.ret-row.done { background: var(--good-bg); border-color: #bfe6bf; }
.ret-steps { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.ret-steps > div { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) {
  .hide-m { display: none !important; }
  .ret-steps { gap: 8px; }
  .ret-steps .stepper button { width: 40px; }
  .ret-steps .stepper input { width: 48px; font-size: 1.1rem; }
}

/* ---------------- LOGIN MICROSOFT 365 (v1.2) ---------------- */
.btn.ms-btn { background: #fff; border: 2px solid #8a8886; color: #1b1b1b; font-weight: 700; gap: 14px; text-decoration: none; }
.btn.ms-btn:hover { background: #f3f2f1; border-color: #2f2f2f; }
.ms-logo { display: inline-grid; grid-template-columns: 11px 11px; gap: 2px; flex: 0 0 auto; }
.ms-logo i { width: 11px; height: 11px; display: block; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; margin: 20px 0 12px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 10px; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; word-break: break-all; }
.btn.ms-btn { white-space: normal; text-align: center; max-width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { .btn.ms-btn.xl { font-size: 1.02rem; padding: 12px 14px; gap: 10px; } }

/* ---------------- PILIHAN BAHASA ---------------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); flex: 0 0 auto; }
.lang-switch button { border: 0; background: transparent; padding: 6px 10px; font-weight: 800; font-size: .82rem; cursor: pointer; color: var(--ink-2); min-height: 34px; }
.lang-switch button.on { background: var(--navy); color: #fff; }
.lang-switch.dark { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.08); }
.lang-switch.dark button { color: #fff; }
.lang-switch.dark button.on { background: #fff; color: var(--navy); }
.login-lang { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: .88rem; z-index: 2; }
.nav-lang { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; margin-top: 6px; color: #e8edf7; font-weight: 600; font-size: .82rem; white-space: nowrap; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 700px) { .login-lang { position: static; align-self: flex-end; margin: -14px 0 10px; } }
.nav-ver { padding: 4px 12px 0; font-size: .72rem; opacity: .5; color: #e8edf7; }

/* ===== v1.4: login verifikasi email (gaya kartu putih) ===== */
.auth-wrap { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: stretch; margin-top: 12px; }
.auth-card { background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(15,23,42,.18); padding: 30px 30px 26px; text-align: center; color: var(--ink); }
.auth-logo { width: 190px; max-width: 70%; height: auto; display: block; margin: 0 auto 2px; }
.auth-sub { font-size: .78rem; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.auth-ico { position: relative; height: 126px; display: flex; align-items: center; justify-content: center; margin: 4px -30px 14px; }
.auth-ico::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #d9dde3; }
.auth-ico > span { position: relative; width: 116px; height: 116px; border-radius: 50%; background: #fff; border: 2px solid #b9bdc4; display: flex; align-items: center; justify-content: center; color: #475569; box-shadow: inset 0 0 0 7px #fff, inset 0 0 0 60px #dff0ff; }
.auth-ok { position: absolute; right: 12px; bottom: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--good); color: #fff; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; }
.auth-title { font-size: 1.22rem; font-weight: 700; color: #4b5563; margin: 0 0 12px; }
.auth-who { display: inline-flex; align-items: center; gap: 8px; color: #4b5563; margin: 0 0 18px; word-break: break-all; }
.auth-text { color: #6b7280; margin: 0 0 20px; line-height: 1.5; }
.auth-text b { color: #111827; }
.auth-input { text-align: left; }
.auth-btn { width: 100%; min-height: 58px; border-radius: 999px; background: #1f1d24; color: #fff; border-color: #1f1d24; font-size: 1.05rem; margin-top: 14px; }
.auth-btn:hover:not(:disabled) { background: #000; }
.auth-btn:disabled { opacity: .6; }
.auth-link { display: inline-block; background: none; border: 0; padding: 6px 0; margin-top: 16px; color: #4b5563; text-decoration: underline; cursor: pointer; font: inherit; }
.auth-link.inline { margin: 0 0 0 4px; padding: 0; color: var(--info); }
.auth-link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.auth-otp { text-align: center; font-size: 2rem; letter-spacing: .5em; font-weight: 800; padding-left: .5em; max-width: 300px; margin: 0 auto; display: block; }
.auth-check { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin-top: 14px; color: #374151; font-weight: 600; cursor: pointer; }
.auth-check input { width: 20px; height: 20px; }
.auth-check .small { width: 100%; font-weight: 400; }
.auth-card .alert { text-align: left; }
.auth-card .or-line { margin: 18px 0 14px; }
.auth-foot { color: #6b7280; }
.dev-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 8px 12px; margin: -4px 0 14px; background: var(--surface-2); border-radius: 12px; }
@media (max-width: 700px) { .auth-card { padding: 24px 18px 20px; border-radius: 16px; } .auth-ico { margin-left: -18px; margin-right: -18px; } }

/* ===== v1.4: editor hak akses ===== */
.acc-dept { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface-2); overflow: hidden; }
.acc-dept.on { background: #fff; border-color: var(--line-2); }
.acc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.acc-head .ic { width: 30px; height: 30px; border-radius: 9px; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.acc-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.acc-box.on { background: var(--navy); border-color: var(--navy); }
.acc-items { border-top: 1px dashed var(--line); padding: 4px 14px 8px 54px; }
.acc-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acc-item:last-child { border-bottom: 0; }
.seg { display: inline-flex; border: 2px solid var(--line-2); border-radius: 11px; overflow: hidden; background: #fff; flex: 0 0 auto; }
.seg button { border: 0; background: transparent; padding: 7px 12px; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--ink-2, #374151); min-height: 36px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--navy); color: #fff; }
.seg button.on.off { background: #6b7280; }
.acc-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.acc-widgets .check { font-weight: 500; }
.acc-list { margin: 10px 0 6px; padding-left: 18px; }
.acc-list li { margin: 2px 0; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; background: #eef4ff; border: 1px solid #c7d7f5; border-radius: 12px; }
.check.big { font-size: 1.05rem; }
@media (max-width: 700px) { .acc-items { padding-left: 14px; } .seg { width: 100%; } .seg button { flex: 1; } }
