/* Font loaded via preconnect <link> in HTML <head> for zero render-blocking waterfall */

:root {
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --primary: #ea580c;
    --primary-hover: #c2410c;
    --primary-dark: #9a3412;
    --primary-light: #fff7ed;
    --primary-glow: rgba(234, 88, 12, 0.22);
    --secondary: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-subtle: #edf2f7;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px -6px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-hover);
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar — Modern Glassmorphism */
.topbar {
    height: var(--topbar-height);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mobile {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text);
}

.topbar-site-info {
    font-size: 0.84rem;
    color: var(--muted);
    font-weight: 500;
}

.topbar .btn-light {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #334155;
    border-radius: 10px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}
.topbar .btn-light:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}

/* Sidebar — Luxury Slate Navy Dark Theme */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 1040;
    background: linear-gradient(180deg, #090d16 0%, #0f172a 45%, #111827 100%);
    color: #f1f5f9;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.15);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-brand strong {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    display: block;
    line-height: 1.25;
}

.sidebar-brand small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
    color: #ffffff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-nav {
    padding: 18px 12px 36px;
}

.sidebar-mobile-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    transition: background 0.15s ease;
}
.sidebar-mobile-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.nav-label {
    margin: 20px 12px 8px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 10px 14px;
    color: #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.22) 0%, rgba(234, 88, 12, 0.06) 100%);
    border-left: 3px solid #ea580c;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.9;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    min-width: 0;
    margin-left: var(--sidebar-width);
    padding: calc(var(--topbar-height) + 26px) 28px 48px;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Collapsed State */
.sidebar-collapsed .sidebar { width: 78px; }
.sidebar-collapsed .sidebar-brand > div:not(.brand-icon),
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-link span { display: none; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 12px; }
.sidebar-collapsed .nav-link i { font-size: 18px; margin: 0; }
.sidebar-collapsed .topbar { left: 78px; }
.sidebar-collapsed .main-content { margin-left: 78px; }

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 1.75rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}
.page-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* Stat Cards */
.stat-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 20px 22px;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(234, 88, 12, 0.25);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: var(--primary);
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.14);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    margin-top: 4px;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
}

/* Card Clean */
.card-clean {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-clean:hover {
    box-shadow: var(--shadow-md);
}

.card-clean .card-header {
    background: rgba(248, 250, 252, 0.7);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text);
}

.card-clean .card-body {
    padding: 20px;
}

/* User Menu & Avatar */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease;
}
.user-menu:hover {
    background: rgba(0, 0, 0, 0.04);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(234, 88, 12, 0.25);
}

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Modern Primary Buttons */
.btn-primary {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    border: 1px solid #ea580c;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    border-color: #c2410c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(234, 88, 12, 0.38);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2);
}

/* Modern Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(241, 245, 249, 0.7);
    color: var(--text);
    vertical-align: middle;
}
.table > :not(caption) > * > * {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.table > thead > tr > th {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.table tbody tr:hover td {
    background: rgba(241, 245, 249, 0.65);
}

/* Soft Badges */
.badge-soft-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}
.badge-soft-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}
.badge-soft-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}
.badge-soft-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}

/* Login Page Styling */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(234, 88, 12, 0.07) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
                linear-gradient(135deg, #fff7ed 0%, #f8fafc 60%, #f1f5f9 100%);
    padding: 24px;
}
.login-card {
    width: min(450px, 100%);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    padding: 38px 34px;
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.12);
}
.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #fff;
    font-size: 30px;
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.35);
}

/* Dark Mode — Luxury Sleek Palette */
.dark-mode,
[data-theme="dark"] {
    --bg: #090d16;
    --surface: #0f172a;
    --surface-hover: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: #1e293b;
    --border-subtle: #1e293b;
}

html.dark-mode body,
body.dark-mode,
[data-theme="dark"] body {
    background-color: var(--bg);
    color: var(--text);
}

.dark-mode .topbar {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
}
.dark-mode .card,
.dark-mode .card-clean,
.dark-mode .stat-card,
.dark-mode .login-card {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.dark-mode .card-clean .card-header,
.dark-mode .card-header {
    background: rgba(30, 41, 59, 0.45);
    border-color: var(--border);
    color: var(--text);
}
.dark-mode .stat-icon {
    background: rgba(234, 88, 12, 0.15);
    color: #fb923c;
}
.dark-mode .table {
    color: var(--text);
    border-color: var(--border);
}
.dark-mode .table > thead > tr > th {
    background: rgba(30, 41, 59, 0.5);
    border-color: var(--border);
    color: var(--muted);
}
.dark-mode .table tbody tr:hover td {
    background: rgba(30, 41, 59, 0.35);
}
.dark-mode .btn-light {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
.dark-mode .btn-light:hover {
    background: #334155;
    color: #fff;
}
.dark-mode .form-control,
.dark-mode .form-select {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}
.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
    background: #1e293b;
    border-color: var(--primary);
    color: #ffffff;
}
.dark-mode .input-group-text {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
.dark-mode .modal-content {
    background: #0f172a;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.dark-mode .modal-header,
.dark-mode .modal-footer {
    border-color: var(--border);
}
.dark-mode .dropdown-menu {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.dark-mode .dropdown-item {
    color: #cbd5e1;
}
.dark-mode .dropdown-item:hover {
    background: #1e293b;
    color: #fbbf24;
}
.dark-mode .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
}
.dark-mode .badge-soft-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.dark-mode .badge-soft-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.dark-mode .badge-soft-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.dark-mode .badge-soft-info { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border-color: rgba(14, 165, 233, 0.3); }
.dark-mode .page-link {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
.dark-mode .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.dark-mode hr {
    border-color: rgba(255, 255, 255, 0.1);
}
.dark-mode .bg-white, [data-theme="dark"] .bg-white {
    background-color: var(--surface) !important;
    color: var(--text) !important;
}
.dark-mode .bg-light, [data-theme="dark"] .bg-light {
    background-color: var(--surface-hover) !important;
    color: var(--text) !important;
}
.dark-mode .text-dark, [data-theme="dark"] .text-dark {
    color: var(--text) !important;
}
.dark-mode .border, .dark-mode .border-top, .dark-mode .border-bottom, .dark-mode .border-start, .dark-mode .border-end,
[data-theme="dark"] .border, [data-theme="dark"] .border-top, [data-theme="dark"] .border-bottom, [data-theme="dark"] .border-start, [data-theme="dark"] .border-end {
    border-color: var(--border) !important;
}
.dark-mode .list-group-item, [data-theme="dark"] .list-group-item {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

/* Form & Input Foundations */
.btn {
    min-height: 40px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-control,
.form-select {
    min-height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 8px 14px;
    font-size: 0.94rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
    outline: none;
}
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.page-link:focus-visible {
    outline: 3px solid rgba(234, 88, 12, 0.35);
    outline-offset: 2px;
}
.card-clean,
.stat-card {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .btn { min-height: 42px; }
    .form-control, .form-select { min-height: 44px; }
    .modal-dialog { margin: 0.75rem; }
    .modal-content { border-radius: var(--radius-lg); }
}

@media (max-width: 991.98px) {
    .sidebar-mobile-close { display: inline-flex; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .topbar { left: 0; }
    .main-content { margin-left: 0; padding-left: 16px; padding-right: 16px; }
    .sidebar-collapsed .sidebar { width: var(--sidebar-width); }
    .sidebar-collapsed .sidebar-brand > div:not(.brand-icon),
    .sidebar-collapsed .nav-label,
    .sidebar-collapsed .nav-link span { display: initial; }
    .sidebar-collapsed .nav-link { justify-content: flex-start; }
    .sidebar-collapsed .topbar,
    .sidebar-collapsed .main-content { margin-left: 0; left: 0; }
}

@media (max-width: 767.98px) {
    .topbar { padding: 0 14px; gap: 8px; }
    .topbar > .d-flex { min-width: 0; }
    .topbar form select { max-width: 155px; }
    .topbar-actions { gap: 6px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .page-header > .btn, .page-header > .d-flex { width: 100%; }
    .page-header > .d-flex { flex-wrap: wrap; }
    .main-content { padding-top: calc(var(--topbar-height) + 16px); }
    .card-clean .card-body { padding: 14px; }
    .table { min-width: 640px; }
    .login-card { padding: 24px; }
}

/* KDS 2.0 (Kitchen Display System) */
.kitchen-toolbar { padding: 14px; }
.kitchen-board { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.kitchen-column { min-width: 270px; background: var(--bs-light, #f8f9fa); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.kitchen-column-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.92); }
.kitchen-column-title { display: block; font-weight: 800; font-size: 0.95rem; }
.kitchen-column-subtitle { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kitchen-column-body { display: grid; gap: 12px; padding: 12px; min-height: 180px; }
.kitchen-ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.kitchen-ticket:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kitchen-ticket-overdue { border-width: 2px; }
.kitchen-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px; border-bottom: 1px solid var(--border-subtle); }
.kitchen-ticket-code { font-size: 1.05rem; font-weight: 800; }
.kitchen-elapsed { white-space: nowrap; font-size: .78rem; color: var(--muted); font-weight: 600; }
.kitchen-ticket-body { padding: 0 12px 12px; }
.kitchen-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.kitchen-item:last-child { border-bottom: 0; }
.kitchen-item-main { min-width: 0; }
.kitchen-item-action { flex: 0 0 auto; }
.kitchen-column-empty { display: grid; place-items: center; min-height: 150px; padding: 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.kitchen-filter { overflow-x: auto; max-width: 100%; }
.kitchen-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kitchen-ticket-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--border-subtle); }
.kitchen-ticket-urgent { border-width: 2px; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.kitchen-ticket-urgent .kitchen-elapsed { animation: kitchenPulse 1.4s ease-in-out infinite; color: #ef4444; font-weight: 800; }
@keyframes kitchenPulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .kitchen-ticket-urgent .kitchen-elapsed { animation: none; } }
.dark-mode .kitchen-column { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
.dark-mode .kitchen-column-header { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.dark-mode .kitchen-ticket { border-color: rgba(255,255,255,.1); }
@media (max-width: 1199.98px) { .kitchen-board { grid-template-columns: repeat(2, minmax(280px, 1fr)); } }
@media (max-width: 767.98px) {
    .kitchen-board { grid-template-columns: repeat(4, minmax(280px, 86vw)); overflow-x: auto; scroll-snap-type: x proximity; }
    .kitchen-column { scroll-snap-align: start; }
    .kitchen-filter { width: 100%; }
    .kitchen-filter .btn { min-width: 92px; }
    .kitchen-toolbar { padding: 10px; }
}

/* Delivery Board 2.0 */
.delivery-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.25rem; }
.delivery-summary-card { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; box-shadow: var(--shadow-sm); }
.delivery-summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.delivery-summary-card strong { font-size: 1.45rem; font-weight: 800; color: var(--text); }
.delivery-summary-label { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.delivery-board { display: grid; grid-template-columns: repeat(6, minmax(280px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .6rem; align-items: start; }
.delivery-column { min-width: 280px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #f8fafc; overflow: hidden; box-shadow: var(--shadow-sm); }
.delivery-column-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.delivery-column-title { display: block; font-weight: 800; font-size: 0.95rem; }
.delivery-column-subtitle { display: block; font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.delivery-column-body { display: flex; flex-direction: column; gap: .85rem; padding: .85rem; min-height: 180px; }
.delivery-column-empty { display: grid; place-items: center; min-height: 150px; padding: 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.delivery-ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.delivery-ticket:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.delivery-ticket-overdue { border-width: 2px; }
.delivery-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .7rem; }
.delivery-ticket-head strong { font-size: 1.05rem; font-weight: 800; }
.delivery-customer { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .45rem; }
.delivery-customer a { text-decoration: none; font-weight: 600; }
.delivery-address { padding: .7rem .8rem; border-radius: var(--radius-sm); background: rgba(14, 165, 233, 0.06); border: 1px solid rgba(14, 165, 233, 0.15); line-height: 1.45; overflow-wrap: anywhere; font-size: 0.88rem; }
.delivery-note { margin-top: .5rem; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.delivery-meta { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; padding-top: .7rem; border-top: 1px solid var(--border-subtle); font-size: .82rem; }
.delivery-actions { display: flex; flex-direction: column; gap: .55rem; margin-top: .75rem; }
.delivery-action-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: center; }
.delivery-action-form .form-select { min-width: 0; }
.delivery-overdue { margin: -.2rem 0 .65rem; padding: .45rem .65rem; border-radius: var(--radius-sm); background: rgba(239, 68, 68, 0.1); color: #b91c1c; font-size: .8rem; font-weight: 700; }
.delivery-column-pending .delivery-column-header { border-top: 4px solid #f59e0b; }
.delivery-column-assigned .delivery-column-header { border-top: 4px solid #0ea5e9; }
.delivery-column-picking_up .delivery-column-header { border-top: 4px solid #8b5cf6; }
.delivery-column-delivering .delivery-column-header { border-top: 4px solid #ea580c; }
.delivery-column-delivered .delivery-column-header { border-top: 4px solid #10b981; }
.delivery-column-cancelled .delivery-column-header { border-top: 4px solid #64748b; }
@media (max-width: 1100px) { .delivery-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } .delivery-board { grid-template-columns: repeat(6, 300px); } }
@media (max-width: 575.98px) { .delivery-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .delivery-summary-card { padding: .75rem; } .delivery-board { grid-template-columns: repeat(6, calc(100vw - 2.5rem)); } .delivery-column { min-width: 0; } }

/* Floor / Table Board 2.0 */
.table-floor-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.25rem; }
.table-summary-card { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; box-shadow: var(--shadow-sm); }
.table-summary-card:hover, .table-summary-card.active { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.table-summary-card strong { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.table-summary-card small { display: block; color: var(--muted); margin-top: .2rem; font-weight: 600; text-transform: uppercase; font-size: 0.78rem; }
.table-summary-card i { font-size: 1.45rem; }
.table-floor-board { display: flex; flex-direction: column; gap: 1.25rem; }
.table-floor-area { border: 1px solid var(--border); border-radius: var(--radius-lg); background: #f8fafc; overflow: hidden; box-shadow: var(--shadow-sm); }
.table-floor-area-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.table-floor-area-head h2 { font-size: 1.05rem; font-weight: 800; margin: 0; color: var(--text); }
.table-floor-area-head span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.table-floor-grid { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 1rem; padding: 1.15rem; }
.floor-table-card { min-height: 195px; padding: 1.1rem; border: 2px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.floor-table-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.floor-table-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.floor-table-code { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.floor-table-status { font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: #f1f5f9; white-space: nowrap; }
.floor-table-name { font-weight: 700; margin-top: .6rem; color: var(--text); }
.floor-table-capacity { font-size: .82rem; color: var(--muted); margin-top: .25rem; font-weight: 500; }
.floor-table-order { display: flex; justify-content: space-between; align-items: end; gap: .6rem; margin-top: auto; padding-top: .85rem; }
.floor-table-order small, .floor-table-order strong { display: block; }
.floor-table-order small { color: var(--muted); font-size: 0.8rem; }
.floor-table-no-order { font-size: .84rem; color: var(--muted); align-items: center; }
.floor-table-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .85rem; }
.floor-table-actions .btn { flex: 1 1 auto; }
.floor-state-available { border-color: rgba(16, 185, 129, 0.4); }
.floor-state-available:hover { border-color: #10b981; }
.floor-state-serving { border-color: rgba(245, 158, 11, 0.5); }
.floor-state-payment-due { border-color: rgba(239, 68, 68, 0.6); }
.floor-state-reserved { border-color: rgba(14, 165, 233, 0.45); }
.floor-state-cleaning { border-color: rgba(100, 116, 139, 0.45); }
.floor-state-payment-due .floor-table-status { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.floor-state-serving .floor-table-status { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.floor-state-reserved .floor-table-status { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.floor-state-cleaning .floor-table-status { background: rgba(100, 116, 139, 0.12); color: #475569; }
.table-floor-empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface); }
@media (max-width: 1200px) { .table-floor-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } .table-floor-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 767.98px) { .table-floor-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .table-floor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .75rem; } }
@media (max-width: 480px) { .table-floor-grid { grid-template-columns: 1fr; } }

/* Operations Center 2.0 */
.operations-center { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.operations-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #a7f3d0; border-radius: 999px; padding: 4px 10px; font-size: .74rem; font-weight: 800; color: #065f46; background: #ecfdf5; letter-spacing: 0.04em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
.operations-filters { display: flex; gap: 8px; padding: 12px 22px; overflow-x: auto; border-bottom: 1px solid var(--border); background: rgba(248, 250, 252, 0.75); }
.operations-filter { white-space: nowrap; }
.operations-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; height: 100%; box-shadow: var(--shadow-xs); }
.operations-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.operations-orders { display: grid; gap: 12px; padding: 12px; max-height: 650px; overflow-y: auto; }
.operation-order { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-xs); transition: transform 0.15s ease; }
.operation-order:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.operation-order-due { border-left: 4px solid #ef4444; }
.operation-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); }
.operation-order-code { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.operation-status, .operation-item-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-new { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #e0e7ff; color: #3730a3; }
.status-preparing { background: #ffedd5; color: #9a3412; }
.status-ready { background: #dcfce7; color: #166534; }
.status-served { background: #dbeafe; color: #1e40af; }
.status-default { background: #f1f5f9; color: #475569; }
.operation-items { padding: 0 14px; }
.operation-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--border-subtle); }
.operation-item:last-child { border-bottom: 0; }
.operation-item-main { min-width: 0; }
.operation-item-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 700; }
.operation-qty { font-weight: 800; font-size: .88rem; color: var(--primary); }
.operation-order-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 12px 14px; background: rgba(248, 250, 252, 0.75); border-top: 1px solid var(--border-subtle); }
.operation-progress .progress { height: 7px; border-radius: 999px; }
.operation-progress .progress-bar { background: var(--primary); }
.kitchen-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.kitchen-mini-card, .table-mini-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(248, 250, 252, 0.6); }
.kitchen-mini-card > i { font-size: 1.25rem; color: var(--primary); }
.kitchen-mini-card strong, .table-mini-card strong { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.05; }
.kitchen-mini-card small, .table-mini-card small { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; font-weight: 600; text-transform: uppercase; }
.table-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.table-mini-card { gap: 8px; }
.table-mini-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.table-available { background: #10b981; }
.table-occupied { background: #f59e0b; }
.table-reserved { background: #0ea5e9; }
.table-cleaning { background: #94a3b8; }
.operations-empty { display: grid; place-items: center; min-height: 180px; padding: 24px; text-align: center; color: var(--muted); gap: 8px; }
.operations-empty i { font-size: 2rem; color: var(--muted); }
.dark-mode .operations-filters,
.dark-mode .operation-order-foot,
.dark-mode .kitchen-mini-card,
.dark-mode .table-mini-card { background: rgba(255, 255, 255, 0.03); }
.dark-mode .live-pill { border-color: #065f46; background: #064e3b; color: #6ee7b7; }
@media (max-width: 767.98px) {
    .operations-head { align-items: flex-start; flex-direction: column; padding: 14px; }
    .operations-filters { padding: 9px 12px; }
    .operations-orders { max-height: none; }
    .operation-item { grid-template-columns: minmax(0, 1fr) auto; }
    .operation-item-status { grid-column: 1 / -1; justify-self: start; }
    .operation-order-foot { grid-template-columns: 1fr; }
    .kitchen-mini-grid, .table-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Security Page — Responsive Layout */
.security-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}
.security-page > .row,
.security-page .security-card {
    min-width: 0;
}
.security-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.security-page .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.security-page table {
    width: 100%;
    max-width: 100%;
}
.security-page .security-user-agent {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}
@media (max-width: 767.98px) {
    .security-page { padding-left: 10px !important; padding-right: 10px !important; }
    .security-page .card-clean .card-header { padding: 13px 14px; }
    .security-page .card-clean .card-body { padding: 14px; }
    .security-page .btn { max-width: 100%; }
    .security-page .table { min-width: 620px; }
}

/* Security 2FA */
.security-2fa-secret { overflow-wrap: anywhere; font-family: monospace; font-weight: 700; }
.security-2fa-uri { overflow-wrap: anywhere; word-break: break-word; }
.security-recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; max-width: 720px; }
.security-recovery-codes code { padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f8fafc; overflow-wrap: anywhere; font-weight: 700; }
@media (max-width: 576px) { .security-recovery-codes { grid-template-columns: 1fr; } }

/* Site Footer - Upgraded Modern F&B Layout */
.site-footer {
    margin-left: var(--sidebar-width, 270px);
    background: var(--surface) !important;
    border-top: 1px solid var(--border) !important;
    color: var(--muted);
    font-size: 0.88rem;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, border-color 0.2s ease;
}
.site-footer-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.site-footer-logo:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.footer-brand-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
    line-height: 1.25;
}
.footer-tagline {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.45rem;
}
.footer-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--muted);
}
.footer-col-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.35rem;
}
.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
}
.footer-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.65rem;
    font-size: 0.85rem;
    line-height: 1.5;
}
.footer-info-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.09);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.88rem;
    margin-top: 1px;
}
.footer-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.02);
    color: var(--text);
    transition: all 0.2s ease;
}
.footer-badge-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.footer-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 3px 0;
    transition: color 0.18s ease, transform 0.18s ease;
}
.footer-quick-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}
.footer-quick-link i {
    font-size: 0.78rem;
    color: var(--primary);
    opacity: 0.7;
    transition: transform 0.18s ease;
}
.footer-quick-link:hover i {
    opacity: 1;
    transform: translateX(2px);
}
.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #ffffff !important;
    text-decoration: none;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
}
.footer-social-btn:hover {
    transform: translateY(-3px) scale(1.1);
}
.footer-social-btn.btn-fb { background: #1877f2; box-shadow: 0 3px 10px rgba(24, 119, 242, 0.3); }
.footer-social-btn.btn-zalo { background: #0068ff; box-shadow: 0 3px 10px rgba(0, 104, 255, 0.3); font-weight: 700; font-size: 0.88rem; }
.footer-social-btn.btn-tiktok { background: #010101; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.15); }
.footer-social-btn.btn-youtube { background: #ff0000; box-shadow: 0 3px 10px rgba(255, 0, 0, 0.3); }
.footer-social-btn.btn-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); box-shadow: 0 3px 10px rgba(214, 36, 159, 0.35); }

.site-subfooter {
    border-top: 1px solid var(--border);
    padding: 0.9rem 0;
    font-size: 0.81rem;
}
.footer-sync-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: footerSyncPulse 2s infinite;
}
@keyframes footerSyncPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.footer-back-to-top {
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--muted);
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.footer-back-to-top:hover {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 13, 110, 253), 0.25);
}

.dark-mode .site-footer,
html.dark-mode .site-footer,
body.dark-mode .site-footer,
[data-theme="dark"] .site-footer {
    background: #0b1120 !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}
.dark-mode .footer-brand-title,
html.dark-mode .footer-brand-title,
body.dark-mode .footer-brand-title,
[data-theme="dark"] .footer-brand-title,
.dark-mode .footer-col-title,
html.dark-mode .footer-col-title,
body.dark-mode .footer-col-title,
[data-theme="dark"] .footer-col-title {
    color: #f8fafc !important;
}
.dark-mode .site-footer-logo,
html.dark-mode .site-footer-logo,
body.dark-mode .site-footer-logo,
[data-theme="dark"] .site-footer-logo {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}
.dark-mode .footer-info-icon,
[data-theme="dark"] .footer-info-icon {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
}
.dark-mode .footer-badge-pill,
[data-theme="dark"] .footer-badge-pill {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
.dark-mode .site-subfooter,
[data-theme="dark"] .site-subfooter {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.sidebar-collapsed .site-footer,
body.sidebar-collapsed .site-footer {
    margin-left: 78px;
}
@media (max-width: 991.98px) {
    .site-footer,
    .sidebar-collapsed .site-footer,
    body.sidebar-collapsed .site-footer {
        margin-left: 0 !important;
    }
}
@media (min-width: 992px) {
    .site-footer .container-fluid {
        padding-right: 80px;
    }
}

/* Superadmin Settings Studio Styles */
.settings-studio-card {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.settings-nav-tabs {
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.015);
    padding: 0.6rem 0.8rem 0 0.8rem;
    gap: 0.4rem;
}
.settings-nav-tabs .nav-link {
    border: none !important;
    border-bottom: 2.5px solid transparent !important;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.65rem 1.1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.settings-nav-tabs .nav-link:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.03);
}
.settings-nav-tabs .nav-link.active {
    color: var(--primary) !important;
    background: var(--surface) !important;
    border-bottom-color: var(--primary) !important;
}
.settings-dropzone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.015);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}
.settings-dropzone:hover, .settings-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.04);
}
.settings-preview-frame {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.settings-preview-bar {
    background: rgba(0,0,0,0.03);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.settings-preview-dots {
    display: flex;
    gap: 6px;
}
.settings-preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.settings-preview-dots span:nth-child(1) { background: #ef4444; }
.settings-preview-dots span:nth-child(2) { background: #f59e0b; }
.settings-preview-dots span:nth-child(3) { background: #10b981; }

.preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
}
.preset-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}


/* Toast Notifications */
.app-toast {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: none !important;
    overflow: hidden;
    font-weight: 600;
}

/* Global Ads Banner & Modal */
#globalAdBanner {
    border-radius: var(--radius-lg) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-xl) !important;
}
.dark-mode #globalAdBanner {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text);
}
.global-ad-card {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--border) !important;
}

/* Live Preview Two-Way Inline Editable */
.editable-preview-item {
    cursor: text !important;
    border-radius: 4px;
    padding: 1px 3px;
    margin: -1px -3px;
    transition: all 0.18s ease;
    outline: none !important;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}
.editable-preview-item:hover {
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.09) !important;
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb, 13, 110, 253), 0.4);
}
.editable-preview-item:focus {
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.15) !important;
    box-shadow: 0 0 0 2px var(--primary) !important;
}
.editable-preview-hint {
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(var(--primary-rgb, 13, 110, 253), 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    border: 1px dashed rgba(var(--primary-rgb, 13, 110, 253), 0.35);
}
.input-highlight-flash {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb, 13, 110, 253), 0.25) !important;
    transition: all 0.25s ease;
}

/* Password Field Wrapper & Interactive Toggle Button */
.password-toggle-wrap,
.password-field-group {
    position: relative;
    width: 100%;
    display: block;
}

.password-toggle-wrap .form-control,
.password-field-group .form-control {
    padding-right: 48px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    border-radius: 8px;
    z-index: 5;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.password-toggle-btn:hover {
    color: var(--primary);
    background: rgba(234, 88, 12, 0.08);
}

.dark-mode .password-toggle-btn:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   UNIFIED MANAGEMENT SYSTEM MOBILE FRAMEWORK (POS-ALIGNED)
   Synchronizes Mobile Experience Across All Admin Modules:
   - 100% viewport width without horizontal overflow
   - Single-row / compact multi-col KPI metrics strips
   - Dual-column squeezed item cards (never 1 bulky card per row)
   - Pill-styled action buttons, compact search & filter bars
   - High-density touch-optimized data tables
   ========================================================================== */
@media (max-width: 991.98px) {
  /* 1. Global Viewport & Container Reset */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .app-shell {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: calc(var(--topbar-height, 70px) + 10px) !important;
    padding-bottom: 24px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .container-fluid {
    padding-left: 2px !important;
    padding-right: 2px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Page Headers: Compact Single/Two-Row Layout with Hidden Subtitles */
  .page-header,
  .foods-header-wrap,
  .inventory-telemetry-header,
  .table-telemetry-header,
  .exec-header-bar,
  .orders-telemetry-header,
  .rooms-header-wrap {
    margin-bottom: 0.65rem !important;
    padding: 0.5rem 0.65rem !important;
    gap: 0.4rem !important;
    border-radius: 12px !important;
  }

  .page-header h1,
  .foods-header-title h1,
  .inventory-telemetry-title h1,
  .exec-header-bar h1,
  .orders-telemetry-title h1 {
    font-size: 1.05rem !important;
    margin: 0 !important;
    line-height: 1.25 !important;
  }

  .page-header p,
  .foods-header-title p,
  .inventory-telemetry-title p,
  .exec-header-bar p,
  .table-telemetry-header p {
    display: none !important;
  }

  /* 3. Header Action Buttons: Sleek Pill Badges */
  .page-header .btn,
  .foods-header-actions .btn,
  .foods-header-actions .btn-primary-3d,
  .inventory-telemetry-actions .inventory-btn-tool,
  .exec-quick-actions .exec-btn-action,
  .orders-telemetry-actions .btn {
    border-radius: 9999px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    min-height: 30px !important;
    height: 30px !important;
    line-height: 1.2 !important;
  }

  /* 4. Universal KPI Strips on Mobile: Compact & Unified */
  .inventory-kpi-strip,
  .orders-kpi-grid,
  .crm-kpi-strip,
  .reservations-kpi-strip,
  .rooms-kpi-strip,
  .table-floor-summary,
  .kds-kpi-ticker,
  .employees-kpi-strip,
  .purchasing-kpi-strip,
  .suppliers-kpi-strip,
  .payroll-kpi-strip,
  .attendance-kpi-strip,
  .shifts-kpi-strip,
  .delivery-kpi-strip,
  .dlv-kpi-strip,
  .recipes-kpi-strip,
  .ingredients-kpi-strip,
  .foods-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin-bottom: 0.5rem !important;
  }


  /* Universal 2-Item Grid for all Floor, Food, Room, Dish catalogues */
  .table-floor-grid,
  .foods-grid-view,
  .rooms-grid,
  .vip-grid,
  .catalog-grid,
  .menu-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-card,
  .card-stat {
    padding: 8px 6px !important;
    border-radius: 10px !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .stat-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
  }

  .stat-value {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
    line-height: 1.15 !important;
  }

  .stat-label {
    font-size: 0.62rem !important;
    margin-top: 2px !important;
    letter-spacing: 0 !important;
    line-height: 1.1 !important;
  }


  /* 5. Responsive Data Tables: Clean Horizontal Scroll without Screen Spill */
  .table-responsive {
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 0.75rem !important;
    scrollbar-width: thin !important;
  }

  .table-responsive .table {
    margin-bottom: 0 !important;
    font-size: 0.8rem !important;
  }

  .table-responsive .table th,
  .table-responsive .table td {
    padding: 6px 8px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  /* 6. Filter Bars & Quick Chips: Touch-scrollable Track */
  .filter-bar,
  .search-toolbar,
  .table-filter-bar,
  .pos-filter-bar {
    padding: 6px 8px !important;
    gap: 4px !important;
    margin-bottom: 0.65rem !important;
    border-radius: 10px !important;
  }

  /* 7. Card Panels & Clean Cards: Space-Saving Padding */
  .card-clean,
  .card {
    border-radius: 12px !important;
  }

  .card-clean .card-header,
  .card-header {
    padding: 8px 12px !important;
    font-size: 0.88rem !important;
  }

  .card-clean .card-body,
  .card-body {
    padding: 10px !important;
  }

  /* 8. Pagination on Mobile */
  .pagination {
    gap: 2px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .pagination .page-link {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
    min-width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

