/* Master CRM — premium command-center design system */
:root {
  color-scheme: light;
  --ink-950: #08111f;
  --ink-900: #0d1829;
  --ink-850: #122037;
  --ink-800: #172742;
  --canvas: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --surface-muted: #eef2f5;
  --text: #142033;
  --text-soft: #526174;
  --text-muted: #748196;
  --border: #dce3ea;
  --border-strong: #c8d2dc;
  --primary: #2968e8;
  --primary-hover: #1f55c5;
  --primary-soft: #eaf1ff;
  --signal: #c8f45b;
  --success: #11845b;
  --success-soft: #e8f7f0;
  --warning: #b56b12;
  --warning-soft: #fff4df;
  --danger: #be3a32;
  --danger-soft: #fff0ef;
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-xs: 0 1px 2px rgba(8, 17, 31, .04);
  --shadow-sm: 0 10px 30px rgba(8, 17, 31, .06);
  --shadow-lg: 0 24px 70px rgba(8, 17, 31, .14);
  --focus: rgba(41, 104, 232, .2);
  --sidebar-width: 272px;
  --font-sans: Aptos, "Segoe UI Variable", "Segoe UI", Inter, sans-serif;
  --font-display: "Iowan Old Style", Baskerville, Georgia, serif;
  /* Compatibility aliases used by route-specific stylesheets. */
  --background: var(--canvas);
  --foreground: var(--text);
  --card: var(--surface);
  --muted: var(--surface-muted);
  --muted-foreground: var(--text-muted);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
body.crm-body { background: var(--canvas); color: var(--text); font-family: var(--font-sans); font-size: 14px; letter-spacing: -.006em; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); }
::selection { background: var(--primary); color: #fff; }

/* Application shell */
.app-shell { display: flex; min-height: 100vh; }
.workspace-main { flex: 1; min-width: 0; }
.sidebar {
  background:
    radial-gradient(circle at 18% -4%, rgba(67, 111, 189, .22), transparent 31%),
    var(--ink-950);
  border-right: 1px solid rgba(255,255,255,.075);
  color: #d5deea;
  display: flex;
  flex: 0 0 var(--sidebar-width);
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 16px 18px;
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  z-index: 30;
}
.wordmark {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 16px;
  font-weight: 650;
  gap: 5px;
  letter-spacing: -.045em;
  min-height: 48px;
  padding: 0 12px;
  text-decoration: none;
}
.wordmark::before {
  background: var(--signal);
  border-radius: 2px;
  box-shadow: 0 0 24px rgba(200,244,91,.22);
  content: "";
  height: 25px;
  margin-right: 8px;
  transform: skew(-10deg);
  width: 7px;
}
.wordmark span { color: #fff; font-weight: 760; }
.wordmark strong { color: var(--signal); font-weight: 460; }
.sidebar nav { display: grid; gap: 3px; margin-top: 30px; }
.nav-item {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #9eacc0;
  display: flex;
  font-size: 13px;
  font-weight: 540;
  gap: 11px;
  min-height: 44px;
  padding: 8px 11px;
  position: relative;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; transform: translateX(2px); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(77,126,211,.2), rgba(77,126,211,.08));
  border-color: rgba(142,178,235,.16);
  color: #fff;
  font-weight: 680;
}
.nav-item.is-active::after { background: var(--signal); border-radius: 99px; content: ""; height: 16px; position: absolute; right: 8px; width: 3px; }
.nav-icon { color: #7f90a9; display: inline-block; height: 16px; position: relative; width: 16px; }
.is-active .nav-icon, .nav-item:hover .nav-icon { color: var(--signal); }
.nav-icon::before, .nav-icon::after { box-sizing: border-box; content: ""; position: absolute; }
.nav-icon--dashboard::before { border: 1.5px solid currentColor; border-radius: 3px; inset: 1px; }
.nav-icon--dashboard::after { background: currentColor; height: 1.5px; left: 4px; top: 7px; width: 8px; }
.nav-icon--pipeline::before, .nav-icon--orders::before { border: 1.5px solid currentColor; border-radius: 3px; inset: 1px; }
.nav-icon--pipeline::after { background: currentColor; box-shadow: 4px 0 currentColor, 8px 0 currentColor; height: 6px; left: 3px; top: 5px; width: 2px; }
.nav-icon--orders::after { border-bottom: 1.5px solid currentColor; border-top: 1.5px solid currentColor; height: 5px; left: 4px; top: 5px; width: 8px; }
.nav-icon--plus::before { background: currentColor; height: 1.5px; left: 2px; top: 7px; width: 12px; }
.nav-icon--plus::after { background: currentColor; height: 12px; left: 7px; top: 2px; width: 1.5px; }
.nav-icon--leads::before, .nav-icon--customers::before { border: 1.5px solid currentColor; border-radius: 50%; height: 7px; left: 5px; top: 1px; width: 7px; }
.nav-icon--leads::after, .nav-icon--customers::after { border: 1.5px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; bottom: 1px; height: 6px; left: 2px; width: 13px; }
.nav-icon--customers::before { box-shadow: -4px 3px 0 -2px var(--ink-950); left: 2px; }
.nav-icon--products::before { border: 1.5px solid currentColor; border-radius: 3px; height: 13px; left: 1px; top: 1px; width: 14px; }
.nav-icon--products::after { background: currentColor; box-shadow: 0 4px currentColor; height: 1.5px; left: 5px; top: 5px; width: 6px; }
.nav-icon--followup::before { border: 1.5px solid currentColor; border-radius: 50%; inset: 1px; }
.nav-icon--followup::after { border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; height: 5px; left: 7px; top: 4px; transform: skew(-10deg); width: 4px; }
.nav-icon--finance::before, .nav-icon--receivables::before { border: 1.5px solid currentColor; border-radius: 3px; inset: 2px 1px; }
.nav-icon--finance::after { background: currentColor; box-shadow: 4px 0 currentColor, 8px 0 currentColor; height: 2px; left: 3px; top: 7px; width: 2px; }
.nav-icon--receivables::after { border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; height: 5px; left: 6px; top: 4px; transform: rotate(45deg); width: 5px; }
.nav-icon--settings::before { border: 1.5px solid currentColor; border-radius: 50%; inset: 2px; }
.nav-icon--settings::after { background: currentColor; border-radius: 50%; height: 4px; left: 6px; top: 6px; width: 4px; }
.nav-icon--access::before { border: 1.5px solid currentColor; border-radius: 50%; height: 6px; left: 5px; top: 1px; width: 6px; }
.nav-icon--access::after { border: 1.5px solid currentColor; border-radius: 6px 6px 2px 2px; bottom: 1px; height: 7px; left: 2px; width: 12px; }
.nav-label, .nav-group summary {
  color: #60718b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-group { margin-top: 17px; }
.nav-group summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; padding: 0 11px 8px; user-select: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; font-size: 13px; font-weight: 400; }
.nav-group[open] summary::after { content: "−"; }
.nav-group__items { display: grid; gap: 3px; }
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.09);
  color: #7788a0;
  font-size: 11px;
  letter-spacing: .025em;
  margin-top: auto;
  padding: 18px 12px 4px;
}
.presence { background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(200,244,91,.08); display: inline-block; height: 6px; margin-right: 9px; width: 6px; }

/* Top bar and page containers */
.workspace-topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(243,245,247,.88);
  border-bottom: 1px solid rgba(200,210,220,.78);
  display: flex;
  justify-content: space-between;
  min-height: 84px;
  padding: 17px clamp(22px, 3vw, 42px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.workspace-topbar > div { min-width: 0; }
.workspace-topbar h1 { font-size: 21px; font-weight: 680; letter-spacing: -.042em; line-height: 1.1; margin: 5px 0 0; }
.breadcrumb { color: var(--text-muted); font-size: 10px; font-weight: 720; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.breadcrumb span { color: #aab4bf; margin: 0 7px; }
.dashboard-v2, .form-page, .pipeline-page--system, .list-page, .workflow-page {
  margin: 0 auto;
  max-width: 1560px;
  padding: 32px clamp(22px, 3vw, 42px) 56px;
}
.topbar-actions { align-items: center; display: flex; gap: 12px; }
.user-label, .date-label { color: var(--text-muted); font-size: 12px; }
.eyebrow, .section-kicker {
  color: var(--primary);
  font-size: 9px;
  font-style: normal;
  font-weight: 820;
  letter-spacing: .15em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.muted { color: var(--text-muted); line-height: 1.55; }

/* Actions */
button, .button-link, .quiet-button, .quick-action {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  font-weight: 680;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
button, .button-link { background: var(--primary); color: #fff; }
button:hover, .button-link:hover { background: var(--primary-hover); box-shadow: 0 8px 22px rgba(41,104,232,.18); transform: translateY(-1px); }
.button-link span { margin-left: 13px; }
.quiet-button, .button-secondary { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--shadow-xs); color: var(--text); }
.quiet-button:hover, .button-secondary:hover { background: var(--surface-soft); border-color: #aebbc8; box-shadow: var(--shadow-xs); }
.quiet-link { color: var(--text-soft); font-size: 12px; font-weight: 680; text-decoration: none; }
.quiet-link:hover { color: var(--primary); }
button:focus-visible, a:focus-visible, summary:focus-visible { box-shadow: 0 0 0 4px var(--focus); outline: 2px solid var(--primary); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

/* Forms */
label { color: #344357; display: block; font-size: 12px; font-weight: 680; margin: 0 0 7px; }
label em { color: var(--danger); font-style: normal; }
label > input, label > select, label > textarea { margin-top: 7px; }
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-height: 44px;
  padding: 9px 11px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  width: 100%;
}
textarea { line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa6b4; }
input:hover, select:hover, textarea:hover { border-color: #aebbc8; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus); outline: 0; }
.field { min-width: 0; }
.field > label { margin-bottom: 7px; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid__full, .field-wide { grid-column: 1 / -1; }
.lead-form, .form-card, .profile-panel, .workflow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.lead-form { max-width: 960px; padding: 28px; }
.form-card { max-width: 960px; padding: 28px; }
.form-card__head, .form-page-heading { border-bottom: 1px solid var(--border); margin-bottom: 24px; padding-bottom: 18px; }
.form-card__head h2, .form-page-heading h2 { font-size: 18px; margin: 4px 0 0; }
.form-section + .form-section { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 26px; }
.form-section__heading { align-items: center; display: flex; gap: 12px; margin-bottom: 20px; }
.form-section__heading h3 { font-size: 15px; margin: 0; }
.section-number { align-items: center; background: var(--ink-900); border-radius: 50%; color: var(--signal); display: flex; font-size: 10px; font-weight: 800; height: 29px; justify-content: center; width: 29px; }
.form-actions { align-items: center; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; padding-top: 20px; }
.form-actions button { margin: 0; }
.alert, .form-error { background: var(--danger-soft); border: 1px solid #f2c8c4; border-radius: var(--radius-sm); color: #982b25; font-size: 12px; font-weight: 650; margin: 0 0 18px; padding: 12px 14px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 20px 0; padding: 18px; }

/* Data surfaces */
.dashboard-heading { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 21px; }
.dashboard-heading h2 { font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -.045em; margin: 0; }
.dashboard-heading p { color: var(--text-muted); font-size: 11px; margin: 0 0 4px; }
.metric-grid { display: grid; gap: 13px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 22px; }
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  min-height: 132px;
  overflow: hidden;
  padding: 20px;
  position: relative;
}
.metric-card::before { background: var(--primary); content: ""; height: 3px; left: 20px; position: absolute; top: 0; width: 28px; }
.metric-card:first-child { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.metric-card:first-child::before { background: var(--signal); }
.metric-card p { color: var(--text-muted); font-size: 11px; font-weight: 680; margin-bottom: 25px; }
.metric-card:first-child p { color: #95a6bd; }
.metric-card strong { color: var(--text); display: block; font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.055em; line-height: 1; }
.metric-card:first-child strong { color: #fff; }
.metric-card span { color: var(--text-muted); display: block; font-size: 11px; margin-top: 8px; }
.dashboard-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, .88fr) minmax(440px, 1.12fr); }
.dashboard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  min-height: 350px;
  overflow: hidden;
  padding: 22px;
}
.panel-title, .panel-head { align-items: flex-start; display: flex; justify-content: space-between; }
.panel-title { border-bottom: 1px solid var(--border); padding-bottom: 17px; }
.panel-title h2, .panel-head h2 { font-size: 15px; margin: 0; }
.panel-title p, .panel-head span { color: var(--text-muted); font-size: 11px; margin: 5px 0 0; }
.panel-title a, .panel-head a { color: var(--primary); font-size: 11px; font-weight: 750; text-decoration: none; }
.stage-list { display: grid; gap: 3px; margin-top: 13px; }
.stage-row { align-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); display: flex; justify-content: space-between; padding: 11px 10px; }
.stage-row:hover { background: var(--surface-soft); border-color: var(--border); }
.stage-row span { color: #344357; font-size: 12px; }
.stage-row b { align-items: center; background: var(--surface-muted); border-radius: 99px; display: inline-flex; font-size: 10px; height: 24px; justify-content: center; min-width: 24px; padding: 0 7px; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--border); padding: 14px 18px; text-align: left; }
th { background: var(--surface-soft); color: var(--text-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
td { color: #344357; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
.table-scroll { overflow-x: auto; }
.dashboard-panel .table-scroll { margin: 0 -22px; }
.dashboard-panel table { min-width: 590px; }
.empty, .empty-state, .data-empty { color: var(--text-muted); font-size: 12px; }

/* Board */
.board-intro {
  align-items: center;
  background: var(--ink-900);
  border: 1px solid var(--ink-800);
  border-radius: var(--radius-lg);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
  min-height: 128px;
  overflow: hidden;
  padding: 26px 30px;
  position: relative;
}
.board-intro::after { border: 1px solid rgba(200,244,91,.16); border-radius: 50%; content: ""; height: 220px; position: absolute; right: -80px; top: -110px; width: 220px; }
.board-intro > * { position: relative; z-index: 1; }
.board-intro h2 { color: #fff; font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -.04em; margin: 3px 0 6px; }
.board-intro .eyebrow { color: var(--signal); }
.board-intro span { color: #9cacc2; font-size: 12px; }
.board-intro__status { align-items: center; color: #bbc7d6; display: flex; font-size: 10px; font-weight: 750; gap: 8px; letter-spacing: .06em; text-transform: uppercase; }
.board-intro__status i { background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 5px rgba(200,244,91,.08); height: 6px; width: 6px; }
.kanban { display: grid; gap: 13px; grid-auto-columns: minmax(270px, 1fr); grid-auto-flow: column; overflow-x: auto; padding: 2px 2px 18px; }
.kanban-column { background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius); min-height: 450px; padding: 11px; }
.kanban-column > header { align-items: center; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: 5px 4px 12px; }
.kanban-column h2 { font-size: 11px; letter-spacing: .02em; margin: 0; }
.kanban-column > header span { align-items: center; background: #dfe6ed; border-radius: 99px; color: var(--text-soft); display: inline-flex; font-size: 10px; font-weight: 780; height: 22px; justify-content: center; min-width: 22px; padding: 0 7px; }
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); margin: 9px 0 0; padding: 14px; }
.lead-card h3 { font-size: 13px; margin: 6px 0; }
.lead-card small, .lead-card p { color: var(--text-muted); font-size: 11px; }
.lead-card__source { color: var(--primary) !important; font-size: 9px !important; font-weight: 800; letter-spacing: .09em; margin-bottom: 0; text-transform: uppercase; }
.lead-card__summary { border-top: 1px solid var(--border); margin: 11px 0 0; padding-top: 10px; }
.lead-card form button { margin-top: 10px; width: 100%; }
.kanban-feedback { color: var(--text-muted); font-size: 11px; margin: 0 0 12px; min-height: 15px; }

/* Generic layouts and cards */
.profile-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-panel { padding: 22px; }
a.profile-panel { color: var(--text); min-height: 110px; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.profile-panel:hover { border-color: #aebbc8; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.workflow-page { max-width: 1220px; }
.workflow-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(300px, .68fr); }
.workflow-card { padding: 24px; }
.workflow-card__head { border-bottom: 1px solid var(--border); margin-bottom: 20px; padding-bottom: 17px; }
.workflow-card__head h2 { font-size: 16px; margin: 4px 0 0; }
.workflow-total { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.workflow-total h2, .workflow-total strong { color: #fff; }
.workflow-total p { color: #9bacc3; }
.workflow-total__value { color: var(--signal) !important; font-family: var(--font-display); font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.workflow-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.workflow-actions form { margin: 0; }
.workflow-spaced { margin-top: 18px; }
.tag { background: var(--surface-muted); border: 1px solid var(--border-strong); color: #344357; font-size: 11px; margin: 0; min-height: 28px; padding: 0 8px; }

/* Leads: compact operational filtering and accessible hero contrast. */
body .list-hero { min-height: 136px; padding: 25px 30px; }
body .list-hero h2 { color: #fff; font-size: 25px; }
body .list-hero > div > p:last-child { color: #d6e3f2; }
body .list-hero .eyebrow { color: #a8d5ff; }
body .list-hero__stat { border-left-color: rgba(191,219,254,.4); min-width: 150px; }
body .list-hero__stat strong { color: #fff; }
body .list-hero__stat span { color: #d6e8ff; font-weight: 700; }
body .lead-filters { padding: 18px 20px; }
body .lead-filter-bar { align-items: end; display: grid; gap: 14px 16px; grid-template-columns: repeat(3,minmax(0,1fr)); }
body .lead-filter-bar label { color: #26384e; font-size: 11px; letter-spacing: .02em; }
body .lead-filter-bar label > input,body .lead-filter-bar label > select { margin-top: 5px; min-height: 40px; }
body .lead-filter-bar__actions { align-items: center; display: flex; gap: 14px; min-height: 40px; }
body .lead-filter-bar__actions button { min-height: 40px; }
@media(max-width:900px){body .lead-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){body .lead-filter-bar{grid-template-columns:1fr;}body .lead-filter-bar__actions{align-items:stretch;flex-direction:column;}}

/* Dashboard channel intelligence and high-use Kanban workspace. */
.source-performance-panel { margin-top: 18px; min-height: 0; }
.source-performance-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 18px; }
.source-performance-card { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.source-performance-card > p { color: var(--text-soft); font-size: 11px; font-weight: 750; margin: 0 0 14px; }
.source-performance-card > strong { color: var(--text); font-size: 25px; letter-spacing: -.05em; }
.source-performance-card > strong small { color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.source-performance-card dl { border-top: 1px solid var(--border); display: grid; gap: 7px; margin: 15px 0 0; padding-top: 12px; }
.source-performance-card dl div { display: flex; justify-content: space-between; }
.source-performance-card dt,.source-performance-card dd { font-size: 11px; margin: 0; }
.source-performance-card dt { color: var(--text-muted); }.source-performance-card dd { color: var(--text); font-weight: 720; }
.board-intro--kanban { min-height: 152px; }.board-intro--kanban h2 { max-width: 640px; }
.lead-card--interactive { cursor: grab; padding: 15px; }.lead-card__top { align-items: flex-start; display: flex; gap: 8px; justify-content: space-between; }
.lead-card__details { background: var(--surface-muted); border: 0; border-radius: 6px; color: var(--text-soft); font-size: 14px; letter-spacing: 1px; min-height: 28px; padding: 0 7px; }
.lead-card__phone { color: var(--text-soft) !important; font-size: 11px !important; margin: 0 0 9px; }
.lead-card__actions { align-items: center; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: space-between; margin-top: 12px; padding-top: 11px; }
.lead-card__actions a,.lead-card__note { background: transparent; border: 0; color: var(--primary); font-size: 10px; font-weight: 800; min-height: 28px; padding: 0; text-decoration: none; }
.lead-card__whatsapp { color: #087f5b !important; }.lead-card__open { color: var(--text-soft) !important; }
.lead-workspace-modal { background: transparent; border: 0; max-width: 760px; padding: 0; width: calc(100% - 32px); }.lead-workspace-modal::backdrop { background: rgba(8,17,31,.6); backdrop-filter: blur(4px); }
.lead-workspace-modal__frame { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px; }.lead-workspace-modal__frame > header { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 22px; }.lead-workspace-modal h2 { font-size: 25px; margin: 4px 0 0; }.lead-workspace-modal h3 { font-size: 13px; margin: 0 0 8px; }.lead-workspace-modal section > p { color: var(--text-soft); font-size: 13px; line-height: 1.55; margin: 0; white-space: pre-wrap; }
.lead-workspace-modal__facts { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; padding: 15px; }.lead-workspace-modal__facts span,.lead-workspace-modal__facts strong { display: block; }.lead-workspace-modal__facts span { color: var(--text-muted); font-size: 10px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }.lead-workspace-modal__facts strong { color: var(--text); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }.lead-workspace-modal__note { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 20px; }.lead-workspace-modal__note > div { align-items: center; display: flex; gap: 14px; margin-top: 12px; }.lead-workspace-modal__note .button-link { min-height: 40px; }
@media(max-width:600px){.source-performance-grid{grid-template-columns:1fr;}.lead-workspace-modal__frame{padding:20px;}.lead-workspace-modal__facts{grid-template-columns:1fr;}.lead-workspace-modal__frame>header{gap:12px;}.lead-workspace-modal h2{font-size:21px;}}

/* Login */
.login-v2 { background: var(--ink-950); font-family: var(--font-sans); min-height: 100vh; }
.login-frame { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr); min-height: 100vh; }
.login-brand {
  background:
    linear-gradient(135deg, rgba(42,89,163,.13), transparent 44%),
    repeating-linear-gradient(90deg, transparent 0, transparent 95px, rgba(255,255,255,.025) 96px),
    var(--ink-950);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 38px clamp(34px, 7vw, 110px) 42px;
  position: relative;
}
.login-brand::after { border: 1px solid rgba(200,244,91,.13); border-radius: 50%; bottom: -24vw; content: ""; height: 48vw; min-height: 500px; min-width: 500px; position: absolute; right: -21vw; width: 48vw; }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .wordmark { padding: 0; width: max-content; }
.login-brand__content { max-width: 640px; }
.login-brand .eyebrow { color: var(--signal); }
.login-brand h1 { color: #fff; font-family: var(--font-display); font-size: clamp(52px, 6vw, 88px); font-weight: 400; letter-spacing: -.075em; line-height: .92; margin: 14px 0 26px; }
.login-brand__content > p:last-child { color: #91a1b8; font-size: 14px; }
.login-brand__footer { color: #75869f; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.login-form-panel { align-items: center; background: #f6f7f8; display: flex; justify-content: center; padding: 48px; }
.login-form-wrap { max-width: 400px; width: 100%; }
.login-form-head { border-bottom: 1px solid var(--border); margin-bottom: 26px; padding-bottom: 22px; }
.login-form-head h2 { font-family: var(--font-display); font-size: 37px; font-weight: 500; letter-spacing: -.055em; margin: 5px 0 10px; }
.login-form-head > p:last-child { color: var(--text-muted); font-size: 12px; margin: 0; }
.login-form-wrap .field + .field { margin-top: 18px; }
.login-form-wrap button { justify-content: space-between; margin-top: 24px; width: 100%; }

/* Accessibility and responsive behavior */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (max-width: 1220px) {
  :root { --sidebar-width: 244px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-grid { grid-template-columns: 1fr; }
  .login-frame { grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr); }
  .login-brand { padding-left: 34px; padding-right: 34px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar {
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.09);
    display: flex;
    flex-direction: row;
    gap: 6px;
    height: auto;
    min-height: 58px;
    overflow: hidden;
    padding: 7px 10px;
    position: sticky;
    width: 100%;
  }
  .sidebar .wordmark { flex: 0 0 auto; font-size: 12px; min-height: 40px; padding: 0 6px; }
  .sidebar .wordmark::before { height: 18px; margin-right: 5px; width: 5px; }
  .sidebar nav { align-items: center; display: flex; flex: 1; gap: 3px; margin: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar .nav-item { flex: 0 0 auto; font-size: 11px; min-height: 44px; padding: 7px 10px; }
  .sidebar .nav-item::after, .sidebar .nav-icon, .sidebar-footer, .nav-group summary { display: none; }
  .nav-group { display: contents; }
  .nav-group__items { display: flex !important; gap: 3px; }
  .workspace-topbar { min-height: 72px; padding: 13px 20px; position: static; }
  .workspace-topbar h1 { font-size: 18px; }
  .dashboard-v2, .form-page, .pipeline-page--system, .list-page, .workflow-page { padding: 22px 20px 40px; }
  .board-intro { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px; }
  .board-intro h2 { font-size: 25px; }
  .form-grid, .profile-grid { grid-template-columns: 1fr; }
  .form-grid__full, .field-wide { grid-column: auto; }
  .lead-form, .form-card { padding: 21px; }
  .login-frame { grid-template-columns: 1fr; }
  .login-brand { min-height: 390px; padding: 28px; }
  .login-brand h1 { font-size: 52px; }
  .login-form-panel { padding: 44px 24px; }
}
@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 105px; }
  .metric-card p { margin-bottom: 17px; }
  .topbar-actions .user-label { display: none; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .workspace-topbar > a.quiet-link { max-width: 110px; text-align: right; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
  .login-brand { min-height: 330px; }
  .login-brand h1 { font-size: 43px; }
}
