/* FlowLeads CRM — design tokens (single source of truth for color) */

:root {
  /* === FLOWLY BRAND COLORS === */

  /* Sidebar — light shell; the dark ink surface is reserved for the
     primary work panel (see --color-ink) */
  --color-sidebar:        #FFFFFF;
  --color-sidebar-light:  #F5F7FC;
  --color-sidebar-hover:  #F1F4FA;
  --color-border-dark:    #2A3B57;

  /* Ink — the one dark surface, used where the user's main work is */
  --color-ink:            #15243B;
  --color-ink-raised:     #1D3050;
  --color-ink-border:     #2F4263;
  --color-ink-text:       #FFFFFF;
  --color-ink-text-muted: #A9B6CC;

  /* Primary accent — violet, FlowLeads' own identity */
  --color-accent:         #5C43CD;
  --color-accent-hover:   #4A34B0;
  --color-accent-soft:    #EFEBFC;
  --color-accent-border:  #D9D0F7;

  /* Highlight — logo blue, used sparingly for small brand details */
  --color-highlight:      #2F6FED;
  --color-highlight-dark: #1D54C4;

  /* Backgrounds */
  --color-bg:             #F5F7FC;
  --color-bg-secondary:   #ECEFF6;
  --color-card:           #FFFFFF;
  --color-card-hover:     #FAFBFF;

  /* Borders */
  --color-border:         #E2E7F0;
  --color-border-light:   #EDF0F6;

  /* Text */
  --color-text-primary:   #172033;
  --color-text-secondary: #526079;
  --color-text-muted:     #8A94A6;
  --color-text-inverse:   #FFFFFF;
  --color-text-accent:    #5C43CD;
  --color-text-highlight: #2F6FED;

  /* Status */
  --color-success:        #10B981;
  --color-success-soft:   #D1FAE5;
  --color-success-emphasis: #065F46;
  --color-warning:        #F59E0B;
  --color-warning-soft:   #FEF3C7;
  --color-warning-emphasis: #92400E;
  --color-danger:         #EF4444;
  --color-danger-soft:    #FEE2E2;
  --color-danger-emphasis: #991B1B;
  --color-info:           #2F6FED;
  --color-info-soft:      #DBEAFE;
  --color-info-emphasis:  #1E40AF;
  --color-neutral-soft:   #F3F4F6;
  --color-neutral-emphasis: #374151;
  --color-accent-emphasis: #4A34B0;

  /* Pipeline stages */
  --stage-new:            #8B5CF6;
  --stage-new-soft:       #EDE9FE;
  --stage-contacted:      #3B82F6;
  --stage-contacted-soft: #DBEAFE;
  --stage-interested:     #F59E0B;
  --stage-interested-soft:#FEF3C7;
  --stage-proposal:       #EC4899;
  --stage-proposal-soft:  #FCE7F3;
  --stage-won:            #10B981;
  --stage-won-soft:       #D1FAE5;
  --stage-lost:           #6B7280;
  --stage-lost-soft:      #F3F4F6;

  /* Sidebar UI (derived, no extra hex in components) */
  --sidebar-text:         #46536B;
  --sidebar-text-hover:   #172033;
  --sidebar-text-muted:   #6B778C;
  --sidebar-text-label:   #8A94A6;
  --sidebar-text-search:  #6B778C;
  --sidebar-border:       #E2E7F0;
  --sidebar-surface:      #F5F7FC;
  --sidebar-surface-hover:#ECEFF6;
  --sidebar-item-hover:   #F1F4FA;
  --sidebar-grid-line:    transparent;

  /* Webhook providers */
  --webhook-slack-bg:     #4a154b;
  --webhook-slack-text:   #f5e6ff;
  --webhook-teams-bg:     #464eb8;
  --webhook-teams-text:   #e8ebff;

  /* Overlays */
  --overlay-backdrop:     rgba(0, 0, 0, 0.45);
  --overlay-modal:        rgba(0, 0, 0, 0.6);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:   11px;
  --font-size-sm:   13px;
  --font-size-base: 14px;
  --font-size-md:   15px;
  --font-size-lg:   18px;
  --font-size-xl:   24px;
  --font-size-2xl:  32px;
  --font-size-3xl:  40px;

  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:  1.25;
  --line-height-base:   1.5;
  --line-height-relaxed:1.625;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;

  /* Radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:  0 1px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-accent: 0 4px 14px rgba(92, 67, 205, 0.28);

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --sidebar-width: 216px;
  --sidebar-width-collapsed: 64px;
  --topbar-height: 0px;

  /* Focus ring */
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

/* Reset & base normalization */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-normal);
  background: var(--color-bg);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.app-main {
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

p {
  margin: 0 0 var(--space-3);
}

ul, ol {
  margin: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}
