/* Annur Docs — token mengikut docs/04-DBD.md */
:root {
  --primary: #1e3a8a; --primary-h: #2747a6; --navy: #0b1d4d; --accent: #c62828;
  --bg: #edf0f5; --card: #fff; --line: #e4e8ef; --soft: #f3f5f9;
  --ink: #0f172a; --mute: #64748b;
  --green: #2e7d32; --green-soft: #e6f4e7; --amber: #8a5a00; --amber-soft: #fff2d9;
  --red: #c62828; --red-soft: #fdeceb; --blue-soft: #e7edfb;
  --r: 18px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
small { font-size: 12px; }
code { background: var(--soft); padding: 1px 5px; border-radius: 6px; font-size: 13px; }
.muted { color: var(--mute); }
.fine { font-size: 12px; color: var(--mute); }
.center { text-align: center; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--mute); }
.ic { width: 20px; height: 20px; flex: none; }
.ic.xl { width: 40px; height: 40px; color: #94a3b8; }

/* butang */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--soft); }
.btn:focus-visible, .qbtn:focus-visible, .nav button:focus-visible { outline: 3px solid rgba(39, 71, 166, .35); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--primary-h); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .1); }

/* log masuk */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 80% at 10% 0%, #15306f 0%, var(--navy) 55%, #050d24 100%); }
.login-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 24px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-card h1 { font-size: 26px; line-height: 1.2; margin: 24px 0 8px; }
.login-card p { margin: 0 0 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 10px; }
.brand b { display: block; font-size: 16px; }
.brand small { display: block; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.brand.sm { padding: 4px 8px 20px; color: #fff; }
.brand.sm b { font-size: 15px; }
.ticks { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; color: var(--ink); font-size: 14px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 10px; height: 6px; border: solid var(--green); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.note { border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.note.danger { background: var(--red-soft); color: var(--red); }

/* kerangka */
.shell { min-height: 100vh; }
.side { display: none; }
.content { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1200px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.offline { background: var(--amber-soft); color: var(--amber); padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.row small { display: block; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; }

/* kad lesen */
.lic { background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.lic small { color: #c9d2e3; }
.lic .big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.lic-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.chip.amber { background: var(--amber-soft); color: var(--amber); }

/* notis */
.notice { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.notice.info { background: var(--blue-soft); color: var(--primary); }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
.notice.urgent, .notice.critical { background: var(--red-soft); color: var(--red); }
.notice.critical { border-left: 4px solid var(--red); }

/* pintasan */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--soft); color: var(--primary); font-weight: 600; cursor: pointer; text-align: center; font-size: 14px; }
.qbtn:hover { border-color: var(--primary); background: var(--blue-soft); }
.qbtn .ic { width: 28px; height: 28px; }
.empty { text-align: center; padding: 24px 8px; color: var(--mute); }
.empty p { margin: 8px 0 4px; color: var(--ink); }

/* navigasi bawah (telefon) */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
.nav { display: flex; justify-content: space-around; align-items: center; }
.nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; min-height: 48px; color: var(--mute); font-size: 11px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.nav button.on { color: var(--primary); }
.nav .nav-new { width: 52px; height: 52px; min-height: 52px; border-radius: 50%; background: var(--primary); color: #fff; margin-top: -22px; box-shadow: 0 8px 20px rgba(30, 58, 138, .35); justify-content: center; }
.nav .nav-new .ic { width: 26px; height: 26px; }

/* desktop */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: block; position: sticky; top: 0; height: 100vh; background: var(--navy); padding: 20px 12px; }
  .side .nav { flex-direction: column; align-items: stretch; gap: 4px; }
  .side .nav button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; font-size: 14px; color: #c9d2e3; min-height: 44px; }
  .side .nav button.on, .side .nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .side .nav .nav-new { order: -1; width: auto; height: auto; border-radius: var(--r-sm); margin: 0 0 12px; box-shadow: none; }
  .side .nav .nav-new::after { content: "Dokumen baharu"; font-size: 14px; }
  .side .nav .nav-new .ic { width: 20px; height: 20px; }
  .bottom { display: none; }
  .content { padding: 28px 32px; width: 100%; }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; transition: .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* pill status Sheet (docs/04-DBD.md §6) */
.topbar { display: flex; justify-content: flex-end; margin-bottom: 4px; min-height: 30px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--mute); }
button.pill { cursor: pointer; min-height: 30px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--blue-soft); color: var(--primary); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.pulse i { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pill.pulse i { animation: none; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary); }

/* dialog / helaian bawah */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .6); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet { background: var(--card); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet p { margin: 0 0 16px; }
.sheet-acts { display: grid; gap: 8px; margin-bottom: 8px; }
@media (min-width: 640px) { .overlay { align-items: center; } .sheet { border-radius: 20px; } }

/* senarai dokumen ringkas */
.dlist { display: grid; }
.drow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.drow:first-child { border-top: 0; }
.drow small { display: block; }
.dright { display: flex; align-items: center; gap: 8px; text-align: right; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }

/* ---------- borang (docs/04-DBD.md §6) ---------- */
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.fld label, legend { font-size: 13px; font-weight: 600; color: var(--ink); }
.req { color: var(--red); }
.inp { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; }
textarea.inp { resize: vertical; min-height: 64px; line-height: 1.4; }
.inp:focus { outline: none; border-color: var(--primary-h); box-shadow: 0 0 0 3px rgba(39, 71, 166, .18); }
.inp[aria-invalid="true"] { border-color: var(--red); }
.inp.up { text-transform: uppercase; }
.inp.up::placeholder { text-transform: none; }
.hint { color: var(--mute); }
.ferr { color: var(--red); font-size: 12px; margin: 0; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.radios, .checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks { flex-direction: column; }
.radios legend, .checks legend { margin-bottom: 8px; width: 100%; }
.radios label, .checks label, .sw { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.note.info { background: var(--blue-soft); color: var(--primary); }
details { margin: 8px 0 0; }
summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
details[open] summary { margin-bottom: 8px; }

/* ---------- wizard S-02 ---------- */
.topbar.fixed { position: fixed; top: 12px; right: 16px; z-index: 30; }
.wiz { min-height: 100vh; padding: 16px 16px 48px; max-width: 1200px; margin: 0 auto; }
.wiz-head { display: flex; flex-direction: column; gap: 16px; margin: 4px 0 16px; }
.wiz-head .brand small { color: var(--mute); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; }
.steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); white-space: nowrap; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--card); }
.steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 12px; font-weight: 700; }
.steps li.on { color: var(--primary); font-weight: 600; }
.steps li.on span { background: var(--primary); color: #fff; }
.steps li.done span { background: var(--green-soft); color: var(--green); }
.wiz-body { display: grid; gap: 16px; }
.wiz-form h1 { margin-bottom: 4px; }
.wiz-form > p.muted { margin: 0 0 18px; }
.wiz-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.row-end { display: flex; gap: 8px; }
.folder-note { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: var(--r-sm); padding: 12px; margin-top: 4px; }
.folder-note .ic { color: var(--primary); margin-top: 2px; }
.folder-note > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-note b { word-break: break-word; }
.prefix-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.pcard { background: var(--soft); border-radius: var(--r-sm); padding: 12px 12px 10px; }
.pcard .fld { margin-bottom: 6px; }
@media (min-width: 640px) { .prefix-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) {
  .wiz { padding: 28px 32px 48px; }
  .wiz-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .wiz-body { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
  .wiz-preview { position: sticky; top: 24px; }
}

/* ---------- pratonton kepala dokumen ---------- */
.dh { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; font-size: 12px; line-height: 1.45; color: #111827; margin-top: 6px; }
.dh-top { display: flex; gap: 12px; align-items: flex-start; }
.dh-logo { width: 56px; height: 56px; border-radius: 10px; border: 1px dashed #cbd5e1; display: grid; place-items: center; color: #94a3b8; font-size: 10px; font-weight: 700; flex: none; }
.dh-co { min-width: 0; word-break: break-word; }
.dh-co b { font-size: 14px; }
.dh-title { margin: 16px 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.dh-title span { font-size: 18px; font-weight: 700; letter-spacing: .04em; color: var(--acc); }
.dh-table { display: grid; gap: 4px; margin-bottom: 12px; }
.dh-table div { height: 12px; border-radius: 3px; background: #f1f5f9; }
.dh-table div:first-child { background: var(--acc); opacity: .9; }
.dh-bank { margin-bottom: 10px; }
.dh-sign { display: flex; flex-direction: column; align-items: flex-start; margin: 8px 0 10px; }
.dh-sign span { width: 120px; border-bottom: 1px solid #94a3b8; height: 28px; margin-bottom: 4px; }

/* ---------- halaman tetapan ---------- */
.link-back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; color: var(--primary); font-weight: 600; font-size: 14px; padding: 4px 0; cursor: pointer; min-height: 32px; }
.link-back .ic { width: 18px; height: 18px; }
.split { display: grid; gap: 16px; }
.stack { display: grid; gap: 0; min-width: 0; }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .preview-col { position: sticky; top: 24px; } }
.save-bar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; gap: 8px; padding: 12px; background: rgba(255, 255, 255, .96); border-radius: var(--r); box-shadow: var(--shadow); z-index: 10; }
@media (min-width: 1024px) { .save-bar { bottom: 16px; } }
.menu { padding: 6px; }
.mrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; background: none; border: 0; border-radius: var(--r-sm); text-align: left; cursor: pointer; color: var(--ink); }
.mrow:hover:not(:disabled):not(.off) { background: var(--soft); }
.mrow > div { flex: 1; display: flex; flex-direction: column; }
.mrow > .ic:first-child { color: var(--primary); width: 22px; height: 22px; }
.mrow > .ic:last-child { color: var(--mute); }
.mrow.off, .mrow:disabled { opacity: .55; cursor: default; }
.table-wrap { overflow-x: auto; margin: 4px -4px 8px; }
table.tax { width: 100%; border-collapse: collapse; min-width: 520px; }
table.tax th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.tax td { padding: 8px 4px; vertical-align: top; border-bottom: 1px solid var(--line); }
table.tax td small { display: block; }
table.tax .fld { margin: 0; }
table.tax .fld label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.w-rate { width: 96px; } .w-on { width: 90px; }
.color-row { display: flex; gap: 12px; align-items: flex-end; }
.color-row input[type="color"] { width: 52px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; background: #fff; margin-bottom: 14px; }
.color-row .fld { flex: 1; }
table.tax td:first-child { min-width: 150px; word-break: break-word; font-size: 13px; }

/* ---------- S-09 gambar, cop & tandatangan ---------- */
.itiles { display: grid; gap: 14px; }
.itile { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.itile:last-child { border-bottom: 0; padding-bottom: 0; }
.ithumb { height: 112px; border: 1px dashed #cbd5e1; border-radius: var(--r-sm); display: grid; place-items: center; overflow: hidden; background: #fff; color: #94a3b8; }
.ithumb.chk { background-image: linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%), linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.ithumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ithumb img.ghost { opacity: .35; }
.ithumb span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.imeta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.imeta small { line-height: 1.4; }
.iacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.iacts .btn.sm { cursor: pointer; }
.sw.sm { min-height: 36px; font-size: 14px; }
.tol { display: grid; gap: 4px; font-size: 13px; } .tol.off { opacity: .45; }
.tol input[type="range"], .size input[type="range"] { width: 100%; accent-color: var(--primary); }
.pend { color: var(--amber); font-weight: 600; }
@media (max-width: 420px) { .itile { grid-template-columns: 1fr; } .ithumb { height: 140px; } }

.sign-ed { display: grid; gap: 12px; }
.seg { display: inline-flex; background: var(--soft); border-radius: var(--r-sm); padding: 3px; width: fit-content; }
.seg button { border: 0; background: none; padding: 8px 16px; min-height: 40px; border-radius: 10px; font-weight: 600; color: var(--mute); cursor: pointer; }
.seg button.on { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.seg button:disabled { opacity: .4; cursor: default; }
.sbox { position: relative; width: 100%; max-width: 520px; aspect-ratio: 260 / 140; border: 1px dashed #94a3b8; border-radius: var(--r-sm); background: #fff; overflow: hidden; touch-action: none; user-select: none; }
.sbox::after { content: "Ruang tandatangan"; position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: #cbd5e1; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.sbox.static { max-width: 200px; border: 0; border-bottom: 1px solid #94a3b8; border-radius: 0; background: none; overflow: visible; margin-bottom: 4px; }
.sbox.static::after { content: none; }
.sitem { position: absolute; cursor: grab; touch-action: none; outline-offset: 0; }
.sitem img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.sitem.sel { outline: 2px solid var(--primary-h); }
.sitem.drag { cursor: grabbing; outline-style: dashed; }
.sitem:focus-visible { outline: 3px solid rgba(39, 71, 166, .5); }
img.sitem.static { position: absolute; pointer-events: none; cursor: default; height: auto; }
.nudge-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.nudge { display: inline-grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
.nudge button { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); display: grid; place-items: center; cursor: pointer; color: var(--ink); touch-action: manipulation; }
.nudge button:active { background: var(--blue-soft); }
.size { flex: 1; min-width: 180px; display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.empty.small { padding: 12px 4px; }
.dh-logo.has { border: 0; background: none; }
.dh-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dh-sign .sbox.static { min-height: 40px; }

/* ---------- S-04 editor dokumen ---------- */
.editor .page-head { margin-bottom: 10px; }
.doc-seg { margin-bottom: 12px; }
.ed-tabs { display: inline-flex; margin: 0 0 12px 8px; }
.ed-grid { display: grid; gap: 16px; }
.ed-form { min-width: 0; }
.ed-preview { min-width: 0; }
.cust { position: relative; }
.sugg { list-style: none; margin: -6px 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; box-shadow: var(--shadow); }
.sugg button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; min-height: 44px; }
.sugg button:hover, .sugg button:focus-visible { background: var(--soft); }
.sugg small { color: var(--mute); }
[data-sugg] > .btn { margin: -4px 0 12px; }
.items { display: grid; gap: 12px; margin-bottom: 12px; }
.itcard { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: var(--soft); }
.itcard .inp { background: #fff; }
.ithead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ithead .amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.itbtns { display: flex; gap: 4px; }
.ithead .amt + .itbtns { margin-left: 8px; }
.ithead b + .itbtns { margin-left: auto; }
.ib { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.ib:disabled { opacity: .35; cursor: default; }
.ib.danger { color: var(--red); }
.ib .ic { width: 18px; height: 18px; }
.itgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.itgrid .fld { margin-bottom: 8px; }
.itgrid .span2 { grid-column: 1 / -1; }
@media (min-width: 640px) { .itgrid { grid-template-columns: 90px 110px 1fr 1fr; } .itgrid.do { grid-template-columns: 120px 140px; } }
.btn.dashed { border: 2px dashed #cbd5e1; background: transparent; color: var(--mute); }
.btn.dashed:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--blue-soft); }
.tcard { background: var(--navy); color: #fff; }
.tc-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; color: #c9d2e3; }
.tc-row.big { color: #fff; font-size: 22px; padding-top: 8px; margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .15); }
.tc-row.big span { font-size: 14px; align-self: center; }
.tc-words { font-size: 11px; color: #c9d2e3; margin-top: 6px; letter-spacing: .02em; }
.ed-acts { display: none; }
.ed-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; }
.ed-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-bar small { color: var(--mute); font-size: 11px; }
.ed-bar b { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell.v-editor .bottom { display: none; }
.shell.v-editor .content { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.editor.tab-form .ed-preview { display: none; }
.editor.tab-preview .ed-form { display: none; }
.badge.grey { background: var(--soft); color: var(--mute); }
.dopen { background: none; border: 0; text-align: left; padding: 0; cursor: pointer; display: flex; flex-direction: column; min-width: 0; flex: 1; color: var(--ink); min-height: 44px; justify-content: center; }
.dopen small { display: block; }
@media (min-width: 1024px) {
  .ed-tabs { display: none; }
  .editor.tab-form .ed-preview, .editor.tab-preview .ed-form { display: block; }
  .ed-grid { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; }
  .ed-preview { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 4px; }
  .ed-bar { display: none; }
  .ed-acts { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 16px; padding: 12px; background: rgba(255, 255, 255, .96); border-radius: var(--r); box-shadow: var(--shadow); }
  .shell.v-editor .content { padding-bottom: 28px; max-width: 1500px; }
}

/* ---------- S-05 terbit & S-12 ---------- */
.isteps { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 10px; }
.isteps li { display: flex; align-items: center; gap: 10px; color: var(--mute); }
.isteps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 12px; font-weight: 700; flex: none; }
.isteps li.run { color: var(--primary); font-weight: 600; } .isteps li.run span { background: var(--primary); color: #fff; animation: pulse 1s ease-in-out infinite; }
.isteps li.ok { color: var(--ink); } .isteps li.ok span { background: var(--green-soft); color: var(--green); }
.isteps li.bad { color: var(--red); font-weight: 600; } .isteps li.bad span { background: var(--red-soft); color: var(--red); }
@media (prefers-reduced-motion: reduce) { .isteps li.run span { animation: none; } }
.ok-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 28px; font-weight: 700; margin: 0 auto 8px; }
.sheet h2 { text-align: left; }
.sheet .ok-badge + h2 { text-align: center; }
.bignum { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .02em; margin: 4px 0 2px !important; font-variant-numeric: tabular-nums; }
.acts3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--primary); }
a.btn { text-decoration: none; }

/* ---------- S-06 Rekod & S-07 Pelanggan ---------- */
.rfilters { display: grid; gap: 10px; margin-bottom: 10px; }
.rf-row { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 640px) { .rf-row { grid-template-columns: minmax(0, 1fr) 190px 150px; } }
[data-form="cust-filter"] .rf-row { grid-template-columns: 1fr auto; }
.drow.rec .dright { flex-wrap: wrap; justify-content: flex-end; }
.drow .dright .ib { font-size: 18px; line-height: 1; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #a51f1f; }
.btn.danger-o { color: var(--red); border-color: var(--red-line, #f3c6c4); }
.sheet.wide { max-width: 560px; max-height: calc(100vh - 24px); overflow: auto; }
.page-head .btn.primary { min-height: 40px; }
.sheet p .badge { vertical-align: middle; }
.sheet { max-height: calc(100vh - 24px); overflow: auto; }

/* ---------- S-11 Langganan & Kredit ---------- */
.plans { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 14px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 4px; }
.plan.best { border-color: var(--primary); background: var(--blue-soft); }
.plan .price { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--mute); }
.paysteps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 10px; }
.copyrow { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.copyrow code { font-size: 14px; padding: 6px 10px; word-break: break-all; }
.acts-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
table.ltab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ltab th { text-align: left; font-size: 12px; color: var(--mute); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.ltab td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.ltab .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ltab .neg { color: var(--red); } table.ltab .pos { color: var(--green); }
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; background: var(--amber-soft); color: var(--amber); padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 8px; font-size: 14px; }
.login-card .btn.ghost.block { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { color: var(--ink); min-height: 44px; }
.faq p { margin: 0 0 12px; color: var(--ink2, #334155); }
