/* ===================================================================
   MoneyWiseGuide Wealth Management Platform - Modern Design System
   =================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Brand Colors — matched to MoneyWiseGuide landing page */
    --primary: #0B1F3B;
    --primary-light: #1a365d;
    --primary-dark: #06101f;
    --accent: #FF7A21;
    --accent-hover: #e5651d;
    --accent-light: #FFF4EB;
    --accent-gradient: linear-gradient(135deg, #FF7A21 0%, #ff9f4d 100%);
    
    /* Semantic Colors */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    /* Typography — Poppins for brand, Inter for body (matching landing page) */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Poppins', 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-glass: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-card: 0 0 0 1px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 0 0 1px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.12);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --max-content: 1280px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- Utility Classes ---------- */
.container { max-width: var(--max-content); margin: 0 auto; padding: 0 var(--space-6); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-gray { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }

/* ---------- Navigation Bar ---------- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-bottom: none;
    z-index: 1000;
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.topbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.topbar-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    transition: var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: rgba(255, 122, 33, 0.15);
}
.nav-links a.active {
    color: #FFB366;
    background: rgba(255, 122, 33, 0.2);
}

.nav-links a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    white-space: nowrap;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(255,122,33,0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,122,33,0.4);
}

.btn-secondary {
    background: var(--primary);
    color: white;
}
.btn-secondary:hover { background: var(--primary-light); }

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-ghost:hover {
    background: var(--gray-50);
    color: var(--gray-900);
    border-color: var(--gray-400);
}

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.813rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-md); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

.btn:disabled, .btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: var(--space-2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: var(--space-6);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-subtitle {
    font-size: 0.813rem;
    color: var(--gray-500);
    margin-top: var(--space-1);
}

/* ---------- Stat Cards ---------- */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    transition: var(--transition-base);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.08);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }

.stat-label {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.813rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.stat-change.up { background: var(--success-bg); color: var(--success); }
.stat-change.down { background: var(--danger-bg); color: var(--danger); }

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-20);
    background: var(--primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(245,158,11,0.15);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    font-weight: 600;
    margin-bottom: var(--space-6);
    border: 1px solid rgba(245,158,11,0.25);
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-6);
}

.hero h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--gray-400);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-16);
    padding-top: var(--space-10);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-1);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* ---------- Grid Layouts ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* ---------- Features Section ---------- */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-12);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.1rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: var(--space-8);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover::before { opacity: 1; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    font-size: 1.5rem;
}

.feature-card h4 {
    margin-bottom: var(--space-3);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Fund Card ---------- */
.fund-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: var(--space-6);
    transition: var(--transition-base);
    cursor: pointer;
}

.fund-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-card-hover);
}

.fund-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.fund-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--gray-600);
    flex-shrink: 0;
}

.fund-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    line-height: 1.4;
}

.fund-category {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.fund-returns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.fund-return-item {
    text-align: center;
}

.fund-return-label {
    font-size: 0.7rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.fund-return-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.fund-return-value.positive { color: var(--success); }
.fund-return-value.negative { color: var(--danger); }

.fund-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-4);
}

.fund-nav {
    font-size: 0.813rem;
    color: var(--gray-500);
}

.fund-nav strong {
    color: var(--gray-800);
    font-family: var(--font-display);
}

/* ---------- How It Works ---------- */
.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    counter-reset: step;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step-card {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    counter-increment: step;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(245,158,11,0.15);
}

.step-card h4 {
    margin-bottom: var(--space-2);
    font-size: 1rem;
}

.step-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ---------- Dashboard Layout ---------- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: var(--space-6) 0;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-nav {
    list-style: none;
    padding: 0 var(--space-3);
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition-fast);
    margin-bottom: 2px;
}

.sidebar-nav li a svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-nav li a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.sidebar-nav li a.active {
    background: var(--accent-light);
    color: var(--accent-hover);
    font-weight: 600;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-4) var(--space-4) var(--space-2);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-8);
    min-height: calc(100vh - var(--header-height));
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.page-header h2 {
    font-size: 1.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.813rem;
    color: var(--gray-500);
    margin-bottom: var(--space-2);
}

.breadcrumb a { color: var(--accent); font-weight: 500; }

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.form-input::placeholder { color: var(--gray-400); }

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.form-input.success {
    border-color: var(--success);
}

.form-error {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: var(--space-1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

/* ---------- Tables ---------- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: var(--space-4);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges / Tags ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-500);
    transition: var(--transition-fast);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    right: var(--space-6);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
    min-width: 320px;
    max-width: 450px;
    animation: slideIn 0.3s ease-out;
}

.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast-info { border-color: var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: var(--space-6);
}

.tab {
    padding: var(--space-3) var(--space-5);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    cursor: pointer;
    background: none;
}

.tab:hover { color: var(--gray-700); }

.tab.active {
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- Charts Container ---------- */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ---------- Allocation Ring ---------- */
.allocation-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
}

.allocation-color {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.allocation-info { flex: 1; }
.allocation-name { font-size: 0.875rem; font-weight: 500; }
.allocation-pct { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); }

/* ---------- Progress Bar ---------- */
.progress-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    transition: width 0.6s ease-out;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--gray-300);
    margin-bottom: var(--space-6);
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: var(--space-6);
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--primary);
    padding: var(--space-16) 0 var(--space-8);
    color: var(--gray-400);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
    padding-bottom: var(--space-10);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: var(--space-4);
    max-width: 320px;
}

.footer-col h5 {
    font-size: 0.875rem;
    color: var(--white);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
    margin-bottom: var(--space-2);
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-6);
    font-size: 0.813rem;
}

.footer-badges {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ---------- Mobile menu toggle ---------- */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    background: none;
    color: rgba(255,255,255,0.85);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .steps-container { grid-template-columns: repeat(2, 1fr); }
    .steps-container::before { display: none; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; }
}

@media (max-width: 768px) {
    :root {
        --space-6: 1rem;
        --space-8: 1.5rem;
        --space-16: 3rem;
        --space-20: 4rem;
    }
    
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1rem; }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .nav-links { display: none; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
    .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
    
    .page-header { flex-direction: column; gap: var(--space-4); align-items: flex-start; }
    
    .main-content { padding: var(--space-4); }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.5rem; }
}

/* ---------- Print Styles ---------- */
@media print {
    .topbar, .sidebar, .toast-container { display: none; }
    .main-content { margin: 0; padding: 1rem; }
    body { background: white; }
}
