/* AdCliks Lidlar — same look as the Lidlar CRM (dark theme, Geist). */
:root {
  --background: oklch(0.165 0.008 286);
  --foreground: oklch(0.95 0.004 286);
  --column: oklch(0.185 0.008 286);
  --card: oklch(0.235 0.01 286);
  --popover: oklch(0.22 0.01 286);
  --primary: oklch(0.66 0.2 292);
  --primary-fg: oklch(0.99 0 0);
  --secondary: oklch(0.26 0.01 286);
  --secondary-fg: oklch(0.92 0.004 286);
  --muted: oklch(0.25 0.01 286);
  --muted-fg: oklch(0.66 0.012 286);
  --accent: oklch(0.3 0.06 292);
  --accent-fg: oklch(0.88 0.08 292);
  --destructive: oklch(0.65 0.2 25);
  --success: oklch(0.72 0.16 150);
  --telegram: oklch(0.62 0.13 235);
  --whatsapp: oklch(0.64 0.16 152);
  --border: oklch(1 0 0 / 8%);
  --input: oklch(1 0 0 / 12%);
  --raised: 0 1px 0 oklch(1 0 0 / 4%) inset, 0 2px 10px oklch(0 0 0 / 35%);
  --sidebar: oklch(0.15 0.008 286);
  --sidebar-accent: oklch(0.24 0.01 286);
  --radius: 12px;
  --stage-new: oklch(0.68 0.16 250);
  --stage-no_answer: oklch(0.6 0.01 286);
  --stage-contacted: oklch(0.82 0.15 90);
  --stage-interested: oklch(0.74 0.16 55);
  --stage-meeting: oklch(0.68 0.19 300);
  --stage-contract: oklch(0.72 0.14 200);
  --stage-price: oklch(0.74 0.16 55);
  --stage-won: oklch(0.72 0.16 150);
  --stage-lost: oklch(0.66 0.2 25);
  color-scheme: dark;
  --hover-ring: oklch(0.66 0.2 292 / 50%);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--background); color: var(--foreground); -webkit-font-smoothing: antialiased; }
body { font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted-fg); }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--raised); }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }

/* Brand */
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--primary-fg); font-size: 14px; font-weight: 700; }

/* Buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--input); background: transparent; font-size: 14px; font-weight: 500; transition: background .15s, opacity .15s; }
.btn:hover { background: var(--sidebar-accent); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { opacity: .9; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted-fg); }
.icon-btn:hover { background: var(--sidebar-accent); color: var(--foreground); }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--input); background: var(--background); font-size: 14px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px oklch(0.66 0.2 292 / 20%); }
.form-msg { min-height: 18px; font-size: 13px; color: var(--accent-fg); }
.form-msg.bad { color: var(--destructive); }

/* Login */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px 16px; }
.login .brand { width: min(384px, 100%); }
.login-card { width: min(384px, 100%); padding: 24px; display: grid; gap: 12px; }
.login-card h1 { font-size: 18px; font-weight: 600; }
.login-card .muted { margin-top: -8px; font-size: 13px; }

/* Shell */
.app { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 224px; flex: none; display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--sidebar); }
.sidebar .brand { padding: 0 8px; margin-bottom: 24px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted-fg); font-size: 14px; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--sidebar-accent); color: var(--foreground); }
.side-nav a.on { background: var(--sidebar-accent); color: var(--foreground); font-weight: 500; }
.side-nav a span:not(.badge-count) { flex: 1; }
.badge-count { border-radius: 99px; background: var(--primary); padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--primary-fg); }
.me { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-size: 12px; font-weight: 600; }
.me-text { flex: 1; min-width: 0; }
.me-text b { display: block; font-size: 14px; font-weight: 500; }
.me-text span { display: block; font-size: 12px; color: var(--muted-fg); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobile-top { display: none; }
.bottom-nav { display: none; }

/* Page header + filters */
.page-head { padding: 12px 24px; border-bottom: 1px solid var(--border); }
.page-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.page-title h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.page-title span { color: var(--muted-fg); }
.page-title .btn { margin-left: auto; align-self: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search svg { position: absolute; left: 12px; top: 12px; color: var(--muted-fg); }
.search .input { padding-left: 36px; }
.filters select.input { flex: 0 1 220px; width: auto; }

/* Board */
.board { flex: 1; display: flex; gap: 12px; overflow-x: auto; padding: 16px 24px; }
.col { width: 288px; flex: none; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid transparent; background: var(--column); transition: background .15s, border-color .15s; }
.col.over { border-color: oklch(0.66 0.2 292 / 60%); background: oklch(0.3 0.06 292 / 40%); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; font-weight: 500; }
.col-count { margin-left: auto; border-radius: 6px; background: var(--secondary); padding: 0 6px; font-size: 12px; color: var(--muted-fg); }
.col-body { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 190px); overflow-y: auto; padding: 0 8px 8px; }
.col-empty { padding: 24px 0; border: 1px dashed var(--border); border-radius: 10px; text-align: center; font-size: 12px; color: var(--muted-fg); }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c, var(--muted-fg)); }

/* Lead card */
.lead-card { display: block; width: 100%; padding: 12px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--raised); transition: border-color .15s; }
.lead-card:hover { border-color: oklch(0.66 0.2 292 / 50%); }
.lead-card.late { border-color: oklch(0.65 0.2 25 / 60%); }
.lead-card.dragging { opacity: .5; }
.lc-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-phone { margin-top: 2px; font-size: 12px; color: var(--muted-fg); }
.lc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 6px; border-radius: 6px; background: var(--secondary); color: var(--secondary-fg); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.outline { background: transparent; border: 1px solid var(--border); color: var(--muted-fg); }
.chip.late { background: oklch(0.65 0.2 25 / 15%); color: var(--destructive); font-weight: 600; }
.chip.late i { width: 6px; height: 6px; border-radius: 50%; background: var(--destructive); animation: pulse 1.6s ease-in-out infinite; }
.chip.src-website { background: oklch(0.66 0.2 292 / 18%); color: var(--accent-fg); }
.chip.src-instagram { background: oklch(0.65 0.2 0 / 16%); color: oklch(0.8 0.12 0); }
.chip.src-telegram { background: oklch(0.62 0.13 235 / 18%); color: oklch(0.8 0.1 235); }
@keyframes pulse { 50% { opacity: .35; } }
.lc-foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted-fg); }
.lc-foot b { font-weight: 500; color: var(--foreground); opacity: .8; }
.lc-follow { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lc-follow svg { width: 12px; height: 12px; }
.lc-follow.overdue { color: var(--destructive); font-weight: 500; }

/* Mobile stage tabs */
.stage-tabs { display: none; gap: 6px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.stage-tab { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted-fg); font-size: 12px; font-weight: 500; }
.stage-tab.on { border-color: var(--primary); background: var(--accent); color: var(--accent-fg); }
.mobile-list { display: none; flex-direction: column; gap: 8px; padding: 16px; }

/* Empty */
.empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 96px 24px; text-align: center; }
.empty .ico { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 16px; background: var(--accent); color: var(--accent-fg); }
.empty .ico svg { width: 24px; height: 24px; }
.empty h2 { font-size: 18px; font-weight: 600; }
.empty p { max-width: 380px; margin-top: 4px; color: var(--muted-fg); }

/* Narrow pages */
.page { width: 100%; max-width: 1150px; margin: 0 auto; padding: 20px 24px 40px; }
.page.narrow { max-width: 760px; }
.page h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.page .sub { color: var(--muted-fg); margin-top: 2px; }
.group-title { margin: 28px 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Table */
.table-wrap { margin-top: 16px; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 500; color: var(--muted-fg); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--sidebar-accent); }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border); font-size: 12px; }

/* Report */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.kpi { padding: 16px; }
.kpi span { font-size: 12px; color: var(--muted-fg); }
.kpi b { display: block; margin-top: 4px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.kpi small { font-size: 12px; color: var(--muted-fg); }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.panel { padding: 16px; }
.panel h2 { margin-bottom: 12px; font-size: 14px; font-weight: 500; }
.bar-row { margin-bottom: 10px; }
.bar-row .lbl { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.bar-row .lbl span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.bar-row .lbl span:last-child { color: var(--muted-fg); white-space: nowrap; }
.bar { height: 8px; overflow: hidden; border-radius: 99px; background: var(--muted); }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--primary)); }
.won-txt { color: var(--stage-won); }

/* Settings */
.settings-card { padding: 20px; margin-top: 16px; }
.settings-card h2 { font-size: 15px; font-weight: 500; }
.settings-card p { margin: 4px 0 14px; color: var(--muted-fg); font-size: 13px; }
.status-line { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.status-line .dot { --c: var(--destructive); }
.status-line.ok .dot { --c: var(--success); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
code { padding: 1px 5px; border-radius: 4px; background: var(--muted); font-family: 'Geist Mono', monospace; font-size: 12px; }

/* Drawer (sheet) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: oklch(0 0 0 / 55%); }
.sheet { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(512px, 100%); overflow-y: auto; background: var(--background); border-left: 1px solid var(--border); box-shadow: -10px 0 40px oklch(0 0 0 / 40%); animation: slide-in .25s ease-out; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.sheet-close { position: absolute; top: 14px; right: 14px; }
.d-head { padding: 20px 48px 20px 20px; border-bottom: 1px solid var(--border); }
.d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--muted-fg); }
.d-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.d-head .mono { margin-top: 4px; font-size: 14px; color: var(--muted-fg); }
.d-body { display: flex; flex-direction: column; gap: 20px; padding: 20px; }
.call-big { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 14px; background: var(--primary); color: var(--primary-fg); font-size: 18px; font-weight: 600; }
.call-big svg { width: 20px; height: 20px; }
.msg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.msg-row a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; font-size: 14px; font-weight: 500; }
.msg-tg { background: oklch(0.62 0.13 235 / 15%); color: var(--telegram); }
.msg-wa { background: oklch(0.64 0.16 152 / 15%); color: var(--whatsapp); }
.lbl-sm { margin-bottom: 8px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-fg); }
.dl { border: 1px solid var(--border); border-radius: 14px; }
.dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 12px; font-size: 14px; }
.dl div + div { border-top: 1px solid var(--border); }
.dl dt { color: var(--muted-fg); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick .btn { min-height: 44px; white-space: normal; }
.stage-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-pills button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted-fg); font-size: 12px; font-weight: 500; }
.stage-pills button:hover { color: var(--foreground); }
.stage-pills button.on { border-color: var(--primary); background: var(--accent); color: var(--accent-fg); }
.lost-note { margin-top: 8px; font-size: 12px; color: var(--stage-lost); }
.timeline { position: relative; margin: 0; padding: 0 0 0 20px; list-style: none; border-left: 1px solid var(--border); }
.timeline li { position: relative; margin-bottom: 16px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); }
.timeline small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-fg); }
.tg-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.tg-line .ok { color: var(--success); }
.tg-line .bad { color: var(--destructive); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent-fg); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* Modals + toast */
.modal { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--popover); color: var(--foreground); box-shadow: 0 20px 60px oklch(0 0 0 / 50%); }
.modal::backdrop { background: oklch(0 0 0 / 60%); }
.modal h2 { margin-bottom: 14px; font-size: 16px; font-weight: 600; }
.modal form { display: grid; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.reason-list { display: grid; gap: 6px; }
.reason-list button { text-align: left; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--popover); box-shadow: 0 10px 30px oklch(0 0 0 / 40%); font-size: 14px; }

/* Mobile */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .main { padding-bottom: 64px; }
  .bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; border-top: 1px solid var(--border); background: color-mix(in oklch, var(--sidebar) 94%, transparent); backdrop-filter: blur(10px); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 11px; color: var(--muted-fg); }
  .bottom-nav a svg { width: 20px; height: 20px; }
  .bottom-nav a.on { color: var(--primary); }
  .bottom-nav .badge-count { position: absolute; top: 4px; right: 22%; padding: 0 4px; font-size: 10px; }
  .page-head { padding: 12px 16px; }
  .page-title { margin-bottom: 10px; }
  .search { max-width: none; flex-basis: 100%; }
  .filters select.input { flex: 1 1 140px; }
  .board { display: none; }
  .stage-tabs { display: flex; }
  .mobile-list { display: flex; }
  .page { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .panels { grid-template-columns: 1fr; }
}
.code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.join-code { padding: 8px 14px; border-radius: 10px; border: 1px dashed oklch(0.66 0.2 292 / 60%); background: var(--accent); color: var(--accent-fg); font-size: 18px; letter-spacing: .06em; }
.subs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.subs li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.subs li + li { border-top: 1px solid var(--border); }
.subs li > div { flex: 1; min-width: 0; }
.subs b { display: block; font-weight: 500; }
.subs span:not(.avatar) { display: block; font-size: 12px; color: var(--muted-fg); }

/* Light mode */
:root[data-theme="light"] {
  --background: oklch(0.985 0.002 286);
  --foreground: oklch(0.21 0.01 286);
  --column: oklch(0.962 0.004 286);
  --card: oklch(1 0 0);
  --popover: oklch(1 0 0);
  --primary: oklch(0.56 0.22 292);
  --secondary: oklch(0.945 0.005 286);
  --secondary-fg: oklch(0.32 0.01 286);
  --muted: oklch(0.935 0.005 286);
  --muted-fg: oklch(0.5 0.012 286);
  --accent: oklch(0.94 0.04 292);
  --accent-fg: oklch(0.45 0.19 292);
  --destructive: oklch(0.58 0.22 25);
  --success: oklch(0.58 0.16 150);
  --border: oklch(0 0 0 / 9%);
  --input: oklch(0 0 0 / 14%);
  --raised: 0 1px 2px oklch(0 0 0 / 6%), 0 1px 1px oklch(0 0 0 / 3%);
  --sidebar: oklch(0.975 0.003 286);
  --sidebar-accent: oklch(0.93 0.006 286);
  --stage-contacted: oklch(0.75 0.15 85);
  color-scheme: light;
}
:root[data-theme="light"] .chip.src-instagram { color: oklch(0.52 0.19 0); }
:root[data-theme="light"] .chip.src-telegram { color: oklch(0.48 0.12 235); }
:root[data-theme="light"] .sheet-backdrop { background: oklch(0 0 0 / 30%); }
:root[data-theme="light"] .modal::backdrop { background: oklch(0 0 0 / 35%); }

/* Sidebar profile row */
.me .icon-btn { width: 30px; height: 30px; }
.me-text b, .me-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 2px; }

/* Assignee avatars */
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar[style*="--h"] { background: oklch(0.42 0.1 var(--h)); color: oklch(0.96 0.03 var(--h)); }
:root[data-theme="light"] .avatar[style*="--h"] { background: oklch(0.9 0.06 var(--h)); color: oklch(0.38 0.12 var(--h)); }
.lc-top { display: flex; align-items: flex-start; gap: 8px; }
.lc-top > div { flex: 1; min-width: 0; }
.lc-top .avatar { margin-top: 1px; }
.who { display: inline-flex; align-items: center; gap: 8px; }

/* Extra chips */
.chip.dup { background: oklch(0.82 0.15 90 / 16%); color: oklch(0.85 0.13 90); font-weight: 500; }
.chip.dup svg { width: 11px; height: 11px; }
.chip.test { background: transparent; border: 1px dashed var(--muted-fg); color: var(--muted-fg); }
.chip.deal { background: oklch(0.72 0.16 150 / 15%); color: var(--success); font-weight: 500; }
:root[data-theme="light"] .chip.dup { color: oklch(0.5 0.12 75); background: oklch(0.82 0.15 90 / 22%); }

/* Filters: toggle + date range */
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--input); background: transparent; font-size: 14px; color: var(--muted-fg); white-space: nowrap; }
.toggle.on { border-color: var(--primary); background: var(--accent); color: var(--accent-fg); font-weight: 500; }
.filters .input[type=date] { flex: 0 1 150px; width: auto; }
.filters .clear { border: 0; color: var(--muted-fg); }

/* Sortable table */
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--foreground); }
th.sort.on { color: var(--foreground); }
th.sort i { font-style: normal; margin-left: 4px; opacity: .8; }
td.num, th.num { text-align: right; }
tr.is-test td { opacity: .6; }

/* Drawer extras */
.dup-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: oklch(0.82 0.15 90 / 12%); color: oklch(0.85 0.13 90); font-size: 13px; }
.dup-box svg { flex: none; }
:root[data-theme="light"] .dup-box { color: oklch(0.45 0.12 75); }
.money-input { position: relative; }
.money-input .input { padding-right: 52px; }
.money-input span { position: absolute; right: 12px; top: 10px; color: var(--muted-fg); font-size: 13px; }
.danger-zone { padding-top: 16px; border-top: 1px solid var(--border); }
.btn.danger { color: var(--destructive); border-color: oklch(0.65 0.2 25 / 40%); }
.btn.danger:hover { background: oklch(0.65 0.2 25 / 12%); }

/* Team */
.team { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.team li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.team li + li { border-top: 1px solid var(--border); }
.team li > div { flex: 1; min-width: 0; }
.team b { display: block; font-weight: 500; }
.team span:not(.avatar):not(.chip) { display: block; font-size: 12px; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; }
.team select.input { width: auto; height: 34px; padding: 0 8px; }
.team .icon-btn:hover.del { color: var(--destructive); }
.team-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team-form .full { grid-column: 1 / -1; }
.pw-field { position: relative; }
.pw-field .input { padding-right: 44px; }
.pw-field .icon-btn { position: absolute; right: 3px; top: 3px; }
.pw-row { display: flex; gap: 8px; }
.pw-row .pw-field { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.modal .muted { font-size: 13px; }
.modal .link-btn { justify-self: start; }

/* New-lead toast */
.toast.new { border-color: var(--primary); }
.toast b { color: var(--accent-fg); }

@media (max-width: 767px) {
  .team-form { grid-template-columns: 1fr; }
  .filters .input[type=date] { flex: 1 1 130px; }
  .team li { flex-wrap: wrap; }
}
.page-title .toggle { margin-left: auto; align-self: center; }
.f-more { display: contents; }
.f-btn { display: none; }
@media (max-width: 767px) {
  .search { flex: 1 1 0; }
  .f-btn { display: inline-flex; }
  .f-btn.on { border-color: var(--primary); color: var(--accent-fg); }
  .f-more { display: none; width: 100%; flex-wrap: wrap; gap: 8px; }
  .filters.open .f-more { display: flex; }
  .f-more .toggle { flex: 1 1 140px; justify-content: center; }
}

/* ---------- SVS additions ---------- */
.chip.src-fb { background: oklch(0.6 0.15 255 / 18%); color: oklch(0.8 0.1 255); }
.chip.src-ig { background: oklch(0.65 0.2 0 / 16%); color: oklch(0.8 0.12 0); }
.chip.src-manual { background: var(--secondary); color: var(--muted-fg); }
:root[data-theme="light"] .chip.src-fb { color: oklch(0.45 0.15 255); }
:root[data-theme="light"] .chip.src-ig { color: oklch(0.52 0.19 0); }
.cur-toggle { display: inline-flex; flex: none; border: 1px solid var(--input); border-radius: 10px; overflow: hidden; }
.cur-toggle button { min-width: 52px; height: 40px; border: 0; background: transparent; color: var(--muted-fg); font-size: 13px; font-weight: 600; }
.cur-toggle button.on { background: var(--accent); color: var(--accent-fg); }
.deal-row { display: flex; gap: 8px; }
.deal-row .money-input { flex: 1; }
.notif-bar { display: flex; align-items: center; gap: 12px; margin: 12px 24px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid oklch(0.66 0.2 292 / 40%); background: var(--accent); color: var(--accent-fg); font-size: 13px; }
.notif-bar svg { width: 18px; height: 18px; }
.notif-bar span { flex: 1; }
.notif-bar .btn { min-height: 34px; padding: 6px 12px; }
.notif-bar .x { border: 0; background: none; color: inherit; opacity: .7; padding: 4px; }
.steps { margin: 0 0 14px; padding-left: 18px; color: var(--muted-fg); font-size: 13px; }
.steps li { margin-bottom: 6px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.copy-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 10px; font-size: 12px; }
.meta-form { display: grid; gap: 8px; margin-bottom: 14px; }
.ok-txt { color: var(--success); }
.bad-txt { color: var(--destructive); }
.forms-list { list-style: none; margin: 8px 0 14px; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.forms-list li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: 13px; }
.forms-list li + li { border-top: 1px solid var(--border); }
@media (max-width: 767px) { .notif-bar { margin: 12px 16px 0; } }

[data-notif].on { color: var(--primary); }
.me { flex-wrap: wrap; }
.me-text { flex: 1 1 calc(100% - 40px); }
.me-actions { display: flex; justify-content: space-between; width: 100%; margin-top: 4px; }
