:root {
  font-family: "Inter", system-ui, sans-serif;
  color: #143043;
  background: #dfeef6;
  --page-bg-1: #dcecf5;
  --page-bg-2: #edf5fa;
  --page-bg-3: #d7e7f1;
  --text-main: #143043;
  --text-soft: #4f6879;
  --panel-bg: rgba(248, 252, 255, 0.94);
  --panel-bg-strong: #f7fbfe;
  --panel-border: #bfd5e2;
  --panel-border-strong: #c8dce8;
  --panel-shadow: 0 18px 42px rgba(7, 42, 63, 0.11);
  --panel-shadow-soft: 0 10px 26px rgba(7, 42, 63, 0.07);
  --accent-primary: #12bee9;
  --accent-strong: #0f88b5;
  --accent-dark: #0c4561;
  --accent-soft: #dff3fb;
  --table-head: #deedf5;
  --table-head-strong: #d7e8f1;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(18, 190, 233, 0.16) 0%, transparent 24%),
    radial-gradient(circle at top right, rgba(12, 69, 97, 0.13) 0%, transparent 22%),
    linear-gradient(180deg, var(--page-bg-1) 0%, var(--page-bg-2) 32%, var(--page-bg-3) 100%);
  color: var(--text-main);
}

header {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  padding: 36px 48px 28px;
  background: url('/header-bg.png') center center / cover no-repeat;
  border-bottom: 1px solid #0f3850;
  color: #ffffff;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 34, 52, 0.94) 0%, rgba(5, 34, 52, 0.84) 32%, rgba(5, 34, 52, 0.42) 58%, rgba(5, 34, 52, 0.16) 100%),
    radial-gradient(circle at 18% 24%, rgba(36, 208, 255, 0.16) 0%, transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 30%, rgba(7, 42, 63, 0.18) 100%);
}

header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 42, 63, 0) 0%, rgba(7, 42, 63, 0.14) 48%, rgba(220, 236, 245, 0.66) 100%);
}

.header-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  padding: 16px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(6, 35, 52, 0.26) 0%, rgba(6, 35, 52, 0.12) 100%);
  box-shadow: 0 18px 42px rgba(4, 18, 29, 0.18);
}

header h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(40px, 7.2vw, 96px);
  font-weight: 800;
  line-height: 0.92;
  text-shadow: 0 6px 18px rgba(2, 12, 20, 0.35);
}

.header-brand__lead {
  color: #ffffff;
}

.header-brand__radar {
  color: #24d0ff;
}

header p {
  margin: 0;
  color: #eefaff;
  font-size: clamp(18px, 2.2vw, 38px);
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: lowercase;
  text-shadow: 0 4px 14px rgba(2, 12, 20, 0.25);
}

main {
  padding: 24px 48px 48px;
  position: relative;
}

body.auth-required {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(238, 247, 252, 0.94);
  backdrop-filter: blur(14px);
  z-index: 2000;
}

.auth-gate.is-active {
  display: flex;
}

.auth-gate__panel {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(130, 175, 202, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 250, 255, 0.96) 100%);
  box-shadow: 0 28px 60px rgba(7, 42, 63, 0.18);
}

.auth-gate__brand {
  margin-bottom: 20px;
}

.auth-gate__brand h2 {
  margin: 0 0 10px;
}

.auth-gate__brand p {
  margin: 0;
  color: var(--text-soft);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.auth-form label.is-hidden,
.auth-form [hidden] {
  display: none !important;
}

.auth-form input,
.auth-form select,
.admin-create-form input,
.admin-create-form select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #b7d0de;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 252, 0.98) 100%);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.auth-form input:focus,
.auth-form select:focus,
.admin-create-form input:focus,
.admin-create-form select:focus {
  outline: none;
  border-color: rgba(36, 208, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(36, 208, 255, 0.16);
}

.auth-status {
  margin: 0;
  min-height: 24px;
  color: var(--text-soft);
}

.auth-status.is-error {
  color: #b91c1c;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.theme-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}

.user-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-center {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(106, 152, 176, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 42, 63, 0.08);
}

.notification-bell[hidden],
.notification-panel[hidden],
.notification-bell__badge[hidden] {
  display: none !important;
}

.notification-bell__glyph {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.notification-bell__badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid rgba(130, 175, 202, 0.45);
  border-radius: 16px;
  background: rgba(248, 252, 255, 0.98);
  box-shadow: 0 24px 54px rgba(7, 42, 63, 0.18);
}

.notification-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(130, 175, 202, 0.28);
}

.notification-panel__header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text-main);
}

.notification-panel__header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.notification-list {
  max-height: min(520px, calc(100vh - 230px));
  overflow: auto;
}

.notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid rgba(130, 175, 202, 0.18);
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.notification-item:hover {
  background: rgba(18, 190, 233, 0.08);
}

.notification-item.is-unread {
  background: rgba(37, 99, 235, 0.06);
}

.notification-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-item__title {
  font-weight: 800;
}

.notification-item__time {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 12px;
}

.notification-item__message {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.notification-item__severity {
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}

.notification-item__severity--success {
  background: #16a34a;
}

.notification-item__severity--warning {
  background: #ca8a04;
}

.notification-item__severity--error {
  background: #dc2626;
}

.user-toolbar__badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(106, 152, 176, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
}

.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 104px;
  padding: 4px;
  border: 1px solid #a8cede;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9fcfe 0%, var(--accent-soft) 100%);
  box-shadow: 0 8px 20px rgba(7, 42, 63, 0.08);
  cursor: pointer;
  user-select: none;
}

.theme-switch__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-switch__option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 36px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1;
  transition: color 140ms ease;
}

.theme-switch__option--moon {
  font-size: 20px;
  transform: translateX(1px);
}

.theme-switch__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  box-shadow: 0 10px 20px rgba(15, 136, 181, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.theme-switch__input:checked ~ .theme-switch__thumb {
  transform: translateX(48px);
}

.theme-switch__input:not(:checked) ~ .theme-switch__option--sun,
.theme-switch__input:checked ~ .theme-switch__option--moon {
  color: #ffffff;
}

.theme-switch__input:checked ~ .theme-switch__option--sun,
.theme-switch__input:not(:checked) ~ .theme-switch__option--moon {
  color: var(--accent-dark);
}

.theme-switch:hover .theme-switch__thumb {
  filter: saturate(1.03);
}

.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.tabs--secondary {
  justify-content: flex-end;
}

.tab-button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2a37;
  cursor: pointer;
  font-weight: 600;
}

.tab-button.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

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

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

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

.history-panel__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.history-panel__header h2 {
  margin: 0 0 8px;
}

.history-panel__header p,
.history-status {
  margin: 0;
  color: var(--text-soft);
}

.history-run-summary {
  font-weight: 700;
  color: var(--text-main);
}

.history-run-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.history-row.is-opened td {
  background: rgba(18, 190, 233, 0.08);
}

.crm-panel {
  display: grid;
  gap: 16px;
}

.crm-panel .history-panel__actions button,
.crm-deal-form .label-form__actions button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #0f88b5;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.crm-panel .history-panel__actions .secondary-button {
  border-color: #a8cede;
  background: linear-gradient(180deg, #f9fcfe 0%, var(--accent-soft) 100%);
  color: var(--accent-strong);
}

.crm-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(130px, 0.75fr) minmax(150px, 0.85fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(130, 175, 202, 0.32);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.82);
}

.crm-filters label,
.crm-deal-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
}

.crm-filters input,
.crm-filters select,
.crm-deal-edit-form input,
.crm-deal-edit-form select,
.crm-deal-edit-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #b7d0de;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
}

.crm-filters__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-filters__actions button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #0f88b5;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.crm-filters__actions .secondary-button {
  border-color: #a8cede;
  background: linear-gradient(180deg, #f9fcfe 0%, var(--accent-soft) 100%);
  color: var(--accent-strong);
}

.crm-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.crm-column {
  min-width: 220px;
  border: 1px solid rgba(130, 175, 202, 0.35);
  border-top: 4px solid var(--crm-stage-color, var(--accent-strong));
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.86);
  box-shadow: var(--panel-shadow-soft);
}

.crm-column__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(130, 175, 202, 0.28);
}

.crm-column__header h3 {
  margin: 0;
  font-size: 14px;
}

.crm-column__header span {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f6fb;
  color: var(--accent-dark);
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}

.crm-column__deals {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.crm-column__empty,
.crm-company-results__empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.crm-deal-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(130, 175, 202, 0.34);
  border-radius: 8px;
  background: #ffffff;
}

.crm-deal-card__title {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.crm-deal-card__title:hover {
  color: var(--accent-strong);
}

.crm-deal-card__meta {
  display: grid;
  gap: 3px;
  color: var(--text-soft);
  font-size: 12px;
}

.crm-deal-card__comment {
  margin: 0;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.crm-deal-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-stage-select {
  min-width: 130px;
  max-width: 100%;
  padding: 7px 8px;
  border: 1px solid #b7d0de;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  font-size: 12px;
}

.crm-requests {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.74);
}

.crm-requests__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-requests__header h3 {
  margin: 0;
  font-size: 14px;
}

.crm-requests__header span {
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.crm-requests__list {
  display: grid;
  gap: 8px;
}

.crm-request-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  background: #ffffff;
}

.crm-request-card div:first-child {
  display: grid;
  gap: 3px;
}

.crm-request-card span,
.crm-request-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.crm-request-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-company-results {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.crm-company-result,
.crm-company-selected {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #c7ddea;
  border-radius: 8px;
  background: #f8fcff;
  color: var(--text-main);
}

.crm-company-result {
  text-align: left;
  cursor: pointer;
}

.crm-company-result:hover {
  border-color: var(--accent-strong);
  background: #eef9fd;
}

.crm-company-result span,
.crm-company-selected span {
  color: var(--text-soft);
  font-size: 12px;
}

.crm-company-selected {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.crm-company-selected div {
  display: grid;
  gap: 4px;
}

.crm-deal-info__content {
  display: grid;
  gap: 14px;
}

#crmDealInfoDialog {
  width: min(980px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: hidden;
}

#crmDealInfoDialog .crm-deal-info {
  box-sizing: border-box;
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
}

.crm-deal-info .label-form__header {
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(130, 175, 202, 0.26);
}

.crm-deal-info .label-form__header > div {
  min-width: 0;
}

.crm-deal-info .label-form__header h2 {
  max-width: 820px;
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.crm-deal-info .label-info-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crm-deal-info .label-info-list div {
  min-width: 0;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
}

.crm-deal-info .label-info-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-deal-edit-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(130, 175, 202, 0.3);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.84);
}

.crm-deal-edit-form__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.45fr) minmax(190px, 0.55fr);
  gap: 10px;
}

.crm-deal-edit-form label {
  min-width: 0;
}

.crm-deal-edit-form input,
.crm-deal-edit-form select,
.crm-deal-edit-form textarea {
  min-width: 0;
}

.crm-deal-edit-form textarea {
  min-height: 92px;
  resize: vertical;
}

.crm-deal-edit-form .crm-deal-info__actions {
  justify-content: flex-end;
}

.crm-deal-info__actions {
  justify-content: flex-start;
}

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

.crm-event-list h3 {
  margin: 0;
  font-size: 14px;
}

.crm-event-list article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.crm-event-list span {
  color: var(--text-soft);
  font-size: 12px;
}

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

.admin-panel__header h2 {
  margin: 0 0 8px;
}

.admin-panel__header p,
.admin-status {
  margin: 0;
  color: var(--text-soft);
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(130, 175, 202, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(241, 248, 252, 0.9) 100%);
  box-shadow: var(--panel-shadow-soft);
}

.admin-create-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.admin-engine-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(130, 175, 202, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(241, 248, 252, 0.9) 100%);
  box-shadow: var(--panel-shadow-soft);
}

.admin-engine-panel[hidden],
.admin-system-logs[hidden] {
  display: none;
}

.admin-engine-panel h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.admin-engine-panel p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.admin-engine-panel label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.admin-system-logs {
  display: grid;
  gap: 16px;
}

.admin-system-logs__filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(130, 175, 202, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(241, 248, 252, 0.88) 100%);
  box-shadow: var(--panel-shadow-soft);
}

.admin-system-logs__filters label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.admin-system-logs__filters select {
  width: 100%;
}

.system-log-row.is-error td {
  background: rgba(239, 68, 68, 0.05);
}

.system-log-row.is-success td {
  background: rgba(34, 197, 94, 0.04);
}

.auth-form button,
.admin-panel__header > button,
.admin-create-form > button {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 136, 181, 0.18);
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 136, 181, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.auth-form button:hover,
.admin-panel__header > button:hover,
.admin-create-form > button:hover {
  transform: translateY(-1px);
  filter: saturate(1.03);
  box-shadow: 0 14px 28px rgba(15, 136, 181, 0.28);
}

.admin-panel__header > .secondary-button {
  border-color: #a8cede;
  background: linear-gradient(180deg, #f9fcfe 0%, var(--accent-soft) 100%);
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(7, 42, 63, 0.08);
}

.admin-panel__header > .secondary-button:hover {
  box-shadow: 0 10px 22px rgba(7, 42, 63, 0.12);
}

.empty-state {
  color: var(--text-soft);
  text-align: center;
}

.admin-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-action {
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(16, 111, 151, 0.35);
  background: linear-gradient(135deg, rgba(243, 250, 254, 0.98) 0%, rgba(220, 243, 251, 0.98) 100%);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mini-action.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96) 0%, rgba(254, 226, 226, 0.98) 100%);
  color: #b91c1c;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.controls-header,
.query-block__header,
.global-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.controls-header h2,
.query-block__header h3 {
  margin: 0;
  font-size: 18px;
}

.controls-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.preset-dropdown {
  position: relative;
}

.preset-dropdown summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.preset-dropdown summary::-webkit-details-marker {
  display: none;
}

.preset-dropdown summary::after {
  content: 'v';
  margin-left: 8px;
  font-size: 11px;
}

.preset-dropdown[open] summary::after {
  content: '^';
}

.preset-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(420px, calc(100vw - 48px));
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.preset-list__empty {
  margin: 0;
  padding: 10px;
  color: #64748b;
  font-size: 13px;
}

.preset-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.preset-list__item + .preset-list__item {
  margin-top: 6px;
}

.controls .preset-list__apply {
  display: grid;
  gap: 2px;
  justify-items: start;
  align-self: stretch;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.controls .preset-list__apply span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.controls .preset-list__apply small {
  color: #64748b;
}

.controls .preset-list__apply:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.controls .preset-list__delete {
  align-self: stretch;
  width: 38px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #dc2626;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.controls .preset-list__delete:hover {
  border-color: #dc2626;
  background: #fee2e2;
}

.query-block__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.query-block__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  padding: 8px 12px;
}

.query-block__toggle input {
  margin: 0;
}

.query-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-mode-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 14px 16px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #f8fbff;
}

.search-mode-panel__hint {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.share-run-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 14px 16px;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  background: #f8fbff;
}

.share-run-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.share-run-panel__hint {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.query-block {
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fbff;
}

.query-block__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 12px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.region-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.controls input,
.controls select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.controls input:disabled,
.controls select:disabled {
  background: #eef2f7;
  color: #64748b;
  cursor: not-allowed;
}

.region-picker {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
}

.region-picker.is-disabled {
  opacity: 0.7;
  pointer-events: none;
}

.region-picker summary {
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.region-picker summary::-webkit-details-marker {
  display: none;
}

.region-picker__panel {
  border-top: 1px solid #e5e7eb;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.region-picker__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.region-picker__actions button {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
}

.region-picker__actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.region-picker__list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.region-option {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.region-option.is-selected {
  border-color: #93c5fd;
  background: #eff6ff;
}

.region-option input {
  margin-top: 2px;
}

.region-picker__empty {
  color: #64748b;
  font-size: 13px;
  padding: 4px 2px;
}

.controls button,
.secondary-button {
  align-self: end;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.controls button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-button,
.query-block__remove {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.controls .checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.global-controls {
  justify-content: flex-end;
}

.global-controls .checkbox {
  margin-right: auto;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.actions__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  padding: 8px 12px;
}

.actions__checkbox input {
  margin: 0;
}

.actions button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.actions .danger-button {
  border-color: #dc2626;
  background: #dc2626;
}

.actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result-post-filters {
  position: relative;
  color: #334155;
}

.result-post-filters summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #dbe3f0;
  border-radius: 999px;
  background: #ffffff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

.result-post-filters summary::-webkit-details-marker {
  display: none;
}

.result-post-filters[open] summary {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgb(14 116 144 / 12%);
}

.result-post-filters__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 8px;
  width: min(260px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgb(15 23 42 / 18%);
}

.result-post-filters__panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #0f3650;
}

.result-post-filters__panel input {
  margin: 0;
}

.archive-actions {
  align-items: stretch;
}

.archive-section-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.archive-section-tabs__left,
.archive-section-tabs__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.archive-section-tabs__right {
  margin-left: auto;
}

.results-section-tabs {
  margin-top: 4px;
}

.results-section-tabs__left,
.results-section-tabs__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.results-section-tabs__right {
  margin-left: auto;
}

.results-section-tabs__share {
  margin-right: 2px;
}

.archive-subsection {
  display: none;
}

.archive-subsection.is-active {
  display: block;
}

.archive-search,
.archive-limit {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
}

.archive-search {
  min-width: min(460px, 100%);
  flex: 1;
}

.archive-limit {
  min-width: 130px;
}

.archive-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

.archive-page-info {
  color: #334155;
  font-size: 14px;
}

.archive-pagination .secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.label-filters {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  background: #ffffff;
}

.label-filters__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.label-filters__header h2,
.label-filters__header p {
  margin: 0;
}

.label-filters__header p,
.label-filter-status {
  color: #64748b;
  font-size: 13px;
}

.label-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.label-filters__actions button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.label-filters__actions .secondary-button {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.label-filters__grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 260px) 1fr;
  gap: 12px;
  align-items: start;
}

.label-filters__grid label,
.label-status-filter {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.label-filters__grid input,
.label-filters__grid select {
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  background: #ffffff;
}

.label-status-filter__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.label-status-filter__item {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px !important;
  cursor: pointer;
}

.label-status-filter__item input {
  margin: 0;
}

.label-status-filter__item:has(input:checked) {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.label-status-filter__item:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.label-filter-status {
  margin: 12px 0 0;
}

.run-stats {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  background: #ffffff;
}

.run-stats__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.run-stats__header h2,
.run-stats__header p {
  margin: 0;
}

.run-stats__header p {
  color: #64748b;
  font-size: 13px;
}

.run-stats__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.run-stats__card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.run-stats__card span,
.run-stats__card small {
  color: #64748b;
  font-size: 12px;
}

.run-stats__card strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

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

.run-stats__details > div {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.run-stats__details h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.run-stats__list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: stats-list;
}

.run-stats__list li {
  counter-increment: stats-list;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #334155;
  min-width: 0;
}

.run-stats__list li::before {
  content: counter(stats-list) ".";
  flex: 0 0 auto;
  color: #94a3b8;
}

.run-stats__list span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-stats__list strong {
  flex: 0 0 auto;
  color: #0f172a;
}

.blacklist-action,
.remove-blacklist-action,
.label-action,
.company-card-action,
.checko-action,
.results-company-toggle {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dc2626;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.label-action {
  margin: 0 6px 6px 0;
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
}

.company-card-action {
  margin-top: 8px;
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.result-employer {
  display: grid;
  gap: 7px;
}

.result-employer__name {
  font-weight: 600;
  color: #123247;
}

.result-employer__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.result-employer__actions .company-card-action,
.result-employer__actions .checko-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px 8px;
  line-height: 1.2;
  text-decoration: none;
}

.result-vacancy-link--stacked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 6px;
  padding: 6px 8px;
  line-height: 1.2;
  text-decoration: none;
}

.result-employer__inn {
  color: #475569;
  font-size: 12px;
}

.result-contact-summary {
  display: grid;
  gap: 5px;
  line-height: 1.35;
}

.result-contact-summary strong,
.result-details-list dt {
  color: #123247;
  font-weight: 700;
}

.result-contact-time {
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.34);
}

.result-contact-time__line {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.result-contact-time__line .client-time__value {
  color: #0f766e;
  font-weight: 800;
}

.result-contact-time .client-time__region {
  display: block;
  max-width: none;
  margin-top: 2px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.result-details-list {
  display: grid;
  gap: 6px;
  margin: 0;
  line-height: 1.42;
}

.result-details-list div {
  display: block;
}

.result-details-list dt,
.result-details-list dd {
  display: inline;
  margin: 0;
}

.result-details-list dd {
  color: #27485d;
}

.vacancy-long-details-action {
  margin-top: 8px;
}

.vacancy-long-details {
  display: grid;
  gap: 16px;
}

.vacancy-long-details__section {
  display: grid;
  gap: 8px;
}

.vacancy-long-details__section h3 {
  margin: 0;
  color: #0f3f5e;
  font-size: 16px;
}

.vacancy-long-details__section p {
  margin: 0;
  color: #24465c;
  line-height: 1.55;
  white-space: pre-wrap;
}

.results-company-toggle {
  margin: 0 6px 6px 0;
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #6d28d9;
}

.results-company-inline-actions {
  margin-top: 8px;
}

.results-company-cell {
  cursor: pointer;
}

.results-company-cell:hover {
  background: #f8fbff;
}

.results-company-details-row td {
  background: #f8fbff;
  padding: 0;
}

.results-company-details {
  padding: 14px;
}

.results-company-details__summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: #334155;
}

.results-company-details__summary strong {
  color: #0f172a;
}

.results-company-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  overflow: hidden;
}

.results-company-table th,
.results-company-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.results-company-vacancy-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 140px;
}

.results-company-description {
  min-width: 260px;
  white-space: pre-wrap;
  line-height: 1.45;
  color: #334155;
}

.results-company-meta {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.results-company-meta strong {
  color: #0f172a;
}

.inn-with-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.checko-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
  text-decoration: none;
}

.checko-action:hover {
  border-color: #15803d;
  background: #dcfce7;
  color: #166534;
}

.archive-meta {
  margin-top: 8px;
}

.archive-meta--badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.archive-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.archive-badge--new {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.archive-badge--seen {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.archive-badge--off {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.archive-badge--personal {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
}

.label-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 8px;
  margin: 0 6px 6px 0;
  color: var(--label-text, #ffffff);
  background: var(--label-color, #16a34a);
  border: 1px solid var(--label-color, #16a34a);
  font-size: 12px;
  font-weight: 700;
}

button.label-badge {
  cursor: pointer;
  font-family: inherit;
}

.label-badge--clickable:hover {
  filter: brightness(0.94);
}

.label-badge--empty {
  color: #64748b;
  background: #f8fafc;
  border-color: #cbd5e1;
  font-weight: 600;
}

.label-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #dbe3f0;
  border-radius: 16px;
  padding: 0;
  color: #1f2a37;
  box-shadow: 0 24px 80px rgb(15 23 42 / 25%);
}

.label-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.company-card-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  border: 1px solid #dbe3f0;
  border-radius: 18px;
  padding: 0;
  color: #1f2a37;
  overflow: hidden;
  box-shadow: 0 24px 80px rgb(15 23 42 / 25%);
}

.company-card-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  max-height: min(860px, calc(100vh - 32px));
  padding: 20px;
  overflow: auto;
}

.company-card__content {
  display: grid;
  gap: 18px;
}

.company-card__section {
  display: grid;
  gap: 10px;
}

.company-card__danger-zone {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

.company-card__section h3 {
  margin: 0;
  font-size: 17px;
}

.company-card__section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.company-card__section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.company-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #b6dced;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f4f6d;
  font-size: 13px;
  font-weight: 700;
}

.company-card__toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.company-card__hint {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.company-card__client-time-banner {
  display: grid;
  grid-template-columns: minmax(28px, 1fr) auto minmax(28px, 1fr);
  align-items: center;
  gap: 12px;
  margin: -2px 0 2px;
}

.company-card__client-time-banner::before,
.company-card__client-time-banner::after {
  content: '';
  height: 1px;
  background: linear-gradient(90deg, transparent, #b6dced);
}

.company-card__client-time-banner::after {
  background: linear-gradient(90deg, #b6dced, transparent);
}

.company-card__client-time-pill {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 96px;
  padding: 7px 18px 8px;
  border: 1px solid #b6dced;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8feff, #eef9fd);
  box-shadow: 0 8px 18px rgb(14 116 144 / 10%);
}

.company-card__client-time-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.company-card__client-time-pill .client-time {
  font-size: 22px;
  line-height: 1;
}

.company-card__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.company-card__summary--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.company-card__summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.company-card__summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.company-card__summary strong {
  font-size: 14px;
  word-break: break-word;
}

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

.company-relation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d7e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.company-relation-item strong,
.company-relation-item span {
  display: block;
}

.company-relation-item span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.company-relation-open {
  border: 1px solid #a7d8ef;
  border-radius: 7px;
  background: #eef9ff;
  color: #0369a1;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.copy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.copy-value {
  display: inline;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed #2563eb;
  background: transparent;
  color: #1d4ed8;
  cursor: copy;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.copy-value:hover {
  color: #1e40af;
  border-bottom-color: #1e40af;
}

.copy-value--copied {
  color: #15803d;
  border-bottom-color: #15803d;
}

.copy-value--error {
  color: #b91c1c;
  border-bottom-color: #b91c1c;
}

.company-card__contacts-button {
  justify-self: start;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 700;
}

.company-card__contacts-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.company-card__row-action {
  padding: 6px 9px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff7f7;
  color: #b91c1c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.company-card__row-action:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.company-card__source-details {
  display: grid;
  gap: 6px;
}

.company-card__source-details summary {
  display: inline-flex;
  align-items: center;
  width: max-content;
  cursor: pointer;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.company-card__source-details ul {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 16px;
  color: #475569;
  font-size: 12px;
}

.company-card__danger-zone .danger-button {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ef4444;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
  font-weight: 800;
}

.company-card__danger-zone .danger-button:hover {
  background: #fee2e2;
}

.company-card__external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #0f766e;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.company-card__external-link:hover {
  border-color: #115e59;
  background: #ccfbf1;
  color: #115e59;
}

.company-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-card__empty {
  margin: 0;
  color: #64748b;
}

.company-card__table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.company-card__table {
  min-width: 760px;
}

.company-card__table th,
.company-card__table td {
  padding: 10px;
  font-size: 12px;
}

.client-time {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-weight: 800;
  color: #0f766e;
  white-space: normal;
}

.client-time__region {
  max-width: 180px;
  overflow-wrap: anywhere;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.company-card__vacancy-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.company-card__table-actions {
  display: flex;
  justify-content: center;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.vacancy-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.26);
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.vacancy-status-badge--inactive {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fee2e2;
  color: #991b1b;
}

.company-card__table tr.is-inactive-vacancy td {
  background: #fff7ed;
  color: #7c2d12;
}

.label-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.label-form__header,
.label-form__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.label-form__header h2,
.label-form__header p {
  margin: 0;
}

.label-form__header p,
.dialog-status {
  color: #64748b;
  font-size: 13px;
}

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

.bitrix24-import__actions button {
  min-height: 44px;
}

.dialog-close {
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.label-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.label-form input,
.label-form select,
.label-form textarea {
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.label-form textarea {
  resize: vertical;
}

.label-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-catalog-form {
  max-width: 760px;
}

.company-catalog-form__hint {
  margin-top: -4px;
  min-height: 18px;
}

.readonly-input {
  background: #f8fafc;
  color: #64748b;
}

.company-contact-editor {
  display: grid;
  gap: 12px;
}

.company-contact-editor__header,
.company-contact-editor__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.company-contact-editor__header h3 {
  margin: 0;
  font-size: 16px;
}

.company-contact-editor__list {
  display: grid;
  gap: 12px;
}

.company-contact-editor__item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(130, 175, 202, 0.32);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.company-contact-editor__item-header {
  grid-column: 1 / -1;
}

.company-contact-editor__source {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 12px;
  font-weight: 700;
}

.company-contact-display-toggle {
  width: 18px;
  height: 18px;
  accent-color: #0284c7;
}

.label-option-create {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.label-option-create input {
  flex: 1 1 260px;
}

.label-option-create button {
  flex: 0 0 auto;
}

.label-options-list {
  display: grid;
  gap: 10px;
}

.label-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.label-option-item__meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.label-option-item__meta strong {
  color: #0f172a;
  font-size: 14px;
}

.label-option-item__meta span {
  color: #64748b;
  font-size: 12px;
}

.label-option-item__remove {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.label-option-item__remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.label-color-preset {
  width: 28px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--preset-color);
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
}

.label-form__actions {
  align-items: center;
  justify-content: flex-end;
}

.label-form__actions button {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.label-form__actions .danger-button {
  margin-right: auto;
  border-color: #dc2626;
  background: #dc2626;
}

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

.label-info-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.label-info-list dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.label-info-list dd {
  margin: 0;
  white-space: pre-wrap;
}

.remove-blacklist-action {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.results {
  overflow: auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.results-pagination {
  margin: 10px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

th {
  background: #f3f4f6;
  text-align: left;
}

.results-table--vacancies {
  table-layout: fixed;
}

.results-table--vacancies th:nth-child(1) {
  width: 12%;
}

.results-table--vacancies th:nth-child(2) {
  width: 7%;
}

.results-table--vacancies th:nth-child(3) {
  width: 18%;
}

.results-table--vacancies th:nth-child(4) {
  width: 11%;
}

.results-table--vacancies th:nth-child(5) {
  width: 19%;
}

.results-table--vacancies th:nth-child(6) {
  width: 7%;
}

.results-table--vacancies th:nth-child(7) {
  width: 20%;
}

.results-table--vacancies th:nth-child(8) {
  width: 6%;
}

.results-table--vacancies th,
.results-table--vacancies td {
  overflow-wrap: anywhere;
  word-break: normal;
}

pre {
  white-space: pre-wrap;
  margin: 0;
  color: #27485d;
}

.tab-button {
  border-color: rgba(15, 136, 181, 0.24);
  background: rgba(244, 250, 254, 0.92);
  color: var(--accent-dark);
  box-shadow: var(--panel-shadow-soft);
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.tab-button:hover {
  border-color: rgba(18, 190, 233, 0.46);
  background: rgba(248, 252, 255, 0.98);
  transform: translateY(-1px);
}

.tab-button.is-active {
  border-color: #12bee9;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  box-shadow: 0 12px 30px rgba(15, 136, 181, 0.28);
}

.controls,
.label-filters,
.run-stats,
.results,
.label-dialog,
.company-card-dialog {
  background: var(--panel-bg);
  border-color: var(--panel-border);
  box-shadow: var(--panel-shadow);
}

.controls,
.label-filters,
.run-stats,
.results {
  border-radius: 16px;
}

.controls-header h2,
.query-block__header h3,
.label-filters__header h2,
.run-stats__header h2,
.run-stats__details h3,
.company-card__section h3,
.label-option-item__meta strong,
.results-company-details__summary strong,
.run-stats__card strong {
  color: #123247;
}

.controls-title,
.run-stats__header p,
.label-filters__header p,
.label-filter-status,
.search-mode-panel__hint,
.archive-page-info,
.matched-queries,
.run-stats__card span,
.run-stats__card small,
.run-stats__list li,
.results-company-description,
.results-company-meta,
.company-card__hint,
.company-card__empty,
.label-form__header p,
.dialog-status {
  color: var(--text-soft);
}

.query-block,
.search-mode-panel,
.run-stats__card,
.run-stats__details > div,
.company-card__summary div,
.company-card__table-wrap,
.label-option-item,
.label-info-list div,
.results-company-details {
  border-color: var(--panel-border-strong);
  background: linear-gradient(180deg, #f7fbfe 0%, #e9f3f8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.controls input,
.controls select,
.region-picker,
.archive-search,
.archive-limit,
.label-filters__grid input,
.label-filters__grid select,
.label-form input,
.label-form select,
.label-form textarea {
  border-color: #b7d0de;
  background: #f4f9fc;
  color: var(--text-main);
}

.controls input:focus,
.controls select:focus,
.label-filters__grid input:focus,
.label-filters__grid select:focus,
.label-form input:focus,
.label-form select:focus,
.label-form textarea:focus,
.archive-search:focus,
.archive-limit:focus,
.region-search-input:focus {
  outline: none;
  border-color: rgba(36, 208, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(36, 208, 255, 0.16);
}

.query-block__toggle,
.actions__checkbox,
.preset-dropdown summary,
.region-picker summary,
.region-option,
.label-status-filter__item,
.company-card__summary div span,
.label-info-list dt {
  color: var(--accent-dark);
}

.preset-dropdown summary,
.secondary-button,
.query-block__remove,
.region-picker__actions button,
.company-card__contacts-button,
.remove-blacklist-action {
  background: linear-gradient(180deg, #f9fcfe 0%, var(--accent-soft) 100%);
  border-color: #a8cede;
  color: var(--accent-strong);
  box-shadow: 0 6px 18px rgba(7, 42, 63, 0.06);
}

.controls button,
.label-filters__actions button,
.actions button,
.label-form__actions button,
.share-run-panel__actions button {
  border: 1px solid rgba(15, 136, 181, 0.18);
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent-primary) 100%);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 136, 181, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.controls button:hover,
.label-filters__actions button:hover,
.actions button:hover,
.label-form__actions button:hover,
.share-run-panel__actions button:hover,
.secondary-button:hover,
.query-block__remove:hover,
.preset-dropdown summary:hover,
.region-picker__actions button:hover,
.company-card__contacts-button:hover,
.remove-blacklist-action:hover,
.tab-button:hover {
  filter: saturate(1.03);
}

.controls button:hover,
.label-filters__actions button:hover,
.actions button:hover,
.label-form__actions button:hover,
.share-run-panel__actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 136, 181, 0.28);
}

.controls .secondary-button,
.label-filters__actions .secondary-button,
.actions .secondary-button,
.label-form__actions .secondary-button,
.share-run-panel__actions .secondary-button,
.query-block__remove {
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  border-color: #b6dced;
  color: var(--accent-strong);
  box-shadow: 0 6px 18px rgba(7, 42, 63, 0.06);
}

.controls .secondary-button:hover,
.label-filters__actions .secondary-button:hover,
.actions .secondary-button:hover,
.label-form__actions .secondary-button:hover,
.share-run-panel__actions .secondary-button:hover,
.query-block__remove:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(7, 42, 63, 0.08);
}

.company-card-action,
.label-action,
.checko-action,
.results-company-toggle,
.blacklist-action {
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease;
  box-shadow: 0 8px 18px rgba(7, 42, 63, 0.08);
}

.company-card-action:hover,
.label-action:hover,
.checko-action:hover,
.results-company-toggle:hover,
.blacklist-action:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
}

.company-card-action {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
  color: #1d4ed8;
}

.company-card-action:hover {
  border-color: rgba(29, 78, 216, 0.32);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.label-action {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #dff8f2 100%);
  color: #0f766e;
}

.label-action:hover {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.16);
}

.checko-action {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #dcfce7 100%);
  color: #15803d;
}

.checko-action:hover {
  border-color: rgba(21, 128, 61, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #d1fae5 100%);
  color: #166534;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.16);
}

.results-company-toggle {
  border-color: rgba(124, 58, 237, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #ede9fe 100%);
  color: #6d28d9;
}

.results-company-toggle:hover {
  border-color: rgba(109, 40, 217, 0.34);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.16);
}

.actions .danger-button,
.label-form__actions .danger-button,
.history-panel__actions .danger-button {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.18);
}

.blacklist-action {
  border-color: rgba(220, 38, 38, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #ffe3e7 100%);
  color: #dc2626;
}

.blacklist-action:hover {
  border-color: rgba(185, 28, 28, 0.34);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.16);
}

.controls .preset-list__apply,
.query-block__toggle,
.actions__checkbox,
.label-status-filter__item,
.region-option,
.region-picker,
.company-card__external-link {
  border-color: var(--panel-border-strong);
}

.controls .preset-list__apply,
.region-option,
.label-status-filter__item,
.actions__checkbox,
.query-block__toggle {
  background: linear-gradient(180deg, #fafcff 0%, #ebf4f9 100%);
}

.controls .preset-list__apply:hover,
.region-option.is-selected,
.label-status-filter__item:has(input:checked) {
  border-color: #7fc8e1;
  background: linear-gradient(180deg, #f2fbff 0%, #dff1f9 100%);
}

.archive-section-tabs,
.results-section-tabs,
.tabs {
  gap: 14px;
}

.results,
.company-card__table,
.results-company-table,
.company-card__table-wrap {
  background: rgba(255, 255, 255, 0.9);
}

.crm-column,
.crm-deal-card,
.crm-request-card,
.crm-company-result,
.crm-company-selected,
.crm-filters,
.crm-deal-edit-form,
.crm-event-list article {
  background: rgba(255, 255, 255, 0.92);
}

th {
  background: linear-gradient(180deg, var(--table-head) 0%, var(--table-head-strong) 100%);
  color: #123247;
}

tbody tr:hover td {
  background: rgba(225, 239, 247, 0.96);
}

.results-company-details-row:hover td {
  background: #f8fbff;
}

.results-company-cell:hover {
  background: rgba(18, 190, 233, 0.1);
}

.label-dialog::backdrop,
.company-card-dialog::backdrop {
  background: rgba(5, 34, 52, 0.48);
}

.matched-queries {
  margin-top: 8px;
  font-size: 12px;
}

body[data-theme='dark'] {
  color-scheme: dark;
  --page-bg-1: #0a1015;
  --page-bg-2: #0f151d;
  --page-bg-3: #121b24;
  --text-main: #ebf5fb;
  --text-soft: #9db2c3;
  --panel-bg: rgba(16, 23, 31, 0.95);
  --panel-bg-strong: #18212b;
  --panel-border: #22303c;
  --panel-border-strong: #2a3b49;
  --panel-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  --panel-shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.26);
  --accent-primary: #2ecff7;
  --accent-strong: #1290ba;
  --accent-dark: #c6f2ff;
  --accent-soft: #0e2c39;
  --table-head: #121a23;
  --table-head-strong: #18222d;
  background:
    radial-gradient(circle at top left, rgba(18, 190, 233, 0.16) 0%, transparent 22%),
    radial-gradient(circle at top right, rgba(12, 69, 97, 0.28) 0%, transparent 28%),
    linear-gradient(180deg, var(--page-bg-1) 0%, var(--page-bg-2) 32%, var(--page-bg-3) 100%);
}

body[data-theme='dark'] header {
  border-bottom-color: #11283a;
}

body[data-theme='dark'] header::before {
  background:
    linear-gradient(90deg, rgba(4, 15, 24, 0.96) 0%, rgba(4, 15, 24, 0.9) 34%, rgba(4, 15, 24, 0.56) 60%, rgba(4, 15, 24, 0.22) 100%),
    radial-gradient(circle at 18% 24%, rgba(46, 207, 247, 0.12) 0%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 24%, rgba(2, 8, 13, 0.28) 100%);
}

body[data-theme='dark'] header::after {
  background: linear-gradient(180deg, rgba(2, 8, 13, 0) 0%, rgba(2, 8, 13, 0.3) 44%, rgba(10, 16, 21, 0.88) 100%);
}

body[data-theme='dark'] .header-brand {
  border-color: rgba(145, 217, 240, 0.12);
  background: linear-gradient(180deg, rgba(9, 16, 24, 0.52) 0%, rgba(9, 16, 24, 0.3) 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

body[data-theme='dark'] .header-brand__radar {
  color: #35d5ff;
}

body[data-theme='dark'] header p {
  color: #dff6ff;
}

body[data-theme='dark'] .theme-switch {
  border-color: #2b3f4f;
  background: linear-gradient(180deg, #111923 0%, #162330 100%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

body[data-theme='dark'] .theme-switch__thumb {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

body[data-theme='dark'] .tab-button {
  border-color: #2d4050;
  background: rgba(15, 22, 30, 0.92);
  color: #d4e8f5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

body[data-theme='dark'] .tab-button:hover {
  border-color: rgba(46, 207, 247, 0.52);
  background: rgba(20, 28, 37, 0.98);
}

body[data-theme='dark'] .tab-button.is-active {
  border-color: #2ecff7;
  box-shadow: 0 12px 30px rgba(18, 144, 186, 0.34);
}

body[data-theme='dark'] .crm-column,
body[data-theme='dark'] .crm-deal-card,
body[data-theme='dark'] .crm-request-card,
body[data-theme='dark'] .crm-company-result,
body[data-theme='dark'] .crm-company-selected,
body[data-theme='dark'] .crm-filters,
body[data-theme='dark'] .crm-deal-edit-form,
body[data-theme='dark'] .crm-event-list article {
  border-color: rgba(68, 91, 109, 0.58);
  background: rgba(13, 19, 26, 0.92);
  color: var(--text-main);
}

body[data-theme='dark'] .crm-column__header {
  border-bottom-color: rgba(68, 91, 109, 0.58);
}

body[data-theme='dark'] .crm-column__header span {
  background: #102733;
  color: #84e4ff;
}

body[data-theme='dark'] .crm-deal-card__title {
  color: var(--text-main);
}

body[data-theme='dark'] .crm-deal-card__title:hover {
  color: #84e4ff;
}

body[data-theme='dark'] .crm-stage-select {
  border-color: #2e4355;
  background: #111b24;
  color: var(--text-main);
}

body[data-theme='dark'] .crm-filters input,
body[data-theme='dark'] .crm-filters select,
body[data-theme='dark'] .crm-deal-edit-form input,
body[data-theme='dark'] .crm-deal-edit-form select,
body[data-theme='dark'] .crm-deal-edit-form textarea {
  border-color: #2e4355;
  background: #111b24;
  color: var(--text-main);
}

body[data-theme='dark'] .crm-requests {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(55, 41, 18, 0.36);
}

body[data-theme='dark'] .crm-requests__header span {
  color: #f8d7a0;
}

body[data-theme='dark'] .crm-company-result:hover {
  border-color: rgba(132, 228, 255, 0.5);
  background: rgba(18, 190, 233, 0.12);
}

body[data-theme='dark'] .auth-gate {
  background: rgba(4, 10, 16, 0.92);
}

body[data-theme='dark'] .auth-gate__panel {
  border-color: rgba(58, 83, 101, 0.55);
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.98) 0%, rgba(18, 28, 39, 0.98) 100%);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

body[data-theme='dark'] .auth-form input,
body[data-theme='dark'] .auth-form select,
body[data-theme='dark'] .admin-create-form input,
body[data-theme='dark'] .admin-create-form select,
body[data-theme='dark'] .admin-engine-panel select {
  border-color: #314351;
  background: linear-gradient(180deg, #121b24 0%, #0f1720 100%);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme='dark'] .auth-form input:focus,
body[data-theme='dark'] .auth-form select:focus,
body[data-theme='dark'] .admin-create-form input:focus,
body[data-theme='dark'] .admin-create-form select:focus,
body[data-theme='dark'] .admin-engine-panel select:focus {
  border-color: rgba(46, 207, 247, 0.82);
  box-shadow: 0 0 0 3px rgba(46, 207, 247, 0.16);
}

body[data-theme='dark'] .auth-form input::placeholder,
body[data-theme='dark'] .admin-create-form input::placeholder {
  color: #72879a;
}

body[data-theme='dark'] .auth-status.is-error {
  color: #fca5a5;
}

body[data-theme='dark'] .user-toolbar__badge {
  border-color: rgba(50, 74, 92, 0.82);
  background: rgba(17, 25, 34, 0.94);
  color: #e7f3fb;
}

body[data-theme='dark'] .history-row.is-opened td {
  background: rgba(18, 144, 186, 0.16);
}

body[data-theme='dark'] .admin-create-form {
  border-color: rgba(42, 59, 73, 0.92);
  background: rgba(19, 28, 38, 0.88);
}

body[data-theme='dark'] .admin-engine-panel {
  border-color: rgba(42, 59, 73, 0.92);
  background: rgba(19, 28, 38, 0.88);
}

body[data-theme='dark'] .admin-system-logs__filters {
  border-color: rgba(42, 59, 73, 0.92);
  background: rgba(19, 28, 38, 0.88);
}

body[data-theme='dark'] .admin-system-logs__filters select {
  border-color: #314351;
  background: linear-gradient(180deg, #121b24 0%, #0f1720 100%);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-theme='dark'] .admin-system-logs__filters select:focus {
  border-color: rgba(46, 207, 247, 0.82);
  box-shadow: 0 0 0 3px rgba(46, 207, 247, 0.16);
}

body[data-theme='dark'] .system-log-row.is-error td {
  background: rgba(120, 29, 29, 0.18);
}

body[data-theme='dark'] .system-log-row.is-success td {
  background: rgba(20, 83, 45, 0.16);
}

body[data-theme='dark'] .mini-action {
  border-color: rgba(53, 213, 255, 0.26);
  background: linear-gradient(135deg, rgba(16, 27, 38, 0.98) 0%, rgba(18, 39, 55, 0.98) 100%);
  color: #c8f4ff;
}

body[data-theme='dark'] .mini-action.danger {
  border-color: rgba(248, 113, 113, 0.26);
  background: linear-gradient(135deg, rgba(48, 20, 26, 0.96) 0%, rgba(70, 24, 34, 0.96) 100%);
  color: #fecaca;
}

body[data-theme='dark'] .history-panel__actions .danger-button {
  border-color: rgba(248, 113, 113, 0.32);
  background: linear-gradient(135deg, rgba(144, 31, 41, 0.98) 0%, rgba(185, 28, 28, 0.98) 100%);
  color: #fee2e2;
  box-shadow: 0 10px 22px rgba(80, 14, 24, 0.28);
}

body[data-theme='dark'] .controls-title,
body[data-theme='dark'] .controls-header h2,
body[data-theme='dark'] .query-block__header h3,
body[data-theme='dark'] .label-form__header h2,
body[data-theme='dark'] .label-filters__header h2,
body[data-theme='dark'] .run-stats__header h2,
body[data-theme='dark'] .run-stats__details h3,
body[data-theme='dark'] .company-card__section h3,
body[data-theme='dark'] .label-option-item__meta strong,
body[data-theme='dark'] .results-company-details__summary strong,
body[data-theme='dark'] .run-stats__card strong,
body[data-theme='dark'] th {
  color: var(--text-main);
}

body[data-theme='dark'] .query-block,
body[data-theme='dark'] .search-mode-panel,
body[data-theme='dark'] .share-run-panel,
body[data-theme='dark'] .run-stats__card,
body[data-theme='dark'] .run-stats__details > div,
body[data-theme='dark'] .company-card__summary div,
body[data-theme='dark'] .company-card__table-wrap,
body[data-theme='dark'] .label-option-item,
body[data-theme='dark'] .label-info-list div,
body[data-theme='dark'] .results-company-details {
  background: linear-gradient(180deg, #18222c 0%, #121922 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme='dark'] .controls input,
body[data-theme='dark'] .controls select,
body[data-theme='dark'] .region-picker,
body[data-theme='dark'] .archive-search,
body[data-theme='dark'] .archive-limit,
body[data-theme='dark'] .label-filters__grid input,
body[data-theme='dark'] .label-filters__grid select,
body[data-theme='dark'] .label-form input,
body[data-theme='dark'] .label-form select,
body[data-theme='dark'] .label-form textarea,
body[data-theme='dark'] .share-run-panel input {
  border-color: #314351;
  background: #0f1720;
  color: var(--text-main);
}

body[data-theme='dark'] .controls input::placeholder,
body[data-theme='dark'] .archive-search::placeholder,
body[data-theme='dark'] .label-form input::placeholder,
body[data-theme='dark'] .label-form textarea::placeholder,
body[data-theme='dark'] .label-filters__grid input::placeholder,
body[data-theme='dark'] .share-run-panel input::placeholder {
  color: #72879a;
}

body[data-theme='dark'] .controls input:focus,
body[data-theme='dark'] .controls select:focus,
body[data-theme='dark'] .label-filters__grid input:focus,
body[data-theme='dark'] .label-filters__grid select:focus,
body[data-theme='dark'] .label-form input:focus,
body[data-theme='dark'] .label-form select:focus,
body[data-theme='dark'] .label-form textarea:focus,
body[data-theme='dark'] .archive-search:focus,
body[data-theme='dark'] .archive-limit:focus,
body[data-theme='dark'] .region-search-input:focus,
body[data-theme='dark'] .share-run-panel input:focus {
  border-color: rgba(46, 207, 247, 0.82);
  box-shadow: 0 0 0 3px rgba(46, 207, 247, 0.16);
}

body[data-theme='dark'] .preset-list {
  border-color: #2a3b49;
  background: #111922;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.44);
}

body[data-theme='dark'] .preset-list__empty,
body[data-theme='dark'] .controls .preset-list__apply small {
  color: var(--text-soft);
}

body[data-theme='dark'] .controls .preset-list__apply,
body[data-theme='dark'] .region-option,
body[data-theme='dark'] .label-status-filter__item,
body[data-theme='dark'] .actions__checkbox,
body[data-theme='dark'] .result-post-filters summary,
body[data-theme='dark'] .query-block__toggle {
  background: linear-gradient(180deg, #16202a 0%, #101821 100%);
}

body[data-theme='dark'] .result-post-filters__panel {
  border-color: #2e4355;
  background: #101821;
  box-shadow: 0 18px 44px rgb(0 0 0 / 34%);
}

body[data-theme='dark'] .result-post-filters__panel label,
body[data-theme='dark'] .vacancy-long-details__section h3 {
  color: #d7edf8;
}

body[data-theme='dark'] .vacancy-long-details__section p {
  color: #bdd6e6;
}

body[data-theme='dark'] .controls .preset-list__apply:hover,
body[data-theme='dark'] .region-option.is-selected,
body[data-theme='dark'] .label-status-filter__item:has(input:checked) {
  border-color: rgba(46, 207, 247, 0.38);
  background: linear-gradient(180deg, #183042 0%, #10283b 100%);
}

body[data-theme='dark'] .company-card__external-link {
  border-color: rgba(46, 207, 247, 0.28);
  background: linear-gradient(180deg, #162430 0%, #101922 100%);
  color: #9feaff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body[data-theme='dark'] .company-card__external-link:hover {
  border-color: rgba(46, 207, 247, 0.42);
  background: linear-gradient(180deg, #1a2c3a 0%, #12202a 100%);
  color: #d5f8ff;
  box-shadow: 0 10px 20px rgba(18, 144, 186, 0.18);
}

body[data-theme='dark'] .preset-dropdown summary,
body[data-theme='dark'] .secondary-button,
body[data-theme='dark'] .query-block__remove,
body[data-theme='dark'] .region-picker__actions button,
body[data-theme='dark'] .company-card__contacts-button,
body[data-theme='dark'] .company-card__toggle,
body[data-theme='dark'] .remove-blacklist-action {
  background: linear-gradient(180deg, #18232d 0%, #111b24 100%);
  border-color: #2e4355;
  color: #9feaff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body[data-theme='dark'] .controls .secondary-button:hover,
body[data-theme='dark'] .label-filters__actions .secondary-button:hover,
body[data-theme='dark'] .actions .secondary-button:hover,
body[data-theme='dark'] .label-form__actions .secondary-button:hover,
body[data-theme='dark'] .share-run-panel__actions .secondary-button:hover,
body[data-theme='dark'] .query-block__remove:hover,
body[data-theme='dark'] .preset-dropdown summary:hover,
body[data-theme='dark'] .region-picker__actions button:hover,
body[data-theme='dark'] .company-card__contacts-button:hover,
body[data-theme='dark'] .remove-blacklist-action:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body[data-theme='dark'] .company-card__row-action {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

body[data-theme='dark'] .company-card__row-action:hover {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.38);
}

body[data-theme='dark'] .company-card__source-details summary {
  color: #9feaff;
}

body[data-theme='dark'] .company-card__source-details ul {
  color: var(--text-muted);
}

body[data-theme='dark'] .vacancy-status-badge {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(20, 83, 45, 0.52);
  color: #bbf7d0;
}

body[data-theme='dark'] .vacancy-status-badge--inactive {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(127, 29, 29, 0.52);
  color: #fecaca;
}

body[data-theme='dark'] .company-card__table tr.is-inactive-vacancy td {
  background: rgba(124, 45, 18, 0.3);
  color: #fed7aa;
}

body[data-theme='dark'] .controls button,
body[data-theme='dark'] .label-filters__actions button,
body[data-theme='dark'] .actions button,
body[data-theme='dark'] .label-form__actions button,
body[data-theme='dark'] .share-run-panel__actions button,
body[data-theme='dark'] .auth-form button,
body[data-theme='dark'] .admin-panel__header > button,
body[data-theme='dark'] .admin-create-form > button {
  border-color: rgba(46, 207, 247, 0.18);
  box-shadow: 0 12px 24px rgba(18, 144, 186, 0.28);
}

body[data-theme='dark'] .controls button:hover,
body[data-theme='dark'] .label-filters__actions button:hover,
body[data-theme='dark'] .actions button:hover,
body[data-theme='dark'] .label-form__actions button:hover,
body[data-theme='dark'] .share-run-panel__actions button:hover,
body[data-theme='dark'] .auth-form button:hover,
body[data-theme='dark'] .admin-panel__header > button:hover,
body[data-theme='dark'] .admin-create-form > button:hover {
  box-shadow: 0 14px 28px rgba(18, 144, 186, 0.32);
}

body[data-theme='dark'] .admin-panel__header > .secondary-button {
  border-color: #2e4355;
  background: linear-gradient(180deg, #18232d 0%, #111b24 100%);
  color: #9feaff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body[data-theme='dark'] .company-card-action {
  border-color: rgba(96, 165, 250, 0.26);
  background: linear-gradient(180deg, #142131 0%, #10263a 100%);
  color: #8dc5ff;
}

body[data-theme='dark'] .company-card-action:hover {
  border-color: rgba(96, 165, 250, 0.36);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

body[data-theme='dark'] .label-action {
  border-color: rgba(45, 212, 191, 0.28);
  background: linear-gradient(180deg, #132724 0%, #0e1f1d 100%);
  color: #7ce7da;
}

body[data-theme='dark'] .label-action:hover {
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.2);
}

body[data-theme='dark'] .checko-action {
  border-color: rgba(74, 222, 128, 0.28);
  background: linear-gradient(180deg, #16281c 0%, #102016 100%);
  color: #8cf0aa;
}

body[data-theme='dark'] .checko-action:hover {
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(180deg, #183020 0%, #112519 100%);
  color: #b9f5ca;
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}

body[data-theme='dark'] .results-company-toggle {
  border-color: rgba(167, 139, 250, 0.3);
  background: linear-gradient(180deg, #20162f 0%, #171024 100%);
  color: #c5b4ff;
}

body[data-theme='dark'] .results-company-toggle:hover {
  border-color: rgba(167, 139, 250, 0.44);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.22);
}

body[data-theme='dark'] .blacklist-action {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(180deg, #2a171b 0%, #211014 100%);
  color: #fca5a5;
}

body[data-theme='dark'] .blacklist-action:hover {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.22);
}

body[data-theme='dark'] .results,
body[data-theme='dark'] .company-card__table,
body[data-theme='dark'] .results-company-table,
body[data-theme='dark'] .company-card__table-wrap {
  background: rgba(13, 19, 26, 0.92);
}

body[data-theme='dark'] .company-card__table-actions {
  border-color: #26394a;
  background: rgba(13, 19, 26, 0.96);
}

body[data-theme='dark'] .run-stats__list strong,
body[data-theme='dark'] .results-company-meta strong,
body[data-theme='dark'] .company-card__summary strong {
  color: var(--text-main);
}

body[data-theme='dark'] .result-employer__name,
body[data-theme='dark'] .result-contact-summary strong,
body[data-theme='dark'] .result-details-list dt {
  color: var(--text-main);
}

body[data-theme='dark'] .result-employer__inn,
body[data-theme='dark'] .result-details-list dd {
  color: var(--text-muted);
}

body[data-theme='dark'] .result-contact-time {
  border-top-color: rgba(148, 163, 184, 0.3);
}

body[data-theme='dark'] .result-contact-time__line .client-time__value {
  color: #5eead4;
}

body[data-theme='dark'] .client-time {
  color: #5eead4;
}

body[data-theme='dark'] .client-time__region {
  color: var(--text-muted);
}

body[data-theme='dark'] .company-card__client-time-banner::before {
  background: linear-gradient(90deg, transparent, rgb(94 234 212 / 45%));
}

body[data-theme='dark'] .company-card__client-time-banner::after {
  background: linear-gradient(90deg, rgb(94 234 212 / 45%), transparent);
}

body[data-theme='dark'] .company-card__client-time-pill {
  border-color: rgb(94 234 212 / 35%);
  background: linear-gradient(180deg, #102027, #0f1720);
  box-shadow: 0 10px 22px rgb(0 0 0 / 24%);
}

body[data-theme='dark'] .company-card__client-time-label {
  color: var(--text-muted);
}

body[data-theme='dark'] .company-relation-item {
  border-color: var(--border);
  background: var(--surface-subtle);
}

body[data-theme='dark'] .company-relation-item span {
  color: var(--text-muted);
}

body[data-theme='dark'] .company-relation-open {
  border-color: rgba(94, 234, 212, 0.32);
  background: rgba(15, 118, 110, 0.18);
  color: #5eead4;
}

body[data-theme='dark'] .results-company-details-row td {
  background: #141c25 !important;
}

body[data-theme='dark'] .results-company-details {
  background: #141c25;
}

body[data-theme='dark'] .results-company-details__summary,
body[data-theme='dark'] .results-company-description,
body[data-theme='dark'] .results-company-meta,
body[data-theme='dark'] .results-company-table,
body[data-theme='dark'] .results-company-table td,
body[data-theme='dark'] .results-company-table th,
body[data-theme='dark'] .company-card,
body[data-theme='dark'] .company-card__content,
body[data-theme='dark'] .company-card__section,
body[data-theme='dark'] .company-card__table,
body[data-theme='dark'] .company-card__table td,
body[data-theme='dark'] .company-card__table th {
  color: var(--text-main);
}

body[data-theme='dark'] pre {
  color: #b9d8ea;
}

body[data-theme='dark'] th,
body[data-theme='dark'] td {
  border-bottom-color: #263543;
}

body[data-theme='dark'] tbody tr:hover td {
  background: rgba(27, 39, 50, 0.98);
}

body[data-theme='dark'] .results-company-details-row:hover td {
  background: #111922;
}

body[data-theme='dark'] .results-company-cell:hover {
  background: rgba(18, 190, 233, 0.12);
}

body[data-theme='dark'] .copy-value {
  color: #84e4ff;
  border-bottom-color: #84e4ff;
}

body[data-theme='dark'] .copy-value:hover {
  color: #c8f6ff;
  border-bottom-color: #c8f6ff;
}

body[data-theme='dark'] .copy-value--copied {
  color: #6ee7b7;
  border-bottom-color: #6ee7b7;
}

body[data-theme='dark'] .copy-value--error {
  color: #fca5a5;
  border-bottom-color: #fca5a5;
}

body[data-theme='dark'] .dialog-close {
  color: #dbeaf5;
  background: rgba(18, 25, 34, 0.84);
  border-color: #2a3b49;
}

body[data-theme='dark'] .dialog-close:hover {
  background: rgba(27, 38, 50, 0.92);
}

body[data-theme='dark'] .label-dialog::backdrop,
body[data-theme='dark'] .company-card-dialog::backdrop {
  background: rgba(2, 8, 13, 0.66);
}

body[data-theme='dark'] a {
  color: #84e4ff;
}

body[data-theme='dark'] a:hover {
  color: #c8f6ff;
}

body[data-theme='dark'] .archive-badge--new {
  color: #b7f7d2;
  background: #163528;
  border-color: #2b7a57;
}

body[data-theme='dark'] .archive-badge--seen {
  color: #c7d5e0;
  background: #18222d;
  border-color: #324353;
}

body[data-theme='dark'] .archive-badge--off {
  color: #f8d7a0;
  background: #352913;
  border-color: #8b6b2e;
}

body[data-theme='dark'] .archive-badge--personal {
  color: #b9ecff;
  background: #123244;
  border-color: #2e7fa2;
}

body[data-theme='dark'] .label-badge--empty {
  color: #a8bdcd;
  background: #18222c;
  border-color: #314352;
}

@media (max-width: 768px) {
  header {
    min-height: 150px;
    padding: 22px 20px 18px;
    background-position: center right;
  }

  .header-brand {
    gap: 8px;
    padding: 12px 14px 14px;
    border-radius: 18px;
  }

  header p {
    letter-spacing: 0.14em;
  }

  main {
    padding: 16px 20px 32px;
  }

  .topbar {
    align-items: stretch;
    gap: 14px;
  }

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

  .theme-toolbar {
    margin-left: 0;
  }

  .tabs {
    width: 100%;
    flex-wrap: wrap;
  }

  .user-toolbar {
    flex-wrap: wrap;
  }

  .global-controls {
    justify-content: stretch;
  }

  .global-controls .checkbox {
    margin-right: 0;
  }

  .query-block__tools {
    width: 100%;
  }

  .label-filters__header,
  .run-stats__header,
  .history-panel__header {
    flex-direction: column;
  }

  .label-filters__grid,
  .run-stats__details {
    grid-template-columns: 1fr;
  }

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

  .admin-create-form,
  .admin-engine-panel {
    grid-template-columns: 1fr;
  }

  .crm-panel .history-panel__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .crm-filters,
  .crm-deal-edit-form__grid {
    grid-template-columns: 1fr;
  }

  #crmDealInfoDialog {
    width: min(100vw - 18px, 520px);
    max-height: calc(100vh - 18px);
  }

  #crmDealInfoDialog .crm-deal-info {
    max-height: calc(100vh - 18px);
    padding: 16px;
  }

  .crm-deal-info .label-form__header h2 {
    font-size: 20px;
  }

  .crm-deal-info .label-info-list {
    grid-template-columns: 1fr;
  }

  .crm-deal-info .label-info-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .crm-filters__actions {
    justify-content: flex-start;
  }

  .crm-board {
    grid-template-columns: repeat(6, minmax(240px, 240px));
  }

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

  .company-contact-editor__item {
    grid-template-columns: 1fr;
  }

  .bitrix24-import__actions {
    grid-template-columns: 1fr;
  }
}
