/* =================================== */
/* 0. ROOT & THEME
/* =================================== */
:root {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --primary-text-color: #1e293b;
    --secondary-text-color: #64748b;
    --border-color: #e2e8f0;
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-danger: #ef4444;
    --accent-danger-hover: #dc2626;
    --positive-color: #16a34a;
    --negative-color: #dc2626;
}

/* =================================== */
/* 1. BASE & RESET
/* =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =================================== */
/* 2. LANDING PAGE
/* =================================== */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.landing-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-text-color);
}

.landing-nav-links { display: flex; gap: 1rem; }
.landing-body .btn-secondary {
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--accent-primary-hover);
}
.landing-body .btn-secondary:hover { background-color: #f8fafc; }


.hero {
    text-align: center;
    padding: 6rem 0;
}
.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-text-color);
    letter-spacing: -1.5px;
}
.hero-subtitle {
    font-size: 20px;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--secondary-text-color);
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; }

.features { padding: 4rem 0; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 4rem auto; }
.section-title { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; color: var(--primary-text-color); letter-spacing: -1px; }
.section-subtitle { font-size: 18px; color: var(--secondary-text-color); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background-color: #eef2ff;
    color: var(--accent-primary);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 0.5rem; color: var(--primary-text-color); font-size: 18px; }
.feature-card p { color: var(--secondary-text-color); }

.cta-section { text-align: center; padding: 6rem 0; }

/* =================================== */
/* 3. AUTH PAGES
/* =================================== */
.auth-body { background-color: var(--bg-color); }
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.04), 0 8px 10px -6px rgba(0,0,0,0.04);
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header .title { font-size: 28px; font-weight: 700; color: var(--primary-text-color); }
.auth-header .subtitle { margin-top: 0.5rem; color: var(--secondary-text-color); }

.otp-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-color); text-align: center; }
.otp-section p { margin-bottom: 1rem; color: var(--secondary-text-color); }

.auth-links { text-align: center; margin-top: 1.5rem; font-size: 14px; }
.auth-links p { color: var(--secondary-text-color); }
.auth-links a { color: var(--accent-primary); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* =================================== */
/* 4. DASHBOARD LAYOUT
/* =================================== */
.dashboard-body { background-color: var(--main-bg); }
.dashboard-layout { display: flex; }
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    z-index: 2000;
}
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.sidebar-logo { font-size: 24px; font-weight: 800; color: var(--primary-text-color); }
.sidebar-close-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--secondary-text-color); }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-link { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: 8px; text-decoration: none; color: var(--secondary-text-color); font-weight: 500; transition: all 0.2s ease; }
.nav-link:hover { background-color: var(--bg-color); color: var(--primary-text-color); }
.nav-link.active { background-color: var(--accent-primary); color: #ffffff; font-weight: 600; }
.nav-link svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.sidebar-divider { height: 1px; background-color: var(--border-color); margin: 1rem 0; }
.main-content { flex-grow: 1; margin-left: 260px; padding: 1.5rem; transition: margin-left 0.3s ease; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-btn svg { width: 24px; height: 24px; fill: var(--secondary-text-color); }
.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.client-switcher-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.client-switcher-wrapper label { font-weight: 500; color: var(--secondary-text-color); font-size: 14px; }
#clientSwitcher { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--card-bg); font-weight: 500; font-size: 14px; }

/* =================================== */
/* 5. GENERAL COMPONENTS
/* =================================== */
.btn { display: inline-block; padding: 10px 20px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background-color: var(--accent-primary); color: #ffffff; }
.btn-primary:hover { background-color: var(--accent-primary-hover); }
.btn-danger { background-color: var(--accent-danger); color: #fff; }
.btn-danger:hover { background-color: var(--accent-danger-hover); }
.btn-icon { background: none; border: 1px solid transparent; color: var(--secondary-text-color); cursor: pointer; padding: 0.5rem; border-radius: 50%; transition: all 0.2s ease; }
.btn-icon:hover { background-color: #ef44441a; color: var(--accent-danger); }
.btn-icon svg { width: 24px; height: 24px; fill: currentColor; }

.card { background: var(--surface-color); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.kpi-title { color: var(--secondary-text-color); font-size: 14px; font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 700; margin: 0.5rem 0; color: var(--primary-text-color); }
.card .subtitle, .card #totalReturnsPercentage { font-size: 14px; font-weight: 500; color: var(--secondary-text-color); }
.card h3 { margin-bottom: 1rem; font-size: 18px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--secondary-text-color); padding-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 1rem 0; border-top: 1px solid var(--border-color); font-size: 14px; font-weight: 500; }
.badge { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.badge-blue { background: #dbeafe; color: #3b82f6; }
.badge-red { background: #fee2e2; color: #ef4444; }
.right { text-align: right; }
.positive { color: var(--positive-color); }
.negative { color: var(--negative-color); }

.modal { position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
.modal.hidden { display: none !important; }
.modal-content { background-color: var(--card-bg); margin: 5% auto; padding: 2rem; border: 1px solid var(--border-color); width: 90%; max-width: 550px; border-radius: 16px; position: relative; }
.close { color: var(--secondary-text-color); position: absolute; top: 1rem; right: 1.5rem; font-size: 28px; font-weight: bold; }
.close:hover, .close:focus { color: var(--primary-text-color); text-decoration: none; cursor: pointer; }
.modal-content h2 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--primary-text-color); font-size: 14px; }
.form-control { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 14px; background-color: var(--bg-color); color: var(--primary-text-color); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-control:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.form-divider { border: none; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { margin-top: 2rem; display: flex; justify-content: flex-end; }
.message { margin-top: 1rem; padding: 10px; border-radius: 6px; text-align: center; }
.message.success { background-color: #dcfce7; color: #16a34a; }
.message.error { background-color: #fee2e2; color: #dc2626; }

/* =================================== */
/* 6. RESPONSIVE
/* =================================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,0.1); }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: block; }
}

@media (max-width: 768px) {
    .grid4 { grid-template-columns: repeat(2, 1fr); }
    .grid2 { grid-template-columns: 1fr; }
    .main-content { padding: 1rem; }
    .form-grid { grid-template-columns: 1fr; }
    /* Landing: header */
    .landing-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 0;
    }
    .landing-logo { font-size: 20px; }
    .landing-nav-links { flex-wrap: wrap; justify-content: center; }
    /* Landing: hero */
    .hero { padding: 4rem 0; }
    .hero-title { font-size: 36px; margin-bottom: 1rem; }
    .hero-subtitle { font-size: 16px; margin-bottom: 2rem; }
    .hero-actions { flex-wrap: wrap; justify-content: center; }
    /* Landing: features */
    .features { padding: 3rem 0; }
    .section-header { margin-bottom: 3rem; }
    .section-title { font-size: 32px; }
    .section-subtitle { font-size: 16px; }
    /* Landing: CTA */
    .cta-section { padding: 4rem 0; }
}

@media (max-width: 480px) {
    .grid4 { grid-template-columns: 1fr; }
    /* Landing: hero small mobile */
    .hero { padding: 3rem 0; }
    .hero-title { font-size: 28px; }
    .hero-subtitle { font-size: 14px; margin-bottom: 1.5rem; }
    .hero-actions .btn { width: 100%; }
    /* Landing: features single column */
    .features-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .section-title { font-size: 26px; }
    .section-subtitle { font-size: 14px; }
    /* Landing: CTA */
    .cta-section { padding: 3rem 0; }
    .landing-logo { font-size: 18px; }
}



.hidden {

    display: none !important;

}


