/* ============================================
   GRAVITY TABLE — ELECTRIC NOIR
   Aesthetic: Futuristic Nightclub
   Palette: Deep Black + Electric Cyan
   ============================================ */

/* Inter — Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --bg-base:      #050508;
    --bg-surface:   #0a0a10;
    --bg-card:      #101018;
    --bg-card-hover:#16161f;
    --bg-input:     #0c0c14;
    --border:       rgba(0,229,255,0.12);
    --border-light: rgba(255,255,255,0.06);

    --cyan:         #00e5ff;
    --cyan-light:   #67efff;
    --cyan-glow:    rgba(0,229,255,0.12);
    --cyan-deep:    #00b8d4;
    --magenta:      #ff2d78;
    --magenta-light:#ff6fa0;

    /* Legacy violet aliases for JS compatibility */
    --violet:       #00e5ff;
    --violet-light: #67efff;
    --violet-glow:  rgba(0,229,255,0.12);
    --pink:         #ff2d78;
    --pink-light:   #ff6fa0;

    --green:        #00e676;
    --green-light:  #69f0ae;
    --yellow:       #ffab00;
    --yellow-light: #ffd740;
    --red:          #ff3d3d;
    --red-light:    #ff6b6b;

    --text:         #e8edf2;
    --text-dim:     rgba(232,237,242,0.45);
    --text-faint:   rgba(232,237,242,0.2);

    --radius-sm:    8px;
    --radius-md:    14px;
    --radius-lg:    20px;
    --radius-xl:    28px;

    --shadow-card:  0 8px 32px rgba(0,0,0,0.7);
    --shadow-glow:  0 0 40px rgba(0,229,255,0.06);

    --font-display: 'Inter', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'Inter', sans-serif;

    --ease-out:       cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out:    cubic-bezier(0.77, 0, 0.175, 1);
    --ease-spring:    cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast:   0.15s;
    --duration-normal: 0.25s;
    --duration-slow:   0.35s;
    --stagger-delay:   40ms;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
.success { color: var(--green-light); }
.warning { color: var(--yellow-light); }
.info    { color: var(--cyan-light); }
.danger  { color: var(--red-light); }

/* ============================================
   SELECTION & FOCUS
   ============================================ */
::selection {
    background: rgba(0,229,255,0.3);
    color: #fff;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 13px;
    letter-spacing: 0.04em;
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                filter var(--duration-fast) var(--ease-out),
                background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: scale(0.97); filter: brightness(0.92); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; filter: none !important; }

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-deep) 100%);
    color: #050508;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,229,255,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(0,229,255,0.4), inset 0 1px 0 rgba(255,255,255,0.2); }

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }

.btn-danger {
    padding: 10px 18px;
    background: rgba(224,82,82,0.1);
    border: 1px solid rgba(224,82,82,0.2);
    color: var(--red-light);
}
.btn-danger:hover { background: rgba(224,82,82,0.2); }

.btn-full    { width: 100%; }
.btn-small   { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }

.btn-logout {
    padding: 9px 14px;
    background: rgba(224,82,82,0.08);
    border: 1px solid rgba(224,82,82,0.15);
    color: var(--red-light);
    font-size: 16px;
}

/* ============================================
   INPUTS
   ============================================ */
.input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}
.input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0,229,255,0.12), 0 0 20px rgba(0,229,255,0.06);
}
.input::placeholder { color: var(--text-faint); }
select.input option  { background: var(--bg-card); color: var(--text); }

.textarea   { min-height: 72px; resize: vertical; }
.search-input { max-width: 220px; padding: 8px 14px; }

/* ============================================
   LOGIN
   ============================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0,229,255,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(199,125,186,0.04) 0%, transparent 50%),
        var(--bg-base);
    position: relative;
}
/* Decorative corner lines */
.login-screen::before,
.login-screen::after {
    content: '';
    position: fixed;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(0,229,255,0.08);
    pointer-events: none;
}
.login-screen::before {
    top: 40px;
    left: 40px;
    border-right: none;
    border-bottom: none;
}
.login-screen::after {
    bottom: 40px;
    right: 40px;
    border-left: none;
    border-top: none;
}

.login-box {
    background: linear-gradient(145deg, rgba(20,20,20,0.95), rgba(12,12,12,0.98));
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-xl);
    padding: 52px 44px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow:
        0 24px 80px rgba(0,0,0,0.6),
        0 0 60px rgba(0,229,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    position: relative;
    animation: loginReveal 0.8s var(--ease-spring) both;
}
@keyframes loginReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Top accent line */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    border-radius: 1px;
}

.login-logo {
    width: 76px;
    height: 76px;
    background: linear-gradient(145deg, var(--cyan), var(--cyan-deep));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 32px;
    box-shadow:
        0 12px 40px rgba(0,229,255,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    animation: logoFloat 4s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.login-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.login-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}
.login-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    color: var(--text);
    font-family: var(--font-body);
    text-align: left;
    transition: border-color var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out), background var(--duration-slow) var(--ease-out);
}
.login-input:focus {
    outline: none;
    border-color: var(--cyan);
    background: rgba(0,229,255,0.03);
    box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}
.pin-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 28px;
    font-family: var(--font-mono);
    text-align: center;
    letter-spacing: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--cyan-light);
    margin-bottom: 12px;
    transition: border-color var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}
.pin-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}
.remember-me {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin: 18px 0; cursor: pointer;
    font-size: 13px; color: var(--text-dim);
}
.remember-me input { width: 18px; height: 18px; accent-color: var(--cyan); cursor: pointer; }
.login-error { color: var(--red-light); font-size: 13px; min-height: 20px; margin: 8px 0 14px; }

/* ============================================
   LOADING
   ============================================ */
.loading-screen {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    background: var(--bg-base);
}
.loading-content { text-align: center; color: var(--cyan-light); }
.loading-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%      { transform: scale(1.1); opacity: 1; }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(6,6,6,0.92);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    position: sticky;
    top: 0;
    z-index: 100;
}
/* Subtle gold line at bottom of header */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,229,255,0.15) 20%, rgba(0,229,255,0.15) 80%, transparent 100%);
}

.header-left    { display: flex; align-items: center; gap: 16px; }
.header-logo    {
    width: 38px; height: 38px;
    background: linear-gradient(145deg, var(--cyan), var(--cyan-deep));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,229,255,0.2);
}
.header-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff 30%, var(--cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-user { font-family: var(--font-display); font-size: 11px; color: var(--text-dim); margin-top: 1px; letter-spacing: 0.3px; font-weight: 500; }
.header-actions { display: flex; gap: 5px; align-items: center; }

.clock {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 500;
    color: var(--cyan-light);
    letter-spacing: 2px;
    opacity: 0.8;
}

/* ============================================
   TABS
   ============================================ */
.tab-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    letter-spacing: 0.04em;
    font-family: var(--font-body);
}
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tab-btn:active { transform: scale(0.97); }
.tab-btn.active {
    background: var(--cyan-glow);
    border-color: rgba(0,229,255,0.25);
    color: var(--cyan-light);
}
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--cyan);
    color: #050508;
    border-radius: 9px;
    font-size: 10px; font-weight: 700;
    margin-left: 5px;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    padding: 0 28px;
    height: 44px;
    display: flex; align-items: center; gap: 8px;
    background: rgba(6,6,6,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-wrap: nowrap; overflow-x: auto;
}
.stat-item {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    font-size: 12px; white-space: nowrap;
}
.stat-label { color: var(--text-dim); font-size: 11px; }
.stat-value { font-weight: 700; font-family: var(--font-mono); font-size: 12px; }
.live-indicator {
    margin-left: auto; display: flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    background: rgba(45,212,160,0.06);
    border: 1px solid rgba(45,212,160,0.12);
    border-radius: 20px; font-size: 12px; color: var(--green-light);
    flex-shrink: 0;
}
.live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    animation: livePulse 2s ease-in-out infinite;
}
.live-text { color: var(--green-light); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; font-size: 10px; }
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45,212,160,0.4); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 5px rgba(45,212,160,0); }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content { display: flex; height: calc(100vh - 108px); }
.tab-content   { flex: 1; padding: 28px; overflow-y: auto; animation: tabFadeIn 0.2s var(--ease-out); }
@keyframes tabFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes listItemIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stagger-in { animation: listItemIn 0.3s var(--ease-out) both; }

/* ============================================
   LEADS / GUESTS
   ============================================ */
.leads-header {
    display: flex; gap: 12px; margin-bottom: 24px;
    align-items: center; flex-wrap: wrap;
}
.leads-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.leads-header .btn-primary { margin-left: auto; }
.leads-list { display: flex; flex-direction: column; gap: 6px; }

.filter-group {
    display: flex; gap: 2px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    padding: 3px;
}
.filter-btn {
    padding: 6px 16px;
    background: transparent;
    color: var(--text-dim);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-family: var(--font-body);
}
.filter-btn.active {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    color: #050508;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(0,229,255,0.25);
}

/* Lead card */
.lead-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex; align-items: center; gap: 10px;
    transition: background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.lead-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0,229,255,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.lead-card:active { transform: scale(0.98); }

/* ============================================
   FLOOR
   ============================================ */
.floor-tab       { display: flex; }
.floor-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.floor-plan {
    width: 960px; height: 600px;
    background: #080808;
    border-radius: var(--radius-lg);
    position: relative; overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,229,255,0.08),
        0 24px 80px rgba(0,0,0,0.7),
        inset 0 0 80px rgba(0,0,0,0.3);
    background-image:
        linear-gradient(rgba(0,229,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,229,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

.zone-label {
    position: absolute; top: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.zone-vip  { left: 10px;  background: rgba(255,171,0,0.12); border: 1px solid rgba(255,171,0,0.25); color: var(--yellow-light); }
.zone-main { left: 200px; background: rgba(0,229,255,0.1); border: 1px solid rgba(0,229,255,0.25); color: var(--cyan-light); }
.zone-bar  { right: 10px; background: rgba(45,212,160,0.08);  border: 1px solid rgba(45,212,160,0.2);  color: var(--green-light); }

/* TABLE ITEMS */
.table-item {
    position: absolute;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out),
                filter var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    text-align: center;
    gap: 1px;
}
.table-item:hover {
    transform: scale(1.04);
    filter: brightness(1.15);
    z-index: 10;
}
.table-item:active { transform: scale(0.95); }

/* TABLE DETAILS PANEL */
.table-details-panel {
    width: 340px;
    background: var(--bg-surface);
    border-left: 1px solid rgba(255,255,255,0.04);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
}
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-faint); }
.empty-icon  { font-size: 40px; margin-bottom: 12px; opacity: 0.3; }

/* ============================================
   STATS
   ============================================ */
.stats-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.stats-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}
.event-controls  { display: flex; gap: 8px; flex-wrap: wrap; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}
.stats-subtitle {
    margin: 28px 0 16px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.top-tables      { display: flex; flex-direction: column; gap: 6px; }
.staff-performance { display: flex; flex-direction: column; gap: 6px; }

/* Event badge */
.event-info  { display: flex; align-items: center; }
.event-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.event-badge.active   { background: var(--cyan-glow); border: 1px solid rgba(0,229,255,0.3); color: var(--cyan-light); }
.event-badge.inactive { background: rgba(255,171,0,0.08); border: 1px solid rgba(255,171,0,0.2); color: var(--yellow-light); }

/* ============================================
   EMPLOYEES
   ============================================ */
.employees-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;
}
.employees-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}
.employees-list  { display: flex; flex-direction: column; gap: 8px; }
.employee-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex; justify-content: space-between; align-items: center;
    transition: background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.employee-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0,229,255,0.1);
}
.employee-card:active { transform: scale(0.98); }

/* ============================================
   MENU MANAGEMENT
   ============================================ */
.menu-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;
}
.menu-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}
.menu-categories { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.menu-category-btn {
    padding: 7px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--duration-normal) var(--ease-out),
                background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    font-family: var(--font-body);
    letter-spacing: 0.03em;
}
.menu-category-btn:hover  { color: var(--text); border-color: rgba(255,255,255,0.12); }
.menu-category-btn:active { transform: scale(0.97); }
.menu-category-btn.active {
    background: var(--cyan-glow);
    border-color: rgba(0,229,255,0.3);
    color: var(--cyan-light);
}
.menu-management-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex; justify-content: space-between; align-items: center;
    transition: background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.menu-item-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0,229,255,0.1);
}
.menu-item-card:active { transform: scale(0.98); }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(16px) saturate(0.8);
    -webkit-backdrop-filter: blur(16px) saturate(0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
    animation: overlayIn 0.2s var(--ease-out);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }

.modal {
    background: linear-gradient(160deg, rgba(18,18,18,0.98), rgba(10,10,10,0.99));
    border: 1px solid rgba(0,229,255,0.1);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 520px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow:
        0 32px 100px rgba(0,0,0,0.7),
        0 0 60px rgba(0,229,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.04);
    animation: modalIn var(--duration-slow) var(--ease-spring) both;
    position: relative;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(16px) scale(0.97); }
}
.modal-overlay.modal-closing {
    animation: overlayOut 0.2s var(--ease-in-out) forwards;
}
.modal-overlay.modal-closing .modal {
    animation: modalOut var(--duration-normal) var(--ease-in-out) forwards;
}
/* Gold accent line at top */
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    border-radius: 1px;
}

.modal h2 {
    margin: 0 0 24px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.modal-wide       { max-width: 740px; }
.modal-subtitle   { margin: -16px 0 20px; color: var(--text-dim); font-size: 13px; }
.modal-actions    { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }

/* ============================================
   FORMS
   ============================================ */
.form-group        { margin-bottom: 16px; }
.form-group label  {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form-row          { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.checkbox-label {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    cursor: pointer; margin-bottom: 10px;
    font-size: 14px; font-weight: 500;
    transition: border-color var(--duration-normal) var(--ease-out), background var(--duration-normal) var(--ease-out);
}
.checkbox-label:hover { background: rgba(255,255,255,0.04); border-color: rgba(0,229,255,0.15); }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--cyan); cursor: pointer; }

/* ============================================
   ASSIGN MODAL
   ============================================ */
.assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
}

/* ============================================
   ORDER MODAL
   ============================================ */
.order-layout { display: flex; gap: 20px; }
.menu-items   { flex: 1; max-height: 420px; overflow-y: auto; }
.cart-panel   { width: 280px; }
.cart-box {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 16px;
}
.cart-header {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.cart-items   { max-height: 200px; overflow-y: auto; margin-bottom: 12px; }
.empty-cart   { text-align: center; padding: 28px; color: var(--text-faint); font-size: 13px; }
.cart-total {
    display: flex; justify-content: space-between;
    padding: 12px 14px;
    background: rgba(45,212,160,0.06);
    border: 1px solid rgba(45,212,160,0.12);
    border-radius: var(--radius-sm);
    font-weight: 700; font-size: 15px;
    font-family: var(--font-mono);
}

/* ============================================
   BILL MODAL
   ============================================ */
.bill-summary {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.bill-total { display: flex; justify-content: space-between; font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.bill-after-deposit {
    display: flex; justify-content: space-between; margin-top: 10px;
    padding: 10px 14px;
    background: rgba(255,171,0,0.06);
    border: 1px solid rgba(255,171,0,0.15);
    border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
}
.payment-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.payment-methods { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-btn {
    flex: 1; padding: 20px 10px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    color: var(--text);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: transform var(--duration-slow) var(--ease-out),
                border-color var(--duration-slow) var(--ease-out),
                background-color var(--duration-slow) var(--ease-out),
                color var(--duration-slow) var(--ease-out),
                box-shadow var(--duration-slow) var(--ease-out);
    font-family: var(--font-body);
}
.pay-btn:hover {
    border-color: var(--cyan);
    background: var(--cyan-glow);
    color: var(--cyan-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,229,255,0.15);
}
.pay-btn:active { transform: scale(0.97); }
.pay-icon { font-size: 28px; }

/* ============================================
   ORDER HISTORY
   ============================================ */
.order-history-list  { max-height: 400px; overflow-y: auto; margin-bottom: 14px; }
.order-history-total {
    display: flex; justify-content: space-between;
    padding: 16px 18px;
    background: rgba(45,212,160,0.06);
    border: 1px solid rgba(45,212,160,0.12);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 17px;
    font-family: var(--font-mono);
    margin-bottom: 14px;
}

/* ============================================
   TABLE HISTORY
   ============================================ */
.table-history-modal   { max-height: 60vh; overflow-y: auto; }
.history-header        { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; }
.history-table-badge   { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.history-section       { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.04); border-radius: var(--radius-md); padding: 18px; margin-bottom: 12px; }
.history-section-title {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.history-grid          { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.history-item          { display: flex; flex-direction: column; gap: 3px; }
.history-label         { font-size: 11px; color: var(--text-faint); }
.history-value         { font-size: 14px; font-weight: 700; font-family: var(--font-mono); }
.history-orders-list   { display: flex; flex-direction: column; gap: 6px; }
.history-order-item    { display: flex; align-items: center; padding: 10px; background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); }
.history-order-name    { flex: 1; font-size: 14px; }
.history-order-qty     { width: 48px; text-align: center; font-size: 13px; color: var(--text-dim); }
.history-order-price   { width: 80px; text-align: right; font-weight: 700; color: var(--green-light); font-family: var(--font-mono); }

.event-timer-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.3px;
}
.event-timer-banner.phase-normal {
    background: rgba(139,92,246,0.1);
    border-bottom: 1px solid rgba(139,92,246,0.2);
    color: #a78bfa;
}
.event-timer-banner.phase-lastcall {
    background: rgba(251,191,36,0.25);
    border-bottom: 3px solid #fbbf24;
    color: #fbbf24;
    font-size: 16px;
    padding: 14px 20px;
    animation: timerPulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(251,191,36,0.4);
}
.event-timer-banner.phase-salesclosed {
    background: rgba(239,68,68,0.3);
    border-bottom: 3px solid #ef4444;
    color: #fff;
    font-size: 17px;
    padding: 16px 20px;
    animation: timerPulseSales 1s ease-in-out infinite;
    text-shadow: 0 0 12px rgba(239,68,68,0.6);
}
.event-timer-banner.phase-ended {
    background: rgba(239,68,68,0.35);
    border-bottom: 3px solid #ef4444;
    color: #fff;
    font-size: 17px;
    padding: 16px 20px;
    text-shadow: 0 0 12px rgba(239,68,68,0.6);
}
@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes timerPulseSales {
    0%, 100% { opacity: 1; background: rgba(239,68,68,0.3); }
    50% { opacity: 0.85; background: rgba(239,68,68,0.5); }
}
@keyframes phaseAlertIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.low-stock-banner {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}
.history-total         { background: rgba(45,212,160,0.06); border: 1px solid rgba(45,212,160,0.12); }
.history-total-row     { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.history-total-row.history-final {
    font-size: 17px; font-weight: 700;
    padding-top: 12px; margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--cyan-light);
    font-family: var(--font-display);
}
.top-table-item:hover  { background: var(--bg-card-hover) !important; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.4); }

/* ============================================
   CUSTOMER SEARCH DROPDOWN & GUEST DB
   ============================================ */
.customer-search-results {
    position: absolute;
    z-index: 50;
    left: 0; right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    margin-top: 2px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.customer-search-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.customer-search-item:last-child { border-bottom: none; }
.customer-search-item:hover { background: var(--bg-card-hover); }
.customer-search-item .cs-name { font-weight: 600; font-size: 14px; color: var(--text); }
.customer-search-item .cs-phone { font-size: 12px; color: var(--text-dim); }
.customer-search-item .cs-stats { font-size: 11px; color: var(--cyan-light); margin-top: 2px; }
.returning-guest-badge {
    padding: 12px 16px;
    background: rgba(45,212,160,0.06);
    border: 1px solid rgba(45,212,160,0.15);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--green-light);
    margin-bottom: 14px;
}
.customer-sort-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sort-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    font-family: var(--font-body);
}
.sort-btn.active {
    background: rgba(0,229,255,0.12);
    border-color: rgba(0,229,255,0.3);
    color: var(--cyan-light);
}
.sort-btn:active { transform: scale(0.95); }
.sort-btn.desc::after { content: ' ↓'; }
.sort-btn.asc::after { content: ' ↑'; }
.customer-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    margin-bottom: 8px;
}
.customer-card:hover { background: var(--bg-card-hover); border-color: rgba(0,229,255,0.15); }
.customer-card:active { transform: scale(0.98); }
.customer-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.customer-stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}
.customer-stat-card .stat-number {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--cyan-light);
}
.customer-stat-card .stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}
.visit-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

/* ============================================
   LEAD CARD — MORE MENU & NOTES ICON
   ============================================ */
.lead-more-wrap { position: relative; }
.lead-more-menu {
    position: absolute;
    right: 0; top: 100%;
    margin-top: 4px;
    background: var(--bg-surface);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    z-index: 50;
    min-width: 150px;
    padding: 4px 0;
}
.lead-more-menu .more-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
    font-family: var(--font-body);
}
.lead-more-menu .more-item:hover { background: var(--bg-card-hover); }
.notes-icon-btn {
    background: rgba(0,229,255,0.15) !important;
    color: var(--cyan) !important;
    font-size: 14px;
    min-width: 30px;
    padding: 4px 6px !important;
    border-radius: 8px;
    animation: notesPulse 3s ease-in-out infinite;
}
@keyframes notesPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px rgba(0,229,255,0.25); }
}
.notes-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.notes-popup {
    background: var(--bg-surface);
    border: 1px solid rgba(0,229,255,0.12);
    border-radius: var(--radius-md);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 16px 60px rgba(0,0,0,0.6);
}
.notes-popup-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.notes-popup-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
}

/* ============================================
   PC / MOBILE VISIBILITY HELPERS
   ============================================ */
.pc-only { display: inline-flex; }

/* Secondary tabs (Guest DB, Stock, Staff, Edit Floor) live in the burger menu
   at ALL screen sizes — never shown inline in the top bar. */
.move-to-burger { display: none !important; }

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */
/* Burger is visible on every screen size now (holds the secondary tabs +
   logout). Logout lives only inside the burger on all screen sizes. */
.mobile-menu-wrapper { display: block; position: relative; }
.mobile-menu-btn {
    width: 44px; height: 44px;
    font-size: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    display: flex; align-items; center; justify-content: center;
    cursor: pointer;
    min-height: 44px;
    padding: 0;
}
.mobile-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(16,16,24,0.98);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 16px;
    padding: 8px;
    z-index: 500;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 24px rgba(0,229,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: menuSlideIn 0.2s var(--ease-spring);
}
@keyframes menuSlideIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    border-radius: 10px;
    color: rgba(236,232,224,0.85);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
    text-decoration: none;
}
.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: rgba(0,229,255,0.08);
    color: #fff;
}
.mobile-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 8px;
}
.mobile-menu-logout {
    color: #f87171;
}
.mobile-menu-logout:hover,
.mobile-menu-logout:active {
    background: rgba(248,113,113,0.1);
    color: #f87171;
}

/* ============================================
   BOTTOM NAV (mobile only)
   ============================================ */
.bottom-nav { display: none; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
.bottom-sheet-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 199;
}
.bottom-sheet-overlay.active { display: block; }

@media (max-width: 768px) {
    .pc-only { display: none !important; }

    /* Remove decorative login corners on mobile */
    .login-screen::before,
    .login-screen::after { display: none; }

    .header { padding: 10px 14px; height: auto; flex-direction: row; align-items: center; justify-content: space-between; position: relative; }
    .header::after { display: none; }
    .header-left { flex: 1; gap: 10px; }
    .header-title { font-size: 13px; letter-spacing: 2px; }
    .clock { display: none; }
    .header-actions { width: auto; gap: 5px; overflow: visible; flex-wrap: nowrap; padding-bottom: 0; }
    .tab-btn { padding: 9px 12px; font-size: 11px; flex-shrink: 0; }
    .badge { padding: 0 5px; font-size: 9px; margin-left: 4px; }
    .btn-logout { padding: 9px 12px; }
    .mobile-menu-wrapper { display: block; }

    .stats-bar { padding: 8px 12px; height: auto; overflow-x: auto; flex-wrap: nowrap; }
    .stat-item { padding: 5px 10px; font-size: 11px; flex-shrink: 0; }
    .live-indicator { margin-left: 0; }

    .main-content { height: calc(100vh - 110px); }
    .tab-content  { padding: 12px; }
    #leadsTab { padding-left: 0; padding-right: 0; }
    #leadsTab .leads-header { padding-left: 12px; padding-right: 12px; }
    .leads-list { padding: 0 12px; gap: 10px; }
    .lead-card { border-radius: 12px; margin: 0; padding: 14px 14px; }

    .leads-header { flex-direction: column; align-items: stretch; gap: 8px; }
    .search-input { max-width: 100%; }
    .leads-header .btn-primary { margin-left: 0; }
    .filter-group { width: 100%; justify-content: center; }

    .floor-tab { flex-direction: column; position: relative; }
    .floor-container {
        padding: 0;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .floor-plan {
        flex-shrink: 0;
    }

    .table-details-panel {
        position: fixed; bottom: 0; left: 0; right: 0;
        width: 100%; max-height: 60vh; min-height: auto;
        border-left: none; border-top: 1px solid rgba(0,229,255,0.1);
        border-radius: 24px 24px 0 0; padding: 0;
        background: var(--bg-surface);
        transform: translateY(100%); transition: transform var(--duration-slow) var(--ease-spring);
        z-index: 200;
        box-shadow: 0 -12px 60px rgba(0,0,0,0.7);
    }
    .table-details-panel.active { transform: translateY(0); }
    .table-details-panel .empty-state { display: none; }
    .bottom-sheet-handle { width: 38px; height: 3px; background: rgba(0,229,255,0.2); border-radius: 2px; margin: 14px auto; }
    .bottom-sheet-content { padding: 0 16px 20px; overflow-y: auto; max-height: calc(60vh - 30px); }
    .bottom-sheet-header { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 14px; }
    .bottom-sheet-table-icon { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; font-family: var(--font-display); }
    .bottom-sheet-table-info { flex: 1; }
    .bottom-sheet-table-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 3px; }
    .bottom-sheet-table-meta { font-size: 12px; color: var(--text-dim); }
    .bottom-sheet-close { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06); border: none; color: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .bottom-sheet-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .bottom-sheet-actions .btn { padding: 14px; font-size: 13px; }
    .bottom-sheet-actions .btn-full-width { grid-column: span 2; }
    .bottom-sheet-guest { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.04); border-radius: var(--radius-md); padding: 12px; margin-bottom: 14px; }
    .bottom-sheet-guest-name { font-weight: 700; margin-bottom: 5px; }
    .bottom-sheet-guest-details { font-size: 12px; color: var(--text-dim); }
    .bottom-sheet-total { background: rgba(45,212,160,0.06); border: 1px solid rgba(45,212,160,0.12); border-radius: var(--radius-md); padding: 14px; text-align: center; margin-bottom: 14px; }
    .bottom-sheet-total-label { font-size: 11px; color: var(--text-dim); }
    .bottom-sheet-total-value { font-size: 26px; font-weight: 700; color: var(--green-light); font-family: var(--font-display); }

    .stats-grid { grid-template-columns: 1fr; gap: 10px; }

    .employees-header, .menu-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .employee-card, .menu-item-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .employee-card > div:last-child, .menu-item-card > div:last-child { width: 100%; justify-content: flex-end; }
    .menu-categories { gap: 5px; }
    .menu-category-btn { padding: 6px 12px; font-size: 11px; }

    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; padding: 24px 18px; }
    .modal h2 { font-size: 17px; margin-bottom: 18px; }
    .modal-wide { max-width: 100%; }
    .form-row { flex-direction: column; gap: 10px; }
    .modal-actions .btn { padding: 14px; }

    .order-layout { flex-direction: column; gap: 14px; }
    .menu-items   { max-height: none; flex: 1; overflow-y: auto; }
    .cart-panel   { width: 100%; }
    .cart-items   { max-height: 110px; }
    .modal-overlay:has(#orderModal:not(.hidden)) { align-items: stretch; }
    #orderModal .modal { max-height: 100vh; height: 100vh; border-radius: 0; display: flex; flex-direction: column; }
    #orderModal .modal h2 { flex-shrink: 0; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    #orderModal .order-layout { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
    #orderModal .menu-items { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

    .order-categories { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; flex-shrink: 0; -webkit-overflow-scrolling: touch; }
    .order-cat-btn { padding: 7px 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); font-size: 11px; white-space: nowrap; flex-shrink: 0; min-height: auto; border-radius: 20px; font-family: var(--font-body); }
    .order-cat-btn.active { background: var(--cyan-glow); border-color: rgba(0,229,255,0.3); color: var(--cyan-light); }
    .order-menu-list { flex: 1; overflow-y: auto; padding-bottom: 80px; }
    .order-category-section { margin-bottom: 18px; }
    .order-category-title { font-family: var(--font-display); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 8px; padding: 5px 12px; background: rgba(255,255,255,0.02); border-radius: 6px; display: inline-block; }
    .order-items-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .order-item-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.04); border-radius: var(--radius-md); padding: 12px; cursor: pointer; position: relative; transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
    .order-item-card:active { transform: scale(0.97); background: var(--cyan-glow); }
    .order-item-card.in-cart { border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.04); }
    .order-item-card.in-cart:active { transform: none; }
    .order-item-name  { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
    .order-item-price { font-size: 14px; font-weight: 700; color: var(--cyan-light); font-family: var(--font-mono); }

    .mobile-order-footer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 8px; padding: 12px 16px; background: var(--bg-surface); border-top: 1px solid rgba(255,255,255,0.05); z-index: 100; }
    .mobile-order-footer .btn { flex: 1; padding: 15px; font-size: 14px; font-weight: 700; }
    .mobile-order-footer .btn-secondary { flex: 0.4; }
    .mobile-order-footer .btn-primary   { flex: 0.6; }
    .mobile-order-footer .btn-disabled  { opacity: 0.4; background: rgba(255,255,255,0.06); }

    .mobile-cart { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-md); overflow: hidden; }
    .mobile-cart-summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; }
    .mobile-cart-count { font-size: 13px; color: var(--text-dim); }
    .mobile-cart-total { font-size: 17px; font-weight: 700; color: var(--green-light); font-family: var(--font-mono); }
    .mobile-cart-items { border-top: 1px solid rgba(255,255,255,0.05); padding: 10px; max-height: 190px; overflow-y: auto; }
    .mobile-cart-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
    .mobile-cart-item:last-child { border-bottom: none; }
    .mobile-cart-item-name  { flex: 1; font-size: 13px; }
    .mobile-cart-item-price { font-size: 13px; font-weight: 700; color: var(--green-light); font-family: var(--font-mono); }
    .mobile-cart-remove { width: 26px; height: 26px; padding: 0; background: rgba(224,82,82,0.12); color: var(--red-light); border-radius: 6px; font-size: 16px; min-height: auto; }
    .mobile-cart-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); }
    .mobile-cart-actions .btn { flex: 1; padding: 11px; }

    .payment-methods { flex-direction: column; gap: 8px; }
    .pay-btn { flex-direction: row; padding: 14px 18px; gap: 12px; }
    .pay-icon { font-size: 22px; }

    .assign-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    .btn { min-height: 44px; }
    .btn-small { min-height: 36px; }
    .btn-full  { padding: 14px; }
    .input { padding: 14px 16px; font-size: 16px; }
    .checkbox-label { padding: 14px; }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 64px;
        background: rgba(22,22,30,0.95);
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 300;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: rgba(236,232,224,0.5);
        cursor: pointer;
        position: relative;
        padding: 8px 0;
        transition: color var(--duration-normal) var(--ease-out), transform var(--duration-fast) var(--ease-out);
        min-height: auto;
        font-family: var(--font-body);
    }
    .bottom-nav-btn:active { transform: scale(0.93); }
    .bottom-nav-btn.active { color: #fff; }
    .bottom-nav-btn.active .bottom-nav-icon { filter: none; }
    .bottom-nav-icon { font-size: 20px; line-height: 1; }
    .bottom-nav-label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }
    .bottom-nav-badge {
        position: absolute;
        top: 6px; right: calc(50% - 18px);
        min-width: 16px; height: 16px;
        background: var(--cyan);
        color: #050508;
        font-size: 9px; font-weight: 700;
        border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        padding: 0 4px;
        min-height: auto;
    }
    .bottom-nav-badge.pending { background: var(--red-light); color: #fff; }

    .main-content { padding-bottom: 64px; }
    .table-details-panel { bottom: 64px !important; }

    .login-box { padding: 40px 28px; }
}

@media (max-width: 380px) {
    .tab-btn span:not(.badge) { display: none; }
    .tab-btn .badge { margin-left: 0; }
    .assign-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(20,20,20,0.95), rgba(14,14,14,0.98));
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 24px;
    padding: 12px 28px;
    font-size: 13px; font-weight: 600;
    color: var(--text);
    z-index: 9999;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,229,255,0.06);
    animation: toastIn var(--duration-slow) var(--ease-spring);
    white-space: nowrap;
    backdrop-filter: blur(12px);
    font-family: var(--font-body);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    to   { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
}
.toast.toast-exit {
    animation: toastOut var(--duration-normal) var(--ease-in-out) forwards;
}

/* ============================================
   SPLIT BILL
   ============================================ */
.split-bill-trigger {
    width: 100%;
    padding: 14px;
    background: rgba(0,229,255,0.1);
    color: var(--cyan-light);
    border: 1px dashed rgba(0,229,255,0.3);
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color var(--duration-slow) var(--ease-out),
                border-color var(--duration-slow) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    cursor: pointer;
    position: relative;
    z-index: 1;
}
.split-bill-trigger:hover {
    background: rgba(0,229,255,0.18);
    border-color: var(--cyan);
    transform: translateY(-1px);
}
.split-bill-trigger:active { transform: scale(0.97); }

.split-bill-section { margin-bottom: 12px; }

.split-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.split-back-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    border-radius: 8px;
}
.split-back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.split-header-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cyan-light);
}

.split-count-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.split-count-label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}
.split-count-btns { display: flex; gap: 6px; }
.split-count-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-display);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-dim);
    transition: background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.split-count-btn.active,
.split-count-btn:hover {
    background: rgba(0,229,255,0.15);
    border-color: var(--cyan);
    color: var(--cyan-light);
}
.split-count-btn:active { transform: scale(0.95); }

/* Individual split part card */
.split-part {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color var(--duration-slow) var(--ease-out),
                background-color var(--duration-slow) var(--ease-out);
}
.split-part.paid {
    border-color: rgba(74,222,128,0.4);
    background: rgba(74,222,128,0.06);
}

.split-part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.split-part-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
}
.split-part-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.split-part-status.unpaid {
    background: rgba(255,171,0,0.12);
    color: #fbbf24;
}
.split-part-status.is-paid {
    background: rgba(74,222,128,0.15);
    color: #4ade80;
}

.split-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.split-amount-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 8px 12px;
    text-align: center;
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out);
}
.split-amount-input:focus { border-color: var(--cyan); }
.split-amount-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.split-amount-currency {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}

.split-pay-methods {
    display: flex;
    gap: 6px;
}
.split-pay-btn {
    flex: 1;
    padding: 10px 6px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    transition: border-color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    cursor: pointer;
}
.split-pay-btn:hover {
    border-color: var(--cyan);
    background: var(--cyan-glow);
    color: var(--cyan-light);
}
.split-pay-btn:active { transform: scale(0.97); }
.split-pay-btn .split-pay-icon { font-size: 20px; }
.split-pay-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Paid overlay */
.split-paid-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(74,222,128,0.1);
    border-radius: 10px;
    color: #4ade80;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: splitPaidIn 0.3s ease;
}
@keyframes splitPaidIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* Event timer banner — mobile */
@media (max-width: 768px) {
    .event-timer-banner.phase-lastcall {
        flex-direction: column;
        text-align: center;
        gap: 4px;
        font-size: 18px;
        padding: 16px 16px;
    }
    .event-timer-banner.phase-salesclosed {
        flex-direction: column;
        text-align: center;
        gap: 4px;
        font-size: 20px;
        padding: 18px 16px;
    }
    .event-timer-banner.phase-ended {
        flex-direction: column;
        text-align: center;
        gap: 4px;
        font-size: 20px;
        padding: 18px 16px;
    }
}

/* ============================================
   TOUCH DEVICE HOVER GUARDS
   Prevents false hover states on touch devices
   ============================================ */
@media (hover: none) {
    .btn:hover::after { opacity: 0; }
    .btn:hover { transform: none; }
    .btn-primary:hover { box-shadow: 0 4px 20px rgba(0,229,255,0.25), inset 0 1px 0 rgba(255,255,255,0.15); }
    .btn-secondary:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
    .btn-danger:hover { background: rgba(224,82,82,0.1); }
    .tab-btn:hover { color: var(--text-dim); background: transparent; }
    .lead-card:hover { background: var(--bg-card); border-color: rgba(255,255,255,0.04); box-shadow: none; }
    .table-item:hover { transform: none; filter: none; }
    .employee-card:hover { background: var(--bg-card); border-color: rgba(255,255,255,0.04); }
    .menu-category-btn:hover { color: var(--text-dim); border-color: rgba(255,255,255,0.06); }
    .menu-item-card:hover { background: var(--bg-card); border-color: rgba(255,255,255,0.04); }
    .pay-btn:hover { border-color: rgba(255,255,255,0.06); background: transparent; color: var(--text); transform: none; box-shadow: none; }
    .checkbox-label:hover { background: transparent; border-color: rgba(255,255,255,0.08); }
    .customer-search-item:hover { background: transparent; }
    .customer-card:hover { background: var(--bg-card); border-color: rgba(255,255,255,0.04); }
    .top-table-item:hover { background: var(--bg-card) !important; }
    .lead-more-menu .more-item:hover { background: transparent; }
    .split-bill-trigger:hover { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.2); transform: none; }
    .split-back-btn:hover { background: transparent; color: var(--text-dim); }
    .split-count-btn:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: var(--text-dim); }
    .split-pay-btn:hover { border-color: rgba(255,255,255,0.06); background: transparent; color: var(--text-dim); }
}

/* Pre-order alert button — draws staff to confirm a pending pre-order before anything else */
@keyframes preorderGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.45), 0 0 12px 2px rgba(239,68,68,0.30); }
    50%      { box-shadow: 0 0 0 5px rgba(239,68,68,0.0), 0 0 22px 6px rgba(239,68,68,0.60); }
}
.preorder-alert-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: 1px solid rgba(239,68,68,0.7) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    padding: 15px 14px !important;
    letter-spacing: 0.2px;
    animation: preorderGlow 1.7s ease-in-out infinite;
}
.preorder-alert-btn:hover { filter: brightness(1.08); }
