: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;
    --sidebar-mini: 84px;
    --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-text { min-width: 0; flex: 1; }
.brand-text strong,
.brand-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-collapse {
    display: none;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: var(--sidebar-text);
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.sidebar-collapse:hover { background: rgba(255,255,255,.16); }
.sidebar-collapse .icon,
.sidebar-pin .icon { transition: transform .22s ease; }
.nav-text { min-width: 0; }
.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);
}
.sidebar-pin { display: none; }
.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-icon.sky { background: linear-gradient(145deg, #60a5fa, var(--sky)); }
.stat-icon.ok { background: linear-gradient(145deg, #34d399, var(--ok)); }
.stat-icon.violet { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.stat strong { display: block; font-family: var(--display); font-size: 28px; letter-spacing: -.04em; }
.stat strong small { font-size: 16px; color: var(--muted); font-weight: 650; margin-left: 2px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

.dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    margin-bottom: 16px;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(251, 146, 60, .35), transparent 55%),
        linear-gradient(135deg, #1c1612 0%, #3f1d0d 55%, #c2410c 140%);
    box-shadow: var(--shadow);
    animation: rise .5s ease both;
}
.dash-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255,255,255,.62);
}
.dash-hero-copy h2 {
    margin: 0;
    font-size: 28px;
    color: #fff;
    letter-spacing: -.04em;
}
.dash-hero-copy p { color: rgba(255,255,255,.72); margin: 8px 0 0; }
.dash-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dash-hero-meta a { text-decoration: none; }
.dash-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.dash-ring div {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}
.dash-ring strong { font-family: var(--display); font-size: 26px; letter-spacing: -.04em; }
.dash-ring span { font-size: 11px; color: rgba(255,255,255,.7); font-weight: 700; }
.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
.dash-stats .stat { min-height: 88px; animation: rise .5s ease both; }
.dash-stats .stat:nth-child(2) { animation-delay: .04s; }
.dash-stats .stat:nth-child(3) { animation-delay: .08s; }
.dash-stats .stat:nth-child(4) { animation-delay: .12s; }
.dash-stats .stat:nth-child(5) { animation-delay: .16s; }
.dash-stats .stat:nth-child(6) { animation-delay: .2s; }
.dash-split {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) 1.4fr;
    gap: 16px;
    align-items: start;
}
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 650;
}
.dash-list li:last-child { border-bottom: 0; }
.dash-list b { font-family: var(--display); font-size: 20px; }
.dash-meter {
    height: 10px;
    border-radius: 999px;
    background: var(--bg-2);
    overflow: hidden;
    margin: 8px 0 10px;
}
.dash-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ember-2), var(--ember));
}
.dash-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dash-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    color: var(--ink);
    min-height: 108px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.dash-tile .tile {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    margin-bottom: 4px;
}
.dash-tile .tile.tone-ember { background: var(--ember); }
.dash-tile .tile.tone-gold { background: var(--gold); }
.dash-tile .tile.tone-ok { background: var(--ok); }
.dash-tile .tile.tone-sky { background: var(--sky); }
.dash-tile .tile.tone-indigo { background: #4338ca; }
.dash-tile .tile.tone-violet { background: #6d28d9; }
.dash-tile .tile.tone-teal { background: var(--teal); }
.dash-tile strong { font-size: 15px; }
.dash-tile span:last-child { color: var(--muted); font-size: 12px; font-weight: 600; }

.license-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 24px 26px;
    margin-bottom: 16px;
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.license-hero.is-on { box-shadow: 0 0 0 1px rgba(4, 120, 87, .18), var(--shadow); }
.license-hero.is-off { box-shadow: 0 0 0 1px rgba(190, 18, 60, .16), var(--shadow); }
.license-hero h2 { margin: 0; font-size: 26px; word-break: break-all; }
.license-quota { display: grid; gap: 12px; margin: 0; min-width: 160px; }
.license-quota div {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg-2);
}
.license-quota dt { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.license-quota dd { margin: 4px 0 0; font-family: var(--display); font-size: 20px; }
.mod-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--bg-2);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3px;
}
.mod-chip small { font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.plan {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
}
.plan.is-best {
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(4, 120, 87, .16);
    background: linear-gradient(180deg, #ecfdf5, #fff 42%);
}
.plan strong { font-family: var(--display); font-size: 26px; letter-spacing: -.04em; }
.plan small { color: var(--muted); font-weight: 650; }
.plan p { margin: 0 0 8px; flex: 1; }
.plan .btn { width: 100%; }
.license-qris-box { text-align: center; width: min(420px, 100%); }
.license-qris-svg {
    width: min(260px, 100%);
    margin: 12px auto 0;
    border-radius: 16px;
    background: #fff;
}
.license-qris-svg svg { width: 100%; height: auto; display: block; }

.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):not(.pos-chip):not(.pos-tile-hit):not(.toast-close):not(.combo-btn):not(.combo-opt),
.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; }
button.icon-only, .btn.icon-only {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
}

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; }
fieldset.place-picker {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
fieldset.place-picker legend {
    font-size: 13px;
    font-weight: 700;
    padding: 0;
    margin: 14px 0 7px;
}
.place-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 12px;
    max-height: 280px;
    overflow: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}
.place-picks label.check { margin: 0; }
.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.data tr.row-total td { font-weight: 700; background: #F5F5F4; }
table.data tr.row-group td { font-weight: 700; background: #E7E5E4; }
.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-cell-aksi { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sync-pesan { display: block; max-width: 280px; color: var(--bad); margin-top: 4px; white-space: normal; }
.sync-modal[hidden] { display: none; }
.sync-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.sync-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15, 23, 42, .45); }
.sync-modal-panel { position: relative; width: min(860px, 100%); max-height: min(86vh, 900px); overflow: auto; background: #fff; border-radius: 18px; padding: 18px 18px 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, .2); }
.sync-modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.sync-modal-head h2 { margin: 0; }
.sync-modal-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.sync-preview-note { padding: 10px 12px; border-radius: 12px; }
.sync-preview-note.is-ok { background: var(--ok-soft); color: var(--ok); }
.sync-preview-note.is-bad { background: var(--bad-soft); color: var(--bad); }
.sync-preview-jurnal { margin: 14px 0; }
.sync-preview-jurnal header { display: flex; justify-content: space-between; gap: 8px; }
.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: repeat(auto-fit, minmax(200px, 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); }
.order-choice-card.is-reserve em { color: var(--gold); }
.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-choice-card.is-reserve .choice-icon { background: linear-gradient(145deg, #fbbf24, var(--gold)); }

.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);
}
.order-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 8;
    background: var(--bg);
    padding: 4px 0 8px;
}
.order-toolbar .order-mode { margin: 0; }
.table-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
}
.table-strip form { margin: 0; }
.table-strip a,
.table-strip button {
    min-height: 44px;
    min-width: 72px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    box-shadow: none;
}
.table-strip a.is-on,
.table-strip button.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.table-strip button.is-busy { background: var(--ember-soft); }
.table-strip button.is-reserved { background: var(--gold-soft); }

.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.tone-violet .tab-icon { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.section-tab.tone-indigo .tab-icon { background: linear-gradient(145deg, #818cf8, #4338ca); }
.section-tab.tone-rose .tab-icon { background: linear-gradient(145deg, #fb7185, var(--rose)); }
.section-tab.tone-leaf .tab-icon { background: linear-gradient(145deg, #84cc16, #4d7c0f); }
.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.is-reserved::before { background: var(--sky); }
.table-tile .tile-guest {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.3;
}
.table-tile:active { transform: scale(.97); }
.table-tile b { font-family: var(--display); font-size: 22px; }
a.table-tile { text-decoration: none; }
.room-open {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.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; }
.fire-flag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ember);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    vertical-align: middle;
}
.ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.ticket-actions form { margin: 0; }
.ticket-actions button { width: 100%; }
.ticket-actions .check { font-size: 12px; color: var(--muted); }
.kitchen-board { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.kitchen-board-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.kitchen-board-row.is-sold { background: var(--bad-soft); }
.kitchen-board-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-add.is-sold { opacity: .72; background: var(--bg-2); }

.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); }

.toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
body.has-shell .toast-stack {
    top: calc(var(--topbar-h) + 12px);
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px 14px 16px;
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 650;
    box-shadow: 0 16px 40px rgba(28, 22, 18, .16);
    border: 1px solid var(--line);
    animation: toast-in .28s ease both;
}
.toast span { flex: 1; line-height: 1.35; padding-top: 1px; }
.toast-ok { border-color: #a7f3d0; }
.toast-ok .icon { color: var(--ok); }
.toast-bad { border-color: #fecdd3; }
.toast-bad .icon { color: var(--bad); }
.toast-close {
    min-height: 28px;
    min-width: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
}
.toast.is-out { animation: toast-out .28s ease both; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}
@keyframes toast-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-8px); }
}

.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; }

.page:has(.pos-desk) { max-width: none; padding-top: 12px; }
body:has(.order-modal) { overflow: hidden; }
.order-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.order-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 17, 15, .55);
}
.order-modal-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    background: var(--bg);
    border-radius: 22px;
    padding: 16px 16px 20px;
    box-shadow: var(--shadow);
}
.order-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.order-modal-head h2 { margin: 0; }
.order-modal .pos-ticket { position: static; max-height: none; }
.order-modal .pos-desk { align-items: start; }
.order-modal .order-choice { margin-top: 4px; }
.pos-desk {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 420px);
    gap: 16px;
    align-items: start;
}
.pos-menu { min-width: 0; }
.pos-menu > h2 { margin: 0 0 12px; }
.pos-menu-tools {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.pos-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pos-chip {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}
.pos-chip.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}
.pos-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--touch);
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-2);
    color: var(--muted);
}
.pos-search input {
    border: 0;
    background: transparent;
    width: 100%;
    min-height: 40px;
    padding: 0;
    box-shadow: none;
}
.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}
.pos-tile {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.pos-tile-hit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
    color: inherit;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}
.pos-tile-hit:disabled { background: transparent !important; }
.pos-tile-img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    background: var(--bg-2);
    display: block;
}
.pos-tile-img.is-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    height: 72px;
}
.pos-tile-name {
    font-weight: 750;
    padding: 0 10px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pos-tile-note { font-size: 11px; color: var(--muted); padding: 0 10px; }
.pos-tile-price {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.03em;
    padding: 0 10px;
    font-variant-numeric: tabular-nums;
}
.pos-tile-sold { padding: 0 10px; }
.pos-tile-mods {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 10px 10px;
    border-top: 1px dashed var(--line);
    padding-top: 8px;
}
.pos-tile.is-sold { opacity: .62; background: var(--bg-2); }
.pos-ticket {
    position: sticky;
    top: calc(var(--topbar-h) + 8px);
    max-height: calc(100dvh - var(--topbar-h) - 24px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pos-ticket-head h2 { margin: 0; }
.pos-total {
    background: linear-gradient(160deg, #1c1612, #2a221c);
    color: #fff;
    border-radius: 18px;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pos-total span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #fdba74;
}
.pos-total strong {
    font-family: var(--display);
    font-size: 38px;
    letter-spacing: -.04em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
.pos-total-figure {
    font-family: var(--display);
    font-size: 42px;
    letter-spacing: -.04em;
    margin: 8px 0 4px;
    font-variant-numeric: tabular-nums;
}
.pos-total-break { margin: 0; display: grid; gap: 4px; }
.pos-total-break div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}
.pos-total-break dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.pos-total-break .is-sum { font-size: 15px; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line); }
.pos-total-break .is-sum dd { font-family: var(--display); font-size: 18px; }
.pos-lines { display: flex; flex-direction: column; gap: 8px; }
.pos-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.pos-line.is-child { padding-left: 16px; opacity: .85; }
.pos-line.is-void { opacity: .5; text-decoration: line-through; }
.pos-line-main { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.pos-line-amt {
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    text-align: right;
}
.pos-line .void-row { grid-column: 1 / -1; }
.qty-step {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-step form { margin: 0; }
.qty-step button {
    min-height: 40px;
    min-width: 40px;
    padding: 0 12px;
}
.qty-step span {
    min-width: 24px;
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.qty-step-note { grid-column: 1 / -1; }
.cash-count { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cash-count .cash-nominal { max-width: 240px; }
.cash-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 240px);
    gap: 8px;
    align-items: center;
}
.cash-piece {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.cash-step {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cash-step button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}
.cash-step .cash-qty {
    width: 84px;
    flex: 0 0 84px;
    min-height: 40px;
    padding: 0 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cash-step .cash-qty::-webkit-outer-spin-button,
.cash-step .cash-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cash-total-line { margin: 4px 0 0; }
.pos-ticket-actions, .pos-pay { display: flex; flex-direction: column; gap: 10px; }
.pos-ticket-actions form, .pos-ticket-actions .btn, .pos-ticket-actions button, .pos-pay button.lg, .pos-pay-btn { width: 100%; }
.pos-tenders { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-tenders .ghost { min-height: 40px; padding: 0 12px; }
.pos-fold {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 12px;
    background: var(--bg-2);
}
.pos-fold summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.pos-fold-body { padding-top: 8px; }
.cat-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) 80px 48px auto auto auto;
    gap: 8px;
    align-items: center;
}
.cat-row-del { margin-top: 6px; }

@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); }
    .pos-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
    .pos-chip:hover:not(.is-on) { background: var(--bg-2); }
    .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; }
    .dash-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}
@media (pointer: coarse) {
    table.data th, table.data td { padding: 16px 12px; }
    .btn, button { min-height: 52px; }
    .toast-close { min-height: 28px; min-width: 28px; padding: 0; }
    button.icon-only { width: 44px; min-width: 44px; min-height: 44px; }
}
@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: 1fr; }
    .dash-stats { grid-template-columns: 1fr 1fr; }
    .plan-grid, .dash-split { grid-template-columns: 1fr; }
    .dash-hero { flex-direction: column; align-items: flex-start; }
    .license-hero { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .method-grid, .qris-split { grid-template-columns: 1fr; }
    .order-choice { grid-template-columns: 1fr; }
    .pos-desk { grid-template-columns: 1fr; }
    .order-modal { padding: 10px; }
    .order-modal-panel { max-height: calc(100dvh - 20px); border-radius: 16px; }
    .pos-ticket { position: static; max-height: none; }
    .pos-total strong { font-size: 32px; }
    .cat-row { grid-template-columns: 1fr 80px; }
    .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: 640px) {
    .dash-stats, .dash-tiles { grid-template-columns: 1fr; }
    .dash-hero { padding: 20px; }
    .dash-hero-copy h2 { font-size: 22px; }
}
@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; }
    .sidebar { transition: width .22s ease; }
    .sidebar-pin { display: grid; }
    .sidebar-collapse { display: grid; }
    html.sidebar-mini .sidebar {
        width: var(--sidebar-mini);
        padding-left: 10px;
        padding-right: 10px;
    }
    html.sidebar-mini .brand {
        flex-direction: column;
        gap: 10px;
        padding-left: 0;
        padding-right: 0;
    }
    html.sidebar-mini .brand-text,
    html.sidebar-mini .nav-label,
    html.sidebar-mini .nav-text,
    html.sidebar-mini .sidebar .lang-switch { display: none; }
    html.sidebar-mini .sidebar-collapse { margin-left: 0; }
    html.sidebar-mini .nav-item,
    html.sidebar-mini .logout-btn,
    html.sidebar-mini .user-chip {
        justify-content: center;
        gap: 0;
        padding-left: 0;
        padding-right: 0;
    }
    html.sidebar-mini .sidebar-pin .icon,
    html.sidebar-mini .sidebar-collapse .icon { transform: rotate(180deg); }
    html.sidebar-mini .topbar .lang-switch { display: inline-flex; }
}
@media (max-width: 920px) {
    .sidebar-pin,
    .sidebar-collapse { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
