/* Lead register and dossier reuse the David Milanez shell, type and tokens. */
.leads-body [hidden] { display: none !important; }
.leads-body button, .leads-body input, .leads-body select, .leads-body textarea { font: inherit; }
.leads-body button, .leads-body a { touch-action: manipulation; }
.leads-body button { cursor: pointer; }
.leads-body button:disabled { cursor: default; }
.leads-body .shell { margin-inline: auto; padding-top: 0; }
.leads-body .identity .brand-logo { box-shadow: none; }
.leads-body .app-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.leads-body .app-tab svg { width: 18px; height: 18px; }
.lead-account { justify-self: end; position: relative; }
.lead-account > summary { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--brand-muted); border-radius: var(--workspace-control-radius); color: var(--brand-light); cursor: pointer; }
.lead-account > div { position: absolute; right: 0; z-index: 8; display: grid; gap: 8px; width: 230px; padding: 16px; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); color: var(--dm-ink); background: var(--dm-surface); box-shadow: 0 12px 30px rgb(41 24 15 / 14%); overflow-wrap: anywhere; }
.lead-account a, .lead-account button { display: flex; align-items: center; min-height: 44px; color: var(--dm-gold-dark); background: transparent; border: 0; text-align: left; }
.leads-body main { padding-top: 34px; }
.lead-page-heading, .lead-detail-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 25px; }
.leads-body h1 { margin: 0; font-family: var(--brand-type); font-size: 41px; font-weight: 500; line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; }
.lead-page-heading p, .lead-detail-heading p { margin: 9px 0 0; color: var(--dm-text); }
.lead-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.lead-heading-actions > * { white-space: nowrap; }
.lead-heading-actions svg { width: 18px; height: 18px; }
.leads-body .action, .lead-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: var(--workspace-control-radius); text-decoration: none; font-size: 13px; font-weight: 600; text-align: center; }
.lead-button { border: 1px solid var(--dm-line-strong); color: var(--dm-ink); background: var(--dm-surface); }
.leads-body .action { width: auto; }
.lead-button:hover { background: var(--dm-surface-soft); }
.lead-text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; border: 0; border-radius: var(--workspace-control-radius); color: var(--dm-gold-dark); background: transparent; font-size: 13px; }
.lead-text-button:hover { text-decoration: underline; }
.lead-filters { display: flex; gap: 24px; border-bottom: 1px solid var(--dm-line-strong); overflow-x: auto; }
.lead-filters button { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 50px; padding: 9px 1px; border: 0; border-bottom: 2px solid transparent; color: var(--dm-muted); background: transparent; font-size: 13px; }
.lead-filters .selected { border-bottom-color: var(--dm-gold-dark); color: var(--dm-ink); font-weight: 600; }
.lead-filters span { font-variant-numeric: tabular-nums; color: var(--dm-text); }
.lead-search-row { display: flex; align-items: center; gap: 16px; margin: 22px 0 16px; }
.lead-search { position: relative; width: min(340px, 100%); margin-right: auto; }
.lead-search svg { position: absolute; width: 18px; height: 18px; left: 12px; top: 13px; color: var(--dm-muted); }
.leads-body .lead-search input { padding-left: 39px; }
.leads-body input:not([type=checkbox]):not([type=file]), .leads-body select, .leads-body textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--dm-line-strong); border-radius: var(--workspace-control-radius); color: var(--dm-ink); background: var(--dm-surface); }
.leads-body textarea { resize: vertical; font-family: var(--dm-font); }
.leads-body .lead-search input[type=search] { padding-left: 40px; }
.leads-body input::placeholder, .leads-body textarea::placeholder { color: var(--dm-muted); opacity: 1; }
.lead-search-row > span { color: var(--dm-muted); font-size: 12px; }
.lead-register { border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); overflow: hidden; }
.lead-register-head, .lead-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) 150px 20px; align-items: center; gap: 22px; padding: 15px 22px; }
.lead-register-head { min-height: 44px; color: var(--dm-muted); font-size: 12px; }
.lead-row { min-height: 91px; border-top: 1px solid var(--dm-line); color: var(--dm-ink); text-decoration: none; }
.lead-row:hover { background: var(--dm-surface-soft); }
.lead-row > div { min-width: 0; }
.lead-row strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lead-row small { display: block; margin-top: 5px; color: var(--dm-muted); font-size: 12px; overflow-wrap: anywhere; }
.lead-row .lead-status { display: inline-flex; }
.lead-row time { color: var(--dm-muted); font-size: 12px; }
.lead-row-arrow { color: var(--dm-gold-dark); }
.lead-status { display: inline-flex; align-items: center; gap: 7px; color: var(--dm-gold-dark); font-size: 12px; font-weight: 500; }
.lead-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; flex: 0 0 6px; }
.lead-status[data-stage=ready], .lead-status[data-stage=submitted] { color: var(--dm-success); }
.lead-status[data-stage=rejected] { color: var(--dm-danger); }
.lead-empty { margin: 0; padding: 54px 24px; color: var(--dm-text); text-align: center; }
.lead-empty strong { display: block; margin-bottom: 8px; color: var(--dm-ink); font-size: 17px; font-weight: 600; }
.lead-empty .action { margin-top: 20px; }
.lead-scope-note { max-width: 80ch; margin: 20px 0; color: var(--dm-muted); font-size: 12px; line-height: 1.6; }
.lead-back { display: inline-flex; min-height: 44px; align-items: center; margin: -10px 0 15px; color: var(--dm-gold-dark); text-decoration: none; font-size: 13px; }
.lead-panel { min-width: 0; padding: 25px; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); }
.lead-section-heading { margin-bottom: 20px; }
.lead-section-heading h2, .lead-dialog h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.015em; }
.lead-section-heading p { margin: 6px 0 0; color: var(--dm-text); font-size: 13px; line-height: 1.6; }
.leads-body label { color: var(--dm-text); font-size: 13px; font-weight: 500; }
.lead-field-grid, .lead-edit-form, .lead-login form { display: grid; gap: 17px; }
.lead-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lead-field-grid label, .lead-edit-form label, .lead-login-form form > label, .lead-dialog label { display: grid; gap: 7px; }
.lead-wide { grid-column: 1 / -1; }
.lead-optional { display: inline; font-size: 12px; font-weight: 400; color: var(--dm-muted); }
.lead-create-form { max-width: 800px; }
.lead-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px -25px -25px; padding: 20px 25px; border-top: 1px solid var(--dm-line); }
.lead-form-footer p { max-width: 32ch; margin: 0; color: var(--dm-muted); font-size: 12px; }
.lead-detail-heading { align-items: start; margin-bottom: 25px; }
.lead-detail-heading h1 { font-size: 35px; }
.lead-detail-heading > .lead-status { margin-top: 10px; flex: 0 0 auto; }
.lead-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0; margin: 0 0 25px; list-style: none; }
.lead-stepper li { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border-bottom: 3px solid var(--dm-line); color: var(--dm-muted); font-size: 12px; }
.lead-stepper li.complete { border-bottom-color: var(--dm-success); color: var(--dm-success); }
.lead-stepper li.current { border-bottom-color: var(--dm-gold); background: var(--dm-gold-soft); color: var(--dm-ink); font-weight: 600; }
/* 1280px work area = flexible dossier + 320px follow-up column + 24px gap. */
.lead-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.lead-detail-main, .lead-detail-aside { display: grid; gap: 20px; min-width: 0; }
.lead-upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; gap: 8px; padding: 24px 16px; border: 1px solid var(--brand-gold); border-radius: 9px; background: var(--brand-dark); text-align: center; cursor: pointer; }
.leads-body .lead-upload strong { color: var(--brand-light); font-size: 15px; font-weight: 500; }
.leads-body .lead-upload span { color: var(--brand-muted); font-size: 12px; }
.lead-upload svg { width: 25px; height: 25px; color: var(--brand-gold); }
.lead-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lead-upload:focus-within { outline: 3px solid var(--dm-focus); outline-offset: 3px; }
.lead-file { display: flex; align-items: center; gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--dm-line); }
.lead-file > div { flex: 1; min-width: 0; }
.lead-file strong { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.lead-file small { display: block; color: var(--dm-muted); font-size: 12px; }
.lead-file button { flex: 0 0 auto; }
.lead-file-list:not(:empty) { margin-bottom: 17px; }
.lead-file .lead-remove { color: var(--dm-danger); }
.lead-guidance { margin-block: 20px; color: var(--dm-text); font-size: 12px; }
.lead-guidance summary { min-height: 44px; padding-block: 10px; color: var(--dm-gold-dark); cursor: pointer; font-size: 13px; }
.lead-guidance ol { padding-left: 20px; line-height: 1.8; }
.lead-guidance p { line-height: 1.65; }
.lead-optional-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.lead-optional-form legend { margin-bottom: 13px; font-size: 13px; font-weight: 600; }
.lead-optional-form label { display: grid; gap: 7px; font-size: 12px; }
.lead-optional-form > button { margin-block: 6px 12px; }
.leads-body #validate, .leads-body #submit-lead { width: 100%; }
.lead-helper { color: var(--dm-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.lead-inline-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lead-report { color: var(--dm-ink); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.lead-report p { margin: 0 0 6px; min-height: 10px; }
.lead-report strong { font-weight: 600; }
.lead-client-message { margin-top: 22px; padding: 18px; border-radius: 8px; background: var(--dm-surface-soft); }
.lead-client-message h3 { margin: 0; font-size: 14px; font-weight: 600; }
.lead-client-message p { font-size: 13px; line-height: 1.7; white-space: pre-line; }
.lead-readiness { display: grid; gap: 10px; margin-block: 20px; color: var(--dm-text); font-size: 13px; }
.lead-readiness p { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.lead-readiness strong { color: var(--dm-ink); font-weight: 500; text-align: right; }
.lead-priority { padding: 10px 12px; border-radius: 6px; background: var(--dm-gold-soft); font-size: 13px; }
.lead-document { padding-block: 16px; border-top: 1px solid var(--dm-line); }
.lead-document-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.lead-document-heading strong { font-size: 14px; font-weight: 500; }
.lead-document-heading span { color: var(--dm-muted); font-size: 12px; flex: 0 0 auto; }
.lead-document-heading .received { color: var(--dm-success); }
.lead-document p { margin: 6px 0 10px; color: var(--dm-muted); font-size: 12px; line-height: 1.6; }
.lead-document-upload { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--dm-line-strong); border-radius: var(--workspace-control-radius); color: var(--dm-ink); cursor: pointer; }
.lead-document-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.lead-document-upload:focus-within { outline: 3px solid var(--dm-focus); outline-offset: 3px; }
.lead-error, .lead-notice { padding: 14px 16px; margin-block: 0 20px; border: 1px solid var(--dm-line-strong); border-radius: 8px; background: var(--dm-gold-soft); font-size: 13px; line-height: 1.6; }
.lead-error { color: var(--dm-danger); border-color: var(--dm-danger); background: var(--dm-danger-soft); }
.lead-upload-progress { padding: 18px 0; }
.lead-upload-progress progress { width: 100%; height: 8px; accent-color: var(--dm-gold); }
.lead-upload-progress label, .lead-upload-progress p { color: var(--dm-muted); font-size: 12px; }
.lead-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 26px; border: 1px solid var(--dm-line-strong); border-radius: var(--workspace-radius); color: var(--dm-ink); background: var(--dm-surface); box-shadow: 0 20px 60px rgb(41 24 15 / 18%); }
.lead-dialog::backdrop { background: rgb(41 24 15 / 45%); }
.lead-dialog > form { display: grid; gap: 18px; }
.lead-dialog p { margin: 0; color: var(--dm-text); font-size: 13px; line-height: 1.65; }
.lead-dialog-actions { display: flex; justify-content: end; gap: 12px; margin-top: 6px; }
.leads-body .lead-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.lead-check input { width: 18px; height: 18px; accent-color: var(--dm-gold-dark); }
.lead-analysis-links { display: grid; margin-block: 10px; }
.lead-analysis-links a { justify-content: start; }
.lead-startup { display: grid; min-height: 100dvh; place-content: center; gap: 16px; text-align: center; }
.lead-login { display: grid; grid-template-columns: 1fr 1fr; width: min(1060px, calc(100% - 64px)); margin: max(40px, 10vh) auto; border: 1px solid var(--dm-line); border-radius: 14px; overflow: hidden; background: var(--dm-surface); }
.lead-login-story { display: flex; flex-direction: column; align-items: start; padding: 48px; background: var(--brand-dark); color: var(--brand-muted); }
.leads-body .lead-login-story h2 { margin: 36px 0 16px; color: var(--brand-light); font-family: var(--brand-type); font-size: 43px; line-height: 1.1; font-weight: 500; }
.lead-login-story p { max-width: 32ch; line-height: 1.8; }
.lead-login-story span { margin-top: auto; padding-top: 40px; font-size: 12px; }
.lead-login-form { padding: 42px; }
.leads-body .lead-login-form h2 { margin-top: 32px; font-family: var(--dm-font); font-size: 24px; font-weight: 600; }
.lead-login-form > p { margin: 9px 0 25px; color: var(--dm-muted); }
.lead-login-form .app-name { font-size: 27px; }
.lead-password { position: relative; }
.leads-body .lead-password input { padding-right: 80px !important; }
.lead-password button { position: absolute; inset: 0 0 0 auto; min-width: 74px; border: 0; color: var(--dm-gold-dark); background: transparent; }
.leads-body .lead-remember { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.lead-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--dm-gold-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1050px) { .lead-detail-grid { grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; } .lead-panel { padding: 20px; } .lead-register-head, .lead-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) 110px 16px; gap: 15px; } .lead-login-story, .lead-login-form { padding: 32px; } }
@media (max-width: 720px) {
  .leads-body .shell { width: calc(100% - 32px); padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .leads-body main { padding-top: 25px; }
  .leads-body .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 88px; padding-top: max(12px, env(safe-area-inset-top)); }
  .leads-body .topbar .identity { gap: 10px; }
  .leads-body .topbar .identity .app-name { font-size: 25px; }
  .leads-body .topbar .identity p { font-size: 11px; }
  .leads-body .topbar .brand-logo-header { width: 48px; height: 48px; }
  .lead-account > summary { padding-inline: 10px; font-size: 12px; }
  .leads-body .topbar .app-tabs { position: fixed; inset: auto 16px calc(12px + env(safe-area-inset-bottom)); z-index: 15; display: flex; justify-content: center; box-shadow: 0 5px 20px rgb(41 24 15 / 13%); }
  .leads-body .topbar .app-tabs .app-tab { flex: 1; min-height: 48px; flex-direction: column; gap: 2px; padding: 5px; font-size: 12px; }
  .leads-body .topbar .app-tabs .lead-mobile-new { flex-direction: row; font-size: 13px; }
  .lead-page-heading { gap: 16px; align-items: start; margin-bottom: 18px; }
  .leads-body h1 { font-size: 35px; }
  .lead-page-heading p { max-width: 28ch; font-size: 13px; line-height: 1.6; }
  .lead-heading-actions { flex-direction: column-reverse; align-items: end; gap: 5px; }
  .lead-heading-actions .lead-new { white-space: nowrap; padding-inline: 12px; }
  .lead-heading-actions #configure { width: 44px; height: 44px; min-width: 44px; padding: 4px; }
  .lead-heading-actions #configure span { display: none; }
  .lead-filters { gap: 22px; }
  .lead-filters button { min-height: 46px; font-size: 13px; }
  .lead-search-row { flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; }
  .lead-search { width: 100%; }
  .lead-search-row #result-count { margin-right: auto; }
  .leads-body input:not([type=checkbox]):not([type=file]), .leads-body textarea, .leads-body select { font-size: 16px; min-height: 46px; }
  .lead-register-head { display: none; }
  .lead-row { grid-template-columns: minmax(0, 1fr) 16px; gap: 8px 12px; padding: 17px 16px; }
  .lead-row:first-child { border-top: 0; }
  .lead-row > :nth-child(2) { grid-row: 2; }
  .lead-row time { grid-column: 1; grid-row: 3; margin-top: 2px; }
  .lead-row-arrow { grid-column: 2; grid-row: 1 / 4; }
  .lead-row small { line-height: 1.6; }
  .lead-detail-heading { display: block; }
  .leads-body .lead-detail-heading h1 { font-size: 32px; }
  .lead-detail-heading p { font-size: 12px; line-height: 1.7; }
  .lead-detail-heading > .lead-status { margin-top: 12px; }
  .lead-stepper { gap: 5px; margin-bottom: 20px; }
  .lead-stepper li { min-height: 50px; padding: 8px 3px; align-items: end; justify-content: center; text-align: center; font-size: 11px; }
  .lead-detail-grid { display: flex; flex-direction: column; gap: 18px; }
  .lead-detail-main, .lead-detail-aside { width: 100%; gap: 18px; }
  .lead-panel { padding: 20px 16px; }
  .lead-detail-aside { display: contents; }
  .lead-detail-aside > :first-child { order: -1; width: 100%; }
  .lead-detail-aside > :last-child { order: 1; width: 100%; }
  .lead-section-heading { margin-bottom: 16px; }
  .lead-detail-aside .lead-section-heading p { font-size: 13px; }
  .lead-readiness { margin-block: 14px; }
  .lead-detail-aside #submit-help { margin-bottom: 0; }
  .lead-file { flex-wrap: wrap; gap: 4px; }
  .lead-file > div { flex-basis: calc(100% - 140px); }
  .lead-file strong { font-size: 12px; }
  .lead-file button { padding-inline: 6px; font-size: 12px; }
  .lead-optional-form fieldset, .lead-field-grid { grid-template-columns: 1fr; }
  .lead-form-footer { flex-direction: column; align-items: stretch; margin: 24px -16px -20px; padding: 18px 16px; gap: 12px; }
  .lead-form-footer p { max-width: none; }
  .lead-empty { padding: 35px 17px; }
  .lead-dialog { padding: 22px 18px; }
  .lead-dialog-actions > * { flex: 1; }
  .lead-login { display: block; width: calc(100% - 32px); margin: 32px auto; }
  .lead-login-story { display: none; }
  .lead-login-form { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) { .leads-body *, .leads-body *::before, .leads-body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
