* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.hamburger-btn:active {
    transform: scale(0.95);
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn:hover span {
    background: #5568d3;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1200;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-nav {
    padding: 10px 0;
}

.nav-item {
    width: 100%;
    padding: 18px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05em;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    border-left-color: #667eea;
}

.nav-item.active {
    background: #e8f0fe;
    border-left-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.5em;
    width: 30px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
    padding-top: 10px;
}

@media (min-width: 768px) {
    .container {
        margin: 20px auto;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        min-height: auto;
        padding-top: 0;
    }
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    position: relative;
    text-align: center;
}

header h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#currentTime {
    font-size: 0.9em;
    opacity: 0.9;
}

@media (min-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }
    
    #currentTime {
        font-size: 1.2em;
    }
}

/* Remove old tabs - now using sidebar */

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tables Grid */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

@media (min-width: 480px) {
    .tables-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (min-width: 768px) {
    .tables-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .tables-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.table-card {
    background: white;
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.table-card:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .table-card {
        padding: 30px;
        min-height: 150px;
    }
    
    .table-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
}

.table-card.available {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.table-card.occupied {
    border-color: #f44336;
    background: #ffebee;
}

.table-card h3 {
    font-size: 1.5em;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .table-card h3 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
}

.table-card .status {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9em;
}

@media (min-width: 768px) {
    .table-card .status {
        padding: 5px 15px;
        margin-top: 10px;
        font-size: 1em;
    }
}

.table-card.available .status {
    background: #4CAF50;
    color: white;
}

.table-card.occupied .status {
    background: #f44336;
    color: white;
}

.table-card .order-count {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
}

@media (min-width: 768px) {
    .table-card .order-count {
        margin-top: 10px;
        font-size: 0.9em;
    }
}

/* Kitchen Orders */
.kitchen-orders {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .kitchen-orders {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .kitchen-orders {
        grid-template-columns: repeat(3, 1fr);
    }
}

.order-card {
    background: #fff3e0;
    border-left: 5px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.order-card.completed {
    background: #e8f5e9;
    border-left-color: #4CAF50;
}

.order-card h3 {
    color: #ff9800;
    margin-bottom: 15px;
}

.order-card.completed h3 {
    color: #4CAF50;
}

.order-item {
    padding: 10px;
    background: white;
    margin: 8px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.order-timestamp {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

.btn-complete {
    margin-top: 15px;
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
    font-weight: 600;
}

.btn-complete:hover {
    background: #45a049;
}

/* Billing Section */
.billing-section {
    max-width: 800px;
    margin: 0 auto;
}

#billTableSelect {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
}

.bill-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.bill-header {
    text-align: center;
    border-bottom: 2px dashed #ddd;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.bill-items {
    margin: 20px 0;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.bill-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px double #333;
}

.bill-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.5em;
    font-weight: bold;
    margin: 10px 0;
}

.btn-print {
    width: 100%;
    padding: 15px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 20px;
}

.btn-print:hover {
    background: #0b7dda;
}

.btn-close-table {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 10px;
}

.btn-close-table:hover {
    background: #45a049;
}

/* Admin indicator badge */
.admin-indicator {
    position: absolute;
    right: 20px;
    top: 18px;
    background: rgba(76,175,80,0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    font-size: 0.95em;
}

@media (max-width: 480px) {
    .admin-indicator { right: 12px; top: 12px; padding: 6px 10px; font-size: 0.85em; }
}

/* Admin toggle button (small testing helper) */
.admin-toggle {
    position: absolute;
    right: 20px;
    top: 56px;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    background: #ccc;
    color: #222;
    font-size: 0.85em;
}

@media (max-width: 480px) {
    .admin-toggle { right: 12px; top: 48px; padding: 5px 8px; font-size: 0.8em; }
}

/* Billing card/button styles to match table status UI */
.billing-card {
    /* will inherit .table-card styles */
}
.billing-card .billing-btn {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.billing-card .billing-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}
.billing-card .billing-btn:hover:not(:disabled) {
    background: #388E3C;
}

/* Improved bill modal / print-friendly styles */
/* Make the bill modal compact and readable for printing */
#billModal .modal-content {
    max-width: 420px;
    width: 92%;
    padding: 18px;
}

#billModal .bill-card {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#billModal .bill-header h2 {
    margin: 0 0 6px 0;
    font-size: 1.1em;
}

#billModal .bill-header p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

#billModal .bill-items { margin: 12px 0; }
#billModal .bill-item { padding: 6px 0; font-size: 0.95em; }
#billModal .bill-item span { display: inline-block; }
#billModal .bill-item span:first-child { width: 70%; color: #333; }
#billModal .bill-item span:last-child { width: 28%; text-align: right; color: #111; }

#billModal .bill-total-row { font-size: 1.1em; }

#billModal .btn-print, #billModal .btn-close-table {
    padding: 10px;
    font-size: 0.95em;
}

/* Print: only show bill content, make it compact */
@media print {
    body * { visibility: hidden; }
    #billModal, #billModal * { visibility: visible; }
    #billModal { position: static; }
    #billModal .modal-content { box-shadow: none; border-radius: 0; width: 100%; max-width: none; padding: 0; }
    #billModal .bill-card { border: none; padding: 8px 12px; }
    .btn-print, .btn-close-table, .close { display: none !important; }
}

/* QR Code Grid */
.qr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 480px) {
    .qr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .qr-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .qr-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.qr-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.qr-card h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.qr-code {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.btn-download {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-download:hover {
    background: #5568d3;
}

/* Modal (polished) */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(4,8,20,0.5);
    backdrop-filter: blur(4px) saturate(1.05);
    animation: modalFadeIn .22s ease-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,251,0.98));
    margin: 6vh auto;
    padding: 18px;
    border-radius: 14px;
    width: 92%;
    max-width: 720px;
    box-shadow: 0 18px 60px rgba(15,23,42,0.35);
    max-height: calc(100vh - 12vh);
    overflow-y: auto;
    position: relative;
    transform-origin: center top;
    animation: modalPop .18s cubic-bezier(.2,.9,.2,1) both;
}

@media (min-width: 768px) {
    .modal-content { padding: 22px; border-radius: 16px; }
}

@keyframes modalFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(.985) } to { opacity: 1; transform: translateY(0) scale(1) } }

.modal .modal-close, .modal .modal-close:focus {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.06);
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 1.05em;
}

.modal .modal-close:hover { background: rgba(0,0,0,0.09); }

.modal .modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.modal .modal-header h3 { margin:0; font-size:1.15em; color:#111; }

.modal .addons-list label { display:flex; align-items:center; gap:10px; padding:10px 8px; border-radius:8px; cursor:pointer; }
.modal .addons-list input[type=checkbox] { width:18px; height:18px; accent-color: var(--primary); }
.modal .addons-list .addon-name { flex:1; font-weight:600; color:#222; }
.modal .addons-list .addon-price { color:var(--muted); font-size:0.95em; }

.modal .modal-footer { display:flex; gap:10px; justify-content:flex-end; margin-top:14px; }
.modal .btn-primary { padding:10px 14px; border-radius:10px; font-weight:700; }


.menu-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

@media (min-width: 480px) {
    .menu-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .menu-section {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin: 20px 0;
    }
}

@media (min-width: 1024px) {
    .menu-section {
        grid-template-columns: repeat(5, 1fr);
    }
}

.menu-item {
    background: #f5f5f5;
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-item:active {
    transform: scale(0.95);
    border-color: #667eea;
}

@media (min-width: 768px) {
    .menu-item {
        padding: 20px;
        min-height: 120px;
    }
    
    .menu-item:hover {
        transform: scale(1.05);
        border-color: #667eea;
    }
}

.menu-item h4 {
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95em;
}

@media (min-width: 768px) {
    .menu-item h4 {
        margin-bottom: 10px;
        font-size: 1em;
    }
}

.menu-item .price {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.1em;
}

@media (min-width: 768px) {
    .menu-item .price {
        font-size: 1.2em;
    }
}

.order-summary {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.order-summary h3 {
    margin-bottom: 15px;
}

#currentOrder {
    min-height: 100px;
    margin-bottom: 15px;
}

.order-item-summary {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    margin: 5px 0;
    border-radius: 5px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-submit:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .btn-submit {
        font-size: 1.2em;
    }
    
    .btn-submit:hover {
        background: #45a049;
    }
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Daily Report */
.report-section {
    max-width: 1200px;
    margin: 0 auto;
}

.report-header {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.report-date {
    display: flex;
    gap: 15px;
    align-items: center;
}

.report-date label {
    font-weight: 600;
    font-size: 1.1em;
}

.report-date input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.btn-today {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
}

.btn-today:hover {
    background: #5568d3;
}

.report-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .report-summary {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.summary-card.green {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.summary-card.blue {
    background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
}

.summary-card.orange {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.summary-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.summary-card .value {
    font-size: 2.5em;
    font-weight: bold;
}

.report-details {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.report-details h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

@media (min-width: 768px) {
    .sales-table {
        font-size: 1em;
    }
}

.sales-table th,
.sales-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

@media (min-width: 768px) {
    .sales-table th,
    .sales-table td {
        padding: 15px;
    }
}

.sales-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sales-table tr:hover {
    background: #f9f9f9;
}

.sales-table .text-right {
    text-align: right;
}

.sales-table .text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.2em;
}

.btn-export {
    margin-top: 20px;
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
}

.btn-export:hover {
    background: #45a049;
}

.btn-clear-history {
    margin-top: 20px;
    padding: 12px 25px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-left: 10px;
}

.btn-clear-history:hover {
    background: #da190b;
}

/* Menu Management */
.menu-management {
    max-width: 1200px;
    margin: 0 auto;
}

.add-menu-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.add-menu-section h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .form-group {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 15px;
        align-items: center;
    }
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-add-menu {
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
}

.btn-add-menu:hover {
    background: #45a049;
}

.menu-list-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
}

.menu-list-section h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.menu-category-section {
    margin-bottom: 30px;
}
.menu-category-title {
    font-size: 1.45em;
    color: var(--primary);
    margin: 18px 0 8px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Slight padding so header and items feel grouped */
.menu-category-section {
    margin-bottom: 30px;
    padding: 8px 6px 18px 6px;
    border-radius: 8px;
}

.menu-item-card {
    background: #ffffff;
    padding: 12px 18px;
    margin: 10px 0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 14px rgba(16,24,40,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

/* Modal-specific: make categories full-width and items stacked vertically */
#orderModal .menu-section {
    display: block;
    padding: 6px 0 18px 0;
}

#orderModal .menu-category-section {
    width: 100%;
    margin-bottom: 20px;
    padding: 6px 0 12px 0;
}

#orderModal .menu-category-section .menu-item-card {
    display: flex;
    width: 100%;
    margin: 10px 0;
}

#orderModal .menu-category-title {
    margin: 0 0 12px 0;
    padding-bottom: 10px;
}

.menu-item-info {
    flex: 1;
}

.menu-item-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.menu-item-category {
    font-size: 0.9em;
    color: #999;
}

.menu-item-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
    margin: 0 20px;
}

.menu-item-actions {
    display: flex;
    gap: 10px;
}

.btn-edit-menu,
.btn-delete-menu {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-edit-menu {
    background: #2196F3;
    color: white;
}

.btn-edit-menu:hover {
    background: #0b7dda;
}

.btn-delete-menu {
    background: #f44336;
    color: white;
}

.btn-delete-menu:hover {
    background: #da190b;
}

/* Edit Menu Modal */
.edit-menu-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.edit-menu-form input,
.edit-menu-form select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

@media print {
    body * {
        visibility: hidden;
    }
    .bill-card, .bill-card * {
        visibility: visible;
    }
    .bill-card {
        position: absolute;
        left: 0;
        top: 0;
    }
    .btn-print, .btn-close-table {
        display: none;
    }
}

/* Menu Edit Modal tweaks */
#menuEditModal .modal-content {
    max-width: 560px;
    width: 92%;
    padding: 18px;
    border-radius: 12px;
}

#menuEditModal .modal-content h3 {
    margin: 0 0 10px 0;
    color: #333;
}

#menuEditModal .modal-content input,
#menuEditModal .modal-content select {
    width: 100%;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1em;
}

#menuEditModal #saveMenuEditBtn {
    padding: 10px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

#menuEditModal #saveMenuEditBtn:hover {
    background: #45a049;
}

#menuEditModal .modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    background: transparent;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
}

/* Clickable / Not-clickable table styles */
.table-card.not-clickable {
    opacity: 0.55;
    filter: grayscale(40%);
    pointer-events: none;
    box-shadow: none;
    transform: none !important;
}

.table-card.clickable {
    cursor: pointer;
}

.table-card.clickable:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

@media (prefers-reduced-motion: reduce) {
    .table-card.clickable:hover { transform: none; box-shadow: none; }
}

/* Customer mode: hide admin chrome and make order modal primary */
body.customer-mode .sidebar,
body.customer-mode .hamburger-btn,
body.customer-mode .nav-item,
body.customer-mode .sidebar-overlay,
body.customer-mode header {
    display: none !important;
}

/* Dim the main container but keep order modal interactive */
body.customer-mode .container { opacity: 0.45; pointer-events: none; }
body.customer-mode #orderModal { pointer-events: auto; opacity: 1; }
body.customer-mode #orderModal .modal-content { z-index: 10001; }

/* Ensure bill/order modal remains visible above dimmed content */
body.customer-mode .modal { z-index: 10000; }

/* ================== UI Polish Additions ================== */
:root{
    --primary: #667eea;
    --primary-600: #5568d3;
    --accent: #4CAF50;
    --danger: #f44336;
    --muted: #666;
    --surface: #ffffff;
    --glass: rgba(255,255,255,0.85);

    /* Button tokens */
    --btn-padding: 10px 16px;
    --btn-radius: 12px;
    --btn-shadow: 0 8px 30px rgba(16,24,40,0.06);
    --btn-color-contrast: #fff;
}

/* Enhanced button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: var(--btn-padding);
    border-radius: var(--btn-radius);
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: var(--btn-color-contrast);
    background: var(--primary);
    box-shadow: var(--btn-shadow);
    transition: transform .16s cubic-bezier(.2,.9,.2,1), box-shadow .16s ease, filter .12s ease;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.btn svg { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; }

.btn:active { transform: translateY(1px) scale(.998); box-shadow: 0 6px 16px rgba(16,24,40,0.06); }
.btn:focus { outline: none; box-shadow: 0 6px 20px rgba(100,116,255,0.14); }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; filter: grayscale(.04); box-shadow: none; }

/* Primary (gradient) */
.btn-primary {
    background: linear-gradient(90deg,var(--primary), #764ba2);
    color: var(--btn-color-contrast);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(15,23,42,0.12); }

/* Accent */
.btn-accent {
    background: linear-gradient(90deg, var(--accent), #3fa34a);
    color: var(--btn-color-contrast);
}
.btn-accent:hover { transform: translateY(-2px); filter: brightness(.98); box-shadow: 0 12px 30px rgba(76,175,80,0.08); }

/* Danger */
.btn-danger {
    background: linear-gradient(90deg, var(--danger), #d83629);
    color: var(--btn-color-contrast);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(244,67,54,0.08); }

/* Ghost / outline */
.btn-ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: none;
    color: #222;
}
.btn-ghost:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16,24,40,0.04); }

/* Small / icon variants */
.btn-sm { padding: 8px 10px; font-size: 0.95em; border-radius: 10px; }
.btn-lg { padding: 12px 20px; font-size: 1.05em; border-radius: 14px; }

/* Utility: full width */
.btn-block { width: 100%; display: inline-flex; justify-content: center; }

/* When an addons modal is open, add color accents to primary/accent buttons
   and apply a gentle pulsing/highlight to draw attention. */
body.addons-modal-open .btn-primary {
    background: linear-gradient(90deg,#ff8a65,#ff5e9e);
    box-shadow: 0 20px 50px rgba(255,94,158,0.12);
    transform: translateY(-2px);
    animation: btnPulse 2.4s ease-in-out infinite;
}

body.addons-modal-open .btn-accent {
    background: linear-gradient(90deg,#ffd54f,#ffb74d);
    color: #111;
    box-shadow: 0 16px 40px rgba(255,183,77,0.08);
}

@keyframes btnPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.06); }
    100% { filter: brightness(1); }
}

/* Optionally highlight only specific buttons (use class `highlight-when-modal`) */
.highlight-when-modal { transition: all .18s ease; }
body.addons-modal-open .highlight-when-modal { transform: translateY(-2px); filter: saturate(1.05); }

/* Modal header / footer helpers */
.modal .modal-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.modal .modal-header h3{ margin:0; font-size:1.15em; color:#222; }
.modal .modal-footer{ display:flex; gap:10px; justify-content:flex-end; margin-top:14px; }

/* Menu cards - clearer layout */
.menu-item-card{ display:flex; align-items:center; gap:12px; padding:14px 18px; }
.menu-item-info{ flex:1; }
.menu-item-price{ margin:0; min-width:92px; text-align:right; }
.menu-item-actions button{ min-width:44px; padding:8px 10px; }

/* Addons list styling */
#addonsList, .addons-list{ display:flex; flex-direction:column; gap:8px; }
.addon-row{ display:flex; justify-content:space-between; gap:10px; align-items:center; padding:8px; background:var(--surface); border-radius:8px; border:1px solid rgba(0,0,0,0.04); box-shadow: 0 3px 10px rgba(16,24,40,0.04); }
.addon-row small{ color:var(--muted); }
.remove-addon-btn{ background: transparent; border: 1px solid rgba(0,0,0,0.06); padding:6px 8px; border-radius:6px; color:var(--danger); cursor:pointer; }

/* Order summary polish */
.order-summary{ background: linear-gradient(180deg,#fbfbff,#f7f8ff); border:1px solid rgba(102,126,234,0.08); padding:16px; border-radius:12px; }
.order-item-summary{ display:flex; gap:12px; align-items:flex-start; padding:12px; background:var(--surface); border-radius:10px; box-shadow: 0 6px 18px rgba(16,24,40,0.04); }
.order-item-summary .item-left{ flex:1; }
.order-item-summary .item-right{ min-width:120px; text-align:right; }
.order-item-summary .addons-list-compact{ margin-top:8px; font-size:0.95em; color:var(--muted); }

/* Responsive tweaks */
@media (max-width: 600px){
    .menu-section{ grid-template-columns: repeat(2,1fr); }
    .modal-content{ padding:14px; border-radius:12px; }
    .order-item-summary{ flex-direction:column; align-items:stretch; }
    .order-item-summary .item-right{ text-align:left; }
}

/* Small accessibility improvements */
.btn:focus, button:focus, input:focus, select:focus{ outline: 3px solid rgba(102,126,234,0.18); outline-offset: 2px; }

/* End UI Polish */

/* Smaller modal for items with addons (approx 50% of default on desktop) */
.modal-content.addons-small {
    width: 45% !important;
    max-width: 600px !important;
}

@media (max-width: 767px) {
    /* On small screens keep full-width for usability */
    .modal-content.addons-small { width: 92% !important; max-width: none !important; }
}

/* Mobile-friendly tweaks for Menu Management */
@media (max-width: 520px) {
    .menu-list-section { padding: 12px; }
    .menu-category-title { font-size: 1.25em; padding-bottom: 8px; }
    .menu-item-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
    .menu-item-info { width: 100%; }
    .menu-item-name { font-size: 1.05em; }
    .menu-item-price { font-size: 1.15em; margin: 6px 0 0 0; color: #4CAF50; }
    .menu-item-actions { width: 100%; display: flex; gap: 10px; justify-content: flex-end; }
    .btn-edit-menu, .btn-delete-menu { min-width: 56px; padding: 10px 12px; font-size: 0.95em; border-radius: 10px; }
    .menu-category-section { padding: 6px 4px 12px 4px; }
}

/* Touch-target improvements for small screens */
@media (max-width: 520px) {
    .btn-edit-menu, .btn-delete-menu, .btn-add-menu { padding: 12px 14px; font-size: 1em; }
}

/* Hide the redundant small category label inside menu cards on admin list */
.menu-list-section .menu-item-category { display: none !important; }
