/* ==========================================================================
   ESTILOS PERSONALIZADOS - CONTROL DE ASISTENCIA I.E. SANTO TORIBIO
   ========================================================================== */

:root {
    --brand-primary: #1e3c72;
    --brand-secondary: #2a5298;
    --brand-accent: #f39c12;
    --brand-success: #28a745;
    --brand-danger: #dc3545;
    --brand-warning: #ffc107;
    --brand-info: #17a2b8;
    --bg-light: #f4f6f9;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: #333;
}

/* Navbar & Brand */
.main-header.navbar-dark {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%) !important;
    border-bottom: 2px solid var(--brand-accent);
}

.brand-link {
    background-color: #172b4d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Sidebar Customization */
.main-sidebar {
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(0, 0, 0, 0.2);
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%) !important;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.4);
    border-radius: 6px;
    font-weight: 600;
}

/* Cards & Widgets */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #fff;
    font-weight: 600;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.small-box {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.small-box:hover {
    transform: translateY(-3px);
}

.small-box .inner h3 {
    font-size: 2.2rem;
    font-weight: 700;
}

/* Status Badges */
.badge-status {
    padding: 0.35em 0.65em;
    font-size: 85%;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
}

.badge-puntual {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-tardanza {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.badge-falta {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-permiso {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-comision {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Quick Action Buttons */
.btn-action-pill {
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Biometric Terminal Card Widget */
.device-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.device-indicator.online {
    background-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.8);
    animation: pulse-online 2s infinite;
}
.device-indicator.offline {
    background-color: #dc3545;
}

@keyframes pulse-online {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(40, 167, 69, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Consolidated UGEL Matrix Table */
.table-consolidado {
    font-size: 0.82rem;
}

.table-consolidado th, 
.table-consolidado td {
    padding: 0.35rem 0.25rem !important;
    text-align: center;
    vertical-align: middle !important;
}

.table-consolidado th.col-dia {
    min-width: 25px;
    font-size: 0.75rem;
}

.celda-dia {
    font-weight: 700;
    font-size: 0.78rem;
    cursor: default;
}

/* Print Rules */
@media print {
    .main-sidebar,
    .main-header,
    .content-header,
    .main-footer,
    .btn,
    .no-print,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .dataTables_info {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        background: #fff !important;
    }

    body {
        background: #fff !important;
    }

    .card {
        box-shadow: none !important;
        border: none !important;
    }
}

/* ==========================================================================
   SELECT2 CUSTOMIZATION FOR MODALS & BOOTSTRAP 4
   ========================================================================== */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    padding: 5px 8px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    line-height: 26px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #495057 !important;
    line-height: 26px !important;
    padding-left: 4px !important;
    font-size: 0.95rem !important;
}

.select2-dropdown {
    border: 1px solid #80bdff !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
    z-index: 1060 !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 6px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    outline: none !important;
    font-size: 0.92rem !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-primary, #1e3c72) !important;
    color: #fff !important;
}

