.leads-page {
  overflow-x: hidden;
}

.leads-page,
.lead-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

main[data-active-nav="leads"] .topbar {
  display: none;
}

.lead-page--two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.lead-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.lead-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.lead-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.lead-info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead-info-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.lead-customer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  grid-column: 1 / -1;
  width: 100%;
}

.lead-customer-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 1);
  background: #f8fafc;
}

.lead-customer-summary__item--wide {
  grid-column: 1 / -1;
}

.lead-customer-summary__item span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-customer-summary__item strong {
  color: #0f172a;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .lead-info-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-customer-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lead-hero.crm-entity-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 42%, rgba(248, 250, 252, 0.98) 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.lead-hero.crm-entity-hero .lead-hero__copy {
  gap: 8px;
}

.lead-hero.crm-entity-hero .lead-hero__eyebrow {
  margin: 0;
}

.lead-hero.crm-entity-hero .lead-hero__title-row h1 {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
}

.lead-hero.crm-entity-hero .lead-hero__subtitle {
  font-size: 0.98rem;
}

.lead-hero.crm-entity-hero .lead-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .lead-hero.crm-entity-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lead-hero.crm-entity-hero .lead-hero__actions {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .lead-hero.crm-entity-hero {
    grid-template-columns: 1fr;
  }
}

.lead-page--create .qb-main-tab[data-lead-tab="quotes"],
.lead-page--create .qb-main-tab[data-lead-tab="jobs"],
.lead-page--create .qb-main-tab[data-lead-tab="notes"],
.lead-page--create .qb-main-tab[data-lead-tab="additional-works"],
.lead-page--create .qb-main-tab[data-lead-tab="other"],
.lead-page--create .qb-main-tab[data-lead-tab="lost"] {
  display: none !important;
}

.lead-page--create .lead-tab-panel:not([data-lead-panel="lead-info"]) {
  display: none !important;
}

.lead-page--create .lead-field--create-hidden,
.lead-page--create .lead-address-stage,
.lead-page--create .lead-source-stage,
.lead-page--create .lead-other-advanced {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.leads-hero {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  align-items: flex-end;
  padding: 4px 2px 0;
}

.leads-hero__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leads-hero__eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dc2626;
}

.leads-hero__heading h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.leads-hero__heading p {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.leads-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.leads-filters-card {
  padding: 18px;
}

.leads-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.lead-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-filter input,
.lead-filter select,
.lead-filter .ms-select {
  width: 100%;
}

.lead-filter--search input {
  min-height: 42px;
}

.lead-filter__label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-overview {
  display: grid;
  gap: 12px;
}

.lead-overview__primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lead-overview__secondary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-overview__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
}

.lead-overview__meta strong {
  color: #0f172a;
}

.lead-overview-card {
  border: 1px solid rgba(226, 232, 240, 1);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-overview-card__label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-overview-card__value {
  margin: 0;
  font-size: clamp(1.6rem, 2.3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.lead-overview-card__value--accent {
  color: #0369a1;
}

.lead-customer-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.lead-customer-picker {
  position: relative;
}

.lead-customer-selected {
  min-height: 42px;
  padding: 10px 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 600;
}

.lead-customer-selected[hidden] {
  display: none;
}

.lead-customer-id {
  display: none;
}

.lead-customer-id + .ms-select {
  display: none !important;
}

.lead-customer-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .14);
  text-align: left !important;
}

.lead-customer-suggestion {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  color: #2563eb;
  background: transparent;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  outline: none;
  font-weight: 600;
}

.lead-customer-suggestion:hover,
.lead-customer-suggestion:focus-visible {
  background: #eff6ff;
  outline: none;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.lead-customer-suggestion__primary {
  color: #1d4ed8 !important;
  font-weight: inherit;
  text-align: left;
}

.lead-customer-suggestion__email {
  color: #64748b;
  font-size: .85rem;
  font-weight: 400;
  text-align: left;
}

.lead-customer-suggestion__primary,
.lead-customer-suggestion__email {
  display: inline;
}

.lead-customer-suggestions__empty {
  padding: 10px;
}

.lead-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
}

.lead-project-field {
  grid-column: 1 / -1;
}

.lead-project-stage {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.lead-project-picker {
  position: relative;
  flex: 1 1 auto;
}

.lead-project-stage .lead-customer-actions {
  flex: 0 0 auto;
}

.lead-customer-actions .button.edit {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
}

.lead-customer-actions .button.edit[hidden],
.lead-customer-actions .lead-customer-edit-btn[hidden] {
  display: none !important;
}

.lead-customer-actions .lead-customer-edit-btn.is-cancel::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lead-quote-finder {
  display: grid;
  gap: 16px;
}

.lead-quote-finder-modal {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.lead-quote-finder-modal .modal__body {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}

.lead-quote-finder__search {
  position: relative;
}

.lead-quote-finder__results {
  position: static;
  max-height: min(280px, calc(100vh - 320px));
  overflow-y: auto;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.lead-quote-finder__result {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.lead-quote-finder__result:hover,
.lead-quote-finder__result:focus-visible,
.lead-quote-finder__result.is-selected {
  background: #eff6ff;
  outline: none;
}

.lead-quote-finder__result--revision {
  padding-left: 28px;
}

.lead-quote-finder__result-primary {
  display: block;
  color: #1d4ed8;
  font-weight: 700;
}

.lead-quote-finder__result-meta {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.88rem;
}

.lead-quote-finder__selected {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  background: #f8fafc;
}

.lead-quote-finder__selected-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.lead-quote-finder__eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-quote-finder__selected-heading h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.lead-quote-finder__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.lead-quote-finder__details > div {
  min-width: 0;
}

.lead-quote-finder__details--wide {
  grid-column: 1 / -1;
}

.lead-quote-finder__details dt {
  margin: 0 0 4px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-quote-finder__details dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lead-quote-finder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 780px) {
  .lead-quote-finder__details {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-quote-finder__selected-heading {
    flex-direction: column;
  }
}

.lead-row {
  grid-column: 1 / -1;
  width: 100%;
}

.lead-address-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  width: 100%;
}

.lead-source-stage {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 12px;
  align-items: end;
  width: 100%;
}

.lead-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: -2px 2px 10px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.lead-summary span {
  white-space: nowrap;
}

.lead-page-grid {
  display: none;
}

.lead-page-grid > *,
.lead-overview,
.lead-section,
.lead-sidebar,
.leads-hero > * {
  min-width: 0;
}

.lead-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lead-section__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.lead-section__header h2,
.lead-section__header h3 {
  margin: 0;
}

.lead-subtitle {
  margin: 4px 0 0;
  color: var(--fg-muted);
}

.lead-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lead-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-field label,
.lead-field span {
  font-weight: 600;
  color: #64748b;
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
}

.lead-field select {
  color: #2563eb;
  font-weight: 600;
}

.lead-field input[readonly] {
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
}

.lead-field--wide {
  grid-column: 1 / -1;
}

.lead-field--checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.lead-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
  font-weight: 600;
}

.lead-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.lead-toolbar-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-toolbar-row .button {
  min-width: auto;
}

.lead-meta {
  display: grid;
  gap: 12px;
}

.lead-meta__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.lead-meta__item span:last-child {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.lead-note-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lead-note {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.lead-note__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
}

.lead-note__body {
  white-space: pre-wrap;
  color: #0f172a;
}

.lead-note__actions {
  margin-top: 10px;
}

.lead-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lead-form-grid--quote {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-quote-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.lead-empty--quotes {
  color: #64748b;
  font-size: 0.9rem;
}

.lead-inline-form .lead-field--wide {
  grid-column: 1 / -1;
}

.leads-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  width: 100%;
}

.leads-toolbar > * {
  flex: 1 1 180px;
  min-width: 180px;
}

.leads-toolbar input[type="search"] {
  width: 100%;
  flex: 2 1 260px;
  min-width: 260px;
}

.leads-toolbar select,
.leads-toolbar input[type="date"] {
  width: 100%;
}

.leads-toolbar .lead-date-filter {
  width: 100%;
  flex: 1 1 150px;
  min-width: 150px;
}

.leads-toolbar .lead-date-filter input[type="date"] {
  width: 100%;
}

.lead-date-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--fg-muted);
}

.lead-date-filter__label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead-table tr[data-lead-id] {
  cursor: pointer;
  transition: background 0.15s ease;
}

.lead-table tr[data-lead-id]:hover {
  background: rgba(37, 99, 235, 0.08);
}

.lead-table tr.quote-row--expanded {
  background: rgba(37, 99, 235, 0.12);
}

.lead-table {
  width: 100%;
  table-layout: auto;
}

.lead-table thead th {
  white-space: nowrap;
}

.lead-table td:first-child {
  min-width: 320px;
}

.lead-table th:nth-child(1),
.lead-table td:nth-child(1) {
  min-width: 320px;
}

.lead-table th:nth-child(2),
.lead-table td:nth-child(2) {
  min-width: 130px;
}

.lead-table th:nth-child(3),
.lead-table td:nth-child(3) {
  min-width: 180px;
}

.lead-table th:nth-child(4),
.lead-table td:nth-child(4) {
  min-width: 140px;
}

.lead-table th:nth-child(5),
.lead-table td:nth-child(5) {
  min-width: 140px;
}

.lead-table td:nth-child(2),
.lead-table td:nth-child(3),
.lead-table td:nth-child(4),
.lead-table td:nth-child(5) {
  white-space: nowrap;
}

.lead-table--works .lead-table__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-relationship-table-wrapper {
  overflow-x: auto;
}

.lead-relationship-table {
  width: 100%;
  min-width: 0;
}

.lead-relationship-table tr[data-quote-id],
.lead-relationship-table tr[data-job-id] {
  cursor: pointer;
}

.lead-relationship-table tr[data-quote-id]:hover,
.lead-relationship-table tr[data-job-id]:hover {
  background: rgba(37, 99, 235, 0.08);
}

.lead-relationship__primary {
  font-weight: 700;
  color: #0f172a;
}

.lead-relationship__pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 800;
}

.lead-relationship__money {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.lead-quote-row__issued {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lead-quote-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lead-quote-row__ref {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.lead-quote-row__remove {
  flex: 0 0 auto;
}

.lead-empty {
  margin: 0;
  color: var(--fg-muted);
}

.lead-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: start;
  padding: 24px 26px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.lead-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.lead-hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2563eb;
}

.lead-hero__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-hero__title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #0f172a;
}

.lead-stage-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-hero__subtitle {
  margin: 0;
  color: #475569;
  font-size: 1rem;
}

.lead-hero__hint {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.lead-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-start;
}

.lead-save-message {
  min-height: 1.2em;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.lead-summary-card {
  padding: 18px 22px;
}

.lead-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.lead-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.lead-summary-item span {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-summary-item strong {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-summary-item--accent {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
}

.lead-summary-item--accent strong {
  color: #1d4ed8;
}

.lead-tabs {
  padding: 6px 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.lead-tab-button {
  position: relative;
}

.lead-tab-button.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: #2563eb;
}

.lead-sidebar {
  position: sticky;
  top: 18px;
}

.lead-sidebar .card {
  position: sticky;
  top: 18px;
}

.lead-owner-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.lead-owner-name {
  font-weight: 400;
  color: #0f172a;
}

.lead-money {
  font-weight: 400;
  color: #0f172a;
}

.lead-money--empty {
  color: #64748b;
  font-style: italic;
}

.lead-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead-sidebar .card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-side-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-actions-fixed {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-help {
  margin: 0;
  color: var(--fg-muted);
}

@media (max-width: 1100px) {
  .lead-hero {
    grid-template-columns: 1fr;
  }

  .lead-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leads-toolbar input[type="search"] {
    flex-basis: 100%;
    min-width: 100%;
  }

  .leads-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leads-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-overview__primary {
    grid-template-columns: 1fr;
  }

  .lead-page-grid {
    display: none;
  }

  .lead-page--two-column {
    grid-template-columns: 1fr;
  }

  .lead-customer-stage {
    grid-template-columns: 1fr;
  }

  .lead-address-stage {
    grid-template-columns: 1fr;
  }

  .lead-source-stage {
    grid-template-columns: 1fr;
  }

  .lead-sidebar,
  .lead-sidebar .card {
    position: static;
    top: auto;
  }
}

@media (max-width: 760px) {
  .lead-summary-grid {
    grid-template-columns: 1fr;
  }

  .leads-toolbar {
    align-items: stretch;
  }

  .leads-toolbar > *,
  .leads-toolbar input[type="search"],
  .leads-toolbar .lead-date-filter {
    flex-basis: 100%;
    min-width: 0;
  }

  .leads-filters,
  .lead-form-grid,
  .lead-form-grid--three,
  .lead-inline-form {
    grid-template-columns: 1fr;
  }

  .lead-form-grid--quote {
    grid-template-columns: 1fr;
  }
}
