:root {
  color-scheme: dark;
  --bg: #0d0d0f;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --surface-3: #202024;
  --line: #303036;
  --line-strong: #414149;
  --text: #f6f6f7;
  --muted: #9c9ca5;
  --muted-2: #c5c5cb;
  --red: #ef233c;
  --red-dark: #b81127;
  --red-soft: rgba(239, 35, 60, 0.12);
  --green: #16c784;
  --green-soft: rgba(22, 199, 132, 0.12);
  --blue: #4a8df6;
  --blue-soft: rgba(74, 141, 246, 0.12);
  --amber: #f4ad32;
  --amber-soft: rgba(244, 173, 50, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

body::selection {
  background: var(--red);
  color: white;
}

body.drawer-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ul {
  margin: 0;
}

.eyebrow {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #0b0b0d;
  position: relative;
}

.login-screen::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: var(--red);
}

.login-panel {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 22px;
  background: var(--surface);
  padding: 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.login-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.login-brand div {
  display: grid;
  gap: 3px;
}

.login-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-brand strong {
  font-size: 19px;
}

.login-copy {
  padding: 34px 0 26px;
}

.login-copy h1 {
  max-width: 360px;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.12;
}

.login-copy > p:last-child {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 10px;
}

label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #101012;
  color: var(--text);
  padding: 9px 12px;
}

input::placeholder {
  color: #6f6f78;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
}

.icon-button,
.primary-button,
.ghost-button,
.action-button,
.nav-button {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 850;
}

.icon-button,
.ghost-button,
.nav-button {
  background: var(--surface-2);
  color: var(--muted-2);
}

.primary-button {
  min-height: 44px;
  border-color: var(--red);
  background: var(--red);
  color: white;
  margin-top: 4px;
}

.primary-button:hover {
  background: #ff2e48;
}

.login-error {
  min-height: 18px;
  color: #ff6477;
  font-size: 13px;
}

.login-footnote {
  margin-top: 26px;
  color: #777780;
  font-size: 11px;
  text-align: center;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: #101012;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.top-actions,
.data-status {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

.logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand h1 {
  font-size: 20px;
}

.brand p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  gap: 12px;
}

.data-status {
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.data-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.data-status b {
  font-weight: 700;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
}

.ghost-button:hover,
.icon-button:hover,
.nav-button:hover:not(:disabled) {
  border-color: #60606a;
  color: white;
}

main {
  width: min(1720px, 100%);
  margin: 0 auto;
  padding: 24px 28px 40px;
  display: grid;
  gap: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 124px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  align-content: space-between;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1;
}

.metric-card small {
  color: var(--muted-2);
  font-size: 12px;
}

.accent-red { --accent: var(--red); }
.accent-blue { --accent: var(--blue); }
.accent-amber { --accent: var(--amber); }
.accent-green { --accent: var(--green); }

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(140px, 0.9fr) minmax(110px, 0.65fr) minmax(150px, 0.95fr) 42px;
  gap: 10px;
  align-items: end;
  padding: 16px;
  border: 1px solid #d9d9df;
  border-radius: 20px;
  background: #f2f2f4;
  color: #19191c;
}

.filter-panel label {
  color: #5e5e67;
}

.filter-panel input,
.filter-panel select {
  border-color: #d0d0d7;
  background: white;
  color: #19191c;
}

.filter-panel input::placeholder {
  color: #878790;
}

.filter-panel .ghost-button {
  border-color: #ccccd3;
  background: #e5e5e9;
  color: #303036;
}

.filter-panel .ghost-button:hover {
  border-color: var(--red);
  color: var(--red-dark);
}

.filter-search,
.filter-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.clear-button {
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.radius-panel {
  border: 1px solid #d9d9df;
  border-radius: 24px;
  background: #f2f2f4;
  color: #19191c;
  padding: 24px;
}

.radius-heading,
.browser-heading,
.section-title,
.section-title-count,
.partner-title,
.detail-header,
.lead-navigation,
.status-row {
  display: flex;
  align-items: center;
}

.radius-heading,
.browser-heading,
.detail-header,
.partner-title {
  justify-content: space-between;
}

.radius-heading h2,
.browser-heading h2 {
  margin-top: 4px;
  font-size: 20px;
}

.radius-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radius-heading-actions > span {
  border: 1px solid var(--red);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-dark);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.radius-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ceced4;
  border-radius: 12px;
  background: white;
  color: #29292e;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.radius-toggle:hover,
.radius-toggle:focus-visible {
  border-color: var(--red);
  outline: none;
}

.radius-toggle-icon {
  display: inline-block;
  color: var(--red-dark);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.radius-toggle[aria-expanded="true"] .radius-toggle-icon {
  transform: rotate(180deg);
}

.radius-content {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.24s ease, margin-top 0.24s ease, opacity 0.18s ease, transform 0.24s ease;
}

.radius-content.expanded {
  max-height: 3200px;
  margin-top: 20px;
  opacity: 1;
  transform: translateY(0);
}

.radius-map {
  width: min(420px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
}

.radius-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #e3aab2;
  border-radius: 50%;
  color: #2b2b30;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.radius-ring:hover {
  border-color: var(--red);
}

.radius-ring.active {
  border-color: var(--red);
  box-shadow: 0 0 0 5px rgba(239, 35, 60, 0.2);
}

.radius-ring > span,
.radius-ring > strong {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.radius-ring > span {
  top: 13px;
  font-size: 11px;
  font-weight: 900;
}

.radius-ring > strong {
  top: 31px;
  color: var(--red-dark);
  font-size: 13px;
}

.ring-300 {
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #fff;
}

.ring-200 {
  width: 78%;
  height: 78%;
  z-index: 2;
  background: #fbe5e8;
}

.ring-100 {
  width: 55%;
  height: 55%;
  z-index: 3;
  background: #f7bec6;
}

.ring-center {
  width: 30%;
  height: 30%;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.ring-center > span,
.ring-center > strong {
  position: static;
  transform: none;
  color: white;
  white-space: normal;
  text-align: center;
}

.ring-center > span {
  max-width: 90px;
  font-size: 11px;
}

.ring-center > strong {
  font-size: 20px;
}

.radius-details {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.radius-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radius-legend-row {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 9px;
  align-items: center;
  border: 1px solid #d8d8de;
  border-radius: 14px;
  background: white;
  color: #232327;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.radius-legend-row:hover,
.radius-legend-row.active {
  border-color: var(--red);
}

.radius-legend-row.active {
  background: #fff1f3;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--red);
}

.swatch-0 { background: #202024; }
.swatch-1 { background: var(--red); }
.swatch-2 { background: #f18493; }
.swatch-3 { background: #e9aeb7; }
.swatch-4 { background: #f3d2d7; }

.radius-legend-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.radius-legend-row small {
  color: #777780;
  font-size: 10px;
}

.radius-legend-row strong {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--red-dark);
  font-size: 18px;
}

.city-grid-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.city-grid-heading h3 {
  font-size: 14px;
  text-transform: uppercase;
}

.city-grid-heading span {
  color: #71717a;
  font-size: 11px;
  font-weight: 750;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.city-tile {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid #d8d8de;
  border-radius: 13px;
  background: white;
  color: #29292e;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.city-tile:hover,
.city-tile.active {
  border-color: var(--red);
}

.city-tile.active {
  background: #fff1f3;
}

.city-tile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.city-tile small {
  color: #777780;
  font-size: 9px;
}

.city-tile strong {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--red-dark);
  font-size: 14px;
}

.no-results-inline {
  color: #6f6f78;
  font-size: 13px;
}

.view-toolbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d9d9df;
  border-radius: 20px;
  background: white;
  padding: 14px 18px 14px 22px;
}

.view-toolbar h2 {
  margin-top: 4px;
  color: #19191d;
  font-size: 20px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d0d0d7;
  border-radius: 12px;
  background: white;
  color: #29292e;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.export-button span {
  color: var(--red-dark);
  font-size: 18px;
  line-height: 1;
}

.export-button:hover,
.export-button:focus-visible {
  border-color: var(--red);
  color: var(--red-dark);
  outline: none;
}

.export-button:disabled {
  border-color: #dedee3;
  color: #9a9aa2;
  cursor: not-allowed;
}

.export-button:disabled span {
  color: #9a9aa2;
}

.view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border-radius: 15px;
  background: #ededf0;
  padding: 5px;
}

.view-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5f5f68;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.view-button span {
  font-size: 17px;
  line-height: 1;
}

.view-button.active {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 35, 60, 0.2);
}

.lead-workspace {
  min-height: 720px;
  height: clamp(720px, 82vh, 980px);
  display: grid;
  grid-template-columns: minmax(330px, 370px) minmax(0, 1fr);
  border: 1px solid #d7d7dd;
  border-radius: 22px;
  overflow: hidden;
  background: white;
}

.lead-browser {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid #dedee3;
  background: #f7f7f9;
  display: grid;
  grid-template-rows: auto 1fr;
}

.browser-heading {
  min-height: 82px;
  padding: 16px 18px;
  border-bottom: 1px solid #dedee3;
}

.browser-heading h2 {
  color: #19191d;
}

.browser-heading > strong {
  min-width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: white;
  font-size: 13px;
}

.lead-list {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c2c2c9 transparent;
}

.lead-row {
  width: 100%;
  min-height: 118px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid #e5e5e9;
  background: transparent;
  color: #1d1d21;
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
}

.lead-row:hover {
  background: #f0f0f3;
}

.lead-row.active {
  background: var(--red-soft);
  box-shadow: inset 3px 0 0 var(--red);
}

.lead-index {
  color: #8b8b94;
  font-size: 10px;
  font-weight: 900;
  padding-top: 3px;
}

.lead-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.lead-row-main > strong,
.lead-row-main > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-row-main > strong {
  font-size: 14px;
}

.lead-row-main > small {
  color: #6c6c75;
  font-size: 11px;
}

.lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.lead-meta b,
.lead-meta i,
.lead-meta em {
  border-radius: 999px;
  padding: 4px 6px;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.lead-meta b {
  background: var(--blue-soft);
  color: #2865bb;
}

.lead-meta i {
  background: var(--amber-soft);
  color: #94620d;
}

.lead-meta em {
  background: var(--green-soft);
  color: #087b50;
}

.lead-arrow {
  color: #9999a2;
  font-size: 24px;
  line-height: 1;
}

.empty-list,
.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  color: #74747d;
  text-align: center;
}

.empty-list strong,
.empty-state strong {
  color: #222226;
  font-size: 17px;
}

.empty-list p,
.empty-state p {
  font-size: 13px;
}

.lead-detail {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: white;
  color: #202024;
}

.table-view {
  border: 1px solid #d9d9df;
  border-radius: 22px;
  overflow: hidden;
  background: white;
  color: #202024;
}

.table-view-heading {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid #dedee3;
}

.table-view-heading h2 {
  margin-top: 4px;
  font-size: 20px;
}

.table-view-heading > span {
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-dark);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 850;
}

.leads-table-wrap {
  width: 100%;
  overflow: auto;
}

.leads-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
}

.leads-table th,
.leads-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #e7e7eb;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.leads-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f3f5;
  color: #686871;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.leads-table td {
  color: #3a3a40;
  font-size: 12px;
}

.leads-table tbody tr {
  transition: background 0.15s ease;
  cursor: pointer;
}

.leads-table tbody tr:hover {
  background: #fff3f4;
}

.company-cell {
  width: 30%;
  max-width: 330px;
}

.company-cell strong,
.company-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-cell strong {
  color: #202024;
  font-size: 13px;
}

.company-cell small {
  max-width: 300px;
  margin-top: 4px;
  color: #74747d;
  font-size: 10px;
}

.table-city,
.table-whatsapp {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
}

.table-city {
  background: var(--blue-soft);
  color: #2865bb;
}

.table-whatsapp.yes {
  background: var(--green-soft);
  color: #087b50;
}

.table-whatsapp.no {
  background: #ededf0;
  color: #71717a;
}

.open-lead-button,
.table-page-button {
  border: 1px solid #d3d3d9;
  border-radius: 10px;
  background: white;
  color: #303036;
  font-weight: 850;
  cursor: pointer;
}

.open-lead-button {
  min-height: 32px;
  padding: 0 12px;
}

.open-lead-button:hover {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.table-empty {
  height: 180px;
  color: #74747d !important;
  text-align: center !important;
}

.table-pagination {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  color: #6c6c75;
  font-size: 11px;
}

.table-pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-page-button {
  min-height: 36px;
  padding: 0 12px;
}

.table-page-button:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red-dark);
}

.table-page-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 10, 12, 0.58);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.open {
  opacity: 1;
}

.lead-drawer {
  width: min(760px, calc(100vw - 24px));
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  border-left: 1px solid #d9d9df;
  border-radius: 24px 0 0 24px;
  background: white;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.lead-drawer.open {
  transform: translateX(0);
}

.drawer-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px 14px 24px;
  border-bottom: 1px solid #dedee3;
  background: white;
}

.drawer-topbar > div {
  display: grid;
  gap: 4px;
}

.drawer-topbar strong {
  color: #202024;
  font-size: 16px;
}

.drawer-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #d3d3d9;
  border-radius: 50%;
  background: #f2f2f4;
  color: #29292e;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.drawer-close:hover {
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.drawer-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-content .detail-header {
  min-height: 160px;
}

.drawer-content .detail-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.detail-header {
  min-height: 180px;
  gap: 20px;
  padding: 28px;
  border-bottom: 1px solid #dedee3;
  background: #f2f2f4;
  color: #19191c;
}

.detail-title > p,
.detail-header .lead-navigation > span {
  color: #686871;
}

.detail-header .cnpj-button {
  color: #4d4d55;
  text-decoration-color: #a7a7ae;
}

.detail-header .nav-button {
  border-color: #d1d1d7;
  background: white;
  color: #232327;
}

.detail-title {
  min-width: 0;
}

.status-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.status-pill,
.distance-pill {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill {
  background: var(--green-soft);
  color: var(--green);
}

.distance-pill {
  background: var(--amber-soft);
  color: var(--amber);
}

.detail-title h2 {
  font-size: 29px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.detail-title > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.cnpj-button,
.copy-link {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #55555e;
  text-underline-offset: 4px;
}

.cnpj-button {
  margin-top: 12px;
  font-size: 13px;
}

.lead-navigation {
  flex: 0 0 auto;
  gap: 12px;
}

.lead-navigation > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.lead-navigation > div {
  display: flex;
  gap: 6px;
}

.nav-button {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.nav-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 28px;
  border-bottom: 1px solid #dedee3;
  background: white;
}

.action-row .action-button {
  border-color: #d0d0d6;
  background: #f3f3f5;
  color: #242428;
}

.action-row .action-button.whatsapp {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.action-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: white;
  padding: 0 13px;
  text-decoration: none;
  font-size: 12px;
}

.action-button:hover {
  border-color: var(--red);
}

.action-button.whatsapp {
  border-color: var(--green);
  background: var(--green);
}

.detail-section {
  padding: 26px 28px;
  border-bottom: 1px solid #e2e2e7;
  background: white;
}

.detail-section .section-title h3,
.detail-section .partner-title strong {
  color: #202024;
}

.section-title {
  gap: 10px;
  margin-bottom: 18px;
}

.section-title > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
}

.section-title h3 {
  font-size: 15px;
  text-transform: uppercase;
}

.section-title-count b {
  min-width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--red);
  font-size: 10px;
  margin-left: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 1px;
  border: 1px solid #ddddE3;
  background: #ddddE3;
  border-radius: 14px;
  overflow: hidden;
}

.detail-item {
  min-height: 80px;
  display: grid;
  align-content: center;
  gap: 7px;
  background: #f7f7f9;
  padding: 13px;
  min-width: 0;
}

.detail-item dt {
  color: #6b6b74;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-item dd {
  color: #202024;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.address-line {
  color: #4e4e56;
  font-size: 14px;
  line-height: 1.65;
}

.location-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.location-facts span,
.location-facts strong,
.location-facts small {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 10px;
}

.location-facts span {
  background: var(--blue-soft);
  color: #2865bb;
}

.location-facts strong {
  background: var(--amber-soft);
  color: #94620d;
}

.location-facts small {
  background: #ededf0;
  color: #575760;
}

.company-contacts {
  display: grid;
  gap: 7px;
}

.contact-line,
.partner-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #202024;
  text-decoration: none;
}

.contact-line {
  min-height: 38px;
  border-bottom: 1px solid #e6e6ea;
  padding: 4px 0;
}

.contact-line span,
.partner-contact span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-line small,
.partner-contact small {
  color: #71717a;
  font-size: 10px;
  white-space: nowrap;
}

.contact-line:hover span,
.partner-contact:hover span {
  color: var(--red);
}

.activity-block {
  display: grid;
  gap: 20px;
}

.activity-block h4,
.partner-contacts h4 {
  margin-bottom: 8px;
  color: #6c6c75;
  font-size: 10px;
  text-transform: uppercase;
}

.activity-block p,
.activity-block li {
  color: #4e4e56;
  font-size: 13px;
  line-height: 1.55;
}

.activity-block ul {
  padding-left: 20px;
}

.partners-list {
  border-top: 1px solid #dedee3;
}

.partner-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid #e2e2e7;
}

.partner-number {
  color: #92929a;
  font-size: 11px;
  font-weight: 900;
  padding-top: 3px;
}

.partner-title {
  gap: 16px;
  align-items: flex-start;
}

.partner-title > div {
  display: grid;
  gap: 5px;
}

.partner-title strong {
  font-size: 14px;
}

.partner-title span {
  color: #6c6c75;
  font-size: 11px;
}

.copy-link {
  flex: 0 0 auto;
  font-size: 11px;
}

.lead-detail .copy-link {
  color: #56565f;
  text-decoration-color: #a9a9b0;
}

.partner-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.partner-contact {
  min-height: 32px;
  border-bottom: 1px solid #e6e6ea;
  font-size: 12px;
}

.muted-line {
  color: #74747d;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1260px) {
  .detail-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }
}

@media (max-width: 980px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .radius-content {
    grid-template-columns: 1fr;
  }

  .radius-map {
    width: min(400px, 100%);
  }

  .lead-workspace {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .detail-split,
  .partner-contacts {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-navigation {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 18px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  main {
    padding: 16px 14px 30px;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .filter-search {
    grid-column: 1 / -1;
  }

  .radius-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .radius-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .city-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lead-workspace {
    display: block;
    height: auto;
    min-height: 0;
  }

  .lead-browser {
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #dedee3;
  }

  .lead-list {
    height: auto;
    max-height: 480px;
  }

  .lead-detail {
    overflow: visible;
  }

  .drawer-content.lead-detail {
    overflow-y: auto;
  }

  .detail-header,
  .detail-section,
  .action-row {
    padding-left: 20px;
    padding-right: 20px;
  }

  .detail-title h2 {
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  .login-screen {
    padding: 14px;
  }

  .login-panel {
    padding: 24px;
  }

  .login-copy h1 {
    font-size: 25px;
  }

  .metrics-grid,
  .filter-panel,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .filter-search {
    grid-column: auto;
  }

  .metric-card {
    min-height: 108px;
  }

  .view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .view-actions {
    width: 100%;
  }

  .view-switch {
    flex: 1;
  }

  .table-view-heading,
  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-drawer {
    width: 100vw;
    border-left: 0;
    border-radius: 0;
  }

  .drawer-content .detail-grid {
    grid-template-columns: 1fr;
  }

  .radius-panel {
    padding: 16px;
  }

  .radius-map {
    width: min(300px, 100%);
  }

  .radius-legend,
  .city-grid {
    grid-template-columns: 1fr;
  }

  .radius-ring > span {
    top: 9px;
    font-size: 9px;
  }

  .radius-ring > strong {
    top: 24px;
    font-size: 11px;
  }

  .ring-center > span,
  .ring-center > strong {
    position: static;
    font-size: 10px;
  }

  .ring-center > strong {
    font-size: 17px;
  }

  .detail-header {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .partner-row {
    grid-template-columns: 1fr;
  }

  .partner-number {
    display: none;
  }

  .partner-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-line,
  .partner-contact {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 7px 0;
  }
}
