/* Adridge FnB — LA RASA Kitchen. Olive · cream · gold. Mod siang (lalai) dan gelap. */
:root, [data-theme="day"] {
  --bg: #faf6ec; --surface: #fffdf7; --surface-2: #f3eddc; --ink: #2b2f22; --mute: #6c705f; --line: #e2dac4;
  --olive: #4a5a24; --olive-ink: #ffffff; --olive-soft: #e7ecd6; --gold: #a97c1f; --gold-soft: #f6ead0;
  --ok: #2f6b3a; --ok-bg: #e2f0e0; --warn: #8a5a00; --warn-bg: #fbeccb; --bad: #a12b2b; --bad-bg: #f8dedb; --info: #2b5c7a; --info-bg: #dcebf3;
  --shadow: 0 1px 2px rgba(60, 50, 20, .06), 0 6px 20px rgba(60, 50, 20, .06); --focus: #1f6feb;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #14180f; --surface: #1c2215; --surface-2: #252c1b; --ink: #efe9d6; --mute: #a8ab96; --line: #343c27;
  --olive: #a9bf6a; --olive-ink: #14180f; --olive-soft: #2b3520; --gold: #e0b55a; --gold-soft: #3a3019;
  --ok: #8fd19a; --ok-bg: #1e3524; --warn: #f0c36a; --warn-bg: #3d3013; --bad: #f09a92; --bad-bg: #44201d; --info: #9cc9e6; --info-bg: #1b3342;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3); --focus: #8ab4ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, .brand b, .kpi-value, .price-lg { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; letter-spacing: .01em; }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.2; } h2 { font-size: 1.2rem; margin: 0 0 .6rem; } h3 { font-size: 1.02rem; margin: .9rem 0 .4rem; }
a { color: var(--olive); text-underline-offset: 2px; } img { max-width: 100%; }
small, .hint { color: var(--mute); font-size: .84rem; } .sub { color: var(--mute); margin: .2rem 0 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--olive); color: var(--olive-ink); padding: .5rem 1rem; z-index: 100; } .skip:focus { left: 8px; top: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--gold); font-weight: 700; margin: 0 0 .2rem; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; } .pre { white-space: pre-wrap; margin: .3rem 0 0; }
.right { text-align: right; } .center-text { text-align: center; } .grow { flex: 1; } .alert-text { color: var(--bad); font-weight: 600; }

/* Bar atas */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; padding: .5rem .9rem; padding-top: calc(.5rem + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); min-width: 0; overflow: hidden; flex: 0 1 auto; }
.brand img { border-radius: 50%; flex: none; } .brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .brand b { font-size: 1.05rem; white-space: nowrap; } .brand small { color: var(--gold); font-style: italic; }
.burger { display: none; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.prefs { display: flex; align-items: center; gap: .5rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--mute); font: inherit; font-weight: 700; font-size: .8rem; padding: .32rem .7rem; cursor: pointer; min-height: 34px; }
.seg button.on { background: var(--olive); color: var(--olive-ink); }
.theme-btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: var(--mute); font: inherit; font-size: .8rem; cursor: pointer; padding: .2rem; min-height: 34px; }
.theme-track { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.theme-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.theme-btn[aria-checked="true"] .theme-track { background: var(--olive); } .theme-btn[aria-checked="true"] .theme-knob { transform: translateX(18px); }
.userbox { display: flex; align-items: center; gap: .5rem; }
.user-chip { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ink); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); }
.dot { position: absolute; top: 0; right: -2px; background: var(--bad); color: #fff; font-size: .64rem; font-weight: 700; border-radius: 999px; padding: 0 .3rem; min-width: 16px; text-align: center; line-height: 16px; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: .4rem; }

/* Navigasi */
.sidenav { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding: .7rem .6rem; }
.sidenav a { display: block; padding: .55rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; }
.sidenav a:hover { background: var(--surface-2); } .sidenav a.on { background: var(--olive); color: var(--olive-ink); font-weight: 700; }
.nav-foot { margin-top: auto; padding-top: .8rem; } .nav-foot a { color: var(--mute); font-size: .78rem; }
.pill { background: var(--gold); color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .74rem; font-weight: 700; }
.scrim { display: none; }
.is-staff .sidenav { position: fixed; top: 57px; bottom: 0; left: 0; width: 232px; overflow-y: auto; z-index: 20; }
.is-staff .main, .is-staff .foot { margin-left: 232px; width: calc(100% - 232px); }
.is-public .sidenav { flex-direction: row; flex-wrap: wrap; justify-content: center; border-right: 0; border-bottom: 1px solid var(--line); padding: .35rem .6rem; }
.is-public .nav-foot { display: none; }

.main { flex: 1; padding: 1.2rem clamp(.8rem, 3vw, 2rem) 2rem; width: 100%; max-width: 1280px; }
.is-public .main { margin: 0 auto; max-width: 1080px; } .main.center { display: grid; place-items: center; text-align: center; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; padding: .8rem clamp(.8rem, 3vw, 2rem) calc(.8rem + env(safe-area-inset-bottom)); color: var(--mute); font-size: .78rem; border-top: 1px solid var(--line); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

/* Kad, grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.05rem 1.15rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.narrow { max-width: 440px; margin-inline: auto; } .card.pad0 { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 1rem; } .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; } .grid { margin-bottom: 1rem; } .card .grid { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: .8rem; } .row { display: flex; gap: .5rem; align-items: flex-end; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.row > input, .row > select { flex: 1; min-width: 0; } form.inline { display: inline; }
.empty { color: var(--mute); text-align: center; padding: 1.4rem .5rem; margin: 0; }

/* Borang */
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; } .field-label { font-size: .84rem; font-weight: 600; color: var(--mute); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; min-height: 44px; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--olive); } input[type="file"] { padding: .4rem; }
input:disabled { background: var(--surface-2); color: var(--mute); } textarea { resize: vertical; }
fieldset { border: 1px dashed var(--line); border-radius: 12px; padding: .7rem .9rem; margin: 0; } legend { font-size: .84rem; font-weight: 600; color: var(--mute); padding: 0 .4rem; }
.check { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; } .filters > * { flex: 1 1 150px; } .filters .btn { flex: 0 0 auto; }
.search { font-size: 1.05rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); } .btn-primary { background: var(--olive); border-color: var(--olive); color: var(--olive-ink); } .btn-primary:hover { filter: brightness(1.08); background: var(--olive); }
.btn-danger { color: var(--bad); border-color: var(--bad); } .btn-ghost { border-color: transparent; background: transparent; } .btn-sm { min-height: 34px; padding: .25rem .7rem; font-size: .86rem; border-radius: 9px; } .btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
details > summary { cursor: pointer; font-weight: 600; padding: .3rem 0; } details[open] > summary { margin-bottom: .6rem; }

/* Suis ON/OFF gaya iPhone */
.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; min-height: 44px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 52px; height: 32px; margin: 0; cursor: pointer; }
.slider { width: 52px; height: 32px; border-radius: 999px; background: #c9c5b6; position: relative; transition: background .2s; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
[data-theme="dark"] .slider { background: #4a4f3e; }
.slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + .slider { background: #34c759; } .switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--focus); outline-offset: 2px; } .switch input:disabled + .slider { opacity: .45; }
.switch-state { font-size: .72rem; font-weight: 800; letter-spacing: .06em; min-width: 2.2em; } .switch-state .on { color: var(--ok); display: none; } .switch-state .off { color: var(--mute); }
.switch input:checked ~ .switch-state .on { display: inline; } .switch input:checked ~ .switch-state .off { display: none; }
.nojs-btn { margin-left: .4rem; } .js .nojs-btn { display: none; }
.flag-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); } .flag-row:last-child { border-bottom: 0; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem 1rem; }

/* Lencana, notis, tab */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--olive-soft); color: var(--olive); } .badge-done { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); } .badge-gold { background: var(--gold-soft); color: var(--gold); } .badge-mute { background: var(--surface-2); color: var(--mute); }
.notice { background: var(--surface-2); border-left: 4px solid var(--olive); border-radius: 10px; padding: .7rem .9rem; margin: .6rem 0; font-size: .93rem; } .notice.warn { border-left-color: var(--gold); background: var(--warn-bg); color: var(--ink); } .notice ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash { border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; } .flash-ok { background: var(--ok-bg); color: var(--ok); } .flash-err { background: var(--bad-bg); color: var(--bad); }
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; border-bottom: 2px solid var(--line); scrollbar-width: thin; }
.tab { padding: .6rem .95rem; text-decoration: none; color: var(--mute); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; min-height: 44px; }
.tab.on { color: var(--olive); border-bottom-color: var(--gold); }

/* Jadual */
.table-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); padding: .5rem .6rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tr:last-child td { border-bottom: 0; }
.tbl.lines td { padding: .25rem; border: 0; } .tbl.lines input, .tbl.lines select { min-width: 84px; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: .35rem .9rem; margin: .4rem 0; } .kv dt { color: var(--mute); font-size: .86rem; } .kv dd { margin: 0; overflow-wrap: anywhere; } .kv.compact { font-size: .9rem; gap: .15rem .7rem; }
.total-line { display: flex; justify-content: space-between; padding: .3rem 0; } .total-line.grand { border-top: 2px solid var(--line); margin-top: .3rem; padding-top: .55rem; font-size: 1.15rem; color: var(--olive); }

/* KPI & carta */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--olive); border-radius: 14px; padding: .8rem .9rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.kpi.warn { border-left-color: var(--gold); } .kpi.bad { border-left-color: var(--bad); } .kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; } .kpi-label { font-size: .8rem; color: var(--mute); }
.chart, .diagram { margin: 0; } .chart svg, .diagram svg { width: 100%; height: auto; display: block; } figcaption { text-align: center; font-size: .82rem; color: var(--mute); margin-top: .3rem; }
.ch-grid { stroke: var(--line); stroke-width: 1; } .ch-axis { fill: var(--mute); font-size: 11px; } .ch-a { fill: var(--olive); } .ch-b { fill: var(--gold); }
.ch-legend, .legend { font-size: .82rem; color: var(--mute); margin: .3rem 0 0; } .lg { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin: 0 .3rem 0 .7rem; vertical-align: middle; } .lg-a { background: var(--olive); } .lg-b { background: var(--gold); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; } .hbars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto; gap: .6rem; align-items: center; font-size: .9rem; } .hb-v { font-weight: 700; white-space: nowrap; }
meter { width: 100%; height: 12px; }
.dg-box rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; } .dg-box.olive rect { fill: var(--olive-soft); stroke: var(--olive); } .dg-box.gold rect { fill: var(--gold-soft); stroke: var(--gold); } .dg-box.cream rect { fill: var(--surface); stroke: var(--gold); }
.dg-t { fill: var(--ink); font-size: 12.5px; font-weight: 700; } .dg-s { fill: var(--mute); font-size: 10.5px; } .dg-h { fill: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dg-a { stroke: var(--mute); stroke-width: 1.6; } .dg-ah { fill: var(--mute); }
.st-built { fill: #2f8f4e; background: #2f8f4e; } .st-ready { fill: #7ea33a; background: #7ea33a; } .st-setup { fill: #d9a22b; background: #d9a22b; } .st-pending { fill: #c4573f; background: #c4573f; } .st-future { fill: #9a9a8c; background: #9a9a8c; } .st-n { fill: #fff; font-size: 13px; font-weight: 700; }

/* Aliran (routing) */
.flow { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; padding: 0; margin: .6rem 0 1rem; }
.flow-node { position: relative; display: flex; flex-direction: column; gap: .1rem; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .8rem .5rem 2.3rem; min-width: 128px; max-width: 220px; }
.flow-node:not(:last-child)::after { content: "→"; position: absolute; right: -1.1rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-weight: 700; }
.flow-n { position: absolute; left: .55rem; top: .55rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--olive); color: var(--olive-ink); font-size: .74rem; font-weight: 700; display: grid; place-items: center; }
.flow-t { font-weight: 700; font-size: .9rem; line-height: 1.25; } .flow-who { font-size: .74rem; color: var(--gold); font-weight: 600; }
.flow-node.now { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-soft); }

/* Menu pelanggan */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--shadow); }
.hero img { border-radius: 50%; } .hero h2 { font-size: 1.55rem; } .hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.menu-sec h2 { border-bottom: 2px solid var(--gold); padding-bottom: .3rem; display: inline-block; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.menu-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.menu-card:hover { border-color: var(--gold); } .menu-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.menu-ph { aspect-ratio: 4 / 3; display: grid; place-items: center; background: linear-gradient(135deg, var(--olive-soft), var(--gold-soft)); color: var(--olive); font: 700 3rem Georgia, serif; } .menu-ph.big { min-height: 260px; }
.menu-body { padding: .8rem .95rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; } .menu-body h3 { margin: 0; font-size: 1.08rem; } .menu-body p { margin: 0; color: var(--mute); font-size: .9rem; flex: 1; }
.menu-meta { display: flex; flex-direction: column; gap: .1rem; } .price { font-weight: 800; color: var(--olive); font-size: 1.05rem; } .price small { font-weight: 500; } .price.quote { color: var(--gold); } .price-lg .price { font-size: 1.5rem; }
.item-img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 240px; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: .4rem; } .qr { width: 190px; height: 190px; border-radius: 10px; } .bank-qr { max-width: 190px; border-radius: 10px; margin-top: .4rem; }

/* Kalendar & docket */
.cal { display: grid; gap: .5rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem; min-height: 110px; display: flex; flex-direction: column; gap: .3rem; }
.cal-day.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); } .cal-day.closed { background: var(--surface-2); opacity: .8; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: .3rem; flex-wrap: wrap; font-size: .82rem; }
.cal-item { display: block; background: var(--olive-soft); border-radius: 8px; padding: .25rem .45rem; font-size: .78rem; text-decoration: none; color: var(--ink); border-left: 3px solid var(--olive); }
.cal-item.s-submitted { background: var(--info-bg); border-left-color: var(--info); } .cal-item.s-ready, .cal-item.s-out_for_delivery { background: var(--gold-soft); border-left-color: var(--gold); } .cal-item.s-delivered, .cal-item.s-collected { background: var(--ok-bg); border-left-color: var(--ok); }
.dockets { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.docket { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--info); border-radius: 14px; padding: .8rem .95rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .3rem; }
.docket header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; } .docket h3 { margin: 0; font-size: 1.15rem; } .docket footer { margin-top: auto; padding-top: .5rem; }
.docket-qty { font: 800 2.1rem/1 Georgia, serif; margin: .2rem 0 0; color: var(--olive); } .docket-qty small { font-size: 1rem; color: var(--mute); }
.docket.s-claimed, .docket.s-prep, .docket.s-preparing { border-top-color: var(--olive); } .docket.s-cooking { border-top-color: #d9822b; } .docket.s-ready, .docket.s-out_for_delivery { border-top-color: var(--gold); } .docket.s-hold { border-top-color: var(--bad); } .docket.late { box-shadow: 0 0 0 2px var(--bad-bg), var(--shadow); }
.offline-banner { position: sticky; top: 60px; z-index: 10; background: var(--bad); color: #fff; padding: .6rem 1rem; border-radius: 10px; margin-bottom: .8rem; font-weight: 700; }

/* Telefon & tablet */
@media (max-width: 980px) {
  .burger { display: flex; }
  .sidenav, .is-staff .sidenav, .is-public .sidenav { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .22s; z-index: 50; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; border-right: 1px solid var(--line); border-bottom: 0; padding-top: calc(1rem + env(safe-area-inset-top)); overflow-y: auto; }
  .is-public .nav-foot { display: block; }
  .nav-toggle:checked ~ .sidenav { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 40; }
  .is-staff .main, .is-staff .foot { margin-left: 0; width: 100%; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; } .cal-day { min-height: 0; } .cal-month .cal-day:not(.today):not(:has(.cal-item)) { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } .hero-actions { justify-content: center; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.35rem; } .brand span, .theme-txt, .user-chip { display: none; } .topbar { gap: .35rem; padding-inline: .6rem; } .brand b { font-size: .95rem; }
  .card { padding: .9rem; border-radius: 14px; } .row { flex-wrap: wrap; } .row > * { flex: 1 1 100%; } .row > .btn, .row > form { flex: 1 1 auto; }
  /* Jadual menjadi kad pada telefon */
  .tbl:not(.lines) thead { display: none; } .tbl:not(.lines) tr { display: block; padding: .55rem 0; border-bottom: 1px solid var(--line); } .tbl:not(.lines) tr:last-child { border-bottom: 0; }
  .tbl:not(.lines) td { display: grid; grid-template-columns: minmax(92px, 36%) 1fr; gap: .6rem; border: 0; padding: .2rem 0; } .tbl:not(.lines) td::before { content: attr(data-label); color: var(--mute); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .tbl:not(.lines) td > .badge, .tbl:not(.lines) td > form, .tbl:not(.lines) td > .btn { justify-self: start; } .tbl:not(.lines) td[data-label=""] { grid-template-columns: 1fr; } .tbl:not(.lines) td[data-label=""]::before { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-value { font-size: 1.25rem; } .flow-node { min-width: 0; flex: 1 1 42%; } .flow-node::after { display: none; }
  .menu-grid { grid-template-columns: 1fr; } .dockets { grid-template-columns: 1fr; } .page-actions { width: 100%; } .perm-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .topbar, .sidenav, .foot, .tabs, .no-print, .page-actions, .flash, .scrim { display: none !important; }
  .is-staff .main { margin: 0; max-width: none; padding: 0; } body { background: #fff; color: #000; } .card { box-shadow: none; break-inside: avoid; border-color: #bbb; } details > *:not(summary) { display: block; }
}
