@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #141b24;
  --muted: #667085;
  --line: #d8e0ea;
  --line-soft: #e7edf4;
  --header: #0f172a;
  --header-soft: #1e293b;
  --primary: #0f766e;
  --primary-hover: #0b665f;
  --primary-soft: #e7f4f1;
  --blue: #1d4ed8;
  --blue-hover: #1e40af;
  --danger: #b42318;
  --row: #fbfcfd;
  --focus: #0f766e;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea,
table {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  width: 100%;
  background: var(--header);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.topbar__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 68px;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar__inner--login {
  justify-content: flex-start;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 44px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand__logo {
  display: block;
  width: auto;
  max-width: 200px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
}

.brand__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.brand__copy {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.brand__name {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav__link {
  color: #e5e7eb;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.nav__link:hover,
.nav__link--active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.nav__link--logout {
  color: rgba(229, 231, 235, 0.78);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}

.page--wide {
  max-width: 1180px;
}

.page--dashboard,
.page--contracts {
  max-width: 980px;
}

.page-header {
  margin: 8px 0 18px;
}

.page-header h1 {
  font-size: 28px;
}

.page-header p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.module-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.module-card__body {
  display: grid;
  gap: 8px;
}

.module-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.module-card__settings-link {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  background: #f3fbf5;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.module-card__settings-link:hover {
  border-color: var(--primary);
  background: #e9f8ee;
  color: var(--primary-hover);
  text-decoration: none;
}

.module-card h2 {
  font-size: 18px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.search-panel {
  max-width: 760px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}

.panel--error {
  border-color: #f3b4ae;
}

.panel__header {
  margin-bottom: 14px;
}

.panel__header--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: 22px;
  font-weight: 700;
}

h2 {
  font-size: 16px;
  font-weight: 700;
}

.muted {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel__intro {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.billing-progress {
  margin: 0;
}

.billing-progress__track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf1;
}

.billing-progress__fill {
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
}

.billing-progress__fill--ok {
  background: #16a34a;
}

.billing-progress__fill--warning {
  background: #facc15;
}

.billing-progress__fill--danger {
  background: #f97316;
}

.billing-progress__fill--critical {
  background: #dc2626;
}

.billing-widget {
  width: 100%;
  max-width: 280px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.billing-widget--ok {
  border-left-color: #0f766e;
}

.billing-widget--warning {
  border-left-color: #d99a00;
}

.billing-widget--danger {
  border-left-color: #c96a13;
}

.billing-widget--critical,
.billing-widget--invalid_config {
  border-left-color: #dc2626;
}

.billing-widget--not_configured,
.billing-widget--bigquery_not_implemented {
  border-left-color: #667085;
}

.billing-widget__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.billing-widget__amount {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.billing-widget__amount span,
.billing-widget__percent,
.billing-widget__updated,
.billing-widget__empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.billing-widget__percent {
  margin: 2px 0 8px;
}

.billing-widget__updated {
  margin: 8px 0 0;
  line-height: 1.35;
}

.billing-widget__empty {
  line-height: 1.4;
}

.billing-progress--compact .billing-progress__track {
  height: 5px;
}

@media (min-width: 1200px) {
  .billing-widget {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 20;
    width: 220px;
    margin: 0;
  }
}

.form {
  display: grid;
  gap: 16px;
}

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

.form-grid--primary {
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  color: #344054;
  font-size: 14px;
  line-height: 1.25;
}

.field__hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.advanced {
  border-top: 1px solid var(--line-soft);
  padding-top: 2px;
}

.advanced__toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.advanced__toggle:hover,
.advanced__toggle:focus {
  border-color: #d8e0ea;
  background: #f4f7fa;
}

.advanced__toggle strong,
.advanced__toggle small {
  display: block;
}

.advanced__toggle strong {
  font-size: 14px;
  font-weight: 700;
}

.advanced__toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.advanced__chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid #7a8696;
  border-bottom: 2px solid #7a8696;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.advanced.is-open .advanced__chevron {
  transform: rotate(225deg);
}

.advanced__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}

.advanced.is-open,
.advanced.is-open .advanced__content,
.advanced.is-open .advanced__inner {
  overflow: visible;
}

.advanced__inner {
  padding-top: 14px;
}

.advanced--technical {
  border-top: 0;
  padding-top: 0;
}

.advanced--technical .advanced__inner {
  padding-top: 12px;
}

.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 1;
  vertical-align: middle;
  z-index: 1;
}

.tooltip:hover,
.tooltip:focus-within {
  z-index: 1001;
}

.tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #f7f9fb;
  color: #7a8696;
  cursor: help;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tooltip__trigger:hover,
.tooltip__trigger:focus {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.tooltip__content {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 10px);
  z-index: 1002;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(16, 24, 40, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(50%, 2px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  visibility: hidden;
  white-space: normal;
}

.tooltip:hover .tooltip__content,
.tooltip:focus-within .tooltip__content {
  opacity: 1;
  transform: translate(50%, 0);
  visibility: visible;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 9px 11px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input,
select {
  height: 44px;
}

textarea {
  min-height: 90px;
  line-height: 1.45;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.settings {
  display: grid;
  gap: 9px;
  padding-top: 0;
}

.settings--advanced {
  margin-top: 14px;
}

.settings__title {
  font-size: 15px;
}

.settings__list {
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  color: #344054;
  font-size: 14px;
  font-weight: 500;
}

.check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.check > span {
  line-height: 1.3;
}

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

.actions--inline {
  justify-content: flex-end;
}

.action-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.actions--inline .tooltip__content {
  right: 0;
  transform: translateY(2px);
}

.actions--inline .tooltip:hover .tooltip__content,
.actions--inline .tooltip:focus-within .tooltip__content {
  transform: translateY(0);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #b9c3cf;
  border-radius: 8px;
  background: #ffffff;
  color: #263444;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.button--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  min-height: 44px;
  padding: 9px 18px;
}

.button--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.button--crm {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.button--crm:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: #ffffff;
}

.button--disabled,
.button:disabled {
  border-color: #d8e0ea;
  background: #eef2f6;
  color: #7a8696;
  cursor: not-allowed;
}

.button--disabled:hover,
.button:disabled:hover {
  border-color: #d8e0ea;
  background: #eef2f6;
  color: #7a8696;
}

.legal-note,
.subtle-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subtle-note {
  background: #ffffff;
}

.contract-form {
  gap: 14px;
}

.contract-form .panel {
  margin-bottom: 0;
}

.check--block {
  align-items: flex-start;
  padding: 4px 0;
}

.textarea--large {
  min-height: 140px;
}

.contract-actions {
  margin-top: 2px;
}

.contract-secondary-actions {
  margin-top: 16px;
}

.contracts-history-table {
  min-width: 860px;
}

.preview-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.preview-list__item {
  display: grid;
  grid-template-columns: minmax(180px, 30%) 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.preview-list__item:last-child {
  border-bottom: 0;
}

.preview-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.preview-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.crm-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.crm-action__hint,
.crm-unavailable {
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.crm-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.crm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.crm-summary__item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.crm-summary__item span {
  color: var(--muted);
  font-size: 13px;
}

.crm-summary__item strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.crm-summary__item--error strong {
  color: var(--danger);
}

.crm-report-block {
  margin-top: 18px;
}

.crm-report-block h2 {
  margin-bottom: 8px;
}

.crm-report-list {
  margin: 0;
  padding: 12px 12px 12px 30px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
}

.crm-report-list--errors {
  border-color: #f3b4ae;
  background: #fff7f6;
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  font-size: 14px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f6f9;
  color: #293341;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

tbody tr:nth-child(even) {
  background: var(--row);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.results-table,
.history-table {
  min-width: 0;
  table-layout: fixed;
}

.results-table {
  font-size: 13px;
}

.history-table {
  font-size: 14px;
}

.col-score {
  width: 6%;
}

.col-company {
  width: 24%;
}

.col-phone {
  width: 13%;
}

.col-city {
  width: 9%;
}

.col-industry {
  width: 10%;
}

.col-rating {
  width: 8%;
}

.col-website {
  width: 11%;
}

.col-query {
  width: 14%;
}

.col-map {
  width: 5%;
}

.cell-company,
.cell-query {
  overflow-wrap: anywhere;
}

.cell-phone {
  white-space: nowrap;
}

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

.summary-item {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

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

.summary-item strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.history-search {
  max-width: 440px;
  margin: 0 0 14px;
}

.report,
.detail-block pre {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  color: #e5e7eb;
  overflow-x: auto;
  white-space: pre-wrap;
}

.detail-block {
  margin-top: 18px;
}

.detail-block h2 {
  margin-bottom: 8px;
}

.error-message {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
}

.login-body {
  min-height: 100vh;
}

.login-page {
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

.login-page .topbar {
  position: relative;
  z-index: 2;
}

.login-background-logo {
  position: fixed;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(1050px, 82vw);
  max-width: none;
  height: auto;
  opacity: 0.055;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -50%);
}

.login-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 32px 16px 48px;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card__header {
  margin-bottom: 18px;
}

.login-form {
  gap: 14px;
}

.login-form .button {
  width: 100%;
  margin-top: 2px;
}

.login-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #f3b4ae;
  border-radius: 8px;
  background: #fff7f6;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.empty,
.empty-cell {
  padding: 14px;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 8px;
}

.empty-cell {
  text-align: center;
}

@media (max-width: 760px) {
  .topbar__inner,
  .panel__header--split {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar__inner {
    gap: 12px;
    min-height: 0;
    padding: 10px 16px;
  }

  .brand {
    gap: 10px;
  }

  .brand__mark {
    height: 36px;
  }

  .brand__logo {
    max-width: 150px;
    max-height: 36px;
  }

  .brand__copy {
    min-height: 28px;
    padding-left: 10px;
  }

  .brand__name {
    font-size: 18px;
  }

  .nav {
    width: 100%;
    gap: 6px;
  }

  .topbar__inner--login {
    align-items: flex-start;
  }

  .nav__link {
    padding: 6px 9px;
    font-size: 14px;
  }

  .page {
    padding: 20px 14px 36px;
  }

  .login-main {
    min-height: calc(100vh - 56px);
    padding: 24px 16px 36px;
    place-items: start center;
  }

  .login-background-logo {
    top: 50%;
    width: 520px;
    max-width: 92vw;
    opacity: 0.035;
  }

  .login-card {
    padding: 18px;
  }

  .panel {
    padding: 16px;
  }

  .search-panel,
  .billing-widget {
    max-width: none;
  }

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

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

  .module-card {
    min-height: 0;
  }

  .settings__list {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

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

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

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .results-table,
  .history-table,
  .results-table tbody,
  .history-table tbody,
  .results-table tr,
  .history-table tr,
  .results-table td,
  .history-table td {
    display: block;
    width: 100%;
  }

  .results-table,
  .history-table {
    min-width: 0;
  }

  .results-table thead,
  .history-table thead {
    display: none;
  }

  .results-table tr,
  .history-table tr {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  .results-table td,
  .history-table td {
    display: grid;
    grid-template-columns: minmax(100px, 38%) 1fr;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-soft);
    overflow-wrap: anywhere;
  }

  .cell-phone {
    white-space: normal;
  }

  .results-table td::before,
  .history-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .results-table tr:last-child td,
  .history-table tr:last-child td,
  .results-table td:last-child,
  .history-table td:last-child {
    border-bottom: 0;
  }

  .results-table .empty-cell,
  .history-table .empty-cell {
    display: block;
    text-align: center;
  }

  .results-table .empty-cell::before,
  .history-table .empty-cell::before {
    content: none;
  }

  .action-with-help {
    width: 100%;
  }

  .action-with-help .button {
    flex: 1 1 auto;
    width: auto;
  }

  .button {
    width: 100%;
  }

  .crm-action {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .crm-action__hint,
  .crm-unavailable {
    max-width: none;
  }

  .crm-summary {
    grid-template-columns: 1fr;
  }

  .preview-list__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 420px) {
  .brand__logo {
    max-width: 128px;
  }

  .brand__name {
    font-size: 17px;
  }

  .nav__link {
    padding: 6px 8px;
  }
}
