/* static/theme.css */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Light Theme Palette */
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8fafc;
  --bg-accent: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  --bg-accent-hover: linear-gradient(135deg, #10b981, #059669);
  --bg-form-field: #fafafa;

  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-inverted: #ffffff;
  --text-accent: #4338ca;

  --border-primary: #e5e7eb;
  --border-secondary: #d1d5db;
  --border-accent: #667eea;

  --shadow-color: rgba(0, 0, 0, 0.08);

  /* Semantic Colors */
  --color-success-bg: #d1fae5;
  --color-success-text: #065f46;
  --color-danger: #ef4444;
  --color-danger-bg: #fee2e2;
  --color-danger-text: #991b1b;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --color-info-bg: #eef2ff;
  --color-info-text: #4338ca;
  --color-disabled: #f3f4f6;

  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  
  /* Button and UI Colors */
  --primary-color: #667eea;
  --primary-hover: #5a67d8;
  --secondary-color: #e5e7eb;
  --secondary-hover: #d1d5db;
  --card-bg: #ffffff;
  --hover-bg: #f3f4f6;
  --border-color: #e5e7eb;
  --success-bg: #d1fae5;
  --success-color: #065f46;
  --warning-bg: #fef3c7;
  --warning-color: #92400e;
  --info-bg: #eef2ff;
  --info-color: #4338ca;
  --danger-bg: #fee2e2;
  --danger-color: #991b1b;
}

[data-theme="dark"] {
  /* Dark Theme Palette */
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-accent: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --bg-accent-hover: linear-gradient(135deg, #10b981, #059669);
  --bg-form-field: #1f2937;

  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-muted: #9ca3af;

  /* --- THIS IS THE CRITICAL FIX --- */
  /* --text-inverted was a dark color, it must be a light color. */
  --text-inverted: #f9fafb;

  --text-accent: #a5b4fc;

  --border-primary: #374151;
  --border-secondary: #4b5563;
  --border-accent: #818cf8;

  --shadow-color: rgba(0, 0, 0, 0.2);

  /* Semantic Colors */
  --color-success-bg: #052e16;
  --color-success-text: #6ee7b7;
  --color-danger: #fca5a5;
  --color-danger-bg: #450a0a;
  --color-danger-text: #fca5a5;
  --color-warning-bg: #422006;
  --color-warning-text: #fcd34d;
  --color-info-bg: #1e1b4b;
  --color-info-text: #a5b4fc;
  --color-disabled: #374151;

  --accent-primary: #818cf8;
  --accent-secondary: #a78bfa;
  
  /* Button and UI Colors - Dark Theme */
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --secondary-color: #374151;
  --secondary-hover: #4b5563;
  --card-bg: #1f2937;
  --hover-bg: #374151;
  --border-color: #374151;
  --success-bg: #052e16;
  --success-color: #6ee7b7;
  --warning-bg: #422006;
  --warning-color: #fcd34d;
  --info-bg: #1e1b4b;
  --info-color: #a5b4fc;
  --danger-bg: #450a0a;
  --danger-color: #fca5a5;
}