/* Panduan Stok Perbaikan — mengikuti warna aplikasi utama */
:root {
  --bg: #E9EDF1; --surface: #fff; --surface-2: #F3F5F8;
  --ink: #16202A; --ink-2: #3F4C5A; --muted: #687584;
  --line: #D3D9E0; --line-2: #E3E8ED;
  --mark: #E5484D; --accent: #16202A;
  --ok-bg: #EAF4EC; --ok: #2E7D4A; --warn-bg: #FFF4E0; --warn: #9A5B00;
  --r: 12px; --r-l: 18px;
  --shadow: 0 1px 2px rgba(22,32,42,.06), 0 0 0 1px rgba(22,32,42,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F151B; --surface: #17202A; --surface-2: #1E2833;
    --ink: #E6EBF0; --ink-2: #C1CAD3; --muted: #8E9AA7; --line: #2B3745; --line-2: #233040;
    --ok-bg: #16301F; --ok: #7BC793; --warn-bg: #33270F; --warn: #F0B860;
    --shadow: 0 0 0 1px rgba(255,255,255,.06);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid #2459C4; outline-offset: 2px; border-radius: 6px; }

/* ---- header & nav ---- */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line-2); }
.top-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; white-space: nowrap; }
.brand img { border-radius: 7px; }
.brand b { font-weight: 700; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { text-decoration: none; padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.topnav a.on { background: var(--surface-2); color: var(--ink); }
.icon-btn { margin-left: 4px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar-h); text-decoration: none; font-size: 11px; font-weight: 600; color: var(--muted); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { stroke-width: 2.4; }
@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .tabbar { display: none; }
  .topnav { display: flex; }
}

/* ---- layout ---- */
main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 32px; outline: none; }
main:focus, main:focus-visible { outline: none; }
.narrow { max-width: 760px; margin: 0 auto; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 10px; min-height: 32px; }
.crumb:hover { color: var(--ink); }
.page-h { margin: 2px 0 6px; font-size: 26px; font-weight: 750; }
.lead { color: var(--ink-2); font-size: 16px; max-width: 62ch; }
.sec-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 28px 0 10px; }
.card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 16px; }
.muted { color: var(--muted); }

/* ---- home ---- */
.hero { padding: 6px 0 4px; }
.hero h1 { font-size: 28px; font-weight: 800; }
.hero p { margin-top: 6px; color: var(--ink-2); }
.search { position: relative; margin-top: 16px; }
.search input { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; padding: 0 16px 0 46px; }
.search svg { position: absolute; left: 15px; top: 14px; color: var(--muted); }
.roles { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .roles { grid-template-columns: repeat(4, 1fr); } }
.role { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 14px 16px 14px 18px; position: relative; overflow: hidden; min-height: 92px; }
.role::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.role b { font-size: 17px; }
.role span { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.role .mine { position: absolute; right: 12px; top: 12px; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 2px 8px; border-radius: 99px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick a { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); padding: 14px; text-decoration: none; }
.quick b { display: block; font-size: 15px; }
.quick span { font-size: 13px; color: var(--muted); }

/* ---- topic list ---- */
.tlist { display: grid; gap: 8px; }
@media (min-width: 900px) { .tlist.cols { grid-template-columns: 1fr 1fr; } }
.titem { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; text-decoration: none; }
.titem .num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--ink-2); }
.titem b { display: block; font-size: 15.5px; }
.titem small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
.titem .chev { margin-left: auto; color: var(--muted); align-self: center; }
.group-h { font-size: 16px; font-weight: 700; margin: 22px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.group-h small { font-weight: 500; color: var(--muted); font-size: 13px; }

/* ---- role page ---- */
.role-hero { border-radius: var(--r-l); padding: 18px; color: #fff; background: var(--c); }
.role-hero h1 { font-size: 24px; font-weight: 800; }
.role-hero p { margin-top: 6px; opacity: .95; }
.role-hero .bag { display: inline-block; margin-top: 10px; font-size: 13px; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 99px; }
.role-hero .set { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--c); border: 0; font: 700 14px var(--font); padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.role-hero .set.on { background: rgba(255,255,255,.18); color: #fff; }
.two { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; } }
.two h3 { font-size: 15px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.two ul { margin: 0; padding-left: 20px; }
.two li { margin: 3px 0; font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); text-decoration: none; }
.chip.role-chip { background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); border-color: transparent; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.role-chip { color: color-mix(in srgb, var(--c) 50%, #fff); } }

/* ---- topic page ---- */
.t-head { margin-bottom: 4px; }
.t-head .chips { margin-top: 10px; }
.fig { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 14px; margin-top: 14px; }
.fig-title { font-size: 16px; font-weight: 700; margin: 2px 2px 12px; }
.fig-grid { display: grid; gap: 14px; }
.shot { margin: 0; }
.shot button { all: unset; display: block; cursor: zoom-in; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); margin: 0 auto; box-sizing: border-box; }
.fig.hp .shot button { max-width: 230px; }
.fig.pc .shot button, .fig.wide .shot button { max-width: 100%; }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.st p { font-size: 15.5px; line-height: 1.5; padding-top: 2px; }
.crop { all: unset; display: block; cursor: zoom-in; margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); max-width: 100%; width: fit-content; box-sizing: border-box; }
.crop img { display: block; max-width: 100%; height: auto; }
.badge { width: 26px; height: 26px; border-radius: 50%; background: var(--mark); color: #fff; font-weight: 700; font-size: 13.5px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface), 0 1px 3px rgba(0,0,0,.25); margin-top: 1px; }
.steps.plain .badge { background: var(--ink); }
@media (min-width: 760px) {
  .fig { padding: 20px; }
  .fig-grid { align-items: start; gap: 26px; }
  .fig.hp .fig-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .fig.hp .shot button { max-width: 280px; }
  .fig.pc .fig-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .fig.wide .fig-grid { grid-template-columns: 1fr; }
  .shot { position: sticky; top: 76px; }
  .fig.wide .shot { position: static; }
}
/* tombol tampilan HP / Laptop */
.vt { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; margin-left: auto; }
.vt-l { display: none; font-size: 12px; color: var(--muted); padding: 0 6px 0 4px; }
.vt button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font: 600 13px var(--font); color: var(--ink-2); padding: 6px 9px; border-radius: 8px; }
.vt button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.vt button:focus-visible { outline: 3px solid #2459C4; }
@media (min-width: 480px) { .vt-l { display: inline; } }
@media (min-width: 900px) { .vt { margin-left: 8px; } }
.btn { all: unset; cursor: pointer; display: inline-block; background: var(--ink); color: var(--surface); font: 600 14px var(--font); padding: 10px 14px; border-radius: 10px; margin-top: 10px; }
.btn[disabled] { opacity: .5; cursor: default; }
.offline p { font-size: 14.5px; }
.block { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 16px 18px; margin-top: 14px; }
.block h2 { font-size: 17px; margin-bottom: 10px; }
.bul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.bul li { font-size: 15.5px; }
.note { display: flex; gap: 10px; border-radius: var(--r); padding: 12px 14px; margin-top: 12px; font-size: 15px; }
.note.penting { background: var(--warn-bg); color: var(--ink); }
.note.penting::before { content: "!"; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; margin-top: 1px; }
.note.tip { background: var(--ok-bg); }
.note.tip::before { content: "i"; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; margin-top: 1px; font-style: italic; }
.rel { display: flex; flex-wrap: wrap; gap: 8px; }
.rel a { background: var(--surface); box-shadow: var(--shadow); padding: 9px 12px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 600; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.pager a { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r); padding: 12px 14px; text-decoration: none; font-size: 14px; }
.pager a small { display: block; color: var(--muted); font-size: 12px; }
.pager a.next { text-align: right; grid-column: 2; }

/* ---- tables ---- */
.tbl-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); margin-top: 14px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.acc th:first-child, .acc td:first-child { position: sticky; left: 0; background: var(--surface); min-width: 190px; max-width: 240px; z-index: 1; box-shadow: 1px 0 0 var(--line-2); }
.acc thead th:first-child { background: var(--surface-2); z-index: 2; }
.acc td.c, .acc th.c { text-align: center; min-width: 74px; }
.acc th.c span { display: block; width: 10px; height: 10px; border-radius: 50%; margin: 0 auto 4px; background: var(--c); }
.yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-weight: 800; }
.own { display: inline-block; font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.no { color: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--ink-2); margin-top: 10px; align-items: center; }

/* ---- flow ---- */
.flow { display: grid; gap: 0; margin-top: 12px; }
.fstep { display: grid; grid-template-columns: 40px 1fr; gap: 12px; text-decoration: none; position: relative; padding-bottom: 14px; }
.fstep .n { width: 40px; height: 40px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; z-index: 1; }
.fstep:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.fstep .body { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 14px; }
.fstep .who { font-size: 12px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .04em; }
.fstep b { display: block; font-size: 16px; }
.fstep small { color: var(--ink-2); font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fstep .who { color: color-mix(in srgb, var(--c) 45%, #fff); } }
@media (min-width: 900px) { .flows { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---- faq ---- */
.faq details { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-top: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 650; font-size: 15.5px; list-style: none; display: flex; gap: 10px; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 16px 14px; color: var(--ink-2); font-size: 15px; }
.faq .a a { font-weight: 600; }
.terms { display: grid; gap: 0; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; }
.terms div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.terms div:last-child { border-bottom: 0; }
.terms b { font-weight: 650; }
.seg { display: inline-flex; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; gap: 4px; margin: 14px 0 4px; }
.seg a { text-decoration: none; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg a.on { background: var(--ink); color: var(--surface); }

/* ---- search ---- */
.hit mark { background: #FFE8A3; color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---- lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,14,18,.92); display: grid; place-items: center; padding: 16px; overflow: auto; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: calc(100vh - 32px); width: auto; max-width: 100%; border-radius: 12px; }
.lb-close { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

.offline-tag { display: inline-block; font-size: 12px; color: var(--muted); margin-top: 18px; }
@media print { .top, .tabbar { display: none; } body { background: #fff; } .fig, .block, .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; } }

@media (max-width: 420px) { .brand span { font-size: 14px; } .brand span .full { display: none; } }

/* Pita "Versi baru tersedia" */
#update-bar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(22,32,42,.18); }
#update-bar span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; font-size: 14px; }
#update-bar small { color: var(--muted); font-size: 12.5px; }
#update-bar .btn { margin: 0; flex: none; }
@media (min-width: 900px) { #update-bar { left: auto; right: 24px; bottom: 24px; width: 340px; } }
@media print { #update-bar { display: none !important; } }
