/* RenGO — gaya paparan */
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans.woff') format('woff'); font-weight: 100 1000; font-display: swap; }

:root, [data-theme="A"] {
  --bg:#F5F5F2; --card:#FFFFFF; --line:#E7E7E3; --ink:#121212; --muted:#5F6368; --soft:#F0F0EC;
  --accent:#0F766E; --on-accent:#FFFFFF; --acc-text:#0F766E; --acc-soft:#E6F4F1;
  --hero-bg:#121212; --hero-ink:#FFFFFF; --hero-muted:#C9C9C4; --hero-hi:#5EEAD4; --hero-track:#3F3F3B;
  --warn:#B45309; --warn-soft:#FEF3C7; --danger:#B91C1C; --ok:#15803D; --ok-soft:#DCFCE7;
  --nav-bg:#FFFFFF; --fab:#121212; --fab-ink:#FFFFFF; --cur-bg:#121212; --cur-fg:#FFFFFF; --input:#FFFFFF;
  color-scheme: light;
}
[data-theme="B"] {
  --bg:#F4F5FA; --card:#FFFFFF; --line:#E1E4F0; --ink:#111427; --muted:#5B6078; --soft:#EEF0FB;
  --accent:#4F46E5; --on-accent:#FFFFFF; --acc-text:#4338CA; --acc-soft:#EEF0FB;
  --hero-bg:#4338CA; --hero-ink:#FFFFFF; --hero-muted:#D4DAFE; --hero-hi:#FDE68A; --hero-track:#6366F1;
  --nav-bg:#FFFFFF; --fab:#4F46E5; --fab-ink:#FFFFFF; --cur-bg:#4F46E5; --cur-fg:#FFFFFF;
}
[data-theme="C"] {
  --bg:#F3F6F1; --card:#FFFFFF; --line:#DDE6D8; --ink:#0F1A0F; --muted:#56624F; --soft:#EEF3EA;
  --accent:#BEF264; --on-accent:#0F1A0F; --acc-text:#3F6212; --acc-soft:#ECFCCB;
  --hero-bg:#14281A; --hero-ink:#FFFFFF; --hero-muted:#B9C7B4; --hero-hi:#BEF264; --hero-track:#2C4433;
  --warn:#A16207; --nav-bg:#FFFFFF; --fab:#14281A; --fab-ink:#BEF264; --cur-bg:#14281A; --cur-fg:#BEF264;
}
[data-theme="D"] {
  --bg:#FAF6F1; --card:#FFFFFF; --line:#EBE2D6; --ink:#1C1917; --muted:#6B5E54; --soft:#F5EEE6;
  --accent:#C2410C; --on-accent:#FFFFFF; --acc-text:#C2410C; --acc-soft:#FFEDD5;
  --hero-bg:#1C1917; --hero-ink:#FFFFFF; --hero-muted:#D6CEC8; --hero-hi:#FDBA74; --hero-track:#44403C;
  --warn:#A16207; --nav-bg:#FFFFFF; --fab:#C2410C; --fab-ink:#FFFFFF; --cur-bg:#C2410C; --cur-fg:#FFFFFF;
}
[data-theme="E"] {
  --bg:#0B1120; --card:#151D30; --line:#26314B; --ink:#F1F5F9; --muted:#9AA8BC; --soft:#1E2840;
  --accent:#E3B341; --on-accent:#1A1405; --acc-text:#E3B341; --acc-soft:#2A2614;
  --hero-bg:#E3B341; --hero-ink:#1A1405; --hero-muted:#4A3B10; --hero-hi:#1A1405; --hero-track:#C99A2E;
  --warn:#FBBF24; --warn-soft:#3A2E0B; --danger:#F87171; --ok:#4ADE80; --ok-soft:#12301E;
  --nav-bg:#111827; --fab:#E3B341; --fab-ink:#1A1405; --cur-bg:#E3B341; --cur-fg:#1A1405; --input:#0F172A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; transition: background .25s; }
a { color: var(--acc-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; } .tiny { font-size: 11px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; } .gap { gap: 12px; } .wrap { flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Logo ikut tema */
img.logo-dark { display: none !important; }
[data-theme="E"] img.logo-light { display: none !important; }
[data-theme="E"] img.logo-dark { display: block !important; }

/* ---------- Susun atur ---------- */
.shell { display: flex; min-height: 100vh; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: 20px 16px 110px; max-width: 1180px; margin: 0 auto; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.topbar h1 { font-size: 26px; font-weight: 800; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; min-height: 44px; }
.mobile-logo img { height: 28px; width: auto; display: block; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--nav-bg); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 60px; padding: 4px; }
.bottom-nav a.on { color: var(--acc-text); font-weight: 700; }
.bottom-nav .fab { width: 54px; height: 54px; min-width: 54px; border-radius: 27px; background: var(--fab); color: var(--fab-ink); justify-content: center; margin-top: -22px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }

@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 20px; width: 248px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 0; height: 100vh; }
  .side .logo img { height: 34px; width: auto; display: block; margin: 0 8px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 14px; }
  .side nav a:hover { background: var(--soft); }
  .side nav a.on { background: var(--cur-bg); color: var(--cur-fg); }
  .side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--soft); }
  .bottom-nav, .mobile-logo { display: none; }
  .main { padding: 32px 36px 48px; }
}

/* ---------- Komponen ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; }
.eyebrow.warn { color: var(--warn); }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 900px) {
  .grid-lg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.dark { background: var(--cur-bg); border-color: var(--cur-bg); color: var(--cur-fg); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn.ok { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.icon-btn.sm { width: 38px; height: 38px; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--cur-bg); border-color: var(--cur-bg); color: var(--cur-fg); }
.chip.past { color: var(--acc-text); border-color: color-mix(in srgb, var(--acc-text) 40%, transparent); }
.chip.sel { background: var(--acc-soft); border-color: var(--acc-text); color: var(--acc-text); }
.chip.okb { background: var(--ok); border-color: var(--ok); color: #fff; }
[data-theme="E"] .chip.okb { color: #0B1120; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.badge-ok { font-size: 11px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 10px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--soft); border-radius: 13px; }
.seg button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar.lg { width: 48px; height: 48px; border-radius: 24px; font-size: 16px; }
.avatar.accent { background: var(--accent); color: var(--on-accent); }
.avatar.dark { background: var(--cur-bg); color: var(--cur-fg); }

.list { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2px 14px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
.list-item .t1 { font-weight: 700; font-size: 14px; }
.list-item .t2 { font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex-shrink: 0; background: var(--muted); }
.dot.s0 { background: #9A9A94; } .dot.s1, .dot.s2 { background: var(--warn); } .dot.s3, .dot.s4, .dot.s5 { background: var(--acc-text); } .dot.s6 { background: var(--ink); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); font-size: 14px; }

.bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--acc-text); }
.bar.ink > i { background: var(--ink); }
.steps { display: flex; gap: 4px; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); }
.steps span.on { background: var(--acc-text); }

/* Kad utama */
.hero { background: var(--hero-bg); color: var(--hero-ink); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero .k { font-size: 13px; color: var(--hero-muted); font-weight: 500; }
.hero .big { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.hero .hi { color: var(--hero-hi); font-size: 22px; font-weight: 800; }
.hero .hbar { display: flex; gap: 4px; }
.hero .hbar span { height: 6px; border-radius: 3px; }
.hero-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--hero-muted); letter-spacing: .4px; }
.hero-label .dot { background: var(--hero-hi); width: 10px; height: 10px; border-radius: 5px; }
.hero-title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.hero-sub { font-size: 13px; color: var(--hero-muted); }
.hero .bars { display: flex; gap: 4px; }
.hero .bars span { flex: 1; height: 6px; border-radius: 3px; background: var(--hero-track); }
.hero .bars span.on { background: var(--hero-hi); }
.hero .bars span.now { background: #F59E0B; }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: block; color: var(--ink); text-align: left; }
.stat b { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat.late b { color: var(--danger); } .stat.today b { color: var(--warn); }
.stat.on { outline: 2px solid var(--acc-text); }

.ring { display: flex; align-items: center; gap: 16px; }
.ring svg circle.track { stroke: var(--soft); }
.ring svg circle.val { stroke: var(--acc-text); }
.ring svg text { fill: var(--ink); font-weight: 800; }

.vbars { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
.vbars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; justify-content: flex-end; height: 100%; }
.vbars i { display: block; width: 100%; border-radius: 4px; background: var(--acc-text); min-height: 3px; }
.vbars div:nth-child(1) i { background: #9A9A94; } .vbars div:nth-child(2) i, .vbars div:nth-child(3) i { background: var(--warn); } .vbars div:nth-child(7) i { background: var(--ink); }
.vlabels { display: flex; gap: 6px; font-size: 9px; color: var(--muted); margin-top: 6px; }
.vlabels span { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.datebox { width: 48px; height: 48px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; }
.datebox b { font-size: 17px; } .datebox span { font-size: 9px; font-weight: 700; }

/* Borang */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea, .input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--ink); font-size: 16px; font-weight: 500; outline: none; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus { border-color: var(--acc-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc-text) 18%, transparent); }
.form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }

/* Senarai semak */
.check { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-size: 14px; color: var(--ink); }
.check:last-child { border-bottom: 0; }
.check .box { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: transparent; }
.check.on { color: var(--muted); }
.check.on .box { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Garis masa */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--acc-text); }
.timeline .node { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.timeline li.done .node { background: var(--acc-text); border-color: var(--acc-text); color: var(--card); }
.timeline li.now .node { border: 3px solid var(--warn); }
.timeline .tl-label { font-size: 14px; font-weight: 600; }
.timeline li.now .tl-label { font-weight: 800; }
.timeline li:not(.done):not(.now) .tl-label { color: var(--muted); }

.act { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.act:last-child { border-bottom: 0; }
.act time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Kanban (desktop) */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--soft); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.kcol h3 { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; padding: 2px 4px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.kcard b { font-size: 13px; } .kcard span { font-size: 11px; color: var(--muted); }

/* Lembaran bawah / modal */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease; }
.sheet h2 { font-size: 20px; margin-bottom: 14px; }
@media (min-width: 900px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--cur-bg); color: var(--cur-fg); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw; animation: up .2s; }
.toast.err { background: var(--danger); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 14px; border: 3px solid var(--soft); border-top-color: var(--acc-text); animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Log masuk / portal */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 24px; font-weight: 800; }
.auth-logo { height: 40px; width: auto; align-self: flex-start; }
.alert { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 0; }
.success { background: var(--ok-soft); color: var(--ok); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 0; font-weight: 600; }
.checks { list-style: none; padding: 0; margin: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.checks .ok { color: var(--ok); } .checks .bad { color: var(--danger); font-weight: 700; }
.portal { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.portal-agent { display: flex; align-items: center; gap: 12px; }
.portal .title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.plain-list { margin: 0 0 8px; padding-left: 20px; font-size: 14px; }
.plain-list li { padding: 3px 0; }

/* Tema */
.theme-opt { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: left; color: var(--ink); }
.theme-opt.on { border: 2px solid var(--acc-text); }
.theme-opt .sw { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(0,0,0,.1); flex-shrink: 0; }
.theme-opt .radio { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--on-accent); }
.theme-opt.on .radio { background: var(--accent); border-color: var(--accent); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: #9CA3AF; border: 0; padding: 3px; display: flex; flex-shrink: 0; }
.switch i { width: 24px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on { background: var(--acc-text); justify-content: flex-end; }

/* v1.1.0 */
.form .two { align-items: end; }
.form input[type="date"], .form input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; line-height: 1.3; text-align: left; }
.form input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.note-box { background: var(--acc-soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-top: -4px; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.banker { padding: 8px 0; border-bottom: 1px solid var(--line); }
.banker:last-of-type { border-bottom: 0; }
.banker-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 44px; gap: 8px; margin-top: 6px; align-items: center; }
.banker-row .input { min-height: 44px; font-size: 15px; padding: 8px 12px; }
.seg button { padding: 0 6px; line-height: 1.2; }

/* ===== v1.2.0 ===== */
.tile-soft { background: var(--soft); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.tile-soft.acc { background: var(--acc-soft); }
.tag-acc { background: var(--acc-soft); color: var(--acc-text); }
.avatar.outline { background: transparent; border: 1.5px dashed var(--acc-text); color: var(--acc-text); }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap button { flex: 1 1 auto; }
.checkline { flex-direction: row !important; align-items: center; gap: 10px; font-weight: 500; }
.checkline input { width: 20px; height: 20px; accent-color: var(--acc-text); flex-shrink: 0; }
.dot.p0 { background: #9A9A94; } .dot.p1 { background: var(--warn); } .dot.p2 { background: #D97706; }
.dot.p3 { background: var(--ok); } .dot.p4, .dot.p5 { background: var(--acc-text); } .dot.p6 { background: var(--ink); }
.chip-date { display: block; font-size: 10px; font-weight: 600; opacity: .75; margin-top: 1px; }
.chip.xs { padding: 4px 9px; font-size: 11px; min-height: 0; }
.chip.nob { background: var(--danger); border-color: var(--danger); color: #fff; }
[data-theme="E"] .chip.nob { color: #0B1120; }
.banker-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.banker-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 0; }
.banker-dates input { min-width: 0; width: 100%; }

/* Susulan lewat — berkelip */
@keyframes rg-blink { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 0%, transparent); border-color: var(--line); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent); border-color: var(--danger); } }
@keyframes rg-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.7); } }
.late-row { position: relative; background: color-mix(in srgb, var(--danger) 7%, var(--card)); }
.list .late-row { box-shadow: inset 3px 0 0 var(--danger); animation: rg-row 1.4s ease-in-out infinite; }
@keyframes rg-row { 0%, 100% { background: color-mix(in srgb, var(--danger) 4%, var(--card)); } 50% { background: color-mix(in srgb, var(--danger) 16%, var(--card)); } }
.kcard.late-row, .late-card, .late-blink { border: 1px solid var(--danger); animation: rg-blink 1.4s ease-in-out infinite; }
.late-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); display: inline-block; flex-shrink: 0; animation: rg-dot 1s ease-in-out infinite; }
.late-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; font-weight: 700; color: #fff; background: var(--danger); padding: 4px 10px; border-radius: 10px; animation: rg-dot 1.4s ease-in-out infinite; }
[data-theme="E"] .late-pill { color: #0B1120; }
@media (prefers-reduced-motion: reduce) {
  .late-row, .list .late-row, .late-card, .late-blink, .kcard.late-row, .late-dot, .late-pill { animation: none !important; }
  .late-card, .late-blink, .kcard.late-row { box-shadow: 0 0 0 2px var(--danger); }
}

/* Laporan */
.report-top { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.month-nav { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 3px; gap: 2px; }
.kpi-grid { grid-template-columns: repeat(2, 1fr); }
.kpi-grid .stat b { font-size: 24px; margin: 2px 0; }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(5, 1fr); } }
.trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 120px; }
.trend div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; font-size: 10px; color: var(--hero-muted); height: 100%; }
.trend i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; }
.funnel-row { display: grid; grid-template-columns: 130px 1fr 28px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-row b { text-align: right; }
.funnel-row .bar i.ph0 { background: #9A9A94; } .funnel-row .bar i.ph1 { background: var(--warn); } .funnel-row .bar i.ph2 { background: #D97706; }
.funnel-row .bar i.ph3 { background: var(--ok); } .funnel-row .bar i.ph4, .funnel-row .bar i.ph5 { background: var(--acc-text); } .funnel-row .bar i.ph6 { background: var(--ink); }
@media (max-width: 480px) { .funnel-row { grid-template-columns: 96px 1fr 24px; font-size: 11px; } }
.table-wrap { overflow-x: auto; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.total td { font-weight: 800; border-bottom: 0; }

/* Cetak / PDF */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  .side, .bottom-nav, .mobile-logo, .no-print, .toast, .sheet-bg { display: none !important; }
  .shell { display: block !important; }
  main, .main, #view { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .card, .hero, .stat { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd !important; }
  .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar i, .trend i, .dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grid-lg-2 { grid-template-columns: 1fr 1fr !important; }
  .kpi-grid { grid-template-columns: repeat(5, 1fr) !important; }
  a { color: inherit !important; text-decoration: none !important; }
}
.grid > *, .stack > * { min-width: 0; }
.hero .row > div { min-width: 0; }
.tag { white-space: nowrap; }
.list-item .steps { flex: 0 0 140px; }
.form .checkline input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; box-shadow: none; background: none; margin: 0; -webkit-appearance: auto; appearance: auto; }
.tbl td { white-space: nowrap; }
.tbl td.wrapcell { white-space: normal; min-width: 150px; }
@media print { .tbl { font-size: 9.5px; } .tbl th { font-size: 9px; padding: 6px 4px; } .tbl td { padding: 6px 4px; } .table-wrap { overflow: visible; margin: 0; } .kpi-grid .stat b { font-size: 20px; } }
.kcard .tag { font-size: 10px; }
.kcard .tag-acc { color: var(--acc-text); }
.input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; line-height: 1.3; text-align: left; }
.input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.banker-dates { align-items: end; }
.banker-dates label { white-space: nowrap; }
.export-prev { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0 12px; background: #F7F7F4; -webkit-overflow-scrolling: touch; }
.export-prev img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; }
.form-err { background: color-mix(in srgb, var(--danger) 10%, var(--card)); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.form input.bad { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.appt-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px dashed var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.appt-box.hidden { display: none; }
