/* style.css global */
body {
    -webkit-font-smoothing: antialiased;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* Indicadores visuales de notas */
.grade-excellent { color: #198754; font-weight: bold; } /* 9-10 */
.grade-good { color: #0d6efd; font-weight: bold; } /* 7-8 */
.grade-pass { color: #fd7e14; font-weight: bold; } /* 6 */
.grade-fail { color: #dc3545; font-weight: bold; } /* < 6 */
.subject-text { color: #6610f2; font-weight: 600; } /* Indigo for a distinct academic look */
.badge-subject { font-size: 0.85rem; padding: 0.5em 0.75em; }

/* Status 'I' in Attendance (counts as present, yellow) */
.status-I { background-color: #fff3cd; color: #856404; }

/* Icon Hover Effects */
.edit-controls button i {
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}
.edit-controls button:hover i {
    transform: scale(2);
}

/* Ocultar elementos en versión impresa / exportación a PDF */
@page {
    size: landscape;
    margin: 1cm;
}

@media print {
    .navbar, .btn, .modal, form.row, .nav-pills, .no-print { display: none !important; }
    .card { border: none !important; box-shadow: none !important; }
    body { background-color: white !important; }
    
    /* Fix para tablas truncadas (Vertical y Horizontal) */
    .table-container {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        border: none !important;
    }
    
    .sticky-col, 
    thead th, 
    .sticky-top {
        position: static !important;
        background-color: white !important;
        box-shadow: none !important;
        z-index: auto !important;
    }

    .table {
        width: 100% !important;
        table-layout: auto !important;
        font-size: 8pt !important;
    }

    .table td, .table th { 
        padding: 2px 4px !important; 
        min-width: auto !important; /* Override inline min-width */
    }

    .attendance-select {
        width: auto !important;
        min-width: 15px !important;
        padding: 0 !important;
        font-size: 7pt !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Mobile Adjustments (Mobile First / Max-width 768px) */
@media (max-width: 768px) {
    h2, .h2 { font-size: 1.25rem !important; }
    h3, .h3 { font-size: 1.1rem !important; }
    
    .col-name { 
        max-width: 140px !important; 
        min-width: 140px !important;
        text-overflow: ellipsis; 
        white-space: nowrap; 
        overflow: hidden;
    }

    .grade-input { 
        padding: 0.25rem 0.2rem !important; 
        font-size: 0.85rem !important;
        width: 55px !important;
    }

    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Dashboard Logo */
.dashboard-logo {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 160px; /* Tamaño duplicado para mejor visibilidad */
    margin-bottom: 2.5rem;
    display: block;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .dashboard-logo {
        max-height: 150px; /* Tamaño más grande en móviles */
        margin-left: auto;
        margin-right: auto;
    }
}

/* Watermark */
.dashboard-watermark {
    position: fixed;
    bottom: -10%;
    right: -5%;
    width: 60%;
    height: 60%;
    background-image: url('assets/favicon.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.03; /* Muy sutil */
    z-index: -1;
    pointer-events: none;
    filter: grayscale(100%);
}

/* Custom Tooltip Colors */
.holiday-tooltip .tooltip-inner {
    background-color: #dc3545 !important; /* Rojo para feriados */
    color: white !important;
    font-weight: bold;
}
.holiday-tooltip .tooltip-arrow::before {
    border-top-color: #dc3545 !important;
}

.regular-tooltip .tooltip-inner {
    background-color: #0d6efd !important; /* Azul para días comunes */
    color: white !important;
}

/* Floating Mini Alerts (Toasts) */
.alert-floating {
    position: fixed;
    top: 20px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10000;
    min-width: 250px;
    max-width: 90%;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    text-align: center;
    font-weight: 600;
    animation: alertSlideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertSlideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}
