/* Leads — estilos específicos. Depende de v2-palato.css. */

.leads-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.leads-runtime-strip {
  align-items: center;
  background: linear-gradient(135deg, rgba(92, 29, 74, .04), #fff 60%);
  border: 1px solid var(--pl-border);
  border-left: 3px solid var(--pl-wine);
  border-radius: var(--pl-radius-lg);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-bottom: 12px;
  padding: 10px 14px;
}
.leads-runtime-strip[hidden] { display: none; }
.leads-runtime-strip__cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.leads-runtime-strip__cell span {
  color: var(--pl-text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.leads-runtime-strip__cell strong {
  color: var(--pl-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}
.leads-runtime-strip__cell.is-ok strong { color: var(--pl-success); }
.leads-runtime-strip__cell.is-warn strong { color: #b87400; }
.leads-runtime-strip__cell.is-err strong { color: var(--pl-danger); }
.leads-runtime-strip__cta {
  align-items: center;
  background: var(--pl-wine);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  letter-spacing: .04em;
  padding: 6px 12px;
  text-decoration: none;
  text-transform: uppercase;
}
.leads-runtime-strip__cta .material-symbols-outlined { font-size: 14px; }
@media (max-width: 1100px) {
  .leads-runtime-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leads-runtime-strip__cta { grid-column: 1 / -1; justify-self: start; }
}
.leads-header h1 {
  margin-top: 6px;
  font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.035em; line-height: 1.1;
  color: var(--pl-text);
}
.leads-lede {
  margin-top: 4px; color: var(--pl-text-muted);
  font-size: 13px; max-width: 640px;
}
.leads-header-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.leads-env-tabs {
  display: flex; gap: 2px;
  background: var(--pl-surface-soft); border: 1px solid var(--pl-border);
  border-radius: 10px; padding: 3px;
  margin-bottom: 12px; width: fit-content; max-width: 100%;
}
.leads-env-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 7px;
  border: 0; background: transparent;
  color: var(--pl-text-muted); font-family: inherit;
  font-size: 12px; font-weight: 700; cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.leads-env-tab .material-symbols-outlined { font-size: 16px; }
.leads-env-tab:hover { color: var(--pl-wine); }
.leads-env-tab.is-active { background: var(--pl-wine); color: #fff; box-shadow: var(--pl-shadow-sm); }
.leads-env-tab__count {
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .06);
}
.leads-env-tab.is-active .leads-env-tab__count { background: rgba(255, 255, 255, .25); color: #fff; }

.leads-kpis {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.retail-gap-panel {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius-lg);
  box-shadow: var(--pl-shadow-sm);
  margin: -2px 0 12px;
  padding: 10px 12px;
}
.retail-gap-panel:empty { display: none; }
.retail-gap-panel__head {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(0, .6fr));
  gap: 8px;
  margin-bottom: 8px;
}
.retail-gap-panel__head div {
  background: var(--pl-surface-soft);
  border: 1px solid var(--pl-border);
  border-radius: 8px;
  padding: 7px 9px;
}
.retail-gap-panel span {
  color: var(--pl-text-faint);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.retail-gap-panel strong {
  color: var(--pl-text);
  display: block;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  margin-top: 2px;
  text-transform: none;
}
.retail-gap-panel__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.retail-gap-panel__items span {
  background: #fff;
  border: 1px dashed var(--pl-border);
  border-radius: 8px;
  color: var(--pl-text-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  min-height: 44px;
  padding: 7px 9px;
  text-transform: none;
}
.retail-gap-panel__items strong {
  color: var(--pl-wine);
  font-size: 14px;
  margin: 0 0 2px;
}

.leads-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 4px 0 12px; flex-wrap: wrap;
}
.leads-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.leads-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  color: var(--pl-text-muted);
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  padding: 5px 11px; border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.leads-chip:hover { color: var(--pl-wine); border-color: var(--pl-wine); }
.leads-chip.is-active { background: var(--pl-wine); color: #fff; border-color: var(--pl-wine); }
.leads-chip__count {
  font-size: 11px; font-weight: 800;
  background: rgba(0, 0, 0, .06);
  padding: 2px 7px; border-radius: 999px;
}
.leads-chip.is-active .leads-chip__count { background: rgba(255, 255, 255, .25); color: #fff; }

.leads-toolbar-meta { display: flex; align-items: center; gap: 12px; }
.leads-result-count { font-size: 11px; color: var(--pl-text-faint); font-weight: 700; }
.leads-sort {
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--pl-text-muted);
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.leads-sort:focus { outline: none; border-color: var(--pl-wine); box-shadow: 0 0 0 3px rgba(92, 29, 74, .08); }

.leads-table-card { padding: 0; overflow: hidden; }
.leads-table-wrap { overflow-x: auto; }
.leads-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.leads-table thead th {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pl-text-faint); text-align: left;
  padding: 9px 12px; background: var(--pl-surface-soft);
  border-bottom: 1px solid var(--pl-border);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
.leads-table thead .leads-th-num { text-align: right; }
.leads-table thead .leads-th-action { text-align: right; width: 60px; }
.leads-table tbody td {
  padding: 9px 12px; border-bottom: 1px solid var(--pl-border);
  vertical-align: middle; color: var(--pl-text-muted);
}
.leads-table tbody tr:last-child td { border-bottom: 0; }
.leads-table tbody tr {
  transition: background .15s ease; cursor: pointer;
}
.leads-table tbody tr:hover { background: var(--pl-surface-soft); }
.leads-table tbody tr.is-hot { background: rgba(92, 29, 74, .025); }
.leads-table tbody tr.is-hot:hover { background: var(--pl-wine-soft); }

.leads-cell-lead { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.leads-cell-lead__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pl-wine-soft), #fff);
  border: 1px solid rgba(92, 29, 74, .12);
  color: var(--pl-wine);
  font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden; position: relative;
}
.leads-cell-lead__avatar span { position: relative; z-index: 1; }
.leads-cell-lead__avatar img {
  display: block;
  inset: 0;
  height: 100%;
  position: absolute;
  width: 100%;
  z-index: 2;
}
.leads-cell-lead__avatar--photo { background: #eee; border-color: rgba(22, 30, 46, .10); }
.leads-cell-lead__avatar--photo img { object-fit: cover; padding: 0; }
.leads-cell-lead__avatar--logo { background: #fff; border: 1px solid var(--pl-border); }
.leads-cell-lead__avatar--logo span { color: transparent; }
.leads-cell-lead__avatar--logo img {
  background: #fff; object-fit: contain; padding: 4px;
}
.leads-cell-lead__avatar--logo.is-fallback { background: var(--pl-wine-soft); border: 0; }
.leads-cell-lead__avatar--photo.is-fallback,
.leads-cell-lead__avatar--logo.is-fallback { background: var(--pl-wine-soft); border-color: transparent; }
.leads-cell-lead__avatar--photo.is-fallback span,
.leads-cell-lead__avatar--logo.is-fallback span { color: var(--pl-wine); }
.leads-cell-lead__avatar--importadora {
  background: linear-gradient(135deg, rgba(11, 28, 48, .08), #fff);
  border-color: rgba(11, 28, 48, .16);
  color: #0b1c30;
}
.leads-cell-lead__avatar--horeca {
  background: linear-gradient(135deg, rgba(184, 116, 0, .11), #fff);
  border-color: rgba(184, 116, 0, .18);
  color: #8a5700;
}
.leads-cell-lead__name {
  font-weight: 700; color: var(--pl-text); font-size: 13px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.leads-cell-lead__id { font-size: 10px; color: var(--pl-text-faint); font-weight: 600; margin-top: 2px; }

.leads-quality {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.leads-quality--hot { background: var(--pl-wine-soft); color: var(--pl-wine); }
.leads-quality--warm { background: var(--pl-warning-bg); color: var(--pl-warning); }
.leads-quality--cold { background: var(--pl-surface-soft); color: var(--pl-text-subtle); }

.leads-segment, .leads-location {
  font-size: 12px; color: var(--pl-text-muted);
  white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.leads-location__city { font-weight: 700; color: var(--pl-text); }

.leads-channel {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--pl-text-muted);
}
.leads-channel--ok { color: var(--pl-success); }
.leads-channel--missing { color: var(--pl-danger); }
.leads-channel .material-symbols-outlined { font-size: 16px; }

.leads-stage {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--pl-surface-soft); color: var(--pl-text-muted);
  border: 1px solid var(--pl-border);
  white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.leads-stage--won { background: var(--pl-success-bg); color: var(--pl-success); border-color: #cfe6d2; }
.leads-stage--visit { background: var(--pl-wine-soft); color: var(--pl-wine); border-color: rgba(92,29,74,.12); }
.leads-stage--blocked { background: var(--pl-danger-bg); color: var(--pl-danger); border-color: #f4cccd; }
.leads-stage--review { background: var(--pl-warning-bg); color: var(--pl-warning); border-color: #f3dfb6; }

.leads-score { font-weight: 800; font-size: 14px; color: var(--pl-text); text-align: right; font-variant-numeric: tabular-nums; }
.leads-score--high { color: var(--pl-wine); }
.leads-score--mid { color: var(--pl-text-muted); }
.leads-score--low { color: var(--pl-text-faint); }

.leads-time { font-size: 11px; color: var(--pl-text-subtle); white-space: nowrap; }
.leads-row-action { text-align: right; white-space: nowrap; }
.leads-row-arrow {
  color: var(--pl-text-faint);
  display: inline-flex; width: 28px; height: 28px;
  align-items: center; justify-content: center; border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.leads-table tbody tr:hover .leads-row-arrow { background: var(--pl-wine); color: #fff; }

.leads-table-footer {
  padding: 9px 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--pl-surface-soft); border-top: 1px solid var(--pl-border);
  font-size: 10px; font-weight: 700; color: var(--pl-text-faint);
}
.leads-cards-footer {
  border: 1px solid var(--pl-border);
  border-radius: 0 0 var(--pl-radius-lg) var(--pl-radius-lg);
  margin-top: -1px;
}
.leads-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lead-card {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius-lg);
  box-shadow: var(--pl-shadow-sm);
  cursor: pointer;
  min-width: 0;
  min-height: 226px;
  padding: 13px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lead-card:hover {
  border-color: rgba(92, 29, 74, .28);
  box-shadow: var(--pl-shadow-md);
  transform: translateY(-1px);
}
.lead-card.is-hot { background: linear-gradient(135deg, #fff 0%, rgba(92, 29, 74, .055) 100%); border-color: rgba(92, 29, 74, .22); }
.lead-card.is-hot::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--pl-wine); border-radius: var(--pl-radius-lg) 0 0 var(--pl-radius-lg);
}
.lead-card { position: relative; }
.lead-card[data-channel="importadora"] { background: linear-gradient(180deg, #fff, rgba(11, 28, 48, .025)); }
.lead-card[data-channel="importadora"].is-hot { background: linear-gradient(135deg, #fff 0%, rgba(92, 29, 74, .055) 100%); }
.lead-card[data-channel="horeca"] { background: linear-gradient(180deg, #fff, rgba(184, 116, 0, .020)); }
.lead-card[data-channel="horeca"].is-hot { background: linear-gradient(135deg, #fff 0%, rgba(92, 29, 74, .055) 100%); }
.lead-card__head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.lead-card__head .leads-cell-lead__avatar {
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(22, 30, 46, .08);
  width: 42px;
  height: 42px;
}
.lead-card__head .leads-cell-lead__avatar--logo img { padding: 6px; }
.lead-card__title { min-width: 0; }
.lead-card__title h3 {
  color: var(--pl-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-card__title span {
  color: var(--pl-text-faint);
  display: block;
  font-size: 11px;
  font-weight: 650;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 11px;
}
.lead-card__metrics div {
  background: var(--pl-surface-soft);
  border: 1px solid var(--pl-border);
  border-radius: 8px;
  min-width: 0;
  padding: 7px 8px;
}
.lead-card__metrics span {
  color: var(--pl-text-faint);
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lead-card__metrics strong {
  color: var(--pl-text);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.retail-priority {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
}
.retail-priority.is-a { background: var(--pl-wine-soft); color: var(--pl-wine); }
.retail-priority.is-b { background: var(--pl-warning-bg); color: var(--pl-warning); }
.retail-priority.is-c { background: var(--pl-surface-soft); color: var(--pl-text-muted); border: 1px solid var(--pl-border); }
.retail-priority.is-review { background: var(--pl-danger-bg); color: var(--pl-danger); border: 1px solid #f4cccd; }
.retail-priority.is-out { background: var(--pl-surface-soft); color: var(--pl-text-faint); border: 1px solid var(--pl-border); }
.lead-card__channel {
  align-items: center;
  background: var(--pl-surface-soft);
  border: 1px solid var(--pl-border);
  border-radius: 999px;
  color: var(--pl-text-muted);
  display: inline-flex;
  font-size: 9px;
  font-weight: 900;
  gap: 4px;
  letter-spacing: .08em;
  padding: 2px 7px;
  text-transform: uppercase;
}
.lead-card__channel--importadora { background: rgba(11, 28, 48, .06); color: #0b1c30; border-color: #cdd6dc; }
.lead-card__channel--horeca { background: rgba(184, 116, 0, .08); color: #92400e; border-color: #f3dfb6; }
.lead-card__channel--varejo { background: var(--pl-wine-soft); color: var(--pl-wine); border-color: rgba(92,29,74,.16); }
.lead-card__channel .material-symbols-outlined { font-size: 12px; }
.lead-card__head-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; }
.lead-card__metrics div[data-segment="commercial"] { border-left: 2px solid var(--pl-wine); }
.lead-card__metrics div[data-segment="horeca"] { border-left: 2px solid var(--pl-warning); }
.lead-card__metrics div[data-segment="varejo"] { border-left: 2px solid var(--pl-success); }
.lead-card__metrics div[data-segment="importadora"] { border-left: 2px solid #0b1c30; }
.lead-card__meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 92px;
}
.lead-card__meta span {
  align-items: center;
  color: var(--pl-text-muted);
  display: flex;
  font-size: 12px;
  font-weight: 650;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-card__meta .material-symbols-outlined { color: var(--pl-text-faint); flex: 0 0 auto; font-size: 16px; }
.lead-card__footer {
  align-items: center;
  border-top: 1px solid var(--pl-border);
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
}
.lead-card__footer > span {
  color: var(--pl-text-faint);
  font-size: 11px;
  font-weight: 700;
}
.lead-card__open {
  align-items: center;
  background: var(--pl-surface-soft);
  border: 1px solid var(--pl-border);
  border-radius: 7px;
  color: var(--pl-text-muted);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  pointer-events: none;
  width: 28px;
}
.lead-card:hover .lead-card__open { background: var(--pl-wine); border-color: var(--pl-wine); color: #fff; }

.leads-empty { text-align: center; padding: 64px 24px; color: var(--pl-text-subtle); }
.leads-empty .material-symbols-outlined { font-size: 40px; color: var(--pl-text-faint); margin-bottom: 12px; }
.leads-empty h3 { color: var(--pl-text-muted); margin-bottom: 6px; }

/* Drawer */
body.lead-drawer-open { overflow: hidden; }
body:not(.lead-drawer-open) .lead-drawer { display: none; }

.lead-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  height: 100vh; height: 100dvh;
  width: 540px; max-width: calc(100vw - 32px);
  background: var(--pl-surface); border-left: 1px solid var(--pl-border);
  box-shadow: var(--pl-shadow-xl); z-index: 100;
  transform: translateX(100%); transition: transform .25s ease;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lead-drawer.is-open { transform: translateX(0); }
.lead-drawer__inner { padding: 18px 20px 24px; }

.lead-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 28, 48, .35); backdrop-filter: blur(2px);
  z-index: 99; animation: lead-fade .2s ease;
}
@keyframes lead-fade { from { opacity: 0; } to { opacity: 1; } }

.lead-drawer__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--pl-border);
}
.lead-drawer__head h2 { margin-top: 6px; font-size: 19px; line-height: 1.2; }
.lead-drawer__head p { font-size: 12px; color: var(--pl-text-subtle); margin: 4px 0 0; }
.lead-drawer__close {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--pl-border); background: var(--pl-surface);
  color: var(--pl-text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: inherit;
}
.lead-drawer__close:hover { background: var(--pl-wine); color: #fff; border-color: var(--pl-wine); }

.lead-drawer__badges { display: flex; flex-wrap: wrap; gap: 6px; }

.lead-next-action {
  align-items: flex-start;
  background: linear-gradient(135deg, var(--pl-wine-soft), #fff 80%);
  border: 1px solid rgba(92, 29, 74, .18);
  border-left: 3px solid var(--pl-wine);
  border-radius: var(--pl-radius-lg);
  display: grid;
  gap: 4px;
  grid-template-columns: 22px minmax(0, 1fr);
  margin: 0 0 16px;
  padding: 12px 14px;
}
.lead-next-action .material-symbols-outlined { color: var(--pl-wine); font-size: 20px; grid-row: 1 / span 2; }
.lead-next-action span:first-of-type {
  color: var(--pl-wine);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lead-next-action strong { color: var(--pl-text); font-size: 14px; font-weight: 800; line-height: 1.35; }

.lead-section { margin-bottom: 18px; }
.lead-section__title {
  align-items: center;
  color: var(--pl-text);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: .1em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--pl-border);
  text-transform: uppercase;
}
.lead-section__title .material-symbols-outlined { color: var(--pl-wine); font-size: 16px; }
.lead-section--importer .lead-section__title { color: #0b1c30; }
.lead-section--importer .lead-section__title .material-symbols-outlined { color: #0b1c30; }
.lead-subsection { margin: 10px 0 6px; }
.lead-subsection__label {
  color: var(--pl-text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.lead-rows { display: flex; flex-direction: column; gap: 4px; }
.lead-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0; font-size: 13px;
  border-bottom: 1px solid var(--pl-border);
}
.lead-row:last-child { border-bottom: 0; }
.lead-row__label { color: var(--pl-text-faint); font-weight: 600; flex-shrink: 0; }
.lead-row__value {
  color: var(--pl-text); font-weight: 600;
  text-align: right; word-break: break-word; max-width: 65%;
}
.lead-row__value a { color: var(--pl-wine); text-decoration: none; }

.lead-form { display: flex; flex-direction: column; gap: 10px; }
.lead-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.lead-field label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pl-text-faint);
}
.lead-field input, .lead-field select, .lead-field textarea {
  font-family: inherit; font-size: 13px; color: var(--pl-text);
  background: var(--pl-surface-soft); border: 1px solid var(--pl-border);
  border-radius: 6px; padding: 7px 10px; width: 100%;
}
.lead-field textarea { resize: vertical; min-height: 56px; line-height: 1.5; }
.lead-field input:focus, .lead-field select:focus, .lead-field textarea:focus {
  outline: none; border-color: var(--pl-wine); background: #fff;
  box-shadow: 0 0 0 3px rgba(92, 29, 74, .08);
}

.lead-checks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: var(--pl-surface-soft); border: 1px solid var(--pl-border);
  border-radius: 8px; padding: 10px 12px;
}
.lead-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--pl-text-muted); cursor: pointer; }
.lead-check input { accent-color: var(--pl-wine); width: 16px; height: 16px; cursor: pointer; }

.lead-actions { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.lead-actions__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lead-actions .pl-btn { width: 100%; }
.lead-actions__primary { width: 100%; }

.leads-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--pl-text); color: #fff;
  padding: 10px 16px; border-radius: var(--pl-radius);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--pl-shadow-xl); z-index: 200;
  animation: leads-toast-in .25s ease;
}
.leads-toast.is-error { background: var(--pl-danger); }
.leads-toast.is-success { background: var(--pl-success); }
@keyframes leads-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 1100px) {
  .leads-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .leads-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-gap-panel__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .leads-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-gap-panel__head { grid-template-columns: 1fr; }
  .retail-gap-panel__items { grid-template-columns: 1fr; }
  .leads-env-tabs { width: 100%; }
  .leads-env-tab { flex: 1 1 0; justify-content: center; min-width: 0; padding: 6px 6px; }
  .leads-env-tab .material-symbols-outlined { display: none; }
  .leads-env-tab span:not(.leads-env-tab__count) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .leads-card-grid { grid-template-columns: 1fr; }
  .lead-card__head { grid-template-columns: 34px minmax(0, 1fr); }
  .lead-card__head-tags { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
  .lead-card__channel { max-width: 100%; }
  .lead-form-grid { grid-template-columns: 1fr; }
  .lead-checks { grid-template-columns: 1fr; }
  .lead-actions__row { grid-template-columns: 1fr; }
  .lead-drawer { width: 100vw; max-width: 100vw; }
  .leads-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .leads-chips { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; width: 100%; }
  .leads-chips::-webkit-scrollbar { height: 4px; }
  .leads-chip { white-space: nowrap; flex-shrink: 0; }
  .leads-toolbar-meta { max-width: 100%; width: 100%; }

  .leads-table-card { padding: 0; background: transparent; border: none; box-shadow: none; }
  .leads-table-wrap { overflow: visible; }
  .leads-table { display: block; width: 100%; }
  .leads-table thead { display: none; }
  .leads-table tbody { display: flex; flex-direction: column; gap: 8px; }
  .leads-table tbody tr {
    display: flex; flex-direction: column; gap: 6px;
    background: var(--pl-surface); border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius-lg); padding: 12px 14px;
  }
  .leads-table tbody td { display: block; border: 0; padding: 0; }
  .leads-table tbody td:nth-child(1) { display: flex; align-items: center; gap: 10px; }
  .leads-table tbody .leads-row-action { display: none; }
  .leads-table tbody td:nth-child(2),
  .leads-table tbody td:nth-child(3),
  .leads-table tbody td:nth-child(4),
  .leads-table tbody td:nth-child(5),
  .leads-table tbody td:nth-child(6),
  .leads-table tbody td:nth-child(7),
  .leads-table tbody td:nth-child(8) { display: inline-flex; margin-right: 8px; margin-top: 2px; }
}
