/* ==========================================================================
   SWEET TASK - CENTRALIZED THEME & DESIGN TOKEN SYSTEM
   Single Source of Truth for Colors, Gradients, Surfaces, Glows & Typography
   Changing tokens in this file updates the entire application theme instantly.
   ========================================================================== */

:root {
    /* ==========================================================================
       1. BRAND & PRIMARY COLOR PALETTE
       ========================================================================== */
    --primary-blue: #2563eb;
    --primary-darkblue: #1d4ed8;
    --primary-navy: #1e3a8a;
    --primary-cyan: #06b6d4;
    --primary-sky: #38bdf8;
    --primary-cobalt: #3b82f6;
    --primary-purple: #3b82f6; /* Backwards-compatible alias for primary cobalt */
    --primary-indigo: #2563eb;
    --primary-violet: #60a5fa;
    --primary-pink: #ec4899;
    --accent-pink: #f472b6;
    --accent-gold: #f5a524;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;

    /* ==========================================================================
       2. STATUS & SYSTEM NOTIFICATION COLORS
       ========================================================================== */
    --color-success: #10b981;
    --color-success-dark: #059669;
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
    --color-info: #38bdf8;
    --color-info-dark: #0284c7;

    /* ==========================================================================
       3. DARK LUXURY SURFACES & CANVAS BACKGROUNDS
       ========================================================================== */
    --bg-primary: #060b18;
    --bg-secondary: #0d172a;
    --bg-tertiary: #1e293b;
    --bg-card: #0f1c34;
    --bg-card-hover: #142342;
    --bg-card-subtle: rgba(15, 28, 52, 0.65);
    
    --cyber-canvas: #050a14;
    --cyber-canvas-deep: #03070f;
    --cyber-surface: rgba(13, 23, 42, 0.98);
    --cyber-surface-dark: #0a1220;
    --cyber-surface-overlay: rgba(3, 7, 16, 0.82);
    --cyber-glass-bg: rgba(255, 255, 255, 0.04);
    --cyber-glass-bg-hover: rgba(255, 255, 255, 0.08);

    /* ==========================================================================
       4. TYPOGRAPHY TEXT COLORS
       ========================================================================== */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-white: #ffffff;
    --text-cyan: #38bdf8;
    --text-purple: #60a5fa;
    --text-blue: #60a5fa;
    --text-pink: #f472b6;
    --text-gold: #fbbf24;
    --text-emerald: #34d399;

    /* ==========================================================================
       5. BORDERS & ACCENT DIVIDERS
       ========================================================================== */
    --border-color: #1e293b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-cyber-subtle: rgba(37, 99, 235, 0.28);
    --border-cyber-glow: rgba(37, 99, 235, 0.55);
    --border-cyber-cyan: rgba(6, 182, 212, 0.35);
    --border-cyber-pink: rgba(236, 72, 153, 0.35);
    --border-cyber-glass: rgba(255, 255, 255, 0.08);
    --border-cyber-glass-hover: rgba(255, 255, 255, 0.18);

    /* ==========================================================================
       6. THEME GRADIENTS
       ========================================================================== */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    --gradient-header: linear-gradient(135deg, rgba(15, 32, 67, 0.98) 0%, rgba(10, 20, 42, 0.98) 60%, rgba(6, 11, 24, 0.98) 100%);
    --gradient-header-scrolled: linear-gradient(135deg, rgba(12, 26, 56, 0.99) 0%, rgba(8, 16, 35, 0.99) 60%, rgba(5, 9, 20, 0.99) 100%);
    --gradient-nav-capsule: linear-gradient(135deg, rgba(15, 32, 67, 0.75) 0%, rgba(10, 20, 42, 0.85) 100%);
    --gradient-nav-active: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(6, 182, 212, 0.18) 100%);
    --gradient-btn-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #06b6d4 100%);
    --gradient-btn-secondary: linear-gradient(135deg, rgba(15, 32, 67, 0.8) 0%, rgba(10, 20, 42, 0.9) 100%);
    --gradient-btn-secondary-hover: linear-gradient(135deg, rgba(24, 48, 98, 0.9) 0%, rgba(14, 28, 58, 0.95) 100%);
    --gradient-panel: linear-gradient(180deg, rgba(13, 23, 42, 0.98) 0%, rgba(6, 11, 24, 0.99) 100%);
    --gradient-card-hero: linear-gradient(135deg, rgba(15, 32, 67, 0.7) 0%, rgba(10, 20, 42, 0.85) 100%);
    --gradient-avatar: linear-gradient(135deg, #2563eb 0%, #38bdf8 50%, #06b6d4 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #be185d 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    --gradient-emerald: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    --gradient-text-metallic: linear-gradient(135deg, #ffffff 15%, #f0f9ff 50%, #93c5fd 100%);
    --gradient-text-cyan-violet: linear-gradient(90deg, #38bdf8 0%, #06b6d4 50%, #60a5fa 100%);
    --gradient-radial-ambient: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.38) 0%, rgba(6, 182, 212, 0.18) 50%, transparent 80%);

    /* ==========================================================================
       7. SHADOWS & AMBIENT GLOWS
       ========================================================================== */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-cyber-header: 0 4px 25px rgba(0, 0, 0, 0.55), 0 0 30px rgba(37, 99, 235, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --shadow-cyber-header-scrolled: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(37, 99, 235, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --shadow-cyber-panel: 0 25px 65px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(37, 99, 235, 0.22);
    --shadow-cyber-card: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.12);
    --shadow-cyber-btn-primary: 0 4px 18px rgba(37, 99, 235, 0.45);
    --shadow-cyber-btn-primary-hover: 0 8px 25px rgba(37, 99, 235, 0.65), 0 0 15px rgba(56, 189, 248, 0.4);
    --shadow-cyber-btn-secondary: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --shadow-cyber-btn-secondary-hover: 0 6px 20px rgba(37, 99, 235, 0.35);

    /* Glow Tokens */
    --glow-primary: 0 0 20px rgba(37, 99, 235, 0.45);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.40);
    --glow-pink: 0 0 20px rgba(236, 72, 153, 0.40);
    --glow-gold: 0 0 20px rgba(245, 158, 11, 0.35);
    --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.35);

    /* ==========================================================================
       8. ANIMATION & BACKDROP FILTERS
       ========================================================================== */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --backdrop-blur-header: blur(20px) saturate(180%);
    --backdrop-blur-glass: blur(20px);
    --backdrop-blur-subtle: blur(12px);

    /* ==========================================================================
       9. TYPOGRAPHY TOKENS (Desktop Base 1280px+)
       ========================================================================== */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --text-xs: 13px;
    --text-sm: 15px;
    --text-base: 16px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 22px;
    --text-3xl: 26px;
    --text-4xl: 28px;
    --text-5xl: 30px;

    /* Semantic Headings & Body */
    --font-size-h1: 30px;
    --font-size-h2: 28px;
    --font-size-h3: 26px;
    --font-size-h4: 22px;
    --font-size-h5: 18px;
    --font-size-h6: 16px;
    --font-size-body: 16px;
    --font-size-small: 15px;
    --font-size-tiny: 13px;

    /* Line Heights */
    --lh-tight: 1.15;
    --lh-heading: 1.3;
    --lh-body: 1.65;
    --lh-caption: 1.45;

    /* ==========================================================================
       10. SPACING SCALE TOKENS
       ========================================================================== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Section & Container */
    --section-padding-v: 96px;
    --section-gap: 80px;
    --component-gap: 32px;
    --container-max-width: 1440px;
    --container-padding-h: 48px;
    --container-padding-v: 48px;

    /* ==========================================================================
       11. COMPONENT TOKENS
       ========================================================================== */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    --btn-height: 48px;
    --btn-font-size: 16px;
    --btn-padding-h: 24px;
    --btn-radius: 10px;
    --btn-min-width: 140px;

    --card-padding: 24px;
    --card-radius: 16px;
    --card-gap: 16px;

    --input-height: 48px;
    --input-font-size: 16px;
    --input-padding-h: 16px;
    --input-radius: 10px;
    --label-font-size: 14px;
    --helper-font-size: 13px;

    /* ==========================================================================
       12. FEATURE-SPECIFIC THEME PALETTES
       ========================================================================== */
    /* 1. Dashboard */
    --theme-dashboard-color: #93c5fd;
    --theme-dashboard-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(29, 78, 216, 0.40) 100%);
    --theme-dashboard-border: rgba(37, 99, 235, 0.45);
    --theme-dashboard-glow: 0 0 14px rgba(37, 99, 235, 0.25);

    /* 2. Tasks & Jobs (Electric Cyan / Royal Blue) */
    --theme-tasks-color: #38bdf8;
    --theme-tasks-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(6, 182, 212, 0.35) 100%);
    --theme-tasks-border: rgba(6, 182, 212, 0.45);
    --theme-tasks-glow: 0 0 14px rgba(6, 182, 212, 0.25);

    /* 3. Referral Network */
    --theme-referral-color: #f87171;
    --theme-referral-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(220, 38, 38, 0.35) 100%);
    --theme-referral-border: rgba(239, 68, 68, 0.45);
    --theme-referral-glow: 0 0 14px rgba(239, 68, 68, 0.25);

    /* 4. Wallet & Finance */
    --theme-wallet-color: #34d399;
    --theme-wallet-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.35) 100%);
    --theme-wallet-border: rgba(16, 185, 129, 0.45);
    --theme-wallet-glow: 0 0 14px rgba(16, 185, 129, 0.25);

    /* 5. Subscriptions & Premium */
    --theme-subscription-color: #fbbf24;
    --theme-subscription-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%);
    --theme-subscription-border: rgba(245, 158, 11, 0.45);
    --theme-subscription-glow: 0 0 14px rgba(245, 158, 11, 0.25);

    /* 6. Achievements & XP (Vibrant Pink & Purple) */
    --theme-achievements-color: #f472b6;
    --theme-achievements-bg: linear-gradient(135deg, rgba(236, 72, 153, 0.22) 0%, rgba(219, 39, 119, 0.35) 100%);
    --theme-achievements-border: rgba(236, 72, 153, 0.45);
    --theme-achievements-glow: 0 0 14px rgba(236, 72, 153, 0.25);
    --theme-achieve-color: var(--theme-achievements-color);
    --theme-achieve-bg: var(--theme-achievements-bg);
    --theme-achieve-border: var(--theme-achievements-border);
    --theme-achieve-glow: var(--theme-achievements-glow);

    /* 7. Profile & Account */
    --theme-profile-color: #a5b4fc;
    --theme-profile-bg: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(37, 99, 235, 0.38) 100%);
    --theme-profile-border: rgba(99, 102, 241, 0.45);
    --theme-profile-glow: 0 0 14px rgba(99, 102, 241, 0.25);

    /* 8. VIP Membership */
    --theme-vip-color: #fbbf24;
    --theme-vip-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(234, 88, 12, 0.35) 100%);
    --theme-vip-border: rgba(245, 158, 11, 0.45);
    --theme-vip-glow: 0 0 14px rgba(245, 158, 11, 0.25);

    /* 9. Help & Support */
    --theme-help-color: #22d3ee;
    --theme-help-bg: linear-gradient(135deg, rgba(6, 182, 212, 0.20) 0%, rgba(14, 165, 233, 0.30) 100%);
    --theme-help-border: rgba(6, 182, 212, 0.45);
    --theme-help-glow: 0 0 14px rgba(6, 182, 212, 0.22);

    /* 10. Contact Us */
    --theme-contact-color: #34d399;
    --theme-contact-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.20) 0%, rgba(5, 150, 105, 0.30) 100%);
    --theme-contact-border: rgba(16, 185, 129, 0.45);
    --theme-contact-glow: 0 0 14px rgba(16, 185, 129, 0.22);

    /* 11. Appeals */
    --theme-appeal-color: #fbbf24;
    --theme-appeal-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.20) 0%, rgba(217, 119, 6, 0.30) 100%);
    --theme-appeal-border: rgba(245, 158, 11, 0.45);
    --theme-appeal-glow: 0 0 14px rgba(245, 158, 11, 0.22);

    /* 12. About Us */
    --theme-about-color: #38bdf8;
    --theme-about-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.20) 0%, rgba(37, 99, 235, 0.30) 100%);
    --theme-about-border: rgba(56, 189, 248, 0.45);
    --theme-about-glow: 0 0 14px rgba(56, 189, 248, 0.22);

    /* 13. Logout Action */
    --theme-logout-color: #f87171;
    --theme-logout-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.20) 0%, rgba(220, 38, 38, 0.35) 100%);
    --theme-logout-border: rgba(239, 68, 68, 0.45);
    --theme-logout-glow: 0 0 14px rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   13. RESPONSIVE TOKEN SCALES & MEDIA QUERIES
   ========================================================================== */

/* Laptop / Medium Desktop (1024px – 1279px) */
@media (max-width: 1279px) {
    :root {
        --text-5xl: 28px;
        --text-4xl: 26px;
        --text-3xl: 24px;
        --text-2xl: 20px;
        --text-xl: 17px;
        --text-lg: 16px;
        --text-base: 15px;
        --text-sm: 14px;
        --text-xs: 12px;

        --font-size-h1: 28px;
        --font-size-h2: 26px;
        --font-size-h3: 24px;
        --font-size-h4: 20px;
        --font-size-h5: 17px;
        --font-size-h6: 15px;
        --font-size-body: 15px;
        --font-size-small: 14px;
        --font-size-tiny: 12px;

        --section-padding-v: 80px;
        --section-gap: 64px;
        --container-padding-h: 36px;
        --btn-height: 44px;
        --card-padding: 20px;
    }
}

/* Tablet (768px – 1023px) */
@media (max-width: 1023px) {
    :root {
        --text-5xl: 26px;
        --text-4xl: 24px;
        --text-3xl: 22px;
        --text-2xl: 19px;
        --text-xl: 16px;
        --text-lg: 15px;
        --text-base: 15px;
        --text-sm: 13px;
        --text-xs: 12px;

        --font-size-h1: 26px;
        --font-size-h2: 24px;
        --font-size-h3: 22px;
        --font-size-h4: 19px;
        --font-size-h5: 16px;
        --font-size-h6: 15px;
        --font-size-body: 15px;
        --font-size-small: 13px;
        --font-size-tiny: 12px;

        --section-padding-v: 64px;
        --section-gap: 48px;
        --container-padding-h: 24px;
        --btn-height: 42px;
        --card-padding: 18px;
    }
}

/* Large Mobile (640px – 767px) */
@media (max-width: 767px) {
    :root {
        --text-5xl: 24px;
        --text-4xl: 22px;
        --text-3xl: 20px;
        --text-2xl: 18px;
        --text-xl: 15px;
        --text-lg: 14px;
        --text-base: 14px;
        --text-sm: 13px;
        --text-xs: 11px;

        --font-size-h1: 24px;
        --font-size-h2: 22px;
        --font-size-h3: 20px;
        --font-size-h4: 18px;
        --font-size-h5: 15px;
        --font-size-h6: 14px;
        --font-size-body: 14px;
        --font-size-small: 13px;
        --font-size-tiny: 11px;

        --section-padding-v: 48px;
        --section-gap: 36px;
        --container-padding-h: 16px;
        --btn-height: 40px;
        --card-padding: 16px;
    }
}

/* Mobile (480px – 639px) */
@media (max-width: 639px) {
    :root {
        --text-5xl: 22px;
        --text-4xl: 20px;
        --text-3xl: 19px;
        --text-2xl: 17px;
        --text-xl: 15px;
        --text-lg: 14px;
        --text-base: 14px;
        --text-sm: 12px;
        --text-xs: 11px;

        --font-size-h1: 22px;
        --font-size-h2: 20px;
        --font-size-h3: 19px;
        --font-size-h4: 17px;
        --font-size-h5: 15px;
        --font-size-h6: 14px;
        --font-size-body: 14px;
        --font-size-small: 12px;
        --font-size-tiny: 11px;

        --section-padding-v: 36px;
        --section-gap: 28px;
        --container-padding-h: 14px;
        --btn-height: 38px;
        --card-padding: 14px;
    }
}

/* Tiny Mobile (300px – 479px) */
@media (max-width: 479px) {
    :root {
        --text-5xl: 20px;
        --text-4xl: 19px;
        --text-3xl: 17px;
        --text-2xl: 16px;
        --text-xl: 14px;
        --text-lg: 13px;
        --text-base: 13px;
        --text-sm: 12px;
        --text-xs: 10px;

        --font-size-h1: 20px;
        --font-size-h2: 19px;
        --font-size-h3: 17px;
        --font-size-h4: 16px;
        --font-size-h5: 14px;
        --font-size-h6: 13px;
        --font-size-body: 13px;
        --font-size-small: 12px;
        --font-size-tiny: 10px;

        --section-padding-v: 28px;
        --section-gap: 24px;
        --container-padding-h: 12px;
        --btn-height: 36px;
        --card-padding: 12px;
    }
}
