/* ==========================================
   SAMAY - Estilos Principales y Responsivos
   ========================================== */

:root {
    --primary-color: #0284c7; /* Sky 600 */
    --primary-dark: #0369a1;  /* Sky 700 */
    --bg-main: #f8fafc;       /* Slate 50 */
    --text-main: #334155;     /* Slate 700 */
    --border-color: #e2e8f0;  /* Slate 200 */
}

/* Estilos Base Globales */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Transiciones globales suaves */
a, button, input, select, textarea {
    transition: all 0.2s ease-in-out;
}

/* ==========================================
   OPTIMIZACIÓN TÁCTIL PARA MÓVILES Y TABLETS
   ========================================== */
@media (max-width: 768px) {
    /* Evitar el zoom automático en iOS al hacer focus en inputs (requiere font-size >= 16px) */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Aumentar el área táctil de botones y enlaces en pantallas pequeñas */
    button, 
    a.btn {
        min-height: 44px;
    }
}

/* ==========================================
   SCROLLBAR PERSONALIZADO Y LIMPIO
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   ESTILOS DE FORMULARIOS Y CONTENEDORES
   ========================================== */
.form-input, .form-select, .form-textarea {
    border-color: var(--border-color);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
    outline: none;
}

/* Contenedor responsivo para tablas de datos */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}