/* ==========================================================================
   ACADEMIAQR - MÓDULO DE ASISTENCIA Y SESIÓN DOCENTE (VISTA DEL MAESTRO)
   Diseño Colorido, Moderno, Dinámico y 100% Adaptativo (Web & Móvil)
   ========================================================================== */

/* 1. HERO BANNER DEL MAESTRO */
.teacher-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
    border-radius: var(--att-radius-lg, 24px);
    padding: 1.6rem 2rem;
    color: #ffffff;
    box-shadow: 0 10px 30px -5px rgba(30, 58, 138, 0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.teacher-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.25) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.teacher-hero-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 1;
}

.teacher-hero-avatar-wrap {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.teacher-hero-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.teacher-hero-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #1e3a8a;
    background: #f59e0b; /* default waiting */
    transition: background 0.3s ease;
}

.teacher-hero-status-dot.live-active {
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
    animation: teacherPulseDot 1.6s infinite;
}

@keyframes teacherPulseDot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.teacher-hero-info h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: #ffffff;
}

.teacher-hero-badge-role {
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    color: #ffffff;
}

.teacher-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.85);
    flex-wrap: wrap;
}

.teacher-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.teacher-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 1;
    flex-wrap: wrap;
}

/* Botón Maestro: Iniciar / Finalizar Clase en Vivo */
.btn-hero-live-master {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-hero-live-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-hero-live-start:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}

.btn-hero-live-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    animation: livePulseGlow 2s infinite;
}

@keyframes livePulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-hero-live-stop:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
}

.btn-hero-schedule {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hero-schedule:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.btn-hero-quick-scanner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #1e3a8a;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-hero-quick-scanner:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 2. TARJETA DE ESTADO DE CLASE EN VIVO (STATUS BANNER) */
.teacher-live-status-card {
    background: #ffffff;
    border-radius: var(--att-radius-md, 16px);
    padding: 1.3rem 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    border-left: 6px solid #f59e0b; /* default waiting */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.teacher-live-status-card.is-live {
    border-left-color: #10b981;
    background: linear-gradient(to right, #f0fdf4 0%, #ffffff 60%);
    box-shadow: 0 8px 25px -4px rgba(16, 185, 129, 0.15);
}

.teacher-live-status-card.is-paused {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, #ffffff 60%);
}

.live-status-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.live-status-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: #fef3c7;
    color: #d97706;
}

.teacher-live-status-card.is-live .live-status-icon-wrap {
    background: #dcfce7;
    color: #059669;
}

.live-status-details h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.live-status-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

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

.live-timer-badge {
    background: #0f172a;
    color: #ffffff;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.05em;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.live-timer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: livePulseDot 1s infinite;
}

@keyframes livePulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 3. GRID DE QUÓRUM Y MÉTRICAS INTELIGENTES */
.teacher-quorum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.teacher-quorum-card {
    background: #ffffff;
    border-radius: var(--att-radius-md, 16px);
    padding: 1.25rem 1.4rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-quorum-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.12);
}

.teacher-quorum-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.card-total::before { background: #2563eb; }
.card-present::before { background: #10b981; }
.card-late::before { background: #f59e0b; }
.card-pending::before { background: #ef4444; }

.quorum-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.card-total .quorum-icon-wrap { background: #eff6ff; color: #2563eb; }
.card-present .quorum-icon-wrap { background: #ecfdf5; color: #10b981; }
.card-late .quorum-icon-wrap { background: #fffbeb; color: #f59e0b; }
.card-pending .quorum-icon-wrap { background: #fef2f2; color: #ef4444; }

.quorum-card-info .quorum-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.quorum-card-info .quorum-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 0.2rem;
}

/* 4. BARRA DE CONTROL Y FILTROS INTELIGENTES DE CLASE */
.teacher-control-bar {
    background: #ffffff;
    border-radius: var(--att-radius-md, 16px);
    padding: 1.25rem 1.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.teacher-control-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.teacher-control-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.badge-auto-detect {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.teacher-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

.filter-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-input-wrap label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

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

/* 5. TABLA DE ASISTENCIA REDISEÑADA (ESTILO MODERNO) */
.teacher-table-card {
    background: #ffffff;
    border-radius: var(--att-radius-md, 16px);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

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

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

/* Overlay de Bloqueo cuando no hay clase activa */
.teacher-table-lock-overlay {
    position: absolute;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(3px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.lock-overlay-content {
    background: #ffffff;
    padding: 1.8rem 2.2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
    border: 1px solid #e2e8f0;
    max-width: 480px;
}

.lock-overlay-content i {
    font-size: 2.4rem;
    color: #f59e0b;
    margin-bottom: 0.8rem;
}

.lock-overlay-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.lock-overlay-content p {
    margin: 0 0 1.2rem 0;
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.45;
}

/* Fila de estudiante */
.student-row-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.student-row-name-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-row-details .name {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}

.student-row-details .meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Botones de marcado de asistencia interactivos */
.att-check-btn-group {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.att-check-btn {
    border: none;
    background: transparent;
    padding: 0.38rem 0.68rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
}

.att-check-btn:hover {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.att-check-btn.btn-present.is-active {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.att-check-btn.btn-late.is-active {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.att-check-btn.btn-absent.is-active {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

/* 6. MODAL MASTER SCHEDULE (PROGRAMADOR DE CLASES, HORARIOS Y SALONES) */
.schedule-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.schedule-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.schedule-modal-dialog {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.schedule-modal-backdrop.is-open .schedule-modal-dialog {
    transform: scale(1);
}

.schedule-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 1.4rem 1.8rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.schedule-modal-header p {
    margin: 0.2rem 0 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}

.schedule-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.schedule-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.schedule-modal-tabs {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.5rem 1.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-tab-btn {
    border: none;
    background: transparent;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.schedule-tab-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.schedule-modal-body {
    padding: 1.5rem 1.8rem;
    overflow-y: auto;
    flex: 1;
}

/* Grilla Semanal Visual */
.schedule-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.schedule-matrix-table th {
    background: #f8fafc;
    padding: 0.8rem 0.6rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.schedule-matrix-table td {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    vertical-align: top;
    height: 85px;
    background: #ffffff;
    transition: background 0.2s ease;
}

.schedule-matrix-table td:hover {
    background: #f8fafc;
}

.schedule-cell-card {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.schedule-cell-subject {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 0.78rem;
    line-height: 1.2;
}

.schedule-cell-teacher {
    font-size: 0.7rem;
    color: #475569;
    margin-top: 0.2rem;
}

.schedule-cell-room {
    font-size: 0.68rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

/* Alerta de Conflicto en el Horario */
.schedule-conflict-alert {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: #991b1b;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   ADAPTACIONES MÓVILES Y TABLETS (RESPONSIVE FIRST & TOUCH CONTROLS)
   ========================================================================== */

/* Tablets y pantallas medianas (<= 1024px) */
@media (max-width: 1024px) {
    .teacher-hero-banner {
        padding: 1.35rem 1.5rem;
        border-radius: var(--att-radius-md);
        gap: 1.25rem;
    }

    .teacher-hero-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .teacher-live-status-card {
        padding: 1.2rem 1.4rem;
        gap: 1rem;
    }

    .teacher-quorum-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }

    .teacher-quick-config-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }

    .schedule-modal-content {
        width: 94vw;
        max-height: 90vh;
        padding: 1.5rem;
    }
}

/* Teléfonos y pantallas pequeñas (<= 640px) */
@media (max-width: 640px) {
    .teacher-hero-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 1.1rem;
        border-radius: 18px;
        gap: 1rem;
    }

    .teacher-hero-profile {
        flex-direction: row;
        align-items: center;
        gap: 0.9rem;
    }

    .teacher-hero-avatar-wrap {
        width: 58px;
        height: 58px;
    }

    .teacher-hero-info h2 {
        font-size: 1.2rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
    }

    .teacher-hero-meta {
        font-size: 0.78rem;
        flex-wrap: wrap;
        gap: 0.35rem 0.5rem;
    }

    .teacher-hero-meta-item {
        background: rgba(255, 255, 255, 0.15);
        padding: 0.2rem 0.55rem;
        border-radius: 999px;
    }

    .teacher-hero-meta span:not(.teacher-hero-meta-item) {
        display: none;
    }

    .teacher-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }

    .btn-hero-live-master,
    .btn-hero-schedule,
    .btn-hero-quick-scanner {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 0.9rem;
    }

    .teacher-live-status-card {
        flex-direction: column;
        align-items: stretch;
        padding: 1.15rem;
        gap: 1rem;
        border-radius: 18px;
    }

    .teacher-live-timer-box {
        align-items: center;
        text-align: center;
    }

    .teacher-live-timer {
        font-size: 1.8rem;
    }

    .teacher-quorum-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .teacher-quorum-card {
        padding: 0.85rem 0.9rem;
        border-radius: 16px;
    }

    .teacher-quorum-val {
        font-size: 1.45rem;
    }

    .teacher-quorum-lbl {
        font-size: 0.72rem;
    }

    .teacher-quick-config-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .teacher-table-card {
        border-radius: 18px;
    }

    .teacher-table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .teacher-table-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .teacher-table-actions .btn {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
    }

    /* Tabla fluida con scroll táctil suave */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .custom-table th,
    .custom-table td {
        padding: 0.65rem 0.55rem;
        font-size: 0.82rem;
    }

    /* Botones táctiles optimizados para el pulgar del maestro */
    .btn-att-action {
        min-height: 38px;
        min-width: 38px;
        padding: 0.4rem 0.6rem;
    }

    /* Modal de programación en pantallas móviles */
    .schedule-modal-content {
        width: 96vw;
        max-height: 94vh;
        padding: 1rem;
        border-radius: 16px;
    }

    .schedule-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .schedule-modal-header .btn-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .schedule-tabs-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
        padding-bottom: 0.5rem;
    }

    .schedule-tab-btn {
        white-space: nowrap;
        padding: 0.55rem 0.85rem;
        font-size: 0.8rem;
    }
}
