/* =================================================== */
/* 1. PALETA DE COLORES CORPORATIVA                   */
/* =================================================== */
:root {
    /* Azul Acero Desaturado (Primary) */
    --bs-primary: #4a75a0;
    --bs-primary-rgb: 74, 117, 160;

    /* Verde Oliva/Esmeralda Suave (Success) */
    --bs-success: #2da464;
    --bs-success-rgb: 45, 164, 100;

    /* Amarillo Ocre/Mostaza (Warning) */
    --bs-warning: #f1c40f;
    --bs-warning-rgb: 241, 196, 15;

    /* Gris Pizarra Corporativo (Dark) */
    --bs-dark: #4b5563;
    --bs-dark-rgb: 75, 85, 99;

    /* Base de tamaño para tipografía responsiva */
    font-size: 16px;
}

/* =================================================== */
/* 2. TIPOGRAFÍA Y ESTILO "APP NATIVA"                */
/* =================================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    color: var(--bs-dark);
    /* Deshabilitar selección de texto para look App */
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Escalado móvil de textos */
@media (max-width: 576px) {
    :root { font-size: 15px; }
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.1rem; }
    p, .nav-link, .card-text { font-size: 0.95rem; }
}

/* =================================================== */
/* 3. COMPONENTES Y BOTONES                           */
/* =================================================== */
.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #3b5f84;
    --bs-btn-hover-border-color: #3b5f84;
    border-radius: 10px;
}

.btn-success {
    --bs-btn-bg: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-bg: #22804e;
    --bs-btn-hover-border-color: #22804e;
    border-radius: 10px;
}

/* Ajuste de tarjetas para que no se vean apretadas */
.card {
    border-radius: 16px !important;
}

.card-body {
    padding: 1.25rem !important;
}

/* =================================================== */
/* 4. DATATABLES Y PAGINACIÓN                         */
/* =================================================== */
.page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.page-link {
    color: var(--bs-primary) !important;
}

.page-link:hover {
    color: #3b5f84 !important;
    background-color: #f0f4f8 !important;
    border-color: #dee2e6 !important;
}

/* Estilo para los números (KPIs) del Dashboard */
.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}
/* Tabla ultra-compacta para ver 25+ registros */
.table td, .table th {
    padding: 4px 8px !important; 
    font-size: 0.85rem !important; /* Ligeramente más pequeño que el anterior */
    line-height: 1.2 !important;
    vertical-align: middle !important;
}
/* Iconos de acción estilizados */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}
/* Clase única para botones de acción en TODAS las tablas */
.action-icon {
background: none;
        border: none;
        padding: 2px 6px;
        font-size: 0.88rem;
        transition: all 0.2s ease;
        display: inline-block;
}

.action-icon:hover {
    background-color: var(--bs-primary);
    color: white;
}
.btn-tabla-accion {
    background: none;
    border: none;
    padding: 2px 6px;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-block;
}
/* Evitar zoom automático en inputs (iOS) */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
    font-size: 16px !important; /* iOS evita zoom si font-size >= 16px */
}