/* LeadFlow design tokens and shared primitives */
:root {
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-2: #F9FAFC;
  --ink: #0E1525;
  --ink-2: #344054;
  --muted: #667085;
  --line: #E4E7EE;
  --line-2: #D0D5DF;
  --brand: #4C4DDC;
  --brand-2: #6E5BF5;
  --brand-ink: #3A3BB8;
  --brand-soft: #EEEEFD;
  --teal: #0EA5A3;
  --side: #0D1222;
  --side-2: #151B30;
  --side-ink: #C7CCDB;
  --high: #E5484D;  --high-soft: #FDECEC;
  --mid: #E3912B;   --mid-soft: #FDF3E4;
  --low: #3E9B6E;   --low-soft: #E8F5EE;
  --info: #2F6FEB;  --info-soft: #E9F0FE;
  --warn: #C27803;  --warn-soft: #FEF6E0;
  --err: #D92D20;   --err-soft: #FEECEA;
  --r: 10px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); border-color: #BAC1CF; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(76, 77, 220, .3); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(16, 24, 40, .05); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.field { display: grid; gap: 6px; align-content: start; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .opt { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23667085' stroke-width='1.8' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(76, 77, 220, .15); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--err); }
.field-error { font-size: 12.5px; color: var(--err); }
.hint { font-size: 12.5px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #F0F2F6; color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.p-Visok { background: var(--high-soft); color: #B4232A; }
.p-Srednji { background: var(--mid-soft); color: #A15C07; }
.p-Nizak { background: var(--low-soft); color: #23704C; }
.s-Novo { background: var(--info-soft); color: #1F55C7; }
.s-Kontaktiran { background: #F1EDFE; color: #5B3FD1; }
.s-Ponuda-poslata { background: #E6F6F6; color: #0B7A78; }
.s-Dobijen { background: var(--low-soft); color: #23704C; }
.s-Izgubljen { background: #F0F2F6; color: #5A6273; }
.s-Za-proveru { background: var(--warn-soft); color: #9A5B00; }
.l-info { background: var(--info-soft); color: #1F55C7; }
.l-warn { background: var(--warn-soft); color: #9A5B00; }
.l-error { background: var(--err-soft); color: #B42318; }

.demo-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #FFF4D6; color: #8A5A00; border: 1px solid #F5DFA3; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
