/* QueVendí PRO - Estilos Principales */

/* ========================================
   RESET Y BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow: hidden;
}

/* ========================================
   TEMA DARK PRO (Principal)
   ======================================== */
.theme-darkpro {
    --primary: #0C4A6E;
    --primary-light: #075985;
    --accent: #0EA5E9;
    --accent-light: #38BDF8;
    --bg: #0F172A;
    --card-bg: #1E293B;
    --text: #F1F5F9;
    --text-light: #94A3B8;
    --border: #334155;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --shadow: rgba(14, 165, 233, 0.2);
}

body {
    background: var(--bg);
    color: var(--text);
}

/* ========================================
   LAYOUT 100VH
   ======================================== */
.container {
    max-width: 420px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ========================================
   HEADER FIJO
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px var(--shadow);
    flex-shrink: 0;
    z-index: 100;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.header-info {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.header-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:active {
    background: rgba(255,255,255,0.25);
    transform: scale(0.95);
}

/* ========================================
   CONTENIDO SCROLLABLE
   ======================================== */
.content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 24px;
}

/* NUEVO: Sticky Section (Resumen + Botones) */
.sticky-section {
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* NUEVO: Resumen Compacto */
.summary-compact {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-compact .card-amount {
    font-size: 24px;
    margin: 0;
}

.summary-compact .card-stats {
    gap: 12px;
    font-size: 12px;
}

.summary-compact .card-badge {
    padding: 3px 8px;
    font-size: 10px;
}

/* NUEVO: Content Scrollable con scrollbar estilizado */
.content-scrollable {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

/* Scrollbar personalizado para Webkit (Chrome, Safari, Edge) */
.content-scrollable::-webkit-scrollbar {
    width: 6px;
}

.content-scrollable::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.content-scrollable::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
    transition: background 0.2s;
}

.content-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

/* Scrollbar para Firefox */
.content-scrollable {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}

/* ========================================
   FOOTER STICKY
   ======================================== */
.footer-actions {
    padding: 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px var(--shadow);
    flex-shrink: 0;
}

/* ========================================
   BOTÓN DE VOZ PRINCIPAL
   ======================================== */
.voice-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    border-radius: 14px;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.voice-button:active {
    transform: translateY(2px);
}

.voice-button.listening {
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 16px var(--shadow);
    }
    50% {
        box-shadow: 0 8px 32px var(--accent), 0 0 20px var(--accent);
    }
}

/* ========================================
   ICONOS SVG
   ======================================== */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* ========================================
   TARJETAS
   ======================================== */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px var(--shadow);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-badge {
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.card-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.card-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

/* ========================================
   GRID DE ACCIONES RÁPIDAS (4 BOTONES)
   ======================================== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px var(--shadow);
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
    border-color: var(--accent);
}

.quick-card:active {
    transform: translateY(0) scale(0.98);
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.quick-card:active .icon {
    stroke: white;
}

.quick-icon {
    margin-bottom: 8px;
    color: var(--accent);
    transition: color 0.2s;
}

.quick-card:active .quick-icon {
    color: white;
}

.quick-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.quick-card:active .quick-label {
    color: white;
}

/* ========================================
   SECCIÓN DE VOZ
   ======================================== */
.voice-section {
    margin: 24px 0;
}

.voice-status {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-light);
}

.voice-hint {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 8px;
}

.transcription {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.transcription-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.transcription-text {
    font-size: 16px;
    color: var(--text);
    font-style: italic;
    min-height: 24px;
}

.confirmation-card {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 12px;
}

.confirmation-product {
    flex: 1;
}

.confirmation-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.confirmation-details {
    font-size: 13px;
    color: var(--text-light);
}

.confirmation-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ========================================
   BOTONES
   ======================================== */
.btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn:active {
    transform: scale(0.98);
}

/* ========================================
   SECCIÓN HEADER
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 12px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 360px) {
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-card {
        padding: 20px 12px;
    }
    
    .quick-label {
        font-size: 12px;
    }
}

/* ========================================
   TOASTS
   ======================================== */  
/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-message {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

/* Animación de entrada */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}


/* ============================================
   ESTILOS MEJORADOS PARA LA EXPERIENCIA DE USUARIO
   ============================================ */
/* ============================================
   VOICE - CONFIRMACIÓN MEJORADA
   ============================================ */

.confirmation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.confirmation-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #ef4444;
    color: white;
}

/* Controles de cantidad */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.btn-quantity {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
}

.btn-quantity:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

.btn-quantity:active {
    transform: translateY(0);
}

.quantity-display {
    min-width: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    padding: 0 12px;
}

/* Total mejorado */
.confirmation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    margin-top: 16px;
}

.total-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* Botones de acción */
.confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.btn-action:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-action svg {
    flex-shrink: 0;
}

.btn-change:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #7c3aed;
}

.btn-voice:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

/* Botón confirmar destacado */
.btn-confirm {
    font-size: 16px !important;
    padding: 14px 24px !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   TOAST NOTIFICATIONS MEJORADAS
   ============================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

/* Tipos de toast */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #059669;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   BOTÓN DE VOZ - ESTADO GRABANDO
   ============================================ */

.voice-button.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .quantity-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .btn-quantity {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .quantity-display {
        font-size: 20px;
        min-width: 50px;
    }
    
    .total-amount {
        font-size: 24px;
    }
    
    .confirmation-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ESTILOS PARA FRACCIONES Y CANTIDADES
   ============================================ */
/* ============================================
   VOICE - CONFIRMACIÓN MEJORADA
   ============================================ */

.confirmation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.confirmation-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #ef4444;
    color: white;
}

/* Controles de cantidad */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.btn-quantity {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
}

.btn-quantity:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

.btn-quantity:active {
    transform: translateY(0);
}

.quantity-display {
    min-width: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    padding: 0 12px;
}

/* Total mejorado */
.confirmation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    margin-top: 16px;
}

.total-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* Botones de acción */
.confirmation-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.btn-action:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-action svg {
    flex-shrink: 0;
}

.btn-change:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #7c3aed;
}

.btn-voice:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

/* Botón confirmar destacado */
.btn-confirm {
    font-size: 16px !important;
    padding: 14px 24px !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   TOAST NOTIFICATIONS MEJORADAS
   ============================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

/* Tipos de toast */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #059669;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   BOTÓN DE VOZ - ESTADO GRABANDO
   ============================================ */

.voice-button.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .quantity-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .btn-quantity {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .quantity-display {
        font-size: 20px;
        min-width: 50px;
    }
    
    .total-amount {
        font-size: 24px;
    }
    
    .confirmation-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CARRITO - ESTILOS MEJORADOS
   ============================================ */
/* ============================================
   CART - SISTEMA DE CARRITO
   ============================================ */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.cart-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #ef4444;
    color: white;
}

/* Items del carrito */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid #e5e7eb;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.btn-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #ef4444;
    color: white;
}

/* Precio editable */
.cart-item-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #6b7280;
}

.price-input {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.price-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Cantidad con decrementos/incrementos */
.cart-item-quantity {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.quantity-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.btn-qty {
    min-width: 46px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qty:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

.btn-qty:active {
    transform: translateY(0);
}

.quantity-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #eff6ff;
}

.cart-item-subtotal {
    text-align: right;
    font-size: 14px;
    color: #6b7280;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.cart-item-subtotal strong {
    font-size: 18px;
    color: #059669;
}

/* Acciones */
.cart-actions {
    margin-bottom: 16px;
}

.btn-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.btn-action:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #2563eb;
}

.btn-voice:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}

/* Total */
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    margin-bottom: 16px;
}

.total-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.total-amount {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

/* Botones principales */
.cart-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.btn-confirm {
    font-size: 16px !important;
    padding: 16px !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #059669;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   BOTÓN VOZ - RECORDING
   ============================================ */

.voice-button.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cart-items {
        max-height: 300px;
    }
    
    .btn-qty {
        min-width: 42px;
        height: 36px;
        font-size: 13px;
    }
    
    .quantity-input {
        font-size: 20px;
        padding: 10px;
    }
    
    .total-amount {
        font-size: 28px;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
    }
}


/* ========================================
   ESTILOS PARA ERRORES
   ======================================== */
.error-message {
    display: none;
    margin-top: 15px;
    padding: 12px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 14px;
    text-align: center;
}

.login-container button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}