* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 500;
}

/* Botones */
.btn {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-primary {
    background: #e74c3c;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-danger {
    background: #95a5a6;
}

.btn-danger:hover {
    background: #7f8c8d;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Tarjetas de Menú */
.menu-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-2px);
}

.menu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.menu-date {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Items del Menú */
.menu-items {
    padding: 0;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.menu-item:hover {
    background: #f8f9fa;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-info h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.price {
    font-weight: 600;
    color: #e74c3c;
    font-size: 1.1rem;
}

.stock {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Controles de cantidad */
.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-quantity {
    width: 35px;
    height: 35px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-quantity:hover {
    background: #3498db;
    color: white;
}

.quantity {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

/* Footer del menú */
.menu-footer {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
}

.btn-pedir {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Sin menús */
.no-menus {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.no-menus h2 {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.no-menus p {
    color: #95a5a6;
    font-size: 1.1rem;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 600;
}

.login-container input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-container input:focus {
    outline: none;
    border-color: #3498db;
}

.login-container button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-container button:hover {
    transform: translateY(-2px);
}

/* Pedidos */
.pedidos-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pedido-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-item:last-child {
    border-bottom: none;
}

.pedido-info h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.pedido-fecha {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.pedido-total {
    font-weight: 600;
    color: #e74c3c;
    font-size: 1.2rem;
}

.pedido-estado {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pedido-pagado {
    background: #d4edda;
    color: #155724;
}

.pedido-pendiente {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .menu-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .menu-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .item-controls {
        justify-content: center;
    }
    
    .pedido-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .menu-header h2 {
        font-size: 1.2rem;
    }
    
    .item-info h3 {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}


/* Condiciones del pedido */
.condiciones-pedido {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
}

.condiciones-pedido h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.condiciones-pedido div {
    line-height: 1.6;
    color: #555;
}

/* Mejoras para los controles de cantidad */
.quantity {
    text-align: center;
    font-weight: 600;
    border: 2px solid #3498db;
    border-radius: 6px;
}

.quantity:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.quantity:invalid {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.btn-quantity {
    transition: all 0.2s ease;
    border: 2px solid #3498db;
}

.btn-quantity:hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.btn-quantity:active {
    transform: scale(0.95);
}

/* Deshabilitar botones cuando se alcanzan los límites */
.btn-quantity:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #bdc3c7;
    border-color: #95a5a6;
}

.btn-quantity:disabled:hover {
    background-color: #bdc3c7;
    color: #7f8c8d;
    transform: none;
}

/* Mejoras para los controles de cantidad */
.quantity {
    text-align: center;
    font-weight: 600;
    border: 2px solid #3498db;
    border-radius: 6px;
    background: white;
}

.quantity:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.quantity:invalid {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.btn-quantity {
    transition: all 0.2s ease;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    font-weight: bold;
    cursor: pointer;
}

.btn-quantity:hover:not(.disabled) {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.btn-quantity:active:not(.disabled) {
    transform: scale(0.95);
}

/* Estados deshabilitados */
.btn-quantity.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #bdc3c7 !important;
    border-color: #95a5a6 !important;
    color: #7f8c8d !important;
}

.btn-quantity.disabled:hover {
    transform: none !important;
    background-color: #bdc3c7 !important;
}

/* Para botones nativamente deshabilitados */
.btn-quantity:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #bdc3c7;
    border-color: #95a5a6;
    color: #7f8c8d;
}

.btn-quantity:disabled:hover {
    background-color: #bdc3c7;
    color: #7f8c8d;
    transform: none;
}