/* Core Variables */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #0b0f19;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.bg-darker { background-color: var(--bg-darker); }

/* --- GLOBAL LOADER --- */
@keyframes logoReveal {
    0% { opacity: 0; transform: scale(0.7); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes glowPulseGreen {
    from { filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.8)); }
}

#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-logo {
    width: 100px;
    height: auto;
    opacity: 0;
    animation: logoReveal 1s ease forwards, glowPulseGreen 2s infinite alternate;
    animation-delay: 0s, 1s; 
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-green);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-primary:hover { background-color: var(--accent-green-hover); }

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-secondary:hover { border-color: var(--accent-green); }
.full-width { width: 100%; margin-top: 20px; }

/* Navigation & Logo */
header { border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Updated Logo Styling */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-green);
    text-decoration: none;
    transition: transform 0.2s ease;
}
.logo a:hover {
    transform: scale(1.02);
}
.logo a img {
    height: 35px;
    width: auto;
}

nav a { margin: 0 15px; color: var(--text-muted); font-weight: 500; }
nav a:hover { color: var(--text-main); }

/* Hero Section */
.hero { padding: 80px 0; }
.hero-content { display: flex; align-items: center; gap: 40px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 20px; }
.hero-text p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; }
.hero-cta { display: flex; gap: 10px; }
.email-input { padding: 12px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-darker); color: white; width: 250px; }

.hero-graphic { flex: 1; display: flex; justify-content: center; }
.mockup-box { background: var(--bg-card); padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.green-text { color: var(--accent-green); font-weight: bold; margin-bottom: 15px;}
.chart-placeholder { height: 150px; background: linear-gradient(to top right, transparent, rgba(16, 185, 129, 0.2)); border-bottom: 2px solid var(--accent-green); }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

/* Features */
.features { padding: 80px 0; }
.feature-card { background: var(--bg-card); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); }
.feature-card h3 { margin-bottom: 15px; color: var(--accent-green); }

/* Pricing */
.pricing-section { padding: 80px 0; }
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 30px 0; }
.badge { background: var(--accent-green); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color); transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

.price-card { background: var(--bg-card); padding: 40px; border-radius: 12px; border: 1px solid var(--border-color); text-align: left; position: relative; }
.price-card.featured { border-color: var(--accent-green); transform: translateY(-10px); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent-green); padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; }
.price { font-size: 2.5rem; font-weight: bold; margin: 20px 0; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: normal; }
.features-list { list-style: none; margin-bottom: 30px; }
.features-list li { margin-bottom: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.features-list li.disabled { color: var(--text-muted); text-decoration: line-through; }

/* Dashboard Layout */
.dashboard-body { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 250px; background: var(--bg-darker); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 20px; }
.sidebar-nav { flex: 1; margin-top: 40px; display: flex; flex-direction: column; gap: 15px; }
.sidebar-nav a { color: var(--text-muted); padding: 8px 12px; border-radius: 6px; }
.sidebar-nav a.active, .sidebar-nav a:hover { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.sidebar-bottom { border-top: 1px solid var(--border-color); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }

.dashboard-main { flex: 1; overflow-y: auto; padding: 0 40px; background: var(--bg-dark); }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.search-bar input { width: 300px; padding: 10px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-darker); color: white; }
.welcome-banner { background: linear-gradient(to right, var(--bg-card), var(--bg-darker)); padding: 40px; border-radius: 12px; margin: 40px 0; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.tag { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; margin-bottom: 10px; display: inline-block;}
.report-card { background: var(--bg-card); padding: 25px; border-radius: 8px; border: 1px solid var(--border-color); }
.report-category { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; }
.download-link { display: inline-block; margin-top: 15px; color: var(--accent-green); font-weight: 600; }

/* Footer */
footer { background: var(--bg-darker); border-top: 1px solid var(--border-color); padding: 60px 0 20px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.disclaimer { background: var(--bg-card); padding: 20px; border-radius: 8px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.9rem; }


/* --- Hamburger Menu Base Styles --- */
.sidebar-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.hamburger-btn { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.hamburger-btn:hover { color: var(--accent-green); }
.mobile-email { display: none; }

/* --- THE CORRECT MOBILE OVERHAUL --- */
@media (max-width: 768px) {
    /* Main Website Header Fixes */
    .hero-content { flex-direction: column; text-align: center; }
    .hero-cta { flex-direction: column; align-items: center; }
    .email-input { width: 100%; }
    .nav-buttons { display: none; }
    
    .nav-container { flex-direction: column; gap: 15px; }
    .logo { font-size: 1.2rem; }
    .logo a { justify-content: center; }
    nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav a { margin: 0 8px; font-size: 0.95rem; }


/* Dashboard Mobile Overhaul */
    .dashboard-body { flex-direction: column; overflow: auto; }
    .dashboard-main { padding: 0 20px; }
    .welcome-banner { flex-direction: column; gap: 20px; text-align: center; }
    
    .sidebar { width: 100%; height: auto; border-right: none; padding: 15px 0; border-bottom: 1px solid var(--border-color); position: relative; }
    
    /* Hamburger Header Layout */
    .sidebar-header { padding: 0 20px; }
    .sidebar-header .logo a { justify-content: flex-start; }
    .hamburger-btn { display: block; } /* Shows the icon on mobile */
    
    /* The Swipe Bar */
    nav.sidebar-nav { 
        display: flex !important;
        flex-direction: row !important; 
        flex-wrap: nowrap !important; 
        justify-content: flex-start !important; 
        overflow-x: auto !important;  
        white-space: nowrap !important; 
        -webkit-overflow-scrolling: touch; 
        margin-top: 15px; 
        padding: 0 20px 15px 20px; 
        border-bottom: 1px solid var(--border-color); 
        gap: 15px !important;
    }
    nav.sidebar-nav a { flex: 0 0 auto !important; display: inline-block !important; }
    nav.sidebar-nav::-webkit-scrollbar { display: none; } 
    
    /* --- THE NEW HAMBURGER DROPDOWN --- */
    .sidebar-bottom { 
        display: none; /* Hidden until clicked */
        position: absolute;
        top: 60px;
        right: 20px;
        background: var(--bg-card);
        flex-direction: column; 
        justify-content: flex-start;
        gap: 15px; 
        padding: 20px; 
        border: 1px solid var(--border-color); 
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        z-index: 1000;
        min-width: 200px;
    }
    
    /* This class is added by Javascript when the button is clicked */
    .sidebar-bottom.show { display: flex; }
    
    .sidebar-bottom a { font-size: 0.95rem; }
    
    /* Moves the user email into the dropdown */
    .mobile-email {
        display: block;
        color: var(--text-muted);
        font-size: 0.85rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
        margin-bottom: 5px;
        word-break: break-all;
    }
    
    /* Hides the duplicate email from the main header */
    .dashboard-header .user-profile { display: none; }

    /* Fix the Dashboard Header (Search Bar) */
    .dashboard-header { flex-direction: column; padding: 20px 0; }
    .search-bar input { width: 100%; }
