/**
 * DexPlano Design Tokens - Unified Light/Dark
 */

:root {
  /* Colors - Light Mode */
  --color-primary: #0678FF;
  --color-background: #F9F9FB;
  --color-card: #FFFFFF;
  --color-text: #1D1D1F;
  --color-text-secondary: #6B7280;
  --color-text-tertiary: #9ca3af;
  --color-border: #E9E9E9;
  --color-border-hover: #d1d5db;
  
  /* Semantic */
  --color-success: #00cc66;
  --color-danger: #f10c45;
  --color-warning: #FF9500;
  --color-error: #ef4444;
  
  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.08);
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  --font-size-4xl: 56px;
  --font-size-5xl: 64px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Dark Mode Override */
html.dark {
  --color-background: #0D0D0D;
  --color-card: #1C1C1E;
  --color-text: #F5F5F7;
  --color-text-secondary: #98989F;
  --color-text-tertiary: #737373;
  --color-border: #2C2C2E;
  --color-border-hover: #404040;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Base Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Date Input Font Fix */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    font-family: var(--font-sans) !important;
}

/* Dark Mode Toggle */
#dark-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    cursor: pointer;
    transition: all var(--transition-base);
}

#dark-mode-toggle:hover {
    background: var(--color-background);
    border-color: var(--color-border-hover);
}

#dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
    stroke-width: 2;
}

html:not(.dark) #dark-mode-toggle .icon-moon { display: block; }
html:not(.dark) #dark-mode-toggle .icon-sun { display: none; }
html.dark #dark-mode-toggle .icon-moon { display: none; }
html.dark #dark-mode-toggle .icon-sun { display: block; }
