/* System Design: Aetheria Bistro - Premium styling */

:root {
    /* Light Mode Palette */
    --bg-primary: #fcfbfa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f2eb;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --text-primary: #1d1a17;
    --text-secondary: #6e645a;
    --accent-gold: #b38f4f;
    --accent-gold-hover: #9c7b41;
    --accent-gold-light: rgba(179, 143, 79, 0.08);
    --accent-waiter: #1e3a8a;
    --accent-waiter-hover: #172e6b;
    --accent-waiter-light: rgba(30, 58, 138, 0.08);
    --border-color: #e8e3d7;
    --input-focus: rgba(179, 143, 79, 0.25);
    
    /* Semantic Colors */
    --color-success: #1b8755;
    --color-success-light: rgba(27, 135, 85, 0.1);
    --color-warning: #d97706;
    --color-warning-light: rgba(217, 119, 6, 0.1);
    --color-danger: #dc2626;
    --color-danger-light: rgba(220, 38, 38, 0.1);
    
    /* Layout Constants */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(29, 26, 23, 0.03);
    --shadow-md: 0 10px 30px rgba(29, 26, 23, 0.06);
    --shadow-lg: 0 20px 50px rgba(29, 26, 23, 0.1);
    --shadow-gold: 0 8px 24px rgba(179, 143, 79, 0.15);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-primary: #0e0d0c;
    --bg-secondary: #171513;
    --bg-tertiary: #201d1a;
    --bg-glass: rgba(23, 21, 19, 0.85);
    --text-primary: #f2ede4;
    --text-secondary: #a39689;
    --accent-gold: #dfba7f;
    --accent-gold-hover: #cfa868;
    --accent-gold-light: rgba(223, 186, 127, 0.12);
    --accent-waiter: #4f46e5;
    --accent-waiter-hover: #4338ca;
    --accent-waiter-light: rgba(79, 70, 229, 0.15);
    --border-color: #2e2823;
    --input-focus: rgba(223, 186, 127, 0.3);
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 8px 24px rgba(223, 186, 127, 0.08);
}

/* General Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Button & Link Reset */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition-smooth);
}

a {
    color: inherit;
    text-decoration: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Utility buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    width: auto;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-warning {
    background-color: var(--color-warning);
    color: white;
}

.btn-warning:hover {
    background-color: #b45309;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
}

.btn-success:hover {
    background-color: #15653b;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* App Header Section */
.app-header {
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-icon {
    font-size: 1.8rem;
    color: var(--accent-gold);
    animation: rotateUtensils 10s linear infinite;
}

.logo-text h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: var(--text-primary);
}

.logo-text span {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--accent-gold);
    font-weight: 700;
    display: block;
}

/* Buscador de Platos */
.search-bar-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.95rem;
    pointer-events: none;
}

#menu-search {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

#menu-search:focus {
    background-color: var(--bg-secondary);
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 4px;
}

.clear-search-btn:hover {
    color: var(--color-danger);
}

/* Header Controls: Theme and Waiter Switch */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.control-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

/* Switch Slider styling (Modo Mesero) */
.waiter-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-tertiary);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.waiter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-secondary);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-waiter);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Héroe Banner */
.hero-banner {
    background-image: url('restaurant_hero_banner.png');
    background-size: cover;
    background-position: center;
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(29, 26, 23, 0.45) 0%, rgba(29, 26, 23, 0.75) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 700px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.01em;
}

.hero-content p {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Main Container Layout */
.main-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

.menu-section {
    min-width: 0; /* Prevents flex/grid blowouts */
}

/* Allergen Filters Section */
.allergen-filter-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.allergen-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.allergen-title i {
    color: var(--accent-gold);
}

.allergen-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allergen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.allergen-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.allergen-btn.active {
    background-color: var(--color-danger-light);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* Categoría Navbar */
.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    scrollbar-width: thin;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 30px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.category-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-gold);
}

.category-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-secondary);
    border-color: var(--text-primary);
}

/* Filter Status Message */
.filter-status-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--accent-gold-light);
    border: 1px solid var(--accent-gold);
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.reset-link {
    text-decoration: underline;
    font-weight: 700;
    color: var(--accent-gold);
}

.reset-link:hover {
    color: var(--accent-gold-hover);
}

/* Grid de Platos */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Tarjeta de Plato (Dish Card) */
.dish-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-bounce);
    position: relative;
    cursor: pointer;
}

.dish-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.dish-image-wrapper {
    position: relative;
    height: 190px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

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

.dish-card:hover .dish-image {
    transform: scale(1.05);
}

/* Badge de alérgenos sobre la foto */
.allergen-badges-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.allergen-icon-tag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(29, 26, 23, 0.85);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Alerta de alérgeno seleccionado */
.allergen-warning-banner {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    background-color: var(--color-danger);
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    animation: slideInDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Información del Plato */
.dish-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dish-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.dish-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.dish-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.dish-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Botón de añadir rápido */
.add-fast-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(179, 143, 79, 0.2);
}

.add-fast-btn:hover {
    background-color: var(--accent-gold-hover);
    transform: scale(1.1);
}

/* Control de cantidad en tarjeta si ya está agregado */
.card-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-tertiary);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    /* Prevents card click event from firing */
    z-index: 5;
}

.card-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.card-qty-btn:hover {
    background-color: var(--accent-gold);
    color: white;
}

.card-qty-num {
    font-size: 0.85rem;
    font-weight: 700;
    width: 14px;
    text-align: center;
}

/* No Results Section */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* Sidebar Section */
.sidebar-section {
    position: sticky;
    top: 100px;
    height: calc(100vh - 140px);
}

.sidebar-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.sidebar-card.waiter-card {
    border-color: var(--accent-waiter);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.08);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.waiter-header-accent {
    background-color: var(--accent-waiter-light);
    border-bottom: 1px solid rgba(30, 58, 138, 0.15);
}

.waiter-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.waiter-badge-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-waiter);
    background-color: rgba(30, 58, 138, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.sidebar-header.waiter-header-accent h2 {
    color: var(--accent-waiter);
}

/* Selector de mesa en sidebar */
.table-selector-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-select {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    cursor: pointer;
}

.sidebar-select.waiter-select {
    border-color: var(--accent-waiter);
    background-color: var(--bg-secondary);
}

/* Status y tiempo del mesero */
.waiter-table-info {
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-tertiary);
    padding: 8px 20px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
}

.status-empty {
    background-color: var(--border-color);
    color: var(--text-secondary);
}

.status-ordering {
    background-color: var(--color-warning-light);
    color: var(--color-warning);
}

.status-waiting {
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--accent-waiter);
}

.status-eating {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

/* Cart Items Container */
.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.empty-cart-state i {
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--border-color);
}

.empty-cart-state p {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-cart-state span {
    font-size: 0.75rem;
}

/* Item de Cart (Cart Item Row) */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    animation: fadeInSlideUp 0.3s ease;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--bg-tertiary);
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-notes {
    font-size: 0.72rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

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

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Waiter Note Button y Field */
.waiter-note-btn {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.waiter-note-btn.active {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.cart-item-note-input {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 6px;
    font-size: 0.75rem;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-tertiary);
}

.cart-item-grid-layout {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.qty-control-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-small-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-small-btn:hover {
    background-color: var(--accent-gold);
    color: white;
}

.qty-small-val {
    font-size: 0.8rem;
    font-weight: 700;
    width: 12px;
    text-align: center;
}

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

.remove-cart-item:hover {
    color: var(--color-danger);
}

/* Cart Summary Footer */
.cart-summary-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.discount-row {
    color: var(--color-danger);
}

.service-row {
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.total-row {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
    margin-bottom: 10px;
}

/* Extra options for Waiter Mode */
.waiter-extra-options {
    background-color: var(--bg-tertiary);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.option-toggle label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Waiter Actions Grid */
.waiter-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

/* Kitchen Simulation widget in Sidebar */
.kitchen-simulation-panel {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-bottom: 8px;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.sim-header i {
    color: var(--accent-gold);
}

.sim-status-tag {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold);
    padding: 1px 6px;
    border-radius: 4px;
}

.sim-progress-bar-bg {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sim-progress-fill {
    height: 100%;
    background-color: var(--accent-gold);
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s linear;
}

/* En preparación progress glow */
.sim-progress-fill.cooking {
    background-color: var(--accent-waiter);
    background-image: linear-gradient(
        45deg, 
        rgba(255, 255, 255, .15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, .15) 50%, 
        rgba(255, 255, 255, .15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

.sim-progress-fill.ready {
    background-color: var(--color-success);
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

.sim-steps {
    display: flex;
    justify-content: space-between;
}

.sim-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.4;
    transition: var(--transition-smooth);
}

.sim-step.active {
    opacity: 1;
    color: var(--accent-gold);
}

.sim-step.active-cooking {
    opacity: 1;
    color: var(--accent-waiter);
}

.sim-step.active-ready {
    opacity: 1;
    color: var(--color-success);
    animation: bounceBell 1s infinite alternate;
}

@keyframes bounceBell {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* Modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(29, 26, 23, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    z-index: 10;
}

.modal-close-btn:hover {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    height: 100%;
}

.modal-image-area {
    position: relative;
    background-color: var(--bg-tertiary);
    height: 100%;
    min-height: 300px;
}

.modal-image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--accent-gold);
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-details-area {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-details-area h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-meta .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-meta i {
    color: var(--accent-gold);
}

.modal-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin-bottom: 6px;
}

.modal-section p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.allergen-warnings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.allergen-warning-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    background-color: var(--color-warning-light);
    color: var(--color-warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.allergen-warning-item.danger-item {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    border-color: rgba(220, 38, 38, 0.2);
}

.allergen-warning-item.safe-item {
    background-color: var(--color-success-light);
    color: var(--color-success);
    border-color: rgba(27, 135, 85, 0.2);
}

/* Modificaciones especiales e instrucciones */
.modal-order-section {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-notes-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-notes-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.modal-notes-field input {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.modal-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
    background-color: var(--bg-tertiary);
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.qty-btn:hover {
    background-color: var(--accent-gold);
    color: white;
}

.qty-number {
    font-size: 1rem;
    font-weight: 700;
    width: 20px;
    text-align: center;
}

.modal-details-area .btn {
    flex-grow: 1;
}

/* Glassmorphism utility */
.glass-effect {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modal de Ticket de Cobro */
.ticket-modal {
    max-width: 440px;
    padding: 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.ticket-container {
    background-color: #ffffff;
    color: #000000; /* Siempre negro para simular impresión térmica */
    padding: 30px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    line-height: 1.4;
}

.ticket-container * {
    font-family: 'Courier New', Courier, monospace;
}

.ticket-header {
    text-align: center;
    margin-bottom: 20px;
}

.ticket-logo {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.ticket-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.ticket-header p {
    margin: 2px 0;
    font-size: 0.75rem;
}

.ticket-header h3 {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ticket-divider {
    border-top: 1px dashed #000000;
    margin: 15px 0;
    height: 0;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.ticket-table th {
    border-bottom: 1px dashed #000000;
    padding: 6px 0;
    font-weight: 700;
    text-align: left;
}

.ticket-table td {
    padding: 8px 0;
    vertical-align: top;
}

.ticket-table th.text-right,
.ticket-table td.text-right {
    text-align: right;
}

.text-right {
    text-align: right;
}

.ticket-item-subnote {
    font-size: 0.72rem;
    display: block;
    margin-top: 2px;
    color: #444444;
    padding-left: 10px;
}

.ticket-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-total-row {
    display: flex;
    justify-content: space-between;
}

.ticket-grand-total {
    font-size: 1rem;
    font-weight: 800;
    border-top: 1px dashed #000000;
    padding-top: 8px;
    margin-top: 4px;
}

.ticket-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.75rem;
}

.ticket-footer p {
    margin: 4px 0;
}

.ticket-footer .small-text {
    font-size: 0.65rem;
    margin-top: 12px;
    opacity: 0.6;
}

.ticket-modal-actions {
    background-color: var(--bg-tertiary);
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

/* Animations */
@keyframes rotateUtensils {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* Media Queries for Responsiveness */
@media (max-width: 1100px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar-section {
        position: static;
        height: auto;
    }
    
    .sidebar-card {
        height: 600px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .logo-area {
        justify-content: center;
    }
    
    .search-bar-container {
        max-width: 100%;
    }
    
    .header-controls {
        justify-content: space-between;
    }
    
    .hero-banner {
        height: 180px;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-image-area {
        height: 200px;
        min-height: auto;
    }
    
    .modal-details-area {
        padding: 24px;
    }
}
