/* ===================================================
   SF-SPORT — Academy Dashboard Shell
   Full-page professional management interface
   =================================================== */

/* ── 1. App Shell: hide topbar/footer, take full viewport ── */

.site-body:has(.academy-portal) {
    overflow: hidden;
    height: 100dvh;
}

.site-body:has(.academy-portal) .topbar,
.site-body:has(.academy-portal) .site-footer {
    display: none;
}

.site-body:has(.academy-portal) .site-main {
    padding: 0;
    margin: 0;
    height: 100dvh;
    overflow: hidden;
}

/* ── 2. Portal shell layout ── */

.academy-portal {
    display: flex;
    height: 100dvh;
    overflow: hidden;
    background: #f1f5f9;
}

.academy-portal .container {
    max-width: unset;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    height: 100dvh;
    overflow: hidden;
}

.academy-portal .portal__layout {
    display: flex;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    gap: 0;
    grid-template-columns: unset;
    align-items: stretch;
}

/* ── 3. Sidebar ── */

.academy-portal .academy-sidebar {
    width: 248px;
    min-width: 248px;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0f172a;
    border-radius: 0;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #1e293b transparent;
    /* RTL border on left, LTR on right */
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
}

/* Brand header */
.academy-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.1rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    flex-shrink: 0;
}

.academy-sidebar__brand-logo {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.academy-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.academy-sidebar__brand-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.academy-sidebar__brand-sub {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
}

/* Sidebar nav title (academy name) */
.academy-portal .portal-nav__title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.1rem 0.75rem 0.35rem;
    padding: 0;
    display: block;
}

/* Role badge */
.academy-portal .academy-sidebar__role {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0 0.75rem 0.5rem;
    font-weight: 500;
    display: none;
    /* shown via brand-sub */
}

/* Nav sections */
.acad-nav-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.acad-nav-section__label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 0.35rem 1rem 0.25rem;
    display: block;
}

.academy-portal .portal-nav__links {
    padding: 0.5rem 0.6rem;
    gap: 0;
    flex: 1;
    overflow-y: visible;
}

.academy-portal .portal-nav__link {
    color: #94a3b8;
    font-size: 0.845rem;
    font-weight: 500;
    padding: 0.48rem 0.75rem;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.12s, color 0.12s;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.academy-portal .portal-nav__link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
}

.academy-portal .portal-nav__link.is-active {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    font-weight: 600;
}

/* Nav link icons */
.nav-icon {
    font-size: 1rem;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Sidebar footer */
.academy-sidebar__foot {
    margin-top: auto;
    padding: 0.75rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.acad-user-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 0.5rem;
}

.acad-user-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.acad-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.academy-portal .portal-nav__link.acad-signout {
    color: #64748b;
    font-size: 0.8rem;
}

.academy-portal .portal-nav__link.acad-signout:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

/* ── 4. Main content area ── */

.academy-portal .portal__main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f1f5f9;
    padding: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.finance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.finance-kpi-grid--wallet {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.finance-kpi-card {
    display: grid;
    gap: 0.35rem;
    min-height: 96px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.finance-kpi-card span,
.finance-detail-card span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.finance-kpi-card strong,
.finance-detail-card strong {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.3;
}

.finance-detail-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.finance-detail-card {
    display: grid;
    gap: 0.35rem;
    min-height: 88px;
    padding: 1rem;
}

.finance-detail-card small {
    color: #64748b;
    font-size: 0.78rem;
}

.finance-invoice-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
}

.finance-invoice-card p {
    margin: 0;
}

.finance-gateway-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) 1.6fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.finance-gateway-panel h2,
.finance-section-head h2 {
    margin: 0 0 0.35rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}

.finance-gateway-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.finance-gateway-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.finance-gateway-item span {
    color: #334155;
    font-weight: 900;
    font-size: 0.85rem;
}

.finance-gateway-item strong {
    color: #0f766e;
    font-size: 0.95rem;
    font-weight: 900;
}

.finance-gateway-item small {
    color: #64748b;
    font-weight: 700;
}

.finance-table-card {
    min-width: 0;
}

.finance-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.portal-grid {
    display: grid;
    gap: 1rem;
}

.portal-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .finance-kpi-grid,
    .finance-kpi-grid--wallet,
    .finance-detail-grid,
    .finance-gateway-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-gateway-panel {
        grid-template-columns: 1fr;
    }

    .portal-grid--two {
        grid-template-columns: 1fr;
    }
}

/* Topbar inside main */
.acad-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.75rem;
    height: 56px;
    min-height: 56px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.acad-topbar__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.acad-topbar__breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.12s;
}

.acad-topbar__breadcrumb a:hover {
    color: #6366f1;
}

.acad-topbar__sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.acad-topbar__current {
    color: #0f172a;
    font-weight: 600;
}

.acad-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Language in topbar */
.acad-topbar .lang-toggle {
    font-size: 0.8rem;
    min-height: 36px;
    padding: 0.3rem 0.45rem 0.3rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

/* Content wrapper inside main */
.acad-content {
    padding: 1.75rem 2rem;
    flex: 1;
}

/* Fallback: direct children of portal__main get padding if no acad-content */
.academy-portal .portal__main>.portal__header,
.academy-portal .portal__main>.stats-grid,
.academy-portal .portal__main>.portal-section,
.academy-portal .portal__main>.card,
.academy-portal .portal__main>form,
.academy-portal .portal__main>.data-table-wrap,
.academy-portal .portal__main>section {
    margin-inline: 2rem;
}

.academy-portal .portal__main>.portal__header {
    padding-top: 1.75rem;
    margin-inline: 2rem;
}

.academy-portal .portal__main>*:last-child {
    margin-bottom: 2rem;
}

/* Page header */
.academy-portal .portal__header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.academy-portal .portal__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.1rem;
    line-height: 1.3;
}

.portal__subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* ── 5. Stats grid ── */

.academy-portal .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.2rem 1.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card__icon {
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
    display: block;
}

.academy-portal .stat-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 0.4rem;
}

.academy-portal .stat-card__value {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin: 0;
}

.stat-card__delta {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.35rem;
    color: #10b981;
}

/* ── 6. Cards ── */

.academy-portal .card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── 7. Section titles ── */

.academy-portal .portal-section {
    margin-bottom: 1.25rem;
}

.academy-portal .portal-section__title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.portal-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.portal-section__head .portal-section__title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ── 8. Data tables ── */

.academy-portal .data-table-wrap {
    padding: 0;
    overflow: hidden;
}

.academy-portal .data-table {
    font-size: 0.875rem;
}

.academy-portal .data-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.academy-portal .data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.academy-portal .data-table tbody tr:last-child td {
    border-bottom: none;
}

.academy-portal .data-table tbody tr:hover td {
    background: #fafafa;
}

.academy-portal .data-table a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.academy-portal .data-table a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ── 9. Status badges ── */

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status--active,
.status--paid {
    background: #dcfce7;
    color: #16a34a;
}

.status--pending {
    background: #fef9c3;
    color: #a16207;
}

.status--expired,
.status--cancelled {
    background: #f1f5f9;
    color: #64748b;
}

.status--unpaid {
    background: #fee2e2;
    color: #dc2626;
}

.status--partial {
    background: #fef3c7;
    color: #d97706;
}

/* ── 10. Filters / forms ── */

.academy-portal .directory__filters {
    margin-bottom: 1.1rem;
    padding: 1rem 1.25rem;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-field__input {
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-field__input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

/* ── 11. Buttons ── */

.academy-portal .btn--primary {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
}

.academy-portal .btn--primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.academy-portal .btn--ghost {
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
    border-radius: 8px;
}

.academy-portal .btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.academy-portal .btn--danger {
    background: #fee2e2;
    border-color: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
}

.academy-portal .btn--danger:hover {
    background: #fecaca;
}

/* ── 12. Quick-links grid (dashboard) ── */

.acad-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.acad-quicklink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.acad-quicklink:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.acad-quicklink__icon {
    font-size: 1.6rem;
}

/* ── 13. Dashboard two-column layout ── */

.acad-dashboard-cols {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .acad-dashboard-cols {
        grid-template-columns: 1fr;
    }
}

/* ── 14. Empty states ── */

.acad-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.acad-empty__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

/* ── 15. Form pages ── */

.acad-form-wrap {
    max-width: 680px;
}

.academy-portal .form-group {
    margin-bottom: 1.1rem;
}

.academy-portal .form-group label,
.academy-portal .form-group__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.academy-portal .form-group input,
.academy-portal .form-group select,
.academy-portal .form-group textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.academy-portal .form-group input[type="checkbox"],
.academy-portal .form-group input[type="radio"] {
    width: auto;
    padding: 0;
    margin-inline-end: 0.4rem;
}

.academy-portal .form-group ul,
.academy-portal .form-group div[id$="_modules"] {
    list-style: none;
    margin: 0;
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.45rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.academy-portal .form-group li,
.academy-portal .form-group div[id$="_modules"]>div {
    min-width: 0;
}

.academy-portal .form-group li label,
.academy-portal .form-group div[id$="_modules"] label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.equipment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.equipment-summary__card {
    display: grid;
    gap: 0.25rem;
}

.equipment-summary__card span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.equipment-summary__card strong {
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 900;
}

.academy-portal .form-group.is-hidden,
.wizard-form .form-group.is-hidden {
    margin: 0;
}

.map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .55rem;
}

.academy-portal .form-group input:focus,
.academy-portal .form-group select:focus,
.academy-portal .form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.academy-portal .form-group__error {
    font-size: 0.78rem;
    color: #dc2626;
    margin: 0.25rem 0 0;
    font-weight: 500;
}

/* ── 16. Scrollbar polish ── */

.academy-portal .portal__main::-webkit-scrollbar,
.academy-portal .academy-sidebar::-webkit-scrollbar {
    width: 4px;
}

.academy-portal .portal__main::-webkit-scrollbar-track,
.academy-portal .academy-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.academy-portal .portal__main::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.academy-portal .academy-sidebar::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

/* ── 17. Messages/alerts inside academy ── */

.academy-portal .messages {
    padding: 0 2rem;
    margin-top: 0;
}

/* ── 18. Responsive ── */

@media (max-width: 900px) {
    .academy-portal .academy-sidebar {
        width: 200px;
        min-width: 200px;
    }

    .acad-content {
        padding: 1.25rem 1.25rem;
    }
}

@media (max-width: 640px) {
    .academy-portal .portal-nav,
    .academy-portal .academy-sidebar {
        /* drawer handled in academy-portal-ui.css */
    }

    .academy-portal .portal__main {
        height: auto;
        overflow: visible;
    }

    .academy-portal .table-wrap,
    .academy-portal .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ================================================================
   Academy portal refresh
   ================================================================ */

.academy-portal {
    background: #edf4f3;
}

.academy-portal .academy-sidebar {
    width: 264px;
    min-width: 264px;
    background: linear-gradient(180deg, #073f37 0%, #102a3b 100%);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 16px 0 44px rgba(8, 61, 55, 0.16);
}

.academy-sidebar__brand {
    margin: 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.academy-sidebar__brand-logo,
.acad-user-avatar {
    background: linear-gradient(135deg, #20c997, #4f8df7);
    box-shadow: 0 0 0 3px rgba(32, 201, 151, 0.16);
    overflow: hidden;
}

.academy-sidebar__brand-name {
    color: #ffffff;
}

.academy-sidebar__brand-sub,
.academy-portal .portal-nav__title,
.acad-nav-section__label {
    color: #83aaa4;
    letter-spacing: 0.04em;
}

.academy-portal .portal-nav__links {
    padding: 0 0.85rem 0.85rem;
}

.academy-portal .portal-nav__link {
    color: #bdd5d2;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
}

.academy-portal .portal-nav__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.academy-portal .portal-nav__link.is-active {
    background: rgba(32, 201, 151, 0.18);
    border-color: rgba(32, 201, 151, 0.22);
    color: #fff;
}

.nav-icon {
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
}

.academy-portal .portal-nav__link.is-active .nav-icon {
    background: rgba(32, 201, 151, 0.24);
}

.academy-sidebar__foot {
    padding: 0.85rem;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.acad-user-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.acad-user-name {
    color: #ffffff;
}

.academy-portal .portal__main {
    background:
        radial-gradient(circle at 15% 0%, rgba(32, 201, 151, 0.12), transparent 28%),
        linear-gradient(180deg, #f7fafc 0%, #edf4f3 100%);
}

.acad-topbar {
    height: 64px;
    min-height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(221, 229, 239, 0.9);
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
    backdrop-filter: blur(16px);
}

.acad-topbar__current {
    color: #101828;
}

.acad-content {
    padding: 2rem 2.25rem;
}

.academy-portal .portal__header {
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(221, 229, 239, 0.88);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(245,250,249,.96));
    box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
}

.academy-portal .portal__title {
    font-size: clamp(1.45rem, 2vw, 2rem);
    color: #101828;
}

.portal__subtitle {
    color: #667085;
}

.academy-portal .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.stat-card {
    border-color: rgba(221, 229, 239, 0.9);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.07);
}

.stat-card::before {
    height: 4px;
    background: linear-gradient(90deg, #20c997, #4f8df7);
    opacity: 1;
}

.stat-card:hover {
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.12);
}

.stat-card__icon {
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #e8f7f1;
    margin-bottom: 0.75rem;
}

.academy-portal .stat-card__label {
    color: #667085;
    letter-spacing: 0.03em;
}

.academy-portal .stat-card__value {
    color: #101828;
}

.academy-portal .card {
    border-color: rgba(221, 229, 239, 0.92);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.07);
}

.academy-portal .portal-section__title {
    color: #101828;
}

.acad-quicklinks {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.acad-quicklink {
    border-color: rgba(221, 229, 239, 0.92);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
    color: #344054;
}

.acad-quicklink:hover {
    border-color: #bde7da;
    box-shadow: 0 16px 36px rgba(15, 143, 114, 0.14);
    color: #096956;
}

.acad-quicklink__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8f7f1, #eaf1ff);
    font-size: 1.25rem;
}

.academy-portal .data-table th {
    background: #f6f8fb;
    color: #475467;
}

.academy-portal .data-table tbody tr:hover td {
    background: #fbfdfc;
}

.academy-portal .data-table a {
    color: #08745d;
}

.filter-field__input,
.academy-portal .form-group input,
.academy-portal .form-group select,
.academy-portal .form-group textarea {
    border-color: #d0d9e6;
    background: #fff;
    border-radius: 10px;
}

.filter-field__input:focus,
.academy-portal .form-group input:focus,
.academy-portal .form-group select:focus,
.academy-portal .form-group textarea:focus {
    border-color: #0f8f72;
    box-shadow: 0 0 0 3px rgba(15, 143, 114, 0.14);
}

.academy-portal .btn--primary {
    background: linear-gradient(135deg, #0f8f72, #2563eb);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(15, 143, 114, 0.2);
}

.academy-portal .btn--primary:hover {
    background: linear-gradient(135deg, #096956, #1d4ed8);
    border-color: transparent;
}

.academy-portal .btn--ghost {
    background: #fff;
    border-color: #d0d9e6;
}

.academy-portal .btn--ghost:hover {
    background: #f4faf8;
    border-color: #bde7da;
    color: #096956;
}

@media (max-width: 900px) {
    .academy-portal .academy-sidebar {
        width: 220px;
        min-width: 220px;
    }
}

@media (max-width: 640px) {
    /* Mobile drawer — see academy-portal-ui.css */
    .academy-portal .portal__main {
        height: auto;
        overflow: visible;
    }

    .academy-portal .table-wrap,
    .academy-portal .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ================================================================
   Academy dashboard v2
   ================================================================ */

.academy-dashboard-v2 {
    display: grid;
    gap: 1.15rem;
    color: #101828;
}

.acad-command-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    min-height: 178px;
    padding: 1.35rem;
    border: 1px solid rgba(208, 217, 230, 0.92);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 10%, rgba(32, 201, 151, .24), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f4fbf8 48%, #eef5ff 100%);
    box-shadow: 0 18px 46px rgba(16, 24, 40, 0.08);
    overflow: hidden;
    position: relative;
}

.acad-command-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -70px;
    inset-block-start: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, rgba(15, 143, 114, .28), rgba(37, 99, 235, .20), rgba(255, 255, 255, 0));
    opacity: .75;
}

.acad-command-hero__copy,
.acad-command-hero__actions {
    position: relative;
    z-index: 1;
}

.acad-command-hero__copy {
    display: grid;
    align-content: center;
    gap: .55rem;
    max-width: 720px;
}

.acad-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .4rem;
    padding: .28rem .62rem;
    border-radius: 999px;
    background: #e8f7f1;
    color: #08745d;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.2;
}

.acad-command-hero h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    font-weight: 900;
    line-height: 1.08;
}

.acad-command-hero p {
    max-width: 56ch;
    margin: 0;
    color: #667085;
    font-size: .98rem;
    line-height: 1.75;
}

.acad-command-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .2rem;
}

.acad-command-hero__meta span {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    padding: .36rem .62rem;
    border: 1px solid #d9e4ef;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #344054;
    font-size: .82rem;
    font-weight: 800;
}

.acad-command-hero__actions {
    display: flex;
    align-items: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
    min-width: 260px;
    justify-content: flex-end;
}

.acad-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.acad-metric {
    min-height: 136px;
    padding: 1rem;
    border: 1px solid rgba(208, 217, 230, .92);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
    display: grid;
    align-content: space-between;
    gap: .75rem;
    position: relative;
    overflow: hidden;
}

.acad-metric::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 4px;
    background: var(--metric-color, #0f8f72);
}

.acad-metric__label {
    color: #667085;
    font-size: .78rem;
    font-weight: 900;
}

.acad-metric strong {
    color: #101828;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.acad-metric small {
    color: #667085;
    font-size: .8rem;
    font-weight: 700;
}

.acad-metric--green { --metric-color: #0f8f72; }
.acad-metric--blue { --metric-color: #2563eb; }
.acad-metric--amber { --metric-color: #c87900; }
.acad-metric--slate { --metric-color: #475467; }

.acad-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, .78fr);
    gap: 1rem;
    align-items: start;
}

.acad-dashboard-layout__main,
.acad-dashboard-layout__side {
    display: grid;
    gap: 1rem;
}

.acad-panel {
    border: 1px solid rgba(208, 217, 230, .92);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
    padding: 1rem;
    overflow: hidden;
}

.acad-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: .95rem;
}

.acad-panel__head h2 {
    margin: .45rem 0 0;
    color: #101828;
    font-size: 1.04rem;
    font-weight: 900;
    line-height: 1.25;
}

.acad-panel__head a {
    color: #08745d;
    font-size: .8rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.acad-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.acad-progress-card {
    display: grid;
    gap: .62rem;
    min-height: 124px;
    padding: .9rem;
    border: 1px solid #e4eaf2;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8fbfc);
}

.acad-progress-card span {
    color: #667085;
    font-size: .78rem;
    font-weight: 900;
}

.acad-progress-card strong {
    color: #101828;
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
}

.acad-progress {
    height: 9px;
    border-radius: 999px;
    background: #e6edf4;
    overflow: hidden;
}

.acad-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f8f72, #2563eb);
}

.acad-session-list,
.acad-invoice-list,
.acad-task-list,
.acad-team-list {
    display: grid;
    gap: .6rem;
}

.acad-session-row,
.acad-invoice-list a,
.acad-task-list a,
.acad-team-list a {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 64px;
    padding: .72rem;
    border: 1px solid #e4eaf2;
    border-radius: 13px;
    background: #fff;
    color: #344054;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.acad-session-row:hover,
.acad-invoice-list a:hover,
.acad-task-list a:hover,
.acad-team-list a:hover {
    transform: translateY(-1px);
    border-color: #bde7da;
    box-shadow: 0 10px 22px rgba(15, 143, 114, .10);
}

.acad-session-row__time {
    display: inline-flex;
    width: 56px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #e8f7f1;
    color: #08745d;
    font-size: .9rem;
    font-weight: 900;
    flex: 0 0 auto;
}

.acad-session-row__body,
.acad-invoice-list a span,
.acad-team-list a span {
    display: grid;
    gap: .15rem;
    min-width: 0;
    flex: 1;
}

.acad-session-row__body strong,
.acad-invoice-list strong,
.acad-team-list strong {
    color: #101828;
    font-size: .9rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acad-session-row__body small,
.acad-invoice-list small,
.acad-team-list small {
    color: #667085;
    font-size: .78rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acad-session-row__attendance,
.acad-invoice-list b,
.acad-team-list b {
    color: #08745d;
    font-size: .85rem;
    font-weight: 900;
    flex: 0 0 auto;
}

.acad-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.acad-module-grid a {
    display: grid;
    gap: .5rem;
    min-height: 96px;
    align-content: center;
    justify-items: center;
    padding: .8rem .55rem;
    border: 1px solid #e4eaf2;
    border-radius: 14px;
    background: #fff;
    color: #344054;
    font-size: .82rem;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.acad-module-grid a:hover {
    transform: translateY(-1px);
    border-color: #bde7da;
    box-shadow: 0 10px 22px rgba(15, 143, 114, .10);
}

.acad-module-grid span {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8f7f1, #eaf1ff);
}

.acad-money-card {
    display: grid;
    gap: .35rem;
    margin-bottom: .75rem;
    padding: 1rem;
    border-radius: 15px;
    background: linear-gradient(135deg, #073f37, #102a3b);
    color: #fff;
}

.acad-money-card span {
    color: rgba(255, 255, 255, .76);
    font-size: .78rem;
    font-weight: 800;
}

.acad-money-card strong {
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.1;
}

.acad-money-card small {
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
    font-weight: 700;
}

.acad-task-list a {
    min-height: 52px;
}

.acad-task-list__dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #98a2b3;
    box-shadow: 0 0 0 5px rgba(152, 162, 179, .12);
    flex: 0 0 auto;
}

.acad-task-list__dot.is-amber {
    background: #c87900;
    box-shadow: 0 0 0 5px rgba(200, 121, 0, .12);
}

.acad-task-list__dot.is-blue {
    background: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, .12);
}

.acad-task-list__dot.is-green {
    background: #0f8f72;
    box-shadow: 0 0 0 5px rgba(15, 143, 114, .12);
}

.acad-task-list a span:last-child {
    color: #344054;
    font-size: .84rem;
    font-weight: 900;
    line-height: 1.45;
}

.acad-empty-state {
    display: grid;
    gap: .2rem;
    min-height: 96px;
    align-content: center;
    justify-items: center;
    padding: 1rem;
    border: 1px dashed #cfd8e3;
    border-radius: 14px;
    background: #f8fbfc;
    text-align: center;
}

.acad-empty-state strong {
    color: #344054;
    font-size: .88rem;
}

.acad-empty-state span {
    color: #667085;
    font-size: .8rem;
}

.acad-empty-state--compact {
    min-height: 64px;
}

@media (max-width: 1180px) {
    .acad-metrics-row,
    .acad-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .acad-dashboard-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .acad-command-hero,
    .acad-panel__head {
        flex-direction: column;
    }

    .acad-command-hero__actions {
        min-width: 0;
        width: 100%;
        justify-content: stretch;
    }

    .acad-command-hero__actions .btn {
        flex: 1;
    }

    .acad-metrics-row,
    .acad-performance-grid,
    .acad-module-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Internal dashboard refinement
   ================================================================ */

body:has(.academy-portal) .site-main {
    padding-block: 0;
    background: #f4f6f8;
}

.academy-portal {
    min-height: calc(100dvh - 64px);
    background: #f4f6f8;
    color: #182230;
    font-size: 14px;
    line-height: 1.5;
}

.academy-portal .container.portal__layout {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 64px);
    margin: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.academy-portal .academy-sidebar {
    position: sticky;
    top: 64px;
    width: 244px;
    min-width: 244px;
    height: calc(100dvh - 64px);
    padding: .65rem .55rem;
    overflow-y: auto;
    background: #ffffff;
    border: 0;
    border-inline-start: 1px solid #e4e7ec;
    box-shadow: -10px 0 30px rgba(16, 24, 40, .04);
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 112, 133, .22) transparent;
}

.academy-portal .academy-sidebar::-webkit-scrollbar,
.academy-portal .portal__main::-webkit-scrollbar,
.academy-help-modal__card::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.academy-portal .academy-sidebar::-webkit-scrollbar-track,
.academy-portal .portal__main::-webkit-scrollbar-track,
.academy-help-modal__card::-webkit-scrollbar-track {
    background: transparent;
}

.academy-portal .academy-sidebar::-webkit-scrollbar-thumb,
.academy-portal .portal__main::-webkit-scrollbar-thumb,
.academy-help-modal__card::-webkit-scrollbar-thumb {
    background: rgba(102, 112, 133, .22);
    border-radius: 999px;
}

.academy-sidebar__brand {
    min-height: 54px;
    margin: .15rem .1rem .75rem;
    padding: .55rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fafc;
}

.academy-sidebar__brand-logo,
.acad-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #0f8f72;
    box-shadow: none;
}

.academy-sidebar__brand-name,
.acad-user-name {
    color: #182230;
    font-size: .88rem;
    font-weight: 800;
}

.academy-sidebar__brand-sub,
.academy-portal .portal-nav__title,
.acad-nav-section__label {
    color: #667085;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.academy-portal .portal-nav__links {
    display: grid;
    gap: .18rem;
    padding: 0 .1rem .65rem;
}

.academy-portal .portal-nav__link {
    min-height: 34px;
    padding: .34rem .42rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #344054;
    font-size: .8rem;
    font-weight: 700;
}

.academy-portal .portal-nav__link:hover {
    background: #f2f7f6;
    color: #0b6958;
}

.academy-portal .portal-nav__link.is-active {
    background: #e7f6f1;
    border-color: #bfe7dc;
    color: #096956;
    box-shadow: none;
}

.nav-icon {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 6px;
    background: #f2f4f7;
    font-size: .8rem;
}

.academy-portal .portal-nav__link.is-active .nav-icon {
    background: #ccefe3;
}

.academy-sidebar__foot {
    margin-top: .4rem;
    padding: .55rem .1rem .1rem;
    border-top: 1px solid #eef0f3;
}

.acad-user-card {
    padding: .55rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fafc;
}

.academy-portal .portal__main {
    min-width: 0;
    flex: 1;
    overflow-x: hidden;
    background: #f4f6f8;
}

.acad-topbar {
    height: 50px;
    min-height: 50px;
    padding: 0 1rem;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e4e7ec;
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.acad-topbar__breadcrumb {
    font-size: .78rem;
    gap: .32rem;
}

.acad-topbar__actions {
    gap: .4rem;
}

.acad-content {
    padding: 1rem;
}

.academy-portal .portal__main>.portal__header,
.academy-portal .portal__main>.stats-grid,
.academy-portal .portal__main>.portal-section,
.academy-portal .portal__main>.card,
.academy-portal .portal__main>form,
.academy-portal .portal__main>.data-table-wrap,
.academy-portal .portal__main>section,
.academy-portal .portal__main>.breadcrumbs,
.academy-portal .portal__main>.pagination {
    margin-inline: 1rem;
}

.academy-portal .portal__main>.portal__header {
    margin-top: 1rem;
    padding: .85rem 1rem;
}

.academy-portal .portal__header {
    margin-bottom: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.academy-portal .portal__title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
}

.portal__subtitle,
.academy-portal .text-muted {
    color: #667085;
    font-size: .82rem;
}

.academy-portal .card,
.acad-panel,
.stat-card,
.acad-metric,
.acad-progress-card,
.acad-module-grid a,
.acad-session-row,
.acad-invoice-list a,
.acad-task-list a,
.acad-team-list a,
.finance-kpi-card,
.finance-detail-card,
.finance-gateway-panel,
.finance-gateway-item,
.equipment-summary__card {
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.academy-portal .card,
.acad-panel {
    padding: .85rem;
    border-color: #e4e7ec;
}

.acad-command-hero {
    min-height: 142px;
    padding: 1rem;
    border-color: #d9e4ef;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f6fbfa 58%, #f3f6fb 100%);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.acad-command-hero::after {
    display: none;
}

.acad-kicker {
    padding: .22rem .5rem;
    border-radius: 8px;
    font-size: .66rem;
    letter-spacing: 0;
}

.acad-command-hero h1 {
    font-size: 1.45rem;
    line-height: 1.15;
}

.acad-command-hero p {
    max-width: 66ch;
    font-size: .84rem;
    line-height: 1.65;
}

.acad-command-hero__meta span {
    min-height: 1.75rem;
    padding: .25rem .5rem;
    border-radius: 8px;
    font-size: .72rem;
}

.acad-command-hero__actions {
    min-width: 220px;
}

.acad-metrics-row,
.acad-dashboard-layout,
.acad-dashboard-layout__main,
.acad-dashboard-layout__side,
.acad-performance-grid,
.portal-grid,
.finance-kpi-grid,
.finance-detail-grid,
.equipment-summary {
    gap: .75rem;
}

.acad-metric {
    min-height: 104px;
    padding: .8rem;
}

.acad-metric::before,
.stat-card::before {
    height: 3px;
}

.acad-metric__label,
.acad-progress-card span,
.acad-money-card span,
.equipment-summary__card span {
    font-size: .7rem;
    letter-spacing: 0;
}

.acad-metric strong {
    font-size: 1.45rem;
}

.acad-metric small,
.acad-money-card small {
    font-size: .72rem;
}

.acad-dashboard-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
}

.acad-panel__head {
    margin-bottom: .7rem;
}

.acad-panel__head h2,
.academy-portal .portal-section__title,
.finance-section-head h2 {
    font-size: .94rem;
    font-weight: 800;
}

.acad-panel__head a,
.finance-section-head a {
    font-size: .74rem;
}

.acad-progress-card {
    min-height: 98px;
    padding: .72rem;
}

.acad-progress-card strong {
    font-size: 1.35rem;
}

.acad-session-row,
.acad-invoice-list a,
.acad-task-list a,
.acad-team-list a {
    min-height: 52px;
    padding: .55rem;
    gap: .55rem;
}

.acad-session-row__time {
    width: 48px;
    min-height: 36px;
    border-radius: 8px;
    font-size: .78rem;
}

.acad-session-row__body strong,
.acad-invoice-list strong,
.acad-team-list strong {
    font-size: .8rem;
}

.acad-session-row__body small,
.acad-invoice-list small,
.acad-team-list small {
    font-size: .7rem;
}

.acad-module-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: .55rem;
}

.acad-module-grid a {
    min-height: 78px;
    padding: .62rem .4rem;
    font-size: .74rem;
}

.acad-module-grid span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.acad-money-card {
    padding: .85rem;
    border-radius: 8px;
    background: #102a3b;
}

.acad-money-card strong,
.finance-kpi-card strong,
.finance-detail-card strong,
.equipment-summary__card strong {
    font-size: 1.25rem;
}

.academy-portal .stats-grid {
    gap: .75rem;
}

.stat-card {
    min-height: 108px;
    padding: .85rem;
}

.stat-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    margin-bottom: .45rem;
}

.academy-portal .stat-card__label {
    font-size: .68rem;
    letter-spacing: 0;
}

.academy-portal .stat-card__value {
    font-size: 1.45rem;
}

.academy-portal .directory__filters {
    padding: .85rem;
}

.filter-grid {
    gap: .6rem;
}

.filter-field__label,
.academy-portal .form-group label,
.academy-portal .form-group__label {
    font-size: .74rem;
}

.filter-field__input,
.academy-portal .form-group input,
.academy-portal .form-group select,
.academy-portal .form-group textarea {
    min-height: 36px;
    padding: .42rem .6rem;
    border-radius: 8px;
    font-size: .8rem;
}

.academy-portal .btn,
.academy-screen-help {
    min-height: 34px;
    padding: .45rem .7rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 800;
}

.academy-portal .data-table-wrap {
    padding: 0;
    overflow: auto;
}

.academy-portal .data-table {
    min-width: 760px;
    font-size: .78rem;
}

.academy-portal .data-table th {
    padding: .55rem .65rem;
    font-size: .68rem;
    letter-spacing: 0;
}

.academy-portal .data-table td {
    padding: .58rem .65rem;
}

.status {
    min-height: 1.45rem;
    padding: .18rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.academy-help-modal__card {
    border-radius: 8px;
}

.academy-help-modal h2 {
    font-size: 1.28rem;
}

.academy-help-modal__intro {
    font-size: .86rem;
}

.academy-help-modal__list li {
    font-size: .8rem;
}

@media (max-width: 1180px) {
    .academy-portal .academy-sidebar {
        width: 224px;
        min-width: 224px;
    }

    .acad-dashboard-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body:has(.academy-portal) .site-main {
        padding-block: 0;
    }

    .academy-portal .container.portal__layout {
        display: block;
    }

    /* Sidebar drawer — academy-portal-ui.css */

    .acad-content {
        padding: .75rem;
    }

    .academy-portal .portal__main>.portal__header,
    .academy-portal .portal__main>.stats-grid,
    .academy-portal .portal__main>.portal-section,
    .academy-portal .portal__main>.card,
    .academy-portal .portal__main>form,
    .academy-portal .portal__main>.data-table-wrap,
    .academy-portal .portal__main>section,
    .academy-portal .portal__main>.breadcrumbs,
    .academy-portal .portal__main>.pagination {
        margin-inline: .75rem;
    }

    .acad-topbar,
    .academy-portal .portal__header,
    .acad-command-hero {
        align-items: stretch;
    }

    .acad-topbar {
        height: auto;
        min-height: 50px;
        flex-wrap: wrap;
        padding: .55rem .75rem;
    }

    .acad-topbar__actions,
    .portal__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .acad-topbar__actions .btn,
    .portal__actions .btn,
    .portal__actions form {
        flex: 1 1 auto;
    }

    .acad-command-hero__actions {
        width: 100%;
        min-width: 0;
    }

    .acad-metrics-row,
    .acad-performance-grid,
    .finance-kpi-grid,
    .finance-detail-grid,
    .equipment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .acad-command-hero h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 520px) {
    .acad-metrics-row,
    .acad-performance-grid,
    .finance-kpi-grid,
    .finance-detail-grid,
    .equipment-summary {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Academy screen guide
   ================================================================ */

.academy-screen-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.45rem;
    padding: .55rem .85rem;
    border: 1px solid #bde7da;
    border-radius: 10px;
    background: #e8f7f1;
    color: #08745d;
    font: inherit;
    font-size: .84rem;
    font-weight: 900;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 143, 114, .10);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.academy-screen-help::before {
    content: "?";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #0f8f72;
    color: #fff;
    font-size: .8rem;
    font-weight: 900;
}

.academy-screen-help:hover {
    transform: translateY(-1px);
    border-color: #0f8f72;
    box-shadow: 0 12px 26px rgba(15, 143, 114, .16);
}

.academy-screen-help:focus-visible,
.academy-help-modal__close:focus-visible {
    outline: 3px solid rgba(15, 143, 114, .24);
    outline-offset: 2px;
}

.academy-screen-help--floating {
    margin: 1rem 2rem 0;
    width: fit-content;
    align-self: flex-start;
}

.academy-help-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.academy-help-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.academy-help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(8px);
}

.academy-help-modal__card {
    position: relative;
    width: min(720px, 100%);
    max-height: min(760px, calc(100dvh - 2rem));
    overflow: auto;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 18px;
    background:
        radial-gradient(circle at 14% 0%, rgba(32, 201, 151, .18), transparent 30%),
        #ffffff;
    box-shadow: 0 28px 80px rgba(16, 24, 40, .24);
}

.academy-help-modal__close {
    position: absolute;
    inset-block-start: .9rem;
    inset-inline-end: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid #d9e4ef;
    border-radius: 10px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.academy-help-modal__eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: .7rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: #e8f7f1;
    color: #08745d;
    font-size: .76rem;
    font-weight: 900;
}

.academy-help-modal h2 {
    margin: 0;
    padding-inline-end: 2.25rem;
    color: #101828;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.2;
}

.academy-help-modal__intro {
    margin: .65rem 0 1rem;
    color: #667085;
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.75;
}

.academy-help-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.academy-help-modal__grid > div {
    padding: 1rem;
    border: 1px solid #e4eaf2;
    border-radius: 14px;
    background: #f8fbfc;
}

.academy-help-modal h3 {
    margin: 0 0 .75rem;
    color: #101828;
    font-size: .95rem;
    font-weight: 900;
}

.academy-help-modal__list {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.academy-help-modal__list li {
    position: relative;
    padding-inline-start: 1.25rem;
    color: #344054;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.65;
}

.academy-help-modal__list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: .65em;
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: #0f8f72;
}

@media (max-width: 760px) {
    .finance-kpi-grid,
    .finance-kpi-grid--wallet,
    .finance-detail-grid,
    .finance-gateway-grid,
    .finance-invoice-card {
        grid-template-columns: 1fr;
    }

    .finance-gateway-panel {
        grid-template-columns: 1fr;
    }

    .equipment-summary {
        grid-template-columns: 1fr;
    }

    .academy-screen-help {
        width: 100%;
        white-space: normal;
    }

    .academy-screen-help--floating {
        margin: .75rem 1rem 0;
        width: calc(100% - 2rem);
    }

    .academy-help-modal__grid {
        grid-template-columns: 1fr;
    }

    .academy-help-modal__card {
        padding: 1rem;
        border-radius: 16px;
    }
}
