.admin-reports {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 720px;
}

.admin-reports-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7ed 0%, #ecfeff 100%);
}

.admin-reports-hero h4 {
    margin: 6px 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.admin-reports-hero p {
    margin: 0;
    max-width: 760px;
    color: #64748b;
    line-height: 1.55;
}

.admin-reports__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f4511e;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-reports-reload {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 16px;
}

.admin-reports-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-reports-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: start;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-reports-card:hover,
.admin-reports-card.is-active {
    border-color: #fb923c;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.admin-reports-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #fff;
    background: #f4511e;
}

.admin-reports-card.is-attendance .admin-reports-card__icon {
    background: #2563eb;
}

.admin-reports-card.is-learning .admin-reports-card__icon {
    background: #059669;
}

.admin-reports-card.is-engagement .admin-reports-card__icon {
    background: #7c3aed;
}

.admin-reports-card strong,
.admin-reports-card small,
.admin-reports-card em {
    grid-column: 2;
}

.admin-reports-card strong {
    color: #0f172a;
    font-size: 0.98rem;
}

.admin-reports-card small {
    min-height: 48px;
    color: #64748b;
    line-height: 1.45;
}

.admin-reports-card em {
    display: inline-flex;
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 800;
}

.admin-reports-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-reports-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-reports-filters input,
.admin-reports-filters select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.admin-reports-filters__actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-reports-filters__actions .btn {
    width: auto;
    min-height: 38px;
    padding: 8px 14px;
    white-space: nowrap;
}

.admin-reports-filter-note {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-reports-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff7ed;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-reports-status span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-reports-applied-filters {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-reports-applied-filters span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-reports-applied-filters span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-reports-saved-views,
.admin-reports-scheduled-exports,
.admin-reports-insights {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-reports-saved-views {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(420px, 2fr);
    gap: 14px;
    align-items: end;
}

.admin-reports-saved-views h5,
.admin-reports-insights h5 {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
}

.admin-reports-saved-views h5 i,
.admin-reports-insights h5 i {
    color: #f4511e;
}

.admin-reports-saved-views p,
.admin-reports-insights p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-reports-saved-views__controls {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, auto) auto auto auto;
    gap: 8px;
    align-items: center;
}

.admin-reports-saved-views__controls input,
.admin-reports-saved-views__controls select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.admin-reports-saved-views__controls .btn {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
    white-space: nowrap;
}

.admin-reports-schedule-controls {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) minmax(120px, auto) minmax(100px, auto) minmax(220px, 1.2fr) auto auto;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.admin-reports-schedule-controls input,
.admin-reports-schedule-controls select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.admin-reports-schedule-controls .btn {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
    white-space: nowrap;
}

.admin-reports-insights__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.admin-reports-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.admin-reports-insight {
    width: 100%;
    padding: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    text-align: left;
}

button.admin-reports-insight {
    cursor: pointer;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button.admin-reports-insight:hover,
button.admin-reports-insight:focus-visible {
    border-color: #fb923c;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.admin-reports-insight span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
}

.admin-reports-insight strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.35rem;
}

.admin-reports-insight small {
    display: block;
    min-height: 34px;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-reports-insight__bar {
    height: 6px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.admin-reports-insight__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.admin-reports-insight.is-warning .admin-reports-insight__bar i {
    background: #f97316;
}

.admin-reports-insight.is-good .admin-reports-insight__bar i {
    background: #10b981;
}

.admin-reports-export-log {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-reports-export-log__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-reports-export-log__header h5 {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
}

.admin-reports-export-log__header h5 i {
    color: #f4511e;
}

.admin-reports-export-log__header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-reports-log-state {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 800;
}

.admin-reports-log-state.is-error {
    background: #fff7ed;
    color: #c2410c;
}

.admin-reports-log-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.admin-reports-log-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) minmax(150px, auto);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-reports-log-item strong,
.admin-reports-log-item b {
    display: block;
    color: #111827;
    font-size: 0.88rem;
}

.admin-reports-log-item span,
.admin-reports-log-item time {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-reports-snapshot-list,
.admin-reports-schedule-list,
.admin-reports-schedule-run-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.admin-reports-snapshot-item,
.admin-reports-schedule-item,
.admin-reports-schedule-run-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(88px, auto) minmax(220px, 1.2fr) minmax(150px, auto);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-reports-snapshot-item strong,
.admin-reports-snapshot-item b,
.admin-reports-schedule-item strong,
.admin-reports-schedule-item b,
.admin-reports-schedule-run-item strong,
.admin-reports-schedule-run-item b {
    display: block;
    color: #111827;
    font-size: 0.88rem;
}

.admin-reports-snapshot-item span,
.admin-reports-snapshot-item small,
.admin-reports-snapshot-item time,
.admin-reports-schedule-item span,
.admin-reports-schedule-item small,
.admin-reports-schedule-item time,
.admin-reports-schedule-run-item span,
.admin-reports-schedule-run-item small,
.admin-reports-schedule-run-item time {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-reports-schedule-run-history {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.admin-reports-schedule-run-history h6 {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
}

.admin-reports-schedule-run-history h6 i {
    color: #f4511e;
}

.admin-reports-schedule-run-item.is-error {
    background: #fff7ed;
    border-color: #fed7aa;
}

.admin-reports-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-reports-metric {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-reports-metric span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-reports-metric strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.3rem;
}

.admin-reports-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-reports-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
}

.admin-reports-table th,
.admin-reports-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    color: #111827;
    font-size: 0.86rem;
    text-align: left;
    vertical-align: top;
}

.admin-reports-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-weight: 900;
}

.admin-reports-table tr:last-child td {
    border-bottom: 0;
}

.admin-reports-empty,
.admin-reports-loading,
.admin-reports-notice {
    padding: 28px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.admin-reports-notice {
    border-color: #fed7aa;
    color: #c2410c;
    background: #fff7ed;
}

@media (max-width: 1100px) {
    .admin-reports-cards,
    .admin-reports-metrics,
    .admin-reports-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-reports-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-reports-saved-views,
    .admin-reports-saved-views__controls,
    .admin-reports-schedule-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-reports {
        min-width: 0;
    }

    .admin-reports-hero,
    .admin-reports-status,
    .admin-reports-applied-filters,
    .admin-reports-export-log__header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-reports-applied-filters span:first-child {
        white-space: normal;
    }

    .admin-reports-cards,
    .admin-reports-metrics,
    .admin-reports-insight-grid,
    .admin-reports-filters {
        grid-template-columns: 1fr;
    }

    .admin-reports-filters__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-reports-filters__actions .btn,
    .admin-reports-reload {
        width: 100%;
    }

    .admin-reports-log-item {
        grid-template-columns: 1fr;
    }

    .admin-reports-snapshot-item,
    .admin-reports-schedule-item,
    .admin-reports-schedule-run-item {
        grid-template-columns: 1fr;
    }
}
