@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Theme dynamic slots */
    --theme-primary: #e10600;
    --theme-primary-rgb: 225, 6, 0;
    --theme-primary-hover: #b80500;
    --theme-accent: #00d278;
    --theme-accent-rgb: 0, 210, 120;
    --theme-bg: #0f0f14;
    --theme-bg-card: #15151f;
    --theme-glow: 0 0 15px rgba(225, 6, 0, 0.4);
    --theme-glow-accent: 0 0 15px rgba(0, 210, 120, 0.4);

    /* Original variable redirects for dynamic updates */
    --f1-red: var(--theme-primary);
    --f1-red-rgb: var(--theme-primary-rgb);
    --f1-red-hover: var(--theme-primary-hover);
    --bg-dark: var(--theme-bg);
    --bg-card: var(--theme-bg-card);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --warning-yellow: #f8c102;
    --safety-car-orange: #ff8000;
    --drs-green: var(--theme-accent);
    --drs-green-rgb: var(--theme-accent-rgb);
    --purple-compound: #b134eb;
    --yellow-compound: #ffd000;
    --white-compound: #ffffff;
    --glow-red: var(--theme-glow);
    --glow-green: var(--theme-glow-accent);
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--f1-red);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--f1-red-hover);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.5s ease;
    background-image: 
        radial-gradient(at 0% 0%, rgba(var(--f1-red-rgb), 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(var(--drs-green-rgb), 0.04) 0px, transparent 50%),
        linear-gradient(rgba(255,255,255,0.005) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.005) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
    
    /* Kiosk lockdowns */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

/* Re-enable selection for input fields */
input, textarea, select, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Carbon Fiber Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px,
        linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0px,
        linear-gradient(27deg, #222 5px, transparent 5px) 0px 10px,
        linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px,
        linear-gradient(90deg, #1b1b1b 10px, transparent 10px),
        linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
    background-size: 20px 20px;
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
}

/* Header & Timing Screens */
header {
    background: linear-gradient(180deg, #09090c 0%, rgba(15, 15, 20, 0.95) 100%);
    border-bottom: 2px solid var(--f1-red);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f1-badge {
    background-color: var(--f1-red);
    color: white;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    padding: 4px 12px;
    border-radius: 4px;
    skew: -15deg;
    transform: skewX(-15deg);
    box-shadow: var(--glow-red);
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.25rem;
}

.logo-text span {
    color: var(--f1-red);
}

.timing-screen {
    display: flex;
    gap: 20px;
    font-family: var(--font-display);
    font-size: 0.85rem;
}

.timing-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timing-item.live::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--drs-green);
    border-radius: 50%;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% { opacity: 0.3; }
    100% { opacity: 1; box-shadow: var(--glow-green); }
}

.timing-label {
    color: var(--text-secondary);
}

.timing-value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Kiosk Layout */
.kiosk-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: calc(100vh - 75px);
    overflow: hidden;
}

@media (max-width: 1024px) {
    .kiosk-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

.menu-section {
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 80%;
    background-color: var(--f1-red);
}

.snacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Card Styling - F1 Kiosk Cards */
.snack-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1e1e2d 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.snack-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--f1-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.snack-card:hover {
    transform: translateY(-5px);
    border-color: rgba(225, 6, 0, 0.3);
    box-shadow: 0 8px 30px rgba(225, 6, 0, 0.15);
}

.snack-card:hover::before {
    transform: scaleX(1);
}

.snack-image-container {
    height: 160px;
    background-color: #0c0c10;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.snack-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.5s ease;
}

.snack-card:hover .snack-image {
    transform: scale(1.08);
}

.snack-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.85);
    border: 1px solid var(--f1-red);
    padding: 3px 8px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--f1-red);
    border-radius: 4px;
    text-transform: uppercase;
}

.snack-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.snack-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.snack-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.snack-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.snack-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
}

.btn-add {
    background: var(--f1-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.btn-add:hover {
    background: var(--f1-red-hover);
    transform: scale(1.05);
    box-shadow: var(--glow-red);
}

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

/* Compound Config Modal / Customization */
.custom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal {
    background: var(--bg-card);
    border: 2px solid var(--f1-red);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-overlay.active .custom-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: #fff;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-close:hover {
    color: var(--f1-red);
}

.compound-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
}

.compound-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.compound-option {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.2);
}

.compound-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.compound-option.selected {
    background: rgba(225, 6, 0, 0.1);
}

.compound-option.selected[data-compound="soft"] {
    border-color: var(--purple-compound);
    box-shadow: 0 0 10px rgba(177, 52, 235, 0.3);
}
.compound-option.selected[data-compound="medium"] {
    border-color: var(--yellow-compound);
    box-shadow: 0 0 10px rgba(255, 208, 0, 0.3);
}
.compound-option.selected[data-compound="hard"] {
    border-color: var(--white-compound);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.tyre-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 4px solid transparent;
}
.compound-option[data-compound="soft"] .tyre-dot { border-color: var(--purple-compound); }
.compound-option[data-compound="medium"] .tyre-dot { border-color: var(--yellow-compound); }
.compound-option[data-compound="hard"] .tyre-dot { border-color: var(--white-compound); }

.compound-option-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
}

.compound-option-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.extra-options {
    margin-bottom: 2rem;
}

.drs-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.drs-checkbox:hover {
    border-color: var(--drs-green);
    background: rgba(0, 210, 120, 0.05);
}

.drs-checkbox input {
    display: none;
}

.drs-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drs-checkbox input:checked + .drs-indicator {
    border-color: var(--drs-green);
    background-color: var(--drs-green);
}

.drs-checkbox input:checked + .drs-indicator::after {
    content: '✓';
    color: black;
    font-weight: 900;
    font-size: 0.75rem;
}

.drs-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.drs-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.btn-confirm {
    width: 100%;
    background: var(--drs-green);
    color: black;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-confirm:hover {
    box-shadow: var(--glow-green);
    transform: scale(1.02);
}

/* Sidebar Cart (Pit Lane Order Summary) */
.pitlane-sidebar {
    background: linear-gradient(180deg, #111116 0%, #0c0c0e 100%);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-clear-cart {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
}

.btn-clear-cart:hover {
    color: var(--f1-red);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-empty {
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 15px;
}

.cart-empty-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.cart-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

.cart-item-info {
    max-width: 70%;
}

.cart-item-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-item-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cart-item-action {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

.btn-remove-item:hover {
    color: var(--f1-red);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
}

.total-label {
    text-transform: uppercase;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.btn-checkout {
    width: 100%;
    background: var(--f1-red);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--glow-red);
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
}

.btn-checkout:hover {
    background: var(--f1-red-hover);
    transform: scale(1.02);
}

.btn-checkout:disabled {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: not-allowed;
    clip-path: none;
}

/* Lights Out Sequence Screen (Countdown Overlay) */
.lights-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lights-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gantry {
    display: flex;
    gap: 20px;
    background: #111;
    padding: 15px 30px;
    border-radius: 12px;
    border: 3px solid #333;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.light-post {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.light-bulb {
    width: 40px;
    height: 40px;
    background-color: #222;
    border-radius: 50%;
    border: 4px solid #111;
    transition: background-color 0.1s ease, box-shadow 0.1s ease;
}

.light-bulb.red {
    background-color: #ff0000;
    box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
}

.light-bulb.green {
    background-color: var(--drs-green);
    box-shadow: 0 0 20px var(--drs-green), 0 0 40px var(--drs-green);
}

.lights-message {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-align: center;
    height: 40px;
}

/* Grid Order Progress Tracking (Popup/Modal on kiosk) */
.order-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideUp 0.4s ease;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.progress-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.progress-track {
    position: relative;
    height: 40px;
    background: #09090c;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    overflow: hidden;
}

.progress-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 4px;
    background: #222;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-track-fill {
    position: absolute;
    top: 50%;
    left: 20px;
    height: 4px;
    background: var(--f1-red);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.5s ease;
}

.progress-node {
    width: 24px;
    height: 24px;
    background: #222;
    border: 3px solid #111;
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

.progress-node.active {
    background: var(--f1-red);
    border-color: #fff;
    box-shadow: var(--glow-red);
    transform: scale(1.15);
}

.progress-node.completed {
    background: var(--drs-green);
    border-color: #fff;
    box-shadow: var(--glow-green);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.progress-labels span.active {
    color: #fff;
}

/* Staff Login Style */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, #111116 100%);
    border: 2px solid var(--f1-red);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.login-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, transparent 50%, rgba(225, 6, 0, 0.1) 50%);
}

.login-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

.login-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.login-input {
    width: 100%;
    background: #09090c;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--f1-red);
}

.btn-login {
    width: 100%;
    background: var(--f1-red);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    box-shadow: var(--glow-red);
}

.btn-login:hover {
    background: var(--f1-red-hover);
    transform: translateY(-2px);
}

.login-error {
    background: rgba(225, 6, 0, 0.15);
    border: 1px solid var(--f1-red);
    color: #ff8b8b;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Staff Dashboard Style */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    color: white;
    border-color: var(--f1-red);
    background: rgba(225, 6, 0, 0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-col {
    background: #111116;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.col-header {
    padding: 1.25rem;
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--col-border, var(--border-color));
    background: rgba(0,0,0,0.15);
    border-radius: 12px 12px 0 0;
}

.col-header .col-count {
    background: rgba(255,255,255,0.08);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.col-orders {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: 600px;
}

/* Dashboard Order Card */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.order-card:hover {
    border-color: rgba(255,255,255,0.15);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.car-number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--f1-red);
}

.order-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.order-items-list {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.order-item-desc {
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
}

.order-item-customizations {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-left: 10px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.order-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.btn-status-change {
    flex-grow: 1;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-status-change.next {
    background: var(--btn-next-bg, var(--f1-red));
    color: var(--btn-next-color, white);
}

.btn-status-change.next:hover {
    filter: brightness(1.1);
}

.btn-status-change.cancel {
    background: rgba(225, 6, 0, 0.1);
    color: var(--f1-red);
    border: 1px solid rgba(225, 6, 0, 0.2);
}

.btn-status-change.cancel:hover {
    background: var(--f1-red);
    color: white;
}

/* Compound Pills / Badges */
.pill-compound {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.pill-compound.soft { background-color: var(--purple-compound); }
.pill-compound.medium { background-color: var(--yellow-compound); }
.pill-compound.hard { background-color: var(--white-compound); }

.pill-drs {
    background: rgba(0, 210, 120, 0.15);
    color: var(--drs-green);
    border: 1px solid rgba(0, 210, 120, 0.3);
    padding: 1px 4px;
    font-size: 0.65rem;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 5px;
}

/* ==========================================
   THEME SYSTEMS DEFINITIONS
   ========================================== */

/* Formula 1 Theme Variables */
body.theme-f1 {
    --theme-primary: #e10600;
    --theme-primary-rgb: 225, 6, 0;
    --theme-primary-hover: #b80500;
    --theme-accent: #00d278;
    --theme-accent-rgb: 0, 210, 120;
    --theme-bg: #0f0f14;
    --theme-bg-card: #15151f;
    --theme-glow: 0 0 15px rgba(225, 6, 0, 0.4);
    --theme-glow-accent: 0 0 15px rgba(0, 210, 120, 0.4);
}

/* Star Wars Theme Variables & Effects */
body.theme-starwars {
    --theme-primary: #00bfff; /* Lightsaber Blue */
    --theme-primary-rgb: 0, 191, 255;
    --theme-primary-hover: #0088cc;
    --theme-accent: #39ff14; /* Lightsaber Green */
    --theme-accent-rgb: 57, 255, 20;
    --theme-bg: #03030c;
    --theme-bg-card: #0a0b16;
    --theme-glow: 0 0 20px rgba(0, 191, 255, 0.6);
    --theme-glow-accent: 0 0 20px rgba(57, 255, 20, 0.6);
    
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 80px 140px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 130px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 170px 100px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 240px 180px, #fff, rgba(0,0,0,0)),
        radial-gradient(at 0% 0%, rgba(0, 191, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(57, 255, 20, 0.05) 0px, transparent 50%);
    background-size: 250px 250px, 200px 200px, 180px 180px, 300px 300px, 220px 220px, 280px 280px, 100% 100%, 100% 100%;
    animation: starwars-twinkle 8s infinite alternate ease-in-out;
}
@keyframes starwars-twinkle {
    0% { filter: brightness(0.9); }
    100% { filter: brightness(1.25); }
}

/* Cyberpunk Theme Variables & Effects */
body.theme-cyberpunk {
    --theme-primary: #ff007f; /* Neon Hot Pink */
    --theme-primary-rgb: 255, 0, 127;
    --theme-primary-hover: #d6006b;
    --theme-accent: #00ffff; /* Neon Cyan */
    --theme-accent-rgb: 0, 255, 255;
    --theme-bg: #0d0115;
    --theme-bg-card: #150223;
    --theme-glow: 0 0 20px rgba(255, 0, 127, 0.7);
    --theme-glow-accent: 0 0 20px rgba(0, 255, 255, 0.7);
    
    background-image: 
        linear-gradient(rgba(255, 0, 127, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 127, 0.04) 1px, transparent 1px),
        radial-gradient(at 0% 0%, rgba(255, 0, 127, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 255, 255, 0.06) 0px, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    animation: cyberpunk-grid-move 30s linear infinite;
}
@keyframes cyberpunk-grid-move {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 40px 40px, 40px 40px; }
}

/* Cyberpunk scanlines */
body.theme-cyberpunk::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.25;
}

/* ==========================================
   SETTINGS SIDEBAR STYLE (Drawer Panel)
   ========================================== */
.settings-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: rgba(15, 15, 25, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    border-left: 2px solid var(--theme-primary);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.settings-sidebar.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.settings-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
}

.btn-close-settings {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close-settings:hover {
    color: var(--theme-primary);
}

.settings-content h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--theme-primary-rgb), 0.25);
}

.theme-preview {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-preview.f1-preview {
    background: #e10600;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.5);
}

.theme-preview.starwars-preview {
    background: linear-gradient(135deg, #00bfff, #39ff14);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.theme-preview.cyberpunk-preview {
    background: linear-gradient(135deg, #ff007f, #00ffff);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.theme-info h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.theme-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==========================================
   THEMED OVERRIDES FOR THE LIGHTS OUT GANTRY
   ========================================== */

/* Star Wars lightsaber hilts & blades */
.theme-starwars .gantry {
    background: #05050f;
    border-color: #111124;
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.15);
}

.theme-starwars .light-bulb {
    width: 16px;
    height: 60px;
    border-radius: 6px;
    background-color: #333; /* Dark Hilt */
    border: 2px solid #1a1a1a;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.theme-starwars #bulb-1.red { background-color: #00bfff; box-shadow: 0 0 20px #00bfff, 0 0 40px #00bfff, inset 0 0 6px #fff; border-color: #00bfff; }
.theme-starwars #bulb-2.red { background-color: #39ff14; box-shadow: 0 0 20px #39ff14, 0 0 40px #39ff14, inset 0 0 6px #fff; border-color: #39ff14; }
.theme-starwars #bulb-3.red { background-color: #b134eb; box-shadow: 0 0 20px #b134eb, 0 0 40px #b134eb, inset 0 0 6px #fff; border-color: #b134eb; }
.theme-starwars #bulb-4.red { background-color: #ffd000; box-shadow: 0 0 20px #ffd000, 0 0 40px #ffd000, inset 0 0 6px #fff; border-color: #ffd000; }
.theme-starwars #bulb-5.red { background-color: #ff3333; box-shadow: 0 0 20px #ff3333, 0 0 40px #ff3333, inset 0 0 6px #fff; border-color: #ff3333; }

.theme-starwars .light-bulb.green {
    background-color: #00bfff;
    box-shadow: 0 0 25px #00bfff, 0 0 50px #00bfff, inset 0 0 8px #fff;
    border-color: #00bfff;
}

/* Cyberpunk matrix grid blocks */
.theme-cyberpunk .gantry {
    background: #08010f;
    border-color: #ff007f;
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.2);
}

.theme-cyberpunk .light-bulb {
    width: 40px;
    height: 40px;
    border-radius: 2px; /* Square pixel */
    background-color: #11001c;
    border: 2px solid #2d0046;
}

.theme-cyberpunk .light-bulb.red {
    background-color: #ff007f;
    box-shadow: 0 0 20px #ff007f, 0 0 45px #ff007f, inset 0 0 10px rgba(255,255,255,0.4);
    border-color: #ff007f;
}

.theme-cyberpunk .light-bulb.green {
    background-color: #00ffff;
    box-shadow: 0 0 20px #00ffff, 0 0 45px #00ffff, inset 0 0 10px rgba(255,255,255,0.4);
    border-color: #00ffff;
}

/* ==========================================
   KIOSK TELEMETRY & OFFLINE OVERLAY
   ========================================== */

/* Telemetry Badge */
.kiosk-telemetry {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.85rem;
}

.kiosk-telemetry.active {
    display: inline-flex;
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb, var(--f1-red-rgb)), 0.08);
    box-shadow: 0 0 10px rgba(var(--theme-primary-rgb, var(--f1-red-rgb)), 0.2);
}

.kiosk-telemetry .telemetry-label {
    color: var(--text-secondary);
}

.kiosk-telemetry .telemetry-value {
    color: var(--text-primary);
    font-weight: 700;
}

.kiosk-telemetry .telemetry-icon {
    color: var(--theme-primary);
    font-size: 0.95rem;
}

.kiosk-telemetry.active .telemetry-icon {
    animation: telemetry-pulse 2s infinite alternate;
}

@keyframes telemetry-pulse {
    0% { filter: drop-shadow(0 0 1px var(--theme-primary)); opacity: 0.7; }
    100% { filter: drop-shadow(0 0 4px var(--theme-primary)); opacity: 1; }
}

/* Offline Overlay */
.offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    font-family: var(--font-body);
    color: var(--text-primary);
}

.offline-overlay.active {
    display: flex;
}

.offline-card {
    background: var(--theme-bg-card, var(--bg-card));
    border: 2px solid var(--theme-primary);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 3rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--theme-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: pulse-border 2s infinite alternate ease-in-out;
}

@keyframes pulse-border {
    0% {
        border-color: var(--theme-primary);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--theme-glow);
    }
    100% {
        border-color: var(--theme-accent, #00d278);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--theme-glow-accent);
    }
}

.offline-icon {
    font-size: 4rem;
    color: var(--theme-primary);
    animation: blink-warning 1s infinite alternate ease-in-out;
}

@keyframes blink-warning {
    0% { opacity: 0.4; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

.offline-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    margin-top: 10px;
}

.offline-message {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.offline-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--theme-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Category Filtering Tabs */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
}

.category-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.category-tab.active {
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb, var(--f1-red-rgb)), 0.1);
    color: #fff;
    box-shadow: 0 0 15px rgba(var(--theme-primary-rgb, var(--f1-red-rgb)), 0.2);
}

/* Snack Image Fallback styles for missing images */
.snack-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(var(--theme-primary-rgb), 0.25) 0%, rgba(var(--theme-primary-rgb), 0.05) 70%, transparent 100%);
    position: relative;
    overflow: hidden;
    animation: fallback-breathing 4s infinite alternate ease-in-out;
}

.snack-image-fallback.drink-fallback {
    background: radial-gradient(circle at center, rgba(var(--theme-accent-rgb), 0.25) 0%, rgba(var(--theme-accent-rgb), 0.05) 70%, transparent 100%);
}

.fallback-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 8px rgba(var(--theme-primary-rgb), 0.6));
    animation: float-emoji 3s infinite ease-in-out;
    display: inline-block;
}

.drink-fallback .fallback-emoji {
    filter: drop-shadow(0 0 8px rgba(var(--theme-accent-rgb), 0.6));
}

@keyframes fallback-breathing {
    0% {
        opacity: 0.75;
    }
    100% {
        opacity: 1;
    }
}

@keyframes float-emoji {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-6px) scale(1.05) rotate(3deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}


