.yandex-direct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.yandex-direct-view-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 0 18px;
  border-bottom: 1px solid var(--line);
}

.yandex-direct-view-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 800;
}

.yandex-direct-view-tabs button:hover,
.yandex-direct-view-tabs button.active {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--ink);
}

.yandex-campaigns-pane,
.yandex-tokens-pane {
  display: grid;
  gap: 14px;
  padding: 18px;
  animation: yandex-direct-pane-in 160ms ease-out;
}

.yandex-campaigns-pane[hidden],
.yandex-tokens-pane[hidden] {
  display: none;
}

.yandex-campaigns-pane .pane-head,
.yandex-tokens-pane .pane-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.yandex-campaigns-actions {
  grid-template-columns: minmax(250px, 1fr) minmax(180px, 0.75fr) max-content max-content minmax(190px, 0.75fr);
  width: min(100%, 1380px);
}

.yandex-tokens-pane .yandex-direct-employee-filter {
  min-width: 220px;
}

.yandex-campaigns-period-popover {
  width: min(620px, calc(100vw - 48px));
  grid-template-columns: 1fr;
  gap: 0;
  padding: 20px;
}

.yandex-campaigns-period-popover .period-presets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 18px;
  margin-top: 16px;
  border-block: 1px solid var(--line);
  padding: 12px 0;
}

.yandex-campaigns-period-popover .period-presets button {
  min-height: 34px;
  border: 0;
  color: var(--accent);
  font-weight: 750;
}

.yandex-campaigns-period-popover .period-presets button:hover {
  text-decoration: underline;
  transform: none;
}

.yandex-campaigns-period-popover .period-presets button.is-active {
  color: var(--ink);
  text-decoration: none;
}

.yandex-campaigns-period-popover .period-filter-actions {
  grid-column: 1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.yandex-campaigns-period-popover .period-filter-actions button {
  min-width: 112px;
}

.yandex-campaigns-pane .table-wrap,
.yandex-tokens-pane .table-wrap {
  max-height: min(70vh, 720px);
}

.yandex-campaigns-pane .table-wrap {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.yandex-campaigns-table,
.yandex-tokens-table {
  width: 100%;
  min-width: 1040px;
}

.yandex-campaigns-table {
  min-width: 785px;
  table-layout: fixed;
}

.yandex-campaigns-table.postback-metrics-enabled {
  min-width: 1070px;
}

.yandex-campaigns-table.is-admin {
  min-width: 1010px;
}

.yandex-campaigns-table.is-admin.postback-metrics-enabled {
  min-width: 1295px;
}

.yandex-campaigns-table thead th:first-child,
.yandex-campaign-row > td:first-child {
  width: 240px;
}

.yandex-campaigns-table thead th:nth-child(2) {
  width: 250px;
}

.yandex-campaigns-table thead th:nth-child(3) {
  width: 160px;
}

.yandex-campaigns-table thead th:nth-child(4) {
  width: 110px;
}

.yandex-campaigns-table thead th:nth-child(5) {
  width: 130px;
}

.yandex-campaigns-table thead th:nth-child(6) {
  width: 120px;
}

.yandex-campaigns-table thead th:nth-child(7) {
  width: 120px;
}

.yandex-campaigns-table thead th:nth-child(8) {
  width: 90px;
}

.yandex-campaigns-table thead th:nth-child(9) {
  width: 75px;
}

.yandex-campaigns-table .table-sort-button {
  word-break: normal;
  overflow-wrap: normal;
}

.yandex-campaigns-table th,
.yandex-campaigns-table td {
  padding-right: 8px;
  padding-left: 8px;
}

.yandex-campaigns-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--line);
}

.yandex-campaigns-table td small,
.yandex-tokens-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.yandex-campaign-id-toggle,
.yandex-campaign-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.yandex-campaign-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
}

.yandex-campaign-id-toggle {
  display: inline-grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0;
}

.yandex-campaign-id-toggle strong {
  display: block;
  line-height: 1.15;
}

.yandex-campaign-start-date {
  grid-column: 1 / -1;
  margin-top: 0 !important;
  padding-left: 32px;
  line-height: 1.15;
  white-space: nowrap;
}

.yandex-campaign-copy-id {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.yandex-campaign-copy-id:hover,
.yandex-campaign-copy-id:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.yandex-campaign-copy-id:active {
  transform: scale(0.92);
}

.yandex-campaign-copy-id svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yandex-campaign-copy-id .check-icon,
.yandex-campaign-copy-id.is-copied .copy-icon {
  display: none;
}

.yandex-campaign-copy-id.is-copied {
  background: var(--accent-soft);
  color: var(--accent);
}

.yandex-campaign-copy-id.is-copied .check-icon {
  display: block;
}

.yandex-campaign-id-toggle .is-id,
.yandex-campaign-group-id strong,
.yandex-campaign-ad-row > strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.yandex-campaign-id-toggle .is-name {
  overflow-wrap: anywhere;
}

.yandex-campaign-detail-row[hidden],
.yandex-campaign-ads[hidden] {
  display: none;
}

.yandex-campaign-detail-row > td {
  padding: 0;
  background: color-mix(in srgb, var(--surface-strong) 72%, var(--surface));
}

.yandex-campaign-hierarchy {
  display: grid;
  padding-left: 30px;
}

.yandex-campaign-group {
  min-width: 850px;
  border-top: 1px solid var(--line);
}

.yandex-campaign-group:first-child {
  border-top: 0;
}

.yandex-campaign-group-toggle {
  display: grid;
  grid-template-columns: 24px minmax(120px, 0.55fr) minmax(340px, 2.5fr);
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}

.yandex-campaign-group-toggle.postback-metrics-enabled {
  grid-template-columns: 24px minmax(120px, 0.45fr) minmax(660px, 3.5fr);
  min-width: 880px;
}

.yandex-campaign-group-toggle:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

.yandex-campaign-group-id {
  display: grid;
  gap: 2px;
}

.yandex-campaign-group-id small,
.yandex-campaign-group-metrics small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.yandex-campaign-group-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.yandex-campaign-group-metrics.postback-metrics-enabled {
  grid-template-columns: repeat(6, minmax(90px, 1fr));
}

.yandex-campaign-group-metrics > span {
  display: grid;
  gap: 2px;
}

.yandex-campaign-ads {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.yandex-campaign-hierarchy-head,
.yandex-campaign-ad-row {
  display: grid;
  grid-template-columns: 130px minmax(240px, 1.8fr) minmax(145px, 0.9fr) repeat(3, minmax(90px, 0.65fr)) minmax(110px, 0.7fr);
  gap: 12px;
  min-width: 1120px;
  align-items: start;
  padding: 9px 14px 9px 48px;
}

.yandex-campaign-hierarchy-head.postback-metrics-enabled,
.yandex-campaign-ad-row.postback-metrics-enabled {
  grid-template-columns: 130px minmax(240px, 1.8fr) minmax(145px, 0.9fr) repeat(6, minmax(90px, 0.65fr)) minmax(110px, 0.7fr);
  min-width: 1420px;
}

.yandex-campaign-hierarchy-head {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.yandex-campaign-ad-row {
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.yandex-campaign-landing {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.yandex-campaign-landing a {
  overflow-wrap: anywhere;
}

.yandex-campaign-hierarchy-empty {
  padding: 14px 18px 14px 48px;
  color: var(--muted);
  font-size: 12px;
}

.yandex-campaign-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.yandex-campaign-status.active {
  background: color-mix(in srgb, #238636 12%, transparent);
  color: #238636;
}

.yandex-campaign-status.pending {
  background: color-mix(in srgb, #a15c00 12%, transparent);
  color: #8a5000;
}

.yandex-campaign-status.paused {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
}

.yandex-campaign-status.error {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.yandex-direct-state-action {
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  padding: 5px 9px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.yandex-direct-state-action.danger {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  color: var(--danger);
}

.yandex-direct-state-action:disabled {
  cursor: wait;
  opacity: 0.6;
}

.yandex-direct-action-unavailable {
  color: var(--muted);
}

.yandex-campaign-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yandex-ad-details-action {
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.yandex-ad-details-dialog {
  width: min(920px, calc(100vw - 32px));
}

.yandex-ad-details-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.yandex-ad-details-body {
  min-height: 220px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 4px 2px 18px;
}

.yandex-ad-details-loading,
.yandex-ad-details-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.yandex-ad-details-loading::before {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  content: "";
  animation: yandex-ad-details-spin 750ms linear infinite;
}

.yandex-ad-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.yandex-ad-details-section {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.yandex-ad-details-section.wide {
  grid-column: 1 / -1;
}

.yandex-ad-details-section h3 {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.yandex-ad-details-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yandex-ad-details-list li {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.yandex-ad-details-list small,
.yandex-ad-details-image figcaption,
.yandex-ad-details-keyline small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.yandex-ad-details-list a {
  color: var(--accent);
}

.yandex-ad-details-keyline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.yandex-ad-details-keyline span {
  display: grid;
}

.yandex-ad-details-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.yandex-ad-details-image {
  margin: 0;
}

.yandex-ad-details-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: var(--surface-strong);
  object-fit: contain;
}

@keyframes yandex-ad-details-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .yandex-ad-details-grid {
    grid-template-columns: 1fr;
  }

  .yandex-ad-details-section.wide {
    grid-column: auto;
  }
}

.yandex-direct-show-all-toggle {
  display: inline-flex;
  align-items: center;
  align-self: end;
  gap: 7px;
  min-height: 46px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.yandex-direct-show-all-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.yandex-campaigns-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
}

.yandex-campaigns-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4vw, 56px);
  min-width: 0;
  padding: 2px 0;
}

.yandex-campaigns-summary span {
  display: grid;
  gap: 3px;
}

.yandex-campaigns-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.yandex-campaigns-summary strong {
  font-size: 17px;
}

.yandex-campaigns-summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.yandex-campaigns-summary-actions button {
  min-width: 148px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .yandex-campaigns-summary-row {
    grid-template-columns: 1fr;
  }

  .yandex-campaigns-summary-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .yandex-campaigns-summary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .yandex-campaigns-summary-actions button {
    width: 100%;
  }
}

.yandex-token-form {
  display: grid;
  grid-template-columns: minmax(300px, 680px) max-content;
  gap: 10px;
  align-items: end;
}

.yandex-token-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.yandex-token-form input {
  min-height: 44px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.yandex-tokens-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface-strong));
  padding: 10px 12px;
}

.yandex-tokens-bulk-actions strong {
  margin-right: auto;
  color: var(--accent);
  white-space: nowrap;
}

.yandex-tokens-bulk-actions .danger-action {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  color: var(--danger);
}

.yandex-token-select-cell {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}

.yandex-token-select-cell input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.yandex-tokens-table tbody tr.selected {
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface-strong));
}

.yandex-token-check {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.yandex-token-check.success {
  color: #238636;
}

.yandex-token-check.error {
  color: var(--danger);
}

.yandex-direct-token-pane {
  display: grid;
  gap: 18px;
  max-width: 760px;
  padding: 28px 18px;
  animation: yandex-direct-pane-in 160ms ease-out;
}

.yandex-direct-token-pane[hidden] {
  display: none;
}

.yandex-direct-token-intro {
  display: grid;
  gap: 6px;
}

.yandex-direct-token-intro h2,
.yandex-direct-token-intro p {
  margin: 0;
}

.yandex-direct-token-intro > p:last-child {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.55;
}

.yandex-direct-token-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.yandex-direct-token-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.yandex-direct-token-form input {
  min-height: 44px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.yandex-direct-token-status {
  min-height: 20px;
  margin: -6px 0 0;
}

.yandex-direct-token-campaigns {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: campaigns;
}

.yandex-direct-token-campaigns li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 750;
  animation: yandex-direct-campaign-in 180ms ease-out both;
  counter-increment: campaigns;
}

.yandex-direct-token-campaigns li::before {
  content: counter(campaigns, decimal-leading-zero);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

@keyframes yandex-direct-pane-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes yandex-direct-campaign-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .yandex-campaigns-pane .pane-head,
  .yandex-tokens-pane .pane-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .yandex-direct-token-form button {
    width: 100%;
  }
}

.yandex-direct-form-pane {
  width: 100%;
}

.yandex-direct-form-pane,
.yandex-direct-stats-pane {
  padding: 18px;
}

.yandex-direct-form-pane .settings-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.yandex-direct-settings-section {
  display: grid;
  gap: 8px;
}

.yandex-direct-settings-section[hidden] {
  display: none;
}

.yandex-direct-form-pane .settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yandex-direct-connect {
  display: grid;
  grid-template-columns: max-content minmax(220px, 360px) max-content minmax(180px, 1fr);
  align-items: end;
  gap: 8px;
}

.yandex-direct-connect label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.yandex-direct-connect .primary-action {
  width: fit-content;
}

.yandex-direct-connect .form-status {
  align-self: center;
  margin: 0;
}

.yandex-direct-stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.yandex-direct-stats-pane .table-wrap {
  max-height: min(68vh, 680px);
}

.yandex-direct-stats-pane {
  max-width: none;
}

.yandex-direct-stats-pane .pane-head {
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(0, 1080px);
  align-items: end;
}

.yandex-direct-bulk-assignment {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface-strong));
  padding: 10px 12px;
}

.yandex-direct-bulk-assignment[hidden] {
  display: none;
}

.yandex-direct-bulk-assignment strong {
  margin-right: auto;
  color: var(--accent);
  white-space: nowrap;
}

.yandex-direct-bulk-assignment select {
  min-width: 240px;
  min-height: 38px;
  background: var(--surface-strong);
}

.yandex-direct-bulk-assignment button {
  min-height: 38px;
}

.yandex-direct-table {
  min-width: 1320px;
  table-layout: fixed;
}

.yandex-direct-col-account {
  width: 360px;
}

.yandex-direct-col-balance {
  width: 95px;
}

.yandex-direct-col-cpl {
  width: 105px;
}

.yandex-direct-col-spend {
  width: 185px;
}

.yandex-direct-col-conversions {
  width: 165px;
}

.yandex-direct-col-updated {
  width: 220px;
}

.yandex-direct-col-actions {
  width: 190px;
}

.yandex-direct-table th,
.yandex-direct-table td {
  padding: 13px 14px;
}

.yandex-direct-table thead tr:not(.yandex-direct-summary-row) th {
  top: 61px;
}

.yandex-direct-summary-row th {
  top: 0;
  z-index: 3;
  height: 61px;
  border-bottom-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface-strong));
  padding: 10px 14px;
  text-transform: none;
}

.yandex-direct-summary {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.yandex-direct-summary > span {
  display: grid;
  gap: 3px;
}

.yandex-direct-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.yandex-direct-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.yandex-direct-account-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yandex-direct-account-header input,
.yandex-direct-account-select {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.yandex-direct-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent-soft) 16%, var(--surface-strong));
}

.yandex-direct-table tbody .yandex-direct-system-account-row td {
  border-bottom-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface-strong));
}

.yandex-direct-table tbody .yandex-direct-system-account-row td:first-child {
  box-shadow: inset 4px 0 0 var(--accent);
}

.yandex-direct-table tbody .yandex-direct-system-account-row:hover td {
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--surface-strong));
}

.yandex-direct-account-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.yandex-direct-account-line.has-selection {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.yandex-direct-account-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.yandex-direct-system-account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--accent);
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.yandex-direct-assignee-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 180px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #5f7391 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #dfe8f5 70%, var(--surface-strong));
  color: #435570;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yandex-direct-copy-login {
  min-height: 28px;
  padding: 4px 8px;
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.yandex-direct-table .metric-cell {
  font-weight: 800;
  white-space: nowrap;
}

.yandex-direct-table .metric-cell.strong {
  color: var(--accent);
}

.yandex-direct-updated-cell {
  white-space: nowrap;
}

.yandex-direct-updated-cell span {
  display: block;
  font-weight: 800;
}

.yandex-direct-updated-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}

.yandex-direct-row-assignee {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.yandex-direct-row-assignee select {
  width: 100%;
  min-height: 34px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 5px 28px 5px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

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

.table-actions button {
  min-height: 32px;
  padding: 6px 10px;
}

.row-error {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-weight: 800;
}
