.dashboard-wrapper {
    padding: 20px 15px 40px;
    background: #f4f6fb;
}

.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-header .title-block {
    flex: 1 1 320px;
}

.dashboard-header .title-block h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #1f274b;
}

.dashboard-header .title-block p {
    margin: 4px 0;
    color: #5d647b;
}

.dashboard-header .docente-block {
    min-width: 240px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e4e7f4;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(15, 65, 140, 0.08);
}

.docente-block span.label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #7c84a6;
    letter-spacing: .5px;
}

.docente-block .name {
    font-size: 18px;
    font-weight: 600;
    color: #112044;
}

.docente-block .badge-role {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2a3cb3;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-filters {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 25px;
    box-shadow: 0 15px 30px rgba(16, 57, 146, 0.08);
    border: 1px solid #e5e9fb;
}

.dashboard-filters .row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-filters .form-group {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
}

.dashboard-filters label {
    font-size: 13px;
    font-weight: 600;
    color: #5b6284;
    margin-bottom: 5px;
}

.dashboard-filters select,
.dashboard-filters input {
    border: 1px solid #cfd4ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1f274b;
}

.dashboard-stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    background: #f7f9ff;
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid #e0e5fb;
}

.stat-card span {
    display: block;
    color: #7a80a2;
    font-size: 12px;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    font-size: 24px;
    color: #1c2b59;
    margin-top: 4px;
}

.table-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e4e9fb;
    box-shadow: 0 20px 30px rgba(17, 34, 90, 0.08);
}

.table-card .table-heading {
    padding: 18px 24px;
    border-bottom: 1px solid #eef1fb;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.table-card .table-heading h3 {
    margin: 0;
    font-size: 20px;
    color: #1e2a54;
}

.table-card .badges {
    display: flex;
    gap: 10px;
}

.badge-soft {
    background: #eef2ff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    color: #3b4d96;
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

#tablaAsignaturas {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

#tablaAsignaturas thead th {
    background: #f0f3ff;
    color: #1f274b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    padding: 14px 12px;
    border-bottom: 2px solid #dfe5fb;
}

#tablaAsignaturas tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f2fa;
    color: #2b3555;
    font-size: 14px;
    vertical-align: top;
}

#tablaAsignaturas tbody tr:hover {
    background: #f9fbff;
}

.estado-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.estado-pill.en-curso {
    background: #e8f6ff;
    color: #0a68b3;
}

.estado-pill.programado {
    background: #fff4e3;
    color: #b87904;
}

.estado-pill.finalizado {
    background: #e5fbef;
    color: #2a8d3c;
}

.bimestre-acciones {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.bimestre-block {
    border: 1px solid #e0e5fb;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fdfdff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bimestre-block .bim-title {
    font-size: 13px;
    font-weight: 600;
    color: #303b6a;
    white-space: nowrap;
}

.bimestre-block .actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.btn-accion {
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-accion.asistencia {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    box-shadow: 0 8px 18px rgba(58, 123, 213, 0.25);
}

.btn-accion.notas {
    background: linear-gradient(135deg, #23c46e, #009e4f);
    box-shadow: 0 8px 18px rgba(35, 196, 110, 0.22);
}

.btn-accion:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(20, 60, 120, 0.25);
}

.badge-turno {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: #eef7ff;
    color: #1f5ea8;
    margin-top: 4px;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #7a80a3;
    font-size: 15px;
}

.loader-row {
    text-align: center;
    padding: 60px 20px;
}

.loader-row .spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #e3e8ff;
    border-top-color: #3a7bd5;
    margin: 0 auto 12px;
    animation: spin 1s linear infinite;
}

.alert-dashboard {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ffe9e6;
    color: #a0392b;
    border: 1px solid #f7c5bc;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .bimestre-block .actions {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
    }
}
