/* ===== CSS VARIABLES ===== */
:root {
    --primary: #2D3436;
    --primary-light: #636e72;
    --primary-dark: #1e272e;
    --accent: #D4A843;
    --accent-light: #e8c96e;
    --bg: #f5f5f0;
    --bg-card: #ffffff;
    --bg-sidebar: #1a1a2e;
    --bg-sidebar-hover: #16213e;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-width: 220px;
    --topbar-height: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
a { color: var(--primary); text-decoration: none; }

/* ===== LOGIN ===== */
.login-screen {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-card {
    background: white; border-radius: var(--radius); padding: 40px; width: 380px;
    box-shadow: var(--shadow-lg); text-align: center;
}
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 4px; }
.login-logo .logo-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.logo-text { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.logo-haki { color: #2D3436; }
.logo-cafe { color: #e17055; }
.logo-pos { background: #e17055; color: white; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 1px; }
.login-subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 13px; }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; color: var(--text-light); font-size: 13px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }
.error-msg { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 20px; }
.remember-me { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; margin: 12px 0; }
.remember-me input { cursor: pointer; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: white; color: var(--text); cursor: pointer; font-weight: 500;
    transition: all 0.2s; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { background: #aaa; border-color: #aaa; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { background: #219a52; }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 4px 8px; font-size: 16px; line-height: 1; }

/* ===== LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-sidebar); color: white;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    display: flex; flex-direction: column; transition: transform 0.3s;
}
.sidebar-header { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-logo .logo-text { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 700; }
.sidebar-logo .logo-haki { color: #dfe6e9; }
.sidebar-logo .logo-cafe { color: #D4A843; }
.sidebar-logo .logo-pos { background: #e17055; color: white; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; letter-spacing: 1px; }
.sidebar-menu { list-style: none; flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-menu li {
    padding: 10px 20px; cursor: pointer; display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.7); transition: all 0.2s; font-size: 13px;
}
.sidebar-menu li:hover { background: var(--bg-sidebar-hover); color: white; }
.sidebar-menu li.active { background: var(--primary); color: white; }
.sidebar-menu .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.user-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-info span { font-size: 12px; color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; }
.user-info .btn { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.2); background: transparent; }

/* Main */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
    height: var(--topbar-height); background: white; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 20px; gap: 16px;
    position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }
.page-title { font-size: 16px; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.clock { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.page { display: none; padding: 20px; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input-sm { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }

/* ===== CARDS & STATS ===== */
.card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-light); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stats-2 { grid-template-columns: repeat(2, 1fr); }
.stat-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px 20px;
    box-shadow: var(--shadow); border-left: 4px solid var(--primary);
}
.stat-card.stat-green { border-left-color: var(--success); }
.stat-card.stat-red { border-left-color: var(--danger); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table th { background: var(--bg); font-weight: 600; color: var(--text-light); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover td { background: #fafafa; }
.data-table .actions { display: flex; gap: 4px; }

/* ===== BADGES ===== */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-default { background: #e2e3e5; color: #383d41; }

/* ===== POS LAYOUT ===== */
.pos-layout { min-height: calc(100vh - var(--topbar-height) - 40px); }
.pos-step { animation: fadeIn 0.2s; }

/* Table grid */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.table-card {
    background: white; border-radius: var(--radius); padding: 16px; text-align: center;
    cursor: pointer; border: 2px solid var(--border); transition: all 0.2s; box-shadow: var(--shadow);
}
.table-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.table-card.occupied { border-color: var(--warning); background: #fffbf0; }
.table-card.reserved { border-color: var(--info); background: #f0f8ff; }
.table-card .table-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.table-card .table-status { font-size: 11px; color: var(--text-muted); }
.table-card .table-order { font-size: 11px; color: var(--warning); margin-top: 4px; }
.table-card.has-pending { border-color: var(--primary); background: #d0eef5; }
.table-card .table-pending { font-size: 13px; color: var(--primary); font-weight: 700; margin-top: 4px; }
.table-card .table-time { font-size: 13px; color: var(--primary-dark); font-weight: 600; margin-top: 2px; }

/* POS Menu area */
.pos-step:nth-child(2) { display: none; }
#pos-step-menu { display: none; }
#pos-step-menu[style*="display: flex"], #pos-step-menu.active-flex { display: flex !important; gap: 16px; }
.pos-menu-area { flex: 1; min-width: 0; }
.pos-menu-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pos-table-name { font-weight: 600; color: var(--primary); font-size: 15px; }
.search-input { flex: 1; min-width: 150px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

.menu-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.menu-toolbar .category-tabs { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; }
.toggle-images-label { font-size: 12px; color: var(--text-muted); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.toggle-images-label input { cursor: pointer; }
.category-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.cat-tab {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
    cursor: pointer; border: 1px solid var(--border); background: white; transition: all 0.2s;
}
.cat-tab:hover { border-color: var(--primary); }
.cat-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: calc(100vh - 270px); overflow-y: auto; }
.menu-item {
    background: white; border-radius: var(--radius); text-align: center;
    cursor: pointer; border: 1px solid var(--border); transition: all 0.2s;
    overflow: hidden; position: relative;
}
.menu-item:not(.has-image) { padding: 12px; }
.menu-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.menu-item.soldout { opacity: 0.5; pointer-events: none; }
.menu-item .item-img { width: 100%; aspect-ratio: 1; overflow: hidden; }
.menu-item .item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.menu-item:hover .item-img img { transform: scale(1.05); }
.menu-item .item-info { padding: 8px 10px; }
.menu-item .item-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.menu-item .item-price { font-size: 14px; font-weight: 700; color: var(--primary); }
.menu-item .item-add-btn {
    position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px;
    border-radius: 50%; background: #E8720C; color: white; border: none;
    font-size: 20px; font-weight: 700; cursor: pointer; display: flex;
    align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.menu-item .item-add-btn:hover { transform: scale(1.1); background: #d4660a; }

/* Cart */
.pos-cart-area {
    width: 320px; background: white; border-radius: var(--radius); box-shadow: var(--shadow);
    display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar-height) - 40px);
}
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cart-header h3 { font-size: 14px; margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px; }
.cart-item {
    display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.cart-item .item-info { flex: 1; min-width: 0; }
.cart-item .item-info .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .item-info .price { font-size: 11px; color: var(--text-muted); }
.cart-item .item-qty { display: flex; align-items: center; gap: 4px; }
.cart-item .item-qty button {
    width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 4px;
    background: white; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.cart-item .item-qty button:hover { background: var(--bg); }
.cart-item .item-qty span { width: 24px; text-align: center; font-weight: 600; }
.cart-item .item-total { font-weight: 600; min-width: 60px; text-align: right; font-size: 12px; }
.cart-item .item-note-btn { font-size: 10px; color: var(--text-muted); cursor: pointer; border: none; background: none; }
.cart-item .item-note { font-size: 11px; color: var(--info); font-style: italic; }
.cart-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

.cart-summary { border-top: 2px solid var(--border); padding: 12px 16px; }
.cart-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.cart-total { font-size: 18px; font-weight: 700; color: var(--primary); padding: 8px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.discount-row { color: var(--danger); }
.cart-actions { display: flex; gap: 8px; margin-top: 12px; }
.cart-actions .btn-block { flex: 1; }
.cart-more-wrap { position: relative; }
.cart-more-btn { width: 36px; height: 36px; font-size: 18px; font-weight: 700; letter-spacing: 2px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cart-more-menu {
    position: absolute; bottom: 44px; left: 0; z-index: 100;
    background: white; border-radius: var(--radius); box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border); min-width: 180px; overflow: hidden;
}
.cart-menu-item {
    display: block; width: 100%; padding: 10px 14px; border: none; background: none;
    text-align: left; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cart-menu-item:hover { background: var(--bg); }
.cart-menu-item:not(:last-child) { border-bottom: 1px solid var(--border); }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
    background: white; border-radius: var(--radius); width: 500px; max-width: 95vw;
    max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s;
}
.modal-sm { width: 400px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-footer .btn { font-size: 13px; padding: 8px 12px; white-space: nowrap; }

/* Payment */
.payment-summary { margin-bottom: 16px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); }
.payment-summary .pay-total { font-size: 24px; font-weight: 700; color: var(--primary); text-align: center; margin: 8px 0; }
.payment-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-method { flex: 1; min-width: 80px; }
.pay-method.active { background: var(--primary); color: white; border-color: var(--primary); }
.quick-amounts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.quick-amounts button { flex: 1; min-width: 70px; }
.change-display { margin-top: 12px; text-align: center; font-size: 16px; color: var(--success); }
.bank-info-box { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.bank-info-box .bank-detail { margin-bottom: 8px; font-size: 14px; }
.bank-info-box .bank-detail strong { display: block; font-size: 18px; letter-spacing: 1px; color: var(--primary); }
.bank-info-box .bank-label { font-size: 12px; color: var(--text-muted); }
.bank-info-box img { max-width: 220px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* Receipt - optimized for 80mm thermal printer (bold for thermal clarity) */
.receipt {
    font-family: 'Arial Black', 'Helvetica', sans-serif; font-size: 11px; font-weight: 900; width: 72mm; max-width: 72mm;
    margin: 0 auto; padding: 4px 0; background: white; line-height: 1.5; color: #000;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.receipt .receipt-header { text-align: center; margin-bottom: 4px; }
.receipt .receipt-header h3 { font-size: 15px; margin-bottom: 3px; font-weight: 900; letter-spacing: 1px; }
.receipt .receipt-header p { font-weight: 900; font-size: 10px; }
.receipt .receipt-divider { border-top: 2px solid #000; margin: 4px 0; }
.receipt .receipt-items { margin: 4px 0; }
.receipt .receipt-item { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; gap: 4px; }
.receipt .receipt-item span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .receipt-item span:last-child { flex-shrink: 0; text-align: right; font-weight: 900; }
.receipt .receipt-total { font-weight: 900; font-size: 14px; }
.receipt .receipt-qr { text-align: center; margin: 6px 0; }
.receipt .receipt-qr img { width: 40mm; max-width: 100%; }
.receipt .receipt-footer { text-align: center; margin-top: 6px; font-style: normal; font-size: 10px; font-weight: 900; }

/* ===== BAR CHART ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar-value { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.bar-fill { width: 100%; min-height: 4px; background: var(--primary); border-radius: 4px 4px 0 0; transition: height 0.3s; }
.bar-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; flex-shrink: 0; }

/* Top items list */
.top-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.top-item .rank { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.top-item .name { flex: 1; font-size: 13px; }
.top-item .count { font-weight: 600; font-size: 13px; color: var(--primary); }

/* Payment breakdown */
.payment-bar { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.payment-bar .label { width: 80px; font-size: 12px; }
.payment-bar .bar-bg { flex: 1; height: 20px; background: var(--bg); border-radius: 10px; overflow: hidden; }
.payment-bar .bar-fg { height: 100%; border-radius: 10px; transition: width 0.3s; }
.payment-bar .value { width: 80px; text-align: right; font-size: 12px; font-weight: 600; }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: var(--radius); color: white; font-size: 13px;
    box-shadow: var(--shadow-lg); animation: slideIn 0.3s;
    max-width: 350px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

/* ===== SHIFT INFO ===== */
.shift-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shift-info .shift-stat { text-align: center; }
.shift-info .shift-stat .value { font-size: 20px; font-weight: 700; }
.shift-info .shift-stat .label { font-size: 11px; color: var(--text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app { min-height: auto; height: auto; }
    .main-content { margin-left: 0; min-height: auto; height: auto; }
    .menu-toggle { display: block; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    #pos-step-menu { flex-direction: column !important; }
    .pos-cart-area { width: 100%; max-height: none; }
    .pos-menu-header {
        position: sticky; top: var(--topbar-height); z-index: 40;
        background: var(--bg); padding: 8px 0; margin-bottom: 0;
        border-bottom: 1px solid var(--border);
    }
    .menu-toolbar {
        position: sticky; top: calc(var(--topbar-height) + 52px); z-index: 39;
        background: var(--bg); flex-direction: column; align-items: stretch;
        padding-bottom: 8px; margin-bottom: 8px;
    }
    .toggle-images-label { align-self: flex-end; }
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: none; padding-bottom: 70px;
    }
    .pos-layout { min-height: auto; height: auto; }
    .page { padding-bottom: 70px; }
    .table-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ===== MOBILE CART BAR ===== */
.mobile-cart-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: white; border-top: 2px solid var(--primary); padding: 10px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    align-items: center; justify-content: space-between; gap: 12px;
}
.mcb-info { display: flex; flex-direction: column; gap: 2px; }
.mcb-count { font-size: 12px; color: var(--text-muted); }
.mcb-total { font-size: 18px; font-weight: 700; color: var(--primary); }
.mcb-actions { display: flex; gap: 8px; align-items: center; }
.mcb-more-wrap { position: relative; }
.mcb-more-btn {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
    background: white; font-size: 20px; font-weight: 700; color: var(--text-muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    letter-spacing: 2px;
}
.mcb-more-btn:hover { background: var(--bg); }
.mcb-more-menu {
    position: absolute; bottom: 50px; right: 0; z-index: 210;
    background: white; border-radius: var(--radius); box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border); min-width: 180px; overflow: hidden;
}
.mcb-menu-item {
    display: block; width: 100%; padding: 12px 16px; border: none; background: none;
    text-align: left; font-size: 14px; cursor: pointer; white-space: nowrap;
    transition: background 0.15s;
}
.mcb-menu-item:hover { background: var(--bg); }
.mcb-menu-item:not(:last-child) { border-bottom: 1px solid var(--border); }
.mcb-pay { padding: 10px 24px; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ===== PRINT - 80mm thermal printer ===== */
@media print {
    @page { size: 80mm auto; margin: 0; }
    body * { visibility: hidden; }
    .receipt, .receipt * { visibility: visible; color: #000 !important; }
    .receipt {
        position: absolute; left: 0; top: 0;
        width: 72mm; max-width: 72mm; padding: 2mm;
        font-family: 'Arial Black', 'Helvetica', sans-serif;
        font-size: 11px; font-weight: 900; line-height: 1.4;
    }
    .receipt .receipt-header h3 { font-size: 14px; font-weight: 900; }
    .receipt .receipt-item { font-size: 10px; font-weight: 900; }
    .receipt .receipt-total { font-size: 13px; font-weight: 900; }
    .receipt .receipt-divider { border-top: 2px solid #000 !important; }
    .receipt .receipt-qr img { width: 40mm; }
}
