:root {
    /* Color Palette - Premium Dark AI */
    --bg-dark: #030712;
    --bg-card: #111827;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #8b5cf6;
    --text-white: #f9fafb;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-gray: #9ca3af;

    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(17, 24, 39, 0.7);

    --radius: 12px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
}

/* Typography defaults */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(129, 140, 248, 0.3));
}

/* Utilities */
.text-lg {
    font-size: 1.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 2.5rem;
    /* Increased from 1.5rem/default to let UI breathe */
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-auto {
    margin-top: auto;
}

.mr-2 {
    margin-right: 0.5rem;
}

.pt-4 {
    padding-top: 1rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-gray);
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: 700;
}

.uppercase {
    text-transform: uppercase;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-start {
    justify-content: flex-start;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.inline {
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Glass Cards (Onboarding) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Form Elements */
input,
select,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 14px 16px;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

.hidden {
    display: none !important;
}

/* Mentors Grid (Onboarding) */
.mentors-grid {
    display: grid;
    gap: 1.5rem;
}

.mentor-card {
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 2rem;
}

.mentor-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
}

.avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Layout Onboarding */
.onboarding-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-section {
    padding: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* DASHBOARD LAYOUT (PRO) */
/* Force layout structure */
html,
body {
    height: 100%;
    margin: 0;
    /* overflow: hidden; Removed to allow scrolling on onboarding */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.dashboard-container {
    display: flex;
    /* THIS MUST BE FLEX */
    flex-direction: row;
    /* Default row */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--bg-dark);
}

.sidebar {
    width: 300px;
    min-width: 300px;
    /* Force width */
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    /* High contrast dark */
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    /* Take remaining space */
    height: 100%;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    /* Scroll inside content only */
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 40%);
}

.mentor-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    color: var(--text-gray);
}

.mentor-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.mentor-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: white;
}

.mentor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-top: 1rem;
}

.messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 1rem;
}

.msg {
    max-width: 80%;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.5;
    animation: fadeInUp 0.3s ease-out;
}

.msg.bot {
    background: rgba(255, 255, 255, 0.05);
    border-top-left-radius: 4px;
    margin-right: auto;
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
}

.msg.user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-top-right-radius: 4px;
    margin-left: auto;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
        overflow: hidden;
        /* Keep hidden to prevent body scroll when menu open */
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        /* Off-screen */
        width: 85%;
        /* Not full width so user can click out */
        max-width: 320px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        border-right: 1px solid var(--glass-border);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        background: var(--bg-dark);
        /* Ensure opaque background */
    }

    .sidebar.open {
        left: 0;
    }

    /* Overlay when sidebar matches */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        width: 100%;
        height: 100vh;
        /* Full height */
        padding: 1rem;
    }

    /* Mobile Header adjustments */
    header {
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: inline-flex !important;
        margin-right: 1rem;
    }
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

/* Choice Chip Component (Airbnb/Quora Style) */
.choice-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .choice-chip-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.choice-chip {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    /* Standardize to 12px */
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    /* Fill grid cell */
    height: 100%;
    /* Consistent height */
    user-select: none;
}

.choice-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
    color: var(--text-white);
}

.choice-chip.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.choice-chip.selected::before {
    content: '✓';
    margin-right: 8px;
    font-weight: bold;
    font-size: 0.8rem;
}


/* Executive Grid Layout */
.executive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .executive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.department-selector {
    margin-bottom: 3.5rem;
}

.department-selector h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.mentor-selection-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    /* Side by side layout */
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.mentor-selection-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.mentor-selection-card.selected {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 40px -10px rgba(99, 102, 241, 0.3);
}

.mentor-selection-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.mentor-selection-card.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mentor-selection-card .avatar {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    /* Soft square instead of circle */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.mentor-profile {
    flex: 1;
}

.mentor-profile h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.mentor-profile .role {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mentor-profile .bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

/* Restored Radio Card Styles - Square Card Design */
.radio-card {
    display: block;
    cursor: pointer;
    position: relative;
    margin-bottom: 0;
    /* Remove margin as grid handles gap */
    height: 100%;
}

.radio-card input {
    display: none !important;
    /* Force hide */
    opacity: 0;
    pointer-events: none;
}

.radio-card span {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    height: 100%;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-gray);
}

.radio-card:hover span {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    color: white;
    transform: translateY(-2px);
}

.radio-card input:checked+span {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 20px -5px rgba(99, 102, 241, 0.4);
    font-weight: 700;
}