/* Variables CSS para consistencia de tema */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #ecf0f1;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 4px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Mejoras para Font Awesome y renderización de fuentes */
.fas, .far, .fab, .fal, .fad, .fa {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    margin: 0.3rem;
}

/* Soporte para Mozilla con feature query más segura */
@supports (-moz-osx-font-smoothing: grayscale) {
    .fas, .far, .fab, .fal, .fad, .fa {
        -moz-osx-font-smoothing: grayscale;
    }
}

h1{
    font-size: 1.5rem;
    line-height: 1.2;
    margin-top: 0;
}

/* Herencia explícita para elementos de texto */
h1, h2, h3, h4, h5, h6, p, span, div {
    color: inherit;
}

/* Herencia para elementos de formulario */
input, select, textarea, button {
    font-family: inherit;
    color: inherit;
}

/* Layout base */
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--text-color);
    line-height: 1.5;
}

/* Contenedor para páginas con layout normal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Layout específico para páginas fullscreen como display */
.fullscreen-layout {
    margin: 0;
    padding: 0;
    max-width: none;
}

/* Layout para páginas principales con navegación */
.main-layout {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.header h1 {
    text-align: center;
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
}

/* Navegación */
.nav {
    background-color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Navegación principal */
nav {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-menu {
    position: relative;
}

.user-menu-button {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.user-menu:hover .user-menu-dropdown,
.user-menu-dropdown.show {
    display: block;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.user-menu-dropdown a:hover {
    background-color: #f8f9fa;
}

/* Formularios mejorados */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Mejoras específicas para formularios de horarios */
.form-container .form-row {
    margin-bottom: 1.5rem;
}

.form-container .form-group {
    position: relative;
}

.form-container .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    min-height: 1.5em;
    line-height: 1.3;
}

/* Cards */
.card {
    background: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card .text-muted {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    min-height: 1.2em;
    line-height: 1.2;
}

.form-control {
    width: 100%;
    height: min-content;
    padding: 0.15rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    height: min-content;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.actions {
    text-align: center;
    white-space: nowrap;
}

/* Botones */
.btn {
    display: flex;
    padding: 0.25rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    height: min-content;
}



.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    border-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-small {
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
}

/* Tablas */
.table-wrap {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    overflow-y: visible;
    margin: 1rem 0;
    /* Asegurar que el scroll sea solo horizontal en la tabla */
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-color);
    position: relative;
}

/* Clase auxiliar para forzar scroll correcto en móviles */
.table-mobile-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Scroll personalizado para tablas */
.table-wrap::-webkit-scrollbar {
    height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Indicador de scroll */
.table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table-wrap.has-scroll::after {
    opacity: 1;
}

/* Indicadores de scroll izquierdo y derecho */
.table-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.table-wrap.scrolled-left::before {
    opacity: 1;
}

/* Indicador de scroll derecho */
.table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.table-wrap.scrolled-right::after {
    opacity: 1;
}

/* Mensaje de ayuda para scroll en móvil */
.table-scroll-hint {
    display: none;
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .table-wrap.has-scroll + .table-scroll-hint {
        display: block;
    }
    
    /* Mejor experiencia táctil para tablas */
    .table tbody tr {
        transition: background-color 0.2s ease;
    }
    
    .table tbody tr:active {
        background-color: rgba(52, 152, 219, 0.1);
    }
    
    /* Botones optimizados para tocar en móviles pero más compactos */
    .action-buttons .btn {
        min-height: 38px; /* Tamaño reducido pero táctil */
        min-width: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Mejorar contraste de badges en móviles */
    .badge {
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
}

.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-family: inherit;
    background: white;
}

.table th,
.table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-family: inherit;
    color: inherit;
    vertical-align: middle;
}

.table th {
    background-color: var(--primary-color);
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    color: var(--text-color);
    background-color: transparent;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:hover td {
    color: var(--text-color);
}

.table tbody tr:nth-child(even) {
    background-color: #fbfcfd;
}

.table tbody tr:nth-child(even) td {
    color: var(--text-color);
}

/* Estados y alertas */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Estados específicos */
.status-pending {
    color: var(--warning-color);
    font-weight: bold;
}

.status-assigned {
    color: var(--success-color);
    font-weight: bold;
}

.status-cancelled {
    color: var(--danger-color);
    font-weight: bold;
}

/* Checkbox personalizado para permuta */
.permuta-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
}

.permuta-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color);
}

.permuta-checkbox label {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.permuta-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Modal y overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.overlay.active {
    display: block;
}

.edit-form {
    display: none !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.edit-form.active {
    display: block !important;
}

.edit-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--danger-color);
}

/* Nota al pie de excepciones para display */
.exceptions-footnote {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.exceptions-footnote h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footnote-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exception-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.exception-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.exception-item .badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    min-width: 140px;
    text-align: center;
}

.exception-item .explanation {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Grid de display */
.display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.date-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.date-header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.substitution-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.substitution-item:hover {
    background-color: #f8f9fa;
}

.substitution-item:last-child {
    border-bottom: none;
}

.substitution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.substitution-title {
    font-weight: 600;
    color: var(--primary-color);
}

.substitution-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.assign-btn {
    padding: 0.5rem 1rem;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.flex-between {
    display: inline-block;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

.d-flex { display: flex; }
.d-flex.gap-md { gap: 1rem; 
    flex-wrap: wrap;
}

.no-wrap {
    white-space: nowrap;
}

/* Row y Column para layout tipo grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.col {
    flex: 1;
    min-width: 250px;
    padding: 0.5rem;
}

.col-auto {
    flex: 0 0 auto;
    padding: 0.5rem;
}

/* Utilidades de herencia */
.inherit-color { color: inherit !important; }
.inherit-font { font-family: inherit !important; font-size: inherit !important; }
.inherit-all { all: inherit !important; }

/* Forzar estilos en elementos de tabla */
table, thead, tbody, tfoot, tr, th, td {
    font-family: inherit;
}

/* Asegurar herencia en elementos comunes */
a, span, div, p, h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}

/* Sobrescribir cualquier CSS externo en tablas */
.table-wrap .table td,
.table-container .table td,
table.table td {
    font-family: var(--font-family) !important;
    color: var(--text-color);
    background-color: transparent !important;
}

.table-wrap .table th,
.table-container .table th,
table.table th {
    font-family: var(--font-family) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    /* Corregir scroll en móviles - el contenedor principal no debe tener scroll horizontal */
    .main-content {
        padding: 1rem;
        margin: 1rem auto;
        overflow-x: visible; /* Evitar scroll horizontal en el contenedor principal */
        width: calc(100vw - 2rem); /* Usar viewport width minus padding */
        max-width: none; /* Remover max-width en móviles */
        box-sizing: border-box;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content h1 {
        font-size: 1.8rem;
        margin-bottom: 1.25rem;
    }
    
    .filter-actions {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav a {
        text-align: center;
    }
    
    /* Navegación móvil */
    .nav-toggle {
        display: block;
    }
    
    nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .user-menu-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Específico para tablas en móviles - asegurar scroll correcto */
    .table-wrap {
        margin: 1rem -1rem; /* Extender hasta los bordes del contenedor */
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }
    
    .table-wrap .table {
        margin: 0;
        border-radius: 0;
    }
    
    .edit-form {
        width: 95%;
        padding: 1.5rem;
    }
    
    .display-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .substitution-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 0.75rem; /* Aumentar un poco el gap */
    }
    
    .btn-nav {
        width: 100%;
        text-align: center;
        padding: 0.6rem 1rem; /* Reducir padding vertical */
        font-size: 0.9rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row .form-group {
        min-width: auto;
        flex: none;
    }
    
    .filter-actions {
        padding: 1rem;
    }
    
    .filter-form .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-form .form-group {
        min-width: auto;
        flex: none;
        margin-bottom: 1rem;
    }
    
    .filter-form .button-group {
        margin-top: 0;
        justify-content: center;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons {
        justify-content: center;
        gap: 0.3rem; /* Reducir espacio entre botones */
    }
    
    .action-buttons .btn {
        min-height: 36px; /* Reducir altura mínima */
        min-width: 36px; /* Reducir ancho mínimo */
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .slot-tags {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .main-content h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .filter-actions {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .form-row {
        gap: 0.5rem;
        display: inline-flex !important;
        
    }
    
    .form-group {
        margin-bottom: 0.75rem;
        display: inline-flex !important;
        margin: 0 auto !important;
    }

    .form-group label {
        font-size: 0.9rem;
    }
    
    /* Action buttons más pequeños en móviles pequeños */
    .action-buttons {
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        min-height: 32px;
        min-width: 32px;
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Botones específicos para diferentes tablas */
    .teachers-table .action-buttons .btn,
    .consulta-table-list .action-buttons .btn,
    .substitutions-table-list .action-buttons .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
        min-height: 30px;
        min-width: 30px;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .form-control {
        padding: 0.5rem;
    }
    
    /* Optimizar botones de navegación de fecha para móviles pequeños */
    .date-navigation {
        margin-bottom: 1rem;
    }
    
    .nav-buttons {
        gap: 0.5rem;
    }
    
    .btn-nav {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        border-radius: 6px;
        width: -webkit-fill-available !important;
        
    }
    
    .btn-nav i {
        font-size: 0.8rem;
    }
    
    /* Optimizar formulario de consulta para móviles pequeños */
    .filter-form .form-row {
        gap: 0.75rem;
    }
    
    .filter-form .form-group {
        margin-bottom: 0.75rem;
    }
    
    .filter-form .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .filter-form .btn {
        width: 100%;
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Mejoras específicas para tablas en móviles */
    .teachers-table .table {
        min-width: 550px; /* Reducir ancho mínimo para móviles */
    }
    
    .consulta-table-list .table {
        min-width: 650px; /* Reducir ancho mínimo para móviles */
    }
    
    .substitutions-table-list .table {
        min-width: 750px; /* Reducir ancho mínimo para móviles */
    }
    
    /* Tabla de horarios en móviles pequeños */
    .schedules-table .table {
        min-width: 600px;
    }
    
    /* Tabla de ausencias en móviles pequeños */
    .absences-table .table {
        min-width: 650px; /* Reducir un poco para móviles pequeños */
    }
    
    .absences-table .table th,
    .absences-table .table td {
        padding: 0.4rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .absences-table .action-buttons {
        gap: 0.15rem; /* Hacer el gap aún más pequeño */
    }
    
    .absences-table .action-buttons .btn {
        padding: 0.3rem 0.5rem; /* Botones más pequeños */
        font-size: 0.75rem;
        min-height: 32px; /* Altura mínima más pequeña */
        min-width: 32px; /* Ancho mínimo más pequeño */
    }
    
    /* Asegurar iconos visibles en botones de acción para móviles pequeños */
    .absences-table .action-buttons .btn i {
        display: inline-block !important;
        font-size: 0.7rem;
        margin: 0;
    }
    
    /* Mantener iconos en badges de excepciones para móviles pequeños */
    .absences-table .badge i {
        display: inline-block !important;
        font-size: 0.65rem;
        margin-right: 0.2rem;
    }
    
    /* Ocultar columnas menos importantes en móviles */
    .teachers-table .phone-cell,
    .teachers-table th:nth-child(3) {
        display: none;
    }
    
    .consulta-table-list .room-cell,
    .consulta-table-list th:nth-child(4) {
        display: none;
    }
    
    /* Ajustar padding de celdas para móviles */
    .table td, .table th {
        padding: 0.4rem 0.25rem;
        vertical-align: middle;
    }
    
    /* Compactar badges y botones */
    .badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
        margin: 1px;
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 0.2rem;
        justify-content: center;
    }
    
    .btn-small {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
        min-width: auto;
    }
    
    /* Mejorar iconos en móviles */
    .table td i, .table th i {
        font-size: 0.8rem;
        margin-right: 2px;
    }
    
    /* Ajustar nombres de profesores en móviles */
    .teacher-name, .teacher-cell {
        font-size: 0.75rem;
    }
    
    .substitute-cell {
        font-size: 0.7rem;
    }
    
    /* Hint de scroll más visible en móviles muy pequeños */
    .table-scroll-hint {
        background: var(--warning-color);
        color: white;
        padding: 0.5rem;
        text-align: center;
        font-size: 0.8rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        margin-bottom: 1rem;
    }
    
    /* Iconos de horarios extra-compactos en móviles muy pequeños */
    .schedules-table .table td i {
        font-size: 0.7rem !important;
        margin-right: 0.15rem !important;
    }
    
    .schedules-table .btn-small {
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 0.2rem !important;
    }
    
    .schedules-table .btn-small i {
        font-size: 0.7rem !important;
    }
}

/* Estilos para tablets (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .teachers-table .table {
        min-width: 650px;
    }
    
    .consulta-table-list .table {
        min-width: 750px;
    }
    
    .substitutions-table-list .table {
        min-width: 850px;
    }
    
    .table td, .table th {
        padding: 0.6rem 0.4rem;
    }
    
    .action-buttons {
        gap: 0.3rem;
    }
}

/* Estilos para móviles grandes y tablets pequeñas (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .main-content h1 {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }
    
    .filter-actions {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .teachers-table .table {
        min-width: 600px;
    }
    
    .consulta-table-list .table {
        min-width: 700px;
    }
    
    .substitutions-table-list .table {
        min-width: 800px;
    }
    
    .table td, .table th {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    
    /* Ocultar solo el teléfono en tablets pequeñas */
    .teachers-table .phone-cell,
    .teachers-table th:nth-child(3) {
        display: none;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .action-buttons {
        gap: 0.25rem;
    }
    
    .btn-small {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Estilos específicos para filtros y navegación */
.filter-actions {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.date-navigation {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-nav {
    display: inline-block;
    padding: 0.25rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border: 2px solid var(--accent-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow);
    margin: 0 0.25rem;
}

.btn-nav:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-nav.active {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.filter-form {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.filter-form .form-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filter-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    min-height: 1.2em;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.form-row .form-group {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    margin: auto;
}

.form-row .form-group label {
    display: flex;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: .5rem;
}

.form-row .button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.info-panel {
    background: linear-gradient(135deg, var(--accent-color), #2980b9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 500;
}

.session-header {
    background-color: var(--border-color) !important;
    color: white !important;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos específicos para ausencias */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    margin: 0;
}

.slot-list-container {
    transition: all 0.3s ease;
}

.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-group {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
}

.session-group h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
    padding: 0.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background-color: #f0f8ff;
    border-color: var(--accent-color);
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    accent-color: var(--accent-color);
}

.slot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.slot-tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.text-muted {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.btn-icon:hover {
    background-color: rgba(0,0,0,0.1);
}

.btn-icon .icon {
    width: 16px;
    height: 16px;
}

.inline {
    display: inline;
}

/* Badges y etiquetas */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.badge-default {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

/* Estilos específicos para la página de consulta */
.consulta-table-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.consulta-table-list .table {
    margin: 0;
}

.consulta-table-list .exceptions-cell {
    max-width: 180px;
    min-width: 120px;
}

.consulta-table-list .exceptions-cell .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    margin: 1px;
    white-space: nowrap;
}

.consulta-table-list .exceptions-cell .text-muted {
    font-size: 0.8rem;
    font-style: italic;
}

.consulta-table-list .time-cell {
    min-width: 120px;
    font-weight: 500;
    white-space: nowrap;
}

.consulta-table-list .teacher-cell,
.consulta-table-list .substitute-cell {
    min-width: 150px;
}

.consulta-table-list .subject-cell {
    min-width: 120px;
}

.consulta-table-list .room-cell {
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

/* Responsive para consulta */
@media (max-width: 768px) {
    .consulta-table-list .table {
        min-width: 850px; /* Forzar scroll horizontal */
    }
    
    .consulta-table-list .table th,
    .consulta-table-list .table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .consulta-table-list .exceptions-cell .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
        margin: 1px;
    }
    
    .consulta-table-list .exceptions-cell {
        max-width: 120px;
        min-width: 100px;
    }
    
    .consulta-table-list .time-cell {
        min-width: 100px;
        font-size: 0.75rem;
    }
    
    .consulta-table-list .teacher-cell,
    .consulta-table-list .substitute-cell {
        min-width: 140px;
        font-size: 0.75rem;
    }
    
    .consulta-table-list .subject-cell {
        min-width: 100px;
        font-size: 0.75rem;
    }
    
    .consulta-table-list .room-cell {
        min-width: 70px;
        font-size: 0.75rem;
    }
}

/* Texto de ayuda mejorado */
.help-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.help-text::before {
    content: "💡";
    font-size: 0.9rem;
}

/* Mejoras para la tabla de sustituciones */
.substitutions-table-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.substitutions-table-list .table th {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.substitutions-table-list .table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.substitutions-table-list .table tbody tr:hover {
    background-color: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Estados específicos de tabla */
.status-cell {
    text-align: center;
}

.time-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.teacher-cell {
    font-weight: 500;
}

.notes-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-cell:hover {
    white-space: normal;
    overflow: visible;
}

/* === ESTILOS ESPECÍFICOS PARA TEACHERS.PHP === */

/* Tabla de profesores */
.teachers-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.teachers-table .table th {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.teachers-table .table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.teachers-table .table tbody tr:hover {
    background-color: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Filas de profesores inactivos */
.inactive-row {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.inactive-row:hover {
    opacity: 0.8;
}

/* Celdas específicas de profesores */
.teacher-name {
    font-weight: 600;
    min-width: 200px;
}

.email-cell a,
.phone-cell a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-cell a:hover,
.phone-cell a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.status-cell {
    min-width: 100px;
}

/* Resumen de información */
.info-summary {
    display: inline-block;
    gap: 1rem;
    align-items: center;
        margin: 0.5rem;
}

.info-summary .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* === ESTILOS ESPECÍFICOS PARA SCHEDULES.PHP === */

/* Tabla de horarios */
.schedules-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.schedules-table .table th {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
 
}

.schedules-table .table td {
     vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.schedules-table .table tbody tr:hover {
    background-color: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Separadores de día */
.day-separator {
    background: none !important;
    color:#3498db !important;
}

.day-header {
    background: linear-gradient(135deg, #34495e, #2c3e50) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    padding: 0.75rem !important;
    border: none !important;
}

/* Filas de horario */
.schedule-row {
    transition: all 0.3s ease;
}

.schedule-row:hover {
    background-color: #f0f8ff !important;
}

/* Celdas específicas de horarios */
.teacher-cell {
    font-weight: 500;
    min-width: 180px;
}

.day-cell {
    min-width: 100px;
}

.day-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), #2980b9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-cell {
    min-width: 80px;
}

.time-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 120px;
}

.subject-cell {
    min-width: 150px;
    font-weight: 500;
}

.room-cell {
    min-width: 100px;
    font-weight: 600;
}

/* Columna de acciones específica para horarios */
.schedules-table .actions {
    width: 120px;
    min-width: 120px;
    text-align: center;
    white-space: nowrap;
}

.schedules-table .action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Resumen de horarios */
.schedules-summary .card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.schedules-summary .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.schedules-summary .card h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
}

.schedules-summary .card .h2 {
    color: var(--accent-color);
    font-weight: 700;
    margin: 0;
}

/* Responsive para horarios */
@media (max-width: 768px) {
    .schedules-table .table th,
    .schedules-table .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }
    
    /* Solo ocultar iconos de headers, mantener iconos de contenido */
    .schedules-table .table th i {
        display: none; /* Ocultar iconos de cabeceras en móvil */
    }
    
    /* Mantener iconos importantes en el contenido pero más compactos */
    .schedules-table .table td i {
        font-size: 0.75rem;
        margin-right: 0.2rem;
        opacity: 0.7; /* Hacerlos menos prominentes pero visibles */
    }
    
    /* Iconos específicos importantes que siempre mostrar con más énfasis */
    .schedules-table .action-buttons i,
    .schedules-table .btn i,
    .schedules-table .day-separator i {
        display: inline-block !important;
        font-size: 0.8rem !important;
        opacity: 1 !important;
        margin-right: 0.3rem !important;
    }
    
    .day-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .teacher-cell,
    .subject-cell,
    .room-cell,
    .time-cell {
        min-width: auto;
    }
    
    .schedules-summary .row {
        flex-direction: column;
    }
    
    .schedules-summary .card {
        margin-bottom: 1rem;
    }
    
    /* Mantener acciones en línea en móvil para horarios */
    .schedules-table .action-buttons {
        flex-wrap: nowrap;
        gap: 0.2rem; /* Reducir gap */
    }
    
    .schedules-table .btn-small {
        padding: 0.2rem 0.4rem; /* Hacer botones más pequeños */
        font-size: 0.75rem;
        min-height: 30px;
        min-width: 30px;
    }
    
    /* Forzar visualización de iconos en botones de acción */
    .schedules-table .btn-small i {
        display: inline-block !important;
        font-size: 0.8rem !important;
        margin: 0 !important;
    }
}

/* === ESTILOS ESPECÍFICOS PARA ABSENCES.PHP === */

/* Tabla de ausencias */
.absences-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.absences-table.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.absences-table .table {
    min-width: 800px; /* Ancho mínimo para asegurar scroll en móviles */
}

.absences-table .table th {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.absences-table .table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.absences-table .table tbody tr:hover {
    background-color: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Filas de ausencias */
.absence-row {
    transition: all 0.3s ease;
}

.absence-row:hover {
    background-color: #f0f8ff !important;
}

/* Celdas específicas de ausencias */
.date-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 120px;
}

.day-cell {
    min-width: 100px;
}

.teacher-cell {
    font-weight: 500;
    min-width: 180px;
}

.type-cell {
    min-width: 150px;
}

.reason-cell {
    min-width: 200px;
}

.reason-description {
    font-weight: 500;
    color: var(--text-color);
    margin-top: 0.25rem;
}

/* Formularios específicos para ausencias */
.form-container .help-text {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #e8f4f8;
    border-left: 4px solid var(--accent-color);
    border-radius: var(--border-radius);
    font-style: normal;
}

.form-container .help-text::before {
    content: "ℹ️";
    margin-right: 0.5rem;
}

/* Responsive para ausencias */
@media (max-width: 768px) {
    .absences-table.table-wrap {
        margin: 1rem -1rem; /* Extender hasta los bordes del contenedor */
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .absences-table .table {
        margin: 0;
        border-radius: 0;
        min-width: 700px; /* Asegurar ancho mínimo para scroll */
    }
    
    .absences-table .table th,
    .absences-table .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .absences-table .table th i {
        display: none; /* Ocultar iconos solo en encabezados */
    }
    
    /* Asegurar que los iconos en botones de acción sí aparezcan */
    .absences-table .action-buttons i {
        display: inline-block !important;
        font-size: 0.8rem;
    }
    
    /* Mantener iconos en badges de excepciones */
    .absences-table .badge i {
        display: inline-block !important;
        font-size: 0.75rem;
        margin-right: 0.25rem;
    }
    
    .date-cell,
    .day-cell,
    .teacher-cell,
    .type-cell,
    .reason-cell {
        min-width: auto;
    }
    
    .reason-description {
        font-size: 0.85rem;
    }
    
    .form-container .help-text {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Optimizar filtros de ausencias en móvil */
    .filter-actions .form-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-actions .button-group {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-actions .action-buttons {
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* === ESTILOS ESPECÍFICOS PARA DISPLAY.PHP === */

/* Layout para páginas de display sin navegación lateral */
.display-layout {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.display-layout .main-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.display-layout .table-wrap {
    width: 100%;
    max-width: none;
}

/* Panel de información mejorado */
.info-panel {
    background: linear-gradient(135deg, var(--accent-color), #2980b9);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

/* Barra de refresco automático */
.refresh-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    animation: refreshCountdown 180s linear infinite;
}

@keyframes refreshCountdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* Estilos específicos para la tabla de sustituciones */
.substitutions-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    width: 100%;
}

.substitutions-table .table {
    width: 100%;
    table-layout: fixed;
    min-width: 1100px;
}

/* Encabezados de sesión mejorados */
.session-header {
    background: linear-gradient(135deg,  #304a6d, #383875) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    padding: 0.75rem !important;
    border: none !important;
}

/* Estilos específicos para session-header en display */
.display-layout .session-header {
    background: linear-gradient(135deg,#7da0e0, #6e9edd) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    padding: 0.25rem !important;
    border: none !important;
    border-bottom: 2px solid var(--accent-color) !important;
}

/* Filas de datos mejoradas */
.substitution-row {
    transition: all 0.3s ease;
}

.substitution-row:hover {
    background-color: #f0f8ff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Alertas mejoradas */
.alert {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #c3e6cb;
}

/* Botones in context of display */
.assign-btn {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
    border: none;
    padding: 0.25rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.assign-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Columnas específicas para display */
.display-layout .time-column {
    width: 12%;
    min-width: 120px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.display-layout .teacher-column {
    width: 18%;
    min-width: 150px;
    font-weight: 500;
}

.display-layout .subject-column {
    width: 18%;
    min-width: 120px;
}

.display-layout .room-column {
    width: 8%;
    min-width: 80px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
}

.display-layout .substitute-column {
    width: 25%;
    min-width: 180px;
}

.display-layout .exceptions-column {
    width: 19%;
    min-width: 150px;
}


/* Columnas específicas generales */
.time-column {
    width: 120px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.teacher-column {
    width: 200px;
    font-weight: 500;
}

.subject-column {
    width: 150px;
}

.room-column {
    width: 100px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
}

.substitute-column {
    min-width: 250px;
}

/* Responsive design para display */
@media (max-width: 768px) {
    .display-layout .main-content {
        margin: 1rem auto;
        padding: 1rem;
        width: calc(100vw - 2rem);
        max-width: none;
        overflow-x: visible;
        box-sizing: border-box;
    }
    
    .info-panel {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Tabla específica para display */
    .display-layout .table-wrap {
        margin: 1rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .display-layout .table th,
    .display-layout .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .display-layout .time-column,
    .display-layout .teacher-column,
    .display-layout .subject-column,
    .display-layout .room-column,
    .display-layout .substitute-column,
    .display-layout .exceptions-column {
        width: auto;
        min-width: auto;
    }
    
    .display-layout .time-column {
        min-width: 100px;
    }
    
    .display-layout .teacher-column {
        min-width: 140px;
    }
    
    .display-layout .subject-column {
        min-width: 120px;
    }
    
    .display-layout .room-column {
        min-width: 60px;
    }
    
    .display-layout .substitute-column {
        min-width: 180px;
    }
    
    .display-layout .exceptions-column {
        min-width: 120px;
    }
    
    .substitutions-table .table {
        min-width: 1000px; /* Aumentar ancho mínimo para mejor scroll */
    }
    
    /* Responsive mejorado para todas las tablas */
    .table-wrap {
        border-radius: var(--border-radius);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }
    
    .table-wrap .table {
        min-width: 600px; /* Ancho mínimo para forzar scroll */
    }
    
    /* Tablas específicas con anchos mínimos */
    .teachers-table .table {
        min-width: 700px;
    }
    
    .substitutions-table-list .table {
        min-width: 900px;
    }
    
    .consulta-table-list .table {
        min-width: 800px;
    }
    
    /* Responsive para sustituciones */
    .substitutions-table-list .table th,
    .substitutions-table-list .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .substitutions-table-list .table th i,
    .substitutions-table-list .table td i {
        margin-right: 4px; /* Mantener iconos pero con menos espacio */
    }
    
    .notes-cell {
        max-width: 150px;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-small {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Nota al pie responsiva para display */
    .exceptions-footnote {
        margin-top: 2rem;
        padding: 1rem;
    }
    
    .exceptions-footnote h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footnote-content {
        gap: 0.75rem;
    }
    
    .exception-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .exception-item .badge {
        min-width: auto;
        width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .exception-item .explanation {
        font-size: 0.9rem;
        text-align: center;
    }
}

/* Modo oscuro para display */
@media (prefers-color-scheme: dark) {
    .display-layout {
        background-color: #1a1a1a;
    }
    
    .substitutions-table {
        background: var(--secondary-color);
    }
}

/* Exception Management Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.btn-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.modal-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 1.5rem 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Exception Items */
.exceptions-cell {
    max-width: 200px;
}

.exceptions-cell .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin: 1px;
    white-space: nowrap;
    display: inline-block;
    margin-bottom: 2px;
}

.exception-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.exception-item .badge {
    margin-right: 0.5rem;
}

.badge-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Exception form styling */
#addException .form-group {
    margin-bottom: 1rem;
}

#currentExceptions {
    margin-bottom: 1rem;
}

#exceptionsList {
    min-height: 50px;
}

/* Panel de exportación avanzada */
.advanced-export-panel {
    margin: 2rem 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-export-panel .form-container {
    margin-bottom: 0;
    background: white;
    border-radius: var(--border-radius);
}

.advanced-export-panel h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Mejoras para botones de acción en filtros */
.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-form {
    flex: 1;
    min-width: 300px;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


#exceptionsList .text-muted {
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    .exception-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .exception-item .badge {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

/* === ESTILOS COMPLETOS PARA LOGIN.PHP === */

/* Layout del cuerpo para páginas de autenticación */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    position: relative;
}

/* Overlay decorativo */
.auth-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Caja de login */
.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-box h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    border-radius: 2px;
}

/* Grupos de formulario */
.login-box .form-group {
    margin-bottom: 1.5rem;
}

/* Etiquetas de formulario */
.login-box label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

/* Campos de entrada */
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
    box-sizing: border-box;
    font-family: inherit;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Contenedor de contraseña con botón de mostrar/ocultar */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 3rem !important;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.password-toggle:hover {
    color: var(--accent-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.password-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Botón de envío */
.login-box button[type="submit"] {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.login-box button[type="submit"]:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.login-box button[type="submit"]:active {
    transform: translateY(0);
}

/* Enlaces adicionales */
.login-box .pw-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-box .pw-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Mensajes de error */
.login-box .error {
    background: linear-gradient(135deg, #fee, #fdd);
    border: 1px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    animation: shake 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Mensajes de éxito */
.login-box .success {
    background: linear-gradient(135deg, #efe, #dfd);
    border: 1px solid #cfc;
    color: #363;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    animation: bounce 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Responsive design para login */
@media (max-width: 768px) {
    .login-box {
        margin: 1rem;
        padding: 2rem;
        max-width: none;
    }
    
    .login-box h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
    }
    
    .login-box h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-box input[type="text"],
    .login-box input[type="password"],
    .login-box button[type="submit"] {
        padding: 0.75rem;
    }
}

/* Modo oscuro para login */
@media (prefers-color-scheme: dark) {
    .auth-body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .login-box {
        background: rgba(44, 62, 80, 0.95);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .login-box h1 {
        color: white;
    }
    
    .login-box label {
        color: #ecf0f1;
    }
    
    .login-box input[type="text"],
    .login-box input[type="password"] {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .login-box input[type="text"]::placeholder,
    .login-box input[type="password"]::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
}

/* Estilos específicos para impresión en consulta */
@media print {
    .main-content {
        margin: 0 !important;
        padding: 15px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: white !important;
    }
    
    .filter-actions,
    .date-navigation,
    .no-print {
        display: none !important;
    }
    
    .info-panel {
        margin-bottom: 15px !important;
        padding: 10px !important;
        background: #f5f5f5 !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
    }
    
    .consulta-table-list {
        overflow: visible !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .consulta-table-list .table {
        font-size: 10px !important;
    }
    
    .consulta-table-list .table th,
    .consulta-table-list .table td {
        border: 1px solid #000 !important;
        padding: 6px !important;
        font-size: 10px !important;
    }
    
    .consulta-table-list .table th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
        font-weight: bold !important;
    }
    
    .session-header {
        background-color: #e0e0e0 !important;
        color: #000 !important;
        font-weight: bold !important;
        text-align: center !important;
    }
    
    .badge {
        border: 1px solid #000 !important;
        background: #ddd !important;
        color: #000 !important;
        font-size: 8px !important;
    }
    
    .table-scroll-hint {
        display: none !important;
    }
    
    /* Header específico para consulta */
    h1 {
        font-size: 16px !important;
        text-align: center !important;
        margin-bottom: 10px !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 5px !important;
    }
    
    /* Página A4 optimizada */
    @page {
        size: A4;
        margin: 1cm;
    }
    
    /* Evitar cortar filas */
    tbody tr {
        page-break-inside: avoid;
    }
}
