/* ==========================================================================
   ACADEMIAQR - MÓDULO 7: GESTIÓN ADMINISTRATIVA, HORARIOS & PLANIFICADOR
   Estilos Ejecutivos, Modales de Alta Gama y Formato de Impresión Horizontal
   ========================================================================== */

:root {
    --adm-primary: #0891b2;
    --adm-primary-dark: #0e7490;
    --adm-primary-light: #ecfeff;
    --adm-primary-border: #a5f3fc;
    --adm-navy: #0f172a;
    --adm-slate: #334155;
    --adm-muted: #64748b;
    --adm-border: #e2e8f0;
    --adm-card-bg: #ffffff;
    --adm-bg-soft: #f8fafc;
    
    /* Áreas Curriculares */
    --area-math: #1d4ed8;
    --area-math-bg: #eff6ff;
    --area-math-border: #bfdbfe;
    
    --area-stem: #4338ca;
    --area-stem-bg: #eef2ff;
    --area-stem-border: #c7d2fe;
    
    --area-lang: #be185d;
    --area-lang-bg: #fdf2f8;
    --area-lang-border: #fbcfe8;
    
    --area-nat: #047857;
    --area-nat-bg: #ecfdf5;
    --area-nat-border: #a7f3d0;
    
    --area-soc: #b45309;
    --area-soc-bg: #fffbeb;
    --area-soc-border: #fde68a;
    
    --area-art: #6d28d9;
    --area-art-bg: #faf5ff;
    --area-art-border: #e9d5ff;
}

/* --------------------------------------------------------------------------
   1. BARRA DE HERRAMIENTAS Y LEYENDA DEL PLANIFICADOR
   -------------------------------------------------------------------------- */
.timetable-toolbar-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.timetable-header-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--adm-border);
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.timetable-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.timetable-title-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

.timetable-main-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--adm-navy);
    margin: 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.timetable-slot-counter {
    background: var(--adm-primary-light);
    color: var(--adm-primary-dark);
    border: 1px solid var(--adm-primary-border);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.timetable-controls-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.timetable-grade-picker-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--adm-bg-soft);
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--adm-border);
}

.timetable-grade-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--adm-slate);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.timetable-grade-select {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--adm-navy);
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.timetable-grade-select:focus {
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

/* Botones ejecutivos */
.btn-adm-print {
    background: #ffffff;
    color: var(--adm-slate);
    border: 1px solid #cbd5e1;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.48rem 0.9rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-adm-print:hover {
    background: #f1f5f9;
    color: var(--adm-navy);
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-adm-create {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #ffffff;
    border: none;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.5rem 1rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-adm-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(8, 145, 178, 0.35);
}

/* ==========================================================================
   CAL PRO - HEADER DE NAVEGACIÓN TIPO GOOGLE CALENDAR PRO
   ========================================================================== */
.cal-pro-header-bar {
    background: #ffffff;
    border: 1px solid var(--adm-border);
    border-radius: 14px;
    padding: 0.75rem 1.1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cal-pro-left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cal-nav-btn-group {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cal-nav-btn {
    background: transparent;
    border: none;
    border-right: 1px solid #cbd5e1;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--adm-slate);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:last-child {
    border-right: none;
}

.cal-nav-btn:hover {
    background: #f1f5f9;
    color: var(--adm-navy);
}

.cal-today-btn {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adm-navy);
    padding: 0.4rem 0.95rem;
}

.cal-pro-week-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--adm-navy);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: -0.2px;
}

.cal-week-number {
    font-weight: 800;
    color: #0f172a;
}

.cal-week-divider {
    color: #94a3b8;
    font-weight: 400;
}

.cal-week-dates {
    font-size: 0.92rem;
    font-weight: 600;
    color: #475569;
}

.cal-nav-action-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.38rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
}

.cal-nav-action-btn:hover {
    background: #f8fafc;
    color: var(--adm-navy);
    border-color: #94a3b8;
}

/* Selector de Vistas en Pastillas */
.cal-pro-center-pills {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.cal-view-pill {
    background: transparent;
    border: none;
    padding: 0.32rem 0.75rem;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cal-view-pill:hover {
    color: var(--adm-navy);
}

.cal-view-pill.active {
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cal-pro-right-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.cal-filter-select-wrap select {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--adm-navy);
    padding: 0.38rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.cal-filter-select-wrap select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   BANNER DE CLASE EN DESARROLLO ACTUAL (CAL PRO LIVE BANNER)
   ========================================================================== */
.cal-live-banner {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 0.7rem 1.15rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.cal-live-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
}

.cal-live-dot-pulse {
    width: 9px;
    height: 9px;
    background: #2563eb;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: calPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes calPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.cal-live-title {
    font-weight: 800;
    color: #1e3a8a;
}

.cal-live-subject {
    font-weight: 700;
    color: #2563eb;
}

.cal-live-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cal-live-timer {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cal-live-timer b {
    color: #1e293b;
    font-weight: 800;
}

.cal-live-action-btn {
    background: #2563eb;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.42rem 0.95rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.cal-live-action-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* Barra de Leyenda de Áreas Curriculares */
.timetable-legend-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--adm-border);
    font-size: 0.75rem;
}

.timetable-legend-title {
    font-weight: 800;
    color: var(--adm-slate);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    margin-right: 0.25rem;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.72rem;
    border: 1px solid transparent;
}

.legend-pill.math { background: var(--area-math-bg); color: var(--area-math); border-color: var(--area-math-border); }
.legend-pill.stem { background: var(--area-stem-bg); color: var(--area-stem); border-color: var(--area-stem-border); }
.legend-pill.lang { background: var(--area-lang-bg); color: var(--area-lang); border-color: var(--area-lang-border); }
.legend-pill.nat  { background: var(--area-nat-bg);  color: var(--area-nat);  border-color: var(--area-nat-border); }
.legend-pill.soc  { background: var(--area-soc-bg);  color: var(--area-soc);  border-color: var(--area-soc-border); }
.legend-pill.art  { background: var(--area-art-bg);  color: var(--area-art);  border-color: var(--area-art-border); }

/* --------------------------------------------------------------------------
   2. MATRIZ SEMANAL DE HORARIOS (TIMETABLE GRID)
   -------------------------------------------------------------------------- */
.timetable-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--adm-border);
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    position: relative;
}

.timetable-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Encabezados de Columna (Estilo Cal Pro) */
.timetable-table th {
    background: #f8fafc;
    padding: 0.6rem 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    user-select: none;
    vertical-align: middle;
}

.timetable-table th:last-child {
    border-right: none;
}

.timetable-table th.period-head-col {
    width: 95px;
    min-width: 85px;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #ffffff;
    border-right: 2px solid #e2e8f0;
    padding: 0.5rem;
}

.cal-hour-head-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Tarjeta de Encabezado de Día */
.cal-day-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.55rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    transition: all 0.2s ease;
}

.cal-day-name {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.cal-day-num-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.cal-day-number {
    font-size: 1.42rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

/* DÍA ACTIVO / HOY: TARJETA AZUL REAL SÓLIDA (Exacto al ejemplo) */
.cal-day-card.is-today {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.cal-day-card.is-today .cal-day-name {
    color: #ffffff !important;
    opacity: 0.95;
}

.cal-day-card.is-today .cal-day-number {
    color: #ffffff !important;
}

.cal-day-today-chip {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Celdas de Período Horario */
.timetable-table td {
    padding: 0.48rem;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    vertical-align: top;
    height: 115px;
    background: #ffffff;
    position: relative;
    transition: background 0.15s ease;
}

.timetable-table td:last-child {
    border-right: none;
}

/* Columna del día activo destacada con tinte azul suave */
.timetable-table td.day-col-today {
    background-color: #f8faff;
    border-left: 1px solid #bfdbfe;
    border-right: 1px solid #bfdbfe;
}

.timetable-table td.period-label-col {
    display: table-cell !important;
    background: #ffffff;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 2px solid #e2e8f0;
    padding: 0.4rem;
    width: 95px;
    min-width: 85px;
    vertical-align: middle;
    text-align: center;
}

.period-cell-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 0.25rem;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.4rem 0.25rem;
    border: 1px solid #e2e8f0;
}

.period-badge-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.period-badge-time {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.period-badge-dur {
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    background: #ffffff;
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Línea Roja de Hora Actual (Cal Pro Current Time Indicator) */
.cal-current-time-indicator {
    position: absolute;
    left: 85px;
    width: 1150px;
    max-width: none;
    top: 50%;
    height: 2px;
    background: #ef4444;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.cal-current-time-badge {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    z-index: 11;
}

.cal-current-time-dot {
    position: absolute;
    left: 85px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #ef4444;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    z-index: 12;
}

/* Fila de Receso Escolar */
.timetable-table tr.break-row td {
    height: 48px;
    background: #fffbeb;
    border-top: 1px dashed #fcd34d;
    border-bottom: 1px dashed #fcd34d;
    padding: 0.35rem 0.6rem;
}

.break-period-badge {
    background: #fef3c7;
    border-color: #fde68a;
}

.break-period-badge .period-badge-tag {
    background: #d97706;
    color: #ffffff;
    border-color: #b45309;
}

.break-period-badge .period-badge-time {
    color: #92400e;
}

.break-cell-content {
    vertical-align: middle !important;
}

.break-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 0.82rem;
    color: #b45309;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.break-banner i {
    font-size: 1rem;
    color: #d97706;
}

.break-chip {
    font-size: 0.68rem;
    font-weight: 700;
    background: #ffffff;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* --------------------------------------------------------------------------
   3. TARJETAS CON TONALIDAD COMPLETA DE COLOR (ESTILO CAL PRO)
   -------------------------------------------------------------------------- */
.timetable-slot-card {
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.timetable-slot-card:hover {
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ÁREA MATEMÁTICAS: Tonalidad celeste/azul hielo */
.timetable-slot-card.area-math {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.timetable-slot-card.area-math .slot-pill-code {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.timetable-slot-card.area-math .slot-pill-room {
    background: #2563eb;
    color: #ffffff;
}
.timetable-slot-card.area-math .timetable-slot-subject {
    color: #1e3a8a;
}
.timetable-slot-card.area-math .timetable-slot-time {
    color: #2563eb;
}

/* ÁREA STEM / SUTZ / TECNOLOGÍA: Tonalidad índigo suave */
.timetable-slot-card.area-stem {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.timetable-slot-card.area-stem .slot-pill-code {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.timetable-slot-card.area-stem .slot-pill-room {
    background: #4f46e5;
    color: #ffffff;
}
.timetable-slot-card.area-stem .timetable-slot-subject {
    color: #312e81;
}
.timetable-slot-card.area-stem .timetable-slot-time {
    color: #4f46e5;
}

/* ÁREA CIENCIAS NATURALES / FÍSICA: Tonalidad menta / esmeralda suave */
.timetable-slot-card.area-nat {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.timetable-slot-card.area-nat .slot-pill-code {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.timetable-slot-card.area-nat .slot-pill-room {
    background: #059669;
    color: #ffffff;
}
.timetable-slot-card.area-nat .timetable-slot-subject {
    color: #064e3b;
}
.timetable-slot-card.area-nat .timetable-slot-time {
    color: #059669;
}

/* ÁREA COMUNICACIÓN & LETRAS: Tonalidad magenta / rosa fucsia (coincide con la etiqueta de área) */
.timetable-slot-card.area-lang {
    background: #fdf2f8;
    border-color: #fbcfe8;
}
.timetable-slot-card.area-lang .slot-pill-code {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #fbcfe8;
}
.timetable-slot-card.area-lang .slot-pill-room {
    background: #be185d;
    color: #ffffff;
}
.timetable-slot-card.area-lang .timetable-slot-subject {
    color: #831843;
}
.timetable-slot-card.area-lang .timetable-slot-time {
    color: #be185d;
}
.timetable-slot-card.area-lang .timetable-slot-teacher-name i {
    color: #be185d;
}

/* ==========================================================================
   SOPORTE DE COLOR DINÁMICO PARA ÁREAS Y ETIQUETAS PERSONALIZADAS
   Cualquier color seleccionado se proyecta automáticamente a:
   - Fondo pastel suave (10% tinte)
   - Borde suave (35% tinte)
   - Cápsula de código (16% tinte)
   - Cápsula de aula sólida (100% color con texto blanco nítido)
   - Título oscuro contrastado y metadatos
   ========================================================================== */
.timetable-slot-card.has-custom-color {
    background: color-mix(in srgb, var(--slot-color) 10%, #ffffff) !important;
    border-color: color-mix(in srgb, var(--slot-color) 38%, #ffffff) !important;
}
.timetable-slot-card.has-custom-color .slot-pill-code {
    background: color-mix(in srgb, var(--slot-color) 16%, #ffffff) !important;
    color: color-mix(in srgb, var(--slot-color) 85%, #000000) !important;
    border-color: color-mix(in srgb, var(--slot-color) 35%, #ffffff) !important;
}
.timetable-slot-card.has-custom-color .slot-pill-room {
    background: var(--slot-color) !important;
    color: #ffffff !important;
}
.timetable-slot-card.has-custom-color .timetable-slot-subject {
    color: color-mix(in srgb, var(--slot-color) 78%, #000000) !important;
}
.timetable-slot-card.has-custom-color .timetable-slot-time {
    color: var(--slot-color) !important;
}
.timetable-slot-card.has-custom-color .timetable-slot-teacher-name i {
    color: var(--slot-color) !important;
}

/* ÁREA CIENCIAS SOCIALES: Tonalidad ámbar / tierra cálida */
.timetable-slot-card.area-soc {
    background: #fffbeb;
    border-color: #fde68a;
}
.timetable-slot-card.area-soc .slot-pill-code {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.timetable-slot-card.area-soc .slot-pill-room {
    background: #d97706;
    color: #ffffff;
}
.timetable-slot-card.area-soc .timetable-slot-subject {
    color: #78350f;
}
.timetable-slot-card.area-soc .timetable-slot-time {
    color: #d97706;
}

/* ÁREA ARTE & DEPORTES: Tonalidad púrpura / lila suave */
.timetable-slot-card.area-art {
    background: #faf5ff;
    border-color: #e9d5ff;
}
.timetable-slot-card.area-art .slot-pill-code {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}
.timetable-slot-card.area-art .slot-pill-room {
    background: #7c3aed;
    color: #ffffff;
}
.timetable-slot-card.area-art .timetable-slot-subject {
    color: #581c87;
}
.timetable-slot-card.area-art .timetable-slot-time {
    color: #7c3aed;
}

/* ÁREA EXAMEN / PARCIAL: Tonalidad coral / alerta suave */
.timetable-slot-card.area-exam {
    background: #fef2f2;
    border-color: #fca5a5;
}
.timetable-slot-card.area-exam .slot-pill-code {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.timetable-slot-card.area-exam .slot-pill-room {
    background: #dc2626;
    color: #ffffff;
}
.timetable-slot-card.area-exam .timetable-slot-subject {
    color: #991b1b;
}
.timetable-slot-card.area-exam .timetable-slot-time {
    color: #dc2626;
}

.timetable-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.slot-pills-left {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.slot-pill-code {
    font-size: 0.68rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 1px 6px;
    border-radius: 4px;
}

.slot-pill-room {
    font-size: 0.67rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.slot-badge-live {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 4px;
    padding: 1px 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.slot-badge-exam {
    background: #dc2626;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 4px;
    padding: 1px 5px;
}

.timetable-slot-subject {
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0.2rem 0 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timetable-slot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.72rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.timetable-slot-teacher-name {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
}

.timetable-slot-teacher-name i {
    font-size: 0.72rem;
    color: #94a3b8;
}

.timetable-slot-time {
    font-weight: 700;
    font-size: 0.72rem;
    white-space: nowrap;
}

.timetable-slot-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.timetable-slot-card:hover .timetable-slot-actions {
    opacity: 1;
}

.slot-action-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #64748b;
}

.slot-action-btn.edit:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

.slot-action-btn.delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}

/* Espacio Libre / Disponible */
.timetable-free-slot {
    height: 100%;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.5rem;
}

.free-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.free-slot-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.free-slot-text {
    font-size: 0.72rem;
    font-weight: 700;
}

.timetable-free-slot:hover {
    border-color: var(--adm-primary);
    background: rgba(8, 145, 178, 0.05);
    transform: scale(0.98);
}

.timetable-free-slot:hover .free-slot-content {
    color: var(--adm-primary);
}

.timetable-free-slot:hover .free-slot-icon {
    background: var(--adm-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.3);
}

/* --------------------------------------------------------------------------
   4. MODALES EJECUTIVOS (DISEÑO INSTITUCIONAL ULTRA-PROFESIONAL)
   -------------------------------------------------------------------------- */
.adm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: admModalFadeIn 0.2s ease-out;
}

@keyframes admModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.adm-modal-card {
    background: #ffffff;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.05);
    border: none;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: admModalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes admModalPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Encabezado con degradado cyan ejecutivo */
.adm-modal-header {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 60%, #06b6d4 100%);
    padding: 1.2rem 1.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 2px 10px rgba(8, 145, 178, 0.2);
}

.adm-modal-header-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.adm-modal-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.adm-modal-header-titles {
    display: flex;
    flex-direction: column;
}

.adm-modal-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.2px;
}

.adm-modal-subtitle {
    font-size: 0.75rem;
    color: #e0f2fe;
    margin: 0.15rem 0 0 0;
    font-weight: 500;
}

.adm-modal-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adm-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Cuerpo del formulario */
.adm-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.adm-form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.adm-form-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--adm-slate);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.adm-form-section-header i {
    color: var(--adm-primary);
}

.adm-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.adm-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.adm-form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adm-slate);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.adm-form-label i {
    color: var(--adm-muted);
    font-size: 0.78rem;
}

.adm-form-input,
.adm-form-select {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--adm-navy);
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.adm-form-input:focus,
.adm-form-select:focus {
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3.5px rgba(8, 145, 178, 0.15);
    background: #ffffff;
}

/* Caja de Vista Previa en Vivo (Live Preview) */
.adm-live-preview-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1.5px dashed #a5f3fc;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.adm-preview-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--adm-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.adm-preview-card-wrap {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-left: 4px solid var(--adm-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.adm-preview-course {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--adm-navy);
}

.adm-preview-details {
    font-size: 0.75rem;
    color: var(--adm-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.adm-preview-badge {
    background: #ecfeff;
    color: #0891b2;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Perfil de Docente en Asignación */
.adm-teacher-profile-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--adm-border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.adm-teacher-avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

.adm-teacher-info-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--adm-navy);
}

.adm-teacher-info-sub {
    font-size: 0.78rem;
    color: var(--adm-muted);
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.adm-teacher-workload-chip {
    font-size: 0.72rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 1px 7px;
    border-radius: 12px;
}

/* Pie de Modal y Acciones */
.adm-modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-adm-cancel {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: var(--adm-slate);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-adm-cancel:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--adm-navy);
}

.btn-adm-submit {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.58rem 1.35rem;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-adm-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(8, 145, 178, 0.4);
}

.btn-adm-submit:active {
    transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   4.7. MALLA CURRICULAR Y CATÁLOGO DE CURSOS (ESPACIADO, TABLA & CUADRÍCULA)
   -------------------------------------------------------------------------- */
.curriculum-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 2rem;
}

.curriculum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.curriculum-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.curriculum-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    border: 1.5px solid #a5f3fc;
    color: #0891b2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.12);
    flex-shrink: 0;
}

.curriculum-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.curriculum-subtitle {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
    line-height: 1.45;
}

/* Barra de Estadísticas Rápidas */
.curriculum-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.curriculum-stat-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.curriculum-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.curriculum-stat-item .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.curriculum-stat-item .stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.curriculum-stat-item .stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.1rem;
}

/* Barra de Filtros, Búsqueda y Ordenamiento */
.curriculum-toolbar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
}

.curriculum-search-box {
    position: relative;
    flex: 1 1 280px;
    min-width: 240px;
    max-width: 380px;
}

.curriculum-search-box i.fa-magnifying-glass {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.curriculum-search-box input {
    width: 100%;
    padding: 0.55rem 2.2rem 0.55rem 2.35rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.84rem;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.curriculum-search-box input:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.curriculum-search-box .search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.curriculum-search-box .search-clear-btn:hover {
    color: #ef4444;
}

.curriculum-filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.curriculum-filters-group .filter-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.2rem 0.65rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.curriculum-filters-group .filter-field:hover,
.curriculum-filters-group .filter-field:focus-within {
    border-color: #0891b2;
    box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.1);
}

.curriculum-filters-group .filter-field label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.curriculum-filters-group .filter-field select {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.35rem 0.2rem;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.curriculum-view-toggle {
    display: flex;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    padding: 2px;
    gap: 2px;
}

.curriculum-view-toggle .view-toggle-btn {
    border: none;
    background: transparent;
    padding: 0.42rem 0.75rem;
    border-radius: 7px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.curriculum-view-toggle .view-toggle-btn:hover {
    color: #0891b2;
}

.curriculum-view-toggle .view-toggle-btn.active {
    background: #0891b2;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.25);
}

.btn-reset-filters {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
    transition: all 0.15s ease !important;
}

.btn-reset-filters:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   VISTA 1: TABLA PROFESIONAL CON ESPACIADO GENEROSO
   -------------------------------------------------------------------------- */
.curriculum-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow-x: auto;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.curriculum-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 960px;
}

.curriculum-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.05rem 1.35rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.curriculum-table tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.curriculum-table tbody tr:hover {
    background-color: #f8fafc;
}

.curriculum-table tbody tr:last-child td {
    border-bottom: none;
}

.curriculum-table tbody td {
    padding: 1.15rem 1.35rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.86rem;
    color: #334155;
}

/* Píldoras y elementos internos de la tabla */
.course-code-pill {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-block;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.course-name-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.course-name-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.35;
}

.course-topics-text {
    font-size: 0.76rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.course-topics-text i {
    font-size: 0.7rem;
    color: #94a3b8;
}

.course-area-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.course-grade-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.course-teacher-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.teacher-avatar-mini {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 1.5px solid #bae6fd;
}

.teacher-name-label {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.86rem;
    line-height: 1.25;
}

.course-hours-badge {
    font-weight: 800;
    font-size: 0.84rem;
    color: #0891b2;
    background: #ecfeff;
    border: 1px solid #cffafe;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.course-room-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.course-action-btns {
    display: inline-flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.btn-action-curriculum {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 0.85rem;
}

.btn-action-curriculum.edit:hover {
    color: #0891b2;
    border-color: #0891b2;
    background: #ecfeff;
    transform: translateY(-1px);
}

.btn-action-curriculum.delete:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   VISTA 2: CUADRÍCULA DE TARJETAS (GRID VIEW)
   -------------------------------------------------------------------------- */
.curriculum-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.35rem;
    margin-top: 0.5rem;
}

.curriculum-course-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4.5px solid var(--course-accent);
    border-radius: 16px;
    padding: 1.35rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.curriculum-course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
    border-color: color-mix(in srgb, var(--course-accent) 40%, #cbd5e1);
}

.curriculum-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.curriculum-card-subject {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.45rem;
}

.curriculum-card-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.85rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.curriculum-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}

.curriculum-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

/* Estado de lista vacía */
.curriculum-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 14px;
    border: 1.5px dashed #cbd5e1;
}

.curriculum-empty-state i {
    font-size: 2.8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.curriculum-empty-state h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.curriculum-empty-state p {
    font-size: 0.85rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   4.8. NAVEGACIÓN DE PESTAÑAS ADMINISTRATIVAS CON CÓDIGO CROMÁTICO VIBRANTE
   -------------------------------------------------------------------------- */
.admin-tab-nav {
    display: flex;
    gap: 0.65rem;
    padding: 0.35rem 0.45rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    scrollbar-width: thin;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.15rem;
    border: 1.5px solid transparent;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    border-radius: 12px;
}

.admin-tab-btn .tab-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* 1. Horarios: Azul Real (#2563eb) */
.admin-tab-btn.tab-color-horarios .tab-btn-icon {
    background: #eff6ff;
    color: #2563eb;
}
.admin-tab-btn.tab-color-horarios:hover {
    color: #1d4ed8;
    background: #eff6ff;
}
.admin-tab-btn.tab-color-horarios.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.admin-tab-btn.tab-color-horarios.active .tab-btn-icon {
    background: #2563eb;
    color: #ffffff;
}

/* 2. Cursos: Océano / Cyan (#0891b2) */
.admin-tab-btn.tab-color-cursos .tab-btn-icon {
    background: #ecfeff;
    color: #0891b2;
}
.admin-tab-btn.tab-color-cursos:hover {
    color: #0e7490;
    background: #ecfeff;
}
.admin-tab-btn.tab-color-cursos.active {
    background: #ecfeff;
    color: #0891b2;
    border-color: #a5f3fc;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.14);
}
.admin-tab-btn.tab-color-cursos.active .tab-btn-icon {
    background: #0891b2;
    color: #ffffff;
}

/* 3. Gestión de Maestros: Ámbar Cálido (#d97706) */
.admin-tab-btn.tab-color-docentes .tab-btn-icon {
    background: #fffbeb;
    color: #d97706;
}
.admin-tab-btn.tab-color-docentes:hover {
    color: #b45309;
    background: #fffbeb;
}
.admin-tab-btn.tab-color-docentes.active {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.14);
}
.admin-tab-btn.tab-color-docentes.active .tab-btn-icon {
    background: #d97706;
    color: #ffffff;
}

/* 4. Alumnos del Colegio: Esmeralda (#059669) */
.admin-tab-btn.tab-color-alumnos .tab-btn-icon {
    background: #ecfdf5;
    color: #059669;
}
.admin-tab-btn.tab-color-alumnos:hover {
    color: #047857;
    background: #ecfdf5;
}
.admin-tab-btn.tab-color-alumnos.active {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.14);
}
.admin-tab-btn.tab-color-alumnos.active .tab-btn-icon {
    background: #059669;
    color: #ffffff;
}

/* 5. Actividades Generales: Rosa / Carmesí (#e11d48) */
.admin-tab-btn.tab-color-actividades .tab-btn-icon {
    background: #fff1f2;
    color: #e11d48;
}
.admin-tab-btn.tab-color-actividades:hover {
    color: #be123c;
    background: #fff1f2;
}
.admin-tab-btn.tab-color-actividades.active {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.14);
}
.admin-tab-btn.tab-color-actividades.active .tab-btn-icon {
    background: #e11d48;
    color: #ffffff;
}

/* 6. Documentos & Normativa: Índigo Académico (#0284c7 / #0e7490) */
.admin-tab-btn.tab-color-documentos .tab-btn-icon {
    background: #e0f2fe;
    color: #0284c7;
}
.admin-tab-btn.tab-color-documentos:hover {
    color: #0369a1;
    background: #f0f9ff;
}
.admin-tab-btn.tab-color-documentos.active {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.14);
}
.admin-tab-btn.tab-color-documentos.active .tab-btn-icon {
    background: #0e7490;
    color: #ffffff;
}

/* 7. Consola Operativa: Violeta (#7c3aed) */
.admin-tab-btn.tab-color-operaciones .tab-btn-icon {
    background: #f5f3ff;
    color: #7c3aed;
}
.admin-tab-btn.tab-color-operaciones:hover {
    color: #6d28d9;
    background: #f5f3ff;
}
.admin-tab-btn.tab-color-operaciones.active {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.14);
}
.admin-tab-btn.tab-color-operaciones.active .tab-btn-icon {
    background: #7c3aed;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   4.9. GESTIÓN DE MAESTROS & CLAUSTRO DOCENTE (FICHAS PREMIUM)
   -------------------------------------------------------------------------- */
.teacher-management-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 2rem;
}

.teacher-mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.teacher-mgmt-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
    flex-shrink: 0;
}

.teacher-mgmt-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.teacher-mgmt-subtitle {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
    line-height: 1.45;
}

/* Barra de Estadísticas del Claustro */
.teacher-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.teacher-stat-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.teacher-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.teacher-stat-item .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.teacher-stat-item .stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.teacher-stat-item .stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.1rem;
}

/* Barra de Filtros y Búsqueda de Catedráticos */
.teacher-toolbar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
}

.teacher-search-box {
    position: relative;
    flex: 1 1 280px;
    min-width: 240px;
    max-width: 400px;
}

.teacher-search-box i.fa-magnifying-glass {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.teacher-search-box input {
    width: 100%;
    padding: 0.55rem 2.2rem 0.55rem 2.35rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.84rem;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.teacher-search-box input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.teacher-search-box .search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
}

.teacher-filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.teacher-filters-group .filter-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.2rem 0.65rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.teacher-filters-group .filter-field:hover,
.teacher-filters-group .filter-field:focus-within {
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.1);
}

.teacher-filters-group .filter-field label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.teacher-filters-group .filter-field select {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.35rem 0.2rem;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

/* Cuadrícula de Fichas de Maestros */
.teacher-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.teacher-master-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border-top: 4px solid #d97706;
}

.teacher-master-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
    border-top-color: #b45309;
}

.teacher-card-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.teacher-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.teacher-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.teacher-avatar-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2.5px solid #fde68a;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.teacher-status-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.teacher-identity-info {
    flex: 1;
    min-width: 0;
}

.teacher-full-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.teacher-specialty-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 0.3rem;
}

.teacher-title-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.35;
}

.teacher-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.teacher-edit-btn:hover {
    color: #d97706;
    border-color: #d97706;
    background: #fffbeb;
    transform: translateY(-1px);
}

/* Medidor de Carga Horaria */
.teacher-workload-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    margin: 0.85rem 0;
}

.teacher-workload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.teacher-workload-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 0.45rem 0;
}

.teacher-workload-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.teacher-workload-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* Lista de Materias a su Cargo */
.teacher-courses-section {
    flex: 1;
    margin-bottom: 0.85rem;
}

.teacher-courses-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.teacher-courses-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.teacher-course-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.78rem;
    transition: all 0.15s ease;
}

.teacher-course-chip:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.course-chip-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.course-chip-code {
    font-family: monospace;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 2px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

.course-chip-name {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-chip-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.btn-unassign-course {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-unassign-course:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Footer de la Ficha */
.teacher-card-footer {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.btn-teacher-carnet {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #047857;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-teacher-carnet:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

.btn-teacher-assign {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #ffffff;
    background: #0891b2;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.2);
}

.btn-teacher-assign:hover {
    background: #0e7490;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   5. FORMATO DE IMPRESIÓN HORIZONTAL INSTITUCIONAL (@MEDIA PRINT)
   -------------------------------------------------------------------------- */
.timetable-print-header,
.timetable-print-footer {
    display: none; /* Oculto en pantalla normal */
}

@media print {
    @page {
        size: landscape;
        margin: 7mm 9mm;
    }

    /* Ocultar elementos no imprimibles */
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
        font-size: 9pt !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .mobile-header,
    .app-sidebar,
    .sidebar,
    .app-header,
    .topbar,
    .admin-header,
    .admin-tabs-nav,
    .timetable-header-card,
    .timetable-legend-bar,
    .timetable-slot-actions,
    .timetable-free-slot .free-slot-icon,
    .superuser-monitor-bar,
    .btn-topbar-help,
    .modal-overlay,
    .adm-modal-overlay,
    #moduleGuardOverlay,
    .mobile-bottom-nav,
    .card-header,
    .btn,
    button {
        display: none !important;
    }

    .app-layout,
    .app-main,
    .main-content,
    .content-area,
    .content-card,
    .card-body {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
    }

    /* Mostrar encabezado oficial institucional para impresión */
    .timetable-print-header {
        display: block !important;
        margin-bottom: 0.6rem !important;
        padding-bottom: 0.45rem !important;
        border-bottom: 2px solid #0f172a !important;
    }

    .print-header-top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 0.35rem !important;
    }

    .print-school-brand {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .print-logo {
        width: 44px !important;
        height: 44px !important;
        object-fit: contain !important;
    }

    .print-school-name {
        font-size: 13pt !important;
        font-weight: 900 !important;
        color: #0f172a !important;
        margin: 0 !important;
        letter-spacing: -0.2px !important;
        text-transform: uppercase !important;
    }

    .print-school-sub {
        font-size: 8pt !important;
        color: #475569 !important;
        margin: 0 !important;
    }

    .print-doc-stamp {
        text-align: right !important;
        border: 1.5px solid #0891b2 !important;
        background: #ecfeff !important;
        padding: 0.3rem 0.65rem !important;
        border-radius: 6px !important;
    }

    .print-stamp-title {
        font-size: 7.5pt !important;
        font-weight: 900 !important;
        color: #0e7490 !important;
        letter-spacing: 0.5px !important;
    }

    .print-stamp-code {
        font-size: 9.5pt !important;
        font-weight: 800 !important;
        color: #0891b2 !important;
        margin-top: 1px !important;
    }

    .print-meta-grid {
        display: grid !important;
        grid-template-columns: 1.3fr 1.3fr 1fr 1fr !important;
        gap: 0.4rem !important;
        background: #f8fafc !important;
        padding: 0.35rem 0.65rem !important;
        border-radius: 6px !important;
        border: 1px solid #cbd5e1 !important;
    }

    .print-meta-item {
        display: flex !important;
        flex-direction: column !important;
        font-size: 7.5pt !important;
    }

    .print-meta-label {
        font-size: 6.5pt !important;
        font-weight: 800 !important;
        color: #64748b !important;
        text-transform: uppercase !important;
    }

    .print-meta-value {
        font-weight: 800 !important;
        color: #0f172a !important;
    }

    /* Tabla de Horarios Adaptada al Ancho Horizontal */
    .timetable-wrapper {
        border-radius: 0 !important;
        border: 1.5px solid #0f172a !important;
        box-shadow: none !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .timetable-table {
        min-width: 100% !important;
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 8pt !important;
    }

    .timetable-table th {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #94a3b8 !important;
        padding: 4px 6px !important;
        font-size: 8pt !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
    }

    .timetable-table th.period-head-col {
        width: 12% !important;
        border-right: 2px solid #0f172a !important;
    }

    .timetable-table td {
        border: 1px solid #94a3b8 !important;
        padding: 3px 4px !important;
        height: auto !important;
        min-height: 48px !important;
        background: #ffffff !important;
        vertical-align: top !important;
    }

    .timetable-table td.period-label-col {
        border-right: 2px solid #0f172a !important;
        background: #f8fafc !important;
        width: 12% !important;
        padding: 3px !important;
    }

    .period-cell-badge {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        gap: 1px !important;
    }

    .period-badge-tag {
        font-size: 8pt !important;
        background: transparent !important;
        border: none !important;
        color: #0f172a !important;
        font-weight: 800 !important;
        padding: 0 !important;
    }

    .period-badge-time {
        font-size: 7pt !important;
        color: #475569 !important;
        font-weight: 700 !important;
    }

    .period-badge-dur {
        display: none !important;
    }

    /* Tarjetas impresas en alta legibilidad */
    .timetable-slot-card {
        border: 1px solid #64748b !important;
        border-left: 4px solid #0f172a !important;
        box-shadow: none !important;
        padding: 3px 5px !important;
        background: #ffffff !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .timetable-slot-header {
        margin-bottom: 1px !important;
    }

    .timetable-slot-code {
        font-size: 6.5pt !important;
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        padding: 0 3px !important;
    }

    .timetable-slot-area-tag {
        font-size: 6.5pt !important;
    }

    .timetable-slot-subject {
        font-size: 8pt !important;
        font-weight: 800 !important;
        color: #000000 !important;
        margin-bottom: 1px !important;
        line-height: 1.15 !important;
    }

    .timetable-slot-teacher {
        font-size: 7pt !important;
        color: #334155 !important;
        margin-bottom: 2px !important;
        font-weight: 600 !important;
    }

    .timetable-slot-meta {
        padding-top: 1px !important;
        border-top: 1px dotted #cbd5e1 !important;
    }

    .timetable-slot-room {
        font-size: 6.5pt !important;
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        padding: 0 4px !important;
    }

    /* Espacio libre en impresión */
    .timetable-free-slot {
        border: 1px dotted #cbd5e1 !important;
        background: #ffffff !important;
        min-height: 48px !important;
        padding: 2px !important;
    }

    .free-slot-text {
        font-size: 6.5pt !important;
        color: #cbd5e1 !important;
    }

    /* Fila de receso en impresión */
    .timetable-table tr.break-row td {
        background: #fef3c7 !important;
        border: 1px solid #d97706 !important;
        padding: 3px !important;
    }

    .break-banner {
        font-size: 7.5pt !important;
        color: #92400e !important;
    }

    .break-chip {
        font-size: 6.5pt !important;
        background: #ffffff !important;
        border: 1px solid #d97706 !important;
        color: #92400e !important;
    }

    /* Pie de firmas para versión en papel */
    .timetable-print-footer {
        display: block !important;
        margin-top: 1.2rem !important;
        padding-top: 0.5rem !important;
        page-break-inside: avoid !important;
    }

    .print-signatures-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 2rem !important;
        margin-top: 2rem !important;
        text-align: center !important;
    }

    .print-sig-col {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .print-sig-line {
        width: 80% !important;
        border-bottom: 1.5px solid #0f172a !important;
        margin-bottom: 0.35rem !important;
    }

    .print-sig-role {
        font-size: 8pt !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        text-transform: uppercase !important;
    }

    .print-sig-sub {
        font-size: 7pt !important;
        color: #64748b !important;
    }

    .print-legal-note {
        margin-top: 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 6.5pt !important;
        color: #64748b !important;
        border-top: 1px solid #e2e8f0 !important;
        padding-top: 0.3rem !important;
    }
}

/* ========================================================================== */
/* TAB 3: GESTIÓN DE MAESTROS & CLAUSTRO DOCENTE                              */
/* ========================================================================== */

.teacher-management-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    margin-bottom: 2rem;
}

.teacher-mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.teacher-mgmt-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
    flex-shrink: 0;
}

.teacher-mgmt-titles h3 {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.teacher-mgmt-titles p {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
    line-height: 1.45;
}

.teacher-mgmt-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* Barra de Estadísticas Rápidas de Maestros */
.teacher-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.teacher-stat-pill {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.teacher-stat-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.teacher-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.teacher-stat-icon.teachers { background: #fffbeb; color: #d97706; }
.teacher-stat-icon.hours { background: #eff6ff; color: #2563eb; }
.teacher-stat-icon.load { background: #f0fdf4; color: #059669; }
.teacher-stat-icon.carnets { background: #faf5ff; color: #7c3aed; }

.teacher-stat-content {
    display: flex;
    flex-direction: column;
}

.teacher-stat-val {
    font-size: 1.32rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.teacher-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-top: 0.2rem;
}

/* Barra de Búsqueda y Filtros de Maestros */
.teacher-toolbar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.teacher-search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.teacher-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.teacher-search-input {
    width: 100%;
    padding: 0.65rem 2.2rem 0.65rem 2.5rem;
    font-size: 0.88rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
}

.teacher-search-input:focus {
    border-color: #d97706;
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.teacher-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.2rem;
}

.teacher-search-clear:hover {
    color: #ef4444;
}

.teacher-filters-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.teacher-filter-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.teacher-filter-select {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
}

.teacher-filter-select:focus {
    border-color: #d97706;
    outline: none;
}

/* Grilla de Fichas de Maestros */
.teacher-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

/* Ficha Maestra Individual */
.teacher-master-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    border-top: 3px solid #d97706;
}

.teacher-master-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
    border-top-color: #b45309;
}

/* Header de la Tarjeta */
.teacher-card-top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.teacher-avatar-frame {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    border: 2.5px solid #d97706;
    padding: 2px;
    background: #ffffff;
    overflow: visible;
}

.teacher-avatar-frame img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.teacher-status-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.teacher-identity {
    flex: 1;
    min-width: 0;
}

.teacher-specialty-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    margin-bottom: 0.3rem;
}

.teacher-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-degree {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-edit-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.teacher-edit-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

/* Fila de Metadatos */
.teacher-meta-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: #64748b;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.teacher-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-meta-item i {
    color: #94a3b8;
    font-size: 0.78rem;
}

/* Medidor de Carga Horaria */
.teacher-workload-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
}

.teacher-workload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    margin-bottom: 0.45rem;
}

.teacher-workload-title {
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.teacher-workload-values {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.teacher-workload-status-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
}

.teacher-workload-status-badge.load-optimal { background: #dcfce7; color: #15803d; }
.teacher-workload-status-badge.load-high { background: #fef3c7; color: #b45309; }
.teacher-workload-status-badge.load-full { background: #fee2e2; color: #b91c1c; }
.teacher-workload-status-badge.load-available { background: #e0f2fe; color: #0369a1; }

.teacher-workload-hours {
    font-weight: 800;
    color: #0f172a;
}

.teacher-workload-pct {
    font-weight: 600;
    color: #64748b;
    font-size: 0.72rem;
}

.teacher-load-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.teacher-load-progress {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.teacher-load-progress.load-optimal { background: linear-gradient(90deg, #10b981, #059669); }
.teacher-load-progress.load-high { background: linear-gradient(90deg, #f59e0b, #d97706); }
.teacher-load-progress.load-full { background: linear-gradient(90deg, #ef4444, #dc2626); }
.teacher-load-progress.load-available { background: linear-gradient(90deg, #38bdf8, #0284c7); }

/* Sección de Materias a su Cargo */
.teacher-courses-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.teacher-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.teacher-courses-title {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.teacher-courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: flex-start;
}

.teacher-course-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 600;
    background: #f8fafc;
    border: 1.5px solid var(--chip-color, #cbd5e1);
    color: #0f172a;
    transition: all 0.15s ease;
}

.teacher-course-chip:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.teacher-course-chip .chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.teacher-course-chip .chip-name {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-course-chip .chip-grade {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
}

.teacher-course-chip .chip-hours {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0891b2;
}

.teacher-course-chip .chip-unassign-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.1rem 0.2rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.teacher-course-chip .chip-unassign-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.teacher-no-courses {
    font-size: 0.76rem;
    color: #94a3b8;
    font-style: italic;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Pie de Acciones de la Tarjeta */
.teacher-card-footer {
    display: flex;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.teacher-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.teacher-action-btn.primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.teacher-action-btn.primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
    color: #ffffff;
}

.teacher-action-btn.secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

.teacher-action-btn.secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Estado Vacío de Búsqueda de Maestros */
.teacher-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}

.teacher-empty-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 0.85rem;
}

.teacher-empty-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.teacher-empty-desc {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 1rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   CALENDARIO STUDIO LEDGER V2 (5 VISTAS + LIVE MERIDIAN + DRAG & DROP)
   ========================================================================== */
.cal-studio-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.7rem 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    gap: 0.75rem;
}

.cal-studio-bar .cal-pro-week-title {
    font-variant-numeric: tabular-nums;
    font-size: 1.02rem;
    gap: 0.5rem;
}

.cal-studio-bar .cal-week-number {
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
    font-size: 0.74rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.cal-date-picker-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 0.25rem 0.55rem;
    color: #0e7490;
    cursor: pointer;
    font-size: 0.78rem;
}

.cal-date-native-input {
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    max-width: 118px;
}

.cal-studio-bar .cal-view-pill.active {
    background: #0e7490;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(14, 116, 144, 0.28);
}

.cal-subrail-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 1.35fr);
    gap: 0.75rem;
    align-items: stretch;
}

.cal-live-compact {
    margin-bottom: 0;
    padding: 0.5rem 0.9rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 3.5px solid #0e7490;
    border-radius: 12px;
}

.cal-live-compact.is-live-now {
    background: #fff1f2;
    border-color: #fecdd3;
    border-left-color: #e11d48;
}

.cal-live-compact.is-live-now .cal-live-dot-pulse {
    background: #e11d48;
}

.cal-live-compact.is-live-now .cal-live-title {
    color: #9f1239;
}

.cal-live-compact .cal-live-title {
    color: #0f172a;
    font-size: 0.8rem;
}

.cal-live-compact .cal-live-subject {
    color: #0e7490;
    font-size: 0.82rem;
}

.cal-live-compact .cal-live-action-btn {
    background: #0e7490;
    padding: 0.34rem 0.75rem;
    font-size: 0.74rem;
}

.cal-live-compact .cal-live-action-btn:hover {
    background: #155e75;
}

.cal-interactive-legend {
    padding: 0.45rem 0.8rem;
    gap: 0.45rem;
    justify-content: flex-start;
}

.legend-pill.is-clickable {
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
    font-family: inherit;
}

.legend-pill.is-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.legend-pill.is-clickable.is-selected {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.cal-drag-hint {
    margin-left: auto;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Today Header & Live Meridian Refinement */
.cal-day-card.is-today {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 100%) !important;
    border-color: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.28) !important;
}

.timetable-table td.day-col-today {
    background-color: #f0fdfa;
    border-left: 1px solid #99f6e4;
    border-right: 1px solid #99f6e4;
}

.cal-day-events-strip {
    margin-top: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cal-day-activity-pill {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.14rem 0.4rem;
    border-radius: 5px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.cal-current-time-indicator {
    background: #e11d48;
    width: calc(100vw - 380px);
    max-width: 1200px;
}

.cal-current-time-badge,
.cal-current-time-dot {
    background: #e11d48;
}

/* Drag & Drop Slot Cards */
.timetable-slot-card[draggable="true"] {
    cursor: grab;
}

.timetable-slot-card.is-dragging {
    opacity: 0.45;
    transform: scale(0.97);
}

.timetable-drop-target.is-drag-over {
    background: #ccfbf1 !important;
    outline: 2px dashed #0e7490;
    outline-offset: -3px;
}

.timetable-slot-teacher-name.is-pending-profile {
    color: #c2410c;
    font-weight: 700;
}

/* Vistas Alternativas: Día, Mes y Agenda */
.cal-alt-view-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
}

.cal-day-switcher-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.cal-day-switch-chip {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.15s ease;
}

.cal-day-switch-chip.active {
    background: #0e7490;
    border-color: #0e7490;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(14, 116, 144, 0.25);
}

.cal-day-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cal-day-period-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: stretch;
}

.cal-day-time-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.cal-day-time-col strong {
    font-size: 0.88rem;
    color: #0f172a;
}

.cal-day-time-col span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.cal-day-slot-detail {
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--slot-color, #0e7490);
    border-radius: 12px;
    padding: 0.85rem 1.05rem;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cal-day-free-detail {
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    background: #f8fafc;
}

/* Vista Mensual */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.cal-month-weekday {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.55rem;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 800;
    color: #475569;
}

.cal-month-cell {
    min-height: 112px;
    padding: 0.45rem;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cal-month-cell:hover {
    background: #f0fdfa;
}

.cal-month-cell.is-muted {
    background: #f8fafc;
    opacity: 0.6;
}

.cal-month-cell.is-today {
    background: #ecfeff;
}

.cal-month-cell-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cal-month-day-num {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cal-month-cell.is-today .cal-month-day-num {
    background: #0e7490;
    color: #ffffff;
}

.cal-month-count-chip {
    font-size: 0.66rem;
    font-weight: 700;
    color: #0e7490;
    background: #cffafe;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
}

.cal-month-mini-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.14rem 0.35rem;
    border-radius: 5px;
    background: #f1f5f9;
    color: #1e293b;
    border-left: 3px solid var(--slot-color, #0e7490);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-month-mini-pill.is-activity {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #d97706;
}

/* Vista Agenda / Lista */
.cal-agenda-day-group {
    margin-bottom: 1.25rem;
}

.cal-agenda-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.55rem;
    font-weight: 800;
    color: #0f172a;
    font-size: 0.88rem;
}

.cal-agenda-day-header.is-today {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0e7490;
}

@media (max-width: 1024px) {
    .cal-subrail-grid {
        grid-template-columns: 1fr;
    }
    .cal-drag-hint {
        display: none;
    }
}

@media (max-width: 680px) {
    .cal-day-period-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
    .cal-month-grid {
        font-size: 0.75rem;
    }
    .cal-month-cell {
        min-height: 76px;
    }
}

/* Refinamiento de densidad semanal: 5 días completos visibles sin recorte en escritorio */
.timetable-table {
    min-width: 760px;
    table-layout: fixed;
}

.timetable-table th.period-head-col,
.timetable-table td.period-label-col {
    width: 84px;
    min-width: 84px;
}

.timetable-table .timetable-slot-time {
    display: none;
}

.timetable-table .timetable-slot-card {
    position: relative;
}

.timetable-slot-footer {
    min-width: 0;
    gap: 0.35rem;
}

.timetable-slot-teacher-name {
    display: block;
    flex: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
}

.timetable-slot-teacher-name i {
    margin-right: 0.28rem;
}

@media (hover: hover) and (pointer: fine) {
    .timetable-table .timetable-slot-actions {
        position: absolute;
        right: 0.42rem;
        bottom: 0.38rem;
        background: rgba(255, 255, 255, 0.96);
        padding: 2px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
        pointer-events: none;
        z-index: 3;
    }

    .timetable-table .timetable-slot-card:hover .timetable-slot-actions,
    .timetable-table .timetable-slot-card:focus-within .timetable-slot-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (hover: none), (pointer: coarse) {
    .timetable-table .timetable-slot-actions {
        opacity: 1;
        position: static;
    }

    .timetable-slot-teacher-name {
        display: inline-flex;
        width: auto;
    }
}

@media print {
    .timetable-table .timetable-slot-time {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   6. CENTRO DE DOCUMENTOS, CONTRATOS Y NORMATIVA POR COLEGIO (FASE 1)
   ========================================================================== */
.docs-studio-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.docs-studio-intro {
    flex: 1 1 360px;
    min-width: 0;
}

.docs-studio-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0e7490;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

.docs-studio-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.docs-studio-desc {
    margin: 0.35rem 0 0 0;
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.45;
}

.docs-studio-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
}

.docs-filter-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.docs-filter-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex: 1;
}

.docs-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 210px;
    flex: 1 1 220px;
    max-width: 300px;
}

.docs-search-wrap i {
    position: absolute;
    left: 0.75rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.docs-search-wrap input {
    width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 2.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.82rem;
    background: #ffffff;
    color: #0f172a;
}

.docs-select-filter {
    padding: 0.45rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.81rem;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
}

.docs-toggle-inactive {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.79rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.docs-portal-url-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #0e7490;
    background: #ffffff;
    border: 1px dashed #67e8f9;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.doc-ledger-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.doc-ledger-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #bae6fd;
}

.doc-ledger-card.is-inactive {
    opacity: 0.76;
    background: #f8fafc;
}

.doc-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.doc-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.doc-status-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.doc-status-pill.is-active {
    background: #dcfce7;
    color: #166534;
}

.doc-status-pill.is-draft {
    background: #f1f5f9;
    color: #475569;
}

.doc-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.doc-card-summary {
    margin: 0;
    font-size: 0.81rem;
    color: #475569;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: #64748b;
}

.doc-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.2rem 0.5rem;
    font-weight: 600;
}

.doc-card-actions {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.doc-card-icon-actions {
    display: inline-flex;
    gap: 0.35rem;
}

.docs-empty-state {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 18px;
    padding: 2.4rem 1.5rem;
    text-align: center;
}

.docs-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.9rem auto;
    border-radius: 16px;
    background: #ecfeff;
    color: #0e7490;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Modal Editor & Importador .docx / .pdf */
.docs-editor-modal {
    max-width: 780px !important;
}

.docs-preview-modal {
    max-width: 760px !important;
}

.doc-import-dropzone {
    border: 2px dashed #67e8f9;
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    margin-bottom: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.doc-import-dropzone.is-dragover {
    border-color: #0e7490;
    background: #cffafe;
}

.doc-dropzone-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #0e7490;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.doc-dropzone-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.81rem;
    color: #334155;
    line-height: 1.4;
}

.doc-dropzone-copy strong {
    font-size: 0.9rem;
    color: #0f172a;
}

.doc-pick-file-btn {
    border: none;
    background: none;
    padding: 0;
    color: #0e7490;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.doc-import-feedback {
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.81rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.doc-import-feedback.is-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.doc-import-feedback.is-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.docs-active-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    cursor: pointer;
}

.docs-grades-selector-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
}

.docs-specific-grades-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px solid #e2e8f0;
}

.docs-grade-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    cursor: pointer;
}

.docs-grade-chip.is-all {
    align-self: flex-start;
    border-color: #a5f3fc;
    background: #ecfeff;
    color: #0e7490;
    font-weight: 700;
}

.doc-mode-switch-pills {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.doc-mode-pill {
    border: none;
    background: transparent;
    padding: 0.32rem 0.65rem;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}

.doc-mode-pill.active {
    background: #ffffff;
    color: #0e7490;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.doc-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.28rem;
    padding: 0.45rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.doc-editor-toolbar button {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    border-radius: 6px;
    padding: 0.24rem 0.5rem;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.doc-editor-toolbar button:hover {
    background: #ecfeff;
    border-color: #67e8f9;
    color: #0e7490;
}

.doc-toolbar-sep {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 0.25rem;
}

.doc-vars-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    margin-right: 0.15rem;
}

.doc-editor-toolbar button.doc-var-chip {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
    font-size: 0.69rem;
}

.doc-rich-editor {
    min-height: 220px;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.9rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 10px 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.6;
}

.doc-rich-editor:focus {
    outline: none;
    border-color: #0e7490;
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}

.doc-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.doc-editorial-reader {
    max-height: 68vh;
    overflow-y: auto;
    padding: 1.4rem 1.65rem !important;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.68;
}

.doc-editorial-reader h1,
.doc-editorial-reader h2,
.doc-editorial-reader h3 {
    color: #0f172a;
    margin: 1rem 0 0.45rem 0;
    line-height: 1.3;
}

.doc-editorial-reader table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.85rem 0;
    font-size: 0.85rem;
}

.doc-editorial-reader th,
.doc-editorial-reader td {
    border: 1px solid #cbd5e1;
    padding: 0.45rem 0.6rem;
    text-align: left;
}

.doc-editorial-reader th {
    background: #f8fafc;
    font-weight: 700;
}

@media (max-width: 640px) {
    .doc-import-dropzone {
        flex-direction: column;
        align-items: flex-start;
    }
    .docs-cards-grid {
        grid-template-columns: 1fr;
    }
}
