/* Rekap Kepatuhan Dapur — mengikuti standar UI Shaka (token & komponen shaka-holding).
   Mode terang/gelap: data-theme di <html>; tanpa pilihan, ikut perangkat. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --brand: #17694A; --brand-ink: #10543A; --brand-soft: #74C99F;
  --surface: #FCFDFB; --surface-2: #F1F3EF; --surface-3: #E6EAE3;
  --border: #DFE3DA; --ink: #171C19; --muted: #67706A;
  --success: #1E8E4F; --warning: #A8701A; --danger: #B93A2E;
  --on-brand: #FFFFFF;
  --hd: #1D2521; --hd-ink: #F1F3EF;
  --shadow-card: 0 1px 2px rgb(23 28 25 / 0.04), 0 10px 28px -14px rgb(23 28 25 / 0.16);
  --shadow-pop: 0 2px 4px rgb(23 28 25 / 0.06), 0 20px 40px -16px rgb(23 28 25 / 0.28);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #55BE8D; --brand-ink: #74D2A4; --brand-soft: #74D2A4;
    --surface: #1E2320; --surface-2: #141815; --surface-3: #272D29;
    --border: #333A35; --ink: #EEF2EE; --muted: #9AA39C;
    --success: #5FC98A; --warning: #E0A94A; --danger: #E8806F; --on-brand: #0F1411;
    --hd: #0F1411; --hd-ink: #EEF2EE;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -14px rgb(0 0 0 / 0.5);
    --shadow-pop: 0 2px 4px rgb(0 0 0 / 0.4), 0 20px 40px -16px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #55BE8D; --brand-ink: #74D2A4; --brand-soft: #74D2A4;
  --surface: #1E2320; --surface-2: #141815; --surface-3: #272D29;
  --border: #333A35; --ink: #EEF2EE; --muted: #9AA39C;
  --success: #5FC98A; --warning: #E0A94A; --danger: #E8806F; --on-brand: #0F1411;
  --hd: #0F1411; --hd-ink: #EEF2EE;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -14px rgb(0 0 0 / 0.5);
  --shadow-pop: 0 2px 4px rgb(0 0 0 / 0.4), 0 20px 40px -16px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background-color: var(--surface-2);
  background-image: radial-gradient(70rem 30rem at 50% -10rem, color-mix(in oklab, var(--brand) 12%, transparent), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in oklab, var(--brand) 30%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
[hidden] { display: none !important; }

/* ---------- Header (arang bergradasi, seperti Shaka) ---------- */
.hd {
  position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top);
  color: var(--hd-ink); background-color: var(--hd);
  background-image: linear-gradient(90deg, var(--hd) 0%, color-mix(in oklab, var(--hd) 82%, var(--brand)) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06), 0 8px 24px -16px rgb(0 0 0 / 0.5);
}
.hd-in { max-width: 1280px; height: 64px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 12px; color: var(--hd-ink); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.brand:hover { color: var(--hd-ink); }
.zmark { width: 28px; height: 28px; border-radius: 8px; flex: none; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.brand-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; align-items: center; gap: 4px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: color-mix(in oklab, var(--hd-ink) 75%, transparent); text-decoration: none; font-size: 14px; transition: color .1s, background-color .1s;
}
.nav-link:hover { color: var(--hd-ink); background: rgb(255 255 255 / 0.08); }
.nav-link[aria-current="page"] { color: var(--hd-ink); font-weight: 600; }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 999px; background: var(--brand); }
.hd-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.btn-icon-hd {
  position: relative; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: color-mix(in oklab, var(--hd-ink) 75%, transparent); text-decoration: none;
  transition: color .15s, background-color .15s;
}
.btn-icon-hd:hover { color: var(--hd-ink); background: rgb(255 255 255 / 0.1); }
.btn-icon-hd svg { width: 20px; height: 20px; }
.badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 10px; font-weight: 600; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--hd); }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: rgb(255 255 255 / 0.15); color: var(--hd-ink); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: inline; }
:root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .ico-sun { display: inline; }
  :root:not([data-theme]) .ico-moon { display: none; }
}

/* dropdown & drawer memakai <details> (tetap jalan tanpa JavaScript) */
.dd { position: relative; }
.dd > summary { list-style: none; }
.dd > summary::-webkit-details-marker { display: none; }
.pop { background: var(--surface); color: var(--ink); border: 1px solid color-mix(in oklab, var(--border) 80%, transparent); border-radius: 16px; box-shadow: var(--shadow-pop); }
.dd-panel { position: absolute; right: 0; top: 52px; width: 248px; padding: 8px; z-index: 50; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 0;
  background: transparent; color: var(--ink); text-decoration: none; font-size: 14px; text-align: left; cursor: pointer;
}
.menu-item:hover { background: color-mix(in oklab, var(--surface-3) 70%, transparent); color: var(--ink); }
.menu-item svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-item[aria-current="page"] { font-weight: 600; color: var(--brand-ink); }
.menu-item[aria-current="page"] svg { color: var(--brand-ink); }
.menu-who { padding: 8px 12px 10px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.pop form { margin: 0; }
.drawer-panel { position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top)); max-height: calc(100dvh - 64px); overflow: auto; z-index: 50; border-radius: 0 0 16px 16px; padding: 12px; }
.drawer-shade { position: fixed; left: 0; right: 0; bottom: 0; top: calc(64px + env(safe-area-inset-top)); background: rgb(0 0 0 / 0.4); z-index: 45; }
.acct { display: none; }

/* ---------- Halaman ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.page.narrow { max-width: 720px; }
.eyebrow { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
h1, .h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
h2, .h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crumb { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }

.card {
  background-color: var(--surface);
  background-image: linear-gradient(160deg, var(--surface) 0%, color-mix(in oklab, var(--surface) 94%, var(--brand)) 100%);
  border: 1px solid color-mix(in oklab, var(--border) 80%, transparent); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden;
}
.card-pad { padding: 16px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.flash { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.flash.ok { background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); border-color: color-mix(in oklab, var(--success) 25%, transparent); }
.flash.err { background: color-mix(in oklab, var(--danger) 12%, transparent); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 25%, transparent); }
.flash.warn { background: color-mix(in oklab, var(--warning) 12%, transparent); color: var(--warning); border-color: color-mix(in oklab, var(--warning) 25%, transparent); }
.flash.info { background: var(--surface-3); color: var(--ink); }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: color-mix(in oklab, var(--muted) 60%, transparent); background: color-mix(in oklab, var(--surface-3) 60%, var(--surface)); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  border-color: transparent; color: var(--on-brand); background-color: var(--brand);
  background-image: linear-gradient(180deg, color-mix(in oklab, var(--brand) 88%, white) 0%, var(--brand) 55%, var(--brand-ink) 100%);
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.14), 0 6px 16px -8px color-mix(in oklab, var(--brand) 60%, transparent);
}
.btn-primary:hover { filter: brightness(1.06); color: var(--on-brand); border-color: transparent; background-color: var(--brand); }
.btn-danger { border-color: color-mix(in oklab, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover { color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-icon { width: 44px; padding: 0; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; flex: none; }
.status.ok { color: var(--success); }
.status.bad { color: var(--danger); }
.status.warn { color: var(--warning); }
.status.pending { color: var(--muted); }
.status.pending::before { background: transparent; border: 1.5px dashed currentColor; }
.status.off { color: var(--muted); }
.status.off::before { height: 2px; border-radius: 1px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; color: var(--ink); white-space: nowrap; }
.tag.warn { border-color: color-mix(in oklab, var(--warning) 45%, transparent); color: var(--warning); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Ringkasan angka: satu kartu gelap, bukan empat kotak */
.kpi {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-card);
  color: #EEF2EE; background-color: #0F1411;
  background-image: linear-gradient(135deg, #0F1411 0%, color-mix(in oklab, #0F1411 78%, var(--brand)) 100%);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px;
}
.kpi::after { content: ""; position: absolute; right: -3rem; top: -4rem; width: 14rem; height: 14rem; border-radius: 999px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in oklab, var(--brand) 45%, transparent), transparent); filter: blur(12px); }
.kpi-item { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(238 242 238 / 0.62); }
.kpi-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 600; line-height: 1.2; color: #74D2A4; }
.kpi-num small { font-size: 16px; color: rgb(238 242 238 / 0.62); }
.kpi-num.bad { color: #F2A196; }
.kpi-num.warn { color: #E0A94A; }
.kpi-sub { font-size: 12px; color: rgb(238 242 238 / 0.62); }

/* Daftar bergaris (pengganti kotak-kotak) */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
a.li:hover { background: color-mix(in oklab, var(--surface-3) 45%, transparent); color: inherit; }
.li-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-title { font-weight: 600; }
.li-meta { font-size: 13px; color: var(--muted); }
.li-end { flex: none; display: flex; align-items: center; gap: 10px; }
.chev { width: 16px; height: 16px; color: var(--muted); flex: none; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv > :first-child { color: var(--muted); }
.kv > :last-child { text-align: right; font-weight: 500; }

/* Tabel (iPad/laptop); di HP diganti daftar */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 16px; font-size: 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl th.num { font-family: var(--font); }
.tbl td a { color: inherit; text-decoration: none; }
.tbl td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tbl a.cell { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.tbl a.cell:hover .status { text-decoration: underline; text-underline-offset: 3px; }
.tbl tr.weekend td { color: var(--muted); }
.only-wide { display: none !important; }

/* Gambar */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--surface-3); aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Formulir */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 500; color: var(--ink); }
.hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  display: block; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 15%, transparent); }
textarea.input { padding: 10px 12px; min-height: 88px; line-height: 1.5; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input.mono { font-family: var(--mono); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; text-align: center;
  transition: border-color .15s, background-color .15s;
}
.opt span:hover { border-color: color-mix(in oklab, var(--muted) 60%, transparent); }
.opt input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.opt.bad input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt svg { width: 16px; height: 16px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg .opt span { width: 100%; min-height: 48px; border-radius: 12px; font-size: 15px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.form-section { display: flex; flex-direction: column; gap: 22px; padding: 16px; }

/* Unggah */
.upgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.upgrid:empty { display: none; }
.up { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.up-img { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.up-img img { width: 100%; height: 100%; object-fit: cover; }
.up-img .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.35); overflow: hidden; }
.up-img .bar > div { height: 100%; background: #fff; width: 0; transition: width .2s; }
.up-img .state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; color: #fff; font-size: 12px; font-weight: 600; background: rgb(15 20 17 / 0.45); }
.up.failed .state { background: color-mix(in oklab, var(--danger) 80%, transparent); }
.up-img .rm { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 999px; border: 0; background: rgb(15 20 17 / 0.7); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.up-img .rm svg { width: 14px; height: 14px; }
.up-img .dup { position: absolute; left: 4px; bottom: 4px; right: 4px; padding: 3px 6px; border-radius: 6px; background: var(--warning); color: #fff; font-size: 10px; font-weight: 600; }
.up-cap.input { min-height: 36px; padding: 0 10px; font-size: 16px; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shot figcaption { font-size: 13px; color: var(--muted); line-height: 1.35; }
.lb-cap { position: absolute; left: 16px; right: 16px; bottom: calc(44px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 0.8); }

.submitbar { position: sticky; bottom: 0; z-index: 10; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); margin: 0 -16px -48px; background: color-mix(in oklab, var(--surface-2) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #050908; color: #fff; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.9); }
.lb-in { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb-in img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgb(255 255 255 / 0.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 13px; opacity: .85; }

/* Masuk */
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 380px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.login .brand { color: var(--ink); margin: 0 0 4px; }

/* ---------- iPad & laptop ---------- */
@media (min-width: 640px) {
  .kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .upgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  body { font-size: 15px; }
  .page { padding: 24px 24px 56px; gap: 24px; }
  .only-narrow { display: none !important; }
  .only-wide { display: block !important; }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .upgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .submitbar { margin: 0 -24px -56px; padding-left: 24px; padding-right: 24px; }
  .form-section { padding: 20px 24px; }
}
@media (min-width: 1024px) {
  .nav { display: flex; }
  .drawer { display: none; }
  .acct { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
