/* O2O Digital brand, taken from o2o.my: Urbanist headings, Inter body,
   orange #F48120 actions, navy #1E3A8A selections, pill buttons. */
:root {
  --or: #f48120; --or-soft: #fff7ed; --or-line: #fdba74;
  --navy: #1e3a8a; --ink: #212121; --muted: #4b5563; --faint: #6b7280;
  --line: #e5e7eb; --line2: #d1d5db; --bg: #f9fafb; --ok: #15803d;
  --head: Urbanist, "Segoe UI", system-ui, sans-serif;
  --body: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--navy); } a:hover { color: var(--or); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

.hdr { position: sticky; top: 0; z-index: 20; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 28px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); }
.hdrl { display: flex; align-items: center; gap: 18px; min-width: 0; }
.logo { height: 34px; width: auto; display: block; }
.hdiv { width: 1px; height: 28px; background: var(--line); }
.htitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.htitle b { font: 600 16px var(--head); }
.htitle span { font: 400 12.5px var(--body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdrr { display: flex; align-items: center; gap: 12px; }
.saved { display: flex; align-items: center; gap: 7px; font: 500 13px var(--body); color: var(--ok); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.saved.busy { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.saved.err { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 27px; padding: 11px 22px; font: 600 14px var(--body); border: 1px solid transparent; background: none; white-space: nowrap; text-decoration: none; }
.pill.or { background: var(--or); border-color: var(--or); color: #fff; }
.pill.or:hover { background: #e06f10; color: #fff; }
.pill.out { border-color: var(--ink); color: var(--ink); background: #fff; }
.pill.out:hover { background: var(--ink); color: #fff; }
.pill.ghost { color: var(--muted); padding: 10px; }
.pill.ghost:hover { color: var(--or); }
.pill.sm { padding: 8px 16px; font-size: 13px; }
.pill:disabled { opacity: .5; cursor: default; }

/* ---------- welcome (design 1d) ---------- */
.wb { max-width: 1280px; margin: 0 auto; padding: 48px 96px 64px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.wbl { display: flex; flex-direction: column; gap: 20px; }
.eyebrow { font: 600 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--or); }
.hello { font: 600 44px/1.1 var(--head); margin: 0; }
.sub { font: 400 16px/1.6 var(--body); color: var(--muted); margin: 0; max-width: 56ch; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font: 700 26px var(--head); }
.stat span { font: 400 12.5px var(--body); color: var(--faint); }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.box.dashed { border-style: dashed; border-color: #cbd5e1; }
.box b { font: 600 14px var(--body); }
.box p, .box li { font: 400 13.5px/1.55 var(--body); color: var(--muted); margin: 0; }
.box ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; font: 500 13px var(--body); }
.input { border: 1px solid var(--line2); border-radius: 10px; padding: 11px 13px; font: 400 15px var(--body); color: var(--ink); width: 100%; }
.input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px #dbeafe; }
.linkrow { display: flex; gap: 8px; align-items: center; }
.link { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: 500 12.5px ui-monospace, Menlo, monospace; color: #374151; background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbr { display: flex; flex-direction: column; gap: 22px; }
.ring { width: 220px; height: 220px; border-radius: 50%; display: grid; place-items: center; justify-self: center; align-self: center; }
.ring > div { width: 172px; height: 172px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring b { font: 700 44px var(--head); }
.ring span { font: 500 13px var(--body); color: var(--faint); }
.grid16 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 500 13px var(--body); background: #fff; text-align: left; }
.g:hover { border-color: var(--navy); }
.g span { font: 500 12px var(--body); color: var(--faint); flex: none; }
.g.done span { color: var(--ok); }
.banner { border-radius: 12px; padding: 12px 16px; font: 500 14px/1.5 var(--body); background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }

/* ---------- workspace (design 1a) ---------- */
.ws { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.side { background: var(--bg); border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 68px; align-self: start; max-height: calc(100vh - 68px); overflow-y: auto; }
.prog { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.progtop { display: flex; justify-content: space-between; align-items: baseline; }
.progtop b { font: 700 24px var(--head); }
.progtop span { font: 500 12.5px var(--body); color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: #eef0f3; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--or); border-radius: 99px; transition: width .3s; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 13px var(--body); background: none; border: 0; padding: 0; text-align: left; }
.sw { width: 36px; height: 20px; border-radius: 99px; background: var(--line2); position: relative; flex: none; transition: background .2s; }
.sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .2s; }
.toggle[aria-pressed="true"] .sw { background: var(--navy); }
.toggle[aria-pressed="true"] .sw i { left: 18px; }
.sechd { font: 600 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.seclist { display: flex; flex-direction: column; gap: 2px; }
.sec { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; text-align: left; font: 500 13.5px var(--body); color: #374151; }
.sec:hover { background: #fff; }
.sec[aria-current="true"] { background: #fff; border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); color: var(--ink); }
.lt { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12.5px var(--head); background: var(--line); color: #374151; }
.sec.done .lt { background: #dcfce7; color: var(--ok); }
.sec[aria-current="true"] .lt { background: var(--or); color: #fff; }
.cnt { font: 500 12px var(--body); color: var(--faint); }
.sec.done .cnt { color: var(--ok); }

.main { padding: 34px 48px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 860px; width: 100%; }
.h2 { font: 600 32px/1.15 var(--head); margin: 0; }
.why { background: var(--or-soft); border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 16px; font: 400 14px/1.55 var(--body); color: #7c2d12; margin: 0; }
.why b { font-weight: 600; }
.q { border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; background: #fff; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.q.pri { border-color: var(--or-line); box-shadow: 0 0 0 3px var(--or-soft); }
.q.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 5px #fed7aa; } }
.qhd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qn { font: 700 13px var(--head); color: var(--faint); }
.badge { font: 600 11.5px var(--body); color: #c2410c; background: #ffedd5; border-radius: 999px; padding: 3px 10px; }
.qt { font: 500 16.5px/1.5 var(--body); margin: 0; text-wrap: pretty; }
.glabel { font: 600 12px var(--body); color: var(--faint); letter-spacing: .02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line2); border-radius: 999px; padding: 8px 14px; font: 500 13.5px var(--body); color: #374151; background: #fff; min-height: 38px; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.ns { border-style: dashed; color: var(--faint); }
.chip.ns[aria-pressed="true"] { background: #fff7ed; color: #c2410c; border-color: var(--or-line); border-style: solid; }
textarea.ta { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; min-height: 64px; font: 400 14.5px/1.55 var(--body); color: var(--ink); resize: vertical; width: 100%; }
textarea.ta:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px #dbeafe; }
.meta { display: flex; align-items: center; gap: 8px; font: 400 12.5px var(--body); color: var(--faint); min-height: 18px; }
.meta .dot { color: #16a34a; }
.navrow { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; flex-wrap: wrap; }
.empty { font: 400 14px/1.6 var(--body); color: var(--muted); border: 1px dashed var(--line2); border-radius: 12px; padding: 16px; }

/* document checklist */
.docs { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.doc { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 10px 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc .dn { font: 500 14px/1.45 var(--body); }
.doc .note { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 12px; font: 500 12.5px var(--body); color: #374151; border-left: 1px solid var(--line2); white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seglabel { font: 500 11px var(--body); color: var(--faint); display: block; margin-bottom: 4px; }
.docs input.input { padding: 8px 12px; font-size: 13.5px; }

/* mobile (design 1c) */
.msec { display: none; }
.mfoot { display: none; }
@media (max-width: 900px) {
  .hdr { padding: 8px 16px; min-height: 56px; }
  .logo { height: 28px; }
  .hdiv, .htitle, .hide-sm { display: none; }
  .ws { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 14px 16px 90px; gap: 12px; }
  .h2 { font-size: 24px; }
  .q { padding: 16px; border-radius: 14px; }
  .qt { font-size: 15px; }
  .msec { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 56px; z-index: 10; background: #fff; padding: 10px 16px 12px; border-bottom: 1px solid var(--line); }
  .msec .row { display: flex; justify-content: space-between; font: 500 12.5px var(--body); color: var(--muted); }
  .msec .row b { color: var(--ink); font-weight: 600; }
  .msec select { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: 600 14px var(--head); background: #fff; color: var(--ink); width: 100%; }
  .mfoot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px; z-index: 15; }
  .navrow { display: none; }
  .wb { grid-template-columns: minmax(0, 1fr); padding: 28px 16px 40px; gap: 28px; }
  .hello { font-size: 32px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; } .stat b { font-size: 22px; }
  .ring { width: 170px; height: 170px; } .ring > div { width: 132px; height: 132px; } .ring b { font-size: 34px; }
  .grid16 { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
}

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font: 500 14px var(--body); z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.error { max-width: 560px; margin: 80px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.error h1 { font: 600 32px var(--head); margin: 0; }
.error p { font: 400 15px/1.6 var(--body); color: var(--muted); margin: 0; }

/* print / Download PDF */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  .hdr, #view, .toast { display: none !important; }
  .print-only { display: block; font: 400 10.5pt/1.45 var(--body); color: #000; }
  .print-only h1 { font: 600 20pt var(--head); margin: 0 0 4pt; }
  .print-only h2 { font: 600 13pt var(--head); margin: 16pt 0 6pt; break-after: avoid; }
  .print-only .pq { break-inside: avoid; border-top: 1px solid #ddd; padding: 6pt 0; }
  .print-only .pa { color: #1e3a8a; margin-top: 3pt; white-space: pre-wrap; }
  .print-only .pa.none { color: #999; font-style: italic; }
}
