/* ============================
   Restaurant POS System Styles
   ============================ */

:root {
    --primary: #E65100;
    --primary-dark: #BF360C;
    --primary-light: #FF8A65;
    --secondary: #1565C0;
    --success: #2E7D32;
    --warning: #F9A825;
    --danger: #C62828;
    --info: #0277BD;
    --dark: #212121;
    --gray: #757575;
    --light-gray: #EEEEEE;
    --white: #FFFFFF;
    --bg: #F5F5F5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Sarabun', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container-fluid { padding: 0 16px; }

/* ---- Navbar ---- */
.navbar {
    background: var(--primary);
    color: var(--white);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    gap: 8px;
}
.navbar .brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.navbar .nav-right-desktop { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: nowrap; }
.navbar .nav-link-desktop {
    color: rgba(255,255,255,0.85);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.navbar .nav-link-desktop:hover,
.navbar .nav-link-desktop.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}
.navbar .user-info { font-size: 0.85rem; opacity: 0.9; white-space: nowrap; }
.navbar .btn-logout {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}
.navbar .btn-logout:hover { background: rgba(255,255,255,0.3); }

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: #2c3e6b;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin: 16px 16px 0 16px;
    font-family: inherit;
}
.mobile-menu-btn:active { background: #1a2a4a; }

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* Sidebar Drawer - Dark Blue Theme */
.sidebar-drawer {
    display: none;
    position: fixed;
    top: 0; left: -300px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #1e3058 0%, #263d6a 100%);
    z-index: 1200;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sidebar-drawer.open { left: 0; }

.sidebar-header {
    padding: 24px 20px 20px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.sidebar-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.sidebar-close:hover { color: #fff; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}
.sidebar-link {
    display: block;
    padding: 14px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    margin-bottom: 2px;
}
.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.sidebar-link.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px 24px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user-info {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}
.sidebar-logout {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.sidebar-logout:hover {
    background: rgba(231,76,60,0.8);
    color: #fff;
}

/* Notification badge */
.notif-badge {
    position: relative;
    display: inline-block;
}
.notif-badge .badge {
    position: absolute;
    top: -6px; right: -10px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    gap: 4px;
}
.lang-switch a {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3);
}
.lang-switch a.active {
    background: var(--white);
    color: #1F4E79;
    border-color: var(--white);
}

/* ---- Page Content ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 16px;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-content { padding: 20px 0; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}
.card-header h2 { font-size: 1.1rem; font-weight: 600; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}
.stat-card .stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--gray); margin-top: 4px; }
.stat-card.blue .stat-value { color: var(--secondary); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.orange .stat-value { color: var(--warning); }
.stat-card.red .stat-value { color: var(--danger); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: #0D47A1; color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #1B5E20; color: var(--white); }
.btn-warning { background: var(--warning); color: var(--dark); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #B71C1C; color: var(--white); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}
.form-control {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
}
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-inline {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}
.form-inline .form-group {
    margin-bottom: 0;
}
.form-inline .form-control {
    width: auto;
}
.form-inline .btn {
    height: 42px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .form-inline {
        display: block;
    }
    .form-inline .form-group {
        margin-bottom: 8px;
    }
    .form-inline .form-control {
        width: 90%;
        display: block;
    }
    .form-inline .btn {
        width: 100%;
        margin-top: 4px;
    }
}

/* ---- Tables ---- */
.table-responsive { overflow-x: auto; }
table.table {
    width: 100%;
    border-collapse: collapse;
}
table.table th,
table.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}
table.table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table.table tbody tr:hover { background: #FAFAFA; }
table.table .text-right { text-align: right; }
table.table .text-center { text-align: center; }

/* ---- Status Badges ---- */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-pending { background: #FFF3E0; color: #E65100; }
.badge-confirmed { background: #E3F2FD; color: #1565C0; }
.badge-cooking { background: #FFF8E1; color: #F57F17; }
.badge-ready { background: #E8F5E9; color: #2E7D32; }
.badge-served { background: #F3E5F5; color: #7B1FA2; }
.badge-completed { background: #E0F2F1; color: #00695C; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }
.badge-active { background: #E8F5E9; color: #2E7D32; }
.badge-inactive { background: #ECEFF1; color: #546E7A; }

/* ---- Alert/Flash Messages ---- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border-left: 4px solid var(--success); }
.alert-error { background: #FFEBEE; color: #B71C1C; border-left: 4px solid var(--danger); }
.alert-warning { background: #FFF8E1; color: #E65100; border-left: 4px solid var(--warning); }
.alert-info { background: #E3F2FD; color: #0D47A1; border-left: 4px solid var(--info); }

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---- Menu Card ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.menu-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s;
}
.menu-card:hover { transform: translateY(-4px); }
.menu-card .menu-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--light-gray);
}
.menu-card .menu-body { padding: 14px; }
.menu-card .menu-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}
.menu-card .menu-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.menu-card .menu-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}
.menu-card .menu-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.menu-card .menu-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: #FFEBEE;
    color: var(--danger);
    font-weight: 600;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 20px;
}
.category-tabs .tab {
    padding: 8px 20px;
    border-radius: 24px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--light-gray);
    color: var(--gray);
    border: none;
    transition: all 0.2s;
}
.category-tabs .tab.active,
.category-tabs .tab:hover {
    background: var(--primary);
    color: var(--white);
}

/* ---- Cart ---- */
.cart-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 16px 20px;
    z-index: 900;
    border-radius: 20px 20px 0 0;
}
.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-count {
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.cart-total { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

/* Quantity Control */
.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
}
.qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
}
.qty-control button:hover { background: var(--light-gray); }
.qty-control .qty-value {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    background: transparent;
}

/* ---- Order Cards (Kitchen/Server) ---- */
.order-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.order-card .order-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border-bottom: 1px solid var(--light-gray);
}
.order-card .order-header .order-num { font-weight: 700; font-size: 1rem; }
.order-card .order-header .order-table {
    background: var(--secondary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}
.order-card .order-body { padding: 16px; }
.order-card .order-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--light-gray);
}
.order-card .order-item:last-child { border-bottom: none; }
.order-card .order-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #FAFAFA;
}
.order-card .order-time {
    font-size: 0.8rem;
    color: var(--gray);
}
.order-card.status-pending { border-left: 4px solid var(--warning); }
.order-card.status-confirmed { border-left: 4px solid var(--secondary); }
.order-card.status-cooking { border-left: 4px solid #FF6F00; }
.order-card.status-ready { border-left: 4px solid var(--success); }

/* ---- Table Grid (Server) ---- */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.table-tile {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.table-tile:hover { border-color: var(--primary); }
.table-tile .table-num { font-size: 1.4rem; font-weight: 700; }
.table-tile .table-seats { font-size: 0.8rem; color: var(--gray); }
.table-tile.occupied {
    background: #FFF3E0;
    border-color: var(--primary);
}
.table-tile.occupied .table-num { color: var(--primary); }
.table-tile .table-code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 6px;
    letter-spacing: 2px;
}

/* ---- Table Summary Bar ---- */
.table-summary-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.summary-item {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    border: 1px solid var(--light-gray);
}
.summary-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--dark);
}
.summary-label {
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.summary-active .summary-num { color: #E65100; }
.summary-active { border-left: 3px solid #E65100; }
.summary-available .summary-num { color: #2E7D32; }
.summary-available { border-left: 3px solid #2E7D32; }

/* Table Badges (Occupied / Available) */
.badge-occupied { background: #FFF3E0; color: #E65100; }
.badge-available { background: #E8F5E9; color: #2E7D32; }

/* Table Actions (wrapping on mobile) */
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.table-actions .btn { white-space: nowrap; }

/* ---- Landing Page ---- */
.landing-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
}
.landing-hero-img {
    display: block;
    width: 100%;
    height: 60vh;
    min-height: 350px;
    object-fit: cover;
    object-position: center;
}
@media (min-width: 1025px) {
    .landing-hero-img {
        height: auto;
        min-height: 300px;
        max-height: 70vh;
        object-fit: cover;
        object-position: center;
    }
}
.landing-info {
    padding: 24px 0;
}
.landing-info .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.landing-info .info-card {
    text-align: center;
    padding: 14px 10px;
}
.landing-info .info-card .icon { font-size: 1.5rem; margin-bottom: 6px; }
.landing-info .info-card h3 { font-size: 0.92rem; margin-bottom: 4px; }
.landing-info .info-card p { color: var(--gray); font-size: 0.82rem; line-height: 1.4; }

/* ---- Landing Info V2 (vertical list) ---- */
.landing-info-v2 {
    background: linear-gradient(180deg, #a8c8e8 0%, #7badd4 100%);
    padding: 28px 0;
}
.landing-info-v2 .info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.landing-info-v2 .info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.landing-info-v2 .info-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    line-height: 1;
    margin-top: 2px;
}
.landing-info-v2 .info-content {
    flex: 1;
    min-width: 0;
}
.landing-info-v2 .info-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.landing-info-v2 .info-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
    line-height: 1.4;
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.login-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-box h1 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
}
.login-box .logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 120px;
}

/* ---- Scan / Activation Page ---- */
.activation-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    padding: 20px;
}
.activation-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 420px;
}
.activation-box h2 { margin-bottom: 8px; }
.activation-box .table-label {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
}
.code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}
.code-input input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}
.code-input input:focus { border-color: var(--primary); outline: none; }
.generated-code {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--primary);
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin: 12px 0 20px;
    display: inline-block;
    user-select: all;
}

/* ---- Bill Page ---- */
.bill-card {
    max-width: 500px;
    margin: 20px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}
.bill-card .bill-header { text-align: center; border-bottom: 2px dashed var(--gray); padding-bottom: 16px; margin-bottom: 16px; }
.bill-card .bill-items { margin-bottom: 16px; }
.bill-card .bill-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted var(--light-gray);
}
.bill-card .bill-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    padding-top: 12px;
    border-top: 2px solid var(--dark);
    color: var(--primary);
}
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}
.payment-method-btn {
    padding: 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}
.payment-method-btn:hover,
.payment-method-btn.active {
    border-color: var(--primary);
    background: #FFF3E0;
}
.payment-method-btn .icon { font-size: 1.5rem; margin-bottom: 6px; }
.payment-method-btn .label { font-size: 0.85rem; font-weight: 600; }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- Loading Spinner ---- */
.spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast Notification ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar { display: none; }
    .mobile-menu-btn { display: block; }
    .sidebar-drawer { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .payment-methods { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .table-grid { grid-template-columns: repeat(3, 1fr); }
    .table-summary-bar { gap: 8px; }
    .summary-item { padding: 12px 8px; }
    .summary-num { font-size: 1.5rem; }
    .summary-label { font-size: 0.68rem; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 16px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ==============================
   Landing Page — Menu Section
   ============================== */
.landing-menu-section {
    padding: 60px 0;
    background: #fff;
}
.landing-menu-header {
    text-align: center;
    margin-bottom: 32px;
}
.landing-menu-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.landing-menu-subtitle {
    font-size: 1rem;
    color: var(--gray);
}

/* Category Filter Pills */
.landing-cat-filter {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.landing-cat-btn {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 500;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid #e0e0e0;
}
.landing-cat-btn:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}
.landing-cat-btn.active {
    background: #1F4E79;
    color: #fff;
    border-color: #1F4E79;
}

/* Menu Grid */
.landing-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.landing-menu-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.landing-menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.landing-menu-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-gray);
}
.landing-menu-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #f8f8f8, #eee);
}
.landing-menu-body {
    padding: 16px;
}
.landing-menu-cat-label {
    display: none;
}
.landing-menu-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 4px;
}
.landing-menu-desc {
    font-size: 0.80rem;
    color: #999;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
}
.landing-menu-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.landing-menu-info {
    flex: 1;
    min-width: 0;
}
.landing-menu-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}

/* Pagination */
.landing-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.landing-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    background: #fff;
    border: 1.5px solid var(--light-gray);
    text-decoration: none;
    transition: all 0.15s;
}
.landing-page-btn:hover {
    background: var(--light-gray);
    color: var(--dark);
}
.landing-page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Responsive — Landing Menu */
@media (max-width: 768px) {
    .landing-menu-section {
        padding: 40px 0;
    }
    .landing-menu-header h2 {
        font-size: 1.5rem;
    }
    .landing-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .landing-menu-img {
        height: 150px;
    }
    .landing-menu-body {
        padding: 12px;
    }
    .landing-menu-name {
        font-size: 0.85rem;
        font-weight: 700;
    }
    .landing-menu-desc {
        font-size: 0.60rem;
        font-weight: 300;
        color: #999;
    }
    .landing-menu-price {
        font-size: 0.78rem;
    }
}
@media (max-width: 480px) {
    .landing-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .landing-menu-img {
        height: 120px;
    }
    .landing-menu-body {
        padding: 10px;
    }
    .landing-menu-cat-label {
        display: none;
    }
    .landing-menu-name {
        font-size: 0.8rem;
        font-weight: 700;
    }
    .landing-menu-desc {
        display: block;
        font-size: 0.67rem;
        font-weight: 300;
        color: #aaa;
    }
    .landing-menu-price {
        font-size: 0.72rem;
    }
    .landing-cat-filter {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .landing-cat-btn {
        padding: 6px 16px;
        font-size: 0.82rem;
    }
}


/* ============================================
   ADMIN LAYOUT — Dark Navy Sidebar Theme
   ============================================ */

.admin-layout {
    --navy-950: #060b18;
    --navy-900: #0b1425;
    --navy-800: #111d35;
    --navy-700: #1a2d4f;
    --navy-600: #243a5e;
    --navy-500: #3a5280;
    --navy-400: #5a7aad;
    --navy-300: #8aa4cc;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #60a5fa;
    --admin-bg: #f0f4f8;
    --admin-card: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
    --admin-sidebar-w: 260px;
    font-family: 'Inter', 'Sarabun', 'Segoe UI', sans-serif;
    background: var(--admin-bg);
}

/* Hide old navbar/mobile elements in admin layout */
.admin-layout .navbar { display: none !important; }
.admin-layout .mobile-menu-btn { display: none !important; }
.admin-layout .sidebar-drawer { display: none !important; }
.admin-layout .sidebar-overlay { display: none !important; }

/* ---- Sidebar ---- */
.admin-sidebar {
    display: none; /* hidden by default (mobile-first) */
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
    z-index: 1200;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}
.admin-sidebar.open {
    display: flex;
}
.admin-sidebar-close {
    display: block;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: var(--navy-700); border-radius: 4px; }

.admin-sidebar-header {
    padding: 24px 20px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.admin-sidebar-brand {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-sidebar-brand .brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.admin-sidebar-close:hover { color: #fff; }

.admin-sidebar-role {
    padding: 2px 24px 16px;
    font-size: 0.78rem;
    color: var(--navy-400);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Sidebar Nav */
.admin-sidebar-nav {
    flex: 1;
    padding: 0 12px;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    color: var(--navy-300);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.15s ease;
    text-decoration: none;
}
.admin-nav-item:hover {
    background: var(--navy-700);
    color: #e2e8f0;
}
.admin-nav-item.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
}
.admin-nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.admin-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Footer */
.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}
.admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.admin-user-name {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.admin-user-role {
    color: var(--navy-400);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-logout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background: rgba(255,255,255,0.04);
    color: var(--navy-300);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.06);
}
.admin-logout-btn:hover {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border-color: rgba(239,68,68,0.2);
}

/* ---- Main Content Area ---- */
.admin-main {
    margin-left: 0; /* mobile-first: no sidebar offset */
    min-height: 100vh;
}

/* ---- Top Bar (hidden on mobile by default) ---- */
.admin-topbar {
    display: none; /* mobile-first: hidden */
}

/* ---- Mobile Menu Button (shown by default) ---- */
.admin-mobile-menu {
    display: block;
    padding: 16px 16px 0;
    text-align: left;
}
.admin-sidebar-toggle {
    background: var(--navy-900);
    border: none;
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 12px;
    transition: background 0.15s;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.admin-sidebar-toggle:active { background: var(--navy-800); }
.admin-sidebar-toggle .toggle-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ---- Sidebar Extras (notif + lang inside sidebar) ---- */
.admin-sidebar-extras {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.admin-sidebar-notif {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--navy-300);
    font-size: 0.9rem;
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
}
.admin-sidebar-notif .admin-notif-badge {
    position: static;
    margin-left: auto;
}
.admin-sidebar-lang {
    display: flex;
    gap: 6px;
    padding: 4px 16px;
}
.admin-sidebar-lang a {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: all 0.15s;
}
.admin-sidebar-lang a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}
.admin-sidebar-lang a:hover:not(.active) {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
}

/* Admin lang switch overrides */
.admin-layout .lang-switch a {
    color: var(--admin-text-muted);
    border: 1px solid var(--admin-border);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s;
}
.admin-layout .lang-switch a.active {
    background: var(--navy-900);
    color: #fff;
    border-color: var(--navy-900);
}
.admin-layout .lang-switch a:hover:not(.active) {
    background: var(--admin-border);
}

/* ---- Admin Content ---- */
.admin-content {
    padding: 28px;
}
.admin-content .container {
    max-width: 1280px;
}

/* ---- Overlay (mobile) ---- */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.admin-overlay.open { display: block; }

/* ============================================
   Admin Component Overrides (minimal style)
   ============================================ */

/* Page Header */
.admin-layout .page-header {
    margin: 0 0 24px;
}
.admin-layout .page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}
.admin-layout .page-header .text-muted {
    color: var(--admin-text-muted);
    font-size: 0.85rem;
}

/* Cards */
.admin-layout .card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 14px;
}
.admin-layout .card-header {
    border-bottom-color: var(--admin-border);
}
.admin-layout .card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
}

/* Stat Cards */
.admin-layout .stat-card {
    background: var(--admin-card);
    border: 1.5px solid var(--admin-border);
    box-shadow: none;
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    transition: box-shadow 0.2s, transform 0.2s;
}
.admin-layout .stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.admin-layout .stat-card .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    text-align: left;
}
.admin-layout .stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--admin-text);
    text-align: left;
}
.admin-layout .stat-card .stat-label {
    font-size: 0.82rem;
    margin-top: 6px;
    font-weight: 600;
    text-align: left;
}

/* Colored tinted stat cards (matching reference pastel style) */
.admin-layout .stat-card:nth-child(1) {
    background: #eef3ff;
    border-color: #d4dff7;
}
.admin-layout .stat-card:nth-child(1) .stat-value { color: #2563eb; }
.admin-layout .stat-card:nth-child(1) .stat-label { color: #3b82f6; }

.admin-layout .stat-card:nth-child(2),
.admin-layout .stat-card.green {
    background: #ecfdf5;
    border-color: #c6f6d5;
}
.admin-layout .stat-card:nth-child(2) .stat-value,
.admin-layout .stat-card.green .stat-value { color: #059669; }
.admin-layout .stat-card:nth-child(2) .stat-label,
.admin-layout .stat-card.green .stat-label { color: #10b981; }

.admin-layout .stat-card:nth-child(3),
.admin-layout .stat-card.blue {
    background: #faf0ff;
    border-color: #e8d4f7;
}
.admin-layout .stat-card:nth-child(3) .stat-value,
.admin-layout .stat-card.blue .stat-value { color: #7c3aed; }
.admin-layout .stat-card:nth-child(3) .stat-label,
.admin-layout .stat-card.blue .stat-label { color: #8b5cf6; }

.admin-layout .stat-card:nth-child(4),
.admin-layout .stat-card.red {
    background: #fff7ed;
    border-color: #fde4c8;
}
.admin-layout .stat-card:nth-child(4) .stat-value,
.admin-layout .stat-card.red .stat-value { color: #ea580c; }
.admin-layout .stat-card:nth-child(4) .stat-label,
.admin-layout .stat-card.red .stat-label { color: #f97316; }

.admin-layout .stat-card.orange .stat-value { color: #f59e0b; }
.admin-layout .stat-card.orange .stat-label { color: #f59e0b; }

/* Tables */
.admin-layout table.table th {
    background: #f8fafc;
    color: var(--admin-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
}
.admin-layout table.table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    color: var(--admin-text);
}
.admin-layout table.table tbody tr {
    transition: background 0.1s;
}
.admin-layout table.table tbody tr:hover {
    background: #f8fafc;
}

/* Buttons */
.admin-layout .btn-primary {
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
}
.admin-layout .btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}
.admin-layout .btn-success {
    background: #10b981;
    border-radius: 10px;
}
.admin-layout .btn-success:hover {
    background: #059669;
    color: #fff;
}
.admin-layout .btn-danger {
    background: #ef4444;
    border-radius: 10px;
}
.admin-layout .btn-danger:hover {
    background: #dc2626;
    color: #fff;
}
.admin-layout .btn-outline {
    border: 1.5px solid var(--admin-border);
    color: var(--admin-text-muted);
    border-radius: 10px;
    background: transparent;
}
.admin-layout .btn-outline:hover {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

/* Forms */
.admin-layout .form-control {
    border: 1.5px solid var(--admin-border);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}
.admin-layout .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.admin-layout .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

/* Alerts */
.admin-layout .alert {
    border-radius: 12px;
    border-left-width: 4px;
    font-size: 0.88rem;
}

/* Badges */
.admin-layout .badge-status {
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Order Cards */
.admin-layout .order-card {
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 14px;
}
.admin-layout .order-card .order-header {
    background: #f8fafc;
    border-bottom-color: var(--admin-border);
}

/* Modals */
.admin-layout .modal {
    border-radius: 16px;
    border: 1px solid var(--admin-border);
}
.admin-layout .modal-header {
    border-bottom-color: var(--admin-border);
}
.admin-layout .modal-footer {
    border-top-color: var(--admin-border);
}

/* Menu Cards in Admin */
.admin-layout .menu-card {
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-radius: 14px;
}
.admin-layout .menu-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.admin-layout .menu-card .menu-price {
    color: var(--accent);
}

/* Table Tiles */
.admin-layout .table-tile {
    border: 1.5px solid var(--admin-border);
    border-radius: 14px;
    transition: all 0.2s;
}
.admin-layout .table-tile:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(59,130,246,0.1);
    transform: translateY(-2px);
}
.admin-layout .table-tile.occupied {
    background: #fff7ed;
    border-color: #fb923c;
}
.admin-layout .table-tile.occupied .table-num {
    color: #E65100;
}

/* Summary Bar in Admin */
.admin-layout .table-summary-bar .summary-item {
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.admin-layout .summary-active { border-left: 3px solid #fb923c; }

/* Badge overrides */
.admin-layout .badge-occupied { background: #fff7ed; color: #E65100; }
.admin-layout .badge-available { background: #ecfdf5; color: #059669; }

/* Category Tabs */
.admin-layout .category-tabs .tab {
    border-radius: 10px;
    font-weight: 600;
}
.admin-layout .category-tabs .tab.active,
.admin-layout .category-tabs .tab:hover {
    background: var(--navy-900);
    color: #fff;
}

/* ============================================
   Admin Responsive — Desktop overrides
   ============================================ */

/* Desktop: show sidebar permanently, hide mobile menu */
@media (min-width: 1025px) {
    .admin-sidebar {
        display: flex;
        width: var(--admin-sidebar-w);
        max-width: none;
        transition: transform 0.25s ease, width 0.25s ease;
    }
    .admin-sidebar-close {
        display: none;
    }
    .admin-main {
        margin-left: var(--admin-sidebar-w);
        transition: margin-left 0.25s ease;
    }
    .admin-topbar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 1000;
        height: 42px;
        background: rgba(255,255,255,0.8);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--admin-border);
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }
    .admin-mobile-menu {
        display: none;
    }
    .admin-sidebar-extras {
        display: none;
    }
    /* Desktop sidebar compact styles */
    .admin-sidebar-brand .brand-text {
        font-size: 1.15rem;
        font-weight: 700;
    }
    .admin-sidebar-role {
        padding: 4px 24px 24px;
    }
    .admin-nav-item {
        padding: 11px 16px;
        font-size: 0.88rem;
        gap: 12px;
        margin-bottom: 2px;
    }
    .admin-nav-icon {
        font-size: 1.1rem;
    }
    .admin-nav-item.active {
        background: var(--accent);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    }
    /* Desktop toggle button */
    .admin-desktop-toggle {
        background: none;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 4px 10px;
        font-size: 1.1rem;
        cursor: pointer;
        color: #64748b;
        transition: all 0.15s;
        line-height: 1;
    }
    .admin-desktop-toggle:hover {
        background: #f1f5f9;
        color: #334155;
    }
    /* Sidebar collapsed state */
    body.sidebar-collapsed .admin-sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-collapsed .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }
    .admin-layout .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .admin-layout .stat-card {
        padding: 18px;
    }
    .admin-layout .stat-card .stat-value {
        font-size: 1.8rem;
    }
    .admin-layout .stat-card .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    .admin-layout .grid-2 {
        grid-template-columns: 1fr;
    }
    .admin-layout .page-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    .admin-layout .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 12px;
    }
    .admin-layout .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .admin-layout .stat-card {
        padding: 14px;
        border-radius: 14px;
    }
    .admin-layout .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .admin-layout .stat-card .stat-label {
        font-size: 0.75rem;
    }
    .admin-layout .grid-2,
    .admin-layout .grid-3,
    .admin-layout .grid-4 {
        grid-template-columns: 1fr;
    }
    .admin-topbar {
        padding: 10px 12px;
    }
    .admin-layout .table-actions .btn {
        font-size: 0.72rem;
        padding: 5px 8px;
    }
    .admin-layout .table-summary-bar {
        gap: 6px;
    }
    .admin-layout .table-summary-bar .summary-item {
        padding: 10px 6px;
    }
    .admin-layout .table-summary-bar .summary-num {
        font-size: 1.4rem;
    }
    .admin-layout .table-summary-bar .summary-label {
        font-size: 0.65rem;
    }
}
