/* Importar fuente moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: #f8fafc;
    min-height: 100vh;
}

/* Tarjetas y Contenedores Glassmorphism */
.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Inputs y Formularios */
.glass-input {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.glass-input:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25) !important;
}

.glass-input::placeholder {
    color: #64748b !important;
}

/* Botones Personalizados */
.btn-glass-primary {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border: none;
    color: white;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-glass-primary:hover {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
    color: white;
}

/* Tablas Estilizadas */
.table-glass {
    color: #f8fafc;
    margin-bottom: 0;
}

.table-glass th {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 16px;
}

.table-glass td {
    background: transparent !important;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 12px 16px;
    vertical-align: middle;
}

.table-glass tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Formatos Numéricos (Precios y Stock) */
.val-moneda {
    font-family: monospace, monospace;
    font-weight: 600;
    color: #f8fafc;
}

/* Badges de Stock - Estilo limpio idéntico al texto de los precios */
.badge-stock-ok {
    background-color: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
    font-family: monospace, monospace;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.badge-stock-empty {
    background-color: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-family: monospace, monospace;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}
/* Corrección de legibilidad en la tabla de productos */
.glass-table td, 
.glass-table td.nombre-producto {
    color: #f8fafc !important; /* Texto blanco brillante de alto contraste */
    background: transparent !important; /* Elimina cualquier fondo blanco o gris de las celdas */
}

/* Color específico para los encabezados de la tabla */
.glass-table th {
    color: #94a3b8 !important; /* Gris claro legible para los títulos */
    background: rgba(15, 23, 42, 0.6) !important;
}
/* Utilidades de Texto */
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-sm { font-size: 0.875rem; }

/* ==========================================================
   CORRECCIÓN DE TABLAS Y EXPORTACIÓN A IMPRESIÓN / PDF
   ========================================================== */

/* Garantizar lectura limpia del texto sobre fondos oscuros */
.glass-table td, 
.glass-table td.nombre-producto {
    color: #f8fafc !important;
    background: transparent !important;
}

.glass-table th {
    color: #94a3b8 !important;
    background: rgba(15, 23, 42, 0.6) !important;
}

/* Reglas especiales cuando se hace clic en Imprimir / Exportar PDF */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    /* Ocultar elementos de la interfaz innecesarios en la hoja impresa */
    .btn, 
    .input-group, 
    header, 
    footer, 
    .modal,
    td[data-label="Acciones"],
    th:last-child {
        display: none !important;
    }

    .glass-card {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .table {
        color: #000000 !important;
        width: 100% !important;
    }

    .glass-table td, 
    .glass-table td.nombre-producto,
    .glass-table th {
        color: #000000 !important;
        background: transparent !important;
        border-bottom: 1px solid #ddd !important;
    }
}
/* ==========================================================
   ADAPTABILIDAD RESPONSIVA PARA EL MÓDULO DE CUADRE DE CAJA
   ========================================================== */

/* Ajuste general de contenedores glass en móviles */
@media (max-width: 768px) {
    .glass-card {
        padding: 1rem !important; /* Reduce el relleno interno */
    }

    /* Reducción de tamaños de texto en encabezados */
    .glass-card h4, .glass-card h5 {
        font-size: 1.1rem !important;
    }

    /* Ajuste de los campos de entrada de moneda y conteo de billetes/monedas */
    .input-cuadre-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .input-cuadre-group .input-group-text {
        width: 100% !important;
        justify-content: center;
        border-radius: 0.375rem 0.375rem 0 0 !important;
    }

    .input-cuadre-group .form-control {
        width: 100% !important;
        border-radius: 0 0 0.375rem 0.375rem !important;
        text-align: center;
    }

    /* Alineación vertical de filas de denominaciones */
    .row-denominacion {
        display: flex;
        flex-direction: column;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Tarjetas resumen de cuadre (Efectivo Esperado vs Real) */
    .grid-resumen-cuadre {
        grid-template-columns: 1fr !important; /* Pasa de columnas múltiples a 1 sola columna */
    }
}