/* ==========================================================================
   🏛️ NEXTEDU NEXUS — VAULT (ACADEMIC ARCHIVE & FINANCIAL LEDGER) CSS
   Design System: Obsidian Dark & Frosted Light / 60FPS Hardware-Composited
   ========================================================================== */

:root {
    --nexus-bg: #050807;
    --nexus-bg-alt: #0c1210;
    --nexus-surface: #0c1210;
    --nexus-surface-hover: #162019;
    --nexus-card-bg: #0c1210;
    --nexus-card-border: #192a20;
    --nexus-glass-border: #192a20;
    --nexus-text: #edfdf4;
    --nexus-text-muted: #9ab0a4;
    --nexus-text-dim: #647a6f;
    
    --nexus-cyan: #22c55e;
    --nexus-cyan-glow: rgba(34, 197, 94, 0.25);
    --nexus-gold: #eab308;
    --nexus-gold-glow: rgba(234, 179, 8, 0.25);
    --nexus-emerald: #22c55e;
    --nexus-emerald-glow: rgba(34, 197, 94, 0.25);
    --nexus-rose: #ef4444;
    --nexus-rose-glow: rgba(239, 68, 68, 0.25);
    --nexus-violet: #22c55e;
    --nexus-violet-glow: rgba(34, 197, 94, 0.25);
    --nexus-amber: #f59e0b;
    --nexus-primary: #22c55e;
    --nexus-primary-hover: #16a34a;
    --input-bg: #111a16;

    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Inter', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.18s ease;
    --transition-smooth: 0.25s ease;
    --transition-bounce: 0.35s ease;

    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.2);
}

[data-theme="light"] {
    --nexus-bg: #f8f5ff;
    --nexus-bg-alt: #fbf9ff;
    --nexus-surface: #ffffff;
    --nexus-surface-hover: #f3eeff;
    --nexus-card-bg: #ffffff;
    --nexus-card-border: #e7ddff;
    --nexus-glass-border: #e7ddff;
    --nexus-text: #171321;
    --nexus-text-muted: #625b71;
    --nexus-text-dim: #9d8fb0;
    --nexus-cyan: #6d28d9;
    --nexus-cyan-glow: rgba(109, 40, 217, 0.2);
    --nexus-violet: #6d28d9;
    --nexus-violet-glow: rgba(109, 40, 217, 0.2);
    --nexus-primary: #6d28d9;
    --nexus-primary-hover: #5b21b6;
    --input-bg: #fbf9ff;
    --shadow-card: 0 4px 12px rgba(47, 24, 90, 0.08);
}

/* Base resets & typography */
body.dashboard-body {
    background-color: var(--nexus-bg);
    color: var(--nexus-text);
    font-family: var(--font-body);
    min-height: 100vh;
    margin: 0;
    padding: 0 0 100px 0;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Background Atmosphere */
.animated-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
}

.main-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 16px 40px 16px;
    box-sizing: border-box;
}

/* --- 🏛️ TOP NEXUS APP HEADER --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-top-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--nexus-surface);
    border: 1px solid var(--nexus-glass-border);
    color: var(--nexus-text);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-top-back:hover {
    background: var(--nexus-surface-hover);
    border-color: var(--nexus-primary);
    color: var(--nexus-primary);
    transform: translateX(-2px);
}

.btn-top-back i {
    font-size: 0.82rem;
    transition: transform 0.2s ease;
}

.btn-top-back:hover i {
    transform: translateX(-3px);
}

.brand-text-block {
    display: flex;
    align-items: center;
}

.header-vault-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nexus-cyan);
    font-size: 1.15rem;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.header-title-box {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--nexus-text);
    line-height: 1.2;
}

.header-sub {
    font-size: 0.72rem;
    color: var(--nexus-text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.wallet-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--nexus-emerald);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.wallet-pill:hover {
    background: rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.glossy-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--nexus-glass-border);
    background: var(--nexus-surface);
    color: var(--nexus-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.glossy-btn:hover {
    border-color: var(--nexus-cyan);
    color: var(--nexus-cyan);
    transform: translateY(-1px);
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--nexus-cyan);
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-fast);
}

.header-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* --- 🌌 VAULT HERO SECTION --- */
.vault-hero {
    position: relative;
    padding: 24px 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(13, 21, 39, 0.95), rgba(10, 15, 29, 0.85));
    border: 1px solid var(--nexus-card-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow: hidden;
}

[data-theme="light"] .vault-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.9));
}

.vault-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.vault-hero-text {
    flex: 1;
}

.vault-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--nexus-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.vault-hero-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
    line-height: 1.25;
    background: linear-gradient(135deg, var(--nexus-text) 60%, var(--nexus-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mock-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    padding: 7px 18px;
    border-radius: var(--radius-full, 999px);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.16));
    border: 1.5px solid rgba(56, 189, 248, 0.38);
    color: var(--nexus-cyan, #38bdf8);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}

.mock-archive-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(168, 85, 247, 0.28));
    border-color: var(--nexus-cyan, #38bdf8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

[data-theme="light"] .mock-archive-btn {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(147, 51, 234, 0.1));
    border-color: rgba(2, 132, 199, 0.32);
    color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

[data-theme="light"] .mock-archive-btn:hover {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.18), rgba(147, 51, 234, 0.18));
    color: #0369a1;
}

.vault-hero-sub {
    font-size: 0.88rem;
    color: var(--nexus-text-muted);
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.vault-hero-art {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vault-orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.4);
    animation: orbitRotate 18s linear infinite;
}

.vault-orb-center {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--nexus-cyan), var(--nexus-violet));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

@keyframes orbitRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 🛡️ VAULT STATUS STRIP --- */
.vault-status-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(13, 21, 39, 0.6);
    border: 1px solid var(--nexus-glass-border);
    margin-bottom: 20px;
}

[data-theme="light"] .vault-status-strip {
    background: rgba(255, 255, 255, 0.8);
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.74rem;
    color: var(--nexus-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nexus-emerald);
    box-shadow: 0 0 8px var(--nexus-emerald);
}

.status-indicator-dot.cyan {
    background: var(--nexus-cyan);
    box-shadow: 0 0 8px var(--nexus-cyan);
}

/* --- 📑 DUAL-TAB SEGMENTED SWITCHER --- */
.history-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.tab-controls {
    display: flex;
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    border-radius: var(--radius-full);
    padding: 6px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    width: 100%;
    max-width: 440px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--nexus-text-muted);
    font-weight: 800;
    font-size: 0.88rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
}

.tab-btn:hover {
    color: var(--nexus-text);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--nexus-cyan), #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

.tab-btn#btn-wallet.active {
    background: linear-gradient(135deg, var(--nexus-emerald), #059669);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --- 📊 ACADEMIC & FINANCIAL SUMMARY HUD (BENTO GRID) --- */
.summary-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.s-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px;
    gap: 8px;
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.s-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
}

.s-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--nexus-cyan);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: var(--transition-fast);
}

.s-card:hover .s-icon {
    transform: scale(1.08);
}

.s-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.s-info .val {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--nexus-text);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.s-info .label {
    font-size: 0.72rem;
    color: var(--nexus-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
    margin-top: 4px;
}

.s-info .sub-label {
    font-size: 0.65rem;
    color: var(--nexus-text-dim);
    font-weight: 600;
    margin-top: 2px;
}

/* --- 🗂 RECORD RETENTION METADATA STRIP --- */
.retention-ticker-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(13, 21, 39, 0.5);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    text-align: center;
}

.retention-ticker-card i {
    color: var(--nexus-cyan);
    font-size: 0.95rem;
}

.retention-ticker-card p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--nexus-text-muted);
    font-weight: 600;
    font-family: var(--font-mono);
}

/* --- 📜 SECTION CONTROLS & HEADER --- */
.section-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nexus-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-count-badge {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--nexus-cyan);
    font-size: 0.72rem;
    font-weight: 800;
}

.btn-clear-history {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: var(--nexus-rose);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.btn-clear-history:hover {
    background: rgba(239, 68, 68, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* --- 🧠 MISSION RECORD CARDS (QUIZ TIMELINE) --- */
.logs-grid, .wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mission-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.mission-card:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.3);
}

.mission-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mission-subject-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.mission-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mission-subject-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--nexus-text);
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.mission-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--nexus-text-muted);
    font-weight: 600;
}

.mission-tap-hint {
    font-size: 0.72rem;
    color: var(--nexus-cyan);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.mission-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.score-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.score-badge span {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.score-badge strong {
    font-size: 1.15rem;
    font-family: var(--font-heading);
    font-weight: 900;
}

.accuracy-pill {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
}

/* Accuracy Tier Colors */
.tier-emerald {
    color: var(--nexus-emerald);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.tier-amber {
    color: var(--nexus-amber);
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.tier-crimson {
    color: var(--nexus-rose);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* --- 💰 FINANCIAL LEDGER CARDS --- */
.txn-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.txn-filter-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--nexus-surface);
    border: 1px solid var(--nexus-glass-border);
    color: var(--nexus-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.txn-filter-btn:hover {
    border-color: var(--nexus-cyan);
    color: var(--nexus-text);
}

.txn-filter-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--nexus-cyan);
    color: var(--nexus-cyan);
}

.txn-search-wrap {
    position: relative;
    margin-bottom: 14px;
}

.txn-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: var(--radius-md);
    background: var(--nexus-surface);
    border: 1px solid var(--nexus-card-border);
    color: var(--nexus-text);
    font-size: 0.82rem;
    outline: none;
    box-sizing: border-box;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.txn-search-input:focus {
    border-color: var(--nexus-cyan);
    box-shadow: 0 0 12px var(--nexus-cyan-glow);
}

.txn-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nexus-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.ledger-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.ledger-card:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.3);
}

.ledger-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ledger-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ledger-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ledger-desc {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--nexus-text);
    text-transform: capitalize;
}

.ledger-badge-referral {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--nexus-violet);
    font-size: 0.72rem;
    font-weight: 700;
}

.ledger-time {
    font-size: 0.75rem;
    color: var(--nexus-text-muted);
    font-weight: 600;
}

.ledger-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ledger-amount {
    font-size: 1.15rem;
    font-weight: 900;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

.status-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- 🌌 SKELETON SHIMMER LOADERS --- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

.skeleton-card {
    height: 76px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--nexus-card-border);
}

/* --- 👻 EMPTY VAULT STATES --- */
.vault-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--nexus-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: var(--nexus-card-bg);
    border: 1px dashed var(--nexus-card-border);
    border-radius: var(--radius-lg);
}

.vault-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(56, 189, 248, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--nexus-cyan);
}

.vault-empty-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nexus-text);
}

.vault-empty-sub {
    margin: 0;
    font-size: 0.85rem;
    color: var(--nexus-text-muted);
    max-width: 320px;
}

.btn-vault-cta {
    margin-top: 6px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--nexus-cyan), #2563eb);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-vault-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* --- 🔍 ATTEMPT & TRANSACTION & CLEAR MODALS (Forced Dark Glass) --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 7, 6, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.attempt-modal-content {
    background: #191210 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: var(--radius-lg);
    max-width: 580px;
    width: 100%;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(16, 185, 129, 0.15) !important;
    color: #f8fafc !important;
    animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.attempt-modal-content * {
    color-scheme: dark;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header-bar {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #201714 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--nexus-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-export-pdf {
    background: linear-gradient(135deg, var(--nexus-emerald), #059669);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.btn-export-pdf:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--nexus-text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.btn-modal-close:hover {
    color: var(--nexus-rose);
    background: rgba(239, 68, 68, 0.1);
}

.attempt-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Bento Metas in Attempt Inspector */
.attempt-metrics-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-tile {
    text-align: center;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--nexus-glass-border);
}

.metric-val {
    font-size: 1.4rem;
    font-weight: 900;
    font-family: var(--font-heading);
}

.metric-label {
    font-size: 0.7rem;
    color: var(--nexus-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Question Review Card */
.attempt-question-card {
    margin-bottom: 16px;
    padding: 18px;
    background: var(--nexus-card-bg);
    border: 1px solid var(--nexus-card-border);
    border-radius: var(--radius-md);
    page-break-inside: avoid;
    break-inside: avoid;
}

.attempt-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.q-index-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.q-question-text {
    margin: 0 0 12px 0;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--nexus-text);
}

.q-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.q-option-chip {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--nexus-glass-border);
    font-size: 0.8rem;
    color: var(--nexus-text-muted);
    font-weight: 500;
}

.q-answers-verdict {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--nexus-glass-border);
    font-size: 0.84rem;
}

.ans-correct {
    color: var(--nexus-emerald);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ans-user-wrong {
    color: var(--nexus-rose);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ans-user-skipped {
    color: var(--nexus-amber);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- 💳 TRANSACTION INSPECTOR MODAL --- */
.txn-inspector-hero {
    text-align: center;
    padding: 10px 0 20px 0;
}

.txn-inspector-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.txn-inspector-amount {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 900;
    font-family: var(--font-heading);
}

.txn-inspector-ref {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--nexus-glass-border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--nexus-text-muted);
    cursor: pointer;
}

.txn-inspector-ref:hover {
    color: var(--nexus-cyan);
    border-color: var(--nexus-cyan);
}

.txn-receipt-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--nexus-glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.txn-receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.txn-receipt-row .label {
    color: var(--nexus-text-muted);
    font-weight: 500;
}

.txn-receipt-row .val {
    color: var(--nexus-text);
    font-weight: 700;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* --- ⚠️ CLEAR HISTORY CONFIRMATION MODAL --- */
.confirm-modal-box {
    max-width: 440px;
    text-align: center;
    padding: 28px 24px;
}

.confirm-icon-danger {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--nexus-rose);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px auto;
}

.confirm-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--nexus-text);
    margin: 0 0 10px 0;
}

.confirm-desc {
    font-size: 0.88rem;
    color: var(--nexus-text-muted);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.confirm-distinction-note {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--nexus-emerald);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.confirm-btn-row {
    display: flex;
    gap: 12px;
}

.btn-cancel-modal {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--nexus-surface);
    border: 1px solid var(--nexus-glass-border);
    color: var(--nexus-text);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger-modal {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--nexus-rose);
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger-modal:hover {
    background: #dc2626;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* --- 📱 BOTTOM NAVIGATION (MOBILE DOCK) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--nexus-glass-border);
    display: flex;
    justify-content: space-around;
    padding: 10px 12px 14px 12px;
    z-index: 1000;
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--nexus-text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    transition: var(--transition-fast);
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: var(--nexus-cyan);
}

/* --- 📱 MOBILE RESPONSIVENESS (360px–640px) --- */
@media screen and (max-width: 640px) {
    .main-content {
        padding: 12px 12px 85px 12px;
    }
    
    .vault-hero {
        padding: 18px 16px;
    }
    
    .vault-hero-title {
        font-size: 1.25rem;
    }
    
    .vault-hero-art {
        display: none;
    }
    
    .summary-panel {
        gap: 8px;
    }
    
    .s-card {
        padding: 14px 6px;
        border-radius: var(--radius-md);
    }
    
    .s-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .s-info .val {
        font-size: 1.2rem;
    }
    
    .s-info .label {
        font-size: 0.62rem;
    }

    .s-info .sub-label {
        display: none;
    }
    
    .mission-card, .ledger-card {
        padding: 14px 14px;
        border-radius: var(--radius-md);
    }
    
    .mission-subject-title, .ledger-desc {
        font-size: 0.92rem;
    }
    
    .mission-subject-icon, .ledger-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .score-badge strong {
        font-size: 1rem;
    }
    
    .ledger-amount {
        font-size: 1.05rem;
    }
    
    .q-options-grid {
        grid-template-columns: 1fr;
    }

    /* Fullscreen bottom sheet on mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .attempt-modal-content {
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
    }
}

@media screen and (max-width: 480px) {
    .vault-hero {
        padding: 16px 12px;
    }
    
    .vault-status-strip {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px 12px;
    }

    .section-control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .section-title-wrap {
        justify-content: space-between;
    }

    .btn-clear-history {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
    }

    .mission-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mission-left {
        width: 100%;
    }

    .mission-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--nexus-glass-border);
        padding-top: 10px;
    }

    .score-badge {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 4px 8px;
    }

    .ledger-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ledger-left {
        width: 100%;
    }

    .ledger-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--nexus-glass-border);
        padding-top: 10px;
    }

    .txn-filter-bar {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }

    .txn-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 10px 8px;
        font-size: 0.78rem;
    }
}

@media screen and (max-width: 380px) {
    .summary-panel {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .s-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 12px 14px;
        gap: 14px;
    }

    .s-info {
        align-items: flex-start;
    }

    .s-info .sub-label {
        display: block;
    }
}

/* --- 🖨️ PDF EXPORT PRINT STYLES --- */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .attempt-question-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        color: #1f2937 !important;
    }
}
