/* Self-hosted type (see fonts/README.md). Variable faces; weights 400/500/600/700 in use. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/js/assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/js/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('/js/assets/fonts/plus-jakarta-sans-latin-ext-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('/js/assets/fonts/plus-jakarta-sans-latin-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/js/assets/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/js/assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  /* Brand */
  --navy: #091A34;
  --lime: #CBF468;
  --lime-dark: #365314;
  --lime-20: rgba(203, 244, 104, 0.2);
  --lime-10: rgba(203, 244, 104, 0.1);
  --lime-text: #1a2e05;

  /* Core palette */
  --background: #f5f6fa;
  --background-subtle: #fafbfc;
  --white: #ffffff;
  --foreground: #111827;
  --card: #ffffff;
  --card-foreground: #111827;
  --primary: #091A34;
  --primary-foreground: #ffffff;
  --primary-dark: #0c1f3d;
  --primary-light: #e8eef6;
  --primary-10: rgba(15, 42, 82, 0.1);
  --primary-20: rgba(15, 42, 82, 0.2);
  --accent: #CBF468;
  --accent-foreground: #0F2A52;
  --secondary: #f0f1f5;
  --secondary-foreground: #2d3748;
  --muted: #f1f5f9;
  --muted-foreground: #6b7280;
  --border: #e5e7eb;
  --input: #e5e7eb;
  --ring: #0F2A52;
  --popover: #ffffff;
  --popover-foreground: #111827;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --success: #1bb765;

  /* Info / link */
  --info: #1967d2;
  --info-bg: #e9f0fe;
  --info-border: #d2e3fc;

  /* Sidebar */
  --sidebar-background: #091A34;
  --sidebar-foreground: #94a3b8;
  --sidebar-primary: #CBF468;
  --sidebar-primary-foreground: #091A34;
  --sidebar-accent: rgba(203, 244, 104, 0.1);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-muted: #64748b;
  --sidebar-scrollbar-thumb: rgba(249, 252, 255, 0.897);

  /* Status */
  --status-green: #16a34a;
  --status-green-bg: #f0fdf4;
  --status-green-text: #14532d;
  --status-green-border: #bbf7d0;

  --status-yellow: #ca8a04;
  --status-yellow-bg: #fffbeb;
  --status-yellow-text: #92400e;
  --status-yellow-border: #fde68a;

  --status-red: #dc2626;
  --status-red-bg: #fef2f2;
  --status-red-text: #991b1b;
  --status-red-border: #fecaca;

  --status-blue: #1d4ed8;
  --status-blue-bg: #eff6ff;
  --status-blue-text: #1e3a8a;
  --status-blue-border: #bfdbfe;

  --status-orange: #ea580c;
  --status-orange-bg: #fff7ed;
  --status-orange-text: #9a3412;
  --status-orange-border: #fed7aa;

  --status-neutral-bg: #f1f5f9;
  --status-neutral-text: #475569;
  --status-neutral-border: #e2e8f0;

  /* Template purpose chips */
  --chip-followup-bg: #dbeafe;
  --chip-followup-text: #1d4ed8;
  --chip-followup-border: #93c5fd;
  --chip-review-bg: #dcfce7;
  --chip-review-text: #15803d;
  --chip-review-border: #86efac;
  --chip-reminder-bg: #ffedd5;
  --chip-reminder-text: #c2410c;
  --chip-reminder-border: #fdba74;
  --chip-review-reminder-bg: #ede9fe;
  --chip-review-reminder-text: #6d28d9;
  --chip-review-reminder-border: #c4b5fd;

  /* Chart colors */
  --chart-purple: #7c3aed;
  --chart-purple-light: #a78bfa;
  --chart-green: #22c55e;
  --chart-yellow: #eab308;
  --chart-red: #ef4444;
  --chart-blue: #3b82f6;
  --chart-blue-light: #eff6ff;

  /* Hover / interactive */
  --hover-bg: #f8f9fa;
  --border-muted: #cbd5e1;
  --background-muted: #f8fafc;

  /* Purple semantic tokens */
  --purple: #7c3aed;
  --purple-foreground: #7c3aed;

  --purple-bg-subtle: rgba(124, 58, 237, 0.05);
  --purple-bg: rgba(124, 58, 237, 0.1);
  --purple-border: rgba(124, 58, 237, 0.14);

  /* Territory colors */
  --territory-mint: hsl(152, 40%, 92%);
  --territory-pink: hsl(340, 40%, 93%);
  --territory-blue: hsl(210, 45%, 93%);
  --territory-yellow: hsl(45, 50%, 92%);
  --territory-lavender: hsl(262, 35%, 94%);
  --territory-peach: hsl(20, 50%, 93%);
  --territory-teal: hsl(180, 35%, 92%);
  --territory-sage: hsl(120, 25%, 92%);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type scale (Design System v5). Font size, line height and letter spacing per text role.
     Weight stays a literal in each component: 400 body, 500 button/menu/chip, 600 titles,
     700 section overlines only. Delivered as custom properties because component styles live
     in shadow roots, so a shared class could never reach them. */
  --fs-step-title: 26px;     --lh-step-title: 1.15;    --ls-step-title: -0.01em;
  --fs-kpi-value: 24px;      --lh-kpi-value: 24px;     --ls-kpi-value: -0.02em;
  --fs-page-title: 22px;     --lh-page-title: 1.25;    --ls-page-title: -0.01em;
  --fs-drawer-title: 16.5px; --lh-drawer-title: 24px;  --ls-drawer-title: -0.01em;
  --fs-card-title: 16px;     --lh-card-title: 1.3;
  --fs-topbar-title: 14px;   --lh-topbar-title: 1.25;
  --fs-contact-name: 14px;   --lh-contact-name: 20px;
  --fs-row-title: 13px;      --lh-row-title: 1.4;
  --fs-body: 13px;           --lh-body: 1.4;
  --fs-button: 12.5px;       --lh-button: 1;
  --fs-input: 12px;          --lh-input: 1.4;
  --fs-meta: 11.5px;         --lh-meta: 18px;
  --fs-caption: 11px;        --lh-caption: 1.4;
  --fs-kpi-label: 11px;      --lh-kpi-label: 1.2;      --ls-kpi-label: 0.1em;
  --fs-table-head: 11px;     --lh-table-head: 1.2;     --ls-table-head: 0.06em;
  --fs-section-label: 10px;  --lh-section-label: 16px; --ls-section-label: 0.08em;
  --fs-nav-group: 10px;      --lh-nav-group: 1.2;      --ls-nav-group: 0.14em;
  --fs-chip-micro: 10px;     --lh-chip-micro: 12px;    --ls-chip-micro: 0.005em;
  /* Settings roles (v5 Settings components: PageHeader sub, card/row hint, Label, Helper title,
     MiniTile label). The 13.5 size also serves switch labels and md buttons. */
  --fs-page-sub: 13.5px;     --lh-page-sub: 1.625;
  --fs-hint: 12px;           --lh-hint: 1.375;
  --fs-label: 12.5px;        --lh-label: 1.4;
  --fs-helper-title: 14px;   --lh-helper-title: 1.375;
  --fs-tile-label: 10.5px;   --lh-tile-label: 1.2;     --ls-tile-label: 0.1em;

  /* Focus ring for buttons and other non-input controls; pair with outline-offset: 2px.
     Inputs use border-color: var(--blue-600) + box-shadow: var(--shadow-focus) instead. */
  --focus-outline: 2px solid var(--blue-600);

  /* Spacing & radius */
  --radius: 8px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Brand Colors */
  --brand-whatsapp: #25D366;
  --brand-facebook: #1877F2;
  --brand-google: #4285F4;
  --brand-meta: #0668E1;
  --brand-zomato: #E23744;
  --brand-instagram: #E1306C;
  --brand-swiggy: #FC8019;
  --brand-linkedin: #0A66C2;
  --brand-youtube: #FF0000;

  /* AI Profile Accents */
  --ai-primary: #7c3aed;
  --ai-primary-dark: #6d28d9;
  --ai-primary-light: rgba(124, 58, 237, 0.05);
  --ai-primary-border: rgba(124, 58, 237, 0.14);

  /* Grays */
  --g50: #f9fafb;
  --g100: #f3f4f6;
  --g200: #e5e7eb;
  --g300: #d1d5db;
  --g400: #9ca3af;
  --g500: #6b7280;
  --g600: #4b5563;
  --g700: #374151;
  --g800: #1f2937;
  --g900: #111827;

  /* Teal semantic tokens */
  --teal: #1D9E75;
  --teal-light: #F0FDF8;
  --teal-border: #A2D9C7;
  --tlt: #E1F5EE;
  --tmd: #1D9E75;
  /* Using base for medium if not specified */
  --tdk: #146D51;

  /* Preview Mockups */
  --preview-red: #ff5f56;
  --preview-yellow: #ffbd2e;
  --preview-green: #27c93f;
  --preview-frame: #1a1a1a;
  --preview-bezel: #000000;
  --preview-bg-subtle: #fdfdfd;

  /* ------------------------------------------------------------------
     Design System v5 tokens (reference screen: Tasks & Leads v32).
     Names follow the v5 tokens.css so component CSS can stop writing
     literal hex values. Legacy tokens above stay for existing callers.
     ------------------------------------------------------------------ */

  /* Gray ramp (neutral text; v5 moved text off slate) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;

  /* Slate ramp (cards and chips) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-150: #e9eef4;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Blue (links and selection only, never a CTA) */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-soft: #eff4ff;
  --blue-ring: rgba(37, 99, 235, 0.12);

  /* Lime ramp (the one primary action) */
  --lime-50: #f8fdea;
  --lime-100: #f1fbd4;
  --lime-200: #e8f8b8;
  --lime-300: #ddf593;
  --lime-400: #d4f27e;
  --lime-500: #cbf468;
  --lime-600: #a8d840;
  --lime-700: #85b32c;
  --lime-800: #648a1f;
  --lime-900: #466314;
  --lime-alpha-10: rgba(203, 244, 104, 0.10);

  /* Navy chrome */
  --navy-950: #091a34;
  --navy-900: #0b2342;
  --navy-850: #0e2a52;
  --navy-800: #13315a;
  --navy-700: #1f3d6b;
  --navy-200: #adbbd5;

  /* On-navy text */
  --sidebar-text: #a9b7ce;
  --sidebar-meta: #8095b4;
  --sidebar-group: #4a5d78;
  --sidebar-chevron: #6b84a8;
  --on-dark-hover: rgba(255, 255, 255, 0.04);
  --on-dark-fill: rgba(255, 255, 255, 0.05);
  --on-dark-divider: rgba(255, 255, 255, 0.06);
  --on-dark-border: rgba(255, 255, 255, 0.08);
  --on-dark-border-strong: rgba(255, 255, 255, 0.10);
  --on-dark-danger-bg: rgba(220, 38, 38, 0.16);
  --on-dark-danger-text: #fca5a5;
  --text-on-dark: #ffffff;
  --text-on-dark-85: rgba(255, 255, 255, 0.85);
  --text-on-dark-70: rgba(255, 255, 255, 0.70);
  --text-on-dark-soft: rgba(255, 255, 255, 0.55);
  --avatar-self: #0e8f7e;

  /* Semantic text */
  --text-primary: var(--gray-900);
  --text-strong: var(--gray-700);
  --text-body: var(--gray-600);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --text-placeholder: var(--gray-400);
  --text-link: var(--blue-600);
  --text-link-hover: var(--blue-700);

  /* Surfaces */
  --surface-page: var(--slate-50);
  --surface-card: #ffffff;
  --surface-drawer-header: var(--slate-50);
  --surface-row-hover: var(--gray-50);
  --surface-table-head: rgba(249, 250, 251, 0.6);
  --surface-drawer-footer: rgba(249, 250, 251, 0.4);
  --surface-selected: var(--blue-soft);

  /* Borders */
  --border-card: var(--slate-200);
  --border-input: var(--gray-200);
  --border-divider: var(--gray-100);
  --border-strong: var(--slate-300);

  /* Actions */
  --action-primary: var(--lime-500);
  --action-primary-hover: var(--lime-600);
  --action-primary-text: var(--gray-900);
  --control-selected: var(--blue-600);

  /* Status */
  --status-success: #88e788;
  --status-success-bg: #f1fbe7;
  --status-success-border: #d2f0c2;
  --status-success-text: #14532d;
  --status-warning: #d97706;
  --status-warning-bg: #fffbeb;
  --status-warning-border: #fde68a;
  --status-warning-strip: #fef3c7;
  --status-warning-text: #92400e;
  --status-warning-strong: #b45309;
  --status-danger: #dc2626;
  --status-danger-bg: #fef2f2;
  --status-danger-border: #fecaca;
  --status-danger-text: #991b1b;
  --status-danger-strong: #b91c1c;
  --status-info: #7c3aed;
  --status-info-bg: #f5f3ff;
  --status-info-border: #ddd6fe;
  --status-info-text: #5b21b6;

  /* Workflow chips */
  --chip-open-text: var(--blue-800);
  --chip-open-bg: var(--blue-50);
  --chip-open-border: var(--blue-200);
  --chip-open-dot: var(--blue-600);
  --chip-overdue-text: var(--status-danger-text);
  --chip-overdue-bg: var(--status-danger-bg);
  --chip-overdue-border: var(--status-danger-border);
  --chip-overdue-dot: var(--status-danger);
  --chip-closed-text: var(--gray-600);
  --chip-closed-bg: var(--gray-100);
  --chip-closed-border: var(--gray-200);
  --chip-closed-dot: var(--gray-400);
  --chip-high-text: var(--status-warning-text);
  --chip-high-bg: var(--status-warning-bg);
  --chip-high-border: var(--status-warning-border);
  --chip-low-text: var(--status-success-text);
  --chip-low-bg: var(--status-success-bg);
  --chip-low-border: var(--status-success);
  --chip-contacted-text: var(--status-info-text);
  --chip-contacted-bg: var(--status-info-bg);
  --chip-contacted-border: var(--status-info-border);

  /* Platform marks (never recolour) */
  --plat-instagram: #e1306c;
  --plat-x: #0f172a;
  --plat-google: #4285f4;
  --plat-facebook: #1877f2;
  --plat-youtube: #ff0000;
  --plat-linkedin: #0a66c2;
  --plat-whatsapp: #25d366;
  --plat-email: #db2777;
  --plat-phone: #4f46e5;
  --plat-appstore: #0d96f6;

  /* Stat tile neutral icon square (v5 MiniTile default) */
  --kpi-human-bg: #f4f6fb;

  /* Overlays and elevation */
  --overlay-scrim: rgba(15, 23, 42, 0.42);
  --shadow-card: 0 1px 0 rgba(17, 24, 39, 0.04), 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-analytics: 0 1px 2px rgba(17, 24, 39, 0.04), 0 6px 20px -16px rgba(17, 24, 39, 0.16);
  --shadow-pop: 0 8px 24px -8px rgba(17, 24, 39, 0.10), 0 2px 6px rgba(17, 24, 39, 0.06);
  --shadow-float: 0 20px 60px -20px rgba(17, 24, 39, 0.25), 0 8px 20px -8px rgba(17, 24, 39, 0.12);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.12);

  /* Spacing (4px base with half steps) */
  --space-2xs: 4px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-10: 10px;
  --space-md: 12px;
  --space-14: 14px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  /* Fixed sizes */
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --drawer-width: 560px;
  --input-height: 33px;
  --button-sm: 32px;
  --segment-height: 26px;
  --nav-item-height: 36px;
  --row-height: 68px;
  --kpi-height: 90px;
  --menu-item-height: 32px;

  /* Motion (one curve; durations by element) */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-check: 120ms;
  --dur-fast: 150ms;
  --dur-chip: 200ms;
  --dur-row: 240ms;
  --dur-enter: 280ms;

  /* Layering: shell < topbar < modal scrim < drawer panel < confirm < dropdown/menus < tooltip < toast.
     Menus sit above drawers because they open from inside them; tooltips above menus because the
     thing they describe can be a menu item; toasts above everything so they stay readable. */
  --z-sticky: 10;
  --z-shell: 20;
  --z-topbar: 30;
  --z-modal: 50;
  --z-drawer: 80;
  --z-confirm: 90;
  --z-dropdown: 100;
  --z-tooltip: 110;
  --z-toast: 120;
}
