:root {
    --primary: #ff6b6b;
    --primary-hover: #ff5252;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.dark-mode {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333333;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Modality Toggle */
.modality-toggle {
    display: inline-flex;
    background: var(--surface);
    border-radius: 50px;
    padding: 0.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.modality-toggle label {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s;
}

.modality-toggle input[type="radio"] {
    display: none;
}

.modality-toggle input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
}

/* Menu Grid */
.menu-section {
    margin-bottom: 3rem;
}

.menu-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.menu-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.menu-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    padding: 0 1rem;
}

.menu-item {
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.menu-item td {
    padding: 1rem;
    vertical-align: middle;
}

.menu-item td:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    font-weight: 600;
}

.menu-item td:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    text-align: center;
    font-family: inherit;
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
}

/* Order Summary */
.summary-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
}

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

.legal-warning {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Kitchen & Dashboard specific */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.order-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    animation: fadeIn 0.3s ease-out;
}

.order-card h3 {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.order-item-list {
    margin-top: 1rem;
    list-style: none;
}

.order-item-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.order-item-list li:last-child {
    border-bottom: none;
}

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

/* Two column layout for client */
.client-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

@media (max-width: 768px) {
    .client-layout {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .menu-item td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .modality-toggle label {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.mesa-input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Dashboard Premium UI Unification */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px 32px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.app-header-title {
    margin: 0;
}

.app-header-title h1 {
    color: #B5161E;
    font-weight: 900;
    margin-bottom: 4px;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

.app-header-title p {
    color: #888;
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.auth-btn-logout {
    background: #fff;
    color: #B5161E;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    border: 2px solid #fce8e8;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(181, 22, 30, 0.05);
}

.auth-btn-logout:hover {
    background: #B5161E;
    color: white;
    border-color: #B5161E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(181, 22, 30, 0.2);
}

body.dark-mode .app-header {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
body.dark-mode .app-header-title h1 { color: #ff6b6b; }
body.dark-mode .app-header-title p { color: #888; }
body.dark-mode .auth-btn-logout {
    background: rgba(255, 107, 107, 0.05);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.2);
}
body.dark-mode .auth-btn-logout:hover {
    background: #ff6b6b;
    color: #121212;
}

/* Premium Login specific */
.glass-login {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    max-width: 420px;
    margin: 6rem auto;
    text-align: center;
}
.glass-login::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: linear-gradient(90deg, #B5161E, #ff6b6b);
}
