/* =========================================================
   SITISE INVOICE MANAGER - DESIGN TOKENS & PALETTES
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Default Light Theme Palette: #120907, #12203a, #145687, #2092d9, #20cad8, #F2F2F2 */
:root, [data-theme="light"] {
  --theme-mode: light;

  /* Brand Palette (User Specified) */
  --color-primary: #2092d9;
  --color-primary-hover: #145687;
  --color-primary-light: #20cad8;
  --color-primary-glow: rgba(32, 146, 217, 0.2);
  --color-accent: #145687;

  /* Surfaces & Backgrounds (Light) */
  --bg-app: #F2F2F2;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-modal-overlay: rgba(18, 9, 7, 0.6);

  /* Text Colors (Light) */
  --text-primary: #120907;
  --text-secondary: #12203a;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-card: #cbd5e1;
  --border-focus: #2092d9;
  --border-active: #145687;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(18, 9, 7, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(18, 9, 7, 0.1), 0 2px 4px -2px rgba(18, 9, 7, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(18, 9, 7, 0.12), 0 4px 6px -4px rgba(18, 9, 7, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(18, 9, 7, 0.15), 0 8px 10px -6px rgba(18, 9, 7, 0.1);
  --shadow-glow: 0 0 15px rgba(32, 146, 217, 0.2);

  /* Status Colors */
  --status-draft: #d97706;
  --status-draft-bg: #fef3c7;
  --status-draft-border: #fcd34d;

  --status-sent: #7c3aed;
  --status-sent-bg: #ede9fe;
  --status-sent-border: #c4b5fd;

  --status-paid: #059669;
  --status-paid-bg: #d1fae5;
  --status-paid-border: #6ee7b7;

  --status-partial: #0284c7;
  --status-partial-bg: #e0f2fe;
  --status-partial-border: #7dd3fc;

  --status-cancelled: #e11d48;
  --status-cancelled-bg: #ffe4e6;
  --status-cancelled-border: #fda4af;

  /* Typography */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-display: 'Outfit', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 70px;
}

/* Dark Theme Derived from User Palette */
[data-theme="dark"] {
  --theme-mode: dark;

  --color-primary: #2092d9;
  --color-primary-hover: #145687;
  --color-primary-light: #20cad8;
  --color-primary-glow: rgba(32, 202, 216, 0.25);
  --color-accent: #20cad8;

  /* Dark Surfaces */
  --bg-app: #0a1120;
  --bg-sidebar: #0e172a;
  --bg-card: #131e36;
  --bg-card-hover: #192744;
  --bg-card-subtle: #16223d;
  --bg-input: #0c1424;
  --bg-modal-overlay: rgba(5, 8, 15, 0.82);

  /* Text Colors (Dark) */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8395aa;
  --text-inverted: #0a1120;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(32, 202, 216, 0.16);
  --border-focus: #20cad8;
  --border-active: #2092d9;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(32, 146, 217, 0.25);

  /* Status Colors */
  --status-draft: #fbbf24;
  --status-draft-bg: rgba(251, 191, 36, 0.12);
  --status-draft-border: rgba(251, 191, 36, 0.3);

  --status-sent: #a78bfa;
  --status-sent-bg: rgba(167, 139, 250, 0.12);
  --status-sent-border: rgba(167, 139, 250, 0.3);

  --status-paid: #34d399;
  --status-paid-bg: rgba(52, 211, 153, 0.12);
  --status-paid-border: rgba(52, 211, 153, 0.3);

  --status-partial: #38bdf8;
  --status-partial-bg: rgba(56, 189, 248, 0.12);
  --status-partial-border: rgba(56, 189, 248, 0.3);

  --status-cancelled: #fb7185;
  --status-cancelled-bg: rgba(251, 113, 133, 0.12);
  --status-cancelled-border: rgba(251, 113, 133, 0.3);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}
