/* =====================================================
   Attendance by Lesson — CSS
   Shared by: attendance-lesson, attendance-justifications, attendance-reports
   ===================================================== */

/* --- Layout --- */
.attendance-lesson-main { padding: 0; }
.al-area { padding: 1rem; max-width: 1400px; margin: 0 auto; }

/* --- Header & Controls --- */
.al-header { margin-bottom: 1rem; }
.al-brand { margin-bottom: .75rem; }
.al-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; justify-content: space-between; }
.al-selectors { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.al-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.al-selector-group { display: flex; flex-direction: column; gap: .2rem; }
.al-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary, #64748b); }
.al-select {
    padding: .4rem .6rem; border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px; font-size: .82rem; background: var(--bg-card, #fff);
    color: var(--text-primary, #1e293b); min-width: 120px; outline: none;
}
.al-select:focus { border-color: var(--primary, #2563eb); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }

/* --- Buttons --- */
.al-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .8rem; border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px; font-size: .8rem; font-weight: 500; cursor: pointer;
    background: var(--bg-card, #fff); color: var(--text-primary, #1e293b);
    transition: all .15s; text-decoration: none;
}
.al-btn:hover { background: var(--bg-hover, #f1f5f9); }
.al-btn--primary { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.al-btn--primary:hover { background: #1d4ed8; }
.al-btn--success { background: #16a34a; color: #fff; border-color: #16a34a; }
.al-btn--success:hover { background: #15803d; }
.al-btn--danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.al-btn--danger:hover { background: #b91c1c; }
.al-btn--toggle.active { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }

/* --- Lesson Strip --- */
.al-lesson-strip {
    display: flex; align-items: center; gap: .25rem;
    padding: .5rem 0; margin-bottom: .5rem;
    overflow-x: auto; scrollbar-width: thin;
}
.al-lesson-nav {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--border-color, #e2e8f0); background: var(--bg-card, #fff);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: .7rem; color: var(--text-secondary);
}
.al-lesson-nav:hover { background: var(--bg-hover, #f1f5f9); }
.al-lesson-pills { display: flex; gap: .3rem; overflow-x: auto; flex: 1; padding: 0 .25rem; }
.al-pill {
    flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px;
    border: 1px solid var(--border-color, #e2e8f0); background: var(--bg-card, #fff);
    font-size: .75rem; cursor: pointer; white-space: nowrap; transition: all .15s;
    color: var(--text-primary);
}
.al-pill:hover { background: var(--bg-hover, #f1f5f9); }
.al-pill.active { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.al-pill.is-break { opacity: .5; font-style: italic; cursor: default; }

/* --- Lesson Info Bar --- */
.al-lesson-info {
    display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem;
    background: var(--bg-surface, #f8fafc); border-radius: 8px;
    margin-bottom: .75rem; font-size: .82rem;
}
.al-info-badge {
    background: var(--primary, #2563eb); color: #fff; padding: .2rem .6rem;
    border-radius: 4px; font-weight: 700; font-size: .75rem;
}
.al-info-subject { font-weight: 600; }
.al-info-time { color: var(--text-secondary, #64748b); }
.al-info-room { color: var(--text-secondary); font-size: .75rem; }

/* --- Quick Actions --- */
.al-quick-actions {
    display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap;
}
.al-search-box {
    display: flex; align-items: center; gap: .3rem;
    padding: .35rem .6rem; border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px; background: var(--bg-card, #fff); flex: 1; max-width: 280px;
}
.al-search-box i { color: var(--text-secondary); font-size: .75rem; }
.al-search-box input {
    border: none; outline: none; background: transparent;
    font-size: .82rem; color: var(--text-primary); width: 100%;
}
.al-stat-mini { display: flex; gap: .5rem; font-size: .8rem; font-weight: 600; }
.al-stat-present { color: #16a34a; }
.al-stat-absent { color: #dc2626; }
.al-stat-late { color: #d97706; }

/* --- Student List (Lesson View) --- */
.al-student-list { display: flex; flex-direction: column; gap: .35rem; }
.al-student-row {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .75rem; border-radius: 8px;
    background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e2e8f0);
    transition: all .15s;
}
.al-student-row:hover { box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.al-student-num { width: 24px; text-align: center; font-size: .7rem; color: var(--text-secondary); font-weight: 600; }
.al-student-name { flex: 1; font-size: .85rem; font-weight: 500; }
.al-student-code { font-size: .7rem; color: var(--text-secondary); margin-left: .25rem; }

.al-status-btns { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.al-status-btn {
    width: 34px; height: 34px; border-radius: 6px; border: 2px solid transparent;
    cursor: pointer; font-size: .8rem; font-weight: 700; display: flex;
    align-items: center; justify-content: center; transition: all .15s;
    background: var(--bg-surface, #f1f5f9); color: var(--text-secondary);
}
.al-status-btn:hover { transform: scale(1.08); }
.al-status-btn.st-present { border-color: #16a34a; }
.al-status-btn.st-present.active { background: #16a34a; color: #fff; }
.al-status-btn.st-absent { border-color: #dc2626; }
.al-status-btn.st-absent.active { background: #dc2626; color: #fff; }
.al-status-btn.st-absent-just { border-color: #2563eb; color: #1d4ed8; }
.al-status-btn.st-absent-just.active { background: #2563eb; color: #fff; }
.al-status-btn.st-late { border-color: #d97706; }
.al-status-btn.st-late.active { background: #d97706; color: #fff; }
.al-status-btn.st-late-just { border-color: #6366f1; color: #4f46e5; }
.al-status-btn.st-late-just.active { background: #6366f1; color: #fff; }

.al-student-actions { display: flex; gap: .25rem; }
.al-action-btn {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: var(--bg-surface, #f1f5f9); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; color: var(--text-secondary); transition: all .15s;
}
.al-action-btn:hover { background: var(--bg-hover, #e2e8f0); }

.al-empty { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); font-size: .9rem; }

/* --- Day Grid View --- */
.al-grid-actions {
    display: flex; gap: .5rem; margin-bottom: .75rem; justify-content: flex-end;
}
.al-btn--sm {
    font-size: .75rem; padding: .3rem .7rem;
}
.al-grid-wrapper { overflow-x: auto; }
.al-grid-table {
    width: 100%; border-collapse: collapse; font-size: .78rem;
    background: var(--bg-card, #fff);
}
.al-grid-table th, .al-grid-table td {
    border: 1px solid var(--border-color, #e2e8f0); padding: .35rem .5rem; text-align: center;
}
.al-grid-table th {
    background: var(--bg-surface, #f8fafc); font-weight: 600;
    position: sticky; top: 0; z-index: 2;
}
.al-grid-table th.th-student { text-align: left; min-width: 180px; position: sticky; left: 0; z-index: 3; }
.al-grid-table td.td-student { text-align: left; font-weight: 500; position: sticky; left: 0; z-index: 1; background: var(--bg-card, #fff); }
.al-grid-table th .th-subject { font-size: .65rem; font-weight: 400; color: var(--text-secondary); display: block; }
.al-grid-cell {
    width: 32px; height: 32px; border-radius: 4px; border: none;
    cursor: pointer; font-size: .7rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .12s;
}
.al-grid-cell.st-P { background: #dcfce7; color: #166534; }
.al-grid-cell.st-A { background: #fee2e2; color: #991b1b; }
.al-grid-cell.st-T { background: #fef3c7; color: #92400e; }
.al-grid-cell.st-AJ { background: #dbeafe; color: #1e40af; }
.al-grid-cell.st-TJ { background: #e0e7ff; color: #3730a3; }
.al-grid-cell.st-none { background: var(--bg-surface, #f1f5f9); color: var(--text-secondary); }
.al-grid-cell:hover { transform: scale(1.15); box-shadow: 0 2px 6px rgba(0,0,0,.12); }

/* --- Modal --- */
.al-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .15s;
}
.al-modal {
    background: var(--bg-card, #fff); border-radius: 12px;
    width: 90%; max-width: 520px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.al-modal--sm { max-width: 400px; }
.al-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.al-modal-header h3 { font-size: 1rem; margin: 0; }
.al-modal-close { border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--text-secondary); }
.al-modal-body { padding: 1rem 1.25rem; }
.al-modal-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border-color, #e2e8f0); display: flex; justify-content: flex-end; gap: .5rem; }

.al-form-group { margin-bottom: .75rem; }
.al-form-group label { display: block; font-size: .75rem; font-weight: 600; margin-bottom: .25rem; color: var(--text-secondary); }
.al-form-row { display: flex; gap: .5rem; }
.al-form-row .al-form-group { flex: 1; }
.al-textarea {
    width: 100%; padding: .5rem; border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px; font-size: .82rem; resize: vertical;
    background: var(--bg-card, #fff); color: var(--text-primary);
}

/* --- Justification List --- */
.aj-list { display: flex; flex-direction: column; gap: .35rem; }
.aj-card {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .85rem; border-radius: 8px;
    background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e2e8f0);
    cursor: pointer; transition: all .15s;
}
.aj-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.aj-card .aj-status-badge {
    padding: .15rem .5rem; border-radius: 12px; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em;
}
.aj-status-badge.pending { background: #fef3c7; color: #92400e; }
.aj-status-badge.approved { background: #dcfce7; color: #166534; }
.aj-status-badge.rejected { background: #fee2e2; color: #991b1b; }
.aj-card .aj-info { flex: 1; }
.aj-card .aj-name { font-weight: 600; font-size: .85rem; }
.aj-card .aj-meta { font-size: .72rem; color: var(--text-secondary); }

/* --- Justificación modals (detalle revisión + formulario) --- */
.aj-modal-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(15, 23, 42, 0.45);
    padding: 1rem;
}
.al-modal--justif {
    max-width: 560px;
    width: 100%;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    display: flex;
    flex-direction: column;
}
.al-modal--justif-review { max-width: 580px; }
.al-modal--justif-create {
    max-width: 580px;
    max-height: min(92vh, 860px);
}
.al-modal-header--justif {
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    background: linear-gradient(180deg, var(--bg-surface, #f8fafc) 0%, var(--bg-card, #fff) 100%);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.al-modal-header-text { flex: 1; min-width: 0; }
.al-modal-header--justif h3 {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.2rem 0;
    color: var(--text-primary);
}
.al-modal-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.al-modal-header--justif .al-modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.al-modal-header--justif .al-modal-close:hover {
    background: var(--bg-hover, #f1f5f9);
    color: var(--text-primary);
}
.al-modal-body--justif {
    padding: 1.15rem 1.35rem 1.25rem;
}
.al-modal-body--justif-create {
    max-height: min(58vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-top: 1rem;
}
.al-modal-header--justif-create {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 0.85rem 1rem;
}
.al-modal-header--justif-create .al-modal-close {
    grid-column: 3;
    grid-row: 1;
}
.al-modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--primary, #2563eb), #6366f1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    flex-shrink: 0;
}
.al-modal-footer--justif {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.35rem 1.1rem;
    background: var(--bg-surface, #f8fafc);
}
.al-modal-footer--review {
    justify-content: space-between;
}
.al-modal-footer--create {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
}
.aj-footer-hint--create {
    flex: 1;
    min-width: 140px;
    margin: 0;
}
.aj-footer-actions--create {
    flex-shrink: 0;
}
.aj-footer-hint {
    margin: 0;
    flex: 1;
    min-width: 180px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
.aj-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}
.aj-footer-actions .al-btn {
    min-height: 2.25rem;
    padding: 0.45rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.aj-form-section {
    margin-bottom: 1.15rem;
}
.aj-form-section:last-child { margin-bottom: 0; }
.aj-form-section--card {
    padding: 1rem 1.05rem 1.05rem;
    background: var(--bg-card, #fff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e8eef4);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    margin-bottom: 0.85rem;
}
.aj-form-section--card:last-of-type {
    margin-bottom: 0;
}
.aj-form-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.aj-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color, #e8eef4);
}
.aj-form-section-title i {
    color: var(--primary, #2563eb);
    font-size: 0.82rem;
    width: 1.1rem;
    text-align: center;
    opacity: 0.92;
}
.aj-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.aj-input-wrap > i:first-child {
    position: absolute;
    left: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.88;
}
.al-select.al-select--justif,
.al-input-justif {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: 9px;
    border: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.86rem;
    background: var(--bg-card, #fff);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.aj-input-wrap .al-select.al-select--justif,
.aj-input-wrap .al-input-justif {
    padding-left: 2.2rem;
}
.al-select.al-select--justif:focus,
.al-input-justif:focus {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.aj-field-date .al-input-justif {
    padding-left: 2.2rem;
}
.aj-lesson-field .al-input-justif.aj-input-number {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.aj-input-wrap--date .al-input-justif {
    min-height: 2.4rem;
}
.aj-lesson-range {
    margin-top: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color, #e2e8f0);
}
.aj-lesson-range-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.aj-lesson-range-row {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.aj-lesson-field {
    flex: 0 0 auto;
    width: 5.75rem;
    margin-bottom: 0;
}
.aj-input-number {
    text-align: center;
    font-weight: 600;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.aj-lesson-field .aj-input-number {
    padding-left: 0.45rem;
}
.aj-lesson-arrow {
    color: var(--text-secondary);
    padding-bottom: 0.55rem;
    font-size: 0.95rem;
    opacity: 0.75;
}
.aj-field-hint {
    margin: 0.55rem 0 0;
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.al-textarea.al-textarea--justif {
    min-height: 5.5rem;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 0.86rem;
    line-height: 1.45;
    border: 1px solid var(--border-color, #e2e8f0);
    width: 100%;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.al-textarea.al-textarea--justif:focus {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}
@media (min-width: 480px) {
    .aj-field-grade .aj-input-wrap {
        max-width: 300px;
    }
}
.aj-file-group-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}
.aj-file-zone {
    position: relative;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    background: linear-gradient(180deg, var(--bg-card, #fff), var(--bg-surface, #f8fafc));
    overflow: hidden;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.aj-file-zone:hover {
    border-color: #94a3b8;
}
.aj-file-zone:focus-within {
    border-color: var(--primary, #2563eb);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.aj-file-input-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    font-size: 0;
}
.aj-file-zone-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.15rem 0.9rem;
    pointer-events: none;
}
.aj-file-zone-icon {
    font-size: 1.65rem;
    color: var(--primary, #2563eb);
    margin-bottom: 0.4rem;
    opacity: 0.88;
}
.aj-file-zone-text {
    font-size: 0.83rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.aj-file-zone-formats {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.aj-file-name {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #15803d;
    font-weight: 600;
    word-break: break-all;
}
.aj-file-name::before {
    content: '✓ ';
    font-weight: 700;
}
.al-form-row--wrap {
    flex-wrap: wrap;
}
.al-form-row--wrap .al-form-group {
    min-width: 120px;
}
.aj-label-optional {
    font-weight: 400;
    opacity: 0.85;
    font-size: 0.72rem;
}
.aj-review-notes-group { margin-top: 0.25rem; }

/* Justify modal: student info card */
.al-justify-student-info {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.15rem 0;
}
.aj-detail-avatar--sm {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.82rem;
}
.al-justify-student-text { flex: 1; min-width: 0; }
.al-justify-student-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}
.al-justify-student-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.15rem;
}

/* Tarjeta de detalle (revisión) */
.aj-detail-card {
    margin-bottom: 0.5rem;
}
.aj-detail-student {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-surface, #f1f5f9) 0%, var(--bg-card, #fff) 55%);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.aj-detail-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary, #2563eb), #4f46e5);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.aj-detail-student-text { flex: 1; min-width: 0; }
.aj-detail-overline {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}
.aj-detail-name {
    margin: 0 0 0.45rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}
.aj-status-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.aj-status-pill--pending { background: #fef3c7; color: #92400e; }
.aj-status-pill--approved { background: #dcfce7; color: #166534; }
.aj-status-pill--rejected { background: #fee2e2; color: #991b1b; }
.aj-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.aj-detail-tile--wide {
    grid-column: 1 / -1;
}
.aj-detail-tile {
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: var(--bg-surface, #f8fafc);
    border: 1px solid var(--border-color, #e8eef4);
}
.aj-detail-tile-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.aj-detail-tile-label i { opacity: 0.85; font-size: 0.75rem; }
.aj-detail-tile-value {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}
.aj-detail-tile-value--date {
    font-weight: 600;
}
.aj-type-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.aj-type-chip--medical { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.aj-type-chip--family { background: #fdf4ff; color: #a21caf; border-color: #f5d0fe; }
.aj-type-chip--administrative { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.aj-type-chip--other { background: var(--bg-hover, #f1f5f9); color: var(--text-primary); border-color: var(--border-color); }
.aj-detail-block { margin-bottom: 0.25rem; }
.aj-detail-block-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}
.aj-detail-block-label i { font-size: 0.8rem; opacity: 0.9; }
.aj-detail-quote {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 4px solid var(--primary, #2563eb);
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-primary);
}
.aj-detail-quote-inner { white-space: pre-wrap; word-break: break-word; }
.aj-detail-muted { color: var(--text-secondary); font-style: italic; }
.aj-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color, #e2e8f0);
    font-size: 0.8rem;
    color: var(--text-primary);
}
.aj-detail-meta-row--subtle { color: var(--text-secondary); }
.aj-meta-icon { color: var(--primary, #2563eb); opacity: 0.9; }
.aj-detail-evidence { margin-top: 0.75rem; }
.aj-evidence-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary, #2563eb);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: background 0.15s, transform 0.12s;
}
.aj-evidence-btn:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}
.aj-evidence-btn .aj-evidence-icon { font-size: 0.65rem; opacity: 0.7; }

@media (max-width: 520px) {
    .aj-detail-grid { grid-template-columns: 1fr; }
    .al-modal-footer--review {
        flex-direction: column;
        align-items: stretch;
    }
    .aj-footer-actions { justify-content: stretch; }
    .aj-footer-actions .al-btn { flex: 1; justify-content: center; }
    .al-modal-footer--create {
        flex-direction: column;
        align-items: stretch;
    }
    .aj-footer-actions--create {
        flex-direction: column-reverse;
    }
    .aj-footer-actions--create .al-btn { width: 100%; justify-content: center; }
}

/* --- Reports --- */
.ar-tab { min-height: 200px; }
.ar-summary {
    display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.ar-stat-card {
    padding: .6rem 1rem; border-radius: 8px; background: var(--bg-surface, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0); min-width: 100px; text-align: center;
}
.ar-stat-card .ar-stat-value { font-size: 1.4rem; font-weight: 700; }
.ar-stat-card .ar-stat-label { font-size: .68rem; color: var(--text-secondary); text-transform: uppercase; }

.ar-table-wrapper { overflow-x: auto; }
.ar-table {
    width: 100%; border-collapse: collapse; font-size: .8rem;
    background: var(--bg-card, #fff);
}
.ar-table th, .ar-table td {
    border: 1px solid var(--border-color, #e2e8f0); padding: .45rem .6rem;
}
.ar-table th {
    background: var(--bg-surface, #f8fafc); font-weight: 600;
    text-align: center; font-size: .72rem; text-transform: uppercase;
}
.ar-table td { text-align: center; }
.ar-table td:first-child { text-align: left; font-weight: 500; }
.ar-table tr:hover td { background: var(--bg-hover, #f1f5f9); }

.ar-individual-summary { margin-bottom: 1rem; }
.ar-individual-detail { }

.ar-day-block {
    margin-bottom: .75rem; padding: .6rem .75rem;
    border-radius: 8px; border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #fff);
}
.ar-day-title { font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: var(--primary, #2563eb); }
.ar-lesson-row {
    display: flex; align-items: center; gap: .5rem;
    padding: .25rem 0; font-size: .8rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}
.ar-lesson-row:last-child { border-bottom: none; }
.ar-lesson-num { font-weight: 600; min-width: 60px; }
.ar-lesson-status {
    padding: .1rem .4rem; border-radius: 4px; font-size: .7rem; font-weight: 600;
}
.ar-lesson-status.st-present { background: #dcfce7; color: #166534; }
.ar-lesson-status.st-absent { background: #fee2e2; color: #991b1b; }
.ar-lesson-status.st-late { background: #fef3c7; color: #92400e; }
.ar-lesson-status.st-justified { background: #dbeafe; color: #1e40af; }
.ar-lesson-subject { color: var(--text-secondary); font-size: .75rem; }

/* --- Loading --- */
.al-loading {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .5rem;
    background: rgba(255,255,255,.7); z-index: 100; border-radius: 8px;
}
.al-spinner {
    width: 28px; height: 28px; border: 3px solid var(--border-color, #e2e8f0);
    border-top-color: var(--primary, #2563eb); border-radius: 50%;
    animation: spin .6s linear infinite;
}

/* --- Utility --- */
.u-hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.al-notes-name { font-weight: 600; margin-bottom: .5rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .al-controls { flex-direction: column; }
    .al-selectors { width: 100%; }
    .al-selector-group { flex: 1; min-width: 0; }
    .al-select { min-width: 0; width: 100%; }
    .al-lesson-info { flex-wrap: wrap; gap: .35rem; }
    .al-student-row { flex-wrap: wrap; }
    .al-status-btns { width: 100%; justify-content: center; }
    .al-form-row { flex-direction: column; }
}

/* =====================================================
   Asistencia por lección — alineación con módulo diario
   (solo dentro de .attendance-lesson-shell; no afecta
    justificaciones/reportes que usan .al-area)
   ===================================================== */

.attendance-lesson-shell.attendance-area {
    position: relative;
}

.attendance-lesson-subheader {
    padding: 0.75rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.attendance-lesson-shell .grade-selector.grade-selector--native,
.attendance-reports-shell .grade-selector.grade-selector--native,
.attendance-justifications-shell .grade-selector.grade-selector--native {
    cursor: default;
    min-width: 150px;
    max-width: 220px;
}

.attendance-lesson-shell .grade-selector.grade-selector--native:hover,
.attendance-reports-shell .grade-selector.grade-selector--native:hover,
.attendance-justifications-shell .grade-selector.grade-selector--native:hover {
    border-color: var(--border-hover);
}

.attendance-lesson-shell .grade-selector.grade-selector--native .grade-selector-content,
.attendance-reports-shell .grade-selector.grade-selector--native .grade-selector-content,
.attendance-justifications-shell .grade-selector.grade-selector--native .grade-selector-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    width: 100%;
    min-width: 0;
}

.attendance-lesson-shell .al-select--in-selector,
.attendance-reports-shell .al-select--in-selector,
.attendance-justifications-shell .al-select--in-selector {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-input, var(--bg-primary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 0.375rem);
    outline: none;
}

.attendance-lesson-shell .al-select--in-selector:focus,
.attendance-reports-shell .al-select--in-selector:focus,
.attendance-justifications-shell .al-select--in-selector:focus {
    border-color: var(--border-focus, var(--primary));
    box-shadow: var(--shadow-focus, 0 0 0 3px rgba(2, 11, 71, 0.15));
}

/* Fecha en barra unificada */
.attendance-lesson-shell .attendance-lesson-date-group {
    gap: 0.5rem;
}

.attendance-lesson-shell .attendance-lesson-date-input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0;
    min-width: 9.5rem;
    cursor: pointer;
    font-family: inherit;
}

.attendance-lesson-shell .attendance-lesson-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

.attendance-reports-shell.attendance-area,
.attendance-justifications-shell.attendance-area {
    position: relative;
}

.attendance-reports-shell .attendance-lesson-date-input,
.attendance-reports-shell .attendance-reports-date-input,
.attendance-justifications-shell .attendance-lesson-date-input,
.attendance-justifications-shell .attendance-reports-date-input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.2rem 0;
    min-width: 9.5rem;
    cursor: pointer;
    font-family: inherit;
}

.attendance-reports-shell .attendance-lesson-date-input::-webkit-calendar-picker-indicator,
.attendance-reports-shell .attendance-reports-date-input::-webkit-calendar-picker-indicator,
.attendance-justifications-shell .attendance-lesson-date-input::-webkit-calendar-picker-indicator,
.attendance-justifications-shell .attendance-reports-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

.attendance-reports-shell .attendance-reports-date-group,
.attendance-justifications-shell .attendance-reports-date-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.attendance-reports-shell .attendance-reports-date-label,
.attendance-justifications-shell .attendance-reports-date-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.attendance-reports-shell .attendance-reports-body {
    padding: 0.35rem 1.25rem 1.5rem;
}

@media (min-width: 1024px) {
    .attendance-reports-shell .attendance-reports-body {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.attendance-reports-shell .attendance-reports-student-wrap {
    max-width: 420px;
}

.attendance-reports-shell .attendance-reports-individual-picker {
    margin-bottom: 1rem;
}

.attendance-reports-shell .ar-table {
    border-radius: var(--radius-md, 0.5rem);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.attendance-reports-shell .ar-table th {
    background: var(--bg-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.attendance-lesson-shell .attendance-lesson-stats-chips {
    gap: 0.4rem;
    flex-wrap: wrap;
}

.attendance-lesson-shell .attendance-lesson-stat {
    font-size: 0.78rem;
    font-weight: 600;
}

.attendance-lesson-shell .attendance-lesson-stat--p { color: var(--success, #10b981); }
.attendance-lesson-shell .attendance-lesson-stat--a { color: var(--danger, #ef4444); }
.attendance-lesson-shell .attendance-lesson-stat--t { color: var(--warning, #f59e0b); }

/* Tabla lección: columnas */
.attendance-lesson-shell .al-lesson-students-table .status-col { width: 22%; }
.attendance-lesson-shell .al-lesson-students-table .actions-col { width: 28%; text-align: center; }
.attendance-lesson-shell .al-lesson-students-table .actions-col .al-status-btns {
    justify-content: center;
}

.attendance-lesson-shell .al-status-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.attendance-lesson-shell .al-empty-cell {
    text-align: center;
    padding: 2.5rem 1rem !important;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.attendance-lesson-shell .al-empty-cell:has(.empty-state--embedded) {
    padding: 0 !important;
    vertical-align: middle;
}

.attendance-lesson-shell .empty-state.empty-state--embedded {
    padding: 2.5rem 1.5rem 3rem;
    margin: 0;
}

.attendance-lesson-shell .empty-state--embedded .empty-state-svg {
    width: 64px;
    height: 64px;
}

/* Solo ocultar cabecera en estados con ilustración (incl. filas generadas por JS) */
.attendance-lesson-shell .al-lesson-students-table:has(tbody tr.al-empty-row .empty-state--embedded) thead,
.attendance-lesson-shell .al-lesson-students-table:has(tbody tr.al-empty-row .empty-state--js-empty) thead {
    display: none;
}

.attendance-lesson-shell .empty-state--js-empty {
    padding: 2rem 1.25rem 2.5rem;
}

.attendance-lesson-shell .al-lesson-student-row .al-student-num {
    display: inline-block;
    min-width: 1.5rem;
    margin-right: 0.35rem;
}

/* Grilla día: aspecto cercano a students-table */
.attendance-lesson-shell .al-view--grid .al-grid-table {
    border-radius: var(--radius-md, 0.5rem);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.attendance-lesson-shell .al-view--grid .al-grid-table th {
    background: var(--bg-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.attendance-lesson-shell .al-view--grid .al-grid-actions {
    padding: 0 0 0.75rem;
    justify-content: flex-end;
}

/* Loading overlay sobre la tarjeta */
.attendance-lesson-shell .al-loading {
    position: absolute;
    border-radius: inherit;
    background: rgba(253, 253, 253, 0.85);
}

[data-theme="dark"] .attendance-lesson-shell .al-loading,
[data-theme-variant="deep-dark"] .attendance-lesson-shell .al-loading {
    background: rgba(15, 23, 42, 0.82);
}

@media (max-width: 1024px) {
    .attendance-lesson-subheader {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* La tabla diaria fuerza modo tarjeta en <900px con 6 columnas; la lección tiene 4 — restaurar tabla */
@media (max-width: 900px) {
    .attendance-lesson-shell .al-lesson-students-table thead {
        display: table-header-group !important;
    }
    .attendance-lesson-shell .al-lesson-students-table,
    .attendance-lesson-shell .al-lesson-students-table tbody,
    .attendance-lesson-shell .al-lesson-students-table thead {
        display: table !important;
        width: 100% !important;
    }
    .attendance-lesson-shell .al-lesson-students-table tr {
        display: table-row !important;
        grid-template-columns: unset !important;
        grid-template-areas: unset !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .attendance-lesson-shell .al-lesson-students-table th,
    .attendance-lesson-shell .al-lesson-students-table td {
        display: table-cell !important;
        width: auto !important;
        border: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding: 0.65rem 0.5rem !important;
    }
    .attendance-lesson-shell .al-lesson-students-table td::before {
        display: none !important;
        content: none !important;
    }
    .attendance-lesson-shell .al-lesson-students-table .al-empty-cell {
        display: table-cell !important;
    }
}

/* --- Pulido UI: asistencia por lección + reportes (solo Blade/CSS) --- */

/* Cabecera: en pantallas angostas solo iconos en botones con etiqueta */
@media (max-width: 720px) {
    .attendance-lesson-shell .attendance-lesson-controls-box .control-btn .control-btn-text {
        display: none;
    }
}

/* Barra rápida: texto “Todos presentes” oculto en móvil */
@media (max-width: 640px) {
    .attendance-lesson-shell .tool-btn-pill--compact-sm .tool-btn-pill-label,
    .attendance-justifications-shell .tool-btn-pill--compact-sm .tool-btn-pill-label {
        display: none;
    }
}

.attendance-lesson-shell .tool-btn-pill--danger {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
}

.attendance-lesson-shell .tool-btn-pill--danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #fff !important;
}

/* Pastillas de lección: coherencia con tool-btn-pill */
.attendance-lesson-subheader .al-pill {
    padding: 0.45rem 1rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    line-height: 1.2;
}

.attendance-lesson-subheader .al-lesson-nav {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
}

/* Scroll horizontal + primera columna fija (nombre) */
.attendance-lesson-shell .al-lesson-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.attendance-lesson-shell .al-lesson-table-scroll .al-lesson-students-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--bg-secondary);
    box-shadow: 4px 0 12px -6px rgba(0, 0, 0, 0.18);
}

.attendance-lesson-shell .al-lesson-table-scroll .al-lesson-students-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    box-shadow: 4px 0 10px -6px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .attendance-lesson-shell .al-lesson-table-scroll .al-lesson-students-table tbody td:first-child,
[data-theme-variant="deep-dark"] .attendance-lesson-shell .al-lesson-table-scroll .al-lesson-students-table tbody td:first-child {
    background: var(--bg-card);
}

/* Reportes: cabecera en dos grupos (pestañas | export) */
.attendance-reports-shell .attendance-reports-controls-box {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    align-items: center;
}

.attendance-reports-shell .attendance-reports-tab-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.attendance-reports-shell .attendance-reports-export-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.attendance-reports-shell .control-btn--export-pdf i {
    color: #dc2626 !important;
}

.attendance-reports-shell .control-btn--export-csv i {
    color: #16a34a !important;
}

@media (max-width: 720px) {
    .attendance-reports-shell .attendance-reports-export-cluster {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid var(--border-color);
    }

    .attendance-reports-shell .attendance-reports-tab-cluster .control-btn .control-btn-text {
        display: none;
    }
}

.attendance-reports-date-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin: 0 1.25rem 0.85rem;
    line-height: 1.45;
    max-width: 52rem;
}

@media (min-width: 1024px) {
    .attendance-reports-date-hint {
        margin-left: 2rem;
        margin-right: 2rem;
    }
}

/* Tablas anchas: scroll + primera columna fija */
.attendance-reports-shell .ar-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.15rem;
    padding: 0 0.15rem 0.35rem;
}

.attendance-reports-shell .ar-table-scroll .ar-table th:first-child,
.attendance-reports-shell .ar-table-scroll .ar-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    box-shadow: 4px 0 12px -6px rgba(0, 0, 0, 0.15);
}

.attendance-reports-shell .ar-table-scroll .ar-table thead th:first-child {
    z-index: 3;
    background: var(--bg-secondary);
}

[data-theme="dark"] .attendance-reports-shell .ar-table-scroll .ar-table tbody td:first-child,
[data-theme-variant="deep-dark"] .attendance-reports-shell .ar-table-scroll .ar-table tbody td:first-child {
    background: var(--bg-card);
}

/* Tarjetas de resumen */
.attendance-reports-shell .ar-stat-card {
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.attendance-reports-shell .ar-stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.attendance-reports-shell .ar-stat-card .ar-stat-value {
    font-variant-numeric: tabular-nums;
}

/* Empty state pestaña Individual */
.attendance-reports-shell .empty-state--reports-individual {
    padding: 2rem 1rem 2.5rem;
    margin: 0 auto;
    max-width: 28rem;
}

.attendance-reports-shell .empty-state--reports-individual .empty-state-svg {
    width: 56px;
    height: 56px;
    opacity: 0.85;
}

.attendance-reports-shell .attendance-reports-presets {
    flex-wrap: wrap;
    gap: 0.35rem;
}

.attendance-reports-shell .unified-tools-box {
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

/* --- Justificaciones (shell alineado) --- */
.attendance-justifications-shell .attendance-justifications-body {
    padding: 0.35rem 1.25rem 1.5rem;
}

@media (min-width: 1024px) {
    .attendance-justifications-shell .attendance-justifications-body {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.attendance-justifications-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin: 0 1.25rem 0.85rem;
    line-height: 1.45;
    max-width: 52rem;
}

@media (min-width: 1024px) {
    .attendance-justifications-hint {
        margin-left: 2rem;
        margin-right: 2rem;
    }
}

.attendance-justifications-shell .aj-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attendance-justifications-shell .empty-state--justifications-loading {
    padding: 2.5rem 1.5rem 3rem;
    margin: 0 auto;
    max-width: 24rem;
    text-align: center;
}

.attendance-justifications-shell .empty-state--justifications-loading .empty-state-svg {
    width: 48px;
    height: 48px;
    opacity: 0.85;
}

.attendance-justifications-shell .controls-box.attendance-justifications-controls-box {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.attendance-justifications-shell .aj-card {
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.attendance-justifications-shell .aj-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.attendance-justifications-shell .aj-list-message {
    margin: 0 auto;
    max-width: 26rem;
    text-align: center;
}
