/* Diambil dari v1 master (tampilan dipertahankan). Tambahan v2 ada di bagian bawah. */
/* Layout: app shell — sidebar kiri di desktop, top bar + bottom nav di HP; konten satu kolom terpusat */
:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --line: #dde5e1;
  --fg: #14211c;
  --muted: #5b6d66;
  --accent: #17644c;
  --accent-ink: #ffffff;
  --accent-soft: #e0efe8;
  --side: #10372b;
  --side-fg: #d6e8e0;
  --side-active: #1f5a47;
  --amber: #a86400; --amber-soft: #fbefd9;
  --green: #1c7a4a; --green-soft: #dff2e6;
  --blue: #2457a8; --blue-soft: #e2ebfa;
  --red: #b3261e; --red-soft: #fbe3e1;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 4px 16px rgba(16, 40, 30, .06);
  --font-ui: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1512; --surface: #15201b; --surface-2: #1a2721; --line: #2a3a33; --fg: #e4eee9; --muted: #92a69d;
    --accent: #4dbf91; --accent-ink: #08170f; --accent-soft: #1a3329;
    --side: #0a1a14; --side-fg: #b9d3c7; --side-active: #1a3a2e;
    --amber: #e5a645; --amber-soft: #3a2c14; --green: #5cd08f; --green-soft: #173323;
    --blue: #7ba7f0; --blue-soft: #1a2740; --red: #f08a80; --red-soft: #3d1c1a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1512; --surface: #15201b; --surface-2: #1a2721; --line: #2a3a33; --fg: #e4eee9; --muted: #92a69d;
  --accent: #4dbf91; --accent-ink: #08170f; --accent-soft: #1a3329;
  --side: #0a1a14; --side-fg: #b9d3c7; --side-active: #1a3a2e;
  --amber: #e5a645; --amber-soft: #3a2c14; --green: #5cd08f; --green-soft: #173323;
  --blue: #7ba7f0; --blue-soft: #1a2740; --red: #f08a80; --red-soft: #3d1c1a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

/* Warna per peran: Karyawan = hijau palem, HOD = biru indigo, GM = emas di atas arang */
:root { --hero-glow: rgba(77,191,145,.35); --hero-cta: #4dbf91; --hero-ink: #08170f; --hero-sub: rgba(232,243,238,.72); }
body[data-role="hod"] { --accent: #2c4fa3; --accent-soft: #e4eafa; --side: #14244a; --side-active: #263f7a; --side-fg: #d3ddf5; --hero-glow: rgba(120,155,255,.38); --hero-cta: #9db8ff; --hero-ink: #0a1430; --hero-sub: rgba(220,230,250,.75); }
body[data-role="gm"] { --accent: #8a6414; --accent-soft: #f6ecd6; --side: #1d1b17; --side-active: #3b3326; --side-fg: #e9e0cc; --hero-glow: rgba(227,178,79,.35); --hero-cta: #e3b24f; --hero-ink: #1c1405; --hero-sub: rgba(240,230,210,.72); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-role="hod"] { --accent: #8fb0ff; --accent-ink: #0a1430; --accent-soft: #1c2747; --side: #0c1630; --side-active: #1d2f5c; }
  :root:not([data-theme="light"]) body[data-role="gm"] { --accent: #e3b24f; --accent-ink: #1c1405; --accent-soft: #3a2e15; --side: #12110f; --side-active: #2e281c; }
}
:root[data-theme="dark"] body[data-role="hod"] { --accent: #8fb0ff; --accent-ink: #0a1430; --accent-soft: #1c2747; --side: #0c1630; --side-active: #1d2f5c; }
:root[data-theme="dark"] body[data-role="gm"] { --accent: #e3b24f; --accent-ink: #1c1405; --accent-soft: #3a2e15; --side: #12110f; --side-active: #2e281c; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding-inline: 16px; padding-block: 40px; }
.login-card { width: 100%; max-width: 1080px; display: grid; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 26px; height: 26px; }
.brand b { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.brand span { font-size: .82rem; color: var(--muted); }
.login h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.login p.lead { margin: 8px 0 0; color: var(--muted); max-width: 56ch; }
.demo-note { display: inline-flex; gap: 8px; align-items: center; font-size: .8rem; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 6px 10px; border-radius: 8px; }
.role-group { display: grid; gap: 10px; }
.role-group h2 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.user-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.user-pick { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-width: 0; }
.user-pick:hover { border-color: var(--accent); }
.user-pick .who { min-width: 0; }
.user-pick b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pick span { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; color: #fff; }
.avatar.sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1rem; }
/* Avatar adalah <span>: kunci gaya agar tidak tertimpa aturan "x span" di kartu/daftar */
span.avatar { display: grid !important; color: #fff !important; opacity: 1 !important; font-weight: 700 !important; line-height: 1 !important; white-space: normal !important; overflow: visible !important; }
span.avatar.sm { font-size: .7rem !important; } span.avatar:not(.sm):not(.lg) { font-size: .82rem !important; } span.avatar.lg { font-size: 1rem !important; }

/* ---------- Shell ---------- */
.shell { min-height: 100%; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .shell { grid-template-columns: 248px minmax(0, 1fr); } }
.side { display: none; }
@media (min-width: 960px) {
  .side { display: flex; flex-direction: column; gap: 24px; background: var(--side); color: var(--side-fg); padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
  .side .brand b { color: #fff; }
  .side .brand span { color: var(--side-fg); opacity: .75; }
  .side .brand-mark { background: var(--hero-cta); color: var(--hero-ink); }
}
.side nav { display: grid; gap: 4px; }
.nav-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; font-weight: 600; font-size: .92rem; color: inherit; }
.nav-btn svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.side .nav-btn:hover { background: rgba(255,255,255,.06); }
.side .nav-btn.active { background: var(--side-active); color: #fff; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: #e8a33a; color: #2a1a00; font-size: .72rem; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.side-user .who { min-width: 0; flex: 1; }
.side-user b { display: block; color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { font-size: .74rem; opacity: .75; }
.side-user button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; }
.side-user button:hover { background: rgba(255,255,255,.08); }

.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-inline: 16px; padding-block: 10px; }
@media (min-width: 960px) { .topbar { display: none; } }
.topbar .brand b { font-size: .98rem; white-space: nowrap; }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.topbar .brand-mark svg { width: 20px; height: 20px; }
.topbar .spacer { flex: 1; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 50%; padding: 0; cursor: pointer; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (min-width: 960px) { .bottom-nav { display: none; } }
.bottom-nav .nav-btn { flex-direction: column; gap: 3px; padding: 8px 2px 9px; font-size: .68rem; font-weight: 600; color: var(--muted); border-radius: 0; justify-content: center; align-items: center; text-align: center; position: relative; }
.bottom-nav .nav-btn.active { color: var(--accent); }
.bottom-nav .nav-btn.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.bottom-nav .badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .64rem; padding: 0 5px; }
.bottom-nav .nav-btn.primary-action svg { background: var(--accent); color: var(--accent-ink); border-radius: 50%; padding: 6px; width: 32px; height: 32px; margin-top: -2px; }

main { min-width: 0; padding-inline: 16px; padding-block: 20px 110px; }
@media (min-width: 960px) { main { padding-inline: 36px; padding-block: 32px 48px; } }
.page { max-width: 1120px; margin: 0 auto; display: grid; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.card > h2, .card-head h2 { font-size: 1rem; font-weight: 700; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .hint { font-size: .8rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn.warn { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.btn.bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.pending { color: var(--amber); background: var(--amber-soft); }
.pill.approved { color: var(--green); background: var(--green-soft); }
.pill.revision { color: var(--blue); background: var(--blue-soft); }
.pill.rejected { color: var(--red); background: var(--red-soft); }
.pill.neutral { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.pill.plain::before { display: none; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; text-align: left; min-width: 0; }
button.kpi { cursor: pointer; }
button.kpi:hover { border-color: var(--accent); }
.kpi .label { font-size: .76rem; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .sub { font-size: .76rem; color: var(--muted); }
.kpi.attn .value { color: var(--amber); }

.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) { .grid-2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }

/* Hero CTA staff */
.hero { background: var(--side); color: #e8f3ee; border-radius: 20px; padding: 22px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero p { margin: 4px 0 0; color: var(--hero-sub); }
.hero .eyebrow { color: var(--hero-cta); }
.hero-top { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-start; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero .btn.primary { background: var(--hero-cta); border-color: var(--hero-cta); color: var(--hero-ink); justify-self: start; padding: 12px 18px; font-size: .95rem; }
.hero .btn.secondary { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; padding: 12px 18px; }
.hero .inp { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; color-scheme: dark; }
.hero-stats { display: flex; gap: 12px 26px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.hero-stats > * b { display: block; font-size: 1.45rem; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.25; }
.hero-stats > * span { display: block; font-size: .72rem; color: var(--hero-sub); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.hero-stats .hot b { color: var(--hero-cta); }
button.hero-stat { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }

/* Identitas peran */
.role-card { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.role-card .eyebrow { color: var(--hero-cta); font-size: .66rem; }
.role-card b { color: #fff; font-size: .98rem; }
.role-card span { font-size: .78rem; opacity: .8; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.role-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line); font-size: .8rem; color: var(--muted); max-width: 1120px; margin: 0 auto 18px; }
.demo-bar .seg button { font-size: .78rem; padding: 5px 10px; }
.demo-bar .seg button[data-switch="staff"].on { background: #17644c; color: #fff; }
.demo-bar .seg button[data-switch="hod"].on { background: #2c4fa3; color: #fff; }
.demo-bar .seg button[data-switch="gm"].on { background: #8a6414; color: #fff; }

.access { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .access { grid-template-columns: 1fr 1fr; } }
.access ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.access li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: .86rem; align-items: start; }
.access li i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .7rem; font-weight: 800; }
.access .yes i { background: var(--green-soft); color: var(--green); }
.access .no { color: var(--muted); }
.access .no i { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.access h3 { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* Login per peran */
.role-cols { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .role-cols { grid-template-columns: 1fr 1fr 1.15fr; align-items: start; } }
.role-col { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: grid; }
.role-col header { padding: 16px; color: #fff; display: grid; gap: 4px; }
.role-col header .eyebrow { color: rgba(255,255,255,.75); }
.role-col header b { font-size: 1.1rem; }
.role-col header p { margin: 0; font-size: .82rem; color: rgba(255,255,255,.8); }
.role-col.staff header { background: #17644c; }
.role-col.hod header { background: #2c4fa3; }
.role-col.gm header { background: #2a251c; }
.role-col.gm header .eyebrow { color: #e3b24f; }
.role-col .people { display: grid; padding: 6px; }
.role-col .user-pick { border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; }
.role-col .user-pick:hover { background: var(--surface-2); }
.role-col .user-pick .go { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 700; }

/* Activity list */
.acts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.page, .rcards, .act .body, .rcard, .dept-row, .dept-rows, .access ul, .form, .field { grid-template-columns: minmax(0, 1fr); }
.page > *, .grid-2 > * { min-width: 0; }
.act .who > div { min-width: 0; }
@media (max-width: 520px) { .act { grid-template-columns: auto minmax(0, 1fr); } .act > div:last-child { grid-column: 2; } }
.act { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.act:first-child { border-top: 0; }
.act:hover { background: var(--surface-2); }
.act .t { font-family: var(--font-data); font-size: .82rem; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; min-width: 44px; }
.act .body { min-width: 0; display: grid; gap: 2px; }
.act .ttl { font-weight: 700; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act .meta { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act .who { display: flex; align-items: center; gap: 8px; }
.act .flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.flag { font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.flag.out { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.flag.sim { color: var(--blue); }

.empty { text-align: center; padding: 30px 12px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 40px; height: 40px; opacity: .5; }

/* Dept bars */
.dept-rows { display: grid; gap: 14px; }
.dept-row { display: grid; gap: 6px; }
.dept-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.dept-row .top b { font-weight: 700; }
.dept-row .top span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.stack i { display: block; height: 100%; }
.stack .s-approved { background: var(--green); }
.stack .s-pending { background: var(--amber); }
.stack .s-revision { background: var(--blue); }
.stack .s-rejected { background: var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Map */
.map { height: 320px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); z-index: 0; }
.map.tall { height: 420px; }
.map-fallback { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .88rem; text-align: center; padding: 16px; }
.leaflet-popup-content { font-family: var(--font-ui); font-size: .82rem; }

/* Attention list */
.attn-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.attn-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem; }
.attn-list li .grow { flex: 1; min-width: 0; }
.attn-list li b { display: block; }
.attn-list li span { color: var(--muted); font-size: .78rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.inp, select.inp { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: .88rem; min-width: 0; }

/* Forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 700; color: var(--fg); }
.field > span em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 11px 13px; font-size: .95rem; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.row-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-select button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.chips-select button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.form-section { display: grid; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-section h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.locbox { border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 14px; display: grid; gap: 10px; }
.locbox .state { display: flex; gap: 12px; align-items: center; }
.locbox .state .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.locbox .state .ic svg { width: 22px; height: 22px; }
.locbox .state.err .ic { background: var(--red-soft); color: var(--red); }
.locbox .state .txt { min-width: 0; flex: 1; }
.locbox .state b { display: block; font-size: .92rem; }
.locbox .state span { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.locbox .coords { font-family: var(--font-data); font-size: .78rem; color: var(--muted); }
.locbox .acts-row { display: flex; gap: 8px; flex-wrap: wrap; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

.photo-drop { border: 1.5px dashed var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: center; cursor: pointer; background: var(--surface-2); }
.photo-drop:hover { border-color: var(--accent); }
.photo-drop svg { width: 26px; height: 26px; color: var(--muted); flex: none; }
.photo-drop input { display: none; }
.photo-drop b { display: block; font-size: .9rem; }
.photo-drop span { font-size: .78rem; color: var(--muted); }
.photo-prev { position: relative; justify-self: start; }
.photo-prev img { max-height: 180px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.photo-prev button { position: absolute; top: 6px; right: 6px; }

.submit-bar { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Report cards (history/approval) */
.rcards { display: grid; gap: 12px; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.rcard .head { display: flex; gap: 12px; align-items: flex-start; }
.rcard .head .grow { flex: 1; min-width: 0; cursor: pointer; }
.rcard .head b { display: block; font-size: .95rem; }
.rcard .head span { display: block; font-size: .8rem; color: var(--muted); }
.rcard .note { font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .facts { display: flex; flex-wrap: wrap; gap: 6px; }
.rcard .review { font-size: .84rem; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--blue); }
.rcard .review.rejected { border-left-color: var(--red); }
.rcard .review.approved { border-left-color: var(--green); }
.rcard .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rcard .check { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.bulk-bar .grow { flex: 1; font-size: .88rem; font-weight: 600; color: var(--accent); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
td.num { font-variant-numeric: tabular-nums; text-align: right; }

/* Sheet / modal */
.sheet-bg { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 20, 15, .5); display: grid; align-items: end; justify-items: center; }
@media (min-width: 720px) { .sheet-bg { align-items: center; padding: 24px; } }
.sheet { background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .sheet { border-radius: 20px; padding: 24px; } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head .grow { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.sheet-head p { margin: 2px 0 0; font-size: .84rem; color: var(--muted); }
.close-x { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none; display: grid; place-items: center; }
.close-x svg { width: 18px; height: 18px; }
.dl { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 8px 14px; font-size: .88rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.sheet .photo { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.sheet .map { height: 200px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; font-size: .84rem; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 5px; }
.timeline li.approved::before { background: var(--green); }
.timeline li.revision::before { background: var(--blue); }
.timeline li.rejected::before { background: var(--red); }
.timeline li.pending::before { background: var(--amber); }
.timeline li span { color: var(--muted); }
.review-box { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.review-box textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; min-height: 70px; width: 100%; resize: vertical; }
.review-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.review-box .row .btn { flex: 1; }

/* Menu */
.menu { position: fixed; z-index: 1001; right: 16px; top: calc(60px + env(safe-area-inset-top, 0px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; display: grid; gap: 2px; }
.menu .me { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .me b { display: block; }
.menu .me span { font-size: .78rem; color: var(--muted); }
.menu button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.menu button:hover { background: var(--surface-2); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 2000; background: var(--fg); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: .88rem; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
@media (min-width: 960px) { .toast { bottom: 28px; } }

.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mono { font-family: var(--font-data); }

/* ===================== Tambahan v2 ===================== */

/* Layar masuk, ganti PIN, setup, sambungkan server */
.auth { min-height: 100%; display: grid; place-items: center; padding-inline: 16px; padding-block: 40px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 20px; }
.auth-card.wide { max-width: 620px; }
.auth-card h1 { font-size: clamp(1.45rem, 4vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.auth-card p.lead { margin: 6px 0 0; color: var(--muted); }
.auth-card .card { display: grid; gap: 14px; }
.auth-foot { font-size: .78rem; color: var(--muted); text-align: center; }
.pin-input { font-family: var(--font-data) !important; font-size: 1.5rem !important; letter-spacing: .5em; text-align: center; padding-block: 12px !important; }
.form-error { color: var(--red); background: var(--red-soft); border-radius: 10px; padding: 10px 12px; font-size: .88rem; font-weight: 600; }
.form-note { color: var(--muted); font-size: .82rem; margin: 0; }

/* Status muat / kirim */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 12px; color: var(--muted); font-size: .9rem; }
.btn .spin { width: 16px; height: 16px; border-width: 2px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.sync-dot.off { background: var(--amber); }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; font-size: .86rem; font-weight: 600; }
.banner.warn { background: var(--amber-soft); color: var(--amber); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner .grow { flex: 1; }

/* PIN sementara yang harus diserahkan GM */
.temp-pin { display: grid; gap: 6px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line); text-align: center; }
.temp-pin .pin { font-family: var(--font-data); font-size: 2rem; font-weight: 500; letter-spacing: .3em; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; font-family: var(--font-data); font-size: .8rem; }

.photo-loading { height: 160px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.flag.poor { color: var(--red); }
.muted-row td { color: var(--muted); }
