/* Prodify-Inspired Clean AI Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Backgrounds */
    --primary-bg: #F8F9FE;
    /* Very light cool blue/white */
    --card-bg: #FFFFFF;
    --sidebar-bg: #FFFFFF;

    /* Text */
    --text-primary: #111827;
    /* Near black */
    --text-secondary: #6B7280;
    /* Gray 500 */
    --text-tertiary: #9CA3AF;
    /* Gray 400 */

    /* Brand Accent (Prodify Purple) */
    --brand-primary: #8B5CF6;
    /* Violet 500 */
    --brand-hover: #7C3AED;
    /* Violet 600 */
    --brand-light: #F3E8FF;
    /* Light Purple for backgrounds */
    --brand-text: #6D28D9;
    /* Deep Purple text */

    /* Borders & Lines */
    --border-color: #F3F4F6;
    /* Gray 100 */
    --border-hover: #E5E7EB;
    /* Gray 200 */

    /* Status */
    --status-success-bg: #ECFDF5;
    --status-success-text: #059669;
    --status-warning-bg: #FFFBEB;
    --status-warning-text: #D97706;

    /* Metrics */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    background-color: var(--primary-bg);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.015em;
}

/* === Sidebar (Light Theme) === */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem 1.5rem;
    margin-bottom: 1rem;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.sidebar-brand i {
    color: var(--brand-primary);
    background: var(--brand-light);
    padding: 8px;
    border-radius: 8px;
    font-size: 1rem;
}

.sidebar-nav {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
    padding: 1rem 0.75rem 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.nav-link:hover {
    background-color: #F9FAFB;
    color: var(--text-primary) !important;
}

.nav-link.active {
    background-color: var(--brand-light);
    color: var(--brand-text) !important;
}

.nav-link i {
    width: 20px;
    text-align: center;
    transition: color 0.2s;
    color: #9CA3AF;
}

.nav-link.active i {
    color: var(--brand-primary);
}

/* User Profile */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    cursor: pointer;
}

.user-profile:hover {
    background-color: #F9FAFB;
}

.avatar {
    width: 32px;
    height: 32px;
    background-color: var(--brand-primary);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* === Main Content: Graph Paper Background === */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    background-color: #F8F9FE;
    /* Grid Pattern */
    background-image:
        linear-gradient(rgba(229, 231, 235, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(229, 231, 235, 0.5) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Cards === */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    /* Rounded cards like Prodify */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Very subtle lift */
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* === Buttons (Purple Pills) === */
.btn {
    border-radius: 50px;
    /* Full pill shape */
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background-color: var(--brand-light);
    color: var(--brand-text);
    border-color: var(--brand-primary);
}

/* === Badges & Tags === */
.badge {
    padding: 0.4em 0.85em;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.badge-violet {
    background-color: var(--brand-light);
    color: var(--brand-text);
}

/* Text Overrides for Light Theme */
.text-muted {
    color: #9CA3AF !important;
}

.text-white {
    color: #FFFFFF !important;
}

/* Fix for Dark Card Headers & Backgrounds */
.bg-dark,
.bg-secondary,
.card-header.bg-dark {
    color: #FFFFFF !important;
}

.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6,
.bg-dark p,
.bg-dark span,
.bg-dark div,
.bg-dark label {
    color: #FFFFFF !important;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =========================================
   PREMIUM LANDING PAGE STYLES (Added)
   ========================================= */

:root {
    --hero-bg-start: #0f172a;
    --hero-bg-end: #1e1b4b;
    --accent-glow: #818cf8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
}

.landing-page-wrapper {
    background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
    min-height: 100vh;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Mesh */
.landing-page-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: rotateBackground 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography Overrides for Landing */
.landing-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(165, 180, 252, 0.2);
}

.landing-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.6;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-card:hover::after {
    opacity: 1;
}

/* Icon Containers */
.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.glass-card:hover .icon-box {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff !important;
    transform: scale(1.1);
}

/* CTA Buttons */
.btn-premium {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    border-radius: 50px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
    color: white;
}

.text-glow {
    color: #e0e7ff;
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2s; }

/* Responsive Adjustments */
@media (max-width: 991px) {
    .landing-page-wrapper {
        text-align: center;
        padding-top: 2rem;
    }
    .landing-title {
        font-size: 2.5rem;
    }
    .glass-card {
        padding: 1.5rem;
    }
}

/* FORCE OVERRIDES FOR LANDING PAGE */
body:has(.landing-page-wrapper) {
    background: #0f172a !important; /* Force dark background on body */
}

.landing-page-wrapper h1,
.landing-page-wrapper h2,
.landing-page-wrapper h3,
.landing-page-wrapper h4,
.landing-page-wrapper h5,
.landing-page-wrapper p,
.landing-page-wrapper span,
.landing-page-wrapper div {
    color: #ffffff; /* Default to white text */
}

/* Specific text overrides */
.landing-title {
    background: linear-gradient(to right, #fff, #a5b4fc) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.landing-subtitle {
    color: #cbd5e1 !important; /* Light slate for subtitle */
}

.text-glow {
    text-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
}

/* Fix Card Text Colors */
.glass-card h4 {
    color: #ffffff !important;
    font-weight: 700;
}

.glass-card p {
    color: #cbd5e1 !important;
}

/* Fix Icon Colors */
.glass-card .icon-box i {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Button Fixes */
.btn-premium {
    color: #ffffff !important;
}

.btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.3) !important;
}

.btn-outline-light:hover {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* === ULTIMATE SCROLL FIX (v2) === */

/* 1. Apply gradient to BODY, not wrapper */
body:has(.landing-page-wrapper) {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%) !important;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
}

/* 2. Make wrapper transparent and content-focused */
.landing-page-wrapper {
    background: transparent !important; /* Remove gradient from wrapper */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    /* Ensure no margins push it */
}

/* 3. Fix Background Mesh to be fixed to viewport */
.landing-page-wrapper::before {
    position: fixed; /* Fix to viewport */
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    z-index: -1; /* Behind everything */
}

/* 4. Ensure no extra margins on last elements */
.landing-page-wrapper .container {
    margin-top: 0;
    margin-bottom: 0;
}

/* Fix Input Placeholders for Login */
.landing-page-wrapper .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 300;
}

.landing-page-wrapper .form-control {
    color: #ffffff !important; /* Ensure typed text is white */
}

/* Ensure password dots are white */
.landing-page-wrapper input[type="password"] {
    color: #ffffff !important;
}

/* === FIX DASHBOARD TRANSPARENCY FOR DARK MODE === */
/* When body has the dark gradient, make the dashboard content container transparent */
body:has(.landing-page-wrapper) .main-content {
    background: transparent !important;
    background-image: none !important;
}

/* Fix Button Colors */
.btn-premium {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
}

.btn-premium:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6) !important;
}
