/* ============ Swate POS — flat orange palette ============ */
:root {
    --orange: #E8590C;
    --orange-dark: #C04508;
    --orange-soft: #FFF4EE;
    --tile: #F5A623;
    --tile-dark: #C77E15;
    --ink: #1F1F1F;
    --ink-soft: #8A8A8A;
    --line: #E6E6E6;
    --bg: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body {
    font-family: 'Segoe UI', Roboto, -apple-system, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--ink);
    height: 100vh;
    overflow: hidden;
}
.hidden { display: none !important; }

/* ============ LOGIN SCREEN ============ */
.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-box h2 {
    color: var(--ink);
    margin-bottom: 8px;
    font-size: 24px;
}
.login-subtitle {
    color: var(--ink-soft);
    margin-bottom: 24px;
    font-size: 14px;
}
.pin-input {
    width: 100%;
    padding: 14px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid var(--line);
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 700;
}
.pin-input:focus {
    outline: none;
    border-color: var(--orange);
}
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
.login-error {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 12px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 6px;
}
.login-error.hidden { display: none; }

/* ============ App grid: menu | order + bottom tab ============ */
.app {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    height: calc(100vh - 52px);   /* fallback */
    height: calc(100dvh - 52px);
    height: calc(var(--app-h, 100dvh) - 52px);
}

/* ============ LEFT — MENU ============ */
.pane-menu {
    overflow-y: auto;
    border-right: 1px solid var(--line);
    padding: 12px 14px;
}
.pane-menu .view { height: 100%; }

/* Category tiles: 4-col, gray square tile + label strip */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.cat-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cat-tile {
    background: var(--tile);
    color: #fff;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    font-family: Georgia, serif;
}
.cat-label {
    background: #fff;
    border: 1px solid var(--line);
    border-top: none;
    padding: 5px 0;
    text-align: center;
    font-size: 11px;
    color: var(--ink);
}
.cat-btn.active .cat-tile { background: var(--tile-dark); }
.cat-btn:hover .cat-tile { opacity: 0.92; }

/* Item grid: 4-col, square tile + white caption bar */
.item-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.item-card {
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .15s;
}
.item-card:hover { border-color: var(--orange); }
.item-tile {
    background: var(--tile);
    color: #fff;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    font-family: Georgia, serif;
    opacity: 0.95;
}
.item-caption {
    border-top: 1px solid var(--line);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.item-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
}
.item-price {
    font-size: 11px;
    color: var(--ink-soft);
}
.empty-note {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--ink-soft);
    padding: 24px 0;
    font-size: 13px;
}

/* View head + filters */
.view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.view-head h2 { font-size: 16px; font-weight: 700; }
.filter-tabs { display: flex; gap: 6px; }
.filter-btn {
    background: #fff;
    border: 1px solid var(--line);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--ink);
}
.filter-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Edit menu form + rows */
.menu-form {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 14px;
}
.menu-input {
    border: 1px solid var(--line);
    padding: 8px 10px;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    min-width: 0;
}
.menu-input:focus { outline: none; border-color: var(--orange); }
.menu-edit-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.me-actions { display: flex; gap: 6px; }
.me-actions button {
    border: 1px solid var(--line);
    background: #fff;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink);
    white-space: nowrap;
}
.me-actions .me-save { border-color: var(--orange); color: var(--orange); }
.me-actions .me-save:hover { background: var(--orange); color: #fff; }
.me-actions .me-variasi:hover { border-color: var(--ink); }
.me-actions .me-delete { color: #D32F2F; }
.me-actions .me-delete:hover { background: #FDECEA; border-color: #D32F2F; }
.confirm-note { font-size: 12px; color: var(--ink-soft); margin-top: 10px; line-height: 1.4; }

/* Laporan penjualan */
.report-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}
.range-custom { display: flex; align-items: center; gap: 6px; }
.range-custom .menu-input { width: auto; padding: 6px 8px; }
.range-arrow { color: var(--ink-soft); font-size: 12px; }
.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.rs-card {
    border: 1px solid var(--line);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rs-label { font-size: 11px; color: var(--ink-soft); }
.rs-value { font-size: 15px; font-weight: 700; }
.rs-range { grid-column: 1 / -1; font-size: 11px; color: var(--ink-soft); }
.report-actions { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.report-actions button { flex: 0 0 auto; padding: 9px 14px; width: auto; }
.report-sub { font-size: 13px; font-weight: 700; margin: 12px 0 8px; }
.daily-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.daily-date { font-weight: 600; }
.daily-cash, .daily-qris { color: var(--ink-soft); }
.daily-total { font-weight: 700; text-align: right; }

/* ============ RIGHT — ORDER PANEL ============ */
.pane-order {
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow: hidden;
}
.order-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
/* Elemen khusus mobile — disembunyikan di desktop */
.mobile-topbar { display: none; }
.order-toggle { display: none; }
.drawer-overlay { display: none; }

.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.billing-label {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    padding: 5px 10px;
    font-size: 12px;
    color: var(--ink);
}
.billing-icon { color: var(--orange); font-size: 14px; }
#open-bills-btn {
    font-size: 12px;
    color: var(--ink-soft);
    cursor: pointer;
}
#open-bills-btn span { color: var(--orange); font-weight: 700; }
.summary-line {
    font-size: 11px;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

/* Add customer */
.add-customer {
    border: 1px solid var(--line);
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--ink);
}
.add-customer::placeholder { color: var(--ink-soft); font-weight: 500; }

/* Channel toggle */
.channel-toggle { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--line); }
.channel-btn {
    flex: 1;
    background: #fff;
    border: none;
    padding: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.channel-btn.active { background: var(--orange); color: #fff; }

/* Bill items */
.bill-items {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid var(--line);
}
.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
}
.bill-item-main { display: flex; align-items: baseline; gap: 8px; }
.bill-item-name { font-size: 13px; font-weight: 600; }
.bill-item-qty { font-size: 12px; color: var(--ink-soft); }
.bill-item-right { display: flex; align-items: center; gap: 8px; }
.bill-item-price { font-size: 13px; font-weight: 600; }
.remove-btn {
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 16px;
    cursor: pointer;
}
.remove-btn:hover { color: var(--orange); }

/* Totals */
.bill-totals { border-top: 1px solid var(--line); padding: 8px 0; }
.bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 4px;
    color: var(--ink);
}
.bill-total {
    font-weight: 700;
    font-size: 15px;
    border-top: 1px solid var(--ink);
    margin-top: 4px;
    padding-top: 8px;
}

/* Clear sale */
.clear-sale {
    background: none;
    border: none;
    color: var(--ink-soft);
    text-align: center;
    padding: 8px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 8px;
}
.clear-sale:hover { color: var(--orange); }

/* Save / Print row */
.order-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.order-actions button {
    flex: 1;
    background: #fff;
    border: 1px solid var(--ink);
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.order-actions button:disabled { opacity: 0.4; cursor: not-allowed; }
.order-actions button:not(:disabled):hover { background: var(--orange-soft); border-color: var(--orange); }

/* Charge bar */
.charge-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 13px 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.15s;
}
.charge-bar:disabled { opacity: 0.5; cursor: not-allowed; }
.charge-bar:not(:disabled):hover { background: var(--orange-dark); }
.charge-bar .split-btn {
    background: var(--orange-dark);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.charge-bar .charge-label { color: #fff; }
.charge-bar .split-btn { flex-shrink: 0; }
.charge-bar #charge-total { margin-left: auto; }

/* ============ TRANSACTIONS / OPEN BILL ============ */
#transactions-list, #open-bills-list { overflow-y: auto; }
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}
.transaction-item:hover { border-color: var(--orange); }
.transaction-info { display: flex; flex-direction: column; gap: 2px; }
.transaction-info span:first-child { font-size: 13px; font-weight: 600; }
.transaction-info span:last-child { font-size: 12px; color: var(--ink-soft); }
.transaction-meta { display: flex; align-items: center; gap: 8px; }
.transaction-total { font-size: 15px; font-weight: 700; }
.transaction-method {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--orange-soft);
    color: var(--orange);
}
.transaction-reprint { font-size: 12px; color: var(--ink-soft); }
.transaction-reprint:hover { color: var(--orange); text-decoration: underline; }

.open-bill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    background: #fff;
}
.open-bill-customer { font-size: 14px; font-weight: 600; }
.open-bill-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.open-bill-total { font-size: 15px; font-weight: 700; color: var(--orange); }
.pay-btn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.pay-btn:hover { background: var(--orange-dark); }
.count-pill {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
}
.open-bill-info { display: flex; flex-direction: column; gap: 4px; }
.open-bill-items { font-size: 12px; color: var(--ink-soft); }
.open-bill-actions { display: flex; gap: 6px; }
.open-bill-actions button {
    border: 1px solid var(--line);
    background: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink);
}
.open-bill-actions button:hover { border-color: var(--orange); }
.open-bill-actions .delete-btn { color: #D32F2F; }
.open-bill-actions .delete-btn:hover { background: #FDECEA; border-color: #D32F2F; }

/* ============ BOTTOM TAB BAR ============ */
.tabbar {
    height: 52px;
    background: var(--orange-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}
.tabbar-burger { color: #fff; font-size: 18px; padding: 0 12px; opacity: 0.8; }
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex: 1;
    background: none;
    border: none;
    color: #E8B98A;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}
.nav-btn .tab-ic { font-size: 16px; }
.nav-btn.active {
    background: var(--orange);
    color: #fff;
}

/* Badge styles */
#open-bills-btn {
    position: relative;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
#open-count {
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.badge-hidden #open-count {
    background: transparent;
    color: var(--ink-soft);
    width: auto;
    height: auto;
    border-radius: 0;
}

/* ============ MODALS ============ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-content {
    background: #fff;
    padding: 20px;
    width: 320px;
    border: 1px solid var(--line);
}
.modal-content h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* ============ SIMPLE ANIMATIONS ============ */
.modal { animation: fadeIn .15s ease; }
.modal-content { animation: popIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.open-bill-item, .tx-item, .menu-edit-row {
    animation: riseIn .18s ease;
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Hormati preferensi reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 200;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: #4CAF50; }
.toast.error { background: #f44336; }
.toast.info { background: var(--orange); }

/* Click animation */
.btn-click {
    transition: transform 0.1s;
}
.btn-click:active {
    transform: scale(0.95);
}

/* Badge animation */
.badge-pulse {
    animation: badgePulse 0.3s ease;
}
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Item card animation on click */
.item-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* Click feedback — subtle press animation on interactive elements */
.item-card, .cat-btn, .channel-btn, .nav-btn, .pay-method,
#checkout-btn, #open-bill-btn, .order-actions button, .pay-btn,
.clear-sale, .filter-btn, .remove-btn, .open-bill-actions button,
.me-actions button, .btn-danger, #menu-add-btn {
    transition: transform .08s ease, background .15s, border-color .15s, color .15s;
}
.item-card:active, .cat-btn:active, .channel-btn:active, .nav-btn:active,
.pay-method:active, #checkout-btn:active, #open-bill-btn:active,
.order-actions button:active, .pay-btn:active, .filter-btn:active,
.remove-btn:active, .btn-primary:active, .btn-plain:active,
.open-bill-actions button:active, .me-actions button:active,
.btn-danger:active, #menu-add-btn:active {
    transform: scale(0.97);
}
.pay-method-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pay-method {
    padding: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: all 0.15s;
}
.pay-method:hover { border-color: var(--orange); background: var(--orange-soft); }
.qty-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
#qty-value { font-size: 22px; font-weight: 700; min-width: 40px; text-align: center; }
#qty-minus, #qty-plus {
    width: 38px; height: 38px;
    background: var(--orange-soft);
    border: 1px solid var(--line);
    font-size: 18px;
    cursor: pointer;
}
#qty-minus:hover, #qty-plus:hover { background: var(--orange); color: #fff; }
.qty-price { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; }
.btn-primary {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-plain {
    background: #fff;
    border: 1px solid var(--ink);
    padding: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}
.btn-plain:hover { background: var(--orange-soft); }
.btn-danger {
    background: #D32F2F;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}
.btn-danger:hover { background: #B71C1C; }
.confirm-body { margin-bottom: 16px; }
.confirm-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}
.confirm-line span:first-child { color: var(--ink-soft); }
.confirm-line span:last-child { font-weight: 600; text-align: right; }
.confirm-total { border-bottom: none; border-top: 1px solid var(--ink); margin-top: 4px; padding-top: 10px; }
.confirm-total span:last-child { color: var(--orange); font-size: 15px; }

.pay-total {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 14px;
}
.pay-cash { margin-bottom: 12px; }
.cash-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.cash-input:focus { outline: none; border-color: var(--orange); }
.change-line {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
    min-height: 18px;
}
.change-line.change-ok { color: #2E7D32; }
.change-line.change-short { color: #D32F2F; }
.pay-items {
    max-height: 180px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.pay-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 2px;
    font-size: 13px;
}
.pay-item-sum {
    color: var(--ink-soft);
    font-size: 11px;
    border-top: 1px dashed var(--line);
}
.pay-method {
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* ============ PRINT RECEIPTS ============ */
.receipt-section {
    position: fixed;
    left: -9999px;
    top: 0;
}
.receipt, .kitchen-ticket {
    width: 260px;
    background: #fff;
    color: #000;
    font-family: monospace;
    font-size: 13px;
    padding: 12px;
    margin-bottom: 24px;
}
.receipt-header, .kitchen-ticket h3 { text-align: center; font-size: 14px; font-weight: bold; }
.receipt-meta, .kitchen-ticket p { text-align: center; margin: 4px 0; }
.receipt-divider { border-top: 1px dashed #000; margin: 8px 0; }
.receipt-items div { display: flex; justify-content: space-between; margin: 3px 0; }
.receipt-item-name { flex: 1; }
.receipt-total-line { font-weight: bold; }
.receipt-total-amount { text-align: right; font-weight: bold; font-size: 14px; }
.receipt-footer { text-align: center; margin-top: 8px; font-size: 12px; }
.kitchen-ticket h2 { font-size: 18px; text-align: center; margin-bottom: 4px; }
.kitchen-ticket .ticket-order-meta { text-align: center; font-size: 13px; margin-bottom: 10px; }
.kitchen-ticket table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.kitchen-ticket th, .kitchen-ticket td { padding: 5px 4px; text-align: left; font-size: 15px; }
.kitchen-ticket th { font-weight: bold; border-bottom: 1px solid #000; }
.kitchen-ticket td.qty { text-align: right; }
.kitchen-ticket .ticket-note { font-size: 11px; text-align: center; margin-top: 12px; color: #555; }

@media print {
    body * { visibility: hidden; }
    .receipt-section, .receipt-section * { visibility: visible; }
    .receipt-section { position: absolute; left: 0; top: 0; }
    .kitchen-ticket { page-break-after: always; }
}

@media (max-width: 768px) {
    /* ---------- Topbar + drawer nav (bar di samping, dipencet dulu) ---------- */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 48px;
        padding: 0 12px;
        background: var(--orange-dark);
        color: #fff;
        position: relative;
        z-index: 90;
    }
    .mt-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        padding: 4px 6px;
    }
    .mt-title { font-weight: 700; font-size: 15px; }

    .app {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: calc(100vh - 48px);
    }
    .pane-menu { border-right: none; border-bottom: 1px solid var(--line); }

    .tabbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px 10px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 95;
    }
    .tabbar.open { transform: translateX(0); }
    .tabbar-burger { display: none; }
    .nav-btn {
        flex: none;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        padding: 13px 12px;
        font-size: 14px;
        border-radius: 6px;
    }
    .nav-btn.active { background: var(--orange); }

    .drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 94;
    }
    .drawer-overlay.open { display: block; }

    /* ---------- Menu: pakai list, bukan grid ---------- */
    .item-grid {
        grid-template-columns: 1fr;
        gap: 0;
        border-top: 1px solid var(--line);
    }
    .item-card {
        display: flex;
        align-items: center;
        border: none;
        border-bottom: 1px solid var(--line);
    }
    .item-tile {
        width: 52px;
        min-width: 52px;
        height: 52px;
        aspect-ratio: auto;
        font-size: 18px;
    }
    .item-caption {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-top: none;
        padding: 12px;
    }
    .item-name { font-size: 14px; white-space: normal; }
    .item-price { font-size: 13px; font-weight: 700; color: var(--orange); }

    /* ---------- Panel pesanan: collapse, sisakan Charge ---------- */
    .pane-order { max-height: 62vh; padding: 8px; }
    .order-body { display: none; }
    .pane-order.expanded .order-body {
        display: flex;
        overflow-y: auto;
        padding-bottom: 8px;
    }
    .pane-order.expanded .bill-items { flex: none; overflow: visible; }
    .order-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        background: var(--orange-soft);
        border: 1px solid var(--line);
        border-bottom: none;
        padding: 7px;
        font-size: 12px;
        font-weight: 600;
        color: var(--ink);
        cursor: pointer;
    }
    .order-toggle .ot-arrow { display: inline-block; transition: transform .2s ease; }
    .pane-order.expanded .order-toggle .ot-arrow { transform: rotate(180deg); }

    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .menu-form, .menu-edit-row { grid-template-columns: 1fr 1fr; }
    .report-summary { grid-template-columns: repeat(2, 1fr); }
    .daily-row { grid-template-columns: 1fr auto; row-gap: 2px; }
}
