@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f1f4ef;
  --side: #e6ebe4;
  --surface: #fcfefb;
  --surface2: #ebf0e9;
  --line: #ccd6cd;
  --text: #18211b;
  --muted: #657068;
  --blue: #1f7a4d;
  --cyan: #27796d;
  --green: #338b5e;
  --yellow: #9a6a18;
  --red: #b43e3e;
  font-family: "Golos Text", Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

body.project-gate-pending .app-shell {
  visibility: hidden;
}

body.project-gate-active {
  min-height: 100vh;
  background: var(--bg);
}

body.project-gate-active .app-shell {
  display: none;
}

.project-entry {
  min-height: 100vh;
  color: var(--text);
}

.project-entry > header,
.project-entry > main,
.project-entry > footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.project-entry > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.project-entry .brand {
  padding: 0;
}

.project-entry-account {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-entry-account > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.project-entry-account .secondary {
  min-height: 40px;
}

.project-entry > main {
  padding: clamp(64px, 9vh, 112px) 0 80px;
}

.project-entry-heading {
  max-width: 690px;
}

.project-entry-heading > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.project-entry-heading > div:first-child .eyebrow {
  margin: 0;
}

.project-entry-heading h1 {
  margin: 12px 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.06em;
}

.project-entry-heading > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.project-entry-grid,
.project-entry-empty {
  margin-top: 48px;
}

.project-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-tile,
.project-create-card {
  color: var(--text);
  text-align: left;
}

.project-tile {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 132px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .05);
}

.project-tile:focus-within,
.project-tile:hover {
  border-color: var(--blue);
  box-shadow: 0 22px 60px color-mix(in srgb, var(--blue) 12%, transparent);
  transform: translateY(-2px);
}

.project-tile > span:first-child {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  background: var(--blue);
  color: var(--buttonText, #fff);
  font-size: 14px;
  font-weight: 850;
}

.project-tile > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-tile small,
.project-tile em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.project-tile strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-team-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.project-team-summary .lucide {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.project-team-summary span + .lucide {
  margin-left: 8px;
}

.project-tile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-tile-actions .primary,
.project-tile-actions .secondary {
  min-height: 42px;
  padding-inline: 14px;
  gap: 8px;
}

.project-entry-empty {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(240px, 360px);
  gap: 18px;
  align-items: stretch;
}

.project-create-card {
  display: grid;
  justify-items: start;
  min-height: 220px;
  padding: 30px;
  border: 1px dashed color-mix(in srgb, var(--blue) 55%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--blue) 4%, var(--surface));
}

.project-create-card:hover {
  border-style: solid;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  transform: translateY(-2px);
}

.project-create-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--buttonText, #fff);
  font-size: 25px;
}

.project-create-card > span svg {
  width: 22px;
  height: 22px;
}

.lucide {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-item .lucide,
.workspace-mode-switch .lucide {
  width: 17px;
  height: 17px;
}

.project-create-card strong {
  align-self: end;
  font-size: 22px;
}

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

.project-entry-empty > aside {
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface2);
}

.project-entry-empty > aside strong {
  font-size: 16px;
}

.project-entry-empty > aside span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.project-entry > footer {
  display: flex;
  gap: 28px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 720px) {
  .project-entry > header,
  .project-entry > main,
  .project-entry > footer {
    width: min(100% - 28px, 1120px);
  }

  .project-entry > header {
    min-height: 84px;
  }

  .project-entry-account > span {
    display: none;
  }

  .project-entry > main {
    padding: 48px 0 54px;
  }

  .project-entry-empty {
    grid-template-columns: 1fr;
  }

  .project-entry-grid {
    grid-template-columns: 1fr;
  }

  .project-tile {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .project-tile > span:first-child {
    width: 46px;
    height: 46px;
  }

  .project-tile-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .project-entry > footer {
    flex-direction: column;
    gap: 8px;
  }
}

.sidebar {
  background: var(--side);
  border-color: #cfcdc5;
  padding: 24px 16px;
}

.brand {
  color: var(--text);
  padding-bottom: 28px;
}

.brand strong {
  font-size: 19px;
  letter-spacing: -.02em;
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: none;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 7px 18px rgba(31, 122, 77, .16);
}

.project-context {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: -12px 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 66%, transparent);
  color: var(--text);
  text-align: left;
}

.project-context:hover {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--line));
  background: var(--surface);
}

.project-context > span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 13%, var(--surface));
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.project-context > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.project-context small,
.project-context em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-context strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-context > b {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
}

.nav-item {
  min-height: 46px;
  border-radius: 7px;
  color: #66655f;
  font-size: 13px;
  font-weight: 500;
}

.nav-item b {
  background: #dddbd3;
  border-radius: 5px;
  color: #595852;
}

.nav-item:hover,
.nav-item.active {
  background: #fffefa;
  color: var(--text);
}

.nav-item i {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 4px;
  background: #dcebe1;
  color: #276b49;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
}

.premium-nav span {
  color: var(--blue);
}

.nav-item.active {
  box-shadow: inset 3px 0 var(--blue);
  font-weight: 600;
}

.sidebar-note {
  border-radius: 8px;
  background: rgba(255, 254, 250, .5);
}

.live-dot {
  background: var(--green);
  box-shadow: none;
}

main {
  width: min(1180px, calc(100% - 64px));
}

.topbar {
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 24px;
  letter-spacing: -.035em;
}

.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.safety {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 254, 250, .55);
  color: #4f675a;
  font-size: 12px;
  font-weight: 500;
}

.profile-button {
  margin-left: auto;
  min-height: 44px;
  display: grid;
  gap: 1px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.profile-button span {
  color: var(--muted);
  font-size: 9px;
}

.profile-button strong {
  font-size: 12px;
  font-weight: 600;
}

.profile-button + .safety {
  margin-left: 0;
}

.actor-switch {
  display: grid;
  gap: 2px;
  min-width: 145px;
  margin-left: auto;
}

.actor-switch > span {
  color: var(--muted);
  font-size: 9px;
}

.actor-switch select {
  min-height: 30px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.actor-switch > strong {
  overflow: hidden;
  max-width: 170px;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actor-switch + .profile-button {
  margin-left: 0;
}

.icon-button {
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}

.view.active {
  animation: editorial-appear .2s ease-out both;
}

@keyframes editorial-appear {
  from { opacity: 0; }
}

.hero {
  min-height: 0;
  padding: 50px 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: block;
}

.hero::before,
.hero-visual {
  display: none;
}

.kicker {
  color: var(--blue);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.hero h2 {
  max-width: 800px;
  margin: 14px 0 18px;
  color: var(--text);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.hero h2 em {
  color: var(--blue);
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.search-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-presets button {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #d6d3ca;
  border-radius: 99px;
  background: #f7f5ef;
  color: #68665f;
  font-size: 10px;
  cursor: pointer;
}

.search-presets button:hover {
  border-color: #a9a59b;
  color: var(--text);
}

.panel {
  margin-top: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.panel-heading h3,
.integration-card h3 {
  font-weight: 600;
  letter-spacing: -.02em;
}

.panel-heading p,
.integration-heading p,
.integration-copy,
.status-line p,
.note {
  font-size: 12px;
}

.number {
  padding: 0;
  background: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 12px;
}

.field,
legend {
  color: #55544f;
  font-size: 12px;
  font-weight: 600;
}

.field > span,
legend {
  text-transform: none;
  letter-spacing: 0;
}

input,
select,
textarea {
  min-height: 46px;
  border: 1px solid #ceccc4;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding-inline: 13px;
}

input::placeholder,
textarea::placeholder {
  color: #9b9991;
}

input:focus,
textarea:focus {
  border-color: #4c8064;
  box-shadow: 0 0 0 3px rgba(31, 122, 77, .12);
}

.smart-card,
.source-card,
.russia-info,
.known-sheet,
.setting-toggle {
  border-color: var(--line);
  border-radius: 8px;
  background: #f8f7f2;
}

.smart-card {
  border-left: 3px solid var(--blue);
}

.smart-icon,
.integration-logo.auto {
  border-radius: 7px;
  background: #ece5dc;
  color: var(--blue);
}

.smart-card small,
.source-card small,
.russia-info span,
.setting-toggle small,
.integration-heading p,
.integration-copy {
  font-size: 11px;
}

.smart-card i,
.setting-toggle i,
.toggle span {
  background: #d2d0c8;
}

.smart-card:has(input:checked) i,
.setting-toggle:has(input:checked) i,
.toggle:has(input:checked) span {
  background: var(--text);
}

.smart-card:has(input:checked) i::after,
.setting-toggle:has(input:checked) i::after,
.toggle:has(input:checked) span::after {
  background: #fff;
}

.source-card:has(input:checked) {
  border-color: #9a968b;
  background: #fff;
}

.source-card i {
  border-radius: 4px;
}

.source-card:has(input:checked) i {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.source-mark,
.integration-logo {
  border-radius: 7px;
}

.option-row {
  grid-template-columns: repeat(3, 1fr);
}

.source-mark.osm {
  background: #dcebd7;
  color: #356530;
  font-size: 10px;
}

.source-mark.google-places {
  background: #e4edf9;
  color: #3165a6;
}

.source-mark.fsq {
  background: #e7e4f6;
  color: #5746a1;
}

.segmented {
  padding: 3px;
  border-color: var(--line);
  border-radius: 8px;
  background: #eae8e1;
}

.segmented span {
  border-radius: 5px;
  color: #65645e;
  font-size: 12px;
}

.segmented label:has(input:checked) span {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(32, 32, 30, .12);
}

summary {
  font-size: 13px;
  font-weight: 600;
}

.primary,
.secondary,
.text-button,
.danger-button {
  min-height: 42px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}

.primary {
  background: var(--text);
  color: #fff;
  box-shadow: none;
}

.primary:hover {
  background: #343431;
  filter: none;
  transform: none;
}

.secondary {
  border-color: #cbc9c1;
  background: #fff;
  color: var(--text);
}

.secondary:hover {
  border-color: #949189;
}

.danger-button {
  border-color: #dfb7ae;
  background: #fff8f6;
  color: var(--red);
}

.badge,
.chip,
.source-pill,
.table-toolbar > div span {
  border-radius: 5px;
}

.badge {
  background: #e0eee5;
  color: #286c49;
}

.badge.done {
  background: #e4eee8;
  color: var(--green);
}

.progress {
  background: #e3e1da;
}

.progress span {
  background: var(--blue);
}

.table-toolbar {
  justify-content: flex-start;
}

.table-toolbar input {
  font-size: 13px;
}

.table-wrap {
  border-radius: 8px;
  background: #fff;
}

th,
td {
  padding: 13px 14px;
  border-color: #e2e0d9;
}

th {
  background: #eeede7;
  color: #66655f;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}

td {
  color: var(--text);
  font-size: 12px;
}

tbody tr:hover {
  background: #faf9f5;
}

td a,
.company-button:hover strong,
.known-sheet a,
.integration-card .note a {
  color: #a74530;
}

.company strong {
  font-size: 13px;
  font-weight: 600;
}

.company small,
.block,
.contact small,
.history-card small {
  color: var(--muted);
  font-size: 10px;
}

.chip.high {
  background: #f7e4df;
  color: #a13e2a;
}

.chip.medium {
  background: #f2ead8;
  color: #80601e;
}

.chip.low,
.source-pill {
  background: #e9e8e2;
  color: #5f5e58;
}

.source-pill.gis {
  background: #e3eee7;
  color: #2f6d50;
}

.source-pill.merged {
  background: #e1ecee;
  color: #316673;
}

.source-pill.osm {
  background: #e3eee0;
  color: #3d7137;
}

.metrics article,
.history-card,
.empty-state {
  border-radius: 8px;
  background: var(--surface);
}

.metrics span {
  font-size: 11px;
}

.page-heading h2 {
  font-weight: 600;
}

.history-icon {
  border-radius: 7px;
  background: #eee9e1;
  color: var(--blue);
}

.crm-panel {
  padding: 18px;
}

.bulk-bar {
  border-color: #d4c3bb;
  border-radius: 7px;
  background: #f7f1ed;
}

.bulk-bar button img {
  width: 17px;
  height: 17px;
}

.crm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.crm-pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.crm-pagination > div {
  display: flex;
  gap: 8px;
}

.crm-pagination .secondary {
  min-height: 36px;
}

.crm-pagination .secondary:disabled {
  opacity: .42;
  cursor: default;
}

.table-date {
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
}

.row-menu {
  border-radius: 5px;
  color: #8a8880;
}

.row-menu:hover {
  background: #f8e8e4;
  color: var(--red);
}

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid #ceccc4;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.table-toolbar .custom-select-value,
.table-toolbar .custom-select-chevron {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.custom-select-trigger:hover {
  border-color: #a9a69d;
}

.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  border-color: #4c8064;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 122, 77, .12);
}

.custom-select-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

.custom-select.is-open .custom-select-chevron {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-menu {
  position: fixed;
  z-index: 5000;
  display: none;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #c9c6bd;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(35, 33, 29, .15);
}

.custom-select.is-open .custom-select-menu {
  display: grid;
}

.custom-select-option {
  position: relative;
  width: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: #f2f0e9;
  outline: 0;
}

.custom-select-option.is-selected {
  background: #f8ebe6;
  color: #9f3f2b;
  font-weight: 600;
}

.custom-select-option.is-selected::after {
  content: "✓";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
}

.custom-select.is-disabled {
  opacity: .55;
}

.custom-select-table {
  min-width: 118px;
}

.custom-select-table .custom-select-trigger {
  min-height: 34px;
  padding-inline: 9px;
  border-radius: 6px;
  font-size: 11px;
}

.crm-toolbar .custom-select {
  min-width: 130px;
}

.bulk-bar .custom-select {
  width: auto;
  min-width: 150px;
}

.bulk-bar .custom-select-trigger {
  min-height: 36px;
  font-size: 11px;
}

dialog {
  width: min(680px, calc(100% - 28px));
  padding: 0;
  border: 1px solid #c9c7bf;
  border-radius: 12px;
  background: #fffefa;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(34, 32, 28, .22);
}

dialog::backdrop {
  background: rgba(36, 35, 32, .58);
  backdrop-filter: none;
}

.lead-dialog-card {
  padding: 32px;
}

.dialog-close {
  right: 20px;
  top: 20px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f1eb;
  color: #67655f;
}

.dialog-close:hover {
  background: #e9e7df;
  color: var(--text);
}

.lead-dialog-card h2 {
  margin: 9px 48px 6px 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.045em;
}

.dialog-muted {
  color: var(--muted);
  font-size: 13px;
}

.dialog-contacts {
  margin: 20px 0 24px;
}

.dialog-contacts a,
.dialog-contacts span {
  padding: 8px 11px;
  border-color: #d4d1c8;
  border-radius: 6px;
  background: #fff;
  color: #4e4d48;
  font-size: 12px;
  font-weight: 500;
}

.dialog-contacts a:hover {
  border-color: #9e9a90;
  color: var(--blue);
}

.dialog-requisites {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface2);
}

.dialog-requisites > div:first-child,
.requisites-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dialog-requisites small,
.requisites-heading span,
.dialog-requisites p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.dialog-requisites > div:first-child small {
  max-width: 390px;
  text-align: right;
}

.requisites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.requisites-grid > span {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.requisites-grid small {
  text-transform: uppercase;
  letter-spacing: .06em;
}

.requisites-grid b {
  font-size: 11px;
}

.requisites-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.requisites-actions a,
.source-link {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.dialog-grid {
  gap: 16px 14px;
}

.dialog-note {
  margin-top: 18px;
}

.dialog-note textarea {
  min-height: 124px;
}

.dialog-actions {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e0ded7;
}

.dialog-actions .primary {
  min-width: 160px;
}

.dialog-actions > div {
  display: flex;
  gap: 9px;
}

.ai-locked-button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #cfc4dc;
  border-radius: 7px;
  background: #faf7fc;
  color: #5e476d;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ai-locked-button span {
  margin-left: 5px;
  padding: 3px 5px;
  border-radius: 4px;
  background: #ebe3f0;
  font-size: 8px;
  text-transform: uppercase;
}

.integration-logo-img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}

.integration-logo.profile {
  background: #eee7dd;
  color: #8b523b;
}

.integration-logo.sources {
  background: #e6ece7;
  color: #3c6d51;
}

.active-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.active-modules span {
  padding: 7px 9px;
  border: 1px solid #d8d4ca;
  border-radius: 5px;
  background: #f8f6f0;
  color: #64625c;
  font-size: 10px;
}

.source-catalog-card {
  grid-column: 1 / -1;
}

.source-catalog {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.source-catalog article {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
}

.source-catalog article > div {
  display: grid;
  gap: 3px;
}

.source-catalog article strong {
  font-size: 12px;
}

.source-catalog article small {
  color: var(--muted);
  font-size: 10px;
}

.source-state {
  padding: 5px 7px;
  border-radius: 5px;
  background: #efeee8;
  color: #77746c;
  font-size: 9px;
}

.source-state.active {
  background: #e4eee8;
  color: var(--green);
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
  gap: 20px;
  padding: 48px;
  border: 1px solid #d7d0dc;
  border-radius: 10px;
  background: #fff;
}

.premium-hero h2 {
  max-width: 760px;
  margin: 10px 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.premium-hero > div:first-child > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.premium-plan {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px;
  border-radius: 8px;
  background: #27202b;
  color: #fff;
}

.premium-plan span {
  width: max-content;
  padding: 5px 7px;
  border-radius: 4px;
  background: #e6d6eb;
  color: #553b60;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.premium-plan strong {
  font-size: 24px;
}

.premium-plan small {
  color: #cfc5d2;
  font-size: 10px;
  line-height: 1.5;
}

.ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.ai-feature-grid article {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ai-feature-grid article > span {
  color: #9d6caa;
  font-size: 10px;
  font-weight: 700;
}

.ai-feature-grid h3 {
  margin: 34px 0 8px;
  font-size: 17px;
}

.ai-feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.profile-dialog {
  width: min(900px, calc(100% - 28px));
}

.profile-dialog-card {
  position: relative;
  padding: 32px;
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.profile-dialog-card h2 {
  max-width: 600px;
  margin: 10px 48px 8px 0;
  font-size: 32px;
  letter-spacing: -.045em;
}

.onboarding-topline,
.onboarding-actions,
.onboarding-actions > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.onboarding-topline > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.onboarding-progress {
  height: 4px;
  margin: 14px 0 30px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface2);
}

.onboarding-progress i {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .22s ease;
}

.onboarding-step {
  min-height: 450px;
  animation: onboarding-enter .18s ease-out both;
}

@keyframes onboarding-enter {
  from { opacity: 0; transform: translateX(8px); }
}

.onboarding-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue);
  font: 700 11px ui-monospace, SFMono-Regular, monospace;
}

.onboarding-main-field {
  max-width: 520px;
  margin-top: 28px;
}

.onboarding-project-name {
  max-width: 540px;
  margin-top: 26px;
}

.onboarding-project-name input {
  min-height: 54px;
  font-size: 15px;
  font-weight: 650;
}

.onboarding-choice-fieldset {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.onboarding-choice-fieldset > legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.onboarding-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.onboarding-choice-fieldset .onboarding-choice-grid {
  margin-top: 0;
}

.onboarding-choice {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 92px;
  padding: 15px 44px 15px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.onboarding-choice:hover {
  border-color: color-mix(in srgb, var(--blue) 50%, var(--line));
  transform: translateY(-1px);
}

.onboarding-choice > input,
.onboarding-theme-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.onboarding-choice > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 11px;
  align-items: center;
}

.onboarding-choice b {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
}

.onboarding-choice strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.onboarding-choice small {
  min-width: 0;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.onboarding-choice > i {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
  font-style: normal;
}

.onboarding-choice:has(input:checked) {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--blue);
}

.onboarding-choice:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--blue) 22%, transparent);
  outline-offset: 2px;
}

.onboarding-choice:has(input:checked) > i {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--buttonText, #fff);
}

.onboarding-work-models {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.onboarding-explanation {
  display: grid;
  gap: 4px;
  max-width: 620px;
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--surface2);
}

.onboarding-explanation strong {
  font-size: 12px;
}

.onboarding-explanation span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.onboarding-sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.onboarding-sources > label {
  position: relative;
  min-height: 130px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.onboarding-sources input {
  position: absolute;
  opacity: 0;
}

.onboarding-sources label > span {
  display: grid;
  gap: 4px;
}

.onboarding-sources b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
}

.onboarding-sources strong {
  font-size: 12px;
}

.onboarding-sources small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.onboarding-sources label > i {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: transparent;
  font-style: normal;
}

.onboarding-sources label:has(input:checked) {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.onboarding-sources label:has(input:checked) > i {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.onboarding-theme {
  max-width: none;
  margin-top: 18px;
}

.onboarding-theme-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-theme-choices label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.onboarding-theme-choices label:has(input:checked) {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--blue);
}

.onboarding-theme-choices strong {
  font-size: 11px;
}

.onboarding-search-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.onboarding-ready {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid rgba(48, 115, 87, .25);
  border-radius: 10px;
  background: rgba(48, 115, 87, .06);
}

.onboarding-ready > i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-style: normal;
}

.onboarding-ready > div {
  display: grid;
  gap: 3px;
}

.onboarding-ready strong {
  font-size: 11px;
}

.onboarding-ready span {
  color: var(--muted);
  font-size: 10px;
}

.onboarding-advanced {
  margin-top: 16px;
}

.onboarding-advanced .team-editor {
  margin-top: 18px;
}

.onboarding-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.onboarding-actions .primary {
  min-width: 150px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.module-picker {
  margin-top: 24px;
}

.module-picker > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.module-picker label {
  position: relative;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #faf9f5;
  cursor: pointer;
}

.module-picker input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--blue);
}

.module-picker label > span {
  display: grid;
  gap: 3px;
}

.module-picker strong {
  font-size: 12px;
}

.module-picker small {
  color: var(--muted);
  font-size: 10px;
}

.premium-dialog-note {
  margin-top: 20px;
  padding: 13px;
  border: 1px solid #ddd2e1;
  border-radius: 7px;
  background: #faf7fc;
  color: #69566f;
  font-size: 11px;
  line-height: 1.5;
}

body.hide-module-website .module-website,
body.hide-module-pipeline .module-pipeline,
body.hide-module-team .module-team,
body.hide-module-history .module-history,
body.hide-module-google .module-google,
body.hide-module-exports .module-exports {
  display: none !important;
}

body.hide-module-website .metrics {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 980px) {
  main {
    width: min(100% - 32px, 900px);
  }

  .menu-open .sidebar {
    box-shadow: 14px 0 40px rgba(38, 36, 31, .18);
  }

  .premium-hero {
    grid-template-columns: 1fr;
  }

  .ai-feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 20px, 620px);
  }

  .hero {
    padding: 34px 24px;
    border-radius: 8px;
  }

  .hero h2 {
    font-size: 40px;
  }

  .panel {
    padding: 20px;
    border-radius: 8px;
  }

  .lead-dialog-card {
    padding: 24px 18px 20px;
  }

  .lead-dialog-card h2 {
    font-size: 29px;
  }

  .bulk-bar .custom-select {
    min-width: 145px;
  }

  .profile-button {
    display: none;
  }

  .profile-form-grid,
  .module-picker > div,
  .ai-feature-grid,
  .option-row {
    grid-template-columns: 1fr;
  }

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

  .dialog-requisites > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-requisites > div:first-child small {
    text-align: left;
  }

  .profile-dialog-card {
    padding: 24px 18px 20px;
  }

  .profile-dialog-card h2 {
    font-size: 27px;
  }

  .onboarding-step {
    min-height: 430px;
  }

  .onboarding-sources,
  .onboarding-search-grid,
  .onboarding-choice-grid,
  .onboarding-work-models {
    grid-template-columns: 1fr;
  }

  .onboarding-sources > label {
    min-height: 92px;
  }

  .onboarding-choice {
    min-height: 82px;
  }

  .onboarding-theme-choices {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .onboarding-actions > div,
  .onboarding-actions .primary,
  .onboarding-actions .secondary {
    width: 100%;
  }

  .premium-hero {
    padding: 30px 22px;
  }

  .premium-hero h2 {
    font-size: 39px;
  }

  .dialog-actions > div {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Product polish: clearer hierarchy, stronger states and denser source coverage. */
:root {
  --focus-ring: rgba(31, 122, 77, .2);
  --warm-panel: #f7faf4;
  --cool-panel: #f1f8f3;
}

.hero {
  position: relative;
  overflow: hidden;
  border-color: #c6d0c7;
  box-shadow: 0 16px 45px rgba(27, 67, 43, .07);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 14px;
  height: 100%;
  background: var(--blue);
}

.hero .kicker {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 5px;
  background: #deeee4;
  color: #276f4b;
  letter-spacing: .04em;
}

.hero h2 {
  max-width: 880px;
  text-wrap: balance;
}

.hero p {
  max-width: 760px;
  color: #5f5e58;
  font-size: 15px;
  line-height: 1.65;
}

.panel {
  border-color: #cfccc2;
  box-shadow: 0 8px 24px rgba(46, 42, 35, .035);
}

#view-search > .panel {
  background: var(--warm-panel);
}

.panel-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3,
.page-heading h2 {
  color: #181816;
}

.smart-card {
  border-color: #9cc7ab;
  background: #edf7f0;
}

.smart-card .smart-icon {
  background: var(--blue);
  color: #fff;
}

.source-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.source-grid .source-card {
  border-top-width: 3px;
  background: #fff;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.source-grid .source-card:hover {
  transform: translateY(-2px);
  border-color: #aaa69b;
}

.source-card:has(input[value="yandex"]) { border-top-color: #efc400; }
.source-card:has(input[value="2gis"]) { border-top-color: #3aa76d; }
.source-card:has(input[value="osm"]) { border-top-color: #74a85b; }
.source-card:has(input[value="tomtom"]) { border-top-color: #6655a5; }
.source-card:has(input[value="foursquare"]) { border-top-color: #d65270; }
.source-card:has(input[value="here"]) { border-top-color: #2d8d87; }
.source-card.enrichment-source { border-top-color: #7c6baa; }

.source-card:has(input:checked) {
  background: #f4faf6;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 77, .24);
}

.source-strategy-note {
  display: flex;
  gap: 6px;
  margin: 10px 0 0;
  padding: 11px 13px;
  border: 1px solid #d6d3ca;
  border-left: 4px solid #4f8872;
  border-radius: 7px;
  background: #f7faf7;
  color: #5b5b55;
  font-size: 12px;
  line-height: 1.45;
}

.source-strategy-note strong {
  flex: 0 0 auto;
  color: #245f4c;
}

.custom-select-menu {
  overscroll-behavior: contain;
}

dialog .custom-select {
  z-index: 2;
}

dialog .custom-select.is-open {
  z-index: 30;
}

dialog .custom-select-menu {
  box-shadow: 0 18px 45px rgba(35, 33, 29, .2);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.custom-select-trigger:focus-visible,
.source-card:focus-within {
  outline: 0;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 122, 77, .18);
}

.primary:hover {
  background: #17653f;
}

.template-library article {
  border-top: 4px solid #55a67a;
  background: #fbfdf9;
}

.template-library article:nth-child(3n + 2) {
  border-top-color: #4f8872;
}

.template-library article:nth-child(3n) {
  border-top-color: #557f8c;
}

.template-library article p {
  color: #53524d;
  font-size: 12px;
  line-height: 1.6;
}

.outreach-context {
  border-left: 4px solid var(--cyan);
  background: var(--cool-panel);
}

.source-catalog article {
  border-left: 3px solid transparent;
}

.source-catalog article:has(.source-state.active) {
  border-left-color: var(--green);
  background: var(--cool-panel);
}

html[data-theme="dark"] {
  --focus-ring: rgba(73, 201, 133, .25);
  --warm-panel: #182019;
  --cool-panel: #14241b;
}

html[data-theme="dark"] .hero {
  border-color: #34483c;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .hero .kicker {
  background: #183326;
  color: #82dca8;
}

html[data-theme="dark"] .hero p,
html[data-theme="dark"] .template-library article p {
  color: #c3c4bb;
}

html[data-theme="dark"] .panel-heading h3,
html[data-theme="dark"] .page-heading h2 {
  color: var(--text);
}

html[data-theme="dark"] .smart-card {
  border-color: #3e6f54;
  background: #172a20;
}

html[data-theme="dark"] .source-grid .source-card,
html[data-theme="dark"] .template-library article {
  background: #1f211d;
}

html[data-theme="dark"] .source-card:has(input:checked) {
  background: #172a20;
  box-shadow: inset 0 0 0 1px rgba(73, 201, 133, .24);
}

html[data-theme="dark"] .outreach-context {
  background: var(--cool-panel);
}

html[data-theme="dark"] .source-strategy-note {
  border-color: #41463d;
  border-left-color: #62a184;
  background: #1a211d;
  color: #c4c8bf;
}

html[data-theme="dark"] .source-strategy-note strong {
  color: #91c9ac;
}

@media (max-width: 1180px) {
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 34px 24px;
  }

  .hero::after {
    width: 7px;
  }

  .hero p {
    font-size: 14px;
  }

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

  .source-strategy-note {
    display: block;
  }
}

.search-template-bar {
  margin: -8px 0 20px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto auto;
  align-items: end;
  gap: 8px;
  background: var(--surface2);
}

.search-template-bar label {
  display: grid;
  gap: 6px;
}

.search-template-bar label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.search-template-bar select {
  min-height: 40px;
}

.history-card {
  grid-template-columns: 44px minmax(180px, 1fr) auto 50px auto;
}

.history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.history-actions .secondary,
.history-actions .text-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.history-actions a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue);
  text-decoration: none;
  font-size: 18px;
}

.beta-center {
  margin-top: 16px;
}

.beta-center-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.beta-center-grid > section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
}

.beta-center-grid > section > header {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface2);
}

.beta-center-grid header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.beta-center-grid header strong {
  font-size: 13px;
}

.beta-center-grid header small {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--line);
  text-align: center;
}

.beta-feed {
  max-height: 360px;
  overflow: auto;
}

.beta-feed > article {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.beta-feed > article:last-child {
  border-bottom: 0;
}

.beta-feed > article.is-resolved {
  opacity: .58;
}

.beta-feed article > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.beta-feed strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.beta-feed small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.beta-feed .secondary {
  min-height: 34px;
  padding: 0 10px;
  flex: 0 0 auto;
  font-size: 9px;
}

.beta-tour-dialog {
  width: min(680px, calc(100% - 24px));
}

.beta-tour-steps {
  display: grid;
  gap: 9px;
  margin: 22px 0 16px;
}

.beta-tour-steps article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--surface2);
}

.beta-tour-steps article > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.beta-tour-steps article > div {
  display: grid;
  gap: 4px;
}

.beta-tour-steps strong {
  font-size: 13px;
}

.beta-tour-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.beta-tour-choice {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.beta-tour-choice input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.beta-tour-choice span {
  display: grid;
  gap: 4px;
}

.beta-tour-choice strong {
  font-size: 11px;
}

.beta-tour-choice small {
  color: var(--muted);
  font-size: 9px;
}

.error-recovery {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5000;
  width: min(520px, calc(100% - 28px));
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .2);
}

.error-recovery > div {
  flex: 1;
  display: grid;
  gap: 3px;
}

.error-recovery strong {
  font-size: 12px;
}

.error-recovery span {
  color: var(--muted);
  font-size: 9px;
}

.error-recovery .secondary {
  flex: 0 0 auto;
}

.error-recovery .text-button {
  width: 28px;
  min-height: 28px;
  padding: 0;
}

@media (max-width: 820px) {
  .search-template-bar {
    grid-template-columns: 1fr 1fr;
  }

  .search-template-bar label {
    grid-column: 1 / -1;
  }

  .beta-center-grid {
    grid-template-columns: 1fr;
  }

  .history-card {
    grid-template-columns: 40px 1fr auto;
  }

  .history-card > .badge,
  .history-card > b {
    display: none;
  }

  .history-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .search-template-bar {
    grid-template-columns: 1fr;
  }

  .search-template-bar label {
    grid-column: auto;
  }

  .error-recovery {
    right: 14px;
    bottom: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .error-recovery .text-button {
    position: absolute;
    right: 8px;
    top: 8px;
  }
}

/* Feedback: a quiet, human support surface rather than another dashboard. */
.sidebar-feedback {
  width: 100%;
  margin-top: auto;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.sidebar-feedback:hover {
  border-color: var(--line);
  background: rgba(255, 254, 250, .48);
  color: var(--text);
}

.sidebar-feedback > span {
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.sidebar-feedback > div {
  display: grid;
  gap: 2px;
}

.sidebar-feedback strong {
  font-size: 12px;
}

.sidebar-feedback small {
  font-size: 10px;
  color: var(--muted);
}

.sidebar .sidebar-feedback + .sidebar-note {
  margin-top: 8px;
}

.feedback-dialog {
  width: min(760px, calc(100% - 24px));
}

.feedback-card {
  padding: 34px;
}

.feedback-card > #feedback-compose {
  display: grid;
  gap: 15px;
}

.feedback-card h2 {
  margin-top: 2px;
}

.feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feedback-rating {
  margin: 0;
}

.feedback-rating legend {
  margin-bottom: 8px;
}

.feedback-rating > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.feedback-rating label {
  cursor: pointer;
}

.feedback-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-rating label span {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feedback-rating input:checked + span {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.feedback-rating input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--blue) 22%, transparent);
  outline-offset: 2px;
}

.feedback-rating small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.feedback-consent {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--surface2);
  cursor: pointer;
}

.feedback-consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
}

.feedback-consent span {
  display: grid;
  gap: 4px;
}

.feedback-consent strong {
  font-size: 12px;
}

.feedback-consent small,
.feedback-privacy p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.feedback-privacy {
  margin: 0;
  padding: 11px 0;
}

.feedback-privacy summary {
  color: var(--muted);
  font-size: 11px;
}

.feedback-privacy p {
  margin: 10px 0 0;
}

.feedback-result {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

.feedback-result > * {
  margin: 0;
}

.feedback-success {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--green) 14%, var(--surface));
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
}

.feedback-result > p:not(.eyebrow),
.feedback-result > small {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}

.feedback-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

html[data-theme="dark"] .sidebar-feedback:hover {
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 620px) {
  .feedback-card {
    padding: 28px 20px 22px;
  }

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

  .feedback-result-actions,
  .feedback-result-actions > * {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.heading-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.heading-actions .secondary span {
  min-width: 16px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface2);
  font-size: 9px;
}

.reminder-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 18px;
  padding: 13px 15px;
  border: 1px solid #d3b26d;
  border-radius: 8px;
  background: #fff7e4;
}

.reminder-strip > div {
  display: grid;
  gap: 3px;
}

.reminder-strip strong {
  font-size: 12px;
}

.reminder-strip small {
  color: var(--muted);
  font-size: 10px;
}

.workspace-dialog {
  width: min(980px, calc(100% - 24px));
}

.import-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 118px;
  margin: 20px 0;
  border: 1px dashed #aaa69b;
  border-radius: 9px;
  background: var(--surface2);
  cursor: pointer;
  text-align: center;
}

.import-drop.dragging {
  border-color: var(--blue);
  background: #fff1ed;
}

.import-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.import-drop span,
.activity-section > div:first-child {
  display: grid;
  gap: 4px;
}

.import-drop small,
.activity-section small,
.duplicate-group-heading small {
  color: var(--muted);
  font-size: 10px;
}

.import-summary,
.duplicate-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.import-summary span {
  color: var(--muted);
  font-size: 11px;
}

.import-mapping {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.import-mapping select {
  min-height: 38px;
}

.import-sample {
  max-height: 280px;
  margin-top: 16px;
}

.import-sample table {
  min-width: 760px;
}

.duplicates-list {
  display: grid;
  gap: 12px;
  max-height: min(640px, 70vh);
  margin-top: 20px;
  overflow: auto;
}

.duplicates-list > article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface2);
}

.duplicate-options {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.duplicate-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.duplicate-options input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--blue);
}

.duplicate-options span {
  display: grid;
  gap: 3px;
}

.duplicate-options small {
  color: var(--muted);
  font-size: 9px;
}

.duplicate-options i {
  opacity: 0;
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.duplicate-options label:has(input:checked) {
  border-color: #8b887f;
}

.duplicate-options label:has(input:checked) i {
  opacity: 1;
}

.activity-section {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.activity-list {
  display: grid;
  gap: 1px;
  max-height: 170px;
  margin-top: 10px;
  overflow: auto;
  background: var(--line);
}

.activity-list > span {
  padding: 12px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 10px;
}

.activity-list article {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 9px;
  padding: 9px 10px;
  background: var(--surface);
}

.activity-list article i {
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.activity-list article div {
  display: grid;
  gap: 3px;
}

.activity-list article strong {
  font-size: 10px;
}

html[data-theme="dark"] .reminder-strip {
  border-color: #66583a;
  background: #2a271d;
}

@media (max-width: 720px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .heading-actions {
    justify-content: flex-start;
  }

  .import-mapping {
    grid-template-columns: 1fr;
  }

  .reminder-strip {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Settings are intentionally one calm reading column: no stretched empty cards. */
.settings-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
}

footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.theme-toggle {
  margin-left: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle + .profile-button {
  margin-left: 0;
}

.theme-toggle span {
  font-size: 17px;
}

.theme-toggle strong {
  font-size: 11px;
  font-weight: 600;
}

.option-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-grid .source-card {
  min-width: 0;
  min-height: 112px;
}

.source-grid .source-card > span:nth-child(3) {
  min-width: 0;
}

.source-grid .source-card strong,
.source-grid .source-card small {
  overflow-wrap: anywhere;
}

.source-grid .source-card i {
  flex: 0 0 21px;
}

.source-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.source-avatar b {
  color: var(--muted);
  font-size: 9px;
}

.source-avatar img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  background: #fff;
}

.source-card.is-unavailable {
  opacity: .58;
}

.source-card.is-unavailable::after {
  content: "Нужен ключ";
  position: absolute;
  right: 10px;
  top: 8px;
  color: var(--muted);
  font-size: 8px;
}

.source-card {
  position: relative;
}

.setting-toggle > input,
.smart-card > input,
.segmented input,
.source-card > input,
.toggle > input {
  width: 1px;
  height: 1px;
  min-height: 0;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-pill .source-avatar {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
}

.source-pill .source-avatar img {
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
}

.source-pill.tomtom {
  background: #e9e6f0;
  color: #594b73;
}

.source-pill.here {
  background: #e5f0ee;
  color: #245f59;
}

.heading-actions,
.heading-actions > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

#show-trash span {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface2);
  font-size: 9px;
}

.lead-views {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: -2px 0 14px;
  padding-bottom: 2px;
}

.lead-views button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.lead-views button:hover {
  color: var(--text);
}

.lead-views button.active {
  border-color: var(--line);
  background: var(--surface2);
  color: var(--text);
}

.page-size-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.page-size-label .custom-select {
  width: 82px;
  min-width: 82px;
}

.page-size-label .custom-select-trigger {
  min-height: 36px;
}

#select-all-filtered {
  min-height: 36px;
}

.team-editor {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface2);
}

.team-editor p {
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 11px;
}

.team-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.team-members-list > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
}

.team-members-list > .team-member-row {
  padding-left: 10px;
}

.team-member-row select {
  min-height: 26px;
  padding: 3px 26px 3px 8px;
  border-color: var(--line);
  background: var(--surface2);
  font-size: 10px;
}

.team-members-list button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.team-add-row,
#tomtom-settings-form,
#foursquare-settings-form,
#dadata-settings-form {
  display: flex;
  gap: 8px;
}

.team-add-row input {
  min-height: 40px;
}

.source-api-row > div {
  padding: 8px 0;
}

#tomtom-settings-form,
#foursquare-settings-form,
#dadata-settings-form {
  margin-top: 8px;
}

#tomtom-settings-form input,
#foursquare-settings-form input,
#dadata-settings-form input {
  min-height: 36px;
  max-width: 320px;
}

#tomtom-settings-form button,
#foursquare-settings-form button,
#dadata-settings-form button {
  min-height: 36px;
}

.trash-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.trash-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
}

.trash-list article > div {
  display: grid;
  gap: 3px;
}

.trash-list small {
  color: var(--muted);
  font-size: 10px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1511;
  --side: #0a100c;
  --surface: #151e18;
  --surface2: #1b2820;
  --line: #304239;
  --text: #edf4ef;
  --muted: #99a89e;
  --blue: #49c985;
  --cyan: #5bb7a6;
  --green: #72d39d;
  --yellow: #d8a952;
  --red: #e06e6e;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .sidebar {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .sidebar {
  background: var(--side);
  border-color: var(--line);
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metrics article,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .premium-hero,
html[data-theme="dark"] .ai-feature-grid article,
html[data-theme="dark"] .source-catalog article,
html[data-theme="dark"] .trash-list article,
html[data-theme="dark"] dialog {
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .custom-select-trigger,
html[data-theme="dark"] .custom-select-menu,
html[data-theme="dark"] .known-sheet,
html[data-theme="dark"] .table-date,
html[data-theme="dark"] .dialog-contacts a,
html[data-theme="dark"] .dialog-contacts span,
html[data-theme="dark"] .source-avatar,
html[data-theme="dark"] .team-members-list > span {
  border-color: var(--line);
  background: #181a17;
  color: var(--text);
}

html[data-theme="dark"] .source-avatar img {
  background: #fff;
  border-radius: 3px;
}

html[data-theme="dark"] .smart-card,
html[data-theme="dark"] .source-card,
html[data-theme="dark"] .russia-info,
html[data-theme="dark"] .setting-toggle,
html[data-theme="dark"] .module-picker label,
html[data-theme="dark"] .team-editor,
html[data-theme="dark"] .bulk-bar,
html[data-theme="dark"] .active-modules span,
html[data-theme="dark"] .lead-views button.active,
html[data-theme="dark"] .sidebar-note {
  border-color: var(--line);
  background: var(--surface2);
  color: var(--text);
}

html[data-theme="dark"] .source-card:has(input:checked) {
  border-color: #55b77f;
  background: #172a20;
}

html[data-theme="dark"] .custom-select-option:hover,
html[data-theme="dark"] .custom-select-option:focus-visible {
  background: #2a2d27;
}

html[data-theme="dark"] .custom-select-option.is-selected {
  background: #3a2822;
  color: #ff9a82;
}

html[data-theme="dark"] table thead,
html[data-theme="dark"] th {
  background: #242720;
  color: #b8b9b1;
}

html[data-theme="dark"] td {
  border-color: var(--line);
  background: var(--surface);
}

html[data-theme="dark"] tr:hover td {
  background: #21241f;
}

html[data-theme="dark"] .dialog-close {
  border-color: var(--line);
  background: var(--surface2);
  color: var(--muted);
}

html[data-theme="dark"] dialog::backdrop {
  background: rgba(3, 4, 3, .76);
}

html[data-theme="dark"] .premium-plan {
  background: #0e100d;
}

.quick-actions,
.site-audit {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface2);
}

.quick-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-audit {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.site-audit > div:first-child {
  display: grid;
  gap: 4px;
}

.site-audit small,
.workspace-list span,
.workspace-list small {
  color: var(--muted);
  font-size: 13px;
}

#site-audit-result {
  grid-column: 1 / -1;
}

.audit-score {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audit-score > strong {
  font-size: 32px;
  line-height: 1;
}

.audit-score > strong small {
  font-size: 13px;
}

.audit-score > span {
  display: grid;
  gap: 3px;
  font-weight: 700;
}

.audit-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.audit-columns > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.audit-columns span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.audit-error {
  margin: 8px 0 0;
  color: var(--danger);
}

.compact-dialog-card {
  width: min(680px, calc(100vw - 32px));
}

.workspace-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.workspace-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.workspace-list article > div {
  display: grid;
  gap: 4px;
}

.workspace-list article > div:last-child {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
}

.page-subtitle {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 16px;
  margin-top: 16px;
}

.today-layout .panel {
  margin: 0;
  min-width: 0;
}

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

.today-list {
  display: grid;
  gap: 8px;
}

.today-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.today-list article:last-child {
  border-bottom: 0;
}

.today-list article > div {
  display: grid;
  gap: 4px;
}

.today-list article > div:last-child {
  display: flex;
  align-items: center;
  justify-items: end;
}

.today-list article strong {
  font-size: 15px;
}

.today-list article span {
  color: var(--muted);
  font-size: 13px;
}

.today-due {
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface2);
}

.today-due.is-overdue {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  font-weight: 700;
}

.team-performance {
  display: grid;
  gap: 10px;
}

.team-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.team-local-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--cyan) 6%, var(--surface));
}

.team-local-note strong {
  white-space: nowrap;
}

.team-local-note span {
  color: var(--muted);
  font-size: 11px;
}

.team-overview > article {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.team-overview header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-overview header > div {
  display: grid;
  gap: 2px;
}

.team-overview header small {
  color: var(--muted);
}

.team-overview header em {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.team-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-weight: 800;
}

.team-overview dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
}

.team-overview dl div {
  display: grid;
  gap: 2px;
}

.team-overview dt {
  color: var(--muted);
  font-size: 9px;
}

.team-overview dd {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.team-workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr);
  gap: 16px;
}

.team-workspace-grid .panel {
  margin: 0;
}

.team-claims,
.team-activity {
  display: grid;
  gap: 8px;
}

.team-claims article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface2);
}

.team-claims article > div,
.team-activity article > div {
  display: grid;
  gap: 3px;
}

.team-claims span,
.team-activity span,
.team-activity time {
  color: var(--muted);
  font-size: 11px;
}

.team-activity article {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.team-activity article i {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.lead-claim-box {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(230px, auto);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  background: var(--surface2);
}

.lead-claim-box > div:first-child {
  display: grid;
  gap: 3px;
}

.lead-claim-box small {
  color: var(--muted);
}

.lead-transfer {
  display: flex;
  gap: 7px;
}

.claim-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 7px;
  color: var(--cyan);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.team-performance article {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.team-performance article > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.team-performance article span {
  color: var(--muted);
  font-size: 12px;
}

.team-performance dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
}

.team-performance dl div {
  display: grid;
  gap: 3px;
}

.team-performance dt {
  color: var(--muted);
  font-size: 11px;
}

.team-performance dd {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.funnel-list {
  display: grid;
  gap: 11px;
}

.funnel-list > div {
  display: grid;
  grid-template-columns: 120px minmax(60px, 1fr) 36px;
  align-items: center;
  gap: 10px;
}

.funnel-list span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-list i {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface2);
}

.funnel-list i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.funnel-list > div > strong {
  text-align: right;
}

.batch-progress {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.batch-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.batch-progress .progress {
  height: 5px;
}

.outreach-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 16px;
}

.outreach-layout .panel {
  min-width: 0;
  margin: 0;
}

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

.outreach-context {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.outreach-context strong {
  color: var(--text);
}

.outreach-compose textarea {
  min-height: 230px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.outreach-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.outreach-actions .note {
  margin-left: auto;
}

.contact-log {
  display: grid;
  gap: 0;
}

.contact-log article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.contact-log article > div {
  display: grid;
  gap: 4px;
}

.contact-log article span,
.contact-log time {
  color: var(--muted);
  font-size: 12px;
}

.template-panel {
  margin-top: 16px;
}

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

.template-library article {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.template-library article > div:first-child {
  display: grid;
  gap: 4px;
}

.template-library article > div:first-child > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.template-library article small {
  color: var(--muted);
}

.template-library article p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.template-library article > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.template-default {
  color: var(--muted);
  font-size: 11px;
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.template-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.analytics-period {
  width: 160px;
}

.analytics-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.analytics-grid .panel {
  min-width: 0;
  margin: 0;
}

.analytics-list {
  display: grid;
  gap: 12px;
}

.analytics-list article {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(60px, 1fr) 34px;
  align-items: center;
  gap: 12px;
}

.analytics-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.analytics-list article strong,
.analytics-list article span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-list article span {
  color: var(--muted);
  font-size: 11px;
}

.analytics-list article i {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface2);
}

.analytics-list article i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.analytics-list article em {
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.analytics-funnel-panel {
  grid-column: 1 / -1;
}

.analytics-funnel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.analytics-funnel article {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.analytics-funnel article > div {
  display: grid;
  gap: 3px;
}

.analytics-funnel span,
.analytics-funnel em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.analytics-funnel i {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
}

.analytics-funnel i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.outreach-queue-panel {
  margin-top: 16px;
}

.outreach-queue {
  display: grid;
  gap: 8px;
}

.outreach-queue > article,
.today-list > article[data-queue-key] {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.outreach-queue > article.has-warning,
.today-list > article[data-queue-key].has-warning {
  border-left: 3px solid var(--yellow);
}

.queue-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.queue-main > span {
  color: var(--muted);
  font-size: 12px;
}

.queue-main .queue-warning {
  color: var(--yellow);
  font-weight: 600;
}

.queue-person {
  color: var(--green) !important;
  font-weight: 600;
}

.queue-meta,
.queue-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-meta > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.queue-owner-filter {
  min-width: 180px;
}

.people-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.people-list > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface2);
}

.people-list article > div:first-child {
  display: grid;
  gap: 3px;
}

.people-list article > div:last-child {
  display: flex;
  gap: 8px;
}

.people-list strong em {
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--green) 15%, transparent);
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.people-list span,
.people-list small {
  color: var(--muted);
  font-size: 11px;
}

.people-list a {
  color: var(--cyan);
}

.person-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 26px;
  font-weight: 600;
}

.contact-warning {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--yellow) 45%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--yellow) 10%, var(--surface));
  color: var(--yellow);
  font-size: 12px;
  font-weight: 600;
}

.activity-section > button {
  align-self: start;
  justify-self: end;
}

.activity-list article p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sequence-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.sequence-box > div {
  display: grid;
  gap: 4px;
}

.sequence-box span,
.sequence-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sequence-box small {
  grid-column: 1 / -1;
}

.backup-restore {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}

.backup-protection {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(48, 115, 87, .28);
  border-radius: 10px;
  background: rgba(48, 115, 87, .07);
}

.backup-protection strong {
  color: var(--green);
  font-size: 13px;
}

.backup-protection span {
  color: var(--muted);
  font-size: 11px;
}

.backup-protection.has-error {
  border-color: rgba(180, 62, 62, .3);
  background: rgba(180, 62, 62, .06);
}

.backup-protection.has-error strong {
  color: var(--red);
}

.backup-restore input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.backup-restore > span {
  display: grid;
  gap: 3px;
}

.backup-restore small {
  color: var(--muted);
}

.backup-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.backup-list article {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.backup-list article.is-damaged {
  color: var(--red);
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-actions a,
.backup-actions button {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: 600 10px inherit;
  text-decoration: none;
  cursor: pointer;
}

.backup-actions button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.backup-list article > div {
  display: grid;
  gap: 2px;
}

.backup-list article span,
.backup-list article small {
  color: var(--muted);
  font-size: 11px;
}

.integration-logo.backup {
  background: #e8e5d8;
  color: #5c594c;
}

@media (max-width: 620px) {
  .backup-list article {
    grid-template-columns: 1fr auto;
  }

  .backup-actions {
    grid-column: 1 / -1;
  }
}

.google-sync-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.google-sync-box > div {
  display: grid;
  gap: 4px;
}

.google-sync-box span {
  color: var(--muted);
  font-size: 12px;
}

.notification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.notification-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-dialog-card {
  width: min(920px, calc(100vw - 32px));
}

.sync-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.sync-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.sync-summary span {
  color: var(--muted);
  font-size: 12px;
}

.sync-summary strong {
  font-size: 22px;
}

.sync-list {
  display: grid;
  gap: 9px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 4px;
}

.sync-list > article {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sync-list > article.is-conflict {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.sync-list header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sync-list header span,
.sync-direction {
  color: var(--muted);
  font-size: 12px;
}

.sync-differences {
  display: grid;
  gap: 6px;
}

.sync-differences > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--surface2);
  font-size: 12px;
}

.sync-differences > div span {
  color: var(--muted);
}

.sync-differences > div i {
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.sync-list fieldset {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sync-list fieldset legend {
  float: left;
  margin-right: 14px;
  color: var(--muted);
  font-size: 12px;
}

.sync-list fieldset label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.readiness-panel {
  display: grid;
  gap: 18px;
}

.readiness-panel > div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
}

.readiness-panel h3,
.readiness-panel p {
  margin: 0;
}

.readiness-panel p {
  margin-top: 4px;
  color: var(--muted);
}

.readiness-score {
  display: flex;
  align-items: baseline;
  min-width: 84px;
  font-size: 36px;
  font-weight: 900;
}

.readiness-score small {
  color: var(--muted);
  font-size: 15px;
}

.readiness-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface2);
}

.readiness-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  transition: width .35s ease;
}

.readiness-checklist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.readiness-checklist button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.readiness-checklist button i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.readiness-checklist button.is-ready i {
  background: var(--success);
  color: #fff;
}

.readiness-checklist button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.readiness-checklist button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.diagnostic-grid article {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.diagnostic-grid header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.diagnostic-grid header > strong {
  font-size: 12px;
}

.diagnostic-grid header span,
.diagnostic-list > article > b {
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 9px;
  white-space: nowrap;
}

.diagnostic-grid article > b {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.diagnostic-grid article > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.diagnostic-grid .ok,
.diagnostic-list .ok {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}

.diagnostic-grid .warning,
.diagnostic-list .warning {
  background: #f2ead4;
  color: #866310;
}

.diagnostic-grid .error,
.diagnostic-list .error {
  background: color-mix(in srgb, var(--danger) 13%, transparent);
  color: var(--danger);
}

.diagnostic-grid .unknown,
.diagnostic-list .unknown {
  background: var(--surface2);
  color: var(--muted);
}

.diagnostic-list {
  display: grid;
}

.diagnostic-list > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.diagnostic-list > article > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.diagnostic-list > article > div > span {
  display: grid;
  gap: 3px;
}

.diagnostic-list small {
  color: var(--muted);
  font-size: 11px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.demo-workspace-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
}

.demo-workspace-panel > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.demo-workspace-panel h3,
.demo-workspace-panel p {
  margin: 0;
}

.demo-workspace-panel p {
  max-width: 720px;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.demo-mark {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.demo-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.demo-workspace-panel > .note {
  display: none;
}

@media (max-width: 850px) {
  .demo-workspace-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .demo-actions {
    flex-wrap: wrap;
  }
}

.saved-view-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
}

.forgotten-strip {
  border-color: color-mix(in srgb, var(--yellow) 45%, var(--line));
  background: color-mix(in srgb, var(--yellow) 7%, var(--surface));
}

.saved-view-bar label {
  display: grid;
  min-width: 260px;
  gap: 6px;
}

.saved-view-bar label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.verified-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 7px;
  border-radius: 50%;
  background: #247a55;
  color: white;
  font-size: 10px;
  font-style: normal;
}

.stale-label {
  color: #b45b3d;
  font-weight: 750;
}

.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.row-tags i {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.lead-quality-panel {
  margin-top: 20px;
}

.quality-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.quality-summary article {
  display: grid;
  gap: 4px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.quality-summary span,
.quality-summary small {
  color: var(--muted);
  font-size: 11px;
}

.quality-summary strong {
  font-size: 25px;
}

.quality-source-list {
  display: grid;
  gap: 8px;
}

.quality-source-list > article {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 2fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.quality-source-list > article > div {
  display: grid;
  gap: 3px;
}

.quality-source-list small,
.quality-source-list dt {
  color: var(--muted);
  font-size: 11px;
}

.quality-source-list dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0;
}

.quality-source-list dl > div {
  display: grid;
  gap: 3px;
}

.quality-source-list dd {
  margin: 0;
  font-weight: 750;
}

.lead-data-health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.lead-data-health > div {
  display: grid;
  gap: 4px;
}

.lead-data-health small,
.dialog-tags small {
  color: var(--muted);
  font-size: 11px;
}

#toggle-verified.is-verified {
  border-color: #247a55;
  color: #247a55;
}

.dialog-tags {
  margin-top: 16px;
}

.custom-fields-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.custom-fields-editor > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-fields-editor > div:first-child > span {
  font-size: 12px;
  font-weight: 750;
}

#custom-fields-list {
  display: grid;
  gap: 8px;
}

.custom-field-row {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) 1.3fr auto;
  gap: 8px;
}

.custom-field-row input {
  width: 100%;
}

.custom-field-row button {
  min-width: 38px;
}

.refresh-automation-settings {
  display: grid;
  gap: 10px;
  margin: 8px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.refresh-automation-settings > label:not(.setting-toggle) {
  color: var(--muted);
  font-size: 12px;
}

.refresh-dialog-card {
  width: min(980px, calc(100vw - 28px));
}

.refresh-dialog-card .batch-progress {
  margin: 18px 0;
}

.refresh-results {
  display: grid;
  max-height: 52vh;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.refresh-result {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.refresh-result > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.refresh-result > header > div {
  display: grid;
  gap: 4px;
}

.refresh-result > header small {
  color: var(--muted);
}

.refresh-result > header > span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.refresh-result.changed > header > span {
  border-color: var(--blue);
  color: var(--blue);
}

.refresh-result.not_found > header > span,
.refresh-result.error > header > span {
  border-color: var(--yellow);
  color: var(--yellow);
}

.refresh-changes {
  display: grid;
  gap: 6px;
}

.refresh-change {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.refresh-change > span {
  display: grid;
  gap: 5px;
}

.refresh-change small {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.refresh-change del {
  color: var(--muted);
}

.refresh-change ins {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  .quality-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .quality-source-list > article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .saved-view-bar,
  .lead-data-health {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-view-bar label {
    min-width: 0;
  }

  .quality-source-list dl {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 620px) {
  .theme-toggle strong {
    display: none;
  }

  .crm-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-pagination > div {
    flex-wrap: wrap;
  }

  .page-size-label {
    width: 100%;
  }

  .team-add-row,
  #tomtom-settings-form,
  #foursquare-settings-form,
  #dadata-settings-form {
    align-items: stretch;
    flex-direction: column;
  }

  .site-audit,
  .audit-columns {
    grid-template-columns: 1fr;
  }

  .site-audit > button {
    width: 100%;
  }

  #site-audit-result {
    grid-column: 1;
  }

  .workspace-list article,
  .workspace-list article > div:last-child {
    align-items: stretch;
    grid-auto-flow: row;
    flex-direction: column;
  }

  .today-list article,
  .today-list article > div:last-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-performance dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .funnel-list > div {
    grid-template-columns: 96px minmax(40px, 1fr) 28px;
  }

  .outreach-controls,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .outreach-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .outreach-actions .note {
    margin-left: 0;
  }

  .analytics-list article {
    grid-template-columns: minmax(100px, .8fr) minmax(40px, 1fr) 28px;
  }

  .sequence-box {
    grid-template-columns: 1fr;
  }

  .sequence-box small {
    grid-column: 1;
  }

  .google-sync-box {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-summary {
    grid-template-columns: 1fr;
  }

  .sync-differences > div {
    grid-template-columns: 1fr;
  }

  .sync-differences > div i {
    display: none;
  }

  .readiness-checklist,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-layout,
  .today-insights {
    grid-template-columns: 1fr;
  }

  .team-workspace-grid {
    grid-template-columns: 1fr;
  }

  .lead-claim-box {
    grid-template-columns: 1fr auto;
  }

  .lead-transfer {
    grid-column: 1 / -1;
  }

  .outreach-layout,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

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

  .analytics-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-funnel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .outreach-queue > article,
  .today-list > article[data-queue-key] {
    grid-template-columns: 1fr auto;
  }

  .queue-actions {
    grid-column: 1 / -1;
  }

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

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

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

  .template-library,
  .analytics-metrics,
  .analytics-funnel,
  .readiness-checklist,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .outreach-queue > article,
  .today-list > article[data-queue-key] {
    grid-template-columns: 1fr;
  }

  .queue-actions,
  .queue-meta {
    flex-wrap: wrap;
  }

  .people-list > article {
    align-items: flex-start;
    flex-direction: column;
  }

  .actor-switch {
    min-width: 120px;
  }

  .team-overview {
    grid-template-columns: 1fr;
  }

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

  .lead-transfer {
    grid-column: auto;
    flex-direction: column;
  }
}

/* 0.24 — protected workspace */
.auth-dialog {
  width: min(460px, calc(100% - 28px));
  max-height: calc(100dvh - 24px);
  border-radius: 18px;
  overflow: auto;
}

.auth-dialog::backdrop {
  background: rgba(20, 20, 18, .72);
  backdrop-filter: blur(10px);
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 34px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.auth-brand strong {
  font-size: 18px;
  letter-spacing: -.025em;
}

.auth-brand small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}

.auth-mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-switch button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--text) 12%, transparent);
}

.auth-heading {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.auth-card .eyebrow {
  margin: 0;
}

.auth-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.auth-card .dialog-muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--text);
  color: var(--surface);
  font-size: 17px;
  font-weight: 700;
}

.auth-card .primary {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
}

.auth-card small {
  color: var(--muted);
  line-height: 1.45;
}

.auth-card > .text-button {
  justify-self: center;
  min-height: 36px;
}

.auth-legal {
  padding-top: 2px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.auth-error {
  min-height: 18px;
  margin: -2px 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

.auth-locked .app-shell {
  user-select: none;
}

@media (max-width: 520px) {
  .auth-card {
    gap: 14px;
    padding: 24px 20px;
  }

  .auth-card h2 {
    font-size: 27px;
  }
}

@media (max-height: 760px) and (min-width: 521px) {
  .auth-card {
    gap: 10px;
    padding: 20px 28px;
  }

  .auth-logo {
    width: 42px;
    height: 42px;
  }

  .auth-card h2 {
    font-size: 27px;
  }

  .auth-card .field {
    gap: 5px;
  }
}

.actor-switch select:disabled {
  cursor: default;
  opacity: 1;
}

.account-admin {
  margin-top: 18px;
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-list > article {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(170px, .8fr) 180px auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.account-list > article > div {
  display: grid;
  gap: 3px;
}

.account-list strong {
  font-size: 13px;
}

.account-list strong em {
  margin-left: 5px;
  color: var(--green);
  font-size: 10px;
  font-style: normal;
}

.account-list span {
  color: var(--muted);
  font-size: 11px;
}

.account-list .project-access {
  display: grid;
  gap: 3px;
}

.account-list .project-access b {
  color: var(--text);
  font-size: 12px;
}

.account-owner-note {
  font-weight: 800;
  text-align: right;
}

.account-security {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.account-security summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.account-security[open] {
  display: grid;
  grid-template-columns: 180px auto auto;
  align-items: center;
  gap: 10px;
}

.account-security[open] summary {
  grid-column: 1 / -1;
}

.account-list select {
  min-height: 40px;
}

.account-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(200px, 1fr) 180px auto;
  align-items: end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-form .primary {
  min-height: 46px;
  white-space: nowrap;
}

.invite-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 150px auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--green) 7%, var(--surface2));
}

.invite-form > div,
.invite-result > div {
  display: grid;
  gap: 5px;
}

.invite-form > div span,
.invite-result span,
.invite-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.invite-role-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.invite-form a {
  color: var(--green);
  font-weight: 750;
  text-decoration: none;
}

.invite-form a:hover {
  text-decoration: underline;
}

.invite-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface2);
}

.invite-result code {
  overflow-wrap: anywhere;
  color: var(--text);
}

.invite-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.invite-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.account-manual {
  margin-top: 16px;
  color: var(--muted);
}

.account-manual summary {
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 980px) {
  .account-list > article,
  .account-form,
  .invite-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .auth-card {
    padding: 26px 22px;
  }

  .account-list > article,
  .account-form,
  .invite-form,
  .invite-result {
    grid-template-columns: 1fr;
  }

  .account-list > article .secondary,
  .account-list > article .text-button {
    width: 100%;
  }
}

/* Final mobile pass: prevent the desktop header and estimates from widening the app. */
@media (max-width: 620px) {
  html,
  body,
  .app-shell,
  main {
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    width: 100%;
    padding: 12px 10px 40px;
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .topbar > div:not(.safety) {
    min-width: 0;
    flex: 1 1 150px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h1 {
    overflow-wrap: anywhere;
    font-size: 22px;
    line-height: 1.05;
  }

  .theme-toggle {
    width: 42px;
    flex: 0 0 42px;
  }

  .actor-switch {
    order: 5;
    min-width: 0;
    margin-left: 0;
    flex: 1 1 210px;
  }

  .profile-button {
    display: grid;
    order: 6;
    margin-left: 0;
    flex: 0 0 auto;
  }

  #logout-button {
    display: none;
  }

  .hero {
    padding: 30px 24px;
  }

  .hero h2 {
    font-size: clamp(34px, 10.3vw, 40px);
    overflow-wrap: anywhere;
  }

  .form-panel > .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .form-panel > .panel-heading p {
    max-width: none;
    text-align: left;
    line-height: 1.45;
  }

  .search-template-bar > button {
    width: 100%;
  }

  .team-add-row,
  #tomtom-settings-form,
  #foursquare-settings-form,
  #here-settings-form,
  #dadata-settings-form {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Complete dark-theme control system. Keep every action legible and intentional. */
html[data-theme="dark"] {
  --dark-control: #18231c;
  --dark-control-hover: #223128;
  --dark-control-border: #3b5145;
  --dark-disabled-bg: #121914;
  --dark-disabled-text: #6f8075;
  --dark-accent-ink: #07150d;
}

html[data-theme="dark"] .logo {
  border: 1px solid #70dca2;
  background: var(--blue);
  color: var(--dark-accent-ink);
  box-shadow: 0 8px 24px rgba(73, 201, 133, .18);
}

html[data-theme="dark"] .brand strong {
  color: var(--text);
}

html[data-theme="dark"] .brand small {
  color: #adafa6;
}

html[data-theme="dark"] .nav-item {
  color: #aeb0a7;
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
  background: #22251f;
  color: var(--text);
}

html[data-theme="dark"] .nav-item b {
  background: #2c3029;
  color: #d9dad2;
}

html[data-theme="dark"] .premium-nav span {
  color: #72d39d;
}

html[data-theme="dark"] .nav-item i {
  background: #183326;
  color: #83dca8;
}

html[data-theme="dark"] .sidebar-feedback {
  color: #b8bab1;
}

html[data-theme="dark"] .sidebar-feedback:hover {
  border-color: #555a4e;
  background: #1b1e1a;
  color: var(--text);
}

html[data-theme="dark"] .sidebar-note,
html[data-theme="dark"] .safety {
  border-color: #3e4b41;
  background: #19221d;
  color: #9ed0b2;
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .profile-button,
html[data-theme="dark"] .icon-button {
  border-color: var(--dark-control-border);
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .profile-button:hover,
html[data-theme="dark"] .icon-button:hover {
  border-color: #686d60;
  background: var(--dark-control-hover);
}

html[data-theme="dark"] .primary {
  border: 1px solid #70dca2;
  background: var(--blue);
  color: var(--dark-accent-ink);
  box-shadow: 0 8px 22px rgba(73, 201, 133, .17);
}

html[data-theme="dark"] .primary:hover {
  border-color: #91e8b8;
  background: #61d99a;
  color: #06130b;
}

html[data-theme="dark"] .secondary {
  border-color: var(--dark-control-border);
  background: var(--dark-control);
  color: #e7e7df;
  box-shadow: none;
}

html[data-theme="dark"] .secondary:hover {
  border-color: #676c5f;
  background: var(--dark-control-hover);
  color: #fffef8;
}

html[data-theme="dark"] .text-button {
  border-color: transparent;
  background: transparent;
  color: #b9bbb2;
}

html[data-theme="dark"] .text-button:hover {
  background: rgba(255, 255, 255, .045);
  color: var(--text);
}

html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .primary:disabled,
html[data-theme="dark"] .secondary:disabled,
html[data-theme="dark"] .text-button:disabled {
  border-color: #34382f;
  background: var(--dark-disabled-bg);
  color: var(--dark-disabled-text);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] .custom-select-trigger:disabled {
  border-color: #34382f;
  background: #171915;
  color: #7e8177;
  opacity: 1;
}

html[data-theme="dark"] .danger-button,
html[data-theme="dark"] .danger-link {
  border-color: #70423e;
  background: #2b1d1b;
  color: #ff9c96;
}

html[data-theme="dark"] .danger-button:hover,
html[data-theme="dark"] .danger-link:hover {
  border-color: #96544e;
  background: #38211f;
  color: #ffbbb5;
}

html[data-theme="dark"] .ai-locked-button {
  border-color: #574665;
  background: #251e2b;
  color: #cfb3df;
}

html[data-theme="dark"] .ai-locked-button:hover {
  border-color: #766087;
  background: #302539;
  color: #ead7f4;
}

html[data-theme="dark"] .search-presets button {
  border-color: #3f443a;
  background: #20231e;
  color: #c5c7be;
}

html[data-theme="dark"] .search-presets button:hover {
  border-color: #676c5f;
  background: #2a2e27;
  color: var(--text);
}

html[data-theme="dark"] .segmented {
  border-color: var(--line);
  background: #181a17;
}

html[data-theme="dark"] .segmented span {
  color: #aeb0a7;
}

html[data-theme="dark"] .segmented label:has(input:checked) span {
  background: #30332c;
  color: var(--text);
  box-shadow: inset 0 0 0 1px #484d41;
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .table-toolbar > div span {
  background: #36251f;
  color: #ffad99;
}

html[data-theme="dark"] .badge.done,
html[data-theme="dark"] .chip.done {
  background: #1d3026;
  color: #93d2ad;
}

html[data-theme="dark"] .badge.error,
html[data-theme="dark"] .chip.error {
  background: #38201f;
  color: #f7a09d;
}

html[data-theme="dark"] .chip.high {
  background: #3b211f;
  color: #ffaaa5;
}

html[data-theme="dark"] .chip.medium {
  background: #352c1d;
  color: #e6bf73;
}

html[data-theme="dark"] .chip.low {
  background: #292c26;
  color: #c0c2b9;
}

html[data-theme="dark"] .table-wrap {
  border-color: var(--line);
  background: var(--surface);
}

html[data-theme="dark"] .row-menu {
  color: #aeb0a7;
}

html[data-theme="dark"] .row-menu:hover {
  background: #38201e;
  color: #ff9d96;
}

html[data-theme="dark"] .reminder-strip {
  border-color: #6d5932;
  background: #2b2619;
  color: #eee5cf;
}

html[data-theme="dark"] .import-drop.dragging {
  border-color: var(--blue);
  background: #172a20;
}

html[data-theme="dark"] .dialog-close:hover {
  border-color: #666b5f;
  background: #30342c;
  color: var(--text);
}

html[data-theme="dark"] .progress {
  background: #292c26;
}

html[data-theme="dark"] .progress span {
  background: var(--blue);
}

html[data-theme="dark"] .readiness-checklist button {
  border-color: var(--line);
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .readiness-checklist button:hover {
  border-color: #64695c;
  background: var(--dark-control-hover);
}

html[data-theme="dark"] .integration-logo.profile {
  background: #34241e;
  color: #f3a087;
}

html[data-theme="dark"] .integration-logo.backup {
  background: #2d2c23;
  color: #d4cba7;
}

html[data-theme="dark"] .integration-logo.auto {
  background: #35231e;
  color: #ff8b70;
}

html[data-theme="dark"] .integration-logo.sources {
  background: #1d3026;
  color: #8ed0aa;
}

html[data-theme="dark"] .source-state {
  border: 1px solid #40443b;
  background: #262923;
  color: #b5b7ae;
}

html[data-theme="dark"] .source-state.active {
  border-color: #365e48;
  background: #1c3025;
  color: #94d4af;
}

html[data-theme="dark"] .source-state.source-link:hover {
  border-color: #686d60;
  background: #30342c;
  color: var(--text);
}

html[data-theme="dark"] .premium-plan span {
  background: #3c2d43;
  color: #dfc1ec;
}

html[data-theme="dark"] .smart-card i,
html[data-theme="dark"] .setting-toggle i,
html[data-theme="dark"] .toggle span {
  background: #41453c;
}

html[data-theme="dark"] .smart-card:has(input:checked) i,
html[data-theme="dark"] .setting-toggle:has(input:checked) i,
html[data-theme="dark"] .toggle:has(input:checked) span {
  background: var(--blue);
}

html[data-theme="dark"] .smart-card:has(input:checked) i::after,
html[data-theme="dark"] .setting-toggle:has(input:checked) i::after,
html[data-theme="dark"] .toggle:has(input:checked) span::after {
  background: var(--dark-accent-ink);
}

html[data-theme="dark"] .source-card:has(input:checked) i,
html[data-theme="dark"] .onboarding-sources label:has(input:checked) > i {
  border-color: #72dca2;
  background: var(--blue);
  color: var(--dark-accent-ink);
}

/* 0.31: one fast doorway into a feature-rich CRM. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.command-trigger {
  min-width: 210px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.command-trigger:hover {
  border-color: #a7a49a;
  background: #fff;
  color: var(--text);
}

.command-trigger > span {
  color: var(--blue);
  font-size: 19px;
  line-height: 1;
}

.command-trigger strong {
  margin-right: auto;
  font-size: 11px;
  font-weight: 500;
}

.command-trigger kbd,
.command-help kbd {
  min-width: 23px;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-color: #bbb7ac;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  background: var(--surface2);
  color: var(--muted);
  font: 600 9px/1 "Golos Text", Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(32, 32, 30, .06);
}

.command-dialog {
  width: min(700px, calc(100% - 28px));
  max-height: min(720px, calc(100vh - 40px));
  margin-top: max(56px, 8vh);
  margin-bottom: auto;
  border-radius: 13px;
  overflow: hidden;
}

.command-card {
  display: grid;
  background: var(--surface);
}

.command-search {
  min-height: 72px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-search > span {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.command-search input {
  width: 100%;
  min-height: 70px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
}

.command-search input::placeholder {
  color: #9a9890;
}

.command-search input::-webkit-search-cancel-button {
  display: none;
}

.command-escape {
  min-width: 42px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.command-heading {
  padding: 13px 18px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.command-heading strong,
.command-section-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.command-heading small {
  color: var(--muted);
  font-size: 10px;
}

.command-results {
  min-height: 180px;
  max-height: min(510px, calc(100vh - 235px));
  padding: 4px 10px 12px;
  overflow: auto;
}

.command-results section + section {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.command-section-label {
  display: block;
  padding: 5px 9px 7px;
}

.command-result {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.command-result.is-active,
.command-result:hover {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: color-mix(in srgb, var(--blue) 7%, var(--surface));
}

.command-result > i {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface2);
  color: var(--blue);
  font-size: 16px;
  font-style: normal;
}

.command-result > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.command-result strong,
.command-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result strong {
  font-size: 13px;
  font-weight: 600;
}

.command-result small {
  color: var(--muted);
  font-size: 11px;
}

.command-result > b {
  color: var(--muted);
  font-size: 14px;
}

.lead-command-result .source-avatar {
  width: 34px;
  height: 34px;
}

.lead-command-result > em {
  font-size: 9px;
  font-style: normal;
}

.command-empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.command-empty strong {
  color: var(--text);
  font-size: 14px;
}

.command-empty span,
.command-note {
  color: var(--muted);
  font-size: 10px;
}

.command-note {
  padding: 12px;
  text-align: center;
}

.command-help {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface2);
}

.command-help span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

html[data-theme="dark"] .command-trigger,
html[data-theme="dark"] .command-card,
html[data-theme="dark"] .command-search input {
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .command-trigger:hover,
html[data-theme="dark"] .command-result.is-active,
html[data-theme="dark"] .command-result:hover {
  border-color: #665249;
  background: #2d231f;
}

html[data-theme="dark"] .command-trigger kbd,
html[data-theme="dark"] .command-help kbd,
html[data-theme="dark"] .command-escape,
html[data-theme="dark"] .command-result > i,
html[data-theme="dark"] .command-help {
  border-color: #40443b;
  background: #292c26;
  color: #c1c2b9;
}

html[data-theme="dark"] .command-search input::placeholder {
  color: #797c73;
}

@media (max-width: 980px) {
  .command-trigger {
    min-width: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .command-trigger strong,
  .command-trigger kbd {
    display: none;
  }
}

@media (max-width: 620px) {
  .command-trigger {
    order: 3;
  }

  .command-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
    margin-top: 8px;
  }

  .command-search {
    min-height: 62px;
    padding: 0 12px;
  }

  .command-search input {
    min-height: 60px;
    font-size: 15px;
  }

  .command-results {
    max-height: calc(100vh - 205px);
  }

  .command-heading small,
  .command-help span:last-child {
    display: none;
  }

  .command-help {
    justify-content: center;
  }
}

/* 0.31.1: bulk lead actions must never widen the whole application. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.app-shell,
.app-shell > main,
.view,
.panel,
.crm-panel {
  min-width: 0;
}

.app-shell {
  width: 100%;
  overflow-x: clip;
}

.bulk-bar {
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  overflow-x: hidden;
  align-items: stretch;
}

.bulk-bar > strong {
  min-height: 36px;
  display: flex;
  align-items: center;
}

.bulk-bar > .custom-select {
  flex: 1 1 145px;
  max-width: 190px;
}

.bulk-bar > button {
  flex: 0 1 auto;
}

@media (max-width: 620px) {
  .bulk-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .bulk-bar > strong {
    grid-column: 1 / -1;
  }

  .bulk-bar > .custom-select,
  .bulk-bar > button {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

/* 0.32: first-run product guide. */
.beta-tour-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: min(760px, calc(100vh - 24px));
  overflow: hidden;
}

.beta-tour-card {
  height: min(650px, calc(100vh - 48px));
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.guide-topline,
.guide-actions,
.guide-actions > div {
  display: flex;
  align-items: center;
}

.guide-topline {
  min-height: 28px;
  justify-content: space-between;
  gap: 20px;
  padding-right: 48px;
}

.guide-topline .eyebrow {
  margin: 0;
}

.guide-topline > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.guide-progress {
  height: 4px;
  margin: 14px 0 28px;
  overflow: hidden;
  background: var(--surface2);
}

.guide-progress i {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--blue);
  transition: width .22s ease;
}

.guide-slides {
  flex: 1;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.guide-slide {
  min-height: 0;
  animation: guide-enter .2s ease-out both;
}

@keyframes guide-enter {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.guide-copy {
  position: relative;
  padding-right: 70px;
}

.guide-copy h2 {
  max-width: 720px;
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.guide-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.guide-copy kbd,
.guide-shortcuts kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text);
  font: 700 11px/1.3 "Golos Text", Arial, sans-serif;
}

.guide-number {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--blue) 38%, var(--line));
  border-radius: 99px;
  background: color-mix(in srgb, var(--blue) 9%, var(--surface));
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
}

.guide-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 34px 0 22px;
}

.guide-flow article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  background: var(--surface2);
}

.guide-flow article i {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  font-size: 16px;
  font-style: normal;
}

.guide-flow article strong {
  font-size: 13px;
}

.guide-flow article small,
.guide-ui-preview small,
.guide-lead-row small,
.guide-workday small,
.guide-shortcuts small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.guide-flow > b {
  color: var(--blue);
  font-size: 18px;
}

.guide-note {
  padding: 15px 17px;
  border-left: 4px solid var(--green);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: color-mix(in srgb, var(--green) 7%, var(--surface2));
}

.guide-note strong {
  font-size: 12px;
}

.guide-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.guide-ui-preview {
  margin: 32px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 10px;
  background: var(--surface2);
}

.guide-ui-preview > div {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 4px;
  background: var(--surface);
}

.guide-ui-preview > div strong {
  font-size: 13px;
}

.guide-ui-preview button {
  min-height: 62px;
  padding: 0 18px;
  border: 0;
  background: var(--blue);
  color: #17120f;
  font-size: 12px;
  font-weight: 750;
  pointer-events: none;
}

.guide-tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-tips article {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
}

.guide-tips strong {
  font-size: 12px;
}

.guide-tips span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.guide-lead-row {
  margin: 34px 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  background: var(--surface2);
}

.guide-checkbox {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #17120f;
  font-weight: 750;
}

.guide-lead-row > div {
  display: grid;
  gap: 3px;
}

.guide-lead-row > div strong {
  font-size: 13px;
}

.guide-lead-row > em {
  padding: 5px 8px;
  background: color-mix(in srgb, var(--yellow) 16%, var(--surface));
  color: var(--yellow);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.guide-lead-row > span:not(.guide-checkbox) {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 10px;
  font-weight: 600;
}

.guide-workday {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.guide-workday article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 13px;
  background: var(--surface2);
}

.guide-workday article > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  font-size: 11px;
  font-weight: 750;
}

.guide-workday article > div,
.guide-shortcuts article > span {
  display: grid;
  gap: 4px;
}

.guide-workday strong,
.guide-shortcuts strong {
  font-size: 12px;
}

.guide-shortcuts {
  margin: 30px 0 18px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.guide-shortcuts article {
  min-height: 70px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 13px;
}

.guide-shortcuts article + article {
  border-top: 1px solid var(--line);
}

.guide-shortcuts article > kbd,
.guide-shortcuts article > i {
  width: 52px;
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-style: normal;
  text-align: center;
}

.guide-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.guide-shortcuts-grid article + article {
  border-top: 0;
}

.guide-shortcuts-grid article:nth-child(even) {
  border-left: 1px solid var(--line);
}

.guide-shortcuts-grid article:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.guide-shortcuts-grid article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.guide-actions {
  min-height: 62px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  gap: 16px;
}

.guide-actions > div {
  gap: 8px;
}

.guide-actions .primary,
.guide-actions .secondary {
  min-width: 112px;
}

html[data-theme="dark"] .guide-flow article,
html[data-theme="dark"] .guide-ui-preview,
html[data-theme="dark"] .guide-tips article,
html[data-theme="dark"] .guide-lead-row,
html[data-theme="dark"] .guide-workday article,
html[data-theme="dark"] .guide-shortcuts {
  background: #20221e;
}

html[data-theme="dark"] .guide-ui-preview > div,
html[data-theme="dark"] .guide-lead-row > span:not(.guide-checkbox) {
  background: #181a17;
}

@media (max-width: 720px) {
  .beta-tour-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .beta-tour-card {
    min-height: 0;
    padding: 25px 18px 18px;
  }

  .guide-slide {
    min-height: 0;
  }

  .guide-copy {
    padding-right: 0;
  }

  .guide-copy h2 {
    margin-top: 10px;
    font-size: 30px;
  }

  .guide-flow {
    grid-template-columns: 1fr 1fr;
  }

  .guide-flow > b {
    display: none;
  }

  .guide-flow article {
    min-height: 100px;
  }

  .guide-ui-preview,
  .guide-tips {
    grid-template-columns: 1fr;
  }

  .guide-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .guide-shortcuts-grid article:nth-child(even) {
    border-left: 0;
  }

  .guide-shortcuts-grid article + article {
    border-top: 1px solid var(--line);
  }

  .guide-shortcuts-grid article:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .guide-ui-preview button {
    min-height: 48px;
  }

  .guide-lead-row {
    grid-template-columns: auto 1fr;
  }

  .guide-lead-row > em,
  .guide-lead-row > span:not(.guide-checkbox) {
    grid-column: 2;
    width: max-content;
  }

  .guide-note {
    grid-template-columns: 1fr;
  }

  .guide-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .guide-actions > div,
  .guide-actions .primary,
  .guide-actions .secondary,
  .guide-actions > .text-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-slide {
    animation: none;
  }

  .guide-progress i {
    transition: none;
  }
}

/* 0.35: public beta release notes. */
.release-notes-dialog {
  width: min(860px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
}

.release-notes-card {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}

.release-notes-heading {
  padding-right: 54px;
}

.release-version {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.release-notes-heading h2 {
  max-width: 700px;
  margin: 9px 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.release-notes-heading > p:last-child {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.release-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 30px 0 18px;
  border: 1px solid var(--line);
  background: var(--surface2);
}

.release-notes-grid article {
  min-height: 96px;
  padding: 16px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
}

.release-notes-grid article:nth-child(even) {
  border-left: 1px solid var(--line);
}

.release-notes-grid article:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.release-notes-grid i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--surface);
  font-style: normal;
  font-weight: 750;
}

.release-notes-grid article > div {
  display: grid;
  gap: 5px;
}

.release-notes-grid strong {
  font-size: 12px;
}

.release-notes-grid span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.release-safety {
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  background: color-mix(in srgb, var(--green) 8%, var(--surface2));
}

.release-safety strong {
  font-size: 12px;
}

.release-safety span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

html[data-theme="dark"] .release-notes-grid {
  background: #17231b;
}

@media (max-width: 720px) {
  .release-notes-card {
    padding: 26px 18px 18px;
  }

  .release-notes-heading {
    padding-right: 28px;
  }

  .release-notes-heading h2 {
    font-size: 32px;
  }

  .release-notes-grid {
    grid-template-columns: 1fr;
  }

  .release-notes-grid article:nth-child(even) {
    border-left: 0;
  }

  .release-notes-grid article + article {
    border-top: 1px solid var(--line);
  }

  .release-safety {
    grid-template-columns: 1fr;
  }
}

/* 0.36: legibility and workspace rhythm across every product section. */
body {
  font-size: 16px;
  line-height: 1.45;
}

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

.brand small,
.sidebar-note small,
.sidebar-feedback span,
.actor-switch > span,
.profile-button span {
  font-size: 12px;
  line-height: 1.4;
}

.sidebar-note strong,
.sidebar-feedback strong {
  font-size: 14px;
}

nav {
  gap: 8px;
}

.nav-item {
  min-height: 50px;
  padding-inline: 14px;
  font-size: 14px;
}

.nav-item b,
.nav-item i {
  font-size: 11px;
}

.topbar {
  gap: 16px;
  margin-bottom: 30px;
}

.topbar h1 {
  font-size: 27px;
  line-height: 1.15;
}

.eyebrow,
.kicker {
  font-size: 12px;
}

.safety,
.profile-button strong,
.actor-switch select,
.actor-switch > strong,
.logout-button {
  font-size: 13px;
}

.hero {
  padding-block: 54px;
}

.hero p {
  font-size: 17px;
  line-height: 1.65;
}

.search-presets {
  gap: 8px;
}

.search-presets button {
  min-height: 32px;
  padding-inline: 11px;
  font-size: 12px;
}

.search-template-bar {
  gap: 10px;
  padding: 14px;
  margin-bottom: 24px;
}

.search-template-bar label {
  gap: 8px;
}

.search-template-bar label > span {
  font-size: 13px;
}

.toggle,
.submit-row p {
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  margin-top: 22px;
  padding: 32px;
}

.panel-heading {
  margin-bottom: 28px;
}

.panel-heading h3,
.integration-card h3 {
  font-size: 20px;
  line-height: 1.25;
}

.panel-heading p,
.integration-heading p,
.integration-copy,
.status-line p,
.status-line small,
.note,
.page-subtitle {
  font-size: 14px;
  line-height: 1.55;
}

.number {
  font-size: 13px;
}

.form-grid {
  gap: 18px;
}

.field,
legend {
  gap: 9px;
  font-size: 14px;
}

.field small,
.view small {
  font-size: 12px;
  line-height: 1.5;
}

input,
select,
textarea {
  min-height: 50px;
  padding-inline: 15px;
  font-size: 15px;
}

.custom-select-trigger {
  min-height: 50px;
  padding-inline: 15px;
  font-size: 14px;
}

.custom-select-option {
  min-height: 42px;
  padding-block: 10px;
  font-size: 14px;
}

.custom-select-option.is-selected {
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  color: var(--blue);
}

.custom-select-table .custom-select-trigger {
  min-height: 38px;
  font-size: 12px;
}

.bulk-bar .custom-select-trigger {
  min-height: 40px;
  font-size: 12px;
}

textarea {
  padding-block: 14px;
}

fieldset {
  margin-top: 30px;
}

legend {
  margin-bottom: 14px;
}

.smart-card,
.source-card,
.russia-info,
.known-sheet,
.setting-toggle {
  padding: 16px;
}

.smart-card,
.source-card {
  gap: 14px;
}

.smart-card strong,
.source-card strong,
.russia-info strong,
.setting-toggle strong,
.known-sheet strong,
.create-sheet strong {
  font-size: 14px;
  line-height: 1.35;
}

.smart-card small,
.source-card small,
.russia-info span,
.setting-toggle small,
.known-sheet span,
.known-sheet a,
.create-sheet span,
.setup-help ol {
  font-size: 12px;
  line-height: 1.55;
}

.primary,
.secondary,
.text-button,
.danger-button {
  min-height: 46px;
  padding-inline: 18px;
  font-size: 14px;
}

.chip,
.source-pill {
  font-size: 11px;
}

.badge {
  font-size: 12px;
}

.page-heading {
  margin: 12px 0 30px;
  gap: 22px;
}

.page-heading h2 {
  font-size: 40px;
  line-height: 1.08;
}

.metrics {
  gap: 16px;
}

.metrics article {
  padding: 24px;
}

.metrics span {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.metrics strong {
  font-size: 34px;
}

.settings-grid,
.analytics-grid,
.today-grid,
.team-grid,
.outreach-grid {
  gap: 22px;
}

.integration-heading {
  margin-bottom: 24px;
}

.integration-heading p {
  margin-top: 4px;
}

.active-modules {
  gap: 9px;
}

.active-modules span {
  padding: 8px 10px;
  font-size: 12px;
}

.setting-toggle {
  gap: 16px;
}

.table-toolbar {
  gap: 14px;
  margin-bottom: 18px;
}

.table-toolbar input,
.table-toolbar select {
  min-height: 46px;
}

.crm-toolbar {
  gap: 10px;
}

.crm-toolbar input,
.crm-toolbar select {
  font-size: 14px;
}

.bulk-bar {
  gap: 10px;
  padding: 13px 14px;
}

.bulk-bar strong,
.bulk-bar select {
  font-size: 12px;
}

th,
td {
  padding: 15px 14px;
}

th {
  font-size: 12px;
  line-height: 1.35;
}

td,
.table-select,
.table-date {
  font-size: 12px;
}

.table-select,
.table-date {
  min-height: 38px;
}

.company {
  gap: 6px;
}

.company strong {
  font-size: 14px;
  line-height: 1.35;
}

.company small,
.block,
.contact small {
  font-size: 12px;
  line-height: 1.5;
}

.history-list,
.activity-list,
.people-list,
.team-claims,
.team-activity,
.analytics-list {
  gap: 14px;
}

.history-card {
  gap: 16px;
  padding: 17px 18px;
}

.history-card small {
  font-size: 12px;
}

.today-layout,
.team-workspace-grid {
  gap: 22px;
}

.today-list {
  gap: 12px;
}

.today-list article {
  padding-block: 16px;
}

.team-local-note {
  padding: 14px 16px;
}

.team-local-note span,
.team-claims span,
.team-activity span,
.team-activity time {
  font-size: 12px;
  line-height: 1.45;
}

.team-overview > article {
  padding: 20px;
}

.team-overview header em {
  font-size: 12px;
}

.team-overview dt {
  font-size: 12px;
}

.team-claims article {
  padding: 15px 16px;
}

.team-activity article {
  padding-block: 11px;
}

#view-team em,
#view-team .custom-select-value {
  font-size: 12px;
}

.lead-views {
  gap: 6px;
  margin-bottom: 18px;
}

.lead-views button {
  min-height: 40px;
  padding-inline: 13px;
  font-size: 13px;
}

.saved-view-bar {
  gap: 12px;
  margin-block: 18px;
  padding: 15px;
}

.saved-view-bar label {
  gap: 8px;
}

.saved-view-bar label > span,
.page-size-label {
  font-size: 12px;
}

.analytics-list span,
.analytics-funnel small,
.analytics-funnel span {
  font-size: 12px;
  line-height: 1.45;
}

.source-catalog {
  gap: 2px;
}

.source-catalog article {
  min-height: 76px;
  gap: 14px;
  padding: 14px 16px;
}

.source-catalog article > div {
  gap: 5px;
}

.source-catalog article strong {
  font-size: 14px;
}

.source-catalog article small {
  font-size: 12px;
  line-height: 1.5;
}

.source-state {
  padding: 6px 8px;
  font-size: 11px;
}

.backup-protection {
  gap: 6px;
  padding: 16px;
}

.backup-protection strong {
  font-size: 14px;
}

.backup-protection span,
.backup-list article span,
.backup-list article small {
  font-size: 12px;
}

.backup-list {
  gap: 10px;
}

.backup-list article {
  gap: 14px;
  padding-block: 12px;
}

.backup-actions a,
.backup-actions button {
  min-height: 36px;
  font-size: 12px;
}

.premium-hero {
  gap: 24px;
  padding: 54px;
}

.premium-hero > div:first-child > p:not(.eyebrow) {
  font-size: 17px;
}

.premium-plan {
  gap: 10px;
  padding: 28px;
}

.premium-plan span,
.premium-plan small,
.ai-feature-grid article > span {
  font-size: 12px;
}

.ai-feature-grid {
  gap: 16px;
  margin-top: 20px;
}

.ai-feature-grid article {
  padding: 26px;
}

.ai-feature-grid h3 {
  font-size: 19px;
}

.ai-feature-grid p {
  font-size: 14px;
  line-height: 1.6;
}

.onboarding-topline > span {
  font-size: 12px;
}

.readiness-panel {
  gap: 22px;
}

.readiness-checklist {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.readiness-checklist button {
  min-height: 62px;
  gap: 11px;
  padding: 14px;
}

.readiness-checklist button small {
  overflow: visible;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: clip;
  white-space: normal;
}

.diagnostic-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-block: 20px;
}

.diagnostic-grid article {
  gap: 11px;
  padding: 18px;
}

.diagnostic-grid header > strong {
  font-size: 14px;
}

.diagnostic-grid header span,
.diagnostic-list > article > b {
  font-size: 12px;
}

.diagnostic-grid article > small,
.diagnostic-list small {
  font-size: 12px;
  line-height: 1.5;
}

.diagnostic-list > article {
  gap: 16px;
  padding-block: 14px;
}

.empty-state,
.empty {
  padding-block: 44px !important;
  font-size: 14px;
  line-height: 1.55;
}

.lead-dialog-card,
.feedback-card,
.command-card,
.onboarding-card,
.beta-tour-card,
.release-notes-card {
  padding: 34px;
}

.lead-dialog-card h2 {
  font-size: 30px;
}

.dialog-muted,
.dialog-contacts a,
.dialog-contacts span {
  font-size: 13px;
  line-height: 1.5;
}

.dialog-grid {
  gap: 16px;
}

.dialog-actions {
  margin-top: 24px;
}

.release-version,
.release-notes-grid span {
  font-size: 12px;
}

.release-notes-heading > p:last-child,
.release-safety span {
  font-size: 14px;
}

.release-notes-grid {
  margin-block: 34px 22px;
}

.release-notes-grid article {
  min-height: 112px;
  padding: 20px;
  gap: 14px;
}

.release-notes-grid strong,
.release-safety strong {
  font-size: 14px;
}

footer {
  font-size: 12px;
  line-height: 1.5;
}

html[data-theme="dark"] .field,
html[data-theme="dark"] legend,
html[data-theme="dark"] .saved-view-bar label > span,
html[data-theme="dark"] .page-size-label {
  color: #b8c3bb;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #859188;
}

@media (min-width: 721px) {
  main {
    padding-block: 30px 64px;
  }

  .sidebar {
    padding-block: 28px;
  }
}

@media (max-width: 1080px) {
  .topbar {
    gap: 10px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .safety {
    display: none;
  }

  .panel {
    padding: 26px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav-item {
    min-height: 52px;
    font-size: 15px;
  }

  .hero {
    padding: 34px 22px;
  }

  .hero p {
    font-size: 16px;
  }

  .panel {
    margin-top: 16px;
    padding: 22px 18px;
  }

  .panel-heading {
    margin-bottom: 22px;
  }

  .page-heading {
    margin-bottom: 24px;
  }

  .page-heading h2 {
    font-size: 34px;
  }

  .lead-dialog-card,
  .feedback-card,
  .command-card,
  .onboarding-card,
  .beta-tour-card,
  .release-notes-card {
    padding: 26px 18px 20px;
  }

  .release-notes-grid article {
    min-height: 0;
  }
}

/* 0.36: focused workspaces, personal palettes and a calmer lead card. */
:root {
  --accent-ink: #ffffff;
}

html[data-accent="ocean"] {
  --bg: #f0f4f7;
  --side: #e5edf2;
  --surface: #fbfdff;
  --surface2: #e9f0f5;
  --line: #c9d5de;
  --blue: #2d6f9f;
  --cyan: #2f7f91;
  --green: #388568;
}

html[data-accent="violet"] {
  --bg: #f3f1f7;
  --side: #eae6f1;
  --surface: #fefcff;
  --surface2: #eeeaf4;
  --line: #d5ccdf;
  --blue: #74539d;
  --cyan: #655e9e;
  --green: #4f806a;
}

html[data-accent="amber"] {
  --bg: #f6f2e9;
  --side: #eee7d8;
  --surface: #fffdf8;
  --surface2: #f2ebdd;
  --line: #d9cdb9;
  --blue: #946216;
  --cyan: #8b6d28;
  --green: #547b4e;
}

html[data-accent="coral"] {
  --bg: #f7f0ed;
  --side: #f0e4df;
  --surface: #fffdfa;
  --surface2: #f4e9e4;
  --line: #ddcdc5;
  --blue: #ad503d;
  --cyan: #9d5d50;
  --green: #4f8067;
}

html[data-theme="dark"] {
  --accent-ink: #0a130e;
}

html[data-theme="dark"][data-accent="ocean"] {
  --bg: #10171d;
  --side: #0c1217;
  --surface: #151e25;
  --surface2: #1b2933;
  --line: #304451;
  --blue: #67b5ea;
  --cyan: #67c2cf;
  --green: #74c69e;
}

html[data-theme="dark"][data-accent="violet"] {
  --bg: #15131b;
  --side: #100e16;
  --surface: #1d1924;
  --surface2: #292134;
  --line: #463951;
  --blue: #bd94e8;
  --cyan: #a8a1ec;
  --green: #82c7a3;
}

html[data-theme="dark"][data-accent="amber"] {
  --bg: #19160f;
  --side: #131008;
  --surface: #211d14;
  --surface2: #302818;
  --line: #4d4028;
  --blue: #e8b95f;
  --cyan: #d6bd72;
  --green: #91c580;
}

html[data-theme="dark"][data-accent="coral"] {
  --bg: #191310;
  --side: #130d0b;
  --surface: #211917;
  --surface2: #30221e;
  --line: #4e3932;
  --blue: #f08e75;
  --cyan: #dea08f;
  --green: #82c49f;
}

.primary {
  background: var(--blue);
  color: var(--accent-ink);
}

.logo {
  background: var(--blue);
  color: var(--accent-ink);
}

.workspace-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface2) 76%, transparent);
}

.topbar > div:first-of-type {
  flex: 0 0 auto;
  min-width: 178px;
}

#topbar-title {
  white-space: nowrap;
}

.workspace-mode-switch button {
  min-width: 0;
  min-height: 52px;
  padding: 7px 6px;
  border: 0;
  border-radius: 7px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.workspace-mode-switch button span {
  grid-row: 1 / 3;
  font-size: 14px;
}

.workspace-mode-switch button b {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.workspace-mode-switch button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-mode-switch button:hover {
  color: var(--text);
}

.workspace-mode-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 10%, transparent);
}

.workspace-mode-hint {
  min-height: 35px;
  margin: 0 5px 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.nav-item.mode-hidden {
  display: none !important;
}

.role-hidden {
  display: none !important;
}

.accent-picker {
  display: grid;
  gap: 6px;
  margin: 16px 4px 0;
  color: var(--muted);
}

.accent-picker > span {
  font-size: 11px;
  font-weight: 650;
}

.accent-picker .custom-select-trigger {
  min-height: 40px;
  border-radius: 8px;
  font-size: 12px;
}

html[data-workspace-mode="analysis"] #take-next-lead,
html[data-workspace-mode="analysis"] #lead-dialog .lead-claim-box,
html[data-workspace-mode="analysis"] #lead-dialog .quick-actions {
  display: none !important;
}

#lead-dialog {
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}

#lead-dialog .lead-dialog-card {
  max-height: calc(100dvh - 26px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#lead-dialog .lead-dialog-card h2 {
  font-size: clamp(28px, 4.2vw, 38px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

#lead-dialog .dialog-muted {
  margin-top: 9px;
}

#lead-dialog .dialog-requisites {
  padding: 18px;
}

#lead-dialog .dialog-requisites > div:first-child,
#lead-dialog .requisites-heading {
  display: grid;
  grid-template-columns: minmax(170px, .55fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

#lead-dialog .dialog-requisites > div:first-child small,
#lead-dialog .requisites-heading span {
  max-width: none;
  text-align: left;
  font-size: 12px;
  line-height: 1.55;
}

#lead-dialog .dialog-requisites strong {
  font-size: 15px;
  line-height: 1.35;
}

#lead-dialog .requisites-actions {
  margin-top: 14px;
}

#lead-dialog .lead-data-health {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border-radius: 10px;
}

#lead-dialog .lead-data-health strong,
#lead-dialog .lead-claim-box strong {
  font-size: 16px;
  line-height: 1.3;
}

#lead-dialog .lead-data-health small,
#lead-dialog .lead-claim-box small {
  font-size: 12px;
  line-height: 1.5;
}

#lead-dialog .lead-data-health button,
#lead-dialog .lead-claim-box > button {
  white-space: nowrap;
}

#lead-dialog .lead-claim-box {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
}

#lead-dialog .lead-transfer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

#lead-dialog .lead-transfer label {
  display: grid;
  gap: 7px;
}

#lead-dialog .lead-transfer label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

#lead-dialog .lead-transfer .custom-select-trigger {
  min-height: 48px;
}

#lead-dialog .lead-transfer > button {
  min-height: 48px;
  white-space: nowrap;
}

.guide-mode-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.guide-mode-choice article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
}

.guide-mode-choice i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}

.guide-mode-choice span {
  display: grid;
  gap: 3px;
}

.guide-mode-choice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .workspace-mode-switch {
    margin-top: -8px;
  }

  #lead-dialog .dialog-requisites > div:first-child,
  #lead-dialog .requisites-heading,
  #lead-dialog .lead-data-health,
  #lead-dialog .lead-claim-box {
    grid-template-columns: 1fr;
  }

  #lead-dialog .lead-data-health button,
  #lead-dialog .lead-claim-box > button {
    width: 100%;
  }

  #lead-dialog .lead-transfer {
    grid-template-columns: 1fr;
  }

  #lead-dialog .lead-transfer > button {
    width: 100%;
  }

  .guide-mode-choice {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1320px) and (min-width: 981px) {
  .safety {
    display: none;
  }
}

.integration-logo.agent {
  background: color-mix(in srgb, var(--blue) 16%, var(--surface2));
  color: var(--blue);
}

.integration-logo.telegram {
  background: color-mix(in srgb, #2aabee 18%, var(--surface2));
  color: #2aabee;
}

.integration-logo.telegram svg {
  width: 22px;
  height: 22px;
}

.telegram-setup-note {
  display: grid;
  gap: 5px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface2));
}

.telegram-setup-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.telegram-notification-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.telegram-notification-form > label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

#workspace-agent-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.agent-token-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.agent-token-create input,
.agent-token-secret {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.agent-token-create input {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.agent-token-secret {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 14px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
}

.agent-token-secret code {
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 12px;
}

.agent-token-secret small,
.agent-token-list span {
  color: var(--muted);
}

.agent-token-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.agent-token-list article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.agent-token-list article > div {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

@media (max-width: 720px) {
  .agent-token-create {
    grid-template-columns: 1fr;
  }
}

.lead-payment {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.lead-payment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lead-payment-heading > div {
  display: grid;
  gap: 5px;
}

.lead-payment-heading strong {
  font-size: 1.05rem;
}

.lead-payment-heading small,
.lead-payment .note {
  color: var(--muted);
}

.payment-provider {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 9px;
  background: #7f3cff;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.02em;
}

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

.lead-payment-actions a {
  text-decoration: none;
}

.lead-payment-actions .is-disabled {
  opacity: .45;
  pointer-events: none;
}

@media (max-width: 680px) {
  .lead-payment {
    padding: 18px;
  }

  .lead-payment-heading {
    align-items: center;
  }
}
