/* =========================================================
   SaveNova – style.css
   Full design system: dark glassmorphism theme
   ========================================================= */

/* ── CSS Variables ── */
:root {
    --bg-color: #0b0f19;
    --bg-surface: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #06b6d4;
    --success: #38bdf8;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-purple: linear-gradient(135deg, #6366f1, #a855f7);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: opacity 0.25s ease-out;
}

body.spa-loading {
    opacity: 0;
    pointer-events: none;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* ── Utility ── */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ── Scroll Reveal ── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays via inline style or nth */
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ── Navigation ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(11, 15, 25, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo-img {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.nav-active {
    color: var(--text-main);
    font-weight: 600;
}

.nav-links a.nav-active::after {
    width: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.nav-btn {
    font-size: 0.9rem !important;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.nav-toggle:hover {
    background: var(--glass-bg);
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform var(--transition), box-shadow var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-main);
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-hover);
}

.btn-large {
    padding: 1rem 2.8rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

/* ── Hero Section ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Animated background blobs */
.hero::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 18%;
    width: 420px;
    height: 420px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.35;
    animation: blobFloat 10s infinite alternate ease-in-out;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 8%;
    right: 12%;
    width: 520px;
    height: 520px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.3;
    animation: blobFloat 13s infinite alternate-reverse ease-in-out;
    z-index: 1;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,15,25,0.75) 0%, rgba(11,15,25,0.97) 100%);
    z-index: 2;
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: heroFadeIn 1s ease-out both;
}

.hero-badge {
    background: #ef4444;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    display: inline-block;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.2rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-inline: auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.7;
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.stat-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    padding: 1.4rem 2rem;
    text-align: center;
    min-width: 170px;
    transition: transform var(--transition), background var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
}

.stat-card h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
}

/* Hero Buttons */
.hero-buttons-stacked {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 0.9rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: background var(--transition), transform 0.2s;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.wa-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.btn-get-started {
    background: var(--gradient-purple);
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.3rem;
    font-size: 1.1rem;
}

.btn-get-started:hover {
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.35);
    transform: translateY(-2px);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.card-icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    line-height: 1;
}

.glass-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.glass-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── Grid Layouts ── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

/* ── Section Spacing ── */
.features, .story-section, .how-it-works, .why-nova, .testimonials-section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

.section-label {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
}

/* ── Story Section ── */
.story-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.story-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.story-text strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ── How It Works ── */
.how-it-works {
    background: linear-gradient(to bottom, transparent, rgba(59,130,246,0.04), transparent);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    position: relative;
}

.step-card {
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px rgba(59,130,246,0.35);
    transition: box-shadow var(--transition), transform var(--transition);
}

.step-card:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(59,130,246,0.5);
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.step-connector {
    display: none;
}

/* ── Why SaveNova (features) ── */
.feature-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    transition: transform var(--transition);
}

.feature-icon-wrap.blue   { background: rgba(59,130,246,0.15); }
.feature-icon-wrap.cyan   { background: rgba(6,182,212,0.15); }
.feature-icon-wrap.purple { background: rgba(168,85,247,0.15); }
.feature-icon-wrap.green  { background: rgba(16,185,129,0.15); }

.glass-card:hover .feature-icon-wrap {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

/* ── Testimonials ── */
.testimonials-section {
    background: linear-gradient(to bottom, transparent, rgba(6,182,212,0.04), transparent);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: 100%;
}

.testimonial-quote {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    flex: 1;
    font-style: italic;
}

.testimonial-quote::before {
    content: '"';
    font-size: 2.5rem;
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    line-height: 0.5;
    display: block;
    margin-bottom: 0.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.author-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-main);
}

.author-info span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stars {
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

/* ── CTA Section ── */
.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, transparent, rgba(59,130,246,0.06));
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.cta-container h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta-container p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3.5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 0.8rem;
    max-width: 280px;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-logo img {
    height: 28px;
}

.footer-logo span {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    cursor: pointer;
    color: var(--text-muted);
}

.social-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    color: var(--text-main);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ── Invest Page – Dashboard ── */
.dashboard-container {
    padding: 8rem 2rem 4rem;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 370px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Auth Card with Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--glass-border);
}

.tab-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

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

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-control.error {
    border-color: var(--danger);
}

.field-error {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 0.35rem;
    display: none;
}

.field-error.visible {
    display: block;
}

.form-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    color: var(--success);
    font-weight: 600;
    margin-top: 1rem;
    display: none;
}

.form-success.visible {
    display: block;
    animation: tabFadeIn 0.3s ease;
}

/* ── Portfolio Summary Cards ── */
.portfolio-header {
    margin-bottom: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    transition: transform var(--transition), background var(--transition);
}

.summary-card:hover {
    transform: translateY(-3px);
    background: var(--glass-bg-hover);
}

.summary-card .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.summary-card .value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}

.summary-card .value.positive { color: var(--success); }
.summary-card .value.accent   { color: var(--accent); }

.summary-card .trend {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    color: var(--text-muted);
}

/* ── Chart Area ── */
.chart-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.chart-box h4 {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.chart-box canvas {
    max-height: 200px;
}

/* ── Investment Table ── */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.invest-table {
    width: 100%;
    border-collapse: collapse;
}

.invest-table th, .invest-table td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.invest-table thead tr {
    background: rgba(255,255,255,0.02);
}

.invest-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.invest-table td {
    font-size: 0.93rem;
    color: var(--text-main);
}

.invest-table tbody tr {
    transition: background var(--transition);
}

.invest-table tbody tr:hover td {
    background: rgba(255,255,255,0.025);
}

.status-positive { color: var(--success); font-weight: 700; }
.status-negative { color: var(--danger);  font-weight: 700; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16,185,129,0.15);
    color: var(--success);
}

.status-badge.active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Deposit Button */
.table-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.table-actions h3 {
    font-size: 1.6rem;
    color: var(--text-main);
}

/* ── Deposit Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    overflow-y: auto;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: #111827;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition);
    position: relative;
}

@media (max-width: 600px) {
    .modal-overlay {
        padding: 0.75rem 0.5rem !important;
        align-items: flex-start !important;
    }
    .modal-box {
        padding: 1.4rem 1.1rem !important;
        max-height: 93vh !important;
        margin: auto !important;
        border-radius: 16px !important;
    }
    .modal-box h3 {
        font-size: 1.3rem !important;
    }
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
}

.modal-box h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.modal-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ── Animations ── */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 50px) scale(1.12); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .chart-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile Nav */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(11,15,25,0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        z-index: 999;
    }

    .nav-links.nav-open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .nav-btn {
        font-size: 1rem !important;
    }

    /* Hero */
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-card {
        min-width: 130px;
        padding: 1rem 1.2rem;
    }

    /* Sections */
    .section-title { font-size: 2rem; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Dashboard */
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-stats { flex-direction: column; align-items: center; }
    .stat-card  { width: 100%; max-width: 240px; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .glass-card { padding: 1.8rem; }
}

/* ── Assistant Chat Widget ── */
.sn-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.sn-chat-toggle {
    background: var(--gradient-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    transition: transform var(--transition);
}

.sn-chat-toggle:hover {
    transform: scale(1.1);
}

.sn-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity var(--transition), transform var(--transition);
    transform-origin: bottom right;
}

.sn-chat-window.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.sn-chat-header {
    background: var(--gradient-primary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.sn-chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.sn-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sn-chat-msg {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
}

.sn-chat-msg.bot {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.sn-chat-msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.sn-chat-input-area {
    padding: 0.8rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.sn-chat-input-area input {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    color: var(--text-main);
}

.sn-chat-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

.sn-chat-input-area button {
    padding: 0.5rem 1rem;
}
