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

:root {
    --bg-dark: #0c0a1d;
    --bg-sidebar: #110e2b;
    --bg-card: rgba(22, 19, 52, 0.85);
    --bg-card-hover: rgba(30, 26, 70, 0.9);
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ─── LIGHT MODE ─── */
body.light {
    --bg-dark: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(245, 245, 255, 0.95);
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    margin-right: 0.5rem;
}

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


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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    margin-bottom: 2rem;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-spacer { flex: 1; }

/* ─── MAIN CONTENT ─── */
.main {
    margin-left: 240px;
    flex: 1;
    padding: 1.5rem 2rem;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.top-bar p { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ─── CARDS ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-header a {
    color: var(--primary-light);
    font-size: 0.8rem;
    text-decoration: none;
}

/* ─── PAGE LAYOUTS ─── */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.4s ease; }

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

/* ─── DASHBOARD PAGE ─── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.career-matches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.match-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.match-card .rank {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.match-card .career-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.3rem;
    margin-bottom: 0.2rem;
}

.match-card .match-score { font-size: 0.75rem; color: var(--text-muted); }

.match-card .progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin-top: 0.8rem;
    overflow: hidden;
}

.match-card .progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.match-card:nth-child(1) .progress-fill { background: var(--success); }
.match-card:nth-child(2) .progress-fill { background: var(--primary); }
.match-card:nth-child(3) .progress-fill { background: var(--warning); }

/* Profile Summary */
.profile-card { text-align: center; }

.donut-chart {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 1rem auto;
}

.donut-chart svg { transform: rotate(-90deg); }

.donut-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 12;
}

.donut-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 1.5s ease;
}

.donut-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-text .percent { font-size: 1.8rem; font-weight: 800; }
.donut-text .label { font-size: 0.7rem; color: var(--text-muted); display: block; }

.fit-bars { text-align: left; margin-top: 1.2rem; }

.fit-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.fit-bar {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.fit-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.2s ease;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.category-item {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.category-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.category-item span { font-size: 0.72rem; color: var(--text-muted); }

/* Next Step */
.next-step {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.next-step h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.next-step p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ─── ASSESSMENT PAGE ─── */
.assessment-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.assess-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.assess-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.assess-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.assess-card h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.assess-card p { font-size: 0.78rem; color: var(--text-muted); }

.assess-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.assess-status.completed { color: var(--success); }
.assess-status.pending { color: var(--warning); }

.progress-section { margin-top: 1rem; }

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-header span { font-size: 0.85rem; }

.progress-track {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.progress-track-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 1.5s ease;
}

.info-banner {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.info-banner h4 { margin-bottom: 0.4rem; }
.info-banner p { font-size: 0.85rem; color: var(--text-muted); }

/* ─── ASSESSMENT FORM (STEP FORM) ─── */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }

.form-step h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.3rem; }
.form-step .subtitle { color: var(--text-muted); margin-bottom: 1.5rem; }

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
}

.option-card {
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.option-card:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.option-card.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* ─── RECOMMENDED CAREERS PAGE ─── */
.rec-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.rec-main-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.match-badge {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.rec-main-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.rec-main-card .desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1rem; }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
}

.why-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.why-list { list-style: none; margin-top: 0.8rem; }

.why-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.why-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

.salary-card {
    margin-top: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(139, 92, 246, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.salary-card h4 { font-size: 0.85rem; color: var(--text-muted); }
.salary-card .amount { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.salary-card .exp { font-size: 0.75rem; color: var(--text-muted); }

.other-careers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.other-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
}

.other-card h5 { font-size: 0.85rem; margin: 0.5rem 0 0.2rem; }
.other-card .score { color: var(--primary-light); font-size: 0.8rem; font-weight: 600; }
.other-card .details { font-size: 0.72rem; color: var(--text-muted); }

/* ─── CAREER PATH PAGE ─── */
.path-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.path-step {
    text-align: center;
    padding: 1.2rem 0.5rem;
}

.path-step-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin: 0 auto 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.path-step h5 { font-size: 0.82rem; margin-bottom: 0.2rem; }
.path-step .duration { font-size: 0.7rem; color: var(--text-muted); }

.path-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.path-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}

.path-detail-card h4 { font-size: 0.9rem; margin-bottom: 0.8rem; }

.path-list { list-style: none; }

.path-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.path-list li::before {
    content: '●';
    color: var(--primary);
    font-size: 0.5rem;
}

.motivational-banner {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover { background: #5558e6; transform: translateY(-1px); }

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

.btn-outline:hover { background: rgba(255,255,255,0.05); }

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

.btn-sm { padding: 0.45rem 1rem; font-size: 0.78rem; }

/* ─── LOGIN PAGE ─── */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.login-card {
    width: 400px;
    padding: 2.5rem;
}

.login-card h2 { text-align: center; margin-bottom: 0.3rem; }
.login-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.88rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.82rem; margin-bottom: 0.4rem; color: var(--text-muted); }

.form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--primary); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* ─── LOADING ─── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 29, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .rec-layout { grid-template-columns: 1fr; }
    .career-matches { grid-template-columns: repeat(2, 1fr); }
    .path-steps { grid-template-columns: repeat(3, 1fr); }
    .path-details { grid-template-columns: 1fr 1fr; }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    margin-right: 1rem;
    padding: 0;
}

@media (max-width: 768px) {
    .sidebar { 
        position: fixed;
        left: -260px;
        transition: left 0.3s ease;
        z-index: 2000;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }
    .sidebar.mobile-open { left: 0; }
    .mobile-menu-btn { display: block; }
    .main { margin-left: 0; padding: 1rem; }
    .top-bar { align-items: flex-start; }
    .career-matches { grid-template-columns: 1fr; }
    .assessment-cards { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .other-careers { grid-template-columns: 1fr; }
    .path-steps { grid-template-columns: repeat(2, 1fr); }
    .path-details { grid-template-columns: 1fr; }
}
