/* Custom CSS Variables & Styling Tokens */
:root {
    --bg-darker: #1e1f22; /* Discord server sidebar background */
    --bg-dark: #2b2d31; /* Discord channel sidebar background */
    --bg-card: rgba(49, 51, 56, 0.7); /* Discord chat background with glass opacity */
    --border-color: rgba(255, 255, 255, 0.05);
    --text-primary: #f2f3f5;
    --text-secondary: #949ba4;
    --text-muted: #949ba4;
    
    /* Accents */
    --accent-purple: #5865F2; /* Discord Blurple */
    --accent-blue: #38bdf8;
    --accent-cyan: #00afb9;
    --accent-pink: #ec4899;
    --accent-green: #23a55a; /* Discord online green */
    --accent-yellow: #f0b232; /* Discord idle yellow */
    --accent-red: #f23f43; /* Discord DND red */

    /* Theme Accents (Mutable via script) */
    --accent-primary: #5865F2;
    --accent-glow: rgba(88, 101, 242, 0.15);

    /* Animation Duration */
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Styles */
html {
    background-color: #0a0b10; /* --bg-base default */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Gradients */
.glow-bg {
    position: fixed;
    top: -30%;
    left: -10%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(9, 11, 17, 0) 70%);
    z-index: -10;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -9;
    pointer-events: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Container Utility */
.view-container {
    width: 100%;
    min-height: 100vh;
    transition: opacity 0.5s ease-in-out;
}

.hidden {
    display: none !important;
}

/* General Typography & Elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

/* Sonoma Liquid Glass Variables for Landing Page */
:root {
    --bg-base: #0a0b10;
    --bg-surface: rgba(20, 22, 33, 0.45);
    --bg-panel: rgba(18, 20, 29, 0.55);
    --bg-panel-solid: #12151c;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-hover: rgba(255, 255, 255, 0.04);
    
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-cyan: #06b6d4;
    
    --glass-blur: blur(30px) saturate(210%);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --glass-shadow-floating: 0 30px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    
    /* Transparent Dropdowns system */
    --bg-dropdown: rgba(15, 17, 26, 0.72);
    --border-dropdown: rgba(255, 255, 255, 0.06);
    --blur-dropdown: blur(16px) saturate(140%);
    --shadow-dropdown: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.light-theme {
    --bg-base: #f4f6fa;
    --bg-surface: rgba(255, 255, 255, 0.4);
    --bg-panel: rgba(255, 255, 255, 0.45);
    --bg-panel-solid: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.5);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --bg-hover: rgba(0, 0, 0, 0.03);
    
    --glass-shadow: 0 10px 40px rgba(31, 38, 135, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    --glass-shadow-floating: 0 30px 70px rgba(31, 38, 135, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    /* Transparent Dropdowns system */
    --bg-dropdown: rgba(255, 255, 255, 0.76);
    --border-dropdown: rgba(0, 0, 0, 0.06);
    --blur-dropdown: blur(16px) saturate(140%);
    --shadow-dropdown: 0 12px 40px rgba(31, 38, 135, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Ensure body uses a pseudo background to allow negative z-index blobs to overlay it */
body {
    background-color: transparent;
    transition: color 0.4s ease;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-base);
    z-index: -100;
    transition: background-color 0.4s ease;
    pointer-events: none;
}

/* Sonoma Liquid Glass Theme Variables for Dashboard */
:root {
    --dash-bg: #0f1115;
    --dash-glass: rgba(24, 27, 35, 0.68);
    --dash-border: rgba(255, 255, 255, 0.05);
    --dash-border-highlight: rgba(255, 255, 255, 0.1);
    --dash-text-primary: #f8fafc;
    --dash-text-secondary: #cbd5e1;
    --dash-text-muted: #94a3b8;
    --dash-hover: rgba(255, 255, 255, 0.04);
    --dash-glass-blur: blur(24px) saturate(180%);
    --dash-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.light-theme {
    --dash-bg: #f6f8fb;
    --dash-glass: rgba(255, 255, 255, 0.68);
    --dash-border: rgba(0, 0, 0, 0.06);
    --dash-border-highlight: rgba(255, 255, 255, 0.5);
    --dash-text-primary: #0f172a;
    --dash-text-secondary: #334155;
    --dash-text-muted: #64748b;
    --dash-hover: rgba(0, 0, 0, 0.03);
    --dash-glass-blur: blur(24px) saturate(180%);
    --dash-shadow: 0 8px 32px rgba(31, 38, 135, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#dashboard-page, #discord-loader {
    --bg-base: var(--dash-bg);
    --bg-surface: var(--dash-glass);
    --bg-panel: var(--dash-glass);
    --bg-panel-solid: var(--dash-glass);
    --border-color: var(--dash-border);
    --border-highlight: var(--dash-border-highlight);
    --text-primary: var(--dash-text-primary);
    --text-secondary: var(--dash-text-secondary);
    --text-muted: var(--dash-text-muted);
    --bg-hover: var(--dash-hover);
    --glass-shadow: var(--dash-shadow);
    --glass-blur: var(--dash-glass-blur);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Premium Sonoma Glass Blobs in Landing Page */
.mesh-bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    background: 
        radial-gradient(circle at calc(12% + var(--bg-shift-x, 0px)) calc(18% + var(--bg-shift-y, 0px)), rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at calc(88% - var(--bg-shift-x, 0px)) calc(82% - var(--bg-shift-y, 0px)), rgba(59, 130, 246, 0.14) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    transition: background-color 0.4s ease;
}

body.light-theme .mesh-bg-gradient {
    background: 
        radial-gradient(circle at calc(10% + var(--bg-shift-x, 0px)) calc(20% + var(--bg-shift-y, 0px)), rgba(99, 102, 241, 0.06) 0%, transparent 40%),
        radial-gradient(circle at calc(90% - var(--bg-shift-x, 0px)) calc(80% - var(--bg-shift-y, 0px)), rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(0, 0, 0, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.01) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

.glass-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    z-index: -9;
    pointer-events: none;
    animation: float-blob 24s infinite ease-in-out;
}
body.light-theme .glass-blob {
    opacity: 0.06;
}
.blob-1 {
    top: 5%;
    left: 10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 80%);
}
.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 80%);
    animation-delay: -6s;
    animation-duration: 28s;
}
.blob-3 {
    top: 45%;
    left: 45%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 80%);
    animation-delay: -12s;
    animation-duration: 20s;
}

@keyframes float-blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -70px) scale(1.15); }
    66% { transform: translate(-40px, 50px) scale(0.9); }
}

/* --- FIXED FLOATING TOPBAR --- */
.sonoma-topbar {
    position: sticky;
    top: 0;
    height: 72px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    z-index: 999;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-name span {
    color: var(--accent-indigo);
}

.search-trigger {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    width: 170px;
    color: var(--text-muted);
    font-size: 0.78rem;
    transition: var(--transition-smooth);
    margin-left: 1rem;
}

.search-trigger:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.kbd-badge {
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0px 5px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    margin-left: auto;
    color: var(--text-secondary);
}

/* Center Navigation Dropdowns */
.topbar-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    height: 100%;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    height: 100%;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background-color: var(--accent-indigo);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.nav-item:hover::after {
    transform: scaleX(1);
}

/* MEGA DROPDOWN PANELS */
.mega-dropdown-wrapper {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) scale(0.98);
    opacity: 0;
    pointer-events: none;
    width: 250px;
    background: linear-gradient(180deg, rgba(16, 18, 28, 0.96) 0%, rgba(10, 11, 18, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.14); /* Subtle edge reflection */
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 45px rgba(0, 0, 0, 0.55);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.nav-item:hover .mega-dropdown-wrapper {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.mega-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-column-feature {
    display: flex;
    flex-direction: column;
}

.mega-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 0.25rem;
}

.mega-link {
    display: block;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    box-sizing: border-box;
}

.mega-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    padding-left: 14px;
}

/* Light theme overrides for main navigation dropdowns */
body.light-theme .mega-dropdown-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 245, 249, 0.97) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 20px 45px rgba(31, 38, 135, 0.07);
}

body.light-theme .mega-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.mega-link-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.mega-link-icon {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.mega-link-text {
    display: flex;
    flex-direction: column;
}

.mega-link-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.mega-link-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* Feature Card in Dropdown */
.mega-feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
}
body.light-theme .mega-feature-card {
    background: rgba(0, 0, 0, 0.015);
}

.mega-feature-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-indigo);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    width: fit-content;
    letter-spacing: 0.5px;
}

.mega-feature-card h4 {
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--text-primary);
}

.mega-feature-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.mega-feature-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-indigo);
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.mega-feature-link:hover {
    color: var(--accent-blue);
    transform: translateX(2px);
}

/* Status Card in Dropdown */
.mega-status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 100%;
}
body.light-theme .mega-status-card {
    background: rgba(0, 0, 0, 0.015);
}

.mega-status-card h4 {
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--text-primary);
}

.mega-status-card p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-green);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-green);
}

.status-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.status-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.metric-val {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 600;
}

.status-button {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    margin-top: auto;
}

.status-button:hover {
    background: var(--border-color);
    border-color: var(--border-highlight);
}

/* Code Card in Dropdown */
.mega-code-card {
    background: #07080b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.85rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mega-code-card pre {
    margin: 0;
}

.mega-code-card code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #a7f3d0; /* Soft mint green */
    line-height: 1.4;
}

/* Glass buttons */
.btn-glass {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.12); /* Subtle edge reflection */
    color: var(--text-primary);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-glass:hover {
    background: var(--bg-hover);
    border-color: var(--border-highlight);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-glass-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.55) 0%, rgba(59, 130, 246, 0.55) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.22); /* More visible edge highlight */
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(99, 102, 241, 0.12);
}

.btn-glass-primary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.65) 0%, rgba(59, 130, 246, 0.65) 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28), 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* --- HERO SECTION --- */
.hero-section {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    align-items: center;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--accent-indigo);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-left h1 {
    font-size: 3.4rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    font-family: var(--font-heading);
}

.hero-left p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-trust-metrics {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    width: 100%;
}

.trust-item {
    display: flex;
    flex-direction: column;
}

.trust-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.trust-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

/* Sonoma Frosted Card System */
.sonoma-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.12); /* Subtle edge reflection */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.sonoma-card:hover {
    border-color: var(--border-highlight);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Interactive Preview Window */
.hero-preview-window {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--glass-shadow-floating);
    overflow: hidden;
}

.sim-node {
    cursor: default;
}

.sim-node.active {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}

/* --- SPOTLIGHT COMMAND PALETTE OVERLAY --- */
.command-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 16, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    z-index: 10000;
    transition: var(--transition-smooth);
}

.command-palette {
    width: 580px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--glass-shadow-floating);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.palette-input-wrapper {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

.palette-search-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.palette-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.palette-input::placeholder {
    color: var(--text-muted);
}

.palette-results {
    max-height: 330px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.palette-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    gap: 0.75rem;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

.palette-result-item:hover, .palette-result-item.selected {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.palette-result-item.selected {
    border-left: 3px solid var(--accent-indigo);
    padding-left: calc(1rem - 3px);
}

.palette-footer {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid var(--border-color);
    font-size: 0.68rem;
    color: var(--text-muted);
    gap: 1rem;
}

/* --- SIDE DRAWER FOR COPILOT --- */
.side-drawer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow-floating);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.side-drawer.open {
    right: 0;
}

/* Message bubbles inside Copilot */
.msg-bubble {
    padding: 0.7rem 0.95rem;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    word-break: break-word;
}

.msg-bubble.user {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
}

.msg-bubble.me {
    background: var(--accent-indigo);
    color: white;
    align-self: flex-end;
}

/* --- PREMIUM DISCORD LOADER REDESIGN --- */
#discord-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    background: #0c0d12;
}

.discord-avatar-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #5865F2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 40px rgba(88, 101, 242, 0.45);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: #5865F2;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
    transition: width 0.15s ease-out;
}

.feature-showcase-section {
    position: relative;
    z-index: 10;
}

/* Responsive grid overrides */
@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 3rem;
    }
    .sonoma-topbar {
        padding: 0 1.5rem;
    }
    .topbar-nav {
        display: none; /* Hide mega menus on mobile/tablet */
    }
    .search-trigger {
        width: 130px;
    }
}


/* ==========================================================================
   MAIN DASHBOARD WORKSPACE
   ========================================================================== */
#dashboard-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* --- FIXED FLOATING TOPBAR --- */
.dashboard-topbar {
    height: 72px;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    width: 100%;
    flex-shrink: 0;
}

.dashboard-topbar .topbar-left,
.dashboard-topbar .topbar-center,
.dashboard-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workspace-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.workspace-select-wrapper:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.06);
}

.workspace-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-indigo);
}

.workspace-dot.active {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.dropdown-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Presence circles avatar stack */
.presence-stack {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 0.5rem;
}

.presence-stack .avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--bg-base);
    margin-right: -8px;
    position: relative;
    transition: var(--transition-smooth);
}

.presence-stack .avatar-circle:hover {
    transform: translateY(-2px);
    z-index: 10;
}

.presence-stack .avatar-circle.active-user {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.presence-indicator {
    margin-left: 12px;
    font-size: 0.75rem;
    color: var(--accent-green);
}

/* Deploy status badge */
.deploy-status-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-green);
}

/* Notifications dropdown tray overlay */
.topbar-action-item {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-base);
}

.notifications-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    width: 320px;
    background: var(--bg-dropdown);
    backdrop-filter: var(--blur-dropdown);
    -webkit-backdrop-filter: var(--blur-dropdown);
    border: 1px solid var(--border-dropdown);
    border-radius: 12px;
    box-shadow: var(--shadow-dropdown);
    z-index: 200;
    overflow: hidden;
    animation: slideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-dropdown.hidden {
    display: none !important;
}

.notifications-dropdown .dropdown-header {
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.notifications-dropdown .dropdown-body {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.notification-item .dot.green { background-color: var(--accent-green); }
.notification-item .dot.yellow { background-color: var(--accent-yellow); }
.notification-item .dot.red { background-color: var(--accent-red); }

.notif-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.account-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.account-menu-trigger:hover {
    background: var(--bg-hover);
}

/* Layout Engine */
.dashboard-layout-body {
    display: flex;
    flex: 1;
    height: calc(100vh - 72px);
    width: 100%;
    overflow: hidden;
}

/* Sidebar Menu */
.dashboard-sidebar {
    width: 260px;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    left: 0;
    top: 0;
    z-index: 10;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.menu-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 1.5rem 0.75rem 0.4rem 0.75rem;
    user-select: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.sidebar-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.sidebar-item.active {
    color: var(--text-primary);
    background-color: var(--bg-hover);
    border-left: 2px solid var(--accent-indigo);
}

.sidebar-user-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .sidebar-user-footer {
    background: rgba(0, 0, 0, 0.015);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.user-details-small {
    flex: 1;
    margin-left: 0.75rem;
    min-width: 0;
}

.user-name-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-plan-small {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-logout-dash {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout-dash:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

/* Workspace Frame */
.dashboard-workspace {
    margin-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: transparent;
}

.workspace-header {
    height: 72px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 9;
}

.header-bot-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-input {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Content Area */
.workspace-content {
    flex: 1;
    padding: 2rem;
}

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

/* --- DISCORD SERVERS SYNC GRID --- */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.server-glass-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.server-glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--glass-shadow-floating), 0 0 20px rgba(99, 102, 241, 0.1);
}

.server-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.server-glass-card:hover::before {
    opacity: 1;
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.server-icon-large {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.server-card-info {
    flex: 1;
    min-width: 0;
}

.server-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.server-clearance-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

.server-clearance-badge.owner {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.server-clearance-badge.admin {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.server-clearance-badge.manager {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.server-clearance-badge.limited {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.server-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.server-stat-item b {
    color: var(--text-primary);
}

.server-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* ==========================================================================
   TAB CONTENT STYLES
   ========================================================================== */

/* Terminal Logs Panel on Home tab */
.log-panel-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: #0b0c10;
}

.log-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.green { background-color: var(--accent-green); }

.log-panel-header h4 {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}

.log-indicator {
    font-family: monospace;
    font-size: 0.7rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    animation: pulse-ring 2.5s infinite;
}

.log-panel-body {
    height: 150px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-right: 0.5rem;
}

.log-row {
    color: var(--text-secondary);
}
.log-row.info { color: #38bdf8; }
.log-row.success { color: var(--accent-green); }
.log-row.error { color: var(--accent-red); }

/* Home Dashboard Tab */
.welcome-header {
    margin-bottom: 3rem;
}
.welcome-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}
.welcome-header p {
    color: var(--text-secondary);
}

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

.stat-card {
    background: var(--bg-surface) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--border-color) !important;
    border-top: 1px solid var(--border-highlight) !important;
    border-radius: 16px !important;
    box-shadow: var(--glass-shadow) !important;
    padding: 1.75rem !important;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-floating);
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.stat-card-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.stat-card-desc {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dashboard-section-title {
    margin-bottom: 2rem;
}
.dashboard-section-title h3 {
    font-size: 1.5rem;
}
.dashboard-section-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: rgba(255,255,255,0.01);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
}

/* Deployed Bot Card */
.bot-container-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.bot-container-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--card-border-glow, var(--accent-primary));
}

.bot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bot-avatar-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

.bot-card-actions {
    display: flex;
    gap: 0.5rem;
}

.bot-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: auto;
}

.bot-modules-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.module-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
}

/* Setup Wizard Tab */
.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
}

.wizard-steps-indicator {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.step-indicator {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.step-indicator.active {
    color: var(--accent-primary);
}

.step-indicator.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-primary);
}

.wizard-step {
    display: none;
}
.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.wizard-step h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-color-picker {
    height: 42px;
    width: 100%;
    border: 1px solid var(--border-color);
    background: none;
    border-radius: 8px;
    cursor: pointer;
}

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Feature selector in step 2 */
.modules-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.module-toggle-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background-color: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.module-toggle-item:hover {
    background-color: rgba(255,255,255,0.03);
}

.module-toggle-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
}

.toggle-details {
    display: flex;
    flex-direction: column;
}

.toggle-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.toggle-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Template picker step 3 */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.template-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background-color: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.template-choice:hover {
    background-color: rgba(255,255,255,0.03);
}

.template-choice input[type="radio"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    accent-color: var(--accent-primary);
}

.template-choice.active {
    border-color: var(--accent-primary);
    background-color: rgba(124, 58, 237, 0.03);
}

.template-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.template-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.template-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Review step 4 */
.review-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.review-row:last-child {
    border-bottom: none;
}

/* ==========================================================================
   COMMAND BUILDER MODULE
   ========================================================================== */
.builder-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

.builder-layout.split-50 {
    grid-template-columns: 1fr 1fr;
}

.builder-sidebar {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.command-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.command-list-item:hover, .command-list-item.active {
    background-color: rgba(255,255,255,0.04);
}

.command-list-item.active {
    border-color: var(--accent-primary);
}

.command-category {
    font-size: 0.7rem;
    background-color: rgba(255,255,255,0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--text-secondary);
}

.builder-workspace {
    padding: 2.5rem;
}

.logic-builder-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.logic-flow-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.flow-node-item {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
}

.node-drag-handle {
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: grab;
    color: var(--text-muted);
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.node-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.node-type-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background-color: var(--accent-primary);
    border-radius: 4px;
    font-weight: bold;
}

.btn-remove-node {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
}

.add-action-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: rgba(255,255,255,0.01);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.add-action-bar span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.editor-save-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* ==========================================================================
   DISCORD MESSAGE PREVIEW NATIVE STYLING
   ========================================================================== */
.builder-form-panel {
    padding: 2.5rem;
    overflow-y: auto;
}

.builder-preview-panel {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.discord-chat-container {
    background-color: #313338;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #dbdee1;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    flex: 1;
}

.discord-message {
    display: flex;
    gap: 1rem;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865F2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.discord-msg-content {
    flex: 1;
}

.discord-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.discord-bot-name {
    font-weight: 500;
    color: #f2f3f5;
}

.discord-bot-badge {
    background-color: #5865F2;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}

.discord-timestamp {
    font-size: 0.75rem;
    color: #949ba4;
}

/* Embed Box */
.discord-embed {
    max-width: 520px;
    background-color: #1e1f22;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 0.25rem;
}

.discord-embed-inner {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
}

.discord-embed-content {
    flex: 1;
}

.discord-embed::before {
    content: '';
    width: 4px;
    align-self: stretch;
}

.discord-embed-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f2f3f5;
    margin-bottom: 0.5rem;
}

.discord-embed-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.discord-embed-description {
    font-size: 0.875rem;
    color: #dbdee1;
}

.discord-embed-thumbnail-container img, .discord-embed-image-container img {
    border-radius: 4px;
}

.discord-embed-thumbnail-container img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.discord-embed-image-container {
    padding: 0 1rem 0.75rem 1rem;
}
.discord-embed-image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.discord-buttons-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Discord preview buttons */
.discord-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: not-allowed;
}
.discord-btn.primary { background-color: #5865F2; color: white; }
.discord-btn.secondary { background-color: #4e5058; color: white; }
.discord-btn.success { background-color: #248046; color: white; }
.discord-btn.danger { background-color: #da373c; color: white; }

/* Interactive Embed Settings Buttons list */
.embed-builder-btn-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   FORMS BUILDER MODULE
   ========================================================================== */
.form-question-row {
    background-color: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-row-header {
    display: flex;
    justify-content: space-between;
}

/* Discord Modal style for forms */
.discord-modal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.discord-modal {
    width: 440px;
    background-color: #313338;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: sans-serif;
}

.discord-modal-header {
    padding: 1rem;
    background-color: #313338;
    color: #f2f3f5;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-x {
    color: #949ba4;
    cursor: not-allowed;
}

.discord-modal-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.discord-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.discord-modal-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b5bac1;
    text-transform: uppercase;
}

.discord-modal-input {
    background-color: #1e1f22;
    border: none;
    border-radius: 4px;
    padding: 0.6rem;
    color: #dbdee1;
    font-size: 0.9rem;
}

.discord-modal-footer {
    padding: 1rem;
    background-color: #2b2d31;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ==========================================================================
   TICKETS SYSTEM MODULE
   ========================================================================== */
.ticket-simulator-workspace {
    display: grid;
    grid-template-columns: 240px 1fr;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 400px;
    overflow: hidden;
}

.tickets-sidebar {
    background-color: rgba(0,0,0,0.2);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.ticket-sim-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.ticket-sim-item:hover, .ticket-sim-item.active {
    background-color: rgba(255,255,255,0.03);
}

.ticket-sim-item.active {
    border-left: 3px solid var(--accent-primary);
}

.ticket-sim-chat {
    display: flex;
    flex-direction: column;
    background-color: #313338;
}

.ticket-chat-header {
    height: 60px;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    background-color: #313338;
}

.ticket-header-actions {
    display: flex;
    gap: 0.5rem;
}

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

/* Chat text items */
.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.chat-msg.system {
    color: var(--accent-cyan);
    font-family: monospace;
    font-size: 0.8rem;
    background-color: rgba(6, 182, 212, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border-left: 2px solid var(--accent-cyan);
}

.chat-sender {
    font-weight: 700;
    font-size: 0.85rem;
    color: #f2f3f5;
}

.chat-text {
    font-size: 0.9rem;
    color: #dbdee1;
}

/* ==========================================================================
   WORKFLOW AUTOMATOR NODES
   ========================================================================== */
.automations-diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
}

body.light-theme .automations-diagram-container {
    background: rgba(255, 255, 255, 0.5);
}

.flow-node {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--border-highlight);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    padding: 1.25rem 1.5rem;
    min-width: 220px;
    position: relative;
    transition: var(--transition-smooth);
}

.flow-node:hover {
    transform: scale(1.02);
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: var(--glass-shadow-floating);
}

.node-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background-color: var(--accent-purple);
    width: fit-content;
    margin-bottom: 0.5rem;
}
.node-tag.cyan { background-color: var(--accent-cyan); }
.node-tag.purple { background-color: var(--accent-purple); }

.flow-connector-arrow {
    font-size: 1.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   AI KNOWLEDGE DROP ZONE & PLAYGROUND
   ========================================================================== */
.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.file-drop-area:hover {
    border-color: var(--accent-primary);
    background-color: rgba(124, 58, 237, 0.02);
}

.uploaded-files-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
}

.playground-input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(0,0,0,0.2);
    background-color: #2b2d31;
}

/* ==========================================================================
   ANALYTICS CHART
   ========================================================================== */
.canvas-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* API Key Container */
.api-key-container {
    display: flex;
    gap: 1rem;
}
.api-key-container input {
    flex: 1;
}

/* ==========================================================================
   BILLING PRICING CARDS
   ========================================================================== */
.pricing-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.pricing-card {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card.active {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.2);
}

.pricing-tag {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background-color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
}

.pricing-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-card ul li::before {
    content: '✓';
    margin-right: 0.5rem;
    color: var(--accent-cyan);
}

/* ==========================================================================
   AI FLOATING WIDGET HELPER ASSISTANT
   ========================================================================== */
.ai-widget-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.ai-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-smooth);
}

.ai-widget-toggle:hover {
    transform: scale(1.05);
}

.ai-widget-toggle .toggle-icon {
    font-size: 1.8rem;
}

.unread-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-cyan);
    border: 2px solid var(--bg-darker);
}

.ai-widget-chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 480px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-box-header {
    background-color: rgba(0,0,0,0.2);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.chat-box-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.85rem;
}

.chat-msg.user {
    align-self: flex-end;
    background-color: var(--accent-primary);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 8px 8px 0 8px;
}

.chat-msg.bot {
    align-self: flex-start;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    border-radius: 8px 8px 8px 0;
}

.chat-box-input-bar {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-box-input-bar input {
    flex: 1;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
}

.chat-box-input-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.chat-box-input-bar button {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
}

/* ==========================================================================
   ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(88, 101, 242, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0); }
}

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

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

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 2rem;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .builder-layout.split-50 {
        grid-template-columns: 1fr;
    }
    
    .landing-nav {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .discord-server-sidebar {
        display: none !important;
    }
    .dashboard-sidebar {
        width: 70px;
        left: 0;
    }
    .sidebar-brand span, .menu-label, .sidebar-item span, .user-details, .btn-logout {
        display: none !important;
    }
    .dashboard-workspace {
        margin-left: 70px;
    }
    .workspace-header {
        padding: 0 1.5rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PREMIUM CYBER-DECORATION & LIVE UI OVERRIDES
   ========================================================================== */

/* Cyber Grid grid glow adjustments */
:root {
    --bg-darker: #05060a;
    --bg-dark: #0a0d14;
    --bg-card: rgba(13, 17, 28, 0.7);
    --border-color: rgba(139, 92, 246, 0.15); /* Sleek purple border tint */
    --accent-primary: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.1);
}

/* Glassmorphism elevation */
.glass-card {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 15px 45px rgba(139, 92, 246, 0.15);
}

/* Pulsing Online Badge */
.badge-status-online {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
    position: relative;
}
.badge-status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: led-blink 1.5s infinite;
}

@keyframes led-blink {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Pulse Glow backgrounds */
.glow-bg {
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.18) 0%, rgba(5, 6, 10, 0) 50%),
                radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.15) 0%, rgba(5, 6, 10, 0) 50%);
    width: 200%;
    height: 200%;
    animation: spin-glow 60s infinite linear;
}

@keyframes spin-glow {
    0% { transform: translate(-25%, -25%) rotate(0deg); }
    100% { transform: translate(-25%, -25%) rotate(360deg); }
}

/* Premium Command Node Connection Workflow */
.logic-flow-list {
    padding-left: 2rem;
    position: relative;
}
.logic-flow-list::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    border-left: 2px dashed rgba(139, 92, 246, 0.3);
    pointer-events: none;
}

.flow-node-item {
    background-color: rgba(6, 8, 12, 0.8) !important;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-left: 1rem;
    transition: var(--transition-smooth);
}
.flow-node-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 25px rgba(139, 92, 246, 0.15);
}

.flow-node-item::before {
    content: '➔';
    position: absolute;
    left: -2.3rem;
    top: 1.25rem;
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: bold;
}

/* Glowing Bot Container Cards */
.bot-container-card {
    background: rgba(10, 13, 20, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: var(--transition-smooth);
}
.bot-container-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-border-glow, var(--accent-primary)) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.15);
}

/* Discord Preview natively styled */
.discord-chat-container {
    background-color: #313338;
    border: 1px solid #232428;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.discord-message {
    padding: 0.5rem 0;
    transition: background-color 0.1s ease;
}
.discord-message:hover {
    background-color: rgba(255,255,255,0.015);
}

.discord-avatar {
    background-color: #5865F2;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.discord-embed {
    background-color: #1e1f22;
    border-radius: 4px;
    border-left: 4px solid var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Cyber Terminal VPS log panel styling */
.log-panel-card {
    background-color: #030407 !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.log-panel-header {
    background-color: rgba(139, 92, 246, 0.03);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.log-panel-body {
    padding: 1.5rem;
    height: 220px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}

.log-row {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* Fluctuation Stats Metrics Cards styling */
.stat-card {
    position: relative;
    overflow: hidden;
    background: rgba(10, 13, 20, 0.7) !important;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.5;
}

/* ==========================================================================
   CODE STUDIO IDE STYLING (VS-CODE STYLE)
   ========================================================================== */
.studio-ide-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 600px;
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 2rem;
}

.studio-sidebar {
    background-color: #252526;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.studio-sidebar-header {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #858585;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

.studio-file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.studio-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.25rem;
    font-size: 0.85rem;
    color: #cccccc;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.studio-file-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.studio-file-item.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #38bdf8;
    font-weight: 500;
    border-left: 2px solid #38bdf8;
}

.studio-file-icon {
    font-size: 0.95rem;
}

.studio-editor-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #1e1e1e;
}

.studio-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d2d2d;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 38px;
}

.active-file-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    padding: 0 1rem;
    background-color: #1e1e1e;
    border-top: 2px solid #38bdf8;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.unsaved-indicator {
    color: #ec4899;
    font-weight: 700;
    margin-left: 0.25rem;
    display: none;
}

.unsaved-indicator.visible {
    display: inline;
}

.editor-actions {
    display: flex;
    align-items: center;
}

.studio-textarea-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    background-color: #1e1e1e;
}

.editor-line-numbers {
    width: 48px;
    background-color: #1e1e1e;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 0.75rem;
    color: #858585;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    user-select: none;
    overflow: hidden;
}

.editor-line-numbers span {
    height: 1.5rem;
    display: block;
}

.studio-textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #d4d4d4;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.75rem;
    resize: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.studio-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #007acc;
    color: #ffffff;
    padding: 0.2rem 1rem;
    font-size: 0.75rem;
    font-family: sans-serif;
}

.status-left, .status-right {
    display: flex;
    gap: 1rem;
}

/* --- LANDING TOPBAR DROPDOWNS --- */
.landing-dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
    margin-left: 0.75rem;
}

.landing-dropdown-item:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.06);
}

body.light-theme .landing-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.landing-dropdown-label {
    color: var(--text-secondary);
}

.landing-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 170px;
    background: var(--bg-dropdown);
    backdrop-filter: var(--blur-dropdown);
    -webkit-backdrop-filter: var(--blur-dropdown);
    border: 1px solid var(--border-dropdown);
    border-radius: 8px;
    box-shadow: var(--shadow-dropdown);
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transition: var(--transition-smooth);
}

.landing-dropdown-item:hover .landing-dropdown-menu,
.landing-dropdown-item.active .landing-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.landing-dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.landing-dropdown-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.landing-dropdown-option.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme .landing-dropdown-option.active {
    background: rgba(0, 0, 0, 0.04);
}

/* --- HERO INTERACTIVE PREVIEW TABS --- */
.win-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.win-tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.win-tab-btn.active {
    color: var(--text-primary);
    background: var(--bg-hover);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.light-theme .win-tab-btn.active {
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
}
.win-tab-content {
    animation: fadeIn 0.3s ease;
}

/* --- USER PROFILE DROPDOWN ON LANDING PAGE --- */
.landing-profile-trigger {
    transition: var(--transition-smooth);
}

.landing-profile-trigger:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body.light-theme .landing-profile-trigger:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* User Profile Dropdown Menu Card */
.landing-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    background: linear-gradient(180deg, rgba(16, 18, 28, 0.96) 0%, rgba(10, 11, 18, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 45px rgba(0, 0, 0, 0.55);
    z-index: 1000;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.96);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-profile-menu:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Profile Trigger Pill */
.profile-trigger-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 16px 4px 4px;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.profile-trigger-pill:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-trigger-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    overflow: hidden;
}

.profile-trigger-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-trigger-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* User Header in Dropdown */
.profile-drop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
}

.profile-drop-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.user-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-drop-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.profile-drop-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-drop-role {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #ff4a4a; /* red/orange Director role */
}

.profile-drop-role .crown-icon {
    width: 12px;
    height: 12px;
    color: #ff4a4a;
    fill: #ff4a4a;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 6px;
}

/* Landing Profile Options */
.landing-profile-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: none;
    color: #cbd5e1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.landing-profile-option svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.landing-profile-option:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
    padding-left: 14px;
}

.landing-profile-option:hover svg {
    color: var(--text-primary);
}

.landing-profile-option:active {
    transform: scale(0.98);
}

/* Staff Option styling */
.landing-profile-option.staff-option {
    color: #ff4a4a;
}

.landing-profile-option.staff-option .crown-icon-red {
    width: 16px;
    height: 16px;
    color: #ff4a4a;
    fill: #ff4a4a;
}

.landing-profile-option.staff-option:hover {
    background: rgba(255, 74, 74, 0.08) !important;
    color: #ff6b6b !important;
}

.landing-profile-option.staff-option:hover .crown-icon-red {
    color: #ff6b6b;
    fill: #ff6b6b;
}

/* Logout Option styling */
.landing-profile-option.logout-option {
    color: #ef4444;
}

.landing-profile-option.logout-option svg {
    color: #ef4444;
}

.landing-profile-option.logout-option:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
}

.landing-profile-option.logout-option:hover svg {
    color: #f87171;
}

/* Light Theme Overrides for user dropdown menu */
body.light-theme .landing-profile-menu {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 245, 249, 0.97) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 20px 45px rgba(31, 38, 135, 0.07);
}

body.light-theme .profile-trigger-pill {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .profile-trigger-pill:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .profile-trigger-name {
    color: #0f172a;
}

body.light-theme .profile-dropdown-divider {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .profile-drop-avatar-container {
    border: 2px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .landing-profile-option {
    color: #334155;
}

body.light-theme .landing-profile-option svg {
    color: #64748b;
}

body.light-theme .landing-profile-option:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}
