:root {
  --ink: #292a27;
  --ink-soft: #454741;
  --muted: #696c64;
  --quiet: #85887f;
  --line: #e4e5df;
  --line-strong: #d7d9d1;
  --canvas: #f6f6f3;
  --paper: #fff;
  --soft: #f0f1ec;
  --gold: #987824;
  --gold-dark: #745d20;
  --gold-soft: #f7f2e5;
  --red: #a13f34;
  --red-soft: #fbefed;
  --green: #456e52;
  --green-soft: #edf4ef;
  --blue: #4f6982;
  --blue-soft: #edf2f6;
  --shadow: 0 14px 36px rgb(30 31 27 / 8%);
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); font-size: 15px; line-height: 1.48; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
:focus-visible { outline: 3px solid rgb(152 120 36 / 38%); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 218px; flex: 0 0 218px; background: #fbfbf9; border-right: 1px solid var(--line); padding: 22px 13px 14px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 24px; color: var(--ink); }
.brand-rule { width: 3px; height: 34px; background: var(--gold); flex: 0 0 3px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -.015em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.nav-caption, .eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .105em; line-height: 1.35; }
.nav-caption { padding: 0 12px 8px; }
.primary-nav { display: grid; gap: 3px; }
.nav-link { min-height: 42px; padding: 9px 12px; display: flex; align-items: center; gap: 12px; border-radius: 6px; color: #55574f; font-size: 14px; font-weight: 550; transition: background-color .12s ease, color .12s ease; }
.nav-link:hover { background: #f0f0ec; color: var(--ink); }
.nav-link.active { background: #efeee9; color: var(--ink); font-weight: 650; box-shadow: inset 2px 0 var(--gold); }
.nav-symbol { color: #73766d; width: 17px; text-align: center; font-size: 17px; line-height: 1; }
.nav-link.active .nav-symbol { color: var(--gold-dark); }
.sidebar-spacer { flex: 1; min-height: 30px; }
.privacy-note { font-size: 11px; line-height: 1.4; color: var(--quiet); margin: 0; padding: 12px 9px; }
.user-area { border-top: 1px solid var(--line); padding: 13px 4px 1px; display: flex; align-items: center; gap: 9px; }
.avatar { background: #e9e8e1; color: var(--ink-soft); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; }
.user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-copy strong { font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 650; }
.user-copy small { color: var(--quiet); font-size: 11px; margin-top: 1px; }
.icon-button { border: 0; background: transparent; border-radius: 5px; color: var(--muted); width: 30px; height: 30px; font-size: 17px; }
.icon-button:hover { background: var(--soft); color: var(--ink); }

.workspace { min-width: 0; flex: 1; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(22px, 3.4vw, 50px); background: rgb(255 255 255 / 92%); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.global-search { display: flex; align-items: center; gap: 10px; min-width: 0; width: min(560px, 60vw); color: #73766d; }
.global-search > span { font-size: 22px; line-height: 1; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; padding: 8px 0; }
.global-search input::placeholder { color: #777970; opacity: 1; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; color: #73766d; font-size: 11px; background: #fafaf8; box-shadow: 0 1px 0 #e9e9e5; }
.page-wrap { width: min(100%, 1580px); margin: 0 auto; padding: 29px clamp(22px, 3.4vw, 50px) 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.compact-heading { margin-bottom: 20px; }
.eyebrow { margin: 0 0 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(25px, 2vw, 30px); line-height: 1.16; letter-spacing: -.04em; font-weight: 650; color: var(--ink); }
h2 { margin: 0; font-size: 18px; line-height: 1.28; letter-spacing: -.02em; font-weight: 650; }
h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 650; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.muted, .small-note { color: var(--muted); }
.small-note { font-size: 13px; line-height: 1.45; margin: 4px 0 0; }
.microcopy { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.text-link { color: var(--gold-dark); font-size: 13px; font-weight: 650; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 5px; padding: 9px 15px; font-size: 14px; font-weight: 650; line-height: 1.2; text-align: center; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.button-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.button-primary:hover { background: #41433d; border-color: #41433d; }
.button-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.button-secondary:hover { background: #f8f8f5; border-color: #bcbeb5; }
.button-tertiary { color: var(--muted); background: transparent; border-color: transparent; }
.button-tertiary:hover { background: #efefeb; color: var(--ink); }
.button-small { min-height: 33px; padding: 7px 11px; font-size: 13px; }
.button-large { min-height: 46px; padding: 12px 20px; }
.button-wide { width: 100%; }
.messages { display: grid; gap: 8px; margin-bottom: 17px; }
.notice { border-radius: 5px; padding: 11px 14px; border: 1px solid var(--line); font-size: 14px; background: #fff; }
.notice-success { border-color: #cbdacd; background: var(--green-soft); color: #31533b; }
.notice-error { border-color: #e6c3be; background: var(--red-soft); color: #7c3028; }
.notice-info { background: var(--blue-soft); color: #38546e; }

.signal-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); background: rgb(255 255 255 / 52%); margin-bottom: 28px; }
.signal { padding: 15px 19px; display: flex; align-items: baseline; gap: 10px; border-right: 1px solid var(--line); min-height: 62px; }
.signal:last-child { border-right: 0; }
.signal:hover { background: #fff; }
.signal-value { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.signal-label { color: var(--muted); font-size: 13px; }
.signal-alert .signal-value { color: var(--red); }
.day-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.work-column, .upcoming-column { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; }
.section-heading .eyebrow { margin-bottom: 3px; }
.section-count { min-width: 29px; min-height: 27px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 4px; background: var(--soft); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.work-group { margin: 0 0 25px; }
.group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 1px; }
.count-text { color: var(--muted); font-size: 13px; font-weight: 650; }
.work-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 13px 2px 13px 0; border-bottom: 1px solid #eaebe6; }
.priority-mark { width: 7px; height: 7px; margin: 7px 0 0 1px; border-radius: 50%; background: #92958d; }
.priority-high, .priority-urgent { background: var(--red); }
.priority-low { background: #a6a9a1; }
.work-title { font-size: 15px; line-height: 1.35; font-weight: 650; color: var(--ink); }
.work-title:hover, .work-client:hover { text-decoration: underline; text-underline-offset: 3px; }
.work-client { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.work-client span { color: var(--muted); font-weight: 400; }
.work-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.work-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.inline-action { margin-top: 8px; }
.inline-action summary, .task-complete-disclosure summary { color: var(--gold-dark); font-size: 13px; font-weight: 650; width: fit-content; list-style-position: inside; }
.inline-action[open] summary, .task-complete-disclosure[open] summary { margin-bottom: 8px; }
.action-workspace { border-left: 2px solid #d7c89e; margin: 7px 0 1px 1px; padding: 5px 0 4px 13px; }
.action-hint { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.completion-form { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.completion-form select, .completion-form input { min-height: 34px; max-width: 210px; }
.quiet-row, .empty-note { color: var(--muted); font-size: 14px; padding: 13px 0; margin: 0; }
.new-lead-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #eaebe6; padding: 12px 2px 12px 0; }
.new-lead-row:hover .new-lead-main strong { text-decoration: underline; text-underline-offset: 3px; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 8px; }
.new-lead-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.new-lead-main strong { font-size: 14px; font-weight: 650; }
.new-lead-main small { color: var(--muted); font-size: 13px; }
.row-arrow { color: var(--quiet); }
.upcoming-column { padding-left: 23px; border-left: 1px solid var(--line); }
.upcoming-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.upcoming-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.date-block { width: 42px; min-width: 42px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.date-block b { font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.date-block small { text-transform: uppercase; font-size: 10px; color: var(--muted); }
.upcoming-item > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upcoming-item strong { font-size: 14px; line-height: 1.3; }
.upcoming-item small { color: var(--muted); font-size: 13px; }
.upcoming-column .button { margin-top: 17px; }

.form-surface, .table-surface { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.form-surface { padding: clamp(20px, 3vw, 34px); max-width: 940px; }
.quick-add-surface { margin-top: 4px; }
.narrow-form { max-width: 650px; }
.form-grid { display: grid; gap: 17px 22px; }
.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.compact-grid { margin-top: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.required-mark { color: var(--gold-dark); margin-left: 3px; }
.field input, .field select, .field textarea, input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea {
  min-height: 42px; width: 100%; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--ink); padding: 9px 11px; font-size: 14px; line-height: 1.35;
}
.field textarea, textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .completion-form input::placeholder { color: #777970; opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus { border-color: #a38a4a; outline: 3px solid rgb(152 120 36 / 14%); }
.field-help, .privacy-inline { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field-error { color: var(--red); font-size: 12px; }
.read-only-field { min-height: 42px; display: flex; align-items: center; border: 1px solid var(--line); background: #f8f8f5; color: var(--ink-soft); padding: 9px 11px; border-radius: 4px; font-size: 14px; }
.privacy-inline { padding: 11px 13px; margin: 19px 0 0; border-left: 2px solid #d8c99f; background: #fbfaf6; }
.progressive-section { margin-top: 21px; border-top: 1px solid var(--line); padding-top: 14px; }
.progressive-section summary { display: flex; justify-content: space-between; align-items: center; list-style: none; font-size: 14px; font-weight: 650; color: var(--ink-soft); }
.progressive-section summary::-webkit-details-marker { display: none; }
.progressive-section summary::after { content: "＋"; color: var(--gold-dark); margin-left: 9px; }
.progressive-section[open] summary::after { content: "−"; }
.progressive-section summary span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 21px; }
.stack-form { display: grid; gap: 15px; }

.list-search { display: flex; align-items: center; gap: 9px; max-width: 670px; margin-bottom: 16px; }
.list-search input { flex: 1; min-width: 0; }
.table-surface { overflow: hidden; }
.table-topline { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.table-topline strong { color: var(--ink); font-size: 14px; font-weight: 650; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { border-collapse: collapse; width: 100%; min-width: 780px; text-align: left; }
th { color: var(--muted); background: #fafaf8; font-size: 11px; text-transform: uppercase; letter-spacing: .065em; font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #ecece8; color: var(--ink-soft); font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfa; }
.table-primary-link { color: var(--ink); font-size: 14px; font-weight: 650; display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.table-primary-link small { color: var(--muted); font-size: 12px; font-weight: 400; }
.stage-text { display: inline-block; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.stage-new { color: var(--gold-dark); font-weight: 650; }
.stage-engaged { color: var(--green); font-weight: 650; }
.stage-lost, .stage-not_suitable, .stage-referred_out { color: var(--muted); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 14px; font-size: 13px; color: var(--muted); }
.pagination a { color: var(--gold-dark); font-weight: 650; }
.pagination .disabled { color: #a6a89f; }
.empty-state { padding: 50px 22px; text-align: center; }
.empty-state h1, .empty-state h2 { margin: 9px 0 7px; font-size: 20px; }
.empty-state p { color: var(--muted); margin: 0 auto 18px; max-width: 480px; }
.empty-symbol { width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto; color: var(--gold-dark); border-radius: 50%; background: var(--gold-soft); font-size: 18px; }

.breadcrumb { display: flex; gap: 9px; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.lead-hero { display: flex; justify-content: space-between; gap: 28px; padding: 0 0 19px; border-bottom: 1px solid var(--line); }
.lead-identity { min-width: 0; }
.lead-identity h1 { font-size: clamp(25px, 2.1vw, 31px); }
.lead-practice { margin: 6px 0 9px; color: var(--ink-soft); font-size: 15px; font-weight: 550; }
.separator, .state-divider { color: #a0a197; padding: 0 4px; }
.lead-state-line { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; }
.state-label { color: var(--muted); }
.qualification-value { font-weight: 650; color: var(--ink); }
.conflict-status { color: var(--green); font-weight: 650; }
.lead-contact { flex: 0 0 auto; min-width: 195px; padding-left: 20px; border-left: 1px solid var(--line); display: grid; align-content: center; gap: 7px; }
.contact-line { display: flex; justify-content: space-between; gap: 13px; font-size: 12px; }
.contact-line span { color: var(--muted); }
.contact-line strong { font-size: 13px; font-weight: 600; text-align: right; }
.next-action-band { display: grid; grid-template-columns: 135px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.next-action-label { display: flex; align-items: center; gap: 9px; }
.next-action-label .eyebrow { margin: 0; color: var(--gold-dark); }
.next-icon { color: var(--gold-dark); font-size: 18px; }
.next-action-copy h2 { font-size: 16px; }
.next-action-copy p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.responsibility-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.responsibility-strip > div { display: grid; gap: 3px; min-width: 0; }
.responsibility-strip span { color: var(--muted); font-size: 12px; }
.responsibility-strip strong { color: var(--ink); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.lead-tabs, .view-tabs { display: flex; align-items: center; gap: 23px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.lead-tabs a, .view-tabs a { color: var(--muted); font-size: 13px; padding: 11px 1px 10px; white-space: nowrap; border-bottom: 2px solid transparent; }
.lead-tabs a.selected, .view-tabs a.selected { color: var(--ink); border-color: var(--gold); font-weight: 650; }
.lead-tabs a span { color: var(--quiet); margin-left: 4px; font-size: 11px; }
.lead-content-grid { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(280px,.8fr); gap: clamp(28px,4vw,57px); align-items: start; }
.lead-main-column, .lead-side-column { min-width: 0; }
.content-section { padding: 3px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.content-section .section-heading { margin-bottom: 17px; }
.stage-label { font-size: 12px; color: var(--gold-dark); font-weight: 650; }
.overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px 20px; margin: 0; }
.overview-grid div { min-width: 0; }
.overview-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.overview-grid dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.overview-grid dd small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.summary-block { margin-top: 20px; border-top: 1px solid #ecece8; padding-top: 14px; }
.summary-block h3 { color: var(--ink-soft); font-size: 13px; }
.narrative { color: var(--ink-soft); white-space: normal; font-size: 14px; margin: 5px 0 0; }
.restricted-note { color: var(--muted); font-size: 13px; font-style: italic; margin: 5px 0 0; }
.workflow-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.workflow-disclosure { border-top: 1px solid var(--line); padding: 11px 0 0; }
.workflow-disclosure summary { display: grid; gap: 3px; list-style: none; font-size: 14px; font-weight: 650; }
.workflow-disclosure summary::-webkit-details-marker { display: none; }
.workflow-disclosure summary::after { content: "＋"; color: var(--gold-dark); position: absolute; right: 0; }
.workflow-disclosure summary { position: relative; padding-right: 25px; }
.workflow-disclosure summary small { color: var(--muted); font-size: 12px; font-weight: 400; }
.workflow-disclosure[open] summary::after { content: "−"; }
.workflow-disclosure form { margin-top: 13px; }
.workflow-disclosure .field { gap: 4px; }
.workflow-disclosure input, .workflow-disclosure select, .workflow-disclosure textarea { min-height: 38px; font-size: 13px; }
.workflow-disclosure textarea { min-height: 68px; }
.lead-task-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #ecece8; }
.task-row-content { min-width: 0; display: grid; gap: 3px; }
.task-row-content strong { font-size: 14px; }
.task-row-content span, .task-row-content small { color: var(--muted); font-size: 12px; }
.task-complete-disclosure { min-width: 118px; }
.task-complete-disclosure summary { list-style-position: outside; }
.completed-history, .assignment-history { margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line); }
.completed-history summary, .assignment-history summary { color: var(--gold-dark); font-size: 13px; font-weight: 650; }
.side-section { padding: 2px 0 19px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.side-section .section-heading { margin-bottom: 11px; }
.side-section h2 { font-size: 16px; }
.assignment-form { gap: 10px; }
.assignment-form .field { gap: 4px; }
.assignment-form .field label { font-size: 12px; }
.assignment-form input, .assignment-form select { min-height: 37px; padding: 7px 9px; font-size: 13px; }
.timeline { position: relative; margin: 2px 0 0 4px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 7px; width: 1px; background: var(--line-strong); }
.timeline-item { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 11px; position: relative; padding: 0 0 13px; }
.timeline-marker { width: 9px; height: 9px; position: relative; z-index: 1; margin-top: 5px; border-radius: 50%; border: 2px solid var(--paper); background: #b7a878; box-shadow: 0 0 0 1px #d9ceb1; }
.timeline-item p { color: var(--ink-soft); font-size: 13px; margin: 0 0 2px; }
.timeline-item small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.record-facts { display: grid; gap: 8px; }
.record-facts .eyebrow { margin: 0; }
.record-facts > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.record-facts span { color: var(--muted); }
.record-facts strong { text-align: right; font-weight: 600; }
.private-helper, .policy-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.private-helper { border-left: 2px solid #d5d6ce; padding-left: 10px; }
.history-line { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 9px; padding: 9px 0 4px; }
.history-dot { width: 7px; height: 7px; border-radius: 50%; background: #a4a69e; margin-top: 5px; }
.history-line strong { display: block; font-size: 12px; font-weight: 650; }
.history-line small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.4; }

.pipeline-stage-panel { background: #fff; border-block: 1px solid var(--line); padding: 13px 15px 0; margin-bottom: 14px; }
.stage-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.stage-panel-header .eyebrow { margin-bottom: 3px; }
.stage-panel-header strong { font-size: 14px; }
.stage-counts { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.stage-count { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 10px; border-top: 1px solid var(--line); border-right: 1px solid #eee; font-size: 12px; color: var(--muted); min-width: 0; }
.stage-count:first-child { padding-left: 0; }
.stage-count:last-child { border-right: 0; }
.stage-count b { color: var(--ink); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stage-count:hover, .stage-count-active { color: var(--gold-dark); background: #fbfaf6; }
.stage-count-active { box-shadow: inset 0 -2px var(--gold); }
.stage-count-active b { color: var(--gold-dark); }
.pipeline-controls { margin-bottom: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.filter-row { display: grid; grid-template-columns: 1.2fr repeat(4,minmax(130px,1fr)) auto; align-items: end; gap: 11px; }
.filter-row .field { gap: 4px; }
.filter-row .field label { font-size: 11px; color: var(--muted); }
.filter-row select { min-height: 36px; padding: 6px 9px; font-size: 12px; }
.filter-submit { min-height: 36px; white-space: nowrap; font-size: 12px; padding: 7px 10px; }
.results-topline > div { display: flex; align-items: baseline; gap: 12px; }
.scope-label { color: var(--ink-soft); font-size: 13px; }
.results-topline > span { text-align: right; font-size: 12px; }
.pipeline-table { min-width: 970px; }
.pipeline-table td { padding-block: 12px; }
.attention-reason { color: #875e17; font-weight: 600; }
.overflow-menu { position: relative; }
.overflow-menu summary { color: var(--muted); width: 37px; height: 36px; display: grid; place-items: center; list-style: none; border: 1px solid var(--line); border-radius: 4px; letter-spacing: 2px; }
.overflow-menu summary::-webkit-details-marker { display: none; }
.overflow-menu summary:hover { background: #fff; color: var(--ink); }
.overflow-popover { position: absolute; z-index: 3; right: 0; top: 42px; min-width: 230px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); color: var(--muted); font-size: 13px; }
.policy-note { margin: 12px 0 0; }

.task-list-surface table { min-width: 890px; }
.task-list-surface td small { display: block; color: var(--muted); margin-top: 4px; }
.task-list-surface .completion-form { min-width: 350px; }
.task-list-surface .completion-form input { width: 125px; }
.related-lead { padding: 11px 13px; display: grid; gap: 3px; border-left: 2px solid #d4c497; background: #fbfaf6; font-size: 12px; }
.related-lead span { color: var(--muted); }
.related-lead strong { font-size: 14px; }
.related-lead a { text-decoration: underline; text-underline-offset: 2px; }
.view-tabs { gap: 19px; margin-bottom: 0; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #fbfbf8; }
.search-result > span:first-child { display: grid; gap: 3px; }
.search-result strong { font-size: 14px; }
.search-result small { color: var(--muted); font-size: 12px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: var(--canvas); }
.login-panel { width: min(100%, 430px); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 32px; box-shadow: 0 18px 45px rgb(28 29 24 / 5%); }
.login-brand { padding: 0 0 28px; }
.login-panel .eyebrow { margin-bottom: 6px; }
.login-panel h1 { font-size: 26px; }
.login-panel > .muted { margin: 7px 0 19px; font-size: 14px; }
.login-panel .button { margin-top: 5px; }
.login-note { padding: 18px 0 0; margin-top: 18px; border-top: 1px solid var(--line); }

@media (min-width: 1600px) {
  .page-wrap { padding-inline: 56px; }
  .day-layout { grid-template-columns: minmax(0, 1.75fr) minmax(300px, .7fr); }
}
@media (max-width: 1260px) {
  .sidebar { width: 196px; flex-basis: 196px; }
  .page-wrap { padding-inline: 25px; }
  .topbar { padding-inline: 25px; }
  .filter-row { grid-template-columns: repeat(3,minmax(130px,1fr)); }
  .filter-submit { width: fit-content; }
  .stage-count { flex-direction: column; align-items: flex-start; gap: 3px; }
  .stage-counts { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .sidebar { width: 180px; flex-basis: 180px; }
  .lead-content-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .lead-side-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 28px; }
  .lead-side-column .private-helper { grid-column: 1 / -1; }
  .day-layout { grid-template-columns: minmax(0,1fr); }
  .upcoming-column { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .app-shell { display: block; }
  .sidebar { min-height: 0; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 9px 12px 7px; position: sticky; top: 0; z-index: 20; background: #fbfbf9; }
  .brand { padding: 0 3px 8px; gap: 8px; }
  .brand-rule { height: 28px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 11px; margin-top: 1px; }
  .nav-caption, .sidebar-spacer, .privacy-note, .user-area { display: none; }
  .primary-nav { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; }
  .nav-link { flex: 1 0 auto; min-height: 37px; justify-content: center; gap: 7px; padding: 7px 9px; font-size: 12px; }
  .nav-symbol { font-size: 14px; width: auto; }
  .nav-link.active { box-shadow: inset 0 -2px var(--gold); }
  .topbar { height: 51px; gap: 10px; padding: 0 13px; top: 90px; }
  .global-search { width: auto; flex: 1; gap: 6px; }
  .global-search input { font-size: 13px; }
  .global-search kbd { display: none; }
  .global-search > span { font-size: 19px; }
  .topbar > .button { min-height: 34px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  .page-wrap { padding: 20px 14px 38px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; gap: 12px; }
  .page-heading > .button, .page-heading .overflow-menu { align-self: center; }
  h1 { font-size: 25px; }
  .page-subtitle { font-size: 13px; }
  .signal-strip { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 20px; }
  .signal { padding: 10px 12px; min-height: 51px; gap: 8px; border-bottom: 1px solid var(--line); }
  .signal:nth-child(2) { border-right: 0; }
  .signal:nth-child(n+3) { border-bottom: 0; }
  .signal-value { font-size: 19px; }
  .signal-label { font-size: 12px; }
  .day-layout { gap: 24px; }
  .section-heading { margin-bottom: 11px; }
  .work-group { margin-bottom: 19px; }
  .work-item { gap: 10px; grid-template-columns: 8px minmax(0,1fr); padding: 12px 0; }
  .work-time { display: none; }
  .work-title { font-size: 14px; }
  .work-client { font-size: 13px; }
  .work-meta { font-size: 12px; gap: 5px 11px; }
  .work-meta span { min-height: 18px; }
  .completion-form { align-items: stretch; }
  .completion-form select, .completion-form input { max-width: none; width: 100%; }
  .completion-form .button { width: 100%; min-height: 39px; }
  .upcoming-column { padding-top: 17px; }
  .upcoming-item { padding: 11px 0; }
  .new-lead-main small { font-size: 12px; }
  .form-surface { padding: 17px 14px; }
  .two-col { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .field-wide { grid-column: auto; }
  .field input, .field select, .field textarea { min-height: 44px; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .button { width: 100%; }
  .list-search { gap: 7px; }
  .list-search .button { padding-inline: 10px; }
  .table-topline { align-items: flex-start; flex-direction: column; gap: 3px; }
  .table-scroll { margin: 0; }
  table { min-width: 760px; }
  .pipeline-table { min-width: 920px; }
  .pipeline-stage-panel { padding: 11px 11px 0; }
  .stage-panel-header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .stage-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stage-count { padding: 9px 8px; flex-direction: row; align-items: baseline; border-bottom: 1px solid #eee; }
  .stage-count:nth-child(2n) { border-right: 0; }
  .filter-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .filter-row .field:first-child { grid-column: 1 / -1; }
  .filter-row .button { grid-column: 1 / -1; width: 100%; }
  .results-topline { flex-direction: column; }
  .results-topline > div { flex-wrap: wrap; gap: 5px 9px; }
  .results-topline > span { text-align: left; }
  .lead-hero { display: grid; gap: 13px; padding-bottom: 14px; }
  .lead-identity h1 { font-size: 25px; }
  .lead-contact { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 15px; }
  .contact-line { flex-direction: column; gap: 1px; }
  .contact-line strong { text-align: left; overflow-wrap: anywhere; }
  .next-action-band { grid-template-columns: 1fr; gap: 7px; padding: 13px 0; }
  .next-action-label { gap: 6px; }
  .next-action-copy h2 { font-size: 15px; }
  .next-action-band > .button { width: 100%; min-height: 43px; margin-top: 4px; }
  .responsibility-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 14px; padding: 12px 0; }
  .responsibility-strip strong { font-size: 12px; }
  .lead-tabs { gap: 18px; margin-bottom: 15px; }
  .lead-content-grid { display: flex; flex-direction: column; gap: 0; }
  .lead-main-column, .lead-side-column { width: 100%; }
  .lead-side-column { display: flex; flex-direction: column; gap: 0; }
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 15px; }
  .overview-grid dd { font-size: 13px; }
  .workflow-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .lead-task-row { display: grid; gap: 9px; }
  .task-complete-disclosure { width: 100%; }
  .task-complete-disclosure[open] .completion-form { display: grid; grid-template-columns: minmax(0,1fr); }
  .lead-side-column { margin-top: 4px; }
  .record-facts > div { font-size: 12px; }
  .table-surface { border-radius: 5px; }
  .task-list-surface td { vertical-align: top; }
  .task-list-surface .completion-form { min-width: 300px; }
  .task-list-surface .completion-form select, .task-list-surface .completion-form input { width: 100%; max-width: none; }
  .login-panel { padding: 23px 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
