/*
 * Croplod Design Tokens
 * Google Account inspired, #000000 dark base, surface elevation system
 */
:root {
    /* Brand Colors */
    --color-primary-50: #eef2ff;
    --color-primary-100: #e0e7ff;
    --color-primary-200: #c7d2fe;
    --color-primary-300: #a5b4fc;
    --color-primary-400: #818cf8;
    --color-primary-500: #6366f1;
    --color-primary-600: #4f46e5;
    --color-primary-700: #4338ca;
    --color-primary-800: #3730a3;
    --color-primary-900: #312e81;

    --color-secondary-50: #f0fdfa;
    --color-secondary-100: #ccfbf1;
    --color-secondary-200: #99f6e4;
    --color-secondary-300: #5eead4;
    --color-secondary-400: #2dd4bf;
    --color-secondary-500: #14b8a6;
    --color-secondary-600: #0d9488;
    --color-secondary-700: #0f766e;
    --color-secondary-800: #115e59;
    --color-secondary-900: #134e4a;

    --color-success-50: #f0fdf4;
    --color-success-500: #22c55e;
    --color-success-600: #16a34a;

    --color-error-50: #fef2f2;
    --color-error-500: #ef4444;
    --color-error-600: #dc2626;

    --color-warning-50: #fffbeb;
    --color-warning-500: #f59e0b;
    --color-warning-600: #d97706;

    /* Sidebar item colors */
    --sidebar-color-home: #8ab4f8;
    --sidebar-color-account: #81c995;
    --sidebar-color-security: #fcad70;
    --sidebar-color-sessions: #8ab4f8;
    --sidebar-color-notifications: #c58af9;
    --sidebar-color-wallet: #8ab4f8;
    --sidebar-color-premium: #fdd663;
    --sidebar-color-settings: #9aa0a6;
    --sidebar-color-support: #8ab4f8;
    --sidebar-color-about: #9aa0a6;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Typography - Smart Font System */
    --font-family: 'Dana', 'Tahoma', sans-serif;
    --font-family-brand: 'Product Sans', 'Dana', sans-serif;
    --font-family-mono: 'Product Sans', monospace;

    /* Font sizes - Fluid scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Font weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Letter spacing */
    --letter-spacing-tight: -0.01em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.02em;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-index scale */
    --z-below: -1;
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-sidebar-overlay: 300;
    --z-sidebar: 400;
    --z-modal-backdrop: 450;
    --z-modal: 500;
    --z-toast: 600;
    --z-notification: 700;
    --z-confirm-overlay: 800;

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 280px;

    /* Touch target minimum */
    --touch-target: 44px;
}

/*
 * Light Theme (default)
 * Clean white background like Google products
 */
[data-theme="light"], :root {
    /* Surface elevation system */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-input: #f1f3f4;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-pressed: rgba(0, 0, 0, 0.08);
    --bg-active: rgba(0, 0, 0, 0.04);
    --bg-sidebar: #ffffff;

    /* Text hierarchy */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #9aa0a6;
    --text-disabled: #bdc1c6;
    --text-inverse: #ffffff;

    /* Border system - subtle, Google-style */
    --border-primary: #e8eaed;
    --border-secondary: #dadce0;
    --border-focus: var(--color-primary-500);
    --border-subtle: rgba(0, 0, 0, 0.06);

    /* Overlay */
    --overlay: rgba(0, 0, 0, 0.32);

    /* Sidebar states */
    --sidebar-bg-active: #e8f0fe;
    --sidebar-text-active: #1967d2;
    --sidebar-icon-active: #1967d2;

    /* Button states */
    --btn-primary-shadow: rgba(99, 102, 241, 0.3);
    --btn-primary-shadow-hover: rgba(99, 102, 241, 0.4);
    --btn-danger-shadow: rgba(239, 68, 68, 0.3);
    --btn-danger-shadow-hover: rgba(239, 68, 68, 0.4);

    /* Focus ring */
    --focus-ring: rgba(99, 102, 241, 0.2);

    /* Card shadows */
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --card-shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Surface tokens for component backgrounds */
    --surface-1: #f8f9fa;
    --surface-2: #f1f3f4;
    --surface-3: #e8eaed;

    /* Search */
    --search-shadow-focus: 0 1px 6px rgba(32, 33, 36, 0.18);

    /* Badge/icon backgrounds */
    --icon-bg-blue: rgba(138, 180, 248, 0.12);
    --icon-bg-green: rgba(129, 201, 149, 0.12);
    --icon-bg-orange: rgba(252, 173, 112, 0.12);
    --icon-bg-purple: rgba(197, 138, 249, 0.12);
    --icon-bg-primary: rgba(99, 102, 241, 0.08);
    --icon-bg-success: rgba(34, 197, 94, 0.12);
    --icon-bg-error: rgba(239, 68, 68, 0.12);
    --icon-bg-warning: rgba(245, 158, 11, 0.12);

    /* Profile avatar */
    --avatar-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);

    /* Scrollbar */
    --scrollbar-track: transparent;
    --scrollbar-thumb: var(--border-primary);
}

/*
 * Dark Theme
 * Pure #000000 base like Google Account/Gmail/Drive
 * User confirmed: background MUST be #000000 (pure black)
 */
[data-theme="dark"] {
    /* Surface elevation system - pure black hierarchy */
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1a1a1a;
    --bg-elevated: #242424;
    --bg-input: #1a1a1a;
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-pressed: rgba(255, 255, 255, 0.12);
    --bg-active: rgba(255, 255, 255, 0.08);
    --bg-sidebar: #000000;

    /* Text hierarchy */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-tertiary: #5f6368;
    --text-disabled: #3c4043;
    --text-inverse: #202124;

    /* Border system - very subtle */
    --border-primary: #2c2c2c;
    --border-secondary: #3c4043;
    --border-focus: var(--color-primary-400);
    --border-subtle: rgba(255, 255, 255, 0.06);

    /* Overlay */
    --overlay: rgba(0, 0, 0, 0.6);

    /* Sidebar states */
    --sidebar-bg-active: rgba(138, 180, 248, 0.12);
    --sidebar-text-active: #8ab4f8;
    --sidebar-icon-active: #8ab4f8;

    /* Button states */
    --btn-primary-shadow: rgba(99, 102, 241, 0.2);
    --btn-primary-shadow-hover: rgba(99, 102, 241, 0.3);
    --btn-danger-shadow: rgba(239, 68, 68, 0.2);
    --btn-danger-shadow-hover: rgba(239, 68, 68, 0.3);

    /* Focus ring */
    --focus-ring: rgba(129, 140, 248, 0.24);

    /* Card shadows - stronger in dark */
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --card-shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.6);

    /* Surface tokens */
    --surface-1: #0a0a0a;
    --surface-2: #1a1a1a;
    --surface-3: #242424;

    /* Search */
    --search-shadow-focus: 0 1px 6px rgba(0, 0, 0, 0.5);

    /* Badge/icon backgrounds */
    --icon-bg-blue: rgba(138, 180, 248, 0.16);
    --icon-bg-green: rgba(129, 201, 149, 0.16);
    --icon-bg-orange: rgba(252, 173, 112, 0.16);
    --icon-bg-purple: rgba(197, 138, 249, 0.16);
    --icon-bg-primary: rgba(129, 140, 248, 0.16);
    --icon-bg-success: rgba(34, 197, 94, 0.16);
    --icon-bg-error: rgba(239, 68, 68, 0.16);
    --icon-bg-warning: rgba(245, 158, 11, 0.16);

    /* Profile avatar */
    --avatar-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);

    /* Scrollbar */
    --scrollbar-track: transparent;
    --scrollbar-thumb: #3c4043;
}
