/* Cafe-POS - Global Styles */
:root {
    --brand: #e9901d;
    --brand-2: #f7b955;
    --bg: #f6f4f0;
    --ink: #2b2620;
    --radius: 1rem;
}
* { -webkit-tap-highlight-color: transparent; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--ink); }
.customer-body { background: var(--bg); min-height: 100vh; padding-bottom: 84px; }
.admin-body { background: #f4f2ee; }

/* Glassmorphism ringan */
.glass-nav {
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.btn-brand {
    background: linear-gradient(120deg, var(--brand), var(--brand-2));
    color: #fff; border: none; font-weight: 600;
}
.btn-brand:hover, .btn-brand:focus { color: #fff; filter: brightness(1.05); }

/* Bottom nav customer */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
    display: flex; justify-content: space-around;
    padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
}
.bn-item {
    position: relative; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #8a8378; font-size: .72rem; padding: .15rem .8rem;
    border-radius: .8rem; transition: .2s;
}
.bn-item i { font-size: 1.15rem; }
.bn-item.active { color: var(--brand); }
.bn-badge {
    position: absolute; top: -2px; right: 6px;
    background: #dc3545; color: #fff; font-size: .62rem; font-weight: 700;
    min-width: 17px; height: 17px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* Menu card */
.menu-card {
    background: #fff; border: none; border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(43,38,32,.06);
    overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
    height: 100%;
}
.menu-card:active { transform: scale(.97); }
.menu-card:hover { box-shadow: 0 8px 26px rgba(43,38,32,.12); }
.menu-card img { width: 100%; height: 140px; object-fit: cover; background: #efe9e0; }
.menu-card .card-body { padding: .75rem .85rem; }
.menu-price { color: var(--brand); font-weight: 700; }
.badge-promo {
    position: absolute; top: 8px; left: 8px;
    background: #dc3545; color: #fff; font-size: .68rem; font-weight: 700;
    padding: .2rem .5rem; border-radius: 2rem;
}
.badge-spicy { background: #fff3e6; color: #c2410c; }

/* Chips kategori */
.chip-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    white-space: nowrap; padding: .35rem 1rem; border-radius: 2rem; font-size: .82rem;
    background: #fff; border: 1px solid #e8e2d8; color: #6b6357; cursor: pointer; transition: .15s;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Skeleton loading */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
    border-radius: var(--radius);
    background: linear-gradient(90deg, #ede8e0 25%, #f7f3ec 50%, #ede8e0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.3s infinite linear;
    min-height: 200px;
}

/* Stepper status pesanan */
.stepper { display: flex; flex-direction: column; gap: 0; margin: 1rem 0; }
.step-item { display: flex; gap: .8rem; }
.step-dot {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: #e8e2d8; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.step-item.done .step-dot { background: var(--brand); }
.step-item.current .step-dot { background: var(--brand); box-shadow: 0 0 0 5px rgba(233,144,29,.2); animation: pulse 1.6s infinite; }
.step-item.cancelled .step-dot { background: #dc3545; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(233,144,29,.08); } }
.step-line { width: 2px; min-height: 22px; background: #e8e2d8; margin-left: 12px; }
.step-item.done .step-line, .step-item.current .step-line { background: var(--brand); }
.step-label { font-size: .85rem; padding-top: 3px; }
.step-item.pending .step-label { color: #a39a8c; }
.step-item.done .step-label, .step-item.current .step-label { color: var(--ink); font-weight: 600; }

/* Kitchen Display System */
.kds-col { min-height: 200px; }
.kds-card {
    background: #fff; border-radius: .9rem; padding: .8rem;
    border-left: 5px solid #c9c1b4; margin-bottom: .8rem;
    box-shadow: 0 3px 12px rgba(43,38,32,.07);
}
.kds-card.st-queued { border-left-color: #f59e0b; }
.kds-card.st-processing { border-left-color: #3b82f6; }
.kds-card.pr-1, .kds-card.pr-2 { border-left-color: #dc3545; }
.kds-wait { font-variant-numeric: tabular-nums; font-weight: 700; }
.kds-wait.late { color: #dc3545; }

/* Admin sidebar */
.sidebar {
    width: 240px; min-height: 100vh; position: sticky; top: 0; height: 100vh;
    overflow-y: auto; flex-shrink: 0;
}
.side-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .8rem; border-radius: .7rem; margin-bottom: 2px;
    color: #5d564b; text-decoration: none; font-size: .9rem; transition: .15s;
}
.side-link:hover { background: rgba(233,144,29,.08); color: var(--brand); }
.side-link.active { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; }
.main-panel { min-width: 0; }
.topbar { height: 56px; position: sticky; top: 0; z-index: 1020; }
@media (max-width: 991px) {
    .sidebar { position: fixed; z-index: 1040; left: -250px; transition: left .25s; }
    .sidebar.show { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.25); }
}

/* Stat card */
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 1.1rem;
    box-shadow: 0 4px 16px rgba(43,38,32,.05); height: 100%;
}
.stat-card .icon-wrap {
    width: 44px; height: 44px; border-radius: .8rem; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem;
}

/* QR print */
.qr-sheet { text-align: center; page-break-inside: avoid; padding: 1rem; }
@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { position: absolute; inset: 0; }
    .no-print { display: none !important; }
}

/* Receipt thermal */
.receipt { font-family: 'Courier New', monospace; font-size: 12px; width: 72mm; margin: 0 auto; color: #000; }
.receipt.p58 { width: 48mm; font-size: 11px; }
.receipt hr { border-top: 1px dashed #000; margin: 4px 0; }
.receipt .r { display: flex; justify-content: space-between; }
@media print {
    .receipt-print { width: auto; }
}

/* Cart item */
.cart-item { background: #fff; border-radius: .9rem; padding: .7rem .9rem; margin-bottom: .6rem;
    box-shadow: 0 2px 10px rgba(43,38,32,.05); }
.qty-btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brand);
    background: #fff; color: var(--brand); font-weight: 700; line-height: 1;
}
.qty-btn:active { background: var(--brand); color: #fff; }

/* Lazy image fade */
.img-fade { opacity: 0; transition: opacity .4s; }
.img-fade.loaded { opacity: 1; }
