/* ── ANZ-inspired Design System ─────────────────────────────────────────────── */
:root {
    --anz-blue: #007DBC;
    --anz-blue-dark: #005A8E;
    --anz-blue-light: #E8F4FB;
    --anz-navy: #003057;
    --anz-teal: #00A3C7;
    --anz-white: #FFFFFF;
    --anz-bg: #F5F7FA;
    --anz-border: #D8E0E8;
    --anz-text: #1A1A2E;
    --anz-text-muted: #6B7889;
    --anz-success: #2E7D32;
    --anz-success-bg: #E8F5E9;
    --anz-warning: #F57C00;
    --anz-warning-bg: #FFF3E0;
    --anz-danger: #C62828;
    --anz-danger-bg: #FFEBEE;
    --anz-sidebar-width: 252px;
    --anz-header-height: 64px;
    --anz-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --anz-shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --anz-radius: 6px;
    --anz-radius-lg: 10px;
    --anz-transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 14px;
    color: var(--anz-text);
    background: var(--anz-bg);
    line-height: 1.5;
}

/* ── App Shell ────────────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--anz-sidebar-width);
    background: var(--anz-navy);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: var(--anz-transition);
}

.sidebar-logo {
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: flex-start;
    text-decoration: none;
}

.sidebar-brand {
    display: flex;
    justify-content: center;
    width: 100%;
}

.sidebar-brand-mark {
    width: 144px;
    height: auto;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0 10px;
    overflow-x: hidden;
}

.nav-group {
    margin-bottom: 6px;
}

.nav-group-toggle {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    color: rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: none;
    cursor: pointer;
    line-height: 1.2;
    transition: var(--anz-transition);
}

.nav-group-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.15);
    transform: translateX(3px);
}

.nav-group-toggle.open {
    color: #fff;
    background: rgba(0,125,188,0.24);
    border-color: rgba(0,163,199,0.45);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.nav-chevron {
    font-size: 10px;
    opacity: 0.8;
    line-height: 1;
    transform: rotate(-90deg);
    transition: transform 0.15s ease;
}

.nav-group-toggle.open .nav-chevron {
    transform: rotate(0deg);
}

.nav-group-items {
    display: grid;
    gap: 2px;
    margin: 4px 0 0;
    padding-left: 6px;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.sidebar-section-title {
    padding: 14px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(132, 185, 221, 0.8);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    color: rgba(229,241,252,0.95);
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    will-change: transform;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: rgba(255,255,255,0.08);
    color: white;
    border-left-color: rgba(255,255,255,0.4);
    transform: translateX(7px);
}

.sidebar-link:active {
    transform: translateX(4px);
}

.sidebar-link.active {
    background: #075786;
    color: white;
    font-weight: 600;
    border-left-color: #58c3ff;
}

.sidebar-link svg, .sidebar-link .nav-icon {
    opacity: 0.95;
    flex-shrink: 0;
}

.sidebar-link:hover svg, .sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    background: var(--anz-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info .name { color: white; font-size: 12px; font-weight: 600; }
.sidebar-user-info .role { color: rgba(255,255,255,0.45); font-size: 10px; }

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ── Top Bar ──────────────────────────────────────────────────────────────── */
.topbar {
    height: var(--anz-header-height);
    background: white;
    border-bottom: 1px solid var(--anz-border);
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 16px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--anz-navy);
    flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Page Content ─────────────────────────────────────────────────────────── */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

/* Dashboard */
.dashboard-loading {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-page {
    display: grid;
    gap: 18px;
}

.dashboard-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 18px;
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(0, 163, 199, 0.26), transparent 30%),
        linear-gradient(135deg, #062f55 0%, #0b5f91 48%, #00a4c7 100%);
    color: #fff;
    box-shadow: 0 20px 40px rgba(0, 48, 87, 0.16);
}

.dashboard-eyebrow,
.dashboard-card-kicker,
.dashboard-highlight-label,
.dashboard-kpi-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.dashboard-hero-copy h1 {
    margin: 8px 0 10px;
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.05;
}

.dashboard-hero-copy p {
    max-width: 62ch;
    color: rgba(255,255,255,0.88);
    font-size: 15px;
}

.dashboard-mode-toggle {
    display: inline-flex;
    gap: 8px;
    margin-top: 16px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
}

.dashboard-mode-btn {
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.8);
    padding: 9px 14px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--anz-transition);
}

.dashboard-mode-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.dashboard-mode-btn.active {
    color: var(--anz-navy);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.dashboard-hero-highlights {
    display: grid;
    gap: 12px;
}

.dashboard-highlight-card {
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
}

.dashboard-highlight-card strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    color: #fff;
}

.dashboard-highlight-card-live {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.24);
}

.dashboard-live-count-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffcf5c;
    color: #132d4f;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.dashboard-kpi-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #e2ebf4;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 12px 28px rgba(0, 48, 87, 0.06);
}

.dashboard-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-kpi-icon,
.dashboard-action-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-kpi-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--anz-navy);
}

.dashboard-kpi-foot {
    margin-top: 8px;
    color: var(--anz-text-muted);
    font-size: 12px;
}

.dashboard-main-grid,
.dashboard-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.dashboard-main-grid-ops {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
}

.dashboard-surface {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 48, 87, 0.06);
}

.dashboard-surface-wide {
    min-height: 360px;
}

.dashboard-surface-header {
    align-items: flex-start;
}

.dashboard-surface-meta {
    color: var(--anz-text-muted);
    font-size: 12px;
}

.dashboard-chart-shell {
    position: relative;
    min-height: 300px;
}

.dashboard-chart-shell-compact {
    min-height: 280px;
}

.dashboard-side-stack {
    display: grid;
    gap: 18px;
}

.dashboard-live-list {
    display: grid;
    gap: 12px;
}

.dashboard-live-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.dashboard-live-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-live-item strong {
    display: block;
    color: var(--anz-navy);
    font-size: 14px;
}

.dashboard-live-item small {
    display: block;
    margin-top: 4px;
    color: var(--anz-text-muted);
}

.dashboard-live-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: #007dbc;
}

.dashboard-live-dot.success {
    background: #2e7d32;
}

.dashboard-live-dot.warning {
    background: #f57c00;
}

.dashboard-live-dot.error {
    background: #c62828;
}

.dashboard-list {
    display: grid;
    gap: 12px;
}

.dashboard-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.dashboard-list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-list-row span {
    color: var(--anz-text-muted);
}

.dashboard-list-row strong {
    color: var(--anz-navy);
}

.dashboard-actions-grid {
    display: grid;
    gap: 10px;
}

.dashboard-action-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2ebf4;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-action-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 48, 87, 0.08);
    border-color: #c9dceb;
}

.dashboard-action-link strong {
    color: var(--anz-navy);
}

.dashboard-action-link small {
    display: block;
    margin-top: 2px;
    color: var(--anz-text-muted);
}

.dashboard-empty {
    text-align: center;
    padding: 24px;
    color: var(--anz-text-muted);
}

.blue { background: linear-gradient(135deg, #1187c8 0%, #005b8f 100%); }
.green { background: linear-gradient(135deg, #49b96b 0%, #2e7d32 100%); }
.orange { background: linear-gradient(135deg, #ffb347 0%, #f57c00 100%); }
.teal { background: linear-gradient(135deg, #37c7cb 0%, #008b9e 100%); }
.navy { background: linear-gradient(135deg, #285a96 0%, #132d4f 100%); }
.rose { background: linear-gradient(135deg, #f48fb1 0%, #cc436f 100%); }

@media (max-width: 1100px) {
    .dashboard-hero-panel,
    .dashboard-main-grid,
    .dashboard-lower-grid,
    .dashboard-main-grid-ops {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-hero-panel {
        padding: 20px;
    }

    .dashboard-chart-shell,
    .dashboard-chart-shell-compact {
        min-height: 240px;
    }
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--anz-radius-lg);
    border: 1px solid var(--anz-border);
    box-shadow: var(--anz-shadow);
    overflow: hidden;
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--anz-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--anz-navy);
}

.card-body { padding: 14px; }
.card-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--anz-border);
    background: var(--anz-bg);
}

/* ── Stat Cards ───────────────────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--anz-radius-lg);
    border: 1px solid var(--anz-border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--anz-shadow);
    transition: var(--anz-transition);
}

.stat-card:hover { box-shadow: var(--anz-shadow-md); transform: translateY(-1px); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.stat-icon.blue { background: var(--anz-blue-light); color: var(--anz-blue); }
.stat-icon.green { background: var(--anz-success-bg); color: var(--anz-success); }
.stat-icon.orange { background: var(--anz-warning-bg); color: var(--anz-warning); }
.stat-icon.red { background: var(--anz-danger-bg); color: var(--anz-danger); }

.stat-value { font-size: 24px; font-weight: 700; color: var(--anz-navy); line-height: 1; }
.stat-label { font-size: 12px; color: var(--anz-text-muted); margin-top: 3px; }
.stat-change { font-size: 11px; margin-top: 4px; }
.stat-change.up { color: var(--anz-success); }
.stat-change.down { color: var(--anz-danger); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-primary { background: var(--anz-blue); color: white; border-color: var(--anz-blue); }
.btn-primary:hover:not(:disabled) { background: var(--anz-blue-dark); border-color: var(--anz-blue-dark); }

.btn-secondary { background: white; color: var(--anz-blue); border-color: var(--anz-blue); }
.btn-secondary:hover:not(:disabled) { background: var(--anz-blue-light); }

.btn-danger { background: var(--anz-danger); color: white; border-color: var(--anz-danger); }
.btn-danger:hover:not(:disabled) { background: #B71C1C; }

.btn-ghost { background: transparent; color: var(--anz-text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--anz-bg); color: var(--anz-text); }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* Keep core CRUD actions visually consistent everywhere */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success-round,
.btn-action-edit,
.btn-action-delete,
.btn-modal-save,
.btn-modal-cancel {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
}

.btn-sm.btn-primary,
.btn-sm.btn-secondary,
.btn-sm.btn-danger,
.btn-sm.btn-success-round,
.btn-sm.btn-action-edit,
.btn-sm.btn-action-delete,
.btn-sm.btn-modal-save,
.btn-sm.btn-modal-cancel {
    padding: 5px 12px;
    font-size: 12.5px;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--anz-navy);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 7px 11px;
    border: 1.5px solid var(--anz-border);
    border-radius: var(--anz-radius);
    font-size: 13.5px;
    color: var(--anz-text);
    background: white;
    transition: var(--anz-transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--anz-blue);
    box-shadow: 0 0 0 3px rgba(0, 125, 188, 0.12);
}

.form-control::placeholder { color: #AABBC8; }
.form-control:disabled { background: var(--anz-bg); color: var(--anz-text-muted); }
.form-control.is-invalid { border-color: var(--anz-danger); }

.form-hint { font-size: 11.5px; color: var(--anz-text-muted); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--anz-danger); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #d7e6f2;
    border-radius: 14px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead tr {
    background: #eef4f9;
}

.data-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0c4f78;
    white-space: nowrap;
    border-bottom: 1px solid #d8e7f3;
}

.data-table th.sortable-global,
.students-table th.sortable-global {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th.sortable-global:hover,
.students-table th.sortable-global:hover {
    background: #e4edf6;
}

.data-table th.sortable-global::after,
.students-table th.sortable-global::after {
    content: " ↕";
    color: #8fa8bc;
    font-size: 11px;
}

.data-table th.sortable-global.sorted-asc::after,
.students-table th.sortable-global.sorted-asc::after {
    content: " ↑";
    color: #0c4f78;
}

.data-table th.sortable-global.sorted-desc::after,
.students-table th.sortable-global.sorted-desc::after {
    content: " ↓";
    color: #0c4f78;
}

.data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e4eef6;
    color: #1d3f58;
    vertical-align: middle;
}

.data-table tbody tr:hover { background: #f6fbff; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Students page */
.students-page {
    background: linear-gradient(180deg, #eff6fb 0%, #f4f8fc 100%);
    border: 1px solid #d7e6f2;
    border-radius: 14px;
    padding: 18px;
}

.students-title {
    color: #0b486f;
    font-size: 44px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.students-subtitle {
    color: #5a7488;
    font-size: 13px;
    margin-bottom: 14px;
}

.students-toolbar {
    margin-bottom: 12px;
}

.students-table-wrap {
    background: #fff;
    border: 1px solid #d7e6f2;
    border-radius: 14px;
    overflow: hidden;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table thead tr {
    background: #eef4f9;
}

.students-table th {
    padding: 6px 10px;
    color: #0c4f78;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-align: left;
    border-bottom: 1px solid #d8e7f3;
}

.students-table td {
    padding: 6px 10px;
    color: #1d3f58;
    border-bottom: 1px solid #e4eef6;
}

.students-table tbody tr:hover {
    background: #f6fbff;
}

.header-sort {
    color: #8fa8bc;
    font-size: 11px;
    margin-left: 6px;
}

.student-actions-cell {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.btn-success-round {
    background: #1ea85f;
    border: 1px solid #1ea85f;
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 700;
}

.btn-success-round:hover {
    background: #188d50;
    border-color: #188d50;
    transform: translateY(-2px);
}

.btn-action-edit,
.btn-action-delete {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.btn-action-edit {
    background: #1d84d7;
    border: 1px solid #1d84d7;
}

.btn-action-edit:hover {
    background: #156ab0;
    border-color: #156ab0;
    transform: translateY(-2px);
}

.btn-action-delete {
    background: #c83549;
    border: 1px solid #c83549;
}

.btn-action-delete:hover {
    background: #a92b3c;
    border-color: #a92b3c;
    transform: translateY(-2px);
}

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

.status-pill.active {
    color: #14683a;
    background: #e4f6ec;
}

.status-pill.inactive {
    color: #7a2e2e;
    background: #fdeced;
}

.students-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f7fbff;
    border-top: 1px solid #dce9f4;
}

.rows-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5d7689;
    font-size: 14px;
}

.rows-select {
    border: 1px solid #b9d0e3;
    border-radius: 20px;
    padding: 6px 28px 6px 12px;
    background: #fff;
    color: #214a67;
}

.pager-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-info {
    color: #5d7689;
    font-size: 14px;
}

.page-pill {
    border: 1px solid #bfd3e3;
    background: #f0f6fb;
    color: #7f95a6;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.page-pill.next {
    color: #0d466d;
    background: #e4f0f9;
    border-color: #a9c2d7;
}

.page-pill:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}

/* ── Badges / Status ──────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-blue { background: var(--anz-blue-light); color: var(--anz-blue); }
.badge-green { background: var(--anz-success-bg); color: var(--anz-success); }
.badge-orange { background: var(--anz-warning-bg); color: var(--anz-warning); }
.badge-red { background: var(--anz-danger-bg); color: var(--anz-danger); }
.badge-gray { background: #EEF0F3; color: var(--anz-text-muted); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--anz-radius);
    font-size: 13.5px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-success { background: var(--anz-success-bg); color: var(--anz-success); border-left: 4px solid var(--anz-success); }
.alert-warning { background: var(--anz-warning-bg); color: var(--anz-warning); border-left: 4px solid var(--anz-warning); }
.alert-danger { background: var(--anz-danger-bg); color: var(--anz-danger); border-left: 4px solid var(--anz-danger); }
.alert-info { background: var(--anz-blue-light); color: var(--anz-blue-dark); border-left: 4px solid var(--anz-blue); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.modal {
    background: white;
    border-radius: var(--anz-radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }
.enrollment-modal { max-width: min(1280px, calc(100vw - 48px)); }

.enrollment-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: start;
}

.enrollment-form-main,
.enrollment-form-side {
    min-width: 0;
}

.enrollment-side-card {
    position: sticky;
    top: 0;
    margin-top: 0;
    border: 1px solid #c8dcf0;
    background: linear-gradient(180deg, #f5faff 0%, #eef5fb 100%);
    box-shadow: 0 16px 30px rgba(13, 70, 109, 0.08);
}

.enrollment-side-card-body {
    padding: 16px 18px;
}

.enrollment-side-card .card-header {
    background: linear-gradient(180deg, #e5f1fb 0%, #dbeaf7 100%);
    border-bottom: 1px solid #c8dcf0;
}

.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--anz-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--anz-navy); }
.modal-body { padding: 16px 18px; }
.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--anz-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--anz-bg);
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 6px 14px;
    border: 1px solid #bfd3e3;
    border-radius: 999px;
    background: #f0f6fb;
    color: #7f95a6;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.14s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.page-btn:hover { border-color: #a9c2d7; color: #0d466d; background: #e4f0f9; }
.page-btn:hover:not(:disabled) { transform: translateY(-1px); }
.page-btn.active { background: #0d466d; color: #fff; border-color: #0d466d; }
.page-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Login Page ───────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(85, 163, 244, 0.18), transparent 26%),
        linear-gradient(180deg, #eef2f6 0%, #dfe6ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-shell {
    width: 100%;
    max-width: 1440px;
    min-height: min(860px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    border-radius: 40px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(44, 68, 94, 0.18);
}

.login-showcase {
    position: relative;
    padding: 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #edf6ff;
    background:
        radial-gradient(circle at top left, rgba(130, 197, 255, 0.24), transparent 28%),
        linear-gradient(165deg, #3b91de 0%, #2a72b9 46%, #1d4f86 100%);
}

.login-showcase::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%),
        linear-gradient(0deg, rgba(9, 31, 58, 0.12), transparent 40%);
    pointer-events: none;
}

.login-brand,
.login-showcase-copy,
.login-pills {
    position: relative;
    z-index: 1;
}

.login-brand {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
}

.login-brand-mark {
    width: 220px;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(10, 36, 30, 0.16));
}

.login-showcase-copy {
    max-width: 620px;
    margin: auto 0;
}

.login-showcase-copy h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(3rem, 4.2vw, 4.3rem);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.06em;
}

.login-showcase-copy p {
    margin: 28px 0 0;
    max-width: 500px;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.55;
    color: rgba(238, 246, 255, 0.92);
}

.login-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.login-pills span {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(245, 250, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-panel {
    background: #fbfcfe;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 48px;
}

.login-panel-inner {
    width: 100%;
    max-width: 500px;
}

.login-heading {
    margin-bottom: 28px;
}

.login-heading h2 {
    margin: 0;
    color: #12284c;
    font-size: clamp(2.4rem, 2.6vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.login-heading p {
    margin: 18px 0 0;
    color: #627795;
    font-size: 1rem;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-form-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.login-link {
    font-size: 0.9rem;
    color: var(--anz-blue);
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-input {
    min-height: 62px;
    border-radius: 18px;
    border-color: #d4dfeb;
    background: #ffffff;
    font-size: 1rem;
    padding: 0 18px;
}

.login-input:focus {
    border-color: #77b5ff;
    box-shadow: 0 0 0 4px rgba(36, 129, 255, 0.12);
}

.login-submit {
    min-height: 62px;
    margin-top: 8px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f6fd5 0%, #2ec7e7 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    box-shadow: 0 18px 32px rgba(19, 123, 214, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(19, 123, 214, 0.24);
}

.login-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.login-mfa {
    display: grid;
    gap: 18px;
}

.login-mfa-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(135deg, #e6f4ff 0%, #d8eeff 100%);
    color: #136ecf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
}

.login-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 0.76rem;
    color: var(--anz-text-muted);
}

/* ── MFA Boxes ────────────────────────────────────────────────────────────── */
.mfa-input-group {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin: 4px 0 8px;
}

.mfa-digit {
    width: 64px;
    height: 72px;
    border: 1px solid #d4dfeb;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--anz-navy);
    outline: none;
    transition: var(--anz-transition);
}

.mfa-digit:focus { border-color: #77b5ff; box-shadow: 0 0 0 4px rgba(36, 129, 255, 0.12); }

/* ── Search Bar ───────────────────────────────────────────────────────────── */
.search-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-bar input {
    padding-left: 36px;
    min-width: 240px;
}

.search-bar .search-icon {
    position: absolute;
    left: 11px;
    color: var(--anz-text-muted);
    pointer-events: none;
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--anz-text-muted);
    margin-bottom: 20px;
}

.breadcrumb a { color: var(--anz-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--anz-border); }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { border-bottom: 2px solid var(--anz-border); display: flex; gap: 2px; margin-bottom: 24px; }

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--anz-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--anz-transition);
}

.tab-btn:hover { color: var(--anz-blue); }
.tab-btn.active { color: var(--anz-blue); border-bottom-color: var(--anz-blue); font-weight: 700; }

.tag-search-results {
    margin-top: 8px;
    border: 1px solid var(--anz-border);
    border-radius: 12px;
    background: #fff;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 10px 28px rgba(15, 41, 68, 0.08);
}

.tag-search-item {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-align: left;
    color: var(--anz-navy);
}

.tag-search-item:hover {
    background: #eef6fd;
}

.tag-search-item small {
    color: var(--anz-text-muted);
}

.tag-token-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-subject-box {
    margin-top: 6px;
    padding: 14px;
    border: 1px solid #d5e3f1;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f8fd 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tag-token {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eaf4fe;
    border: 1px solid #bdd8f2;
    color: #0f4d7c;
    font-size: 13px;
    font-weight: 600;
}

.tag-token-remove {
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    font-size: 12px;
}

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--anz-border);
    border-top-color: var(--anz-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; transition: left 0.3s ease; }
    .sidebar.open { left: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .enrollment-modal { max-width: calc(100vw - 20px); }
    .enrollment-form-grid { grid-template-columns: 1fr; gap: 16px; }
    .enrollment-side-card { position: static; }
    .page-content { padding: 16px; }
    .login-page { padding: 16px; }
    .login-shell { grid-template-columns: 1fr; min-height: auto; border-radius: 28px; }
    .login-showcase, .login-panel { padding: 28px 22px; }
    .login-brand-mark { width: 170px; }
    .login-showcase-copy h1 { font-size: 2.5rem; }
    .login-heading p { font-size: 1rem; }
    .mfa-input-group { flex-wrap: wrap; }
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--anz-text-muted); }
.text-blue { color: var(--anz-blue); }
.text-success { color: var(--anz-success); }
.text-danger { color: var(--anz-danger); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
