:root {
    --bg: #f3ece3;
    --bg-2: #efe6db;
    --paper: #fffdf9;
    --ink: #1c1612;
    --muted: #6d635b;
    --line: #e6dcd0;
    --line-strong: #d4c7b8;
    --ember: #c2410c;
    --ember-2: #ea580c;
    --ember-soft: rgba(194, 65, 12, .12);
    --ember-glow: rgba(234, 88, 12, .28);
    --teal: #0f766e;
    --teal-soft: #ccfbf1;
    --gold: #b45309;
    --gold-soft: #fef3c7;
    --rose: #be123c;
    --rose-soft: #ffe4e6;
    --sky: #1d4ed8;
    --sky-soft: #dbeafe;
    --ok: #047857;
    --ok-soft: #d1fae5;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --bad: #be123c;
    --bad-soft: #ffe4e6;
    --info: #1d4ed8;
    --info-soft: #dbeafe;
    --sidebar: #14110f;
    --sidebar-2: #1c1815;
    --sidebar-text: #ebe4dc;
    --sidebar-muted: #a89f95;
    --radius: 18px;
    --radius-sm: 12px;
    --touch: 48px;
    --shadow: 0 14px 40px rgba(28, 22, 18, .08);
    --shadow-sm: 0 6px 18px rgba(28, 22, 18, .06);
    --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
    --display: "Outfit", var(--font);
    --sidebar-w: 276px;
    --topbar-h: 68px;
    --dock-h: 76px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-tap-highlight-color: transparent; }
body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(234, 88, 12, .08), transparent 50%),
        radial-gradient(900px 500px at 110% 0%, rgba(15, 118, 110, .07), transparent 46%),
        var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
}
a { color: var(--ember); }
button, a, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

body.has-shell { display: flex; min-height: 100dvh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    z-index: 40;
    padding: 18px 14px 16px;
    flex-shrink: 0;
    box-shadow: 12px 0 40px rgba(0,0,0,.18);
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px 18px;
}
.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--ember-2), var(--ember));
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: .4px;
    box-shadow: 0 8px 20px var(--ember-glow);
    overflow: hidden;
    flex-shrink: 0;
}
.brand-mark.has-logo {
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.brand-mark.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.brand-text strong {
    display: block;
    font-family: var(--display);
    font-size: 14px;
    letter-spacing: .4px;
}
.brand-text span {
    display: block;
    color: var(--sidebar-muted);
    font-size: 12px;
    margin-top: 2px;
}
.nav-scroll {
    overflow: auto;
    flex: 1;
    padding: 0 2px 8px;
    overscroll-behavior: contain;
    overflow-anchor: none;
}
.nav-label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--sidebar-muted);
    font-weight: 700;
    padding: 14px 12px 8px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--touch);
    padding: 0 12px;
    border-radius: 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 4px;
    transition: background .2s ease, transform .2s ease;
}
.nav-item .tile {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    color: #fff;
}
.nav-item.tone-ember .tile { background: var(--ember); }
.nav-item.tone-teal .tile { background: var(--teal); }
.nav-item.tone-gold .tile { background: var(--gold); }
.nav-item.tone-ok .tile { background: var(--ok); }
.nav-item.tone-sky .tile { background: var(--sky); }
.nav-item.tone-rose .tile { background: var(--rose); }
.nav-item.tone-leaf .tile { background: #4d7c0f; }
.nav-item.tone-violet .tile { background: #6d28d9; }
.nav-item.tone-indigo .tile { background: #4338ca; }
.nav-item.tone-slate .tile { background: #57534e; }
.nav-item.is-on,
.nav-item:hover {
    background: rgba(255,255,255,.08);
}
.nav-item.is-on {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 8px 4px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-muted);
    font-size: 13px;
    padding: 4px 4px 0;
}
.user-chip b { color: var(--sidebar-text); font-weight: 650; }
.logout-btn {
    width: 100%;
    min-height: var(--touch);
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.shell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,.4);
}
.icon-btn {
    width: var(--touch);
    height: var(--touch);
    border: 0;
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    display: none;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.topbar-title {
    flex: 1;
    min-width: 0;
}
.topbar-title h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -.03em;
}
.topbar-title p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.page {
    padding: 20px 22px 40px;
    max-width: 1180px;
    width: 100%;
    animation: rise .45s ease both;
}
body.has-shell .page { padding-bottom: 32px; }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-head .inline-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1 1 240px;
    justify-content: flex-end;
}
.page-head .inline-search input {
    min-width: 200px;
    margin: 0;
}
.page-head h1,
h1 {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: 30px;
    letter-spacing: -.03em;
    line-height: 1.15;
}
h2 {
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: 18px;
}
p { color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.error { color: var(--bad); }

.card {
    background: var(--paper);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    animation: rise .5s ease both;
}
.card + .card { animation-delay: .06s; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.stat {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    animation: rise .5s ease both;
}
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .1s; }
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
}
.stat-icon.ember { background: linear-gradient(145deg, #fb923c, var(--ember)); }
.stat-icon.gold { background: linear-gradient(145deg, #fbbf24, var(--gold)); }
.stat-icon.teal { background: linear-gradient(145deg, #2dd4bf, var(--teal)); }
.stat strong { display: block; font-family: var(--display); font-size: 28px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

.btn, button {
    min-height: var(--touch);
    padding: 0 18px;
    border-radius: 14px;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    touch-action: manipulation;
}
button:not(.ghost):not(.icon-btn):not(.logout-btn):not(.table-tile):not(.lang-btn),
.btn:not(.ghost) {
    background: linear-gradient(180deg, var(--ember-2), var(--ember));
    color: #fff;
    box-shadow: 0 8px 18px var(--ember-glow);
}
.btn.ghost, button.ghost, a.btn.ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}
button.ghost.danger, .btn.danger {
    color: var(--bad);
    border-color: #fecdd3;
}
.btn:active, button:active { transform: scale(.97); }
.btn.lg { min-height: 56px; padding: 0 22px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 14px 0 7px;
}
label.check {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    font-weight: 650;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]),
select, textarea {
    width: 100%;
    min-height: var(--touch);
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 16px;
    color: var(--ink);
}
input[type=file] {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid var(--ember-glow);
    outline-offset: 1px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid.one { grid-template-columns: 1fr; }
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.method-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.method-card-head .tile {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(194, 65, 12, .1);
    color: var(--ember);
}
.method-card-head h2 { margin: 0; }
.method-card-head .badge { margin-left: auto; }
.qris-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.qris-test { margin-top: 16px; text-align: center; }
.qris-live { display: grid; justify-items: center; gap: 8px; margin: 12px 0; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
table.data th {
    font-size: 11px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--muted);
}
table.data tr { transition: background .15s ease; }
table.data tbody tr:hover { background: rgba(194, 65, 12, .04); }
table.data th.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
.is-hidden { display: none !important; }
.pay-edit { display: grid; gap: 10px; justify-items: start; }
.pay-edit summary { cursor: pointer; list-style: none; }
.pay-edit summary::-webkit-details-marker { display: none; }
.pay-edit[open] .pay-edit-form {
    width: min(420px, 100%);
    padding: 12px 0 4px;
}

.btn.teal, button.teal {
    background: linear-gradient(180deg, #0d9488, var(--teal));
    box-shadow: 0 8px 18px rgba(15, 118, 110, .28);
}
.btn.sky, button.sky {
    background: linear-gradient(180deg, #3b82f6, var(--sky));
    box-shadow: 0 8px 18px rgba(29, 78, 216, .28);
}
button:disabled, .btn:disabled {
    background: var(--line) !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.sync-toolbar {
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(194, 65, 12, .12) 0%, transparent 52%),
        radial-gradient(90% 80% at 100% 100%, rgba(15, 118, 110, .10) 0%, transparent 48%),
        var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.sync-toolbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.sync-toolbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sync-toolbar-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ember-soft);
    color: var(--ember);
    flex-shrink: 0;
}
.sync-toolbar-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    line-height: 1.2;
}
.sync-toolbar-sub {
    margin-top: 3px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.35;
}
.sync-period-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-2);
    color: var(--ink);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.sync-toolbar-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.sync-toolbar-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 420px;
}
.sync-field { min-width: 160px; flex: 0 1 180px; }
.sync-field label {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}
.sync-range-sep {
    color: var(--muted);
    padding-bottom: 14px;
    font-weight: 700;
}
.sync-toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.sync-toolbar-hint { color: var(--warn); font-size: 12px; }
.sync-bagian-table tr.sync-row-rincian td {
    background: var(--bg-2);
    color: var(--muted);
    font-size: 13px;
    border-top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}
.sync-rincian-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 14px;
    font-weight: 700;
    color: var(--ink);
}
.sync-rincian-label::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ember);
    flex-shrink: 0;
}
.sync-cell-aksi { white-space: nowrap; }
.sync-cell-aksi .btn { min-height: 40px; padding: 0 12px; font-size: 13px; }
.kolom-status .badge { margin-right: 6px; }

.chip {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 108px;
    min-height: 88px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.chip strong { display: block; font-family: var(--display); font-size: 20px; }
.chip.busy { background: var(--ember-soft); border-color: transparent; }

.order-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
}
.order-choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 168px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease;
}
.order-choice-card b {
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -.03em;
}
.order-choice-card span:not(.choice-icon) {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}
.order-choice-card em {
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
    color: var(--teal);
    margin-top: auto;
}
.order-choice-card.is-take em { color: var(--ember); }
.choice-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    margin-bottom: 6px;
}
.order-choice-card.is-dine .choice-icon { background: linear-gradient(145deg, #2dd4bf, var(--teal)); }
.order-choice-card.is-take .choice-icon { background: linear-gradient(145deg, #fb923c, var(--ember)); }

.order-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.order-mode a {
    min-height: var(--touch);
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.order-mode a.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.section-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.section-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.section-tab b {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.section-tab em {
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3px;
    color: var(--muted);
    margin-top: auto;
}
.section-tab .tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    margin-bottom: 2px;
}
.section-tab.tone-teal .tab-icon { background: linear-gradient(145deg, #2dd4bf, var(--teal)); }
.section-tab.tone-ember .tab-icon { background: linear-gradient(145deg, #fb923c, var(--ember)); }
.section-tab.tone-sky .tab-icon { background: linear-gradient(145deg, #60a5fa, var(--sky)); }
.section-tab.tone-gold .tab-icon { background: linear-gradient(145deg, #fbbf24, var(--gold)); }
.section-tab.tone-ok .tab-icon { background: linear-gradient(145deg, #34d399, var(--ok)); }
.section-tab.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    box-shadow: var(--shadow);
}
.section-tab.is-on em { color: rgba(255,255,255,.72); }

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
}
.table-tile {
    min-height: 112px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    width: 100%;
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease;
}
.table-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--ok);
}
.table-tile.is-busy::before { background: var(--ember); }
.table-tile.is-billing::before { background: var(--gold); }
.table-tile.is-dirty::before { background: var(--muted); }
.table-tile:active { transform: scale(.97); }
.table-tile b { font-family: var(--display); font-size: 22px; }

.menu-add {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 10px;
    background: #fff;
}
.menu-add .meta { flex: 1; min-width: 0; }
.cat-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ember);
    margin: 16px 0 8px;
}

.ticket {
    display: inline-flex;
    flex-direction: column;
    min-width: 180px;
    max-width: 240px;
    vertical-align: top;
    padding: 14px;
    border-radius: 16px;
    background: var(--gold-soft);
    margin: 0 10px 10px 0;
    box-shadow: var(--shadow-sm);
}
.ticket.is-ready {
    background: var(--ok-soft);
    animation: pulse 2s ease infinite;
}
.ticket strong { font-size: 15px; }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--bg-2); color: var(--muted); }

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 650;
    animation: slide .35s ease both;
}
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-bad { background: var(--bad-soft); color: var(--bad); }

.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--line);
    display: block;
}
.thumb-empty { width: 56px; height: 56px; }
.logo-preview {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: block;
}
.login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.settings-tabs a {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.settings-tabs a.is-on {
    background: var(--ink);
    color: #fff;
    border-color: transparent;
}
.perm-label {
    margin: 18px 0 8px;
    font-size: 13px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--muted);
}
.perm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    margin-bottom: 8px;
}
@media (max-width: 720px) {
    .perm-grid { grid-template-columns: 1fr; }
}
.qr-preview { width: 72px; height: 72px; }
.qr-preview svg { width: 100%; height: 100%; display: block; }
.voucher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.voucher-actions form { margin: 0; }
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}
.filter-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.filter-chips a.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.scan-row {
    display: flex;
    gap: 8px;
    align-items: end;
}
.scan-row input { flex: 1; }
.scan-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, .72);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.scan-overlay[hidden] { display: none; }
.scan-box {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 16px;
}
.scan-box video {
    width: 100%;
    border-radius: 12px;
    background: #111;
    aspect-ratio: 1;
    object-fit: cover;
}
td code, p code, .muted code { font-size: 12px; word-break: break-all; }

.lang-switch {
    display: inline-flex;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}
.lang-switch form { margin: 0; }
.lang-switch button,
.lang-btn {
    min-height: 40px;
    min-width: 48px;
    padding: 0 12px;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
}
.lang-switch button.is-on,
.lang-btn.is-on {
    background: #fff;
    color: var(--ink);
}
.topbar .lang-switch { background: #fff; box-shadow: var(--shadow-sm); }
.topbar .lang-switch button,
.login-top .lang-switch button { color: var(--muted); }
.topbar .lang-switch button.is-on,
.login-top .lang-switch button.is-on { background: var(--ink); color: #fff; }
.login-top .lang-switch { background: #fff; box-shadow: var(--shadow-sm); }

.dock {
    display: none;
    position: sticky;
    bottom: 0;
    z-index: 25;
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 6px;
}
.dock a {
    flex: 1;
    min-height: 56px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
}
.dock a.is-on { background: var(--ember-soft); color: var(--ember); }

.backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 17, 15, .46);
    z-index: 35;
}

/* Login */
body.is-auth { min-height: 100dvh; }
.login {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}
.login-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(160deg, rgba(20,17,15,.2), rgba(20,17,15,.55)),
        radial-gradient(800px 500px at 20% 20%, rgba(234,88,12,.55), transparent 50%),
        #14110f;
}
.login-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% 20%;
    height: 70%;
    background: radial-gradient(circle, rgba(15,118,110,.35), transparent 60%);
    animation: drift 12s ease-in-out infinite;
}
.login-kicker {
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fdba74;
    margin: 0 0 12px;
}
.login-hero h1 {
    font-size: 48px;
    color: #fff;
    max-width: 11ch;
}
.login-hero p { color: rgba(255,255,255,.78); max-width: 36ch; font-size: 17px; }
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 48px;
    background: color-mix(in srgb, var(--bg) 70%, #fff);
}
.login-card {
    background: var(--paper);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
    animation: rise .5s ease both;
}
.login-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.void-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.void-row input { min-width: 140px; width: auto; flex: 1; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes slide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, .18); }
    50% { box-shadow: 0 0 0 8px rgba(4, 120, 87, 0); }
}
@keyframes drift {
    0%, 100% { transform: translate3d(0,0,0); }
    50% { transform: translate3d(-40px, 20px, 0); }
}

@media (hover: hover) {
    .nav-item:hover { transform: translateX(3px); }
    .table-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
    .order-choice-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
    .section-tab:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
    .section-tab.is-on:hover { transform: none; }
}
@media (pointer: coarse) {
    table.data th, table.data td { padding: 16px 12px; }
    .btn, button { min-height: 52px; }
}
@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .method-grid, .qris-split { grid-template-columns: 1fr; }
    .order-choice { grid-template-columns: 1fr; }
    .section-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        grid-template-columns: none;
    }
    .section-tab {
        min-width: 148px;
        flex: 0 0 148px;
        min-height: 104px;
    }
    .login { grid-template-columns: 1fr; }
    .login-hero { min-height: 240px; padding: 28px; }
    .login-hero h1 { font-size: 34px; }
    .login-panel { padding: 24px 18px 40px; }
}
@media (max-width: 920px) {
    .sync-toolbar-head,
    .sync-toolbar-body,
    .sync-toolbar-actions { align-items: stretch; }
    .sync-toolbar-actions { width: 100%; }
    .sync-toolbar-form button,
    #btn-kirim-semua { width: 100%; justify-content: center; }
    .sync-period-chip { align-self: flex-start; }
    .icon-btn { display: grid; }
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        transition: transform .28s ease;
    }
    .sidebar.is-open { transform: none; }
    .backdrop.is-on { display: block; }
    .dock { display: flex; }
    body.has-shell .page { padding-bottom: calc(var(--dock-h) + 16px); }
}
@media (min-width: 921px) {
    .topbar .lang-switch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
