/* ───────────────────────────────────────────────────────────
   HSE Inspection — design system (karyawan + admin)
   Navy korporat, aksen biru & emas tipis, responsif PC ↔ mobile
   ─────────────────────────────────────────────────────────── */
:root {
  --navy-950: #071327; --navy-900: #0b1b34; --navy-800: #112a52; --navy-700: #1a3a6e;
  --primary: #1e56c6; --primary-600: #1a49a8; --primary-50: #eef3fd; --primary-100: #dbe6fb;
  --gold: #c19a4a; --gold-50: #fbf6e9;
  --bg: #f3f5f9; --surface: #fff; --line: #e2e7ef; --line-2: #edf0f5;
  --ink: #162033; --ink-2: #3c4a61; --muted: #6a778c;
  --good: #157347; --good-bg: #e4f4ec; --warn: #9a6700; --warn-bg: #fdf1d3;
  --bad: #b42318; --bad-bg: #fde8e6; --na: #4b5870; --na-bg: #e9edf3;
  --r: 12px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 1px 3px rgba(16, 24, 40, .06), 0 14px 32px -10px rgba(16, 24, 40, .14);
  --side: 264px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.right { margin-left: auto; }
.fade-in { animation: fade .28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ── Tombol ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--primary-600); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .nav button:focus-visible, .choice:focus-visible, .chip:focus-visible { outline: 3px solid rgba(30, 86, 198, .35); outline-offset: 2px; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #cfd7e3; } .btn.secondary:hover { background: #f6f8fb; }
.btn.soft { background: var(--primary-50); color: var(--primary-600); } .btn.soft:hover { background: var(--primary-100); }
.btn.ghost { background: transparent; color: var(--ink-2); } .btn.ghost:hover { background: rgba(16, 24, 40, .05); }
.btn.danger { background: var(--bad); } .btn.danger:hover { background: #912018; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 50px; font-size: 15.5px; padding: 0 24px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--primary); font-weight: 600; font-size: 14px; padding: 4px 2px; } .link:hover { text-decoration: underline; }
.link:disabled { opacity: .35; cursor: default; text-decoration: none; }

/* ── Form ── */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.label .o { font-weight: 400; color: var(--muted); }
.input, .select { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #cfd7e3; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #9aa6b8; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(30, 86, 198, .14); }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, #6a778c 50%), linear-gradient(135deg, #6a778c 50%, transparent 50%);
  background-position: calc(100% - 20px) 51%, calc(100% - 14px) 51%; background-size: 6px 6px; background-repeat: no-repeat; }
.field.err .input, .field.err .select { border-color: var(--bad); background-color: #fffafa; }
.field .msg { color: var(--bad); font-size: 12.5px; margin-top: 5px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.iwrap { position: relative; }
.iwrap > svg.ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a96aa; pointer-events: none; }
.iwrap .input { padding-left: 42px; }
.iwrap .tog { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; color: #8a96aa; border-radius: 8px; }
.iwrap .tog:hover { background: var(--line-2); }
.iwrap .tog + .x, .iwrap.pw .input { padding-right: 46px; }
.suffix { position: relative; } .suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 13px; }
.suffix .input { padding-right: 46px; }
.plate-input { text-align: center; font: 700 22px ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .12em; text-transform: uppercase; height: 54px !important; border: 2px solid var(--navy-800) !important; border-radius: 10px !important; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert.err { background: var(--bad-bg); color: var(--bad); } .alert.ok { background: var(--good-bg); color: var(--good); }
.alert.info { background: var(--primary-50); color: var(--primary-600); } .alert.gold { background: var(--gold-50); color: #7a5b17; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

/* ── Kartu, badge, tabel ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-b { padding: 22px; }
.card-h { padding: 16px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-h h2 { font-size: 15.5px; font-weight: 650; }
.stack > * + * { margin-top: 20px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.b-good { background: var(--good-bg); color: var(--good); } .b-repair, .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-broken, .b-bad { background: var(--bad-bg); color: var(--bad); } .b-na, .b-neutral { background: var(--na-bg); color: var(--na); }
.b-info { background: var(--primary-50); color: var(--primary-600); }
.plate { font: 700 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; border: 1.5px solid var(--navy-800); border-radius: 6px; padding: 2px 8px; background: #fff; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; text-align: left; padding: 11px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f7f9fe; }
.tbl tr.grp td { background: #f8fafc; font-weight: 650; font-size: 12.5px; color: var(--ink-2); padding: 8px 16px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .ic { width: 38px; height: 38px; color: #b4bdcb; margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.kpi .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.kpi .k .ic { color: var(--primary); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi .s { font-size: 13px; color: var(--muted); }
.progress { height: 8px; background: var(--na-bg); border-radius: 99px; overflow: hidden; } .progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #3b82f6); border-radius: 99px; transition: width .4s; }
.callout { display: flex; gap: 16px; align-items: center; padding: 18px 22px; border-radius: var(--r-lg); background: var(--gold-50); border: 1px solid #ecdcb2; margin-bottom: 20px; }
.callout .ic-box { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--gold); display: grid; place-items: center; flex: none; }
.callout.ok { background: var(--good-bg); border-color: #bfe3cf; } .callout.ok .ic-box { color: var(--good); }
.callout b { display: block; } .callout .t { flex: 1; min-width: 0; }

/* ── Kerangka aplikasi ── */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 24px 14px 18px; color: #b9c6dc;
  background: linear-gradient(185deg, var(--navy-800) 0%, var(--navy-900) 45%, var(--navy-950) 100%); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; }
.brand b { display: block; font-size: 16px; letter-spacing: .01em; } .brand small { display: block; color: #8fa3c4; font-size: 12px; letter-spacing: .04em; }
.brand svg { width: 40px; height: 40px; flex: none; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav .sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6f84a8; padding: 14px 12px 6px; }
.nav button { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; color: #b9c6dc; font-weight: 550; font-size: 14.5px; text-align: left; position: relative; transition: background .15s, color .15s; }
.nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav button.on { background: rgba(255, 255, 255, .1); color: #fff; }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; }
.usercard { display: flex; align-items: center; gap: 11px; padding: 6px 8px 12px; min-width: 0; }
.usercard .who { min-width: 0; } .usercard b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usercard small { display: block; color: #8fa3c4; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px; background: linear-gradient(135deg, #2f6fe0, #1a49a8); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.mtop { display: none; }
.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 36px 56px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-head .tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bottomnav { display: none; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: linear-gradient(135deg, var(--navy-900), var(--navy-800)); color: #fff; position: sticky; top: 0; z-index: 20; }
  .mtop .brand { padding: 0; margin: 0; border: 0; } .mtop .brand svg { width: 34px; height: 34px; } .mtop .brand b { font-size: 15px; } .mtop .brand small { font-size: 11px; }
  .page { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 22px; }
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 6px 8px max(8px, env(safe-area-inset-bottom)); }
  .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 4px; border-radius: 10px; }
  .bottomnav button .ic { width: 22px; height: 22px; }
  .bottomnav button.on { color: var(--primary); }
  .bottomnav .primary-tab .ic-pill { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(30, 86, 198, .4); border: 4px solid #fff; }
  .app.wiz .bottomnav { display: none; }
  .app.wiz .page { padding-bottom: 24px; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; } .kpi { padding: 14px 16px; } .kpi .v { font-size: 24px; }
}
@media (max-width: 560px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .card-b { padding: 18px; } .card-h { padding: 14px 18px; }
}

/* ── Halaman masuk / daftar ── */
.auth { display: grid; grid-template-columns: minmax(380px, 46%) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-brand { position: relative; overflow: hidden; color: #e3eaf6; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 520px at 0% 0%, #21488c 0%, transparent 62%), linear-gradient(165deg, var(--navy-800), var(--navy-950)); }
.auth-brand::before { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(193, 154, 74, .35); box-shadow: 0 0 0 50px rgba(255, 255, 255, .02), 0 0 0 110px rgba(255, 255, 255, .015); }
.auth-brand .brand { border: 0; padding: 0; margin: 0; }
.auth-brand h1 { font-size: 36px; line-height: 1.18; letter-spacing: -.02em; color: #fff; font-weight: 700; margin-bottom: 14px; }
.auth-brand h1 em { font-style: normal; color: #e7c36a; }
.auth-brand p.lead { color: #aebcd6; max-width: 440px; font-size: 16px; }
.feats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.feats li { display: flex; gap: 14px; align-items: center; color: #cdd8ec; font-size: 14.5px; }
.feats .ic-box { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; color: #e7c36a; flex: none; }
.auth-brand .foot { font-size: 12.5px; color: #7f93b6; position: relative; z-index: 1; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 456px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-2); padding: 34px; }
.auth-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.auth-card .sub { color: var(--muted); margin: 4px 0 22px; font-size: 14.5px; }
.tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; background: var(--na-bg); padding: 4px; border-radius: 12px; margin-bottom: 24px; }
.tabs button { height: 38px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.auth-card .alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { padding: max(26px, env(safe-area-inset-top)) 24px 70px; }
  .auth-brand h1, .auth-brand .lead, .feats, .auth-brand .foot { display: none; }
  .auth-brand::before { width: 220px; height: 220px; right: -80px; bottom: -110px; }
  .auth-panel { align-items: flex-start; padding: 0 16px 32px; margin-top: -42px; position: relative; z-index: 2; }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
}

/* ── Wizard ── */
.stepper { display: flex; align-items: center; margin-bottom: 26px; }
.st { display: flex; align-items: center; flex: 1; min-width: 0; } .st:last-child { flex: 0 0 auto; }
.st .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; background: #fff; border: 2px solid var(--line); color: var(--muted); flex: none; transition: .2s; }
.st .l { margin-left: 10px; font-size: 13.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.st .bar { flex: 1; height: 2px; background: var(--line); margin: 0 14px; min-width: 14px; transition: background .3s; }
.st.done .n { background: var(--primary); border-color: var(--primary); color: #fff; }
.st.cur .n { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px rgba(30, 86, 198, .12); }
.st.cur .l, .st.done .l { color: var(--ink); } .st.done .bar { background: var(--primary); }
.st .n .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.card-h .step-no { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-right: 10px; }
.card-h h2 { display: flex; align-items: center; }
@media (max-width: 640px) {
  .st .l { display: none; } .st.cur .l { display: inline; }
  .st .bar { margin: 0 8px; }
}

/* Foto */
.dropzone { border: 2px dashed #c2cde0; border-radius: 14px; padding: 28px 18px; text-align: center; background: #fafbfe; transition: .15s; }
.dropzone.over { border-color: var(--primary); background: var(--primary-50); }
.dropzone .ic-big { width: 44px; height: 44px; color: var(--primary); margin-bottom: 8px; }
.dropzone .btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.tips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.tips span { font-size: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 18px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--na-bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--na); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(11, 27, 52, .78); color: #fff; display: grid; place-items: center; }
.thumb button .ic { width: 14px; height: 14px; stroke-width: 2.4; }

/* Ringkasan */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; }
.kv > * { padding: 10px 0; border-bottom: 1px solid var(--line-2); } .kv dt { color: var(--muted); font-size: 13.5px; } .kv dd { margin: 0; font-weight: 550; text-align: left; word-break: break-word; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.counts div { text-align: center; border-radius: 12px; padding: 12px 4px; font-size: 12px; font-weight: 650; }
.counts b { display: block; font-size: 24px; line-height: 1.2; }
.counts .good { background: var(--good-bg); color: var(--good); } .counts .repair { background: var(--warn-bg); color: var(--warn); }
.counts .broken { background: var(--bad-bg); color: var(--bad); } .counts .na { background: var(--na-bg); color: var(--na); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; } .sum-row:last-child { border: 0; }
.done-screen { text-align: center; max-width: 520px; margin: 40px auto 0; padding: 44px 32px; }
.done-screen .check { width: 84px; height: 84px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; margin: 0 auto 20px; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.done-screen .check .ic { width: 40px; height: 40px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.done-screen h2 { font-size: 24px; letter-spacing: -.01em; margin-bottom: 10px; }
.done-screen .btns { display: grid; gap: 10px; margin-top: 26px; }

/* ── Admin & umum ── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.toolbar .input, .toolbar .select { height: 38px; width: auto; min-width: 160px; font-size: 14px; }
.toolbar .iwrap .input { padding-left: 38px; } .toolbar .iwrap > svg.ic { left: 12px; width: 16px; height: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.modal-bg { position: fixed; inset: 0; background: rgba(7, 19, 39, .6); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; overflow-y: auto; z-index: 100; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 760px; box-shadow: 0 30px 80px rgba(7, 19, 39, .4); animation: fade .2s ease both; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line-2); }
.modal-h h2 { font-size: 18px; } .modal-b { padding: 22px 24px; } .modal-f { padding: 14px 24px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photos a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 12px; color: var(--ink); text-decoration: none !important; background: #fff; }
.photos img { width: 100%; height: 100px; object-fit: cover; display: block; }
.photos .file { height: 100px; display: grid; place-items: center; background: var(--na-bg); font-weight: 700; color: var(--na); }
.photos span { display: block; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-t { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 22px 0 8px; }
.cred { font: 700 20px ui-monospace, Menlo, monospace; letter-spacing: .06em; background: #fff; border: 1px dashed #b9a468; padding: 6px 14px; border-radius: 8px; user-select: all; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 90vw; text-align: center; box-shadow: var(--sh-2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1023px) { #toast { bottom: 96px; } .app.wiz ~ #toast { bottom: 90px; } }
@media print { .side, .mtop, .bottomnav { display: none; } .app { display: block; } }

/* ── Wizard mode fokus (tanpa sidebar) ── */
.wizard { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); }
.wz-top { display: flex; align-items: center; gap: 20px; padding: max(12px, env(safe-area-inset-top)) 24px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.wz-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; min-width: 190px; }
.wz-brand svg { width: 32px; height: 32px; } .wz-brand small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.wz-top .stepper { flex: 1; max-width: 540px; margin: 0 auto; }
.wz-close { min-width: 190px; display: flex; justify-content: flex-end; }
.wz-body { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; -webkit-overflow-scrolling: touch; }
.wz-wrap { width: 100%; max-width: 940px; margin: auto; }
.wz-wrap.narrow { max-width: 600px; }
.wz-foot { background: #fff; border-top: 1px solid var(--line); padding: 12px 20px max(12px, env(safe-area-inset-bottom)); }
.wz-in { max-width: 940px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.wz-in.narrow { max-width: 600px; }
.wz-in .l, .wz-in .r { display: flex; gap: 10px; align-items: center; }
.wz-in .r { margin-left: auto; } .wz-in .l:empty { display: none; }
.wz-head { margin-bottom: 18px; } .wz-head h1 { font-size: 22px; letter-spacing: -.02em; } .wz-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
@media (max-width: 760px) {
  .wz-top .st .l, .wz-top .st.cur .l { display: none; }
  .wz-brand { display: none; } .wz-close { min-width: 0; order: -1; } .wz-top { gap: 12px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; }
  .wz-close .btn { padding: 0 10px; } .wz-close .btn span { display: none; }
  .wz-body { padding: 16px 14px; } .wz-foot { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .wz-in .l, .wz-in .r { flex: 1; } .wz-in .l .btn, .wz-in .r .btn { width: 100%; } .wz-in .r > span { margin-left: auto; }
}

/* Inspeksi: satu kartu fokus, bilah progres, 4 pilihan */
.segbar { display: flex; gap: 4px; padding: 4px; margin: 0 -4px 14px; }
.segbar i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); cursor: pointer; transition: background .2s; }
.segbar i.good { background: var(--good); } .segbar i.repair { background: #e6a100; } .segbar i.broken { background: var(--bad); } .segbar i.na { background: #7b8aa3; }
.segbar i.cur { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.icard { padding: 28px 24px 22px; text-align: center; }
.icard .ico { width: 60px; height: 60px; border-radius: 18px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 12px; }
.icard .ico .ic { width: 28px; height: 28px; }
.icard .cnt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.icard h2 { font-size: 22px; letter-spacing: -.01em; margin: 4px 0 2px; } .icard p { color: var(--muted); font-size: 14px; }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 100px; padding: 14px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-weight: 650; font-size: 14px; transition: .15s; }
.choice:hover { border-color: #b7c3d6; background: #fafbfd; }
.choice .oi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.choice.good .oi { background: var(--good-bg); color: var(--good); } .choice.repair .oi { background: var(--warn-bg); color: var(--warn); }
.choice.broken .oi { background: var(--bad-bg); color: var(--bad); } .choice.na .oi { background: var(--na-bg); color: var(--na); }
.choice.on.good { border-color: var(--good); background: var(--good-bg); } .choice.on.repair { border-color: #e6a100; background: var(--warn-bg); }
.choice.on.broken { border-color: var(--bad); background: var(--bad-bg); } .choice.on.na { border-color: #7b8aa3; background: var(--na-bg); }
.alllink { display: block; margin: 18px auto 0; font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.alllink:hover { color: var(--primary); }
@media (max-width: 560px) { .choices { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .choice { min-height: 88px; } .icard { padding: 22px 16px 18px; } }

/* ── Grafik & dashboard ── */
.grid { display: grid; gap: 20px; margin-bottom: 20px; align-items: stretch; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .g21 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
@media (max-width: 1100px) { .g3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) { .grid, .g3, .g2, .g21, .g12 { grid-template-columns: minmax(0, 1fr); } }
.chart-t { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.chart-big { font-size: 15.5px; font-weight: 650; margin: 2px 0 14px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.legend { display: grid; gap: 8px; font-size: 13.5px; min-width: 150px; }
.legend div { display: flex; align-items: center; gap: 8px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.legend.row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 8px; } .legend.row b { padding-left: 4px; margin: 0; }
.chart-svg { width: 100%; height: auto; display: block; }
.hb { display: grid; grid-template-columns: minmax(80px, 36%) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.hb .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .t { height: 10px; background: var(--na-bg); border-radius: 99px; overflow: hidden; } .hb .t i { display: block; height: 100%; border-radius: 99px; }
.hb .v { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--na-bg); margin: 10px 0 14px; } .stackbar i { display: block; height: 100%; }
.mchips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mchip { text-align: center; padding: 12px 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 650; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.mchip .ic { display: block; margin: 0 auto 4px; width: 20px; height: 20px; }
.mchip.done { background: var(--good-bg); border-color: #bfe3cf; color: var(--good); } .mchip.miss { background: var(--bad-bg); border-color: #f4c7c2; color: var(--bad); }
.mchip.cur { border: 1.5px dashed var(--gold); background: var(--gold-50); color: #7a5b17; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.lrow:last-child { border-bottom: 0; } .lrow .grow { flex: 1; min-width: 0; } .lrow .grow > b, .lrow .grow > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .sm { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.lrow .sm .plate { font-size: 11px; padding: 0 6px; margin-right: 4px; vertical-align: 1px; }
.lrow .badges { display: flex; gap: 6px; flex: none; }
.card.chart .card-b { padding: 20px 22px; }
.kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpis.k6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lrow.click { cursor: pointer; } .lrow.click:hover { background: #f7f9fe; }
.mchip .pct { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.sub-t { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 18px 0 4px; }
.mini-empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 18px 8px; }

/* Cegah konten memaksa kolom grid/flex melebar melebihi layar */
.card, .grid > *, .cols-2 > *, .main, .page { min-width: 0; }
.lrow .badge { flex: none; }
@media (max-width: 560px) {
  .lrow { padding: 11px 14px; gap: 10px; }
  .page-head .tools { width: 100%; } .page-head .tools .select { flex: 1; }
  .hb { grid-template-columns: minmax(70px, 34%) 1fr auto; }
}

/* ───── Pop-up pengingat & kartu pasang aplikasi ───── */
.pop-bg { position: fixed; inset: 0; z-index: 120; background: rgba(7, 19, 39, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .2s ease both; }
.pop { background: #fff; border-radius: 22px; width: 100%; max-width: 420px; padding: 32px 28px 24px; text-align: center; box-shadow: 0 30px 80px rgba(7, 19, 39, .45); animation: popin .28s cubic-bezier(.2, .9, .3, 1.2) both; }
.pop-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--gold-50); color: var(--gold); display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 0 0 8px rgba(231, 195, 106, .15); }
.pop-ic .ic { width: 30px; height: 30px; animation: ring 1.6s ease .4s 2; transform-origin: 50% 12%; }
.pop.urgent .pop-ic { background: var(--bad-bg); color: var(--bad); box-shadow: 0 0 0 8px rgba(220, 38, 38, .08); }
.pop h2 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }
.pop p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.pop-note { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--primary-50); color: var(--primary-600) !important; font-size: 13px !important; }
.pop-btns { display: grid; gap: 10px; margin-top: 22px; }
.pop-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pop-link .ic { width: 15px; height: 15px; }
@keyframes popin { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(0); } }
body.has-pop { overflow: hidden; }
@media (max-width: 640px) {
  .pop-bg { align-items: end; padding: 0; }
  .pop { max-width: none; border-radius: 22px 22px 0 0; padding: 28px 22px calc(22px + env(safe-area-inset-bottom)); animation: sheet .3s ease both; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pop, .pop-bg, .pop-ic .ic { animation: none; } }

.callout.setup { background: var(--primary-50); border-color: var(--primary-100); }
.callout.setup .ic-box { color: var(--primary); }
.callout .act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }
@media (max-width: 640px) { .callout.setup { flex-wrap: wrap; } .callout.setup .act { width: 100%; } }

/* Callout di HP: ikon + teks satu baris, tombol turun ke baris sendiri */
@media (max-width: 640px) {
  .callout { flex-wrap: wrap; gap: 12px 14px; padding: 16px; }
  .callout .t { flex: 1 1 calc(100% - 64px); }
  .callout > .btn { flex: 1 1 40%; justify-content: center; }
}
.notif-on { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 6px; vertical-align: middle; border-radius: 50%; background: var(--good-bg); color: var(--good); }
.notif-on .ic { width: 13px; height: 13px; }
