/* ============================================================
   V14 Theme Variables — Light & Dark Mode
   Uses Bootstrap 5.3 data-bs-theme attribute system
   ============================================================ */

/* ---- Light Theme (Default) ---- */
:root,
[data-bs-theme="light"] {
    /* Page backgrounds */
    --v14-body-bg: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    --v14-body-bg-flat: #f5f7fa;
    --v14-content-bg: transparent;

    /* Card system */
    --v14-card-bg: #ffffff;
    --v14-card-border: rgba(0, 0, 0, 0.06);
    --v14-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --v14-card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --v14-card-radius: 1rem;

    /* Text hierarchy */
    --v14-text-primary: #1a1d21;
    --v14-text-secondary: #6c757d;
    --v14-text-muted: #adb5bd;
    --v14-text-inverse: #ffffff;

    /* Stat card overlays */
    --v14-stat-blue: rgba(13, 110, 253, 0.08);
    --v14-stat-green: rgba(25, 135, 84, 0.08);
    --v14-stat-purple: rgba(111, 66, 193, 0.08);
    --v14-stat-orange: rgba(255, 153, 0, 0.08);
    --v14-stat-red: rgba(220, 53, 69, 0.08);
    --v14-stat-teal: rgba(32, 201, 151, 0.08);

    /* Surfaces & borders */
    --v14-surface-1: #ffffff;
    --v14-surface-2: #f8f9fa;
    --v14-surface-3: #e9ecef;
    --v14-border-light: #e9ecef;
    --v14-border-medium: #dee2e6;

    /* Navigation overrides */
    --v14-topbar-bg: #34495e;
    --v14-sidebar-bg: #2c3e50;
    --v14-footer-bg: #ffffff;
    --v14-footer-border: #e9ecef;

    /* Hero gradients */
    --v14-hero-admin: linear-gradient(135deg, #0d6efd 0%, #6f42c1 50%, #6610f2 100%);
    --v14-hero-affiliate: linear-gradient(135deg, #0d6efd 0%, #4f46e5 50%, #6366f1 100%);
    --v14-hero-vendor: linear-gradient(135deg, #059669 0%, #0d9488 50%, #14b8a6 100%);

    /* Chart colors */
    --v14-chart-grid: rgba(0, 0, 0, 0.06);
    --v14-chart-text: #6c757d;

    /* Scrollbar */
    --v14-scrollbar-track: #f1f1f1;
    --v14-scrollbar-thumb: #c1c1c1;
    --v14-scrollbar-thumb-hover: #a1a1a1;

    /* Misc */
    --v14-code-bg: #f8f9fa;
    --v14-modal-bg: #ffffff;
    --v14-dropdown-bg: #ffffff;
    --v14-dropdown-hover: #f8f9fa;
    --v14-input-bg: #ffffff;
    --v14-input-border: #ced4da;
    --v14-table-stripe: rgba(0, 0, 0, 0.02);
    --v14-table-hover: rgba(0, 0, 0, 0.04);
    --v14-alert-bg: #ffffff;
    --v14-badge-muted-bg: #e9ecef;
    --v14-badge-muted-text: #495057;
    --v14-progress-bg: #e9ecef;
    --v14-skeleton-base: #e9ecef;
    --v14-skeleton-shine: #f8f9fa;
}

/* ---- Dark Theme ---- */
[data-bs-theme="dark"] {
    /* Page backgrounds */
    --v14-body-bg: linear-gradient(135deg, #0f1117 0%, #1a1d2e 100%);
    --v14-body-bg-flat: #0f1117;
    --v14-content-bg: transparent;

    /* Card system */
    --v14-card-bg: #1e2130;
    --v14-card-border: rgba(255, 255, 255, 0.06);
    --v14-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --v14-card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
    --v14-card-radius: 1rem;

    /* Text hierarchy */
    --v14-text-primary: #e8eaed;
    --v14-text-secondary: #9aa0a6;
    --v14-text-muted: #5f6368;
    --v14-text-inverse: #1a1d21;

    /* Stat card overlays */
    --v14-stat-blue: rgba(59, 130, 246, 0.15);
    --v14-stat-green: rgba(34, 197, 94, 0.15);
    --v14-stat-purple: rgba(139, 92, 246, 0.15);
    --v14-stat-orange: rgba(251, 146, 60, 0.15);
    --v14-stat-red: rgba(239, 68, 68, 0.15);
    --v14-stat-teal: rgba(45, 212, 191, 0.15);

    /* Surfaces & borders */
    --v14-surface-1: #1e2130;
    --v14-surface-2: #252836;
    --v14-surface-3: #2d3143;
    --v14-border-light: rgba(255, 255, 255, 0.08);
    --v14-border-medium: rgba(255, 255, 255, 0.12);

    /* Navigation overrides */
    --v14-topbar-bg: #151823;
    --v14-sidebar-bg: #111320;
    --v14-footer-bg: #1e2130;
    --v14-footer-border: rgba(255, 255, 255, 0.08);

    /* Hero gradients (slightly darker / richer for dark mode) */
    --v14-hero-admin: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 50%, #6d28d9 100%);
    --v14-hero-affiliate: linear-gradient(135deg, #1d4ed8 0%, #4338ca 50%, #4f46e5 100%);
    --v14-hero-vendor: linear-gradient(135deg, #047857 0%, #0d9488 50%, #0f766e 100%);

    /* Chart colors */
    --v14-chart-grid: rgba(255, 255, 255, 0.06);
    --v14-chart-text: #9aa0a6;

    /* Scrollbar */
    --v14-scrollbar-track: #1e2130;
    --v14-scrollbar-thumb: #3d4158;
    --v14-scrollbar-thumb-hover: #4d5270;

    /* Misc */
    --v14-code-bg: #252836;
    --v14-modal-bg: #1e2130;
    --v14-dropdown-bg: #252836;
    --v14-dropdown-hover: #2d3143;
    --v14-input-bg: #252836;
    --v14-input-border: rgba(255, 255, 255, 0.12);
    --v14-table-stripe: rgba(255, 255, 255, 0.02);
    --v14-table-hover: rgba(255, 255, 255, 0.05);
    --v14-alert-bg: #252836;
    --v14-badge-muted-bg: #2d3143;
    --v14-badge-muted-text: #9aa0a6;
    --v14-progress-bg: #2d3143;
    --v14-skeleton-base: #252836;
    --v14-skeleton-shine: #2d3143;

    /* Bootstrap overrides for dark mode */
    --bs-body-bg: #0f1117;
    --bs-body-color: #e8eaed;
    --bs-border-color: rgba(255, 255, 255, 0.08);
    --bs-tertiary-bg: #252836;
    --bs-secondary-bg: #1e2130;
}
