/* ═══════════════════════════════════════════════════════════════════════════
   SecureAware — Modern e-Learning Platform
   Light Theme Design System — v3.0
   Inspired by modern e-Learning dashboards
═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    /* Core light palette */
    --bg-body:       #F0F5FF;
    --bg-white:      #FFFFFF;
    --bg-surface:    #F8FAFC;
    --bg-hover:      #EEF2FF;
    --bg-active:     #E0E7FF;
    --bg-muted:      #F1F5F9;

    /* Accent colours */
    --primary:       #4F46E5;
    --primary-light: #6366F1;
    --primary-bg:    #EEF2FF;
    --primary-border:#C7D2FE;
    --blue:          #3B82F6;
    --blue-bg:       #EFF6FF;
    --blue-border:   #BFDBFE;
    --cyan:          #06B6D4;
    --cyan-bg:       #ECFEFF;
    --cyan-border:   #A5F3FC;
    --green:         #10B981;
    --green-bg:      #ECFDF5;
    --green-border:  #A7F3D0;
    --orange:        #F59E0B;
    --orange-bg:     #FFFBEB;
    --orange-border: #FDE68A;
    --red:           #EF4444;
    --red-bg:        #FEF2F2;
    --red-border:    #FECACA;
    --purple:        #8B5CF6;
    --purple-bg:     #F5F3FF;
    --purple-border: #DDD6FE;
    --pink:          #EC4899;

    /* Text */
    --text-primary:  #1E293B;
    --text-secondary:#475569;
    --text-muted:    #94A3B8;
    --text-light:    #CBD5E1;

    /* Borders */
    --border:        #E2E8F0;
    --border-light:  #F1F5F9;

    /* Sidebar */
    --sidebar-w:     260px;
    --sidebar-bg:    #FFFFFF;
    --sidebar-active:#4F46E5;
    --sidebar-text:  #475569;
    --sidebar-icon:  #94A3B8;

    /* Topbar */
    --topbar-h:      64px;

    /* Shadows */
    --shadow-sm:     0 1px 2px rgba(0,0,0,.05);
    --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:     0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:     0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --shadow-xl:     0 20px 25px rgba(0,0,0,.1), 0 8px 10px rgba(0,0,0,.04);

    /* Radii */
    --r-sm:  6px;
    --r:     10px;
    --r-lg:  14px;
    --r-xl:  20px;
    --r-full:9999px;

    /* Transitions */
    --t:     .2s ease;
    --t-slow:.35s ease;
}

/* ── Reset & Base (overrides Bootstrap) ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: var(--bg-body) !important;
    color: var(--text-primary) !important;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--text-primary); margin-bottom: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { color: var(--text-secondary); margin-bottom: 0; }

/* Override Bootstrap container defaults */
.container, .container-fluid { padding: 0; max-width: none; }

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

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--blue));
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.sidebar-brand-sub {
    font-size: .68rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section {
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 16px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r);
    color: var(--sidebar-text);
    font-size: .88rem;
    font-weight: 500;
    transition: var(--t);
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79,70,229,.3);
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: .95rem;
    flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-info {
    min-width: 0;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-primary);
}

.user-role {
    font-size: .72rem;
    color: var(--text-muted);
}

.user-av {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--primary), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: .82rem;
    flex-shrink: 0;
}

/* ── Main Content Area ─────────────────────────────────────────────────── */
.main-area {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.topbar-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.topbar-breadcrumb {
    font-size: .72rem;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Page content */
.page-content {
    flex: 1;
    padding: 28px;
    max-width: 1400px;
    width: 100%;
}

/* ── Page Header ───────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-left h2 {
    margin-bottom: 2px;
}

.page-header-left p {
    font-size: .85rem;
    color: var(--text-muted);
    margin: 0;
}

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

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

.card-header h4 {
    margin: 0;
}

.card-body {
    padding: 20px 22px;
}

.card-cyan {
    border-color: var(--cyan-border);
    background: var(--cyan-bg);
}

.card-blue {
    border-color: var(--blue-border);
    background: var(--blue-bg);
}

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

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

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.si-primary { background: var(--primary-bg); }
.si-blue    { background: var(--blue-bg); }
.si-cyan    { background: var(--cyan-bg); }
.si-green   { background: var(--green-bg); }
.si-orange  { background: var(--orange-bg); }
.si-red     { background: var(--red-bg); }
.si-purple  { background: var(--purple-bg); }

.stat-body {
    min-width: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-trend {
    font-size: .72rem;
    font-weight: 600;
    margin-top: 2px;
}

.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
}

.sa-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.sa-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.sa-table tbody tr {
    transition: var(--t);
}

.sa-table tbody tr:hover {
    background: var(--bg-hover);
}

.sa-table tbody td {
    padding: 14px 16px;
    font-size: .875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.sa-table tbody td .main {
    font-weight: 600;
    color: var(--text-primary);
    font-size: .875rem;
}

.sa-table tbody td .sub {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.b-primary { background: var(--primary-bg); color: var(--primary); }
.b-blue    { background: var(--blue-bg);    color: var(--blue); }
.b-cyan    { background: var(--cyan-bg);    color: var(--cyan); }
.b-green   { background: var(--green-bg);   color: var(--green); }
.b-orange  { background: var(--orange-bg);  color: var(--orange); }
.b-red     { background: var(--red-bg);     color: var(--red); }
.b-purple  { background: var(--purple-bg);  color: var(--purple); }
.b-gray    { background: var(--bg-muted);   color: var(--text-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--r);
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(79,70,229,.25);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 4px 10px rgba(79,70,229,.35);
}

.btn-blue {
    background: var(--blue);
    color: white;
}

.btn-blue:hover {
    background: #2563EB;
    color: white;
}

.btn-cyan {
    background: var(--cyan);
    color: white;
}

.btn-green {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.btn-green:hover {
    background: #059669;
    color: white;
}

.btn-orange {
    background: var(--orange);
    color: white;
}

.btn-danger, .btn-red {
    background: var(--red);
    color: white;
}

.btn-purple {
    background: var(--purple);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary-border);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary-border);
}

.btn-outline-primary:hover {
    background: var(--primary-bg);
}

.btn-outline-cyan {
    background: transparent;
    color: var(--cyan);
    border-color: var(--cyan-border);
}

.btn-outline-cyan:hover {
    background: var(--cyan-bg);
}

.btn-sm { padding: 5px 12px; font-size: .78rem; }
.btn-lg { padding: 12px 24px; font-size: .95rem; }
.btn-xl { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }

/* ── Progress Bars ─────────────────────────────────────────────────────── */
.progress-bar-wrap {
    width: 100%;
    background: var(--bg-muted);
    border-radius: var(--r-full);
    overflow: hidden;
    height: 8px;
}

.pb-h6  { height: 6px; }
.pb-h8  { height: 8px; }
.pb-h10 { height: 10px; }
.pb-h14 { height: 14px; }

.progress-bar-fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width .6s ease;
}

.pb-primary { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.pb-blue    { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.pb-cyan    { background: linear-gradient(90deg, var(--cyan), #22D3EE); }
.pb-green   { background: linear-gradient(90deg, var(--green), #34D399); }
.pb-orange  { background: linear-gradient(90deg, var(--orange), #FBBF24); }
.pb-red     { background: linear-gradient(90deg, var(--red), #F87171); }
.pb-purple  { background: linear-gradient(90deg, var(--purple), #A78BFA); }
.pb-pink    { background: linear-gradient(90deg, var(--pink), #F472B6); }

/* Mini progress in table cells */
.prog-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prog-mini-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--r-full);
    overflow: hidden;
    min-width: 60px;
}

.prog-mini-fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width .4s ease;
}

.prog-mini-label {
    font-size: .78rem;
    font-weight: 700;
    min-width: 36px;
    text-align: right;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.form-section {
    margin-bottom: 28px;
}

.form-section-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--t);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-hint {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-lg);
    border: 1px solid;
}

.alert-icon { font-size: 1.1rem; flex-shrink: 0; padding-top: 2px; }
.alert-body { flex: 1; font-size: .875rem; }
.alert-body strong { display: block; margin-bottom: 2px; }

.alert-primary { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); }
.alert-cyan    { background: var(--cyan-bg);    border-color: var(--cyan-border);    color: #0E7490; }
.alert-green   { background: var(--green-bg);   border-color: var(--green-border);   color: #047857; }
.alert-orange  { background: var(--orange-bg);  border-color: var(--orange-border);  color: #B45309; }
.alert-red     { background: var(--red-bg);     border-color: var(--red-border);     color: #B91C1C; }

/* ── Grid Helpers ──────────────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-action-sticky {
    position: sticky;
    top: 76px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    backdrop-filter: blur(8px);
}

.form-action-sticky .hint {
    margin-right: auto;
    font-size: .74rem;
    color: #64748B;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Item Cards (Company, etc.) ────────────────────────────────────────── */
.item-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--t);
}

.item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-border);
}

.item-card h4 {
    margin: 0;
}

.item-card p {
    margin: 0;
}

.item-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
}

/* ── Video Grid & Cards ────────────────────────────────────────────────── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.video-card {
    background: var(--bg-white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--t);
}

.video-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.video-card.locked {
    opacity: .65;
}

.video-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--primary-bg), var(--blue-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.play-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--t);
    backdrop-filter: blur(8px);
}

.video-thumb:hover .play-icon {
    transform: scale(1.1);
    background: white;
    box-shadow: var(--shadow-md);
}

.video-level-pin {
    position: absolute;
    top: 10px;
    right: 10px;
}

.video-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-card-body h4 {
    margin: 0;
    font-size: .92rem;
}

.video-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

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

.modal-header h3 {
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--t);
}

.modal-close:hover {
    background: var(--red-bg);
    color: var(--red);
}

.modal-body {
    padding: 22px;
}

.video-player-wrap {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 16px;
}

.video-player-wrap iframe,
.video-player-wrap video {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Info Items ─────────────────────────────────────────────────────────── */
.info-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 22px;
    margin-bottom: 24px;
}

.info-item-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.info-item-value {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Progress Hero ─────────────────────────────────────────────────────── */
.progress-hero {
    background: linear-gradient(135deg, var(--primary), var(--blue));
    border-radius: var(--r-xl);
    padding: 32px;
    color: white;
    box-shadow: 0 8px 24px rgba(79,70,229,.3);
}

.progress-hero .big-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

/* ── Level Cards ───────────────────────────────────────────────────────── */
.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.level-card {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    text-align: center;
    transition: var(--t);
}

.level-card.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 4px 12px rgba(79,70,229,.15);
}

.level-card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.level-card-name {
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-primary);
}

.level-card-desc {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto;
}

/* ── Login Page ────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(160deg, #EEF2FF 0%, #F0F5FF 30%, #ECFEFF 60%, #F0FDF4 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,70,229,.08), transparent 70%);
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,.06), transparent 70%);
    pointer-events: none;
}

/* ── Awareness Page ────────────────────────────────────────────────────── */
.awareness-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg-body);
}

.awareness-card {
    background: var(--bg-white);
    border-radius: var(--r-xl);
    border: 2px solid var(--red-border);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

/* ── Utility Classes ───────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-28 { gap: 28px; }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.text-xs  { font-size: .75rem; }
.text-sm  { font-size: .85rem; }
.text-lg  { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-primary { color: var(--primary) !important; }
.text-blue    { color: var(--blue) !important; }
.text-cyan    { color: var(--cyan) !important; }
.text-green   { color: var(--green) !important; }
.text-orange  { color: var(--orange) !important; }
.text-red     { color: var(--red) !important; }
.text-purple  { color: var(--purple) !important; }
.text-muted   { color: var(--text-muted) !important; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .page-content [style*="grid-template-columns:1.35fr 1fr"],
    .page-content [style*="grid-template-columns:1fr 1fr"],
    .page-content [style*="grid-template-columns:1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .page-content [style*="grid-template-columns:repeat(5"],
    .page-content [style*="grid-template-columns:repeat(4"],
    .page-content [style*="grid-template-columns:repeat(3"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    .main-area {
        margin-left: 0 !important;
    }
    .page-content {
        padding: 18px;
    }
    .level-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-action-sticky {
        top: 64px;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .form-action-sticky .hint {
        width: 100%;
    }

    .form-action-sticky .btn,
    .form-action-sticky a {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .page-content [style*="grid-template-columns:repeat(5"],
    .page-content [style*="grid-template-columns:repeat(4"],
    .page-content [style*="grid-template-columns:repeat(3"],
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Identity Pages (Bootstrap-based) ──────────────────────────────────── */
/* Style ASP.NET Identity scaffolded pages to match our theme */
.page-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-content .form-floating,
.page-content .form-group {
    margin-bottom: 16px;
}

.page-content .form-control,
.page-content input[type="text"],
.page-content input[type="email"],
.page-content input[type="password"] {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: .875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--t);
    outline: none;
    width: 100%;
}

.page-content .form-control:focus,
.page-content input[type="text"]:focus,
.page-content input[type="email"]:focus,
.page-content input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.page-content .btn-primary,
.page-content button[type="submit"] {
    background: var(--primary) !important;
    color: white !important;
    border: 1px solid var(--primary) !important;
    border-radius: var(--r);
    padding: 10px 20px;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: var(--t);
}

.page-content .btn-primary:hover,
.page-content button[type="submit"]:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

.page-content .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.page-content .form-check input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.page-content .text-danger {
    color: var(--red);
    font-size: .82rem;
}

/* Make Identity pages look like a centered card */
.page-content > div[class*="row"] {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
