:root {
    /* Vibrancy & Brand */
    --primary: #1d9bf0;
    --primary-rgb: 29, 155, 240;
    --primary-hover: #1a8cd8;
    --accent: #8b5cf6;
    --accent-rgb: 139, 92, 246;

    /* Premium Dark Palette */
    --bg-deep: #020617;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.5);
    --bg-glass: rgba(15, 23, 42, 0.4);

    /* Status & Utility */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Text & Borders */
    --text-white: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.15);

    /* Effects */
    --glass-blur: blur(16px);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* Flicker Fix: Optimistic Auth Loading */
.auth-optimistic #landing-view {
    display: none !important;
}

.auth-optimistic #dashboard-portal {
    display: block !important;
}

/* Pro Flicker Fix: Hide upgrade UI instantly if user is Pro */
.user-pro .btn-upgrade,
.user-pro .upgrade-card,
.user-pro .btn-text-primary,
.user-pro .btn-upgrade-dashboard {
    display: none !important;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-logo {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 12px;
}

.stat-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.app-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.app-logo-large {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 24px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

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

/* Sections */
section {
    padding: 120px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(29, 155, 240, 0.15) 0%, transparent 60%);
}

.hero-tag {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
    max-width: 900px;
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
}

/* How It Works */
.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 32px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.step-num {
    font-size: 64px;
    font-weight: 900;
    color: rgba(29, 155, 240, 0.1);
    position: absolute;
    top: 20px;
    right: 20px;
}

.step-icon {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.step-icon img {
    height: 48px;
    width: auto;
}

/* Pricing Section */
/* Hero Refinement */
.hero {
    padding: 120px 5% 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 600px;
}

.trust-line {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 24px;
}

.demo-container {
    margin-top: 60px;
    perspective: 2000px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.browser-mockup {
    width: 100%;
    max-width: 800px;
    /* Reduced from 900px to increase pixel density */
    background: #1e293b;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: rotateX(5deg);
    transition: transform 0.5s ease;
}

.browser-mockup:hover {
    transform: rotateX(0deg) scale(1.02);
}

.browser-header {
    height: 48px;
    background: #0f172a;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 8px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
}

.browser-dots span:nth-child(1) {
    background: #ff5f56;
}

.browser-dots span:nth-child(2) {
    background: #ffbd2e;
}

.browser-dots span:nth-child(3) {
    background: #27c93f;
}

.browser-address {
    margin-left: 24px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-dim);
    flex-grow: 1;
    max-width: 400px;
    text-align: left;
}

.demo-video-wrapper {
    width: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0;
    /* Remove gap below image */
}

.demo-video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    /* Ensure consistent layout */
    object-fit: contain;
    /* Changed from cover to prevent scaling artifacts */
    image-rendering: -webkit-optimize-contrast;
    /* Sharpening for WebKit */
    image-rendering: crisp-edges;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.browser-expand-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 12px;
}

.browser-expand-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-color: var(--border-bright);
}

.browser-expand-btn img {
    height: 16px;
    width: 16px;
    transition: transform 0.2s;
}

.browser-expand-btn:hover img {
    transform: scale(1.1);
}

/* Fullscreen Styles */
.browser-mockup:fullscreen {
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    border-radius: 0;
}

.browser-mockup:fullscreen .browser-header {
    border-radius: 0;
}

.browser-mockup:fullscreen .demo-video-wrapper {
    flex-grow: 1;
}

.browser-mockup:fullscreen .demo-video {
    max-height: calc(100vh - 48px);
}


/* Pain Section */
.pain-section {
    padding: 80px 5%;
    background: var(--bg-card);
    border-radius: 40px;
    border: 1px solid var(--border);
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-premium);
}

.pain-section .section-title h2 {
    font-size: 40px;
    margin-bottom: 8px;
}

.pain-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 20px;
    line-height: 1.6;
}

.pain-content p {
    margin-bottom: 24px;
}

.highlight-text {
    font-weight: 700;
    color: var(--primary);
}

.accent-text {
    font-weight: 700;
    font-size: 24px;
    margin-top: 40px;
}

/* How it Works / Steps */
.how-it-works {
    padding: 100px 5%;
    background: var(--bg-deep);
}

.steps-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.steps-primary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s;
}

.step-card:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    transform: translateY(-4px);
}

.step-num {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 4px 12px;
    border-radius: 99px;
    margin-bottom: 20px;
    display: inline-block;
}

.step-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.steps-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--text-dim);
    font-weight: 800;
    margin: 20px 0;
}

.steps-divider::before,
.steps-divider::after {
    content: "";
    height: 1px;
    background: var(--border);
    flex-grow: 1;
    max-width: 200px;
}

.step-card.secondary {
    max-width: 600px;
    margin: 0 auto;
    border-style: dashed;
    background: rgba(var(--primary-rgb), 0.03);
    border-color: var(--primary);
}

/* Tones Section */
.tones-section {
    padding: 100px 5%;
}

.tones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 40px auto;
}

.tone-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: left;
    transition: all 0.3s;
}

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

.tone-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tone-header img {
    height: 24px;
    width: 24px;
    object-fit: contain;
}

.closing-line {
    text-align: center;
    font-weight: 700;
    font-size: 20px;
    margin-top: 40px;
    color: var(--text-dim);
}

/* Pricing Refinement */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.price-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
    /* Ensure identical height */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-card:hover {
    transform: translateY(-8px);
}

.price-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(145deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
    box-shadow: 0 20px 40px -10px rgba(var(--primary-rgb), 0.3);
}

.price-card h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.price-val {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 32px;
}

.price-period {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 400;
}

.price-desc {
    color: var(--text-dim);
    margin-top: -24px;
    margin-bottom: 32px;
    font-size: 14px;
}

.popular-tag {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
    flex-grow: 1;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-size: 14px;
}

.features-list li.disabled {
    opacity: 0.3;
    text-decoration: line-through;
}

.features-list li.disabled::before {
    content: "";
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url("assets/icons/cancel.png") no-repeat center;
}

.features-list li::before {
    content: "";
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url("assets/icons/checkmark.png") no-repeat center;
}

.cancel-note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 12px;
}

.post-pricing {
    text-align: center;
    margin-top: 60px;
    color: var(--text-dim);
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
    will-change: transform;
    font-family: inherit;
    line-height: normal;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-bright);
    transform: translateY(-2px);
}

#nav-login-btn.btn-outline {
    background: transparent;
    color: var(--text-white);
    border-color: var(--border);
    box-shadow: none;
    padding: 10px 24px;
}

#nav-login-btn.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: translateY(-2px);
}

.btn-google {
    background: white;
    color: #0f172a;
    padding: 14px 28px;
    border-radius: 12px;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--glass);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

/* User Meta in Testimonials */
.user-handle {
    font-weight: 700;
}

.user-desc {
    font-size: 12px;
    color: var(--text-dim);
}

/* Final CTA */
.final-cta {
    padding: 120px 5%;
}

.cta-card {
    background: var(--primary);
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    border-radius: 40px;
    text-align: center;
    color: white;
}

.cta-card h2 {
    font-size: 40px;
    margin-bottom: 16px;
    color: white;
}

.cta-card p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

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

.trust-line-small {
    font-size: 12px;
    margin-top: 16px;
    opacity: 0.8;
}

/* Footer */
.footer {
    padding: 80px 5% 40px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-brand .nav-logo {
    font-size: 20px;
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

/* Mobile responsive extra */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        align-items: center;
    }

    .hero h1 {
        font-size: 40px;
    }

    .pain-section .section-title h2 {
        font-size: 32px;
    }

    .demo-placeholder {
        height: 300px;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
}

.card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* New Professional Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-deep);
}

.dashboard-sidebar {
    width: 280px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 48px;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Sidebar User Profile */
.sidebar-user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 32px;
    gap: 12px;
}

.user-avatar-container {
    width: 64px;
    height: 64px;
    position: relative;
}

.sidebar-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.sidebar-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-meta-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name-text {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-white);
}

.user-email-text {
    font-size: 12px;
    color: var(--text-dim);
    word-break: break-all;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.sidebar-links a.active,
.sidebar-links a:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-links a .icon {
    font-size: 18px;
}

.dashboard-main {
    flex-grow: 1;
    padding: 40px 5%;
    max-width: 1200px;
}

.dashboard-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dashboard-top-bar h1 {
    font-size: 32px;
    margin-bottom: 4px;
}

.btn-logout-small {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.sidebar-logout-btn {
    margin-top: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ef4444;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    transform: translateY(-1px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-bright);
    background: rgba(30, 41, 59, 0.7);
}

.stat-card.highlight {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.1) 100%);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.stat-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-val-plan {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-dim);
}

/* Content Grid */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

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

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-premium);
}

.settings-card .card-header {
    margin-bottom: 32px;
}

.settings-card h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

select,
input,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--text-white);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 18px;
    border-radius: 14px;
}

.side-widgets {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget-card {
    padding: 24px;
}

.widget-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.widget-card p {
    font-size: 14px;
    color: var(--text-dim);
}

.activity-card {
    flex-grow: 1;
}

.activity-placeholder {
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: 16px;
    margin-top: 16px;
}

.empty-state {
    text-align: center;
    padding: 20px;
}

.empty-icon {
    font-size: 32px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

/* Progress Bar & Usage */
.usage-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 14px;
}

.usage-stat-row strong {
    font-size: 24px;
    color: var(--primary);
}

.progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Billing & Plans */
.plan-display-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.plan-badge {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.1) 100%);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-features li {
    font-size: 14px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upgrade-dashboard {
    width: fit-content;
    align-self: flex-start;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-upgrade-dashboard:hover {
    background: var(--primary-hover);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.4);
}

.btn-text-primary {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s;
}

.btn-text-primary:hover {
    opacity: 0.8;
}

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

    .dashboard-sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Toast */
#toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    padding: 16px 32px;
    border-radius: 99px;
    z-index: 2000;
}

/* Professional Auth Modal */
#auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: -1;
}

.auth-card-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: modalSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.auth-badge {
    background: rgba(var(--success-rgb, 16, 185, 129), 0.1);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: white;
}

.auth-card p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.btn-google-professional {
    width: 100%;
    background: white;
    color: #1e293b;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-google-professional:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    color: transparent !important;
}

.btn-loading * {
    visibility: hidden;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1e293b;
    border-radius: 50%;
    animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Ensure consistent loading centering */
.btn.btn-loading::after {
    border-top-color: currentColor;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
}

.auth-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 32px;
    padding-top: 24px;
}

.auth-footer p {
    font-size: 12px;
    margin-bottom: 16px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

.btn-cancel-auth {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-cancel-auth:hover {
    color: white;
}

/* --- Responsive Overrides --- */

/* Mobile Sidebar Drawer Utilities */
.mobile-menu-btn,
.sidebar-close-btn {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {

    /* Layout */
    .dashboard-wrapper {
        flex-direction: column;
    }

    .dashboard-sidebar {
        position: fixed;
        left: -100%;
        /* Fully hidden by default */
        top: 0;
        bottom: 0;
        width: 280px;
        background: var(--bg-deep);
        /* Ensure it's not transparent */
        z-index: 1000;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        /* Override display:none from previous versions */
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .dashboard-sidebar.active {
        left: 0;
    }

    .dashboard-main {
        padding: 0;
        width: 100%;
    }

    .dashboard-top-bar {
        padding: 16px 20px;
        border-radius: 0;
        margin-bottom: 20px;
        position: sticky;
        top: 0;
        background: rgba(15, 23, 42, 0.8);
        backdrop-filter: blur(12px);
        z-index: 100;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
    }

    /* Mobile Nav Buttons */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        padding: 10px;
        margin-right: 15px;
        cursor: pointer;
        z-index: 101;
    }

    .mobile-menu-btn img {
        width: 24px;
        height: 24px;
        filter: var(--icon-filter, invert(1));
    }

    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        cursor: pointer;
        margin-left: auto;
    }

    .sidebar-close-btn img {
        width: 16px;
        height: 16px;
        filter: var(--icon-filter, invert(1));
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }

    /* Landing Page Mobile Fixes */
    .hero h1 {
        font-size: 38px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 32px;
        /* Extra breathing room */
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 350px;
        margin: 20px auto;
        gap: 16px;
        /* Increased gap */
    }

    .hero-btns .btn {
        width: 100%;
    }

    .nav-links {
        display: none;
        /* Hide nav links on very small screens */
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .price-card {
        min-height: auto;
        padding: 30px 20px;
    }

    .steps-primary {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 30px 20px;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 32px;
    }

    .pain-section .section-title h2 {
        font-size: 28px;
    }

    .pain-content {
        font-size: 16px;
    }

    .dashboard-main {
        padding: 10px;
    }
}