/* Platform FE Auth – centralised styling (colours, fonts, spacing, shadows).
 * Loaded at startup from config/env/.platform_fe_auth_config (or PLATFORM_FE_AUTH_CONFIG).
 * Injected after tokens.css so these values override defaults.
 * Edit this file to change theme for the auth portal. */

:root {
  /* Color System - Light Mode */
  --color-primary: #022d54;
  --color-primary-hover: #011831;
  --color-primary-light: #4a90e2;
  --color-accent: #022d54;

  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafb;
  --color-bg-tertiary: #f1f5f9;
  --color-bg-card: #ffffff;
  --color-bg-overlay: rgba(0, 0, 0, 0.5);
  --color-bg-hover: rgba(2, 45, 84, 0.05);

  /* Text Colors */
  --color-text-primary: #2d3748;
  --color-text-secondary: #4a5568;
  --color-text-tertiary: #718096;
  --color-text-inverse: #ffffff;
  --color-text-muted: #a0aec0;

  /* Border Colors */
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-border-dark: #cbd5e0;

  /* Status Colors */
  --color-success: #38a169;
  --color-success-light: #c6f6d5;
  --color-success-dark: #276749;
  --color-warning: #d69e2e;
  --color-warning-light: #fefcbf;
  --color-warning-dark: #b7791f;
  --color-error: #e53e3e;
  --color-error-light: #fed7d7;
  --color-error-dark: #c53030;
  --color-info: #3182ce;
  --color-info-light: #bee3f8;
  --color-info-dark: #2c5282;

  /* Shadow System */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.12);

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

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Typography */
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", "Monaco", "Consolas", "Courier New", monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Font Weights */
  --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;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-smooth: 0.3s ease;

  /* App layout */
  --app-header-height: 64px;
  --app-main-content-offset: 80px;

  /* Focus (inputs, buttons) */
  --focus-ring: rgba(2, 45, 84, 0.2);

  /* Footer (primary-colored surface overlays) */
  --footer-overlay: rgba(255, 255, 255, 0.1);
  --footer-overlay-strong: rgba(255, 255, 255, 0.2);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 9999;

  /* Toast dark variant (fe-shared ToastContainer) – controlled here so theme stays central */
  --toast-dark-bg: #1f2937;
  --toast-dark-border: rgba(255, 255, 255, 0.1);
  --toast-dark-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  --toast-dark-text: #ffffff;
  --toast-dark-text-muted: rgba(255, 255, 255, 0.9);
  --toast-dark-close: rgba(255, 255, 255, 0.7);
  --toast-dark-close-hover-bg: rgba(255, 255, 255, 0.1);
  --toast-dark-progress-bg: rgba(0, 0, 0, 0.5);
  --toast-dark-success-border: #10b981;
  --toast-dark-error-border: #ef4444;
  --toast-dark-warning-border: #f97316;
  --toast-dark-info-border: #3b82f6;
}

[data-theme="dark"] {
  --color-primary: #5a9fd4;
  --color-primary-hover: #4a8bc2;
  --color-primary-light: #6bb3ff;
  --color-accent: #6bb3ff;

  --color-bg-primary: #1a1d23;
  --color-bg-secondary: #242831;
  --color-bg-tertiary: #2d3748;
  --color-bg-card: #242831;
  --color-bg-overlay: rgba(0, 0, 0, 0.7);
  --color-bg-hover: rgba(255, 255, 255, 0.05);

  --color-text-primary: #e2e8f0;
  --color-text-secondary: #cbd5e0;
  --color-text-tertiary: #a0aec0;
  --color-text-inverse: #1a1d23;
  --color-text-muted: #718096;

  --color-border: #3a4553;
  --color-border-light: #2d3748;
  --color-border-dark: #4a5568;

  --color-success: #48bb78;
  --color-success-light: rgba(72, 187, 120, 0.15);
  --color-success-dark: #48bb78;
  --color-warning: #ed8936;
  --color-warning-light: rgba(237, 137, 54, 0.15);
  --color-warning-dark: #ed8936;
  --color-error: #f56565;
  --color-error-light: rgba(245, 101, 101, 0.15);
  --color-error-dark: #f56565;
  --color-info: #4299e1;
  --color-info-light: rgba(66, 153, 225, 0.15);
  --color-info-dark: #4299e1;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.5);

  --hover-overlay: rgba(255, 255, 255, 0.05);
  --active-overlay: rgba(255, 255, 255, 0.1);
  --focus-ring: rgba(90, 159, 212, 0.3);
}
