/* ============================================================
   FinTrack Student – Global Stylesheet
   Font: Plus Jakarta Sans | Palette: Blue #2B4EFF dominant
   ============================================================ */

:root {
    --blue:       #2B4EFF;
    --blue-dark:  #1A35D4;
    --blue-light: #EEF1FF;
    --accent:     #00C49F;
    --orange:     #FF8C42;
    --red:        #FF4D4D;
    --text:       #1A1D2E;
    --muted:      #6B7280;
    --border:     #E5E7EB;
    --bg:         #F9FAFB;
    --white:      #FFFFFF;
    --radius:     12px;
    --radius-lg:  20px;
    --shadow:     0 4px 24px rgba(43,78,255,0.10);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
    --font:       'Plus Jakarta Sans', sans-serif;
    --nav-h:      68px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all .2s ease;
    font-family: var(--font);
}
.btn-primary {
    background: var(--blue);
    color: var(--white);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(43,78,255,0.30); }

.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-light); }

.btn-white {
    background: var(--white);
    color: var(--blue);
    font-weight: 700;
}
.btn-white:hover { background: #f0f3ff; transform: translateY(-1px); }

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }

/* ── Navbar ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
}
.navbar-inner {
    display: flex;
    align-items: center;
    height: var(--nav-h);
    gap: 32px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.brand-icon {
    width: 40px; height: 40px;
    background: var(--blue);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-icon.small { width: 28px; height: 28px; border-radius: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 1rem; color: var(--text); }
.brand-sub  { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.nav-links a {
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--muted);
    transition: all .15s;
}
.nav-links a:hover, .nav-links a.nav-active {
    color: var(--blue);
    background: var(--blue-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: .2s;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 16px;
    border-top: 1px solid var(--border);
    background: var(--white);
}
.mobile-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text);
}
.mobile-menu a:hover { background: var(--blue-light); color: var(--blue); }
.mobile-menu.open { display: flex; }

/* ── Section helpers ── */
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}
.section-sub {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 40px;
}
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--blue);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #1A35D4 0%, #2B4EFF 50%, #5B7FFF 100%);
    color: var(--white);
    padding: 72px 0;
    overflow: hidden;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    position: relative;
}
.hero-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-desc {
    font-size: 1rem;
    opacity: .85;
    margin-bottom: 32px;
    max-width: 480px;
}
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-avatars {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}
.avatar-stack { display: flex; }
.avatar-stack span {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; color: white;
    margin-left: -10px;
}
.avatar-stack span:first-child { margin-left: 0; }
.avatar-label { font-size: .82rem; opacity: .85; }

.hero-visual {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    font-size: .85rem;
    color: rgba(255,255,255,0.7);
}
.hero-visual-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    height: 100px;
    margin-bottom: 12px;
}
.bar {
    width: 28px;
    border-radius: 6px 6px 0 0;
    background: rgba(255,255,255,0.3);
    transition: height .4s ease;
}
.bar.active { background: var(--white); }

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.blue   { background: #EEF1FF; }
.stat-icon.green  { background: #ECFDF5; }
.stat-icon.purple { background: #F5F3FF; }
.stat-icon.orange { background: #FFF7ED; }
.stat-label  { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.stat-value  { font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-detail { font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* ── Cards / Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: 6px;
    color: var(--text);
}
.form-label .req { color: var(--red); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font);
    font-size: .9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(43,78,255,0.12);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: .9rem;
}
.radio-item input, .checkbox-item input { accent-color: var(--blue); width: 16px; height: 16px; cursor: pointer; }

.form-hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: .875rem;
    margin-bottom: 20px;
    display: none;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert.show { display: block; }

/* ── Page Hero (inner pages) ── */
.page-hero {
    background: linear-gradient(135deg, #1A35D4, #2B4EFF);
    color: var(--white);
    padding: 56px 0;
    text-align: center;
}
.page-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.page-hero p  { font-size: 1rem; opacity: .85; max-width: 560px; margin: 0 auto; }

/* ── Chart placeholder ── */
.chart-box {
    background: var(--bg);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: var(--muted);
    font-size: .875rem;
}

/* ── Badge / Tag ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .3px;
}
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-green  { background: #ECFDF5; color: #059669; }
.badge-orange { background: #FFF7ED; color: #C2410C; }

/* ── Progress bar ── */
.progress-bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 99px; transition: width .6s ease; }

/* ── Footer ── */
.footer {
    background: var(--text);
    color: rgba(255,255,255,.7);
    padding: 48px 0 28px;
}
.footer-inner { text-align: center; }
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 10px;
}
.footer-desc { font-size: .875rem; max-width: 420px; margin: 0 auto 24px; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 24px;
}
.footer-links a { font-size: .875rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.4); }

/* ── Utility ── */
.text-center { text-align: center; }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2,1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
}
@media (max-width: 640px) {
    .nav-links, .navbar > .container > .btn-primary { display: none; }
    .hamburger { display: flex; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 48px 0; }
    .section-title { font-size: 1.5rem; }
}
