/* Reset y variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta Roast2Go - Colores Principales */
    --color-black: #1A1A1A;
    --color-red: #B22222;
    --color-mustard: #FFC107;
    --color-white: #FFFFFF;
    
    /* Colores Derivados */
    --color-black-hover: #2C2C2C;
    --color-red-hover: #D32F2F;
    --color-mustard-hover: #FFD23F;
    --color-mustard-light: #FFF3CD;
    --color-red-light: #F8D7DA;
    
    /* Sistema de Colores */
    --primary-color: var(--color-red);
    --primary-dark: var(--color-red-hover);
    --secondary-color: var(--color-mustard);
    --success-color: #10b981;
    --warning-color: var(--color-mustard);
    --error-color: var(--color-red);
    --background-color: var(--color-white);
    --surface-color: var(--color-white);
    --surface-dark: var(--color-black);
    --text-primary: var(--color-black);
    --text-secondary: #64748b;
    --text-light: var(--color-white);
    --border-color: #e2e8f0;
    --border-dark: var(--color-black);
    --shadow: 0 1px 3px 0 rgba(26, 26, 26, 0.1), 0 1px 2px 0 rgba(26, 26, 26, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(26, 26, 26, 0.1), 0 4px 6px -2px rgba(26, 26, 26, 0.05);
    --shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--color-black);
    border-bottom: 2px solid var(--color-red);
    box-shadow: var(--shadow-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem; /* Ajustado para el nuevo logo */
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo i {
    font-size: 2rem;
}

.logo-image {
    height: 60px; /* Aumentado 20% (de 50px a 60px) */
    width: auto;
    margin-right: 1rem; /* Espacio entre logo y texto */
    object-fit: contain; /* Mantener proporciones */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-role {
    background: var(--color-red);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow);
}

/* Navigation */
.nav {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-red);
    position: sticky;
    top: 73px;
    z-index: 99;
    box-shadow: var(--shadow);
}

.nav-content {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link.admin-only {
    display: none;
}

.nav-link.admin-only.show {
    display: flex;
}

/* Main Content */
.main {
    padding: 1rem 0;
    min-height: calc(100vh - 120px);
}

/* Optimización específica para módulo de usuarios */
#users-module {
    margin-top: 0;
    padding-top: 0;
}

#users-module .card {
    margin-top: 0;
}

#users-module .card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e1e8ed;
}

/* Optimización general para todos los módulos */
.section {
    display: none;
    margin-top: 0;
    padding-top: 0;
}

.section.active {
    display: block;
}

/* Optimización para cards en todos los módulos */
.card {
    margin-top: 0;
    margin-bottom: 1rem;
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e1e8ed;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

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

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-content {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-red);
    color: var(--color-white);
    border: 2px solid var(--color-red);
}

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

.btn-secondary {
    background: var(--color-black);
    color: var(--color-white);
    border: 2px solid var(--color-black);
}

.btn-secondary:hover {
    background: var(--color-black-hover);
    border-color: var(--color-black-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--color-red);
    border: 2px solid var(--color-red);
}

.btn-outline:hover {
    background: var(--color-red);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--color-mustard);
    color: var(--color-black);
    border: 2px solid var(--color-mustard);
    font-weight: 600;
}

.btn-success:hover {
    background: var(--color-mustard-hover);
    border-color: var(--color-mustard-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: var(--color-mustard);
    color: var(--color-black);
    border: 2px solid var(--color-mustard);
    font-weight: 600;
}

.btn-warning:hover {
    background: var(--color-mustard-hover);
    border-color: var(--color-mustard-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-error {
    background: var(--color-red);
    color: var(--color-white);
    border: 2px solid var(--color-red);
}

.btn-error:hover {
    background: var(--color-red-hover);
    border-color: var(--color-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-edit {
    background: #4DA6FF;
    color: white;
    border: 2px solid #4DA6FF;
}

.btn-edit:hover {
    background: #3A8AE6;
    border-color: #3A8AE6;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Estilos para productos bloqueados en modo edición */
.blocked-product {
    background-color: #F8F9FA !important;
    border: 2px solid #E9ECEF !important;
    opacity: 0.8;
}

.blocked-product .form-control,
.blocked-product .btn,
.blocked-product input,
.blocked-product select {
    background-color: #F8F9FA !important;
    color: #6C757D !important;
    cursor: not-allowed !important;
}

.blocked-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #FFF3CD;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.blocked-indicator i {
    font-size: 0.75rem;
}

/* Alertas de advertencia */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warning {
    color: #856404;
    background-color: #FFF3CD;
    border-color: #FFEAA7;
}

.alert-warning i {
    color: #F39C12;
}

/* Estilos para el módulo de usuarios */
.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: #E3F2FD;
    color: #1976D2;
}

.role-mesero {
    background: #E8F5E8;
    color: #388E3C;
}

.role-cocinero {
    background: #FFF3E0;
    color: #F57C00;
}

.role-caja {
    background: #F3E5F5;
    color: #7B1FA2;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.active {
    background: #E8F5E8;
    color: #388E3C;
}

.status-badge.inactive {
    background: #FFEBEE;
    color: #D32F2F;
}

/* Order status badges */
.status-badge.en-cola {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFC107;
}

.status-badge.entregado {
    background-color: #D1F2D1;  /* verde pastel */
    color: #2E7D32;             /* verde oscuro */
    border: 1px solid #81C784;  /* verde medio */
}

.status-badge.en-mesa {
    background-color: #D1ECF1;
    color: #0C5460;
    border: 1px solid #2196F3;
}

.status-badge.pago-pendiente {
    background-color: #E3F2FD;  /* azul claro */
    color: #1565C0;             /* azul medio */
    border: 1px solid #64B5F6;  /* azul suave */
}

.status-badge.cerrada {
    background-color: #ECEFF1;  /* gris claro */
    color: #455A64;             /* gris oscuro */
    border: 1px solid #B0BEC5;  /* gris medio */
}

/* Button transitions */
.btn-transition {
    transition: all 0.3s ease;
}

.btn-fade-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.btn-fade-in {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Solicitar Cobro button */
/* 🟢 Estilo para botones del flujo de cobro - alineado con estado ENTREGADO */
.btn-solicitar-cobro {
    background-color: #E6FAEE;   /* Verde muy suave */
    color: #007B3E;              /* Verde bosque */
    border: 1.5px solid #007B3E;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-solicitar-cobro:hover {
    background-color: #C5F6D6;   /* Verde más intenso */
    color: #00592D;
    border-color: #00592D;
}

/* 🟡 Estilo para botones de marcar entregado - alineado con estado EN COCINA */
.btn-marcar-entregado {
    background-color: #FFF7D6;   /* Amarillo pastel */
    color: #A66E00;              /* Amarillo cálido */
    border: 1.5px solid #A66E00;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-marcar-entregado:hover {
    background-color: #FFEFB3;   /* Un poco más fuerte al hover */
    color: #7A5000;
    border-color: #7A5000;
}

.btn-marcar-entregado:disabled {
    background-color: #F0F0F0;
    color: #999;
    border-color: #DDD;
    cursor: not-allowed;
}

/* Cashier order cards */
.order-card-caja {
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    background-color: #FFFDFD;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem;
    transition: all 0.3s ease;
}

.order-card-caja:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Encabezado optimizado para cards de caja */
.card-header-caja {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F5F5F5;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E0E0E0;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0.5rem;
}

.card-header-caja .mesa {
    color: #B22222;
    font-weight: 700;
    font-size: 1.5rem; /* 50% más grande que el texto base */
}

.card-header-caja .orden {
    color: #1565C0;
    font-weight: 600;
    font-size: 1rem;
}

/* Payment Modal Styles - Using standard modal structure */
#paymentModal {
    /* Inherits all styles from .modal-overlay */
}

#paymentModal .modal {
    /* Inherits all styles from .modal */
    max-width: 600px;
    width: 90%;
}

#paymentModal .modal-header {
    /* Inherits all styles from .modal-header */
    background: #B22222;
    color: white;
}

#paymentModal .modal-header h3 {
    /* Inherits all styles from .modal-header h3 */
    color: white;
    margin: 0;
}

.payment-subtitle {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.order-summary {
    background-color: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-weight: 600;
    color: #333;
}

.summary-value {
    font-weight: 700;
    color: #B22222;
    font-size: 1.1rem;
}

.payment-methods-container {
    margin-bottom: 1.5rem;
}

.payment-methods-list {
    margin-bottom: 1rem;
}

.payment-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #FAFAFA;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
}

.payment-method {
    flex: 1 1 55%;
    min-width: 120px;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #CCC;
    background-color: #FFF;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.payment-amount {
    flex: 1 1 40%;
    min-width: 80px;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #CCC;
    text-align: right;
    font-weight: 600;
    color: #333;
    box-sizing: border-box;
}

.payment-amount:focus {
    outline: none;
    border-color: #B22222;
    box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.1);
}

.btn-add-method {
    background-color: #D1F2D1;
    color: #2E7D32;
    border: 1px solid #81C784;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-add-method:hover {
    background-color: #C5F6D6;
    color: #1B5E20;
    transform: translateY(-1px);
}

.payment-total {
    background-color: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.total-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.total-value {
    font-weight: 700;
    color: #B22222;
    font-size: 1.2rem;
}

.total-difference {
    text-align: center;
    padding: 0.5rem;
    background-color: #FFF3CD;
    border: 1px solid #FFEAA7;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.difference-text {
    color: #856404;
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-line .remove-payment {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF5350;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-line .remove-payment:hover {
    background-color: #FFCDD2;
    color: #B71C1C;
}

/* Responsive design para pantallas móviles */
@media (max-width: 768px) {
    .payment-line {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .payment-method {
        flex: 1 1 100%;
        min-width: unset;
        width: 100%;
    }
    
    .payment-amount {
        flex: 1 1 100%;
        min-width: unset;
        width: 100%;
    }
    
    .payment-line .remove-payment {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}

/* Para pantallas muy pequeñas (menos de 480px) */
@media (max-width: 480px) {
    .payment-line {
        padding: 0.5rem;
        gap: 8px;
    }
    
    .payment-method,
    .payment-amount {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* Mejoras para experiencia móvil en campos de pago */
.payment-amount {
    /* Mejorar la experiencia táctil */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* Ocultar las flechas del input number en algunos navegadores */
.payment-amount::-webkit-outer-spin-button,
.payment-amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.payment-amount[type="number"] {
    -moz-appearance: textfield;
}

/* Mejorar el foco en dispositivos móviles */
.payment-amount:focus {
    outline: none;
    border-color: #B22222;
    box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.1);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Mejorar la experiencia de escritura en móviles */
.payment-amount {
    /* Mejorar la experiencia táctil */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    /* Evitar zoom en iOS */
    font-size: 16px;
}

/* Ocultar las flechas del input number en algunos navegadores */
.payment-amount::-webkit-outer-spin-button,
.payment-amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.payment-amount[type="number"] {
    -moz-appearance: textfield;
}

/* Estilo para cuando el campo está en modo de edición (solo números) */
.payment-amount:focus {
    background-color: #FFF8F8;
    border-color: #B22222;
}

/* Estilos para el filtro de fecha en órdenes cerradas */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #F8F9FA;
    border-bottom: 1px solid #E0E0E0;
    margin-bottom: 16px;
    border-radius: 8px 8px 0 0;
}

.filter-bar label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin: 0;
}

.date-filter {
    border: 1px solid #CCC;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    background-color: #FFF;
    transition: border-color 0.2s ease;
}

.date-filter:focus {
    outline: none;
    border-color: #B22222;
    box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.1);
}

.filter-bar .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Responsive para el filtro */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-bar label {
        text-align: center;
    }
    
    .date-filter {
        width: 100%;
    }
}

/* Estilos para el totalizador del día en caja */
.daily-summary {
    margin: 16px 0;
    padding: 0 16px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #E8F5E8 0%, #F0F8F0 100%);
    border: 1px solid #C8E6C8;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card i {
    font-size: 1.5rem;
    color: #2E7D32;
    background: rgba(46, 125, 50, 0.1);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-label {
    font-weight: 600;
    color: #2E7D32;
    font-size: 1rem;
}

.summary-amount {
    font-weight: 700;
    color: #1B5E20;
    font-size: 1.3rem;
    margin-left: auto;
    background: rgba(27, 94, 32, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(27, 94, 32, 0.2);
}

/* Efecto de highlight para productos recién agregados */
.highlight {
    box-shadow: 0 0 15px 3px rgba(0, 150, 255, 0.4) !important;
    transition: box-shadow 1s ease-out;
    animation: highlightPulse 1s ease-out;
}

/* Efecto de highlight más sutil para selección de productos */
.highlight-selection {
    box-shadow: 0 0 10px 2px rgba(34, 197, 94, 0.3) !important;
    transition: box-shadow 0.8s ease-out;
    animation: highlightSelectionPulse 0.8s ease-out;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 150, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(0, 150, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 15px 3px rgba(0, 150, 255, 0.4);
    }
}

@keyframes highlightSelectionPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 15px 3px rgba(34, 197, 94, 0.4);
    }
    100% {
        box-shadow: 0 0 10px 2px rgba(34, 197, 94, 0.3);
    }
}

/* Asegurar que el scroll funcione correctamente en el modal */
.modal-content {
    overflow-y: auto;
    max-height: 90vh;
}

/* Mejorar la experiencia de scroll en móviles */
@media (max-width: 768px) {
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .highlight {
        box-shadow: 0 0 12px 2px rgba(0, 150, 255, 0.5) !important;
    }
    
    .highlight-selection {
        box-shadow: 0 0 8px 1px rgba(34, 197, 94, 0.4) !important;
    }
}

#confirmPaymentBtn:disabled {
    border-color: #CCC;
    cursor: not-allowed;
    opacity: 0.6;
}

#confirmPaymentBtn:not(:disabled) {
    background-color: #B22222;
    color: white;
    border-color: #B22222;
}

#confirmPaymentBtn:not(:disabled):hover {
    background-color: #8B1A1A;
    border-color: #8B1A1A;
}

/* Modal Actions for Payment Modal */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-refresh:hover {
    background-color: #BBDEFB;
    color: #0D47A1;
    transform: translateY(-1px);
}

.order-card-caja .total {
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    background-color: #F5F5F5;
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 0.5rem;
}

.order-card-caja .products-list {
    margin: 0.5rem 0;
}

.order-card-caja .product-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #F0F0F0;
}

.order-card-caja .product-item:last-child {
    border-bottom: none;
}

.order-card-caja .product-name {
    font-weight: 500;
    color: #333;
}

.order-card-caja .product-price {
    color: #666;
    font-weight: 600;
}

/* Fade animations */
.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.btn-solicitar-cobro:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Estados de Órdenes */
.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.created {
    background: var(--color-mustard-light);
    color: var(--color-black);
    border: 1px solid var(--color-mustard);
}

.order-status.in_progress {
    background: var(--color-mustard);
    color: var(--color-black);
    border: 1px solid var(--color-mustard-hover);
}

.order-status.closed {
    background-color: #ECEFF1;  /* gris claro */
    color: #455A64;             /* gris oscuro */
    border: 1px solid #B0BEC5;  /* gris medio */
}

.order-status.delivered {
    background-color: #D1F2D1;  /* verde pastel */
    color: #2E7D32;             /* verde oscuro */
    border: 1px solid #81C784;  /* verde medio */
}

.order-status.payment_pending {
    background-color: #E3F2FD;  /* azul claro */
    color: #1565C0;             /* azul medio */
    border: 1px solid #64B5F6;  /* azul suave */
}

/* Estados de Ítems */
.item-status {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Admin Company Styles */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-button:hover {
    color: var(--color-red);
    background: var(--color-mustard-light);
}

.tab-button.active {
    color: var(--color-red);
    border-bottom-color: var(--color-red);
    background: var(--color-mustard-light);
}

.admin-tab-content {
    padding: 1rem 0;
}

.admin-tab-content.hidden {
    display: none;
}

.logo-preview {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-mustard-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-mustard);
}

.logo-preview-image {
    max-height: 80px;
    width: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    background: var(--color-white);
}

.logo-upload {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.logo-templates {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.template-item {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--color-white);
}

.template-item:hover {
    border-color: var(--color-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.template-preview {
    max-height: 60px;
    width: auto;
    margin-bottom: 0.5rem;
}

.template-placeholder {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.template-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.template-text {
    font-weight: 600;
    color: var(--color-black);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.item-status.pending {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.item-status.queued {
    background: var(--color-mustard-light);
    color: var(--color-black);
    border: 1px solid var(--color-mustard);
}

.item-status.cooking {
    background: var(--color-mustard);
    color: var(--color-black);
    border: 1px solid var(--color-mustard-hover);
}

.item-status.ready {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.item-status.delivered {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Grids */
.orders-grid,
.products-grid,
.ingredients-grid,
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.kitchen-queue,
.ready-items,
.closed-orders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Order Cards */
.order-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.order-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--color-red);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.order-status.created {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.in_progress {
    background: #fef3c7;
    color: #92400e;
}

.order-status.closed {
    background-color: #ECEFF1;  /* gris claro */
    color: #455A64;             /* gris oscuro */
}

.order-details {
    margin-bottom: 1rem;
}

.order-details p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Kitchen Queue */
.kitchen-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.item-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.item-status.queued {
    background: #fef3c7;
    color: #92400e;
}

.item-status.cooking {
    background: #fee2e2;
    color: #991b1b;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.modal-content {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
}

/* Estilos específicos para select */
.form-control select,
select.form-control {
    background-color: var(--color-white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
}

.form-control select:focus,
select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23B22222' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
}

.toast {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    background: #FFF3CD;
    border: 1px solid #FFEEBA;
    border-left: 4px solid var(--warning-color);
    color: #856404;
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--error-color);
}

.toast.warning i {
    color: #856404;
}

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

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .orders-grid,
    .products-grid,
    .ingredients-grid,
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .order-actions,
    .item-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal {
        margin: 1rem;
        max-width: none;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

/* ===== ESTILOS MEJORADOS PARA FORMULARIO DE ÓRDENES ===== */

/* Título de sección */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #B22222;
    margin: 1rem 0 0.5rem 0;
    padding: 0;
}

/* Cards uniformes para Mesa, Producto y Resumen */
.order-card {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Contenedor de productos */
.products-container {
    margin-bottom: 1rem;
}

/* Card específico para productos */
.product-card {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Botón agregar producto */
.btn-add-product {
    width: 100%;
    background: #FEECEC;
    border: 1px solid #C62828;
    color: #C62828;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-add-product:hover {
    background: #FAD2D2;
    border-color: #B71C1C;
    color: #B71C1C;
}

.btn-add-product i {
    font-size: 0.875rem;
}

/* Estilos para información del producto */
.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #F0F0F0;
}

.product-name {
    font-weight: 600;
    color: #1A1A1A;
    font-size: 1rem;
    flex: 1;
    margin-right: 1rem;
}

.product-price {
    font-weight: 500;
    color: #B22222;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .main {
        padding: 0.5rem 0;
        min-height: calc(100vh - 100px);
    }
    
    .section-header {
        margin-bottom: 0.75rem;
        margin-top: 0.25rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin: 0.75rem 0 0.5rem 0;
    }
    
    .order-card,
    .product-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .btn-add-product {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Ajustes para información del producto en móvil */
    .product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .product-name {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .product-price {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header,
    .card-content {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Control de cantidad en móvil - alineación horizontal */
    .quantity-controls {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .quantity-buttons {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .quantity-display {
        min-width: 2.5rem;
        text-align: center;
    }
    
    /* Separación visual mejorada en móvil */
    .order-info-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .order-lines-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        background: var(--color-white);
        border: 1px solid var(--border-color);
    }
    
    .order-summary-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

/* Estilos específicos para correcciones visuales del formulario */
.order-info-section {
    background: var(--color-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-lines-section {
    background: var(--color-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-summary-section {
    background: var(--color-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.line-header {
    margin-bottom: 1rem;
}

.line-header h4 {
    color: var(--color-black);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.line-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.btn-remove-line {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    width: 32px;
    height: 32px;
}

.btn-remove-line:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.btn-remove-line:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-remove-line:disabled:hover {
    background: none;
    color: #9ca3af;
}

.btn-remove-line i {
    font-size: 18px;
}

/* Estilos mejorados para visualización de productos */
.product-card {
    background: var(--color-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    border-color: var(--color-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.product-card .product-info {
    text-align: left;
}

.product-card .product-name {
    font-size: 16px;
    font-weight: bold;
}

/* Estilos para el nuevo diseño de botones de acción */
.product-actions {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    align-items: stretch;
}

.btn-add-details {
    flex: 0 0 65%;
    background: #DFF5E1;
    border: 2px solid #57A773;
    color: #1A1A1A;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
}

.btn-add-details:hover {
    background: #C8F0D0;
    border-color: #4A8B5F;
    transform: translateY(-1px);
}

.btn-add-details i {
    font-size: 0.875rem;
}

.btn-remove-product {
    flex: 0 0 35%;
    background: var(--color-white);
    border: 1px solid #C62828;
    color: #C62828;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-remove-product:hover {
    background: #FDEAEA;
    border-color: #C62828;
    color: #C62828;
}

.btn-remove-product:disabled {
    background: #F5F5F5;
    border-color: #E0E0E0;
    color: #9E9E9E;
    cursor: not-allowed;
}

.btn-remove-product:disabled:hover {
    background: #F5F5F5;
    border-color: #E0E0E0;
    color: #9E9E9E;
}

.btn-remove-product i {
    font-size: 1rem;
    color: #C62828;
}

/* Estilos para el contenedor de adiciones */
.additions-container {
    background: var(--color-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.additions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.addition-item {
    display: flex;
    align-items: center;
}

.addition-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    width: 100%;
}

.addition-checkbox:hover {
    background: #F8F9FA;
}

.addition-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #57A773;
    cursor: pointer;
}

.addition-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.addition-price {
    font-weight: 600;
    color: #57A773;
    font-size: 0.875rem;
}

/* Estilos para el campo de notas */
.notes-field {
    margin-top: 0.5rem;
}

.notes-field .form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.notes-field .form-control:focus {
    outline: none;
    border-color: #57A773;
    box-shadow: 0 0 0 3px rgba(87, 167, 115, 0.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .product-actions {
        flex-direction: row;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .btn-add-details {
        flex: 0 0 65%;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
        min-height: 48px;
    }
    
    .btn-remove-product {
        flex: 0 0 35%;
        padding: 0.75rem 0.5rem;
        min-height: 48px;
    }
    
    .additions-container {
        padding: 0.75rem;
    }
    
    .addition-checkbox {
        padding: 0.75rem 0.5rem;
        gap: 0.5rem;
    }
    
    .addition-checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

.product-card .product-description {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
    line-height: 1.3;
    font-weight: normal;
}

/* Products Section Enhanced */
.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-section {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #ecf0f1;
    color: #e74c3c;
}

.filter-section {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #d4af37;
}

.stats-summary {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 8px;
    min-width: 80px;
}

/* Kitchen Styles - Nueva estructura horizontal mejorada */
.kitchen-mesa-group {
    background: white;
    border: 1px solid #FFDADA;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Cabecera de mesa - Diseño horizontal mejorado */
.mesa-header {
    background: #FFF5F5;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #FFE0E0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mesa-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #B22222;
}

.order-info {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.order-time {
    font-size: 0.95rem;
    color: #888;
    font-weight: 500;
}

.creador-info {
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contenedor de productos */
.mesa-products {
    padding: 0;
}

/* Línea de producto - Diseño horizontal */
.product-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f2f2f2;
    transition: background-color 0.2s ease;
}

.product-line:hover {
    background-color: #fafafa;
}

.product-line:last-child {
    border-bottom: none;
}

/* Nombre del producto */
.product-name {
    font-weight: 600;
    color: #000;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
}

/* Cantidad */
.product-quantity {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
    min-width: 2rem;
    text-align: center;
}

/* Información adicional (notas) */
.product-info {
    flex: 1;
    min-width: 0;
}

.product-detail {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    background: #F0F0F0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Estado del producto */
.product-status {
    min-width: 5rem;
    text-align: center;
}

/* Acciones del producto */
.product-actions {
    min-width: 6rem;
    text-align: right;
}

/* Footer de mesa para botón "Iniciar Todo" */
.mesa-footer {
    padding: 1rem;
    border-top: 1px solid #E0E0E0;
    background: #F8F9FA;
    text-align: center;
}

/* Botones mejorados */
.btn-start {
    background: #FFC107;
    color: #212121;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-start:hover {
    background: #FFD54F;
    transform: translateY(-1px);
}

.btn-ready {
    background: #4CAF50;
    color: white;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ready:hover {
    background: #45A049;
    transform: translateY(-1px);
}

.btn-start-all {
    background: #B22222;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(178, 34, 34, 0.2);
}

.btn-start-all:hover {
    background: #A01E1E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(178, 34, 34, 0.3);
}

/* Botones de entrega */
.btn-deliver {
    background: #4CAF50;
    color: white;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-deliver:hover {
    background: #66BB6A;
    transform: translateY(-1px);
}

.btn-deliver-all {
    background: #388E3C;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(56, 142, 60, 0.2);
}

.btn-deliver-all:hover {
    background: #43A047;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(56, 142, 60, 0.3);
}

/* Badges de estado mejorados */
.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background: #FFF3CD;
    color: #856404;
}

.badge-info {
    background: #D1ECF1;
    color: #0C5460;
}

.badge-success {
    background: #D4EDDA;
    color: #155724;
}

.badge-secondary {
    background: #E2E3E5;
    color: #383D41;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .mesa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .mesa-name {
        font-size: 1.2rem;
    }
    
    .order-info, .order-time {
        font-size: 0.9rem;
    }
    
    .product-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .product-quantity {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .product-info {
        width: 100%;
    }
    
    .product-detail {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
    
    .product-status {
        width: 100%;
        text-align: left;
    }
    
    .product-actions {
        width: 100%;
        text-align: center;
    }
    
    .btn-start, .btn-ready {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .btn-start-all {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

/* Estados vacíos */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #d4af37;
}

.stat-label {
    font-size: 0.85rem;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Products Table View */
.products-table-view {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #bdc3c7;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th.sortable:hover {
    background: #e9ecef;
}

.data-table th.sortable span {
    margin-right: 8px;
}

.data-table th.sortable i {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.data-table th.sortable:hover i {
    opacity: 1;
}

.data-table th.sortable.sorted i {
    opacity: 1;
    color: #d4af37;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #D1F2D1;  /* verde pastel - consistente con entregado */
    color: #2E7D32;       /* verde oscuro */
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 0.7rem;
}

/* Actions Column */
.actions-column {
    width: 120px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.action-btn.edit {
    background: #3498db;
    color: white;
}

.action-btn.edit:hover {
    background: #2980b9;
}

.action-btn.delete {
    background: #e74c3c;
    color: white;
}

.action-btn.delete:hover {
    background: #c0392b;
}

/* States */
.state-container {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.state-container i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .stats-summary {
        justify-content: center;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
}

/* Order Header Card */
.order-header-card {
    background: linear-gradient(135deg, #B22222 0%, #D32F2F 100%);
    color: white;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.3);
}

/* Estilo para campos precargados (modo edición) */
.preloaded {
    background-color: #f5f5f5 !important;     /* Gris muy suave */
    color: #555 !important;                   /* Texto gris intermedio */
    border: 1px solid #ccc !important;        /* Borde gris claro */
    transition: all 0.2s ease;
}

/* Al enfocar (editar), recupera el estilo normal */
.preloaded:focus {
    background-color: #fff !important;
    color: #222 !important;
    border-color: var(--color-primary, #B22222) !important;
    outline: none;
}

/* Estilo para cards de productos precargados */
.product-card.preloaded-card {
    background-color: #E8DDDB; /* gris cálido con un 20% más de saturación rojiza */
    border: 1.5px solid #CFC0BD;
    opacity: 0.95;
    transition: background-color 0.2s ease-in-out, border-color 0.2s;
}

.product-card.preloaded-card:hover {
    opacity: 1;
    background-color: #F0E6E4; /* tono más claro al hacer hover */
    border-color: #C5B3B0;
}

/* Badge de producto precargado mejorado */
.badge-precargado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #D4C7C4;       /* tono cálido que armoniza con el fondo */
    color: #5A4A47;                  /* texto más oscuro para mejor contraste */
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid #B8A8A5;
    vertical-align: middle;
    margin-left: 8px;
    transition: background-color 0.2s ease-in-out;
}

.badge-precargado i {
    font-size: 0.7rem;
}

/* Estilo para el título con badge */
.line-header h4 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* Estilos para pestañas de órdenes */
.orders-tabs {
    margin-top: 1rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: #B22222;
    background-color: #FFF5F5;
}

.tab-button.active {
    color: #B22222;
    border-bottom-color: #B22222;
    background-color: #FFF5F5;
    font-weight: 600;
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel .orders-grid {
    min-height: 200px;
}

/* Estilo específico para el botón "Nueva Orden" en el módulo de órdenes */
#orders .section-header .btn-primary {
    background-color: var(--color-red) !important;
    color: var(--color-white) !important;
    border-color: var(--color-red) !important;
    font-weight: 600;
}

#orders .section-header .btn-primary:hover {
    background-color: var(--color-red-hover) !important;
    border-color: var(--color-red-hover) !important;
    color: var(--color-white) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Estilos para órdenes cerradas (modo solo lectura) */
.order-card.readonly {
    opacity: 0.85;
    background-color: #FAFAFA;
    border: 1px solid #E8E8E8;
}

.order-card.readonly .order-header {
    background-color: #F5F5F5;
}

.order-card.readonly .order-actions {
    opacity: 0.6;
}

.order-card.readonly .btn-edit,
.order-card.readonly .btn-danger {
    display: none !important;
}

.order-card.readonly .btn-primary {
    background-color: #2196F3;
    border-color: #2196F3;
    cursor: pointer;
}

.order-card.readonly .btn-primary:hover {
    background-color: #1976D2;
    border-color: #1976D2;
    transform: translateY(-1px);
}

.preloaded-category {
    margin-bottom: 0.75rem;
}

.preloaded-category label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.category-display {
    background-color: #F0F0F0;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #E0E0E0;
}

.preloaded-product-details {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: #FAFAFA;
    border-radius: 6px;
    border: 1px solid #E8E8E8;
}

.preloaded-product-details .product-name {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.preloaded-product-details .product-price {
    font-weight: 500;
    font-size: 0.9rem;
    color: #B22222;
}

.preloaded-quantity {
    margin-bottom: 0.75rem;
}

.preloaded-quantity label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.quantity-display-static {
    background-color: #F0F0F0;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #E0E0E0;
    min-width: 2rem;
    text-align: center;
    display: inline-block;
}

/* Estilo para el dropdown de mesa precargado */
#orderMesa.preloaded {
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #ccc;
}

#orderMesa.preloaded:focus {
    background-color: #fff;
    color: #222;
    border-color: #B22222;
}

.order-number-display h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-number-display h2 i {
    font-size: 1.5rem;
}

.order-status-text {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.order-header-card .order-number-display {
    text-align: center;
    padding: 1rem;
}

/* Estilo para información de estado */
.status-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4rem 0.8rem;
    background-color: #E3F2FD;
    color: #1565C0;
    border: 1px solid #BBDEFB;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-info i {
    font-size: 0.8rem;
}

