/* ============================================================
   Arrow — Academic Light Theme Design System
   ============================================================ */

/* Custom Properties / Design Tokens */
:root {
    --bg-primary: #f7f3ec;
    --bg-secondary: #141b2d;
    --bg-tertiary: #ede8df;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.97);

    --text-primary: #1e2028;
    --text-secondary: #5a6477;
    --text-muted: #94a3b8;
    --text-accent: #1a6b5c;

    --accent-primary: #1a6b5c;
    --accent-primary-light: #22897a;
    --accent-secondary: #1e4d8c;
    --accent-success: #16a34a;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --accent-info: #0369a1;

    --gradient-primary: linear-gradient(135deg, #1a6b5c 0%, #1e4d8c 100%);
    --gradient-success: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    --gradient-danger: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
    --gradient-hero: linear-gradient(135deg, #f7f3ec 0%, #ede8df 40%, #f7f3ec 100%);
    --gradient-glass-border: linear-gradient(135deg, rgba(26, 107, 92, 0.3), rgba(30, 77, 140, 0.1), rgba(26, 107, 92, 0.3));

    --border-color: rgba(26, 31, 46, 0.12);
    --border-subtle: rgba(26, 31, 46, 0.07);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.13);
    --shadow-glow: 0 0 30px rgba(26, 107, 92, 0.12);
    --shadow-glow-strong: 0 0 60px rgba(26, 107, 92, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Kalam', 'Outfit', system-ui, cursive;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--accent-primary-light);
    text-decoration: none;
}

/* ============================================================
   App Container (Sidebar + Main)
   ============================================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition-slow);
    overflow: hidden;
}

.logo-area {
    padding: 0 1.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.4;
    left: 1.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary-light);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.logo-area h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.logo-area h2 span {
    color: var(--accent-primary-light);
}

/* Arrow wordmark logo */
.logo-wordmark {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}
.logo-arr {
    display: inline-block;
    transform: rotate(-45deg);
    color: var(--accent-primary-light);
    font-size: 1.1em;
    line-height: 1;
    margin-right: 1px;
    vertical-align: middle;
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0.75rem;
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-align: left;
    width: 100%;
}

.nav-btn i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
    transform: translateX(3px);
}

.nav-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 107, 92, 0.4);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.sidebar-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================================
   Main Content Area
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.5rem 2rem 3rem;
    min-height: 100vh;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.welcome-msg h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.welcome-msg p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-danger);
}

.status-indicator.online {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--text-secondary);
}

/* ============================================================
   Tab Sections
   ============================================================ */
.tab-section {
    display: none;
    animation: fadeSlideIn 0.4s ease;
    position: relative;
}

/* Auth wall — overlays protected tab content when user is not signed in */
.auth-wall {
    position: absolute;
    inset: 0;
    min-height: 65vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 20;
}

.auth-wall.visible {
    display: flex;
}

.auth-wall-inner {
    text-align: center;
    max-width: 400px;
    padding: 48px 36px;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
    border: 1px solid var(--border-color, #e2e8f0);
}

.auth-wall-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: white;
}

.auth-wall-icon i {
    width: 26px;
    height: 26px;
}

.auth-wall-inner h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.auth-wall-inner p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.55;
}

.auth-wall-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-section.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-glass);
    color: var(--accent-primary-light);
    border: 1px solid var(--border-color);
}

.badge-success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--accent-success);
    border-color: rgba(52, 211, 153, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-warning);
    border-color: rgba(251, 191, 36, 0.3);
}

.badge-danger {
    background: rgba(248, 113, 113, 0.12);
    color: var(--accent-danger);
    border-color: rgba(248, 113, 113, 0.3);
}

.badge-info {
    background: rgba(3, 105, 161, 0.1);
    color: var(--accent-info);
    border-color: rgba(3, 105, 161, 0.25);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 107, 92, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 107, 92, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(52, 211, 153, 0.45);
}

.btn-small {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    background: var(--bg-glass);
    color: var(--accent-primary-light);
    border: 1px solid var(--border-color);
}

.btn-small:hover {
    background: var(--bg-glass-hover);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   Generate / Check-Universities Button (premium CTA)
   ============================================================ */
@keyframes btn-shimmer {
    0%   { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(220%) skewX(-15deg); }
}

@keyframes btn-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(26,107,92,0.55), 0 4px 20px rgba(26,107,92,0.45), 0 8px 40px rgba(30,77,140,0.2), inset 0 1px 0 rgba(255,255,255,0.15); }
    70%  { box-shadow: 0 0 0 14px rgba(26,107,92,0), 0 4px 20px rgba(26,107,92,0.45), 0 8px 40px rgba(30,77,140,0.2), inset 0 1px 0 rgba(255,255,255,0.15); }
    100% { box-shadow: 0 0 0 0 rgba(26,107,92,0), 0 4px 20px rgba(26,107,92,0.45), 0 8px 40px rgba(30,77,140,0.2), inset 0 1px 0 rgba(255,255,255,0.15); }
}

.generate-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 2.8rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #1a6b5c 0%, #1e5c9e 45%, #1e4d8c 100%);
    box-shadow:
        0 0 0 1px rgba(26,107,92,0.4),
        0 4px 20px rgba(26,107,92,0.45),
        0 8px 40px rgba(30,77,140,0.2),
        inset 0 1px 0 rgba(255,255,255,0.15);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: btn-pulse-ring 3s ease-out infinite;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
    animation: btn-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

.generate-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.generate-btn span,
.generate-btn i { position: relative; z-index: 1; }

.generate-btn i {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
}

.generate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 0 0 1px rgba(26,107,92,0.6),
        0 8px 30px rgba(26,107,92,0.55),
        0 16px 50px rgba(30,77,140,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    animation: none;
}

.generate-btn:hover i { transform: scale(1.2) rotate(-10deg); }

.generate-btn:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow:
        0 0 0 1px rgba(26,107,92,0.5),
        0 4px 15px rgba(26,107,92,0.45),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.generate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

.generate-btn:disabled::before { animation: none; }

/* ── Visa info card ─────────────────────────────────────────── */
.visa-info-card {
    background: rgba(26,107,92,0.06);
    border: 1px solid rgba(26,107,92,0.18);
    border-radius: 12px;
    padding: 14px 16px;
}
.visa-card-header {
    display: flex; align-items: center; gap: 7px;
    font-size: .8rem; font-weight: 700; color: var(--accent);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.visa-card-body {
    display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
    gap: 10px;
}
.visa-item {
    background: rgba(26,31,46,0.03);
    border: 1px solid rgba(26,31,46,0.08);
    border-radius: 8px; padding: 10px 12px;
}
.visa-item-name { font-size: .78rem; color: var(--text-secondary); margin-bottom: 3px; }
.visa-item-val  { font-size: .92rem; font-weight: 700; color: var(--text-primary); }
.visa-item-note { font-size: .73rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }

/* ── Nationality grid ───────────────────────────────────────── */
.nationality-grid {
    display: flex; flex-direction: column; gap: 8px;
}
.nat-row {
    display: grid; grid-template-columns: 110px 1fr 40px;
    align-items: center; gap: 10px;
}
.nat-label { font-size: .78rem; color: var(--text-secondary); white-space: nowrap; }
.nat-bar-track {
    height: 8px; background: rgba(26,31,46,0.08);
    border-radius: 4px; overflow: hidden;
}
.nat-bar-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #1a6b5c, #1e4d8c);
    transition: width .4s ease;
}
.nat-pct { font-size: .78rem; font-weight: 700; color: var(--text-primary); text-align: right; }

/* ── Scholarship list ───────────────────────────────────────── */
.scholarship-list { display: flex; flex-direction: column; gap: 10px; }
.scholarship-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 12px;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.18);
    border-radius: 9px;
}
.scholarship-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.scholarship-name { font-size: .86rem; font-weight: 700; color: var(--text-primary); }
.scholarship-desc { font-size: .78rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.scholarship-value {
    display: inline-block; margin-top: 5px;
    font-size: .72rem; font-weight: 700;
    color: #f59e0b; background: rgba(245,158,11,0.12);
    border-radius: 20px; padding: 2px 9px;
}

/* ============================================================
   Glass Cards
   ============================================================ */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(26, 107, 92, 0.25);
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   HOME TAB — Hero Section
   ============================================================ */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0 3rem;
}

.hero-content .badge {
    margin-bottom: 1.25rem;
}

.hero-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.glowing-orb {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(26, 107, 92, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: orbFloat 6s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.visual-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 340px;
    position: relative;
    z-index: 1;
}

.visual-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.text-indigo {
    color: var(--accent-primary-light);
}

.stress-meter-mock {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meter-bar {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
}

.meter-bar .fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent-success), var(--accent-warning), var(--accent-danger));
    transition: width 1.5s ease;
}

.status-warning {
    font-size: 0.8rem;
    color: var(--accent-warning);
    font-weight: 600;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow-strong);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: white;
    stroke-width: 1.75;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================
   DASHBOARD TAB
   ============================================================ */
.control-panel {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.styled-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 220px;
    outline: none;
    transition: border-color var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3c0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.styled-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.styled-select option {
    background: #ffffff;
    color: #1e2028;
}

#history-grades-table select option,
#al-history-grades-body select option,
.form-select option,
.styled-select option {
    background: #ffffff;
    color: #1e2028;
}

/* Stats Overview Cards */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
}

.stat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-meta i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-light);
    opacity: 0.7;
}

.stat-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.trend-indicator {
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
}

.trend-indicator i {
    width: 14px;
    height: 14px;
}

.trend-indicator.up {
    color: var(--accent-success);
}

.trend-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    min-height: 350px;
}

.chart-container h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.chart-container canvas {
    max-height: 300px;
}

.chart-source {
    margin-top: 0.65rem;
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ============================================================
   ADVISOR TAB — Wizard
   ============================================================ */
.wizard-container {
    max-width: 860px;
    margin: 0 auto;
}

.wizard-steps-header {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.step-indicator {
    flex: 1;
    text-align: center;
    padding: 0.85rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    transition: all var(--transition-base);
    cursor: pointer;
}

.step-indicator:last-child {
    border-right: none;
}

.step-indicator.active {
    background: var(--accent-primary);
    color: white;
}

.step-indicator.done {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-success);
}

/* Wizard Steps */
.wizard-step {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}

.wizard-step.active {
    display: block;
}

.wizard-step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ── Diagnostic page slots ── */
.diag-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.diag-slot {
    position: relative;
    aspect-ratio: 3/4;
    border: 1.5px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}

.diag-slot:hover {
    border-color: var(--accent-primary);
    border-style: solid;
    background: var(--bg-secondary);
}

.diag-slot:hover .diag-slot-icon { opacity: .7; color: #fff; }
.diag-slot:hover .diag-slot-hint  { color: rgba(255,255,255,.6); opacity: 1; }

.diag-slot.drag-over {
    border-color: var(--accent-primary-light);
    border-style: solid;
    background: var(--bg-secondary);
}

.diag-slot-num {
    position: absolute;
    top: 7px;
    left: 8px;
    font-size: .65rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: #fff;
    background: var(--accent-primary);
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    line-height: 1;
}

.diag-slot-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.diag-slot-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    padding: 0 8px;
    width: 100%;
}

.diag-slot-pdf-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diag-slot-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    opacity: .4;
    transition: color .15s, opacity .15s;
}

.diag-slot-hint {
    font-size: .68rem;
    color: var(--text-secondary);
    opacity: .6;
    transition: color .15s, opacity .15s;
}

.diag-slot-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.diag-slot-clear {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    font-size: .8rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .12s;
}

.diag-slot-clear:hover { background: rgba(220,38,38,.8); }

.diag-slot.diag-slot-filled {
    border-style: solid;
    border-color: var(--accent-primary);
}

@media (max-width: 480px) {
    .diag-slots { grid-template-columns: repeat(2, 1fr); }
}

/* Upload Dropzone */
.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    margin-bottom: 1.5rem;
}

.upload-dropzone:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-dropzone.drag-over {
    border-color: var(--accent-primary-light);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: var(--shadow-glow);
}

.dropzone-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary-light);
    margin-bottom: 0.5rem;
}

.upload-dropzone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-dropzone p span {
    color: var(--accent-primary-light);
    cursor: pointer;
    font-weight: 600;
}

.file-info {
    font-size: 0.8rem;
    color: var(--accent-success);
    font-weight: 600;
    min-height: 1.2em;
}

/* Manual Input */
.manual-input-area .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title h4 {
    font-size: 1rem;
}

.history-table-container {
    overflow-x: auto;
}

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

.history-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.history-table th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.history-table th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.history-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

#history-grades-table,
#al-history-grades-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#history-grades-table thead th,
#al-history-grades-table thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

#history-grades-table thead th:first-child,
#al-history-grades-table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

#history-grades-table thead th:last-child,
#al-history-grades-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

#history-grades-table tbody td,
#al-history-grades-table tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

#history-grades-table input,
#history-grades-table select,
#al-history-grades-table input,
#al-history-grades-table select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    transition: border-color var(--transition-fast);
}

#history-grades-table input:focus,
#history-grades-table select:focus,
#al-history-grades-table input:focus,
#al-history-grades-table select:focus {
    border-color: var(--accent-primary);
}

.remove-row-btn {
    background: none;
    border: none;
    color: var(--accent-danger);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-row-btn:hover {
    background: rgba(248, 113, 113, 0.15);
}

.remove-row-btn i {
    width: 16px;
    height: 16px;
}

/* Sliders Grid */
.sliders-grid {
    display: grid;
    gap: 1.25rem;
}

.slider-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.slider-value {
    color: var(--accent-primary-light);
    font-weight: 700;
    font-size: 1rem;
}

.styled-range {
    width: 100%;
    height: 6px;
    border-radius: 100px;
    background: var(--bg-secondary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.styled-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.styled-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.styled-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 3px solid var(--bg-primary);
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Form Rows */
.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Subject selector */
.subjects-selector-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-block h5 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.65rem;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.checkbox-grid label:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.06);
}

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

.checkbox-grid input[type="checkbox"]:checked + span {
    color: var(--accent-primary-light);
    font-weight: 600;
}

.subject-name-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-primary-light);
}

.subject-name-link:hover {
    color: var(--accent-primary-light);
    border-bottom-style: solid;
}

.cambridge-syllabus-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 2px;
    color: var(--text-muted);
}

.cambridge-syllabus-link:hover {
    color: var(--accent-primary-light);
}

.cambridge-syllabus-link svg {
    width: 12px;
    height: 12px;
}

/* ── Subject Detail (overview sub-page) ── */
.subject-detail-card {
    max-width: 760px;
    margin: 0 auto;
}

.subject-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.subject-detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 0.6rem;
}

.subject-detail-level-badge,
.subject-detail-category-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.subject-detail-level-badge {
    background: var(--gradient-primary);
    color: #fff;
}

.subject-detail-category-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.subject-detail-header h2 {
    margin: 0 0 0.2rem;
    font-size: 1.5rem;
}

.subject-detail-code {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.subject-detail-section {
    margin-bottom: 1.5rem;
}

.subject-detail-section:last-child {
    margin-bottom: 0;
}

.subject-detail-section h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.subject-detail-section p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================================
   ADVISOR RESULTS
   ============================================================ */
.advisor-results-container {
    display: none;
    margin-top: 2.5rem;
    animation: fadeSlideIn 0.5s ease;
}

.advisor-results-container.visible {
    display: block;
}

.advisor-results-container > .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.advisor-results-container > .section-title h2 {
    font-size: 1.5rem;
}

.results-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-left-pane,
.results-right-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Compatibility Circular Gauge */
.compatibility-glowing-card {
    text-align: center;
    padding: 2rem;
}

.compatibility-glowing-card h4 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.radial-gauge-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--accent-success); /* overridden per score tier in JS (renderRecommendationResults) */
    transition: color 0.4s ease;
}

.circular-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 3;
}

.circle-fill {
    fill: none;
    /* Solid color, set dynamically per score tier in JS (renderRecommendationResults).
       Previously referenced a #gaugeGradient that was never defined anywhere, so the
       stroke silently failed to resolve and the progress arc never rendered at all —
       only the pale background track (.circle-bg) was ever visible. */
    stroke: var(--accent-success);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease, stroke 0.4s ease;
}

.card-subtext {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Stress Audit */
.stress-audit-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stress-audit-card .card-header h4 {
    font-size: 0.95rem;
}

.stress-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stress-badge.low { background: rgba(52, 211, 153, 0.15); color: var(--accent-success); }
.stress-badge.medium { background: rgba(251, 191, 36, 0.15); color: var(--accent-warning); }
.stress-badge.high { background: rgba(248, 113, 113, 0.15); color: var(--accent-danger); }
.stress-badge.critical { background: rgba(248, 113, 113, 0.25); color: #ff4444; }

.stress-metric {
    margin-bottom: 1.25rem;
}

.stress-metric h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stress-metric h2 span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stress-bar-container {
    height: 8px;
    background: rgba(26, 31, 46, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.stress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--accent-success) 0%, var(--accent-warning) 50%, var(--accent-danger) 100%);
    transition: width 1.2s ease;
}

/* Stress Breakdown */
.stress-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breakdown-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 120px;
}

.mini-bar {
    flex: 1;
    height: 5px;
    background: rgba(26, 31, 46, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent-primary-light);
    transition: width 1s ease;
}

/* Prereq Alerts */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.5;
}

.alert-item.warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--accent-warning);
}

.alert-item.compulsory {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--accent-danger);
}

.alert-item.success {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: var(--accent-success);
}

.alert-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Equivalence Block */
.equivalence-status-block {
    padding: 0;
}

.equiv-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.equiv-status.eligible {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.equiv-status.not-eligible {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.equiv-status i {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.equiv-status.eligible i { color: var(--accent-success); }
.equiv-status.not-eligible i { color: var(--accent-danger); }

.equiv-details {
    font-size: 0.85rem;
}

.equiv-details strong {
    display: block;
    margin-bottom: 0.25rem;
}

.equiv-details p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.missing-list {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.missing-list li {
    font-size: 0.82rem;
    color: var(--accent-danger);
    margin-bottom: 0.25rem;
}

/* Pathways */
.pathways-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.pathway-track h5 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.indicator-dot.unlocked {
    background: var(--accent-success);
    box-shadow: 0 0 6px var(--accent-success);
}

.indicator-dot.locked {
    background: var(--accent-danger);
    box-shadow: 0 0 6px var(--accent-danger);
}

.pathway-track ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pathway-track li {
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

.pathway-track li .reason {
    display: block;
    font-size: 0.72rem;
    color: var(--accent-danger);
    margin-top: 0.2rem;
    opacity: 0.85;
}

/* AI Explanation Banner */
.explanation-banner {
    padding: 1.5rem;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-header i {
    color: var(--accent-primary-light);
    width: 22px;
    height: 22px;
}

.ai-header h3 {
    font-size: 1rem;
}

#ai-explanation-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Glass card icons for headings */
.results-right-pane .glass-card h3 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.results-right-pane .glass-card h3 i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary-light);
}

/* ============================================================
   DIAGNOSTICS TAB
   ============================================================ */
.diagnostics-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 1.5rem;
    align-items: start;
}

.drop-pane h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.diagnostic-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.6rem;
}

.btn-stop-eval {
    flex-shrink: 0;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background var(--transition-base), border-color var(--transition-base);
}

.btn-stop-eval i { width: 16px; height: 16px; }

.btn-stop-eval:hover {
    background: rgba(239,68,68,0.16);
    border-color: #ef4444;
}

/* Evaluation Pane */
.pane-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 350px;
}

.pane-placeholder i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 1rem;
}

.pane-placeholder p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 280px;
}

.hidden {
    display: none !important;
}

.evaluation-content {
    animation: fadeSlideIn 0.4s ease;
}

.eval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.eval-header h3 {
    font-size: 1.15rem;
}

.eval-section {
    margin-bottom: 1.25rem;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.eval-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.eval-box.italics {
    font-style: italic;
}

/* Formatted LLM feedback text (paragraphs / bullet lists / bold produced by _formatText) */
.eval-box p, .mcq-quiz-explanation p {
    margin: 0 0 0.7em;
}
.eval-box p:last-child, .mcq-quiz-explanation p:last-child {
    margin-bottom: 0;
}
.eval-box ul, .mcq-quiz-explanation ul {
    margin: 0 0 0.7em;
    padding-left: 1.1em;
}
.eval-box ul:last-child, .mcq-quiz-explanation ul:last-child {
    margin-bottom: 0;
}
.eval-box li, .mcq-quiz-explanation li {
    margin-bottom: 0.3em;
}
.eval-box strong, .mcq-quiz-explanation strong {
    color: var(--text-primary);
}

.eval-grid-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.badge-container {
    display: flex;
    align-items: center;
}

.command-pill {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--gradient-primary);
    color: white;
}

.explanation-box {
    border-left: 3px solid var(--accent-warning);
}

.remediation-box {
    border-left: 3px solid var(--accent-success);
}

/* ── MCQ Interactive Quiz ──────────────────────────────────── */
.mcq-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.mcq-score-badge {
    font-size: .78rem;
    font-weight: 700;
    background: rgba(3,105,161,0.1);
    color: #0369a1;
    border: 1px solid rgba(3,105,161,0.2);
    border-radius: 999px;
    padding: 3px 12px;
    transition: background .2s, color .2s;
}
.mcq-score-badge.perfect {
    background: rgba(16,185,129,0.12);
    color: #059669;
    border-color: rgba(16,185,129,0.3);
}
.mcq-quiz-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color .2s;
}
.mcq-quiz-card.answered-correct { border-color: rgba(16,185,129,0.4); }
.mcq-quiz-card.answered-wrong   { border-color: rgba(239,68,68,0.35); }
.mcq-quiz-qno {
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.mcq-quiz-text {
    font-size: .88rem;
    line-height: 1.55;
    color: var(--text-primary);
    margin: 0 0 14px;
}
.mcq-quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.mcq-opt-btn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: .83rem;
    text-align: left;
    color: var(--text-primary);
    transition: border-color .15s, background .15s;
    line-height: 1.4;
    width: 100%;
}
.mcq-opt-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(26,107,92,0.07);
}
.mcq-opt-btn:disabled { cursor: default; }
.mcq-opt-letter {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .73rem;
    color: var(--text-secondary);
    background: transparent;
}
.mcq-opt-btn.mcq-opt-correct {
    border-color: #10b981;
    background: rgba(16,185,129,0.09);
}
.mcq-opt-btn.mcq-opt-correct .mcq-opt-letter {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}
.mcq-opt-btn.mcq-opt-wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,0.08);
}
.mcq-opt-btn.mcq-opt-wrong .mcq-opt-letter {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.mcq-quiz-explanation {
    margin-top: 12px;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    font-size: .83rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.mcq-ask-row {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}
.mcq-ask-btn {
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.mcq-ask-btn:hover {
    background: var(--accent);
    color: #fff;
}

.structured-ask-btn {
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.structured-ask-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* Structured Q&A per-question cards */
.structured-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.structured-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.structured-card .eval-section:last-of-type {
    margin-bottom: 1rem;
}

/* Notes → Questions: uploaded file chips */
.notes-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.notes-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 220px;
}
.notes-file-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notes-file-remove {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: var(--bg-glass-hover);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notes-file-remove:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* Notes → Questions: short-answer reveal card spacing */
.notes-short-card .mcq-quiz-text {
    margin-bottom: 10px;
}
.notes-answer-input {
    margin-bottom: 12px;
    resize: vertical;
    font-family: inherit;
}
.notes-answer-feedback {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}
.notes-verdict-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
}
.notes-verdict-correct   { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.notes-verdict-partial   { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.notes-verdict-incorrect { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.notes-verdict-text {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Mock Tests */
.mock-test-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.mock-test-header h3 { margin: 0; }
.mock-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.mock-timer-low {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    animation: spin 1.5s ease-in-out infinite alternate;
    animation-name: mock-timer-pulse;
}
@keyframes mock-timer-pulse {
    from { opacity: 1; }
    to { opacity: 0.5; }
}
.mock-mcq-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.mock-mcq-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color .15s, background .15s;
}
.mock-mcq-option:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.06);
}
.mock-mcq-option input[type="radio"] {
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* Multi-page diagnostic results */
.diag-page-separator {
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    padding-top: 20px;
}

.diag-page-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.diag-page-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--accent-primary);
    color: #fff;
    white-space: nowrap;
}

.diag-page-filename {
    font-size: .8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading spinners */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary-light);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Utility classes used by University Checker & shared sections
   ============================================================ */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.62rem 0.9rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3c0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.2rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.section-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-tag {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.history-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.add-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.9rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-primary-light);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.add-row-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-primary);
}

.add-row-btn i {
    width: 14px;
    height: 14px;
}

/* ── University Checker subject/grade selects ─────────────────────────── */
.uc-code-sel, .uc-grade-sel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
    font-family: var(--font-primary);
    width: 100%;
}

.uc-code-sel:focus, .uc-grade-sel:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ── Global QS-ranked university directory ────────────────────────────── */
.qs-total-badge {
    font-size: .78rem;
    font-weight: 700;
    background: rgba(3,105,161,0.1);
    color: #0369a1;
    border: 1px solid rgba(3,105,161,0.2);
    border-radius: 999px;
    padding: 4px 13px;
    white-space: nowrap;
}

.qs-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.qs-search-wrap svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.qs-search-wrap input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.55rem 0.8rem 0.55rem 2.2rem;
    font-size: 0.88rem;
    font-family: var(--font-primary);
}

.qs-search-wrap input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Browse-by-country grid */
.qs-all-countries-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.8rem;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.qs-all-countries-btn:hover {
    opacity: 0.9;
}

.qs-all-countries-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.qs-all-countries-btn .qs-country-chip-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.qs-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.qs-country-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.65rem 0.9rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.qs-country-chip:hover {
    border-color: var(--accent-primary);
    background: rgba(26, 107, 92, 0.06);
}

.qs-country-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qs-country-chip-count {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-primary-light);
    background: rgba(26, 107, 92, 0.1);
    border-radius: 999px;
    padding: 2px 8px;
}

.qs-directory-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

/* Selected-country results view */
.qs-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--accent-primary-light);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    padding: 0;
    margin-bottom: 14px;
}

.qs-back-btn svg {
    width: 15px;
    height: 15px;
}

.qs-back-btn:hover {
    text-decoration: underline;
}

.qs-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.qs-results-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.qs-results-search-wrap {
    max-width: 240px;
    margin-bottom: 0;
}

.qs-nat-card {
    margin-bottom: 16px;
    padding: 1rem 1.1rem;
}

.qs-nat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.qs-nat-header svg {
    width: 17px;
    height: 17px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.qs-nat-header h5 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.qs-nat-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

.qs-directory-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    max-height: 480px;
    overflow-y: auto;
}

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

.qs-directory-table th {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: left;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
}

.qs-directory-table td {
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.qs-directory-table td:nth-child(2) {
    white-space: normal;
    color: var(--text-primary);
    font-weight: 500;
}

.qs-directory-table tr:last-child td {
    border-bottom: none;
}

.qs-directory-table tr:hover td {
    background: rgba(26, 107, 92, 0.05);
}

.qs-rank-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    background: var(--gradient-primary);
    color: #fff;
}

.qs-directory-caption {
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
}

/* ============================================================
   Mobile Responsive Design
   ============================================================ */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .stats-overview-grid {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

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

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

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

    .form-row-grid {
        grid-template-columns: 1fr;
    }

    .eval-grid-rows {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Sidebar → horizontal icon strip at top */
    .app-container   { flex-direction: column; }

    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        flex-direction: row;
        padding: 0.4rem 0.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        z-index: 200;
        overflow-x: auto;
    }

    .logo-area {
        margin-bottom: 0;
        padding: 0 0.5rem;
        flex-shrink: 0;
    }

    .logo-area h2, .logo-glow, .sidebar-footer { display: none; }

    .nav-menu {
        flex-direction: row;
        flex: 1;
        gap: 2px;
        overflow-x: auto;
        padding: 0 0.25rem;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar { display: none; }

    .nav-btn {
        padding: 0.55rem 0.65rem;
        justify-content: center;
        flex-shrink: 0;
        border-radius: var(--radius-sm);
    }

    .nav-btn span { display: none; }

    .nav-btn i { width: 22px; height: 22px; }

    /* Main content */
    .main-content {
        margin-left: 0;
        padding: 1rem 0.9rem 2rem;
    }

    /* Top bar */
    .top-bar {
        margin-bottom: 1.2rem;
        padding-bottom: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .welcome-msg h1  { font-size: 1.25rem; }
    .welcome-msg p   { font-size: 0.82rem; }

    /* Hero */
    .hero-content h1 { font-size: 1.5rem; }

    /* Grids → single column */
    .two-col-grid,
    .form-row-grid,
    .eval-grid-rows,
    .guide-strength-row { grid-template-columns: 1fr; }

    /* Wizard steps */
    .wizard-steps-header { font-size: 0.68rem; gap: 2px; }
    .step-indicator      { padding: 0.55rem 0.25rem; font-size: 0.68rem; }

    /* Glass cards */
    .glass-card { padding: 1rem 0.9rem; }

    /* Tables scroll horizontally */
    .history-table-container,
    .history-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* University cards → single column layout */
    .uni-card {
        grid-template-columns: 1fr;
    }

    .likelihood-badge { width: fit-content; }

    /* Gauge / score widgets */
    .gauges-row {
        grid-template-columns: 1fr;
    }

    /* Subject checkboxes */
    .subjects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Extra-small phones (≤ 480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
    html { font-size: 14px; }

    .main-content { padding: 0.75rem 0.65rem 2rem; }

    .welcome-msg h1 { font-size: 1.1rem; }

    .glass-card { padding: 0.85rem 0.75rem; border-radius: var(--radius-md); }

    /* Nav icons smaller */
    .nav-btn { padding: 0.45rem 0.55rem; }
    .nav-btn i { width: 20px; height: 20px; }

    /* Hero */
    .hero-content h1 { font-size: 1.3rem; }
    .badge { font-size: 0.7rem; padding: 0.3rem 0.7rem; }

    /* Wizard steps — hide labels, show only numbers */
    .step-indicator .step-label { display: none; }
    .wizard-steps-header        { gap: 0; }
    .step-indicator             { padding: 0.5rem; font-size: 0.75rem; }

    /* Subjects checkboxes → 1 column on very small phones */
    .subjects-grid { grid-template-columns: 1fr; }

    /* Generate button */
    .generate-btn { width: 100%; justify-content: center; padding: 0.85rem 1rem; }

    /* History table — tighten cells */
    .history-table th,
    .history-table td { padding: 0.5rem 0.5rem; font-size: 0.82rem; }

    /* Top bar — stack vertically */
    .top-bar { flex-direction: column; align-items: flex-start; }
    .api-status { align-self: flex-start; }

    /* Cards row → single column */
    .feature-grid,
    .stats-overview-grid,
    .charts-row,
    .cards-grid { grid-template-columns: 1fr; }

    /* Section tags + add btn — wrap if needed */
    .section-label-row { flex-wrap: wrap; gap: 0.5rem; }

    /* University guide strength blocks */
    .strength-block { padding: 0.6rem 0; }

    /* Req pills — smaller */
    .req-pill { font-size: 0.7rem; padding: 0.18rem 0.5rem; }

    /* Likelihood badge */
    .likelihood-badge { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
}

/* ── University Guide Panel ──────────────────────────────────────────────── */
.university-guide-panel { margin-top: 1.5rem; }

.guide-strength-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin: 1.2rem 0;
}

.strength-block h5 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3c0;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.strength-block ul { list-style: none; padding: 0; margin: 0; }
.strength-block li {
    font-size: 0.9rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(148,163,192,0.08);
    color: #c8d3ea;
}

.gap-analysis-text {
    font-size: 0.92rem;
    color: #94a3c0;
    line-height: 1.6;
    margin: 1rem 0 1.4rem;
    padding: 0.9rem 1rem;
    background: rgba(99,102,241,0.06);
    border-left: 3px solid #6366f1;
    border-radius: 0 8px 8px 0;
}

.uni-recommendations { display: flex; flex-direction: column; gap: 1rem; }

.uni-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(148,163,192,0.12);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem 1.2rem;
    align-items: start;
}

/* Keep every real content child above the decorative flag background */
.uni-card > *:not(.uni-card-flag-bg) {
    position: relative;
    z-index: 1;
}

.uni-card-flag-bg {
    position: absolute;
    top: 50%;
    right: -15%;
    transform: translateY(-50%) rotate(-8deg);
    width: 60%;
    max-width: 260px;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: 50%;
    opacity: 0.16;
    z-index: 0;
    pointer-events: none;
    border-radius: 10px;
}

.uni-card-header { display: flex; flex-direction: column; gap: 0.2rem; }
.uni-card-name { font-size: 1rem; font-weight: 600; color: #e2e8f5; }
.uni-card-name-link { text-decoration: none; color: inherit; }
.uni-card-name-link:hover { text-decoration: underline; opacity: .85; }
.uni-card-program { font-size: 0.82rem; color: #64748b; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.qs-rank-mini {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(26,107,92,0.15);
    color: #22897a;
    border: 1px solid rgba(26,107,92,0.3);
    white-space: nowrap;
}

.qs-rank-mini-unranked {
    background: rgba(148,163,192,0.14);
    color: #94a3b8;
    border-color: rgba(148,163,192,0.28);
}

.likelihood-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    align-self: start;
}
.likelihood-4 { background: rgba(52,211,153,0.18); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.likelihood-3 { background: rgba(99,102,241,0.18); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.likelihood-2 { background: rgba(251,191,36,0.18); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.likelihood-1 { background: rgba(248,113,113,0.18); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

.uni-card-details { grid-column: 1 / -1; }
.uni-req-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.req-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}
.req-pill.met    { background: rgba(52,211,153,0.12); color: #34d399; }
.req-pill.missing { background: rgba(248,113,113,0.12); color: #f87171; }
.uni-notes { font-size: 0.82rem; color: #64748b; margin-top: 0.4rem; line-height: 1.5; }

/* ── Tier system ─────────────────────────────────────────────────────────── */
.tier-section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 18px 0 10px;
    gap: 10px;
}
.tier-hdr-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tier-hdr-sub {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
}
.tier-count-pill {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
}
.tier-hdr-safety    { background: rgba(16,185,129,0.15);  color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.tier-hdr-match     { background: rgba(251,191,36,0.12);  color: #f59e0b; border: 1px solid rgba(251,191,36,0.25); }
.tier-hdr-reach     { background: rgba(239,68,68,0.12);   color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.tier-hdr-ineligible{ background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }

.tier-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
    margin: 4px 0;
    width: fit-content;
}
.tier-safety    { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.tier-match     { background: rgba(251,191,36,0.15); color: #f59e0b; border: 1px solid rgba(251,191,36,0.3); }
.tier-reach     { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.tier-ineligible{ background: rgba(100,116,139,0.15);color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }

.uni-card-safety    { border-left: 3px solid #10b981; }
.uni-card-match     { border-left: 3px solid #f59e0b; }
.uni-card-reach     { border-left: 3px solid #ef4444; }
.uni-card-ineligible{ border-left: 3px solid #64748b; }

.ucas-compare-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #94a3c0;
    margin-bottom: 8px;
}
.ucas-dot { color: #475569; }
.ucas-ok  { color: #10b981; font-weight: 600; }
.ucas-gap { color: #f87171; font-weight: 600; }

.ucas-total-badge {
    display: flex;
    align-items: baseline;
    gap: 5px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 10px;
    padding: 6px 14px;
}
.ucas-label { font-size: 0.72rem; color: #94a3c0; text-transform: uppercase; letter-spacing: 0.06em; }
.ucas-pts   { font-size: 1.4rem; font-weight: 800; color: #818cf8; line-height: 1; }
.ucas-unit  { font-size: 0.72rem; color: #64748b; }

.bridge-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #94a3c0;
    line-height: 1.5;
}

/* Wizard step validation error */
.step-error-msg {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    animation: fadeIn 0.2s ease;
}

/* Scholarship probability badges */
.schol-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
}
.schol-high        { background: rgba(16,185,129,0.15);  color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.schol-moderate    { background: rgba(251,191,36,0.15);  color: #f59e0b; border: 1px solid rgba(251,191,36,0.3); }
.schol-low         { background: rgba(99,102,241,0.15);  color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.schol-very-low    { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.schol-na          { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }

/* ============================================================
   Auth modal & sidebar widgets
   ============================================================ */

/* Modal backdrop */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: fade-in .15s ease;
}
@keyframes fade-in { from { opacity:0 } to { opacity:1 } }

/* Modal card */
.modal-card {
    background: var(--bg-card, #1a1f2e);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 100%; max-width: 420px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    animation: slide-up .2s ease;
}
@keyframes slide-up { from { transform: translateY(16px); opacity:0 } to { transform:translateY(0); opacity:1 } }

.modal-close {
    position: absolute; top: 16px; right: 18px;
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 1.4rem; line-height: 1;
    padding: 4px 8px; border-radius: 6px;
    transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }

.modal-header { text-align: center; margin-bottom: 24px; }
.modal-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.25));
    border: 1px solid rgba(99,102,241,.35);
    margin-bottom: 14px; color: var(--accent);
}
.modal-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.modal-sub { font-size: .85rem; color: var(--text-secondary); margin: 0; }

/* Form input */
.form-input {
    width: 100%; padding: 11px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; color: var(--text-primary);
    font-size: .9rem; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.form-input::placeholder { color: var(--text-secondary); opacity: .7; }

/* Scholarship Finder — ECA checkbox grid */
.eca-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.eca-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.eca-checkbox-grid label:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.06);
}
.eca-checkbox-grid input[type="checkbox"] {
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.schol-autofill-note {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--accent-primary-light);
}

/* Password toggle */
.input-pw-wrap { position: relative; }
.input-pw-wrap .form-input { padding-right: 42px; }
.pw-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); padding: 2px;
    display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--text-primary); }

/* Full-width button */
.btn-full { width: 100%; justify-content: center; margin-top: 6px; }

/* Error message */
.auth-error {
    font-size: .8rem; color: #f87171;
    background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.25);
    border-radius: 8px; padding: 8px 12px; margin-bottom: 10px;
}
.auth-link--on-error { color: #fca5a5; font-size: inherit; }

/* Success message */
.auth-success {
    font-size: .8rem; color: #4ade80;
    background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25);
    border-radius: 8px; padding: 8px 12px; margin-bottom: 10px;
}

/* ── Profile Full-Page ── */
.profile-page-hero {
    display: flex; align-items: center; gap: 22px;
    margin-bottom: 20px; padding: 26px 28px;
}
.profile-page-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #1a6b5c, #1e4d8c);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.profile-page-info h2 { margin: 0 0 4px; font-size: 1.4rem; color: var(--text-primary); }
.profile-page-info span { font-size: .85rem; color: var(--text-secondary); }

.profile-section-title {
    margin: 0 0 20px; font-size: .95rem; font-weight: 600; color: var(--text-primary);
}

.profile-tabs {
    display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 16px;
}
.profile-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; font-size: .83rem; font-weight: 500;
    border: none; background: none; cursor: pointer;
    color: var(--text-secondary); border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.profile-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.profile-tab:hover:not(.active) { color: var(--text-primary); }

.profile-panel { min-height: 200px; }
.profile-panel--page { min-height: 280px; }
.profile-log-list { display: flex; flex-direction: column; gap: 2px; }

.profile-log-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px;
    transition: background .12s;
}
.profile-log-item:hover { background: rgba(255,255,255,.04); }
.profile-log-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.profile-log-label {
    flex: 1; font-size: .82rem; color: var(--text-primary);
    display: flex; flex-direction: column; gap: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-file-name { font-size: .82rem; color: var(--text-primary); }
.profile-file-type { font-size: .72rem; color: var(--text-secondary); }
.profile-log-ts { font-size: .72rem; color: var(--text-secondary); flex-shrink: 0; }

.profile-empty {
    text-align: center; color: var(--text-secondary);
    font-size: .85rem; padding: 40px 20px;
}

.profile-panel-footer {
    display: flex; justify-content: flex-end;
    padding-top: 10px; margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.btn-text-sm {
    background: none; border: none; cursor: pointer;
    font-size: .75rem; color: var(--text-secondary);
    padding: 4px 8px; border-radius: 5px;
    transition: color .15s, background .15s;
}
.btn-text-sm:hover { color: #f87171; background: rgba(248,113,113,.08); }

/* Address form grid */
.addr-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 520px) { .addr-row { grid-template-columns: 1fr; } }

/* Switch link */
.auth-switch { text-align: center; font-size: .82rem; color: var(--text-secondary); margin-top: 18px; }
.auth-link {
    background: none; border: none; cursor: pointer;
    color: var(--accent); font-weight: 600; font-size: inherit;
    padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.auth-link:hover { color: #22897a; }

/* ── Sidebar auth widget ── */
.auth-widget {
    display: flex; flex-direction: column; gap: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 12px 12px;
    margin-bottom: 4px;
}

.auth-widget-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
    margin-bottom: 10px;
    text-align: center;
}

/* Primary Sign In button */
.auth-signin-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 10px 14px; border-radius: 9px;
    font-size: .85rem; font-weight: 700; cursor: pointer;
    border: none; transition: background .18s, transform .15s, box-shadow .18s;
    background: linear-gradient(135deg, #1a6b5c 0%, #1a5c8c 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26,107,92,0.4);
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}
.auth-signin-btn:hover {
    background: linear-gradient(135deg, #22897a 0%, #1e6daa 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(26,107,92,0.5);
}
.auth-signin-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(26,107,92,0.3); }

/* Secondary Create Account button */
.auth-signup-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 9px 14px; border-radius: 9px;
    font-size: .82rem; font-weight: 600; cursor: pointer;
    background: rgba(255,255,255,0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.12);
    transition: background .18s, color .15s, border-color .15s;
    margin-bottom: 0;
}
.auth-signup-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #f0f6ff;
    border-color: rgba(255,255,255,0.22);
}

/* Accent "My Profile" button */
.auth-nav-btn--accent {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 8px 12px; border-radius: 9px;
    font-size: .8rem; font-weight: 500; cursor: pointer;
    border: 1px solid rgba(26,107,92,.5);
    background: rgba(26,107,92,.18); color: #6ee7b7;
    transition: background .15s, color .15s;
    margin-top: 6px;
}
.auth-nav-btn--accent:hover { background: rgba(26,107,92,.3); color: #a7f3d0; }

/* Ghost Sign Out button */
.auth-nav-btn--ghost {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 8px 12px; border-radius: 9px;
    font-size: .8rem; font-weight: 500; cursor: pointer;
    background: transparent;
    color: #94a3c0;
    border: 1px solid rgba(255,255,255,.08);
    transition: background .15s, color .15s;
    margin-top: 6px;
}
.auth-nav-btn--ghost:hover { background: rgba(255,255,255,.06); color: #f0f4ff; }

/* Logged-in user row */
.auth-user-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px; margin-bottom: 3px;
}
.auth-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700; color: #fff;
}
.auth-user-info { overflow: hidden; }
.auth-user-name  { display: block; font-size: .82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-user-email { display: block; font-size: .7rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Areas-of-concern req-gap items */
.weak-req-gap { color: #d97706; }

/* ============================================================
   ACADEMIC LIGHT THEME — Component Overrides
   ============================================================ */

/* Global accent shorthand */
:root { --accent: #1a6b5c; }

/* Heading scale — Caveat reads larger than Inter at same size */
h1 { font-size: 2.2rem; letter-spacing: -0.01em; }
h2 { font-size: 1.8rem; letter-spacing: -0.01em; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 0.95rem; }

/* Stat card big numbers inherit Caveat beautifully */
.stat-card h2 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.01em; }

/* ── Sidebar: stays dark ── */
.sidebar {
    background: #141b2d;
    border-right-color: rgba(26, 107, 92, 0.2);
}
.sidebar .logo-glow { background: #1a6b5c; }
.logo-wordmark { font-family: 'Outfit', sans-serif; color: #f0f4ff !important; }
.logo-arr { color: #22897a !important; }
.sidebar .nav-btn { color: #94a3c0; }
.sidebar .nav-btn:hover { background: rgba(255, 255, 255, 0.06); color: #f0f4ff; }
.sidebar-footer { border-top-color: rgba(255, 255, 255, 0.07); }
.sidebar-footer p { color: #475569; }

/* Keep sidebar headings and logo clean (not handwritten) */
.sidebar h1, .sidebar h2, .sidebar h3, .sidebar h4, .sidebar h5,
.logo-wordmark { font-family: 'Outfit', system-ui, sans-serif; }

/* ── Glass cards → white ── */
.glass-card {
    background: #ffffff;
    border-color: rgba(26, 31, 46, 0.1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.glass-card:hover {
    border-color: rgba(26, 107, 92, 0.25);
    box-shadow: 0 4px 24px rgba(26, 107, 92, 0.1);
}

/* ── Top bar ── */
.top-bar { border-bottom-color: rgba(26, 31, 46, 0.08); }
.api-status {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(26, 31, 46, 0.1);
    color: #5a6477;
}

/* ── Badge default ── */
.badge {
    background: rgba(26, 107, 92, 0.08);
    color: #1a6b5c;
    border-color: rgba(26, 107, 92, 0.2);
}

/* ── Secondary / ghost buttons ── */
.btn-secondary {
    background: rgba(26, 31, 46, 0.05);
    color: #1e2028;
    border-color: rgba(26, 31, 46, 0.15);
}
.btn-secondary:hover {
    background: rgba(26, 31, 46, 0.1);
    border-color: #1a6b5c;
}
.btn-small {
    background: rgba(26, 31, 46, 0.05);
    color: #1a6b5c;
    border-color: rgba(26, 31, 46, 0.12);
}
.btn-small:hover { background: rgba(26, 31, 46, 0.1); }

/* ── Form elements → light ── */
.form-select {
    background: #f8f5f0;
    border-color: rgba(26, 31, 46, 0.15);
    color: #1e2028;
}
.form-select:focus { border-color: #1a6b5c; box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.12); }
.form-select option { background: #ffffff; color: #1e2028; }

/* ── Auth modal card → dark navy ── */
.modal-card {
    background: #1a1f2e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.modal-close { color: #94a3c0; }
.modal-close:hover { background: rgba(255, 255, 255, 0.07); color: #f0f4ff; }
.modal-title { color: #f0f4ff; }
.modal-sub { color: #94a3c0; }
.modal-card .form-label { color: #94a3c0; }

/* Auth form inputs inside modal */
.modal-card .form-input {
    background: #252b3b;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f0f4ff;
}
.modal-card .form-input:focus {
    border-color: #22897a;
    box-shadow: 0 0 0 3px rgba(34, 137, 122, 0.15);
}
.modal-card .form-input::placeholder { color: #6b7a9b; opacity: 1; }
.modal-card .forgot-link,
.modal-card .auth-switch-link { color: #22897a; }
.modal-card .auth-switch-link:hover,
.modal-card .forgot-link:hover { color: #2aab99; }

/* Auth widget sidebar — already using correct dark colours via class definitions above */
.auth-user-row {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
}
.auth-avatar { background: linear-gradient(135deg, #1a6b5c, #1e4d8c); }
.auth-user-name { color: #f0f4ff; }
.auth-user-email { color: #94a3c0; }
.auth-link { color: #1a6b5c; }
.auth-link:hover { color: #22897a; }

/* ── Academic section underline accent (opt-in via .card-title) ── */
.card-title {
    position: relative;
    padding-bottom: 0.55rem;
}
.card-title::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2.5px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* ── Subtle ruled lines on main background ── */
.main-content {
    background-image: repeating-linear-gradient(
        transparent 0px,
        transparent 39px,
        rgba(26, 31, 46, 0.025) 39px,
        rgba(26, 31, 46, 0.025) 40px
    );
}

/* ── Section label row tag ── */
.section-tag {
    background: rgba(26, 107, 92, 0.1);
    color: #1a6b5c;
    border-color: rgba(26, 107, 92, 0.2);
}

/* ── Ensure hero section uses light bg ── */
.hero-section { background: transparent; }

/* ── Table styling for light mode ── */
.history-table th {
    background: rgba(26, 31, 46, 0.04);
    color: #5a6477;
    border-bottom-color: rgba(26, 31, 46, 0.1);
}
.history-table td { border-bottom-color: rgba(26, 31, 46, 0.06); color: #1e2028; }
.history-table tr:hover td { background: rgba(26, 107, 92, 0.04); }

/* ── Input placeholder light ── */
input::placeholder, textarea::placeholder { color: #94a3b8; opacity: 1; }

/* ── Advisor/UC results: hardcoded dark-mode color fixes ── */
.strength-block h5 { color: var(--text-secondary); }
.strength-block li { color: #1e2028; border-bottom-color: rgba(26,31,46,0.08); }

.gap-analysis-text {
    color: #1e2028;
    background: rgba(26,107,92,0.06);
    border-left-color: #1a6b5c;
}

.uni-card {
    background: rgba(26,31,46,0.02);
    border-color: rgba(26,31,46,0.1);
}
.uni-card-name { color: #1e2028; }
.uni-card-name-link { color: inherit; }
.uni-card-program { color: #5a6477; }
.uni-notes { color: #5a6477; }

/* Likelihood: indigo "match" → navy */
.likelihood-3 { background: rgba(30,77,140,0.12); color: #1e4d8c; border-color: rgba(30,77,140,0.25); }

/* UCAS tariff box */
.ucas-pts-box {
    background: rgba(26,107,92,0.1);
    border-color: rgba(26,107,92,0.25);
}
.ucas-label { color: #5a6477; }
.ucas-pts   { color: #1a6b5c; }

/* Scholarship low tier: indigo → navy */
.schol-low { background: rgba(30,77,140,0.1); color: #1e4d8c; border-color: rgba(30,77,140,0.2); }

/* Modal icon box */
.modal-icon {
    background: linear-gradient(135deg, rgba(26,107,92,0.15), rgba(30,77,140,0.15));
    border-color: rgba(26,107,92,0.25);
    color: #1a6b5c;
}

/* Accordion / expand areas */
.accordion-header, .expand-header {
    background: rgba(26,31,46,0.03);
    border-color: rgba(26,31,46,0.08);
}

/* Tier section header */
.tier-section-hdr { color: #5a6477; }

/* Chart container background */
.chart-container { background: transparent; }

/* ── UCAS compare / tariff elements ── */
.ucas-compare-row { color: #5a6477; }
.ucas-total-badge {
    background: rgba(26,107,92,0.1) !important;
    border-color: rgba(26,107,92,0.25) !important;
}
.ucas-label { color: #5a6477 !important; }
.ucas-pts   { color: #1a6b5c !important; }

/* ── Bridge / warning note box ── */
.bridge-box { color: #5a6477; }

/* ── Tier notes text ── */
.tier-notes-text, .tier-desc { color: #5a6477; }

/* ══════════════════════════════════════════════════════════
   BD ADVISOR (SSC / HSC) — Layout & Components
   ══════════════════════════════════════════════════════════ */
.bd-advisor-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .bd-advisor-layout { grid-template-columns: 1fr; }
}

.bd-input-panel { padding: 26px 24px; }
.bd-panel-header { margin-bottom: 20px; }
.bd-panel-header h3 { font-size: 1.15rem; font-weight: 700; color: #1e2028; margin-bottom: 6px; }
.bd-panel-header p  { font-size: .85rem; color: #5a6477; line-height: 1.5; }

.bd-stream-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-stream-pill {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(26,31,46,0.15);
    background: #f8f5f0;
    color: #5a6477;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}
.bd-stream-pill.active,
.bd-stream-pill:hover {
    background: linear-gradient(135deg, #1a6b5c, #1e4d8c);
    color: #fff;
    border-color: transparent;
}

.bd-grade-table-wrap { overflow-x: auto; margin-top: 4px; }
.bd-grade-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bd-grade-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    border-bottom: 1.5px solid rgba(26,31,46,0.08);
}
.bd-grade-table td { padding: 7px 10px; border-bottom: 1px solid rgba(26,31,46,0.05); }
.bd-grade-table select {
    background: #f8f5f0;
    border: 1.5px solid rgba(26,31,46,0.14);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: .83rem;
    color: #1e2028;
    outline: none;
    cursor: pointer;
    min-width: 80px;
}
.bd-grade-table select option { background: #ffffff; color: #1e2028; }

.bd-results-panel { display: flex; flex-direction: column; gap: 18px; }

.bd-gpa-card { padding: 24px; text-align: center; }
.bd-gpa-display { margin-bottom: 14px; }
.bd-gpa-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1a6b5c;
    line-height: 1;
}
.bd-gpa-label { font-size: .78rem; color: #94a3b8; font-weight: 600; margin-top: 4px; }
.bd-gpa-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(26,31,46,0.08);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 10px;
}
.bd-gpa-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #1a6b5c, #1e4d8c);
    transition: width .6s cubic-bezier(.4,0,.2,1);
    width: 0%;
}
.bd-gpa-verdict {
    font-size: .82rem;
    color: #5a6477;
    margin: 0;
    line-height: 1.4;
}

.bd-combined-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.bd-combined-item { text-align: center; }
.bd-combined-total .bd-gpa-number { color: #1e4d8c; font-size: 3.2rem; }
.bd-combined-plus {
    font-size: 1.6rem;
    font-weight: 300;
    color: #94a3b8;
}

.bd-subject-breakdown { display: flex; flex-direction: column; gap: 8px; }
.bd-subject-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .84rem;
}
.bd-subject-name { flex: 1; color: #1e2028; }
.bd-subject-grade {
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: .78rem;
    min-width: 36px;
    text-align: center;
}
.grade-badge-aplus { background: rgba(22,163,74,.12); color: #16a34a; }
.grade-badge-a     { background: rgba(26,107,92,.12); color: #1a6b5c; }
.grade-badge-aminus{ background: rgba(30,77,140,.12); color: #1e4d8c; }
.grade-badge-b     { background: rgba(59,130,246,.12); color: #3b82f6; }
.grade-badge-c     { background: rgba(217,119,6,.12); color: #d97706; }
.grade-badge-d     { background: rgba(234,88,12,.12); color: #ea580c; }
.grade-badge-f     { background: rgba(220,38,38,.12); color: #dc2626; }

.bd-recommendation-box {
    background: rgba(26,107,92,0.05);
    border: 1px solid rgba(26,107,92,0.15);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: .87rem;
    color: #1e2028;
    line-height: 1.6;
}
.bd-recommendation-box strong { color: #1a6b5c; }

.bd-eligibility-list { display: flex; flex-direction: column; gap: 10px; }
.bd-eligibility-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(26,31,46,0.08);
    font-size: .84rem;
}
.bd-elig-icon { font-size: 1.1rem; line-height: 1.4; flex-shrink: 0; }
.bd-elig-info { flex: 1; }
.bd-elig-name { font-weight: 700; color: #1e2028; margin-bottom: 2px; }
.bd-elig-note { color: #5a6477; font-size: .8rem; }
.bd-elig-status { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.elig-yes  { background: rgba(22,163,74,.1);  color: #16a34a; }
.elig-maybe{ background: rgba(217,119,6,.1); color: #d97706; }
.elig-no   { background: rgba(220,38,38,.1); color: #dc2626; }

.bd-uni-eligibility { display: flex; flex-direction: column; gap: 12px; }
.bd-uni-item {
    border-left: 3px solid #1a6b5c;
    padding: 12px 14px;
    background: rgba(26,107,92,0.04);
    border-radius: 0 10px 10px 0;
    font-size: .84rem;
}
.bd-uni-item.tier-elite { border-left-color: #1e4d8c; background: rgba(30,77,140,0.05); }
.bd-uni-item.tier-strong{ border-left-color: #1a6b5c; }
.bd-uni-item.tier-good  { border-left-color: #d97706; background: rgba(217,119,6,0.04); }
.bd-uni-item.tier-private    { border-left-color: #94a3b8; background: rgba(148,163,184,0.06); }
.bd-uni-item.tier-accessible { border-left-color: #94a3b8; background: rgba(148,163,184,0.04); }
.bd-uni-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; gap: 10px; }
.bd-uni-name { font-weight: 700; color: #1e2028; }
.bd-uni-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    white-space: nowrap;
    background: rgba(26,31,46,0.07);
    color: #5a6477;
}
.bd-uni-note { color: #5a6477; line-height: 1.5; }
.bd-uni-eligible   { background: rgba(22,163,74,.1);  color: #16a34a; }
.bd-uni-maybe      { background: rgba(217,119,6,.1); color: #d97706; }
.bd-uni-ineligible { background: rgba(220,38,38,.1); color: #dc2626; }

.bd-intl-equiv { display: flex; flex-direction: column; gap: 10px; }
.bd-intl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f5f0;
    border-radius: 8px;
    font-size: .84rem;
}
.bd-intl-system { color: #5a6477; font-weight: 600; }
.bd-intl-equiv-val { font-weight: 700; color: #1e2028; }

/* Board selector in diagnostics */
.board-selector { margin-bottom: 18px; }
.board-selector-label {
    display: block;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #94a3b8;
    margin-bottom: 10px;
}
.board-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.board-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(26,31,46,0.14);
    background: #f8f5f0;
    color: #5a6477;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    user-select: none;
}
.board-pill input[type="radio"] { display: none; }
.board-pill.active,
.board-pill:has(input:checked) {
    background: linear-gradient(135deg, #1a6b5c, #1e4d8c);
    color: #fff;
    border-color: transparent;
}

/* ── Copyright footer ── */
.app-copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 6px 12px;
    font-size: .7rem;
    color: #94a3b8;
    background: rgba(247,243,236,0.85);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(26,31,46,0.06);
    pointer-events: none;
    z-index: 10;
}
.main-content { padding-bottom: 32px; }

/* ── Sidebar nav group labels ── */
.nav-group-label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,0.35);
    padding: 16px 16px 5px;
    user-select: none;
}

/* ── "Tools" nav buttons (University Checker / Scholarship Finder / Mock Tests) ──
   Subtly differentiated from plain nav items, not a bold standalone CTA. */
.nav-btn--uni {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}
.nav-btn--uni:hover { background: rgba(255, 255, 255, 0.07); }

/* ── UC Curriculum chooser ── */
.uc-curriculum-chooser {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(26,31,46,0.08);
    padding: 32px 36px 28px;
    margin-bottom: 24px;
    text-align: center;
}
.uc-curric-pills {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.uc-curric-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 30px;
    border-radius: 14px;
    border: 2px solid rgba(26,31,46,0.12);
    background: #f8f5f0;
    color: #1e2028;
    cursor: pointer;
    transition: all .2s;
    min-width: 200px;
    font-family: inherit;
}
.uc-curric-pill:hover {
    border-color: #1a6b5c;
    background: rgba(26,107,92,0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,107,92,0.12);
}
.uc-curric-name { font-weight: 700; font-size: .97rem; }
.uc-curric-desc { font-size: .78rem; color: #5a6477; text-align: center; }

/* ── Admin nav button (subtle, always visible) ── */
.nav-btn--admin {
    opacity: 0.55;
    font-size: .78rem;
}
.nav-btn--admin:hover { opacity: 0.8; }
.nav-btn--admin.active { opacity: 1; }

/* ── BD eligibility icon placeholder ── */
.bd-elig-icon-placeholder { width: 1.6rem; flex-shrink: 0; }

/* ── Admin user status badges ── */
.user-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.user-status-badge.active    { background: rgba(26,107,92,.15); color: #34d399; }
.user-status-badge.suspended { background: rgba(251,191,36,.15); color: #fbbf24; }
.user-status-badge.banned    { background: rgba(239,68,68,.15);  color: #f87171; }

/* ── Admin per-row action buttons ── */
.admin-actions-cell { white-space: nowrap; }
.admin-act-btn {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-right: 4px;
    transition: opacity .15s;
}
.admin-act-btn:hover   { opacity: .8; }
.admin-act-btn:disabled { opacity: .35; cursor: not-allowed; }
.admin-act-btn.act-ban     { background: rgba(239,68,68,.18); color: #f87171; }
.admin-act-btn.act-unban   { background: rgba(26,107,92,.18); color: #34d399; }
.admin-act-btn.act-suspend   { background: rgba(251,191,36,.18); color: #fbbf24; }
.admin-act-btn.act-unsuspend { background: rgba(26,107,92,.18);  color: #34d399; }
.admin-act-btn.act-pw      { background: rgba(99,102,241,.18); color: #818cf8; }


/* ============================================================
   Arrow AI Chat Widget
   ============================================================ */
#chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

#chat-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(26,107,92,.4);
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
}

#chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(26,107,92,.55);
}

#chat-fab i { width: 24px; height: 24px; }

#chat-panel {
    width: 340px;
    max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,.16);
    border: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 520px;
}

#chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: .86rem;
    min-height: 160px;
}

.chat-msg {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg.user {
    background: var(--gradient-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
    background: var(--bg-primary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.chat-msg.thinking {
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-primary);
    border: 1px dashed var(--border-color, #e2e8f0);
    align-self: flex-start;
}

/* Markdown rendering inside assistant chat bubbles */
.chat-msg.assistant p { margin: 0 0 8px; }
.chat-msg.assistant p:last-child { margin-bottom: 0; }
.chat-msg.assistant strong.chat-h {
    display: block;
    margin: 8px 0 4px;
    font-size: .92rem;
    color: var(--text-primary);
}
.chat-msg.assistant strong.chat-h:first-child { margin-top: 0; }
.chat-msg.assistant .chat-ul {
    margin: 4px 0 8px 16px;
    padding: 0;
}
.chat-msg.assistant .chat-ul li { margin-bottom: 3px; }
.chat-msg.assistant code {
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 4px;
}
.chat-msg.assistant pre {
    background: rgba(0,0,0,0.07);
    border-radius: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 6px 0;
}
.chat-msg.assistant pre code {
    background: none;
    padding: 0;
    font-size: .8rem;
}
.chat-hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 8px 0;
}

#chat-auth-notice {
    padding: 20px 16px;
    text-align: center;
    font-size: .85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

#chat-auth-notice p { margin-bottom: 12px; }

#chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-shrink: 0;
}

#chat-input {
    flex: 1;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: .85rem;
    resize: none;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    outline: none;
    max-height: 100px;
    line-height: 1.4;
}

#chat-input:focus { border-color: var(--accent-primary); }

#chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: opacity .2s;
}

#chat-send-btn:disabled { opacity: .5; cursor: default; }
#chat-send-btn i { width: 16px; height: 16px; }
