/* ========================================
   Tutor LMS Attendance — Admin Styles v2
   Modern 2026 Professional Design
   ======================================== */

/* ====== CSS Variables ====== */
:root {
    --ta-admin-primary: #0f766e;
    --ta-admin-primary-dark: #115e59;
    --ta-admin-primary-soft: #e7f5f2;
    --ta-admin-success: #16a34a;
    --ta-admin-success-dark: #15803d;
    --ta-admin-danger: #dc2626;
    --ta-admin-warning: #d97706;
    --ta-admin-info: #0f766e;
    --ta-admin-surface: #ffffff;
    --ta-admin-bg: #f4f8f7;
    --ta-admin-border: #d7e5e2;
    --ta-admin-muted: #597474;
    --ta-admin-text: #163232;
    --ta-admin-gray-50: #f8fbfb;
    --ta-admin-gray-100: #f1f6f5;
    --ta-admin-gray-200: #dce9e6;
    --ta-admin-gray-300: #bfd2cd;
    --ta-admin-gray-400: #87a4a1;
    --ta-admin-gray-500: #597474;
    --ta-admin-gray-600: #355554;
    --ta-admin-gray-700: #234241;
    --ta-admin-gray-800: #163232;
    --ta-admin-gray-900: #102828;
}

/* ====== SVG Icon Styles ====== */
.ta-wrap h1 svg,
.ta-form-panel h2 svg,
.ta-btn-small svg,
.ta-btn-primary svg,
.ta-btn-save svg,
.ta-quick svg,
.ta-badge svg,
.ta-filter-bar label svg {
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
}

.ta-wrap h1 svg {
    margin-right: 8px;
}

.ta-btn-small svg {
    margin-right: 4px;
}

.ta-btn-primary svg,
.ta-btn-save svg {
    margin-right: 6px;
}

.ta-badge svg {
    margin-right: 4px;
}

.ta-filter-bar label svg {
    margin-right: 6px;
}

.ta-wrap { max-width: 1240px; padding-bottom: 48px; }
.ta-wrap h1 { font-size: 28px; font-weight: 800; margin-bottom: 22px; color: var(--ta-admin-text); letter-spacing: -.02em; }
.ta-wrap:not(.ta-student-data-wrap) > h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ta-wrap h3 {
    color: var(--ta-admin-text);
}

.ta-wrap code {
    background: #edf6f4;
    color: var(--ta-admin-primary-dark);
    padding: 2px 7px;
    border-radius: 8px;
}

.ta-wrap pre {
    border: 1px solid var(--ta-admin-border);
    border-radius: 18px;
    background: #f8fbfb;
    color: var(--ta-admin-text);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .04);
}

.ta-wrap .button {
    border-color: rgba(15,118,110,.16);
    background: linear-gradient(180deg, #fff 0%, #f4f8f7 100%);
    color: var(--ta-admin-primary-dark);
    border-radius: 12px;
    min-height: 40px;
    padding: 0 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}

.ta-wrap .button:hover {
    border-color: rgba(15,118,110,.28);
    background: #eef8f5;
    color: var(--ta-admin-text);
}

.ta-wrap select,
.ta-wrap input[type="text"],
.ta-wrap input[type="number"],
.ta-wrap input[type="email"],
.ta-wrap textarea {
    border-radius: 12px;
}

/* ---- Filter Bar ---- */
.ta-filter-bar { background:var(--ta-admin-surface); border:1px solid var(--ta-admin-border); border-radius:20px; box-shadow:0 16px 32px rgba(15,23,42,.06); padding:20px 24px; margin-bottom:24px; }
.ta-filter-bar form { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; }
.ta-filter-group { display:flex; flex-direction:column; gap:5px; }
.ta-filter-group label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--ta-admin-muted); }
.ta-filter-group select,
.ta-filter-group input[type="date"] { padding:10px 14px; border:1px solid var(--ta-admin-border); border-radius:12px; font-size:14px; min-width:200px; transition:border .2s, box-shadow .2s; color:var(--ta-admin-text); background:#fff; min-height:44px; box-shadow:inset 0 1px 2px rgba(15,23,42,.03); }
.ta-filter-group select:focus,
.ta-filter-group input:focus { outline:none; border-color:var(--ta-admin-primary); box-shadow:0 0 0 3px rgba(15,118,110,.12); }

/* ---- Buttons ---- */
.ta-btn-primary,
.ta-btn-save {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:none;
    border-radius:12px;
    padding:0 22px;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
    min-height:44px;
}

.ta-btn-primary {
    background:linear-gradient(135deg, var(--ta-admin-primary) 0%, #0b8a7d 100%);
    color:#fff;
    box-shadow:0 14px 24px rgba(15,118,110,.18);
}

.ta-btn-primary:hover {
    background:linear-gradient(135deg, var(--ta-admin-primary-dark) 0%, var(--ta-admin-primary) 100%);
    transform:translateY(-1px);
    box-shadow:0 18px 28px rgba(15,118,110,.22);
}

.ta-btn-save { background:linear-gradient(135deg, var(--ta-admin-success) 0%, var(--ta-admin-success-dark) 100%); color:#fff; box-shadow:0 14px 24px rgba(22,163,74,.16); }
.ta-btn-save:hover { transform:translateY(-1px); box-shadow:0 18px 30px rgba(22,163,74,.2); }
.ta-btn-save:disabled { background:#86efac; box-shadow:none; cursor:not-allowed; }

/* ---- Notices ---- */
.ta-notice { padding:16px 18px; border-radius:16px; margin:16px 0; font-size:14px; border:1px solid var(--ta-admin-border); background:#fff; box-shadow:0 10px 24px rgba(15,23,42,.04); }
.ta-notice-warning { background:#fff8eb; border-left:4px solid #f59e0b; color:#9a5b00; }

/* ---- Form Card ---- */
.ta-form-card { background:#fff; border:1px solid var(--ta-admin-border); border-radius:22px; box-shadow:0 18px 36px rgba(15,23,42,.06); overflow:hidden; }

.ta-form-header { display:flex; align-items:center; justify-content:space-between; padding:22px 24px; border-bottom:1px solid var(--ta-admin-border); flex-wrap:wrap; gap:12px; background:radial-gradient(circle at top right, rgba(13,148,136,.16), rgba(13,148,136,0) 42%), linear-gradient(180deg, #fff 0%, #f7fbfa 100%); }
.ta-form-title { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ta-form-title h2 { margin:0; font-size:18px; color:var(--ta-admin-text); }
.ta-badge { padding:7px 12px; border-radius:999px; font-size:12px; font-weight:700; border:1px solid transparent; }
.ta-badge-date { background:#edf7f5; color:var(--ta-admin-primary-dark); border-color:#cfe7e2; }
.ta-badge-count { background:#effaf3; color:#166534; border-color:#ccebd7; }

.ta-quick-btns { display:flex; gap:8px; }
.ta-quick { padding:9px 16px; border:none; border-radius:12px; font-size:13px; font-weight:700; cursor:pointer; transition:all .18s; }
.ta-quick.present { background:#e9f8ef; color:#166534; border:1px solid #cfead8; } .ta-quick.present:hover { background:#d6f3e1; }
.ta-quick.absent  { background:#fff1f2; color:#9f1239; border:1px solid #fecdd3; } .ta-quick.absent:hover  { background:#ffe4e6; }

/* ---- Table ---- */
.ta-table-wrap { overflow-x:auto; }
.ta-table { width:100%; border-collapse:collapse; font-size:14px; }
.ta-table thead tr { background:#f5f9f8; }
.ta-table th { padding:13px 16px; text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--ta-admin-muted); border-bottom:1px solid var(--ta-admin-border); white-space:nowrap; }
.ta-table td { padding:13px 16px; border-bottom:1px solid #edf4f3; vertical-align:middle; color:var(--ta-admin-gray-700); }
.ta-table tbody tr:last-child td { border-bottom:none; }
.ta-table tbody tr:hover { background:#f8fbfb; }
.ta-center { text-align:center !important; }
.ta-bold { font-weight:700; }
.ta-num-col { color:var(--ta-admin-gray-400); font-size:13px; }
.ta-email { font-size:13px; color:var(--ta-admin-muted); }

/* ---- Student cell ---- */
.ta-student { display:flex; align-items:center; gap:9px; }
.ta-avatar { border-radius:50% !important; width:34px !important; height:34px !important; }

/* ---- Radio tick buttons ---- */
.ta-tick { display:inline-flex; justify-content:center; cursor:pointer; }
.ta-tick input[type="radio"] { position:absolute; opacity:0; width:0; height:0; }
.ta-dot { width:32px; height:32px; border-radius:50%; border:2.5px solid var(--ta-admin-border); display:flex; align-items:center; justify-content:center; transition:all .18s; font-size:0; background:#fff; }
.ta-dot:hover { border-color:var(--ta-admin-primary); transform:scale(1.08); }

/* Present — checked */
.ta-tick.present input:checked ~ .ta-dot { background:#22c55e; border-color:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.18); font-size:15px; color:#fff; }
.ta-tick.present input:checked ~ .ta-dot::before { content:'✓'; font-weight:900; }

/* Absent — checked */
.ta-tick.absent input:checked ~ .ta-dot { background:#ef4444; border-color:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.18); font-size:15px; color:#fff; }
.ta-tick.absent input:checked ~ .ta-dot::before { content:'✕'; font-weight:900; }

/* Late — checked */
.ta-tick.late input:checked ~ .ta-dot { background:#f59e0b; border-color:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.18); font-size:15px; color:#fff; }
.ta-tick.late input:checked ~ .ta-dot::before { content:'◷'; font-weight:900; }

/* Row background by status */
.ta-row[data-status="present"] { background:#f0fdf4 !important; }
.ta-row[data-status="absent"]  { background:#fff5f5 !important; }
.ta-row[data-status="late"]    { background:#fffbeb !important; }

/* ---- Note input ---- */
.ta-note { width:100%; padding:10px 12px; border:1px solid var(--ta-admin-border); border-radius:12px; font-size:13px; color:var(--ta-admin-gray-700); transition:border .2s, box-shadow .2s; box-shadow:inset 0 1px 2px rgba(15,23,42,.03); }
.ta-note:focus { outline:none; border-color:var(--ta-admin-primary); box-shadow:0 0 0 3px rgba(15,118,110,.12); }

/* ---- Footer / Save ---- */
.ta-footer { display:flex; align-items:center; gap:16px; padding:22px 24px; border-top:1px solid var(--ta-admin-border); background:#fbfdfd; }
#ta-msg { font-size:14px; font-weight:600; }
#ta-msg.ok  { color:#16a34a; }
#ta-msg.err { color:#dc2626; }

/* ---- Report stats ---- */
.ta-stats-row { display:flex; gap:14px; margin-bottom:24px; flex-wrap:wrap; }
.ta-stat { background:#fff; border-radius:20px; padding:22px 28px; border:1px solid var(--ta-admin-border); box-shadow:0 16px 32px rgba(15,23,42,.06); text-align:center; min-width:150px; }
.ta-stat-n { font-size:30px; font-weight:800; }
.ta-stat-l { font-size:11px; font-weight:700; text-transform:uppercase; color:var(--ta-admin-muted); margin-top:6px; letter-spacing:.08em; }
.ta-stat.present .ta-stat-n { color:#22c55e; }
.ta-stat.absent  .ta-stat-n { color:#ef4444; }
.ta-stat.late    .ta-stat-n { color:#f59e0b; }
.ta-stat.overall .ta-stat-n { color:var(--ta-admin-primary); }

/* ---- Report table ---- */
.ta-date-th { min-width:54px; font-size:10px; }
.ta-cell-present { background:#f0fdf4; }
.ta-cell-absent  { background:#fff5f5; }
.ta-cell-late    { background:#fffbeb; }
.ta-bar-wrap { display:flex; align-items:center; gap:8px; }
.ta-bar { background:#dfecea; border-radius:10px; height:8px; width:70px; overflow:hidden; }
.ta-bar-fill { height:100%; border-radius:10px; }
.ta-bar-fill.good { background:#22c55e; }
.ta-bar-fill.low  { background:#ef4444; }
.ta-pct { font-weight:700; font-size:13px; }
.ta-pct.good { color:#16a34a; }
.ta-pct.low  { color:#dc2626; }

/* ---- Student attendance page ---- */
.ta-student-attendance-wrap .ta-student-hero {
    margin-bottom: 28px;
}

.ta-attendance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) 320px;
    gap: 24px;
    align-items: start;
}

.ta-attendance-main,
.ta-attendance-sidebar {
    min-width: 0;
}

.ta-attendance-filter-card {
    padding: 24px;
}

.ta-attendance-filter-card__title {
    margin-bottom: 18px;
}

.ta-attendance-filter-card__title h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: var(--ta-admin-text);
    letter-spacing: -.02em;
}

.ta-attendance-filter-card__title p {
    margin: 0;
    color: var(--ta-admin-muted);
    font-size: 14px;
}

.ta-student-filter-form--attendance {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end !important;
}

.ta-student-filter-form--attendance .ta-filter-group {
    min-width: 0;
}

.ta-student-filter-form--attendance .ta-filter-group select,
.ta-student-filter-form--attendance .ta-filter-group input[type="date"] {
    min-width: 0;
    width: 100%;
}

.ta-student-filter-actions {
    display: flex;
    align-items: flex-end;
}

.ta-student-filter-actions .ta-btn-primary {
    width: 100%;
}

.ta-attendance-student-card .ta-form-header {
    align-items: flex-start;
}

.ta-attendance-student-table th.ta-center,
.ta-attendance-student-table td.ta-center {
    width: 88px;
}

.ta-attendance-student-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ta-attendance-student-meta strong {
    color: var(--ta-admin-text);
    font-size: 14px;
}

.ta-attendance-student-meta span {
    color: var(--ta-admin-muted);
    font-size: 12px;
    word-break: break-word;
}

.ta-attendance-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ta-attendance-calendar-card {
    background: #fff;
    border: 1px solid var(--ta-admin-border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 18px 36px rgba(15,23,42,.06);
}

.ta-attendance-calendar-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.ta-attendance-calendar-card__head strong {
    color: var(--ta-admin-text);
    font-size: 22px;
    line-height: 1;
}

.ta-attendance-calendar-card__head span {
    color: var(--ta-admin-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ta-attendance-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.ta-attendance-calendar-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 12px;
    color: var(--ta-admin-gray-600);
    font-size: 13px;
    font-weight: 600;
    background: #f8fbfb;
}

.ta-attendance-calendar-grid--labels {
    margin-bottom: 8px;
}

.ta-attendance-calendar-grid--labels span {
    min-height: auto;
    border-radius: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ta-admin-muted);
}

.ta-attendance-calendar-grid span.is-muted {
    color: var(--ta-admin-gray-400);
    background: #fbfdfd;
}

.ta-attendance-calendar-grid span.is-today {
    box-shadow: inset 0 0 0 1px rgba(15,118,110,.28);
}

.ta-attendance-calendar-grid span.is-selected {
    background: linear-gradient(135deg, var(--ta-admin-primary) 0%, #15b79e 100%);
    color: #fff;
    box-shadow: 0 12px 22px rgba(15,118,110,.2);
}

.ta-attendance-metrics {
    display: grid;
    gap: 14px;
}

.ta-attendance-metric {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ta-admin-border);
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 18px 36px rgba(15,23,42,.06);
}

.ta-attendance-metric::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: rgba(15,118,110,.22);
}

.ta-attendance-metric span {
    display: block;
    margin-bottom: 6px;
    color: var(--ta-admin-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ta-attendance-metric strong {
    display: block;
    color: var(--ta-admin-text);
    font-size: 32px;
    line-height: 1;
}

.ta-attendance-metric--total {
    background: linear-gradient(135deg, #fff9d8 0%, #fff4aa 100%);
}

.ta-attendance-metric--total::before {
    background: #eab308;
}

.ta-attendance-metric--present {
    background: linear-gradient(135deg, #e7fff2 0%, #bbf7d0 100%);
}

.ta-attendance-metric--present::before {
    background: #22c55e;
}

.ta-attendance-metric--absent {
    background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 100%);
}

.ta-attendance-metric--absent::before {
    background: #ef4444;
}

.ta-attendance-metric--late {
    background: linear-gradient(135deg, #fff8eb 0%, #fde68a 100%);
}

.ta-attendance-metric--late::before {
    background: #f59e0b;
}

@media (max-width: 1180px) {
    .ta-attendance-layout {
        grid-template-columns: 1fr;
    }

    .ta-attendance-sidebar {
        order: -1;
    }
}

@media (max-width: 860px) {
    .ta-student-filter-form--attendance {
        grid-template-columns: 1fr;
    }

    .ta-student-filter-actions .ta-btn-primary {
        width: auto;
    }

    .ta-form-header,
    .ta-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ta-quick-btns {
        width: 100%;
    }

    .ta-quick-btns .ta-quick {
        flex: 1 1 0;
        justify-content: center;
    }
}

/* ====== Enhanced Reports & Leave Status Styles ====== */
.ta-cell-leave { color: var(--ta-admin-info) !important; }
.ta-stat.leave { background: #f0fdfa; border-color: #ccfbf1; color: #0f766e; }
.ta-stat.leave .ta-stat-n { color: #0d9488; }

.ta-reports-summary-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ta-performance-meter {
    width: 100%;
    height: 24px;
    background: var(--ta-admin-gray-100);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ta-admin-border);
}

.ta-performance-meter__bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ta-performance-meter__val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--ta-admin-gray-800);
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

.ta-center.ta-date-th {
    font-size: 10px;
    font-weight: 700;
    color: var(--ta-admin-muted);
    background: var(--ta-admin-gray-50);
}

/* ====== Text Color Utilities ====== */
.ta-text-success { color: var(--ta-admin-success) !important; }
.ta-text-danger { color: var(--ta-admin-danger) !important; }
.ta-text-warning { color: var(--ta-admin-warning) !important; }
.ta-text-info { color: var(--ta-admin-info) !important; }
.ta-text-primary { color: var(--ta-admin-primary) !important; }

/* ====== Reports Dashboard (Dashboard-Style Layout) ====== */
.ta-reports-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ta-admin-gray-800);
    line-height: 1.6;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

.ta-reports-dashboard *,
.ta-reports-dashboard *::before,
.ta-reports-dashboard *::after {
    box-sizing: border-box;
}

/* --- Dashboard Header (Reports variant) --- */
.ta-reports-header {
    display: flex;
    align-items: center;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--ta-admin-primary) 0%, var(--ta-admin-primary-dark) 100%);
    border-radius: 20px;
    margin-bottom: 28px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.ta-reports-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ta-reports-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ta-dashboard-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.25);
    z-index: 1;
}

.ta-dashboard-header-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.ta-reports-header .ta-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.ta-reports-header .ta-user-info {
    color: var(--ta-white, #fff);
}

.ta-reports-header .ta-welcome-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ta-reports-header .ta-subtitle {
    font-size: 14px;
    margin: 0 0 12px;
    opacity: 0.85;
    font-weight: 400;
    color: #fff;
}

.ta-dashboard-header-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ta-dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
}

.ta-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Stats Grid (Dashboard Style) --- */
.ta-reports-dashboard .ta-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.ta-reports-dashboard .ta-stat-card {
    background: var(--ta-admin-surface);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    border: 1px solid var(--ta-admin-border);
    position: relative;
    overflow: hidden;
}

.ta-reports-dashboard .ta-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.ta-reports-dashboard .ta-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.ta-reports-dashboard .ta-stat-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ta-reports-dashboard .ta-stat-icon-box svg {
    color: var(--ta-admin-primary);
    width: 20px;
    height: 20px;
}

.ta-reports-dashboard .ta-stat-card.ta-stat-courses::before { background: var(--ta-admin-primary); }
.ta-reports-dashboard .ta-stat-card.ta-stat-courses .ta-stat-icon-box { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.ta-reports-dashboard .ta-stat-card.ta-stat-courses .ta-stat-icon-box svg { color: var(--ta-admin-primary); }

.ta-reports-dashboard .ta-stat-card.ta-stat-students::before { background: #0ea5e9; }
.ta-reports-dashboard .ta-stat-card.ta-stat-students .ta-stat-icon-box { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.ta-reports-dashboard .ta-stat-card.ta-stat-students .ta-stat-icon-box svg { color: #0ea5e9; }

.ta-reports-dashboard .ta-stat-card.ta-stat-present::before { background: var(--ta-admin-success); }
.ta-reports-dashboard .ta-stat-card.ta-stat-present .ta-stat-icon-box { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.ta-reports-dashboard .ta-stat-card.ta-stat-present .ta-stat-icon-box svg { color: var(--ta-admin-success); }

.ta-reports-dashboard .ta-stat-card.ta-stat-overall::before { background: #8b5cf6; }
.ta-reports-dashboard .ta-stat-card.ta-stat-overall .ta-stat-icon-box { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.ta-reports-dashboard .ta-stat-card.ta-stat-overall .ta-stat-icon-box svg { color: #8b5cf6; }

.ta-reports-dashboard .ta-stat-content { flex: 1; min-width: 0; }

.ta-reports-dashboard .ta-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--ta-admin-gray-900);
    line-height: 1.3;
}

.ta-reports-dashboard .ta-stat-label {
    font-size: 12px;
    color: var(--ta-admin-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* --- Dashboard Content Wrapper --- */
.ta-reports-dashboard .ta-dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
}

/* --- Section Card --- */
.ta-reports-dashboard .ta-section {
    width: 100%;
    background: var(--ta-admin-surface);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid var(--ta-admin-border);
    overflow: hidden;
    box-sizing: border-box;
}

.ta-reports-dashboard .ta-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ta-admin-border);
    background: var(--ta-admin-gray-50);
    gap: 12px;
    flex-wrap: wrap;
}

.ta-reports-dashboard .ta-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ta-admin-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ta-reports-dashboard .ta-section-title svg {
    color: var(--ta-admin-primary);
    width: 18px;
    height: 18px;
}


.ta-section-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--ta-admin-muted);
    white-space: nowrap;
}

.ta-reports-dashboard .ta-section-body {
    padding: 0;
}

.ta-reports-dashboard .ta-section-body--padded {
    padding: 24px;
}

/* --- Report Summary Grid --- */
.ta-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 24px;
}

.ta-report-summary-item {
    text-align: center;
    padding: 16px;
    background: var(--ta-admin-gray-50);
    border-radius: 14px;
    border: 1px solid var(--ta-admin-border);
}

.ta-report-summary-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ta-admin-muted);
    margin-bottom: 8px;
}

.ta-report-summary-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--ta-admin-text);
}

/* --- Report Bars Section --- */
.ta-report-bars {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ta-report-bars .ta-bar-row { }

.ta-report-bars .ta-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--ta-admin-muted);
    margin-bottom: 8px;
}

.ta-report-bars .ta-bar-bg {
    height: 10px;
    background: var(--ta-admin-gray-100);
    border-radius: 5px;
    overflow: hidden;
}

.ta-report-bars .ta-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.ta-report-bars .ta-bar-fill.present { background: linear-gradient(90deg, var(--ta-admin-success), #4ade80); }
.ta-report-bars .ta-bar-fill.absent { background: linear-gradient(90deg, var(--ta-admin-danger), #f87171); }
.ta-report-bars .ta-bar-fill.leave { background: linear-gradient(90deg, var(--ta-admin-info), #2dd4bf); }

/* --- Performance Meter (Table) --- */
.ta-performance-meter {
    display: inline-block;
    width: 80px;
    height: 8px;
    background: var(--ta-admin-gray-100);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 6px;
}

.ta-performance-meter__bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ta-performance-meter__bar.high { background: linear-gradient(90deg, var(--ta-admin-success), #4ade80); }
.ta-performance-meter__bar.medium { background: linear-gradient(90deg, var(--ta-admin-warning), #fbbf24); }
.ta-performance-meter__bar.low { background: linear-gradient(90deg, var(--ta-admin-danger), #f87171); }

/* --- Table inside sections --- */
.ta-reports-dashboard .ta-table-container {
    overflow-x: auto;
    min-width: 0;
}

.ta-reports-dashboard .ta-attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ta-reports-dashboard .ta-attendance-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--ta-admin-muted);
    background: var(--ta-admin-gray-50);
    border-bottom: 1px solid var(--ta-admin-border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.ta-reports-dashboard .ta-attendance-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ta-admin-border);
    color: var(--ta-admin-gray-700);
    vertical-align: middle;
}

.ta-reports-dashboard .ta-attendance-table tbody tr:last-child td {
    border-bottom: none;
}

.ta-reports-dashboard .ta-attendance-table tbody tr:hover {
    background: var(--ta-admin-gray-50);
    transition: background 0.15s ease;
}

/* --- Responsive for Reports Dashboard --- */
@media (max-width: 1024px) {
    .ta-reports-dashboard {
        padding: 16px;
    }

    .ta-reports-dashboard .ta-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ta-report-filter-form .ta-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .ta-reports-dashboard .ta-stats-grid {
        grid-template-columns: 1fr;
    }

    .ta-reports-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .ta-reports-header .ta-header-left {
        flex-direction: column;
    }

    .ta-report-filter-form .ta-form-row {
        grid-template-columns: 1fr;
    }

    .ta-report-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
}

@media (max-width: 480px) {
    .ta-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .ta-reports-dashboard .ta-section-header {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }
}

/* ====== Animation ====== */
.ta-reports-dashboard .ta-stat-card,
.ta-reports-dashboard .ta-section {
    animation: taReportsFadeIn 0.4s ease forwards;
}

@keyframes taReportsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ta-reports-dashboard .ta-stat-card:nth-child(1) { animation-delay: 0.05s; }
.ta-reports-dashboard .ta-stat-card:nth-child(2) { animation-delay: 0.1s; }
.ta-reports-dashboard .ta-stat-card:nth-child(3) { animation-delay: 0.15s; }
.ta-reports-dashboard .ta-stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ====== Reports Filter (Popup Modals) ====== */
.ta-report-filter-form .ta-report-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.ta-report-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ta-report-filter-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ta-admin-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ta-report-filter-group label svg {
    width: 14px;
    height: 14px;
    color: var(--ta-admin-primary);
}

.ta-report-filter-group select,
.ta-report-filter-group input[type="date"] {
    min-height: 48px;
    width: 100%;
    border: 1px solid var(--ta-admin-border);
    border-radius: 14px;
    background: #fff;
    color: var(--ta-admin-text);
    padding: 0 14px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.ta-report-filter-group select:focus,
.ta-report-filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--ta-admin-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.ta-report-filter-group select {
    cursor: pointer;
    appearance: auto;
}

.ta-report-filter-actions {
    display: flex;
    align-items: flex-end;
}

.ta-report-filter-actions .ta-btn-primary {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
}

.ta-reports-dashboard .ta-search-select {
    position: relative;
}

.ta-reports-dashboard .ta-search-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--ta-admin-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
    min-height: 42px;
    box-shadow: inset 0 1px 2px rgba(15,23,42,0.03);
}

.ta-reports-dashboard .ta-search-select-trigger:hover {
    border-color: var(--ta-admin-primary);
}

.ta-reports-dashboard .ta-search-select-icon {
    color: var(--ta-admin-muted);
    flex-shrink: 0;
}

.ta-reports-dashboard .ta-search-select-text {
    flex: 1;
    font-size: 14px;
    color: var(--ta-admin-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ta-reports-dashboard .ta-search-select-placeholder {
    color: var(--ta-admin-gray-400);
}

.ta-reports-dashboard .ta-search-select-chevron {
    color: var(--ta-admin-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.ta-reports-dashboard .ta-search-select-trigger:focus {
    outline: none;
    border-color: var(--ta-admin-primary);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}

/* Course Modal */
.ta-course-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.ta-course-modal-overlay.open {
    display: flex;
}

.ta-course-modal {
    background: #fff;
    border-radius: 16px;
    width: 440px;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    border: 1px solid var(--ta-admin-border);
    animation: taModalSlideUp 0.2s ease;
    overflow: hidden;
}

@keyframes taModalSlideUp {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ta-course-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--ta-admin-border);
}

.ta-course-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ta-admin-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-course-modal-title svg {
    color: var(--ta-admin-primary);
}

.ta-course-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--ta-admin-gray-50);
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ta-admin-muted);
    transition: all 0.15s;
}

.ta-course-modal-close:hover {
    background: var(--ta-admin-gray-100);
    color: var(--ta-admin-text);
}

.ta-course-modal-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--ta-admin-border);
    position: relative;
}

.ta-course-modal-search input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--ta-admin-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--ta-admin-text);
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.ta-course-modal-search input:focus {
    border-color: var(--ta-admin-primary);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}

.ta-course-modal-search input::placeholder {
    color: var(--ta-admin-gray-400);
}

.ta-search-icon-right {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ta-admin-gray-400);
    pointer-events: none;
}

.ta-course-modal-list {
    overflow-y: auto;
    max-height: 340px;
    padding: 8px;
}

.ta-course-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 14px;
    color: var(--ta-admin-text);
}

.ta-course-modal-item:hover {
    background: var(--ta-admin-gray-50);
}

.ta-course-modal-item.active {
    background: var(--ta-admin-primary-soft);
    color: var(--ta-admin-primary-dark);
    font-weight: 600;
}

.ta-course-modal-item svg {
    color: var(--ta-admin-primary);
    flex-shrink: 0;
}

.ta-course-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ta-course-modal-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--ta-admin-gray-400);
    font-size: 14px;
}

/* Date Modal */
.ta-date-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    justify-content: center;
    align-items: center;
}

.ta-date-modal-overlay.open {
    display: flex;
}

.ta-date-modal {
    background: #fff;
    border-radius: 16px;
    width: 340px;
    max-width: 90vw;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: taModalSlideUp 0.25s ease;
    overflow: hidden;
}

.ta-date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ta-admin-border);
}

.ta-date-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--ta-admin-border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ta-admin-text);
    transition: all 0.15s;
}

.ta-date-nav-btn:hover {
    background: var(--ta-admin-gray-50);
    border-color: var(--ta-admin-primary);
    color: var(--ta-admin-primary);
}

.ta-date-month-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ta-admin-text);
}

.ta-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 10px 16px 4px;
}

.ta-date-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ta-admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 0;
}

.ta-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px 16px;
}

.ta-date-day {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ta-admin-text);
    cursor: pointer;
    transition: all 0.12s;
}

.ta-date-day:hover:not(.other-month) {
    background: var(--ta-admin-gray-100);
}

.ta-date-day.today {
    font-weight: 700;
    color: var(--ta-admin-primary);
    box-shadow: inset 0 0 0 1.5px var(--ta-admin-primary);
}

.ta-date-day.selected {
    background: linear-gradient(135deg, var(--ta-admin-primary), #15b79e);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(15,118,110,0.25);
}

.ta-date-day.other-month {
    color: var(--ta-admin-gray-300);
    cursor: pointer;
}

.ta-date-day.other-month:hover {
    color: var(--ta-admin-gray-500);
    background: var(--ta-admin-gray-50);
}

.ta-date-footer {
    padding: 10px 16px 16px;
    text-align: center;
}

.ta-date-today-btn {
    padding: 8px 20px;
    border: 1px solid var(--ta-admin-border);
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ta-admin-primary);
    cursor: pointer;
    transition: all 0.15s;
}

.ta-date-today-btn:hover {
    background: var(--ta-admin-primary-soft);
    border-color: var(--ta-admin-primary);
}

@media (max-width: 860px) {
    .ta-report-filter-form .ta-report-filter-row {
        grid-template-columns: 1fr;
    }
    .ta-report-filter-actions .ta-btn-primary {
        width: auto;
    }
}

