/* Page layouts. Shared UI lives in design-system.css; values in design-tokens.css. */
.af-site * {
  box-sizing: border-box;
}
.af-site [hidden] {
  display: none!important;
}
.af-site button,.af-site input,.af-site select,.af-site textarea {
  font: inherit;
}
.af-site button {
  color: inherit;
}
.af-site h1,.af-site h2,.af-site h3,.af-site p {
  margin: 0;
}
.af-site svg {
  width: var(--af-icon-size);
  height: var(--af-icon-size);
  flex-shrink: 0;
}
.af-site .af-shell {
  display: grid;
  grid-template-columns: 185px minmax(0,1fr);
  min-height: 755px;
}
.af-site .af-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--af-surface);
  border-right: 1px solid var(--af-line);
  padding: 28px 16px var(--af-space-5);
}
.af-site .af-side .af-brand {
  padding: 0 8px;
}
.af-site .af-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.af-site .af-side-bottom {
  margin-top: auto;
}
.af-site .af-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--af-control-height);
  align-items: center;
  gap: var(--af-space-2);
  padding: var(--af-space-3) 0;
  border-top: 1px solid var(--af-line);
}
.af-site .af-profile-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--af-space-1) var(--af-space-2);
  min-width: 0;
}
.af-site .af-profile-role {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}
.af-site .af-main {
  min-width: 0;
}
.af-site .af-top {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 28px;
  border-bottom: 1px solid var(--af-line);
  font-size: var(--af-text-xs);
  background: var(--af-surface);
}
.af-site .af-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.af-site .af-top .af-brand {
  display: none;
}
.af-site .af-top a {
  color: var(--af-muted);
  text-decoration: none;
}
.af-site .af-body {
  padding: var(--af-space-6) 28px 24px;
}
.af-site .af-title-row {
  display: flex;
  /* Title, description and the action/badge differ in size: only their baselines agree,
     and a shortened window no longer pushes the action down to the middle of the block. */
  align-items: baseline;
  justify-content: space-between;
  gap: var(--af-space-4);
  margin-bottom: var(--af-space-6);
}
.af-site .af-title-row p {
  color: var(--af-muted);
  font-size: var(--af-text-xs);
  margin-top: 8px;
}
/* The VIN row carries a full-height copy button: a flex row keeps the icon on the text line
   instead of letting the 44 px control grow the paragraph's baseline. */
.af-site .af-title-row p:has(> .af-btn) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--af-space-1);
}
.af-site .af-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.af-site .af-space {
  justify-content: space-between;
}
.af-site .af-import {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--af-space-4);
  align-items: center;
  margin-bottom: var(--af-space-6);
}
.af-site .af-import p {
  margin-top: var(--af-space-2);
}
.af-site .af-import form {
  display: flex;
  gap: var(--af-space-2);
  grid-column: 1/-1;
}
.af-site .af-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--af-space-3);
  margin-bottom: 12px;
}

.af-site .af-search {
  max-width: 170px;
}
.af-site .af-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
}
.af-site .af-pagination {
  display: flex;
  gap: 4px;
  align-items: center;
}
.af-site .af-grid-detail {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(225px,.9fr);
  gap: 20px;
}
.af-site .af-info-panel {
  background: var(--af-surface);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-card);
  padding: var(--af-space-5);
}
.af-site .af-info-panel .af-price {
  font-size: var(--af-text-2xl);
  letter-spacing: -1px;
  font-weight: 500;
  margin: 8px 0 var(--af-space-4);
}
.af-site .af-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px var(--af-space-3);
  padding: 16px 0;
  border-top: 1px solid var(--af-line);
  border-bottom: 1px solid var(--af-line);
  margin-bottom: 16px;
}
.af-site .af-specs dt {
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  margin-bottom: var(--af-space-1);
}
.af-site .af-specs dd {
  font-size: var(--af-text-base);
  margin: 0;
}
.af-site .af-block {
  margin-top: var(--af-space-6);
}
.af-site .af-block h3 {
  margin-bottom: var(--af-space-3);
}
.af-site .af-detail-tabs {
  margin-top: var(--af-space-6);
  border-bottom: 1px solid var(--af-line);
}
.af-site .af-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--af-field-min-width), calc(50% - var(--af-space-2)))), 1fr));
  gap: var(--af-space-4);
}
.af-site .af-field.full {
  grid-column: 1/-1;
}
.af-site .af-settings-grid {
  display: grid;
  grid-template-columns: 155px minmax(0,1fr);
  gap: var(--af-space-6);
}
.af-site .af-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.af-site .af-statusline {
  display: flex;
  /* The left block may carry a two-line explanation: the badge belongs beside the name, not
     halfway down the block. */
  align-items: start;
  justify-content: space-between;
  padding: var(--af-space-4) 0;
  border-top: 1px solid var(--af-line);
  gap: var(--af-space-3);
}
.af-site .af-statusline > .af-badge { align-self: start; transform: translateY(calc(0.5lh - 50%)); }
.af-site .af-statusline strong {
  display: block;
  font-size: var(--af-text-base);
}
.af-site .af-statusline span.af-small {
  color: var(--af-muted);
}
.af-site .af-inline-notice {
  padding: var(--af-space-3) 12px;
  border-radius: var(--af-radius-control);
  background: var(--af-alert-bg);
  color: var(--af-alert);
  font-size: var(--af-text-xs);
  line-height: 1.7;
  margin: 12px 0;
}
.af-site .af-login {
  display: grid;
  grid-template-columns: 1.07fr 1fr;
  min-height: 755px;
  background: var(--af-surface);
}
.af-site .af-login-story {
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.af-site .af-login-story h1 {
  font-size: 45px;
  line-height: 1.12;
  letter-spacing: -2px;
  margin-top: 76px;
  position: relative;
  z-index: 3;
  font-weight: 500;
}
.af-site .af-login-story p {
  margin-top: var(--af-space-5);
  font-size: var(--af-text-sm);
  color: var(--af-muted);
  max-width: 265px;
  position: relative;
  z-index: 3;
}
.af-site .af-login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
}
.af-site .af-login-form>p {
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  margin: var(--af-space-3) 0 28px;
}
.af-site .af-login-form form {
  display: flex;
  flex-direction: column;
  gap: var(--af-space-5);
}
.af-site .af-login-form .af-input {
}
.af-site .af-login-form .af-btn {
  width: 100%;
}
.af-site .af-login-form .af-overline {
  margin-bottom: 12px;
}
@media(max-width:900px) {
  .af-site .af-shell {
    grid-template-columns: 160px minmax(0,1fr);
  }
  .af-site .af-body {
    padding: 24px var(--af-space-5);
  }
  .af-site .af-top {
    padding: 0 var(--af-space-5);
  }
  .af-site .af-grid-detail {
    gap: var(--af-space-4);
    grid-template-columns: 1fr 1fr;
  }
  .af-site .af-settings-grid {
    grid-template-columns: 125px 1fr;
    gap: 12px;
  }
  .af-site .af-login-form {
    padding: var(--af-space-10) 28px;
  }
  .af-site .af-login-story {
    padding: var(--af-space-6) 24px;
  }
  .af-site .af-login-story h1 {
    font-size: 38px;
  }
}
@media(max-width:690px) {
  .af-site .af-shell {
    display: block;
    min-height: 800px;
  }
  .af-site .af-side {
    display: none;
  }
  .af-site .af-top .af-brand {
    display: flex;
    font-size: var(--af-text-base);
  }
  .af-site .af-breadcrumb {
    display: none;
  }
  .af-site .af-top {
    height: 58px;
    padding: 0 var(--af-space-4);
  }
  .af-site .af-body {
    padding: 20px var(--af-space-4);
  }
  .af-site .af-title-row {
    align-items: start;
    margin-bottom: var(--af-space-5);
  }
  .af-site .af-import {
    padding: 16px;
    gap: 12px;
    margin-bottom: var(--af-space-5);
  }
  .af-site .af-import form {
    flex-direction: column;
  }
  .af-site .af-toolbar {
    align-items: start;
    flex-direction: column;
    gap: var(--af-space-2);
  }

  .af-site .af-search {
    max-width: none;
    width: 100%;
  }
  .af-site .af-settings-grid {
    grid-template-columns: 1fr;
  }
  .af-site .af-settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .af-site .af-form-grid {
    grid-template-columns: 1fr;
  }
  .af-site .af-field.full {
    grid-column: auto;
  }
  .af-site .af-login {
    grid-template-columns: 1fr;
    min-height: 800px;
  }
  .af-site .af-login-story {
    min-height: 245px;
    padding: var(--af-space-6);
    display: block;
  }
  .af-site .af-login-story h1 {
    font-size: var(--af-text-2xl);
    letter-spacing: -1px;
    margin-top: 24px;
    max-width: 230px;
  }
  .af-site .af-login-story p {
    font-size: var(--af-text-xs);
    max-width: 200px;
    margin-top: var(--af-space-3);
  }
  .af-site .af-login-form {
    padding: 32px 24px;
    justify-content: start;
  }
  .af-site .af-top-right {
    gap: 8px;
  }
  .af-site .af-top-right>.af-small {
    display: none;
  }
  .af-site .af-table-footer {
    font-size: var(--af-text-xs);
  }
  .af-site .af-table-footer .af-pagination {
    gap: 4px;
  }
}
@media(max-width:500px) {
  .af-site .af-title-row>.af-badge {
    display: none;
  }
}
/* Production layout and compatibility styles for existing forms and dialogs. */
.af-site a {
  text-decoration: none;
  color: inherit;
}
.af-site .hidden,.af-site [hidden] {
  display: none!important;
}
.af-site .af-shell {
  grid-template-columns: 224px minmax(0,1fr);
  min-height: 100dvh;
}
.af-site .af-side {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  gap: 28px;
  padding: 28px 16px 16px;
}
.af-site .af-side>a {
  padding: 0 var(--af-space-2);
}
.af-site .af-main {
  min-width: 0;
}
.af-site .af-body {
  padding: 32px clamp(var(--af-space-5),3vw,var(--af-space-12));
  max-width: 1440px;
  margin: 0 auto;
}
.af-site .af-top {
  height: 74px;
  padding: 0 clamp(var(--af-space-5),3vw,var(--af-space-12));
}
.af-site .af-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--af-space-3);
  border-radius: var(--af-radius-control);
  color: var(--af-muted);
  font-size: var(--af-text-sm);
}
.af-site .af-nav a.active,.af-site .af-nav a:hover {
  background: var(--af-soft);
  color: var(--af-ink);
}
.af-site .af-nav a.active {
  font-weight: 500;
}
.af-site .af-nav-caption {
  display: block;
  padding: 0 var(--af-space-3) var(--af-space-3);
}
.af-site .af-profile-name {
  min-width: 0;
  flex: 1;
}
.af-site .af-profile-name strong {
  display: block;
  font-size: var(--af-text-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.af-site .af-logout {
  display: grid;
  place-items: center;
  width: var(--af-control-height);
  height: var(--af-control-height);
  flex-shrink: 0;
  color: var(--af-muted);
}
.af-site .af-divider {
  margin: 0 var(--af-space-3);
  color: var(--af-muted);
}
.af-site .af-mobile-menu,.af-site .af-mobile-brand {
  display: none;
}
.af-site .af-menu-backdrop {
  position: fixed;
  inset: 0;
  background: var(--af-overlay);
  z-index: 39;
  border: 0;
}
.af-site .af-title-row {
  margin-bottom: 28px;
}
.af-site .af-title-row > .af-actions {
  justify-content: flex-end;
  margin-left: auto;
  flex-shrink: 0;
  max-width: 100%;
}
.af-site .af-title-row p {
  font-size: var(--af-text-sm);
  line-height: 1.7;
}
.af-site .af-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--af-space-3);
  min-width: 0;
}
.af-site .af-actions>.af-btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.af-site .af-password-wrap {
  position: relative;
  display: block;
}
.af-site .af-password-wrap input {
  padding-right: var(--af-space-12);
}
.af-site .af-password-wrap button {
  position: absolute;
  right: 0;
  top: 0;
  border: 0;
  background: transparent;
}
.af-site .af-import {
  margin-bottom: var(--af-space-6);
}
.af-site .af-import-input {
  display: flex;
  gap: 8px;
  grid-column: 1/-1;
}
.af-site .af-progress {
  grid-column: 1/-1;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
}
.af-site .af-progress-track {
  height: 5px;
  background: var(--af-soft);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.af-site #loadingBar {
  height: 100%;
  background: var(--af-green);
  transition: width .5s;
  width: 0;
}
.af-site .af-search {
  max-width: 230px;
}
.af-site #historySection > .af-note {
  margin-bottom: var(--af-space-4);
}
.af-site .af-history-table {
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-card);
  overflow: hidden;
  background: var(--af-surface);
}
.af-site .af-history-head,.af-site .af-history-row {
  display: grid;
  grid-template-columns: minmax(220px,2.4fr) minmax(85px,1fr) minmax(65px,.7fr) 50px 74px;
  align-items: center;
  gap: var(--af-space-4);
  padding: 16px var(--af-space-5);
}
.af-site .af-history-head {
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  background: var(--af-bg);
  padding-top: 12px;
  padding-bottom: 12px;
}
.af-site .af-history-row {
  border-top: 1px solid var(--af-line);
  font-size: var(--af-text-sm);
}
.af-site .af-history-car {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.af-site .af-history-car strong {
  display: block;
  font-size: var(--af-text-base);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.af-site .af-history-car small {
  display: block;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  margin-top: var(--af-space-1);
}
.af-site .af-history-thumb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 78px;
  height: 54px;
  position: relative;
  overflow: hidden;
  border-radius: var(--af-radius-control);
  background: var(--af-soft);
  color: var(--af-muted);
}
.af-site .af-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.af-site .af-history-source {
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  overflow-wrap: anywhere;
}
.af-site .af-history-actions {
  display: flex;
  gap: 4px;
}
.af-site .af-history-price {
  display: flex;
  align-items: baseline;
  gap: var(--af-space-1);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.af-site .af-load-more {
  display: flex;
  margin: 4px auto 0;
}
.af-site .af-login {
  min-height: 100dvh;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
}
.af-site .af-login-story {
  padding: var(--af-space-12) clamp(28px,5vw,80px);
}
.af-site .af-login-story h1 {
  font-size: clamp(36px,4vw,64px);
  letter-spacing: -2px;
  margin-top: clamp(60px,12vh,148px);
}
.af-site .af-login-story p {
  max-width: 340px;
  font-size: var(--af-text-base);
}
.af-site .af-login-form {
  max-width: 530px;
  width: 100%;
  margin: auto;
  padding: 48px clamp(28px,5vw,68px);
}
.af-site .af-login-form h2 {
  font-size: var(--af-text-2xl);
  letter-spacing: -1px;
  line-height: 1.2;
}
.af-site .af-login-form>p {
  font-size: var(--af-text-sm);
}
.af-site .af-login-form .af-input {
}
.af-site .af-login-form .af-btn {
}
.af-site .af-skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 200;
  background: var(--af-surface);
  padding: var(--af-space-3);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-control);
}
.af-site .af-skip:focus {
  top: 12px;
}
.af-site .af-settings-nav a {
  font-size: var(--af-text-sm);
  padding: 8px var(--af-space-3);
  color: var(--af-muted);
  border-radius: var(--af-radius-control);
}
.af-site .af-settings-nav a.active,.af-site .af-settings-nav a:hover {
  background: var(--af-soft);
  color: var(--af-ink);
}
.af-site .af-settings-grid>div {
  min-width: 0;
}
.af-site .af-settings-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.af-site .af-settings-grid section[id] {
  scroll-margin-top: 24px;
}
.af-site .af-settings-footer {
  border-top: 1px solid var(--af-line);
  padding-top: var(--af-space-5);
  margin-top: var(--af-space-1);
}
.af-site .af-settings-footer .af-btn-danger {
  margin-left: 0;
}
.af-site #kingsautoSettingsForm > .af-settings-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.af-site #kingsautoSettingsForm > .af-settings-footer > .af-btn-primary {
  grid-column: 1 / -1;
}
.af-site #avitoSettingsForm > .af-settings-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.af-site .af-account-footer {
  display: grid;
  gap: var(--af-space-4);
  border-top: 1px solid var(--af-line);
  padding-top: var(--af-space-5);
  margin-top: var(--af-space-4);
}
.af-site .af-account-footer>.af-btn {
  justify-self: stretch;
  max-width: 100%;
  white-space: normal;
}
.af-site .af-settings-grid [role=alert] {
  color: var(--af-red);
  overflow-wrap: anywhere;
}
.af-site .af-settings-grid [role=alert]:empty {
  display: none;
}
@media(max-width:760px) {
  .af-site .af-settings-nav {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
@media(max-width:600px) {
  .af-site .af-actions>.af-btn {
    width: 100%;
    min-height: 44px;
  }
  .af-site .af-settings-footer .af-btn-danger {
    margin-left: 0;
  }
}
.af-site .af-rate-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: var(--af-space-3);
  margin: 20px 0 16px;
}
.af-site textarea.af-import-urls {
  height: 48px;
  min-height: 48px;
  resize: vertical;
  line-height: 24px;
  transition: height .18s ease;
}
.af-site textarea.af-import-urls.expanded {
  height: 168px;
}
.af-site .af-import-input {
  align-items: start;
}
.af-site .af-import-input>.af-input-wrap {
  width: 100%;
}
.af-site .af-batch-results {
  grid-column: 1/-1;
  list-style: none;
  padding: 0;
  margin: var(--af-space-4) 0 0;
  max-height: 450px;
  overflow: auto;
}
.af-site .af-batch-results li {
  padding: var(--af-space-3) 0;
  border-top: 1px solid var(--af-line);
}
.af-site .af-batch-link {
  overflow-wrap: anywhere;
  margin-bottom: var(--af-space-2);
  font-size: var(--af-text-sm);
}
.af-site .af-worker-job {
  overflow-wrap: anywhere;
  font-size: var(--af-text-sm);
  margin-bottom: var(--af-space-4);
}
.af-site .af-rate {
  padding: var(--af-space-4);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-control);
}
.af-site .af-rate strong {
  display: block;
  font-size: var(--af-text-metric);
  margin-top: var(--af-space-2);
}
.af-site .af-grid-detail {
  grid-template-columns: minmax(0,1.3fr) minmax(270px,.8fr);
  gap: 24px;
}
.af-site .af-grid-detail>section {
  min-width: 0;
}
.af-site .af-car-photo-panel {
  container: car-photos / inline-size;
}
.af-site .af-car-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--af-space-3);
}
.af-site .af-car-photo-actions > .af-small {
  flex-basis: 100%;
}
.af-site .af-car-photo-actions > .af-btn {
  flex: 1 1 auto;
}
@container car-photos (max-width: 480px) {
  .af-site .af-car-photo-actions > .af-btn {
    width: 100%;
  }
}
@media(max-width:760px) {
  .af-site .af-grid-detail {
    grid-template-columns: minmax(0,1fr);
  }
}
.af-site .af-photo-stage {
  border-radius: var(--af-radius-card);
  background: var(--af-soft);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1.5;
  display: grid;
  place-items: center;
  color: var(--af-muted);
}
.af-site .af-photo-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.af-site .af-photo-stage>button {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  animation: af-fade-in .18s var(--af-ease-out);
}
.af-site .af-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: var(--af-space-3);
  padding-bottom: 4px;
}
.af-site .af-photo-strip button {
  width: 78px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: var(--af-radius-control);
  overflow: hidden;
  background: var(--af-soft);
}
.af-site .af-photo-strip button[aria-pressed=true] {
  border-color: var(--af-green);
}
.af-site .af-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.af-site .af-specs {
  grid-template-columns: 1fr 1fr;
}
.af-site .af-specs dt {
  font-size: var(--af-text-xs);
}
.af-site .af-specs dd {
  font-size: var(--af-text-base);
}
.af-site .af-price {
  font-variant-numeric: tabular-nums;
}
.af-site .af-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--af-text-base);
  line-height: 1.85;
  color: var(--af-muted);
}
.af-site .af-data-json {
  font-size: var(--af-text-xs);
  max-height: 440px;
  overflow: auto;
  background: var(--af-soft);
  padding: 16px;
  border-radius: var(--af-radius-control);
}
.af-site .af-section-space {
  margin-top: var(--af-space-6);
}
.af-site .af-actions-stack {
  display: grid;
  gap: 8px;
}
.af-site .af-form-error {
  font-size: var(--af-text-sm);
  color: var(--af-red);
  margin: 12px 0;
}
.af-site .af-form-error:empty {
  display: none;
}
/* Existing admin tables, selectors and integrations retain their DOM contracts. */
.af-site .af-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--af-space-6);
  margin-bottom: var(--af-space-8);
}
.af-site .af-admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--af-space-6);
}
.af-site .af-admin-photo-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.af-site .af-admin-photo-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.af-site .af-admin-photo-info {
  display: flex;
  flex-direction: column;
  gap: var(--af-space-3);
  padding: var(--af-space-5);
  flex: 1;
  overflow-wrap: anywhere;
}
.af-site .af-admin-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  margin-top: auto;
  padding-top: var(--af-space-1);
}
/* A narrow card wraps this label: the icon follows the first line, not the middle of the button. */
.af-site .af-admin-photo-actions .af-btn { align-items: start; }
.af-site .af-admin-photo-actions .af-btn > .af-icon { flex: none; transform: translateY(calc(0.5lh - 50%)); }
.af-site #workersMessage:empty {
  display: none;
}
.af-site .af-team-table .af-row { flex-wrap: nowrap; }
.af-site .af-team-table .af-note { display: block; }
@media (max-width: 1100px) {
  .af-site .af-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .af-site .af-dashboard-grid { grid-template-columns: 1fr; }
}
.af-site .af-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  animation: af-overlay-in .18s ease-out;
}
.af-site [role=dialog] {
  z-index: 70;
}
.af-site .af-modal:not(.hidden) {
  background: var(--af-overlay);
  backdrop-filter: blur(3px);
  padding: var(--af-space-5);
}
.af-site [role=dialog] pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.af-site .af-lightbox {
  position: fixed;
  inset: 0;
  background: #101b16ed;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--af-space-10);
  animation: af-overlay-in .18s ease-out;
}
.af-site .af-lightbox img {
  max-width: 100%;
  max-height: 88dvh;
  object-fit: contain;
}
.af-site .af-lightbox button {
  position: absolute;
  right: 20px;
  top: 20px;
  background: #fff;
  color: #202923;
}
@media(min-width:1600px) {
  .af-site .af-shell {
    grid-template-columns: 240px minmax(0,1fr);
  }
}
@media(max-width:1100px) {
  .af-site .af-shell {
    grid-template-columns: 190px minmax(0,1fr);
  }
  .af-site .af-side {
    padding: var(--af-space-6) var(--af-space-3);
  }
  .af-site .af-body {
    padding: 28px 20px;
  }
  .af-site .af-top {
    padding: 0 20px;
  }
  .af-site .af-history-head,.af-site .af-history-row {
    grid-template-columns: minmax(190px,2fr) 85px 65px 42px 70px;
    gap: 8px;
    padding: var(--af-space-4) 12px;
  }
  .af-site .af-history-thumb {
    width: 60px;
    height: 46px;
  }
  .af-site .af-history-car {
    gap: 8px;
  }
}
@media(max-width:900px) {
  .af-site .af-history-head,.af-site .af-history-row {
    grid-template-columns: minmax(180px,2fr) 65px 42px 70px;
  }
  .af-site .af-history-source,.af-site .af-history-head>span:nth-child(2) {
    display: none;
  }
  .af-site .af-settings-grid {
    grid-template-columns: 130px minmax(0,1fr);
  }
  .af-site .af-rate-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media(max-width:760px) {
  .af-site .af-shell {
    display: block;
  }
  .af-site .af-side {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100dvh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .18s;
  }
  .af-site.af-menu-open .af-side {
    transform: none;
  }
  .af-site .af-mobile-menu {
    display: grid;
  }
  .af-site .af-mobile-brand {
    display: block;
  }
  .af-site .af-mobile-brand .af-brand {
    font-size: var(--af-text-base);
  }
  .af-site .af-breadcrumb {
    display: none;
  }
  .af-site .af-top {
    padding: 0 var(--af-space-4);
    height: 66px;
  }
  .af-site .af-body {
    padding: 24px 16px;
  }
  .af-site .af-top-right {
    gap: var(--af-space-2);
  }
  .af-site .af-settings-grid {
    grid-template-columns: 1fr;
  }
  .af-site .af-settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .af-site .af-settings-nav a {
    padding: 8px 8px;
  }
  .af-site .af-import-input {
    flex-direction: column;
  }
  .af-site .af-import {
    padding: var(--af-space-5);
  }
  .af-site .af-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .af-site .af-toolbar {
    align-items: stretch;
  }
  .af-site .af-search {
    max-width: 100%;
    width: 100%;
  }
  .af-site .af-login {
    grid-template-columns: 1fr;
  }
  .af-site .af-login-story {
    min-height: 260px;
    padding: 28px;
  }
  .af-site .af-login-story h1 {
    font-size: var(--af-text-2xl);
    margin-top: 24px;
    max-width: 300px;
  }
  .af-site .af-login-story p {
    max-width: 230px;
    font-size: var(--af-text-xs);
  }
  .af-site .af-login-form {
    padding: 36px 28px;
    max-width: 480px;
  }
  .af-site .af-form-grid {
    grid-template-columns: 1fr;
  }
  .af-site .af-field.full {
    grid-column: 1;
  }
  .af-site .af-lightbox {
    padding: 16px;
  }
}
@media(max-width:900px) {
  .af-site .af-history-head {
    display: none;
  }
  .af-site .af-history-table {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .af-site #historyList {
    display: grid;
    gap: var(--af-space-3);
  }
  .af-site .af-history-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    background: var(--af-surface);
    border: 1px solid var(--af-line);
    border-radius: var(--af-radius-card);
    padding: var(--af-space-4);
    gap: var(--af-space-4) 8px;
  }
  .af-site .af-history-car {
    grid-column: 1/-1;
  }
  .af-site .af-history-car strong {
    font-size: var(--af-text-base);
  }
  .af-site .af-history-car small {
    font-size: var(--af-text-xs);
  }
  .af-site .af-history-thumb {
    width: 78px;
    height: 56px;
  }
  .af-site .af-history-source {
    display: none;
  }
  .af-site .af-history-price {
    font-size: var(--af-text-sm);
  }
  .af-site .af-history-actions {
    justify-self: end;
  }
}
@media(max-width:560px) {
  .af-site .af-toolbar {
    flex-direction: column;
  }

  .af-site .af-table-footer {
    flex-wrap: wrap;
    gap: var(--af-space-2);
  }
  .af-site .af-title-row .af-row {
    width: 100%;
  }
  .af-site .af-login-story h1 {
    font-size: var(--af-text-2xl);
  }
  .af-site .af-photo-stage {
    aspect-ratio: 1.3;
  }
  .af-site .af-admin-content .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  .af-site .af-photo-strip button {
    width: 69px;
    height: 52px;
  }
}
.af-site .af-offline {
  max-width: 580px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  padding: var(--af-space-8);
  margin: auto;
}
.af-site .af-price-unit {
  font-size: var(--af-text-sm);
  color: var(--af-muted);
}
.af-site .af-dialog-panel {
  background: var(--af-surface);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-dialog);
  padding: var(--af-space-6);
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: var(--af-shadow-dialog);
  animation: af-dialog-in .2s var(--af-ease-out);
}
.af-site .af-dialog-panel h3 {
  font-size: var(--af-text-xl);
  margin: 16px 0 12px;
  padding-right: 20px;
}
.af-site .af-dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
}
.af-site .af-dialog-panel>.af-btn {
  margin-top: var(--af-space-6);
  width: 100%;
}
.af-site .af-dialog-actions {
  display: flex;
  gap: var(--af-space-3);
  margin-top: var(--af-space-6);
}
.af-site .af-dialog-actions .af-btn {
  flex: 1;
}
/* Photograph from the existing KingsAuto showroom's featured catalogue. */
.af-site .af-login-story {
  background: #14231e;
  color: #f5f8f2;
  isolation: isolate;
}
.af-site .af-login-photo {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 68%;
  object-fit: cover;
  object-position: center 58%;
  z-index: -2;
}
.af-site .af-login-story::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,#14231e 0%,#14231e 28%,#14231ed9 40%,#14231e00 65%,#0d1712ad 100%);
}
.af-site .af-login-story h1 {
  margin-top: clamp(var(--af-space-12),10vh,108px);
}
.af-site .af-login-story p {
  color: #d3ded6;
}
@media(max-width:760px) {
  .af-site .af-login-story {
    min-height: 330px;
    display: flex;
  }
  .af-site .af-login-photo {
    height: 100%;
    object-position: center 65%;
  }
  .af-site .af-login-story::after {
    background: linear-gradient(110deg,#14231eeb 0%,#14231ebf 48%,#14231e40 100%);
  }
  .af-site .af-login-story h1 {
    margin-top: 28px;
  }
}
/* Team and subscription forms */
.af-site .af-user-form {
  max-width: 820px;
}
.af-site .af-user-form .af-form-section {
  margin-bottom: 16px;
}
.af-site .af-user-form h2 {
  margin-bottom: 20px;
}
.af-site .af-role-field {
  max-width: 340px;
  margin-top: 20px;
}
.af-site .af-days-field {
  max-width: 220px;
}
.af-site .af-day-presets {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.af-site .af-access-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--af-space-5);
}
.af-site .af-access-preview {
  margin: var(--af-space-5) 0 0;
  font-weight: 500;
}
.af-site .af-user-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--af-space-3);
}
.af-site .af-team-search {
  display: flex;
  gap: var(--af-space-3);
  max-width: 470px;
  margin-bottom: var(--af-space-6);
}
.af-site .af-team-table-wrap {
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-card);
  overflow-x: auto;
  background: var(--af-surface);
}
.af-site .af-team-table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--af-text-base);
}
.af-site .af-team-table th,.af-site .af-team-table td {
  text-align: left;
  padding: 16px var(--af-space-5);
  border-bottom: 1px solid var(--af-line);
  white-space: nowrap;
}
.af-site .af-team-table th {
  color: var(--af-muted);
  font-size: var(--af-text-xs);
  font-weight: 500;
}
.af-site .af-team-table tbody tr:last-child td {
  border-bottom: 0;
}
.af-site .af-team-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 20px;
}
.af-site [data-requires-access][aria-disabled=true] {
  opacity: .45;
  cursor: not-allowed;
}
@media(max-width:600px) {
  .af-site .af-user-form-actions {
    flex-wrap: wrap;
  }
  .af-site .af-user-form-actions .af-btn {
    flex: 1;
  }
  .af-site .af-team-search {
    max-width: 100%;
  }
  .af-site .af-team-table th,.af-site .af-team-table td {
    padding: 12px;
  }
  .af-site .af-access-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
.af-site .af-body {
  width: 100%;
  min-width: 0;
}
.af-site .af-team-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.af-site .af-team-search {
  width: 100%;
  min-width: 0;
}
.af-site .af-team-table-wrap {
  position: relative;
}
.af-site .af-job-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd2c7;
  border-top-color: var(--af-accent);
  border-radius: 50%;
  animation: af-spin .85s linear infinite;
}
.af-site .af-progress-indeterminate {
  width: 35%;
  animation: af-progress 1.8s ease-in-out infinite;
}
@keyframes af-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes af-progress {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(310%);
  }
}
@media(prefers-reduced-motion:reduce) {
  .af-site .af-job-spinner,.af-site .af-progress-indeterminate {
    animation: none;
  }
}
.af-site .af-calculator-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(280px,360px);
  gap: var(--af-space-6);
  align-items: start;
}
.af-site .af-calculator-layout fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.af-site .af-calculator-layout > form {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.af-site .af-calculator-layout > .af-form-section {
  margin: 0;
}
.af-site .af-calculation-group {
  display: grid;
  gap: var(--af-space-4);
}
.af-site .af-calculation-group + .af-calculation-group {
  margin-top: var(--af-space-3);
}
.af-site .af-calc-presets {
  gap: var(--af-space-2);
  flex-wrap: wrap;
  margin: 0;
}
.af-site .af-calc-rate-actions {
  flex-wrap: wrap;
  gap: var(--af-space-3);
}
.af-site .af-calculation-summary {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: var(--af-space-6);
}
.af-site .af-calc-total {
  margin: var(--af-space-4) 0;
  overflow-wrap: anywhere;
}
.af-site .af-calc-lines>div {
  display: flex;
  justify-content: space-between;
  gap: var(--af-space-3);
  border-top: 1px solid var(--af-line);
  padding: var(--af-space-3) 0;
  font-size: var(--af-text-sm);
}
.af-site .af-calc-lines dt {
  max-width: 65%;
}
.af-site .af-calc-lines dd {
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 500;
  margin: 0;
}
.af-site .af-calc-lines small {
  display: block;
  color: var(--af-muted);
  margin-top: var(--af-space-1);
}
.af-site .af-calc-lines {
  margin: 0;
}
.af-site .af-detail-tabs {
  overflow-x: auto;
}
.af-site .af-detail-tabs button {
  white-space: nowrap;
}
.af-site .af-facts-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--af-space-4);
}
.af-site .af-fact-card {
  padding: var(--af-space-4);
  border: 1px solid var(--af-line);
  border-radius: var(--af-radius-card);
  overflow-wrap: anywhere;
}
.af-site .af-fact-card .af-field {
  margin-top: var(--af-space-3);
}
.af-site .af-fact-source {
  font-size: var(--af-text-xs);
  display: block;
  margin: var(--af-space-2) 0;
}
.af-site [hidden] {
  display: none!important;
}
@media(max-width:1100px) {
  .af-site .af-calculator-layout {
    grid-template-columns: 1fr;
  }
  .af-site .af-calculation-summary {
    grid-column: 1;
    position: static;
  }
  .af-site .af-calculator-layout > form {
    grid-row: 2;
  }
  .af-site [data-mode=settings] .af-calculator-layout > form {
    grid-row: 1;
  }
  .af-site .af-facts-grid {
    grid-template-columns: 1fr;
  }
}
.af-site .af-fact-card .af-input {
  width: 100%;
  min-width: 0;
}
.af-site [data-mode=settings] .af-calculator-layout {
  grid-template-columns: 1fr;
}
.af-site .af-money-input {
  display: grid;
  grid-template-columns: minmax(0,1fr) 96px;
  gap: var(--af-space-2);
}
.af-site .af-money-input .af-input {
  width: 100%;
  min-width: 0;
}
.af-site [data-currency-preview] {
  min-height: 16px;
  font-size: var(--af-text-xs);
  overflow-wrap: anywhere;
}
.af-site .af-quick-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  line-height: 1.5;
  margin-top: 4px;
  cursor: pointer;
}
.af-site .af-quick-option input {
  accent-color: var(--af-accent);
  flex-shrink: 0;
}
.af-site .af-history-head,.af-site .af-history-row {
  grid-template-columns: minmax(0,2.4fr) minmax(70px,1fr) max-content 52px 144px;
}
.af-site .af-client-price {
  white-space: nowrap;
  font-size: inherit;
  font-weight: 500;
  color: var(--af-accent);
  line-height: 1.5;
}
.af-site .af-history-calculation {
  min-width: 0;
}
.af-site .af-history-editor {
  grid-column: 1 / -1;
  min-width: 0;
}
.af-site .af-history-price-part {
  display: flex;
  align-items: baseline;
  gap: var(--af-space-2);
  flex-wrap: wrap;
}
.af-site .af-history-editor > summary .af-note {
  margin-left: var(--af-space-2);
}
.af-site .af-history-calculation fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.af-site .af-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 12px;
}
.af-site .af-quick-grid .af-field {
  min-width: 0;
}
.af-site .af-quick-grid .af-input {
  width: 100%;
  min-width: 0;
}
.af-site .af-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--af-space-3);
  margin-top: 12px;
}
.af-site .af-quick-actions .af-note {
  margin: 0;
  flex: 1;
  min-width: 140px;
}
.af-site .af-quick-toggle {
  display: flex;
  align-items: center;
  gap: var(--af-space-2);
}
@media(max-width:900px) {
  .af-site .af-history-row {
    grid-template-columns: minmax(0,1fr) auto auto;
  }
}
@media(max-width:560px) {
  .af-site .af-quick-grid {
    grid-template-columns: 1fr;
  }
  .af-site .af-quick-actions .af-btn {
    max-width: 100%;
    white-space: normal;
  }
}
@media(min-width:761px) {
  .af-site.af-sidebar-collapsed .af-shell {
    grid-template-columns: minmax(0,1fr);
  }
  .af-site.af-sidebar-collapsed .af-side {
    display: none;
  }
}
@media(max-width:760px) {
  .af-site .af-sidebar-toggle {
    display: none;
  }
}
/* Listing actions and researched specifications */
.af-site .af-car-description-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--af-space-3);
  margin-top: var(--af-space-6);
  padding-top: var(--af-space-5);
  border-top: 1px solid var(--af-line);
}
.af-site .af-research-intro {
  display: grid;
  gap: 8px;
  max-width: 1000px;
  margin: 16px 0;
}
.af-site #enrichmentResearch {
  margin: 0 0 16px;
}
.af-site .af-fact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--af-surface);
  padding: 20px;
  min-width: 0;
}
.af-site .af-fact-card .af-field {
  margin: 0;
}
.af-site .af-fact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.af-site .af-fact-heading label {
  font-size: var(--af-text-base);
  font-weight: 500;
  color: var(--af-ink);
}
.af-site .af-fact-values {
  display: grid;
  gap: var(--af-space-3);
  margin: 0;
  padding: 12px;
  background: var(--af-bg);
  border-radius: var(--af-radius-control);
}
.af-site .af-fact-values>div {
  display: grid;
  grid-template-columns: 90px minmax(0,1fr);
  gap: var(--af-space-3);
  align-items: baseline;
}
.af-site .af-fact-values dt {
  font-size: var(--af-text-xs);
  color: var(--af-muted);
}
.af-site .af-fact-values dd {
  margin: 0;
  font-size: var(--af-text-base);
  line-height: 1.5;
  color: var(--af-ink);
}
.af-site .af-fact-manual {
  display: block;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  margin-top: var(--af-space-1);
}
.af-site .af-fact-explanation {
  font-size: var(--af-text-sm);
  line-height: 1.7;
  color: var(--af-ink);
}
.af-site .af-fact-explanation>span {
  display: block;
  font-size: var(--af-text-xs);
  color: var(--af-muted);
  margin-bottom: 4px;
}
.af-site .af-fact-card .af-fact-source {
  display: inline-flex;
  align-self: flex-start;
  font-size: var(--af-text-xs);
  margin: 0;
}
.af-site .af-fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: var(--af-space-4);
  border-top: 1px solid var(--af-line);
}
@media(max-width:600px) {
  .af-site .af-fact-card {
    padding: var(--af-space-4);
  }
  .af-site .af-fact-actions>.af-btn {
    white-space: normal;
    flex: 1;
  }
  .af-site .af-car-description-actions>.af-btn {
    flex: 1 1 100%;
    white-space: normal;
  }
  .af-site .af-fact-values>div {
    grid-template-columns: 1fr;
    gap: var(--af-space-1);
  }
}
.af-site #exaSettingsForm {
  display: grid;
  gap: var(--af-space-4);
  margin-top: 16px;
}
.af-site #exaSettingsForm .af-field {
  margin: 0;
}
.af-site #exaSettingsForm .af-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.af-site #exaSettingsError:empty {
  display: none;
}
/* Avito: shared publication forms, selection and account-scoped journal. */
.af-site .af-avito-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin: var(--af-space-5) 0;
}
.af-site #avitoSettings .af-field,.af-site .af-avito-preview .af-field {
  display: flex;
  flex-direction: column;
  gap: var(--af-space-2);
  min-width: 0;
}
.af-site #avitoSettingsForm>.af-field {
  margin: 16px 0;
}
.af-site .af-avito-wrap {
  flex-wrap: wrap;
  gap: var(--af-space-3);
}
.af-site .af-avito-grow {
  flex: 1;
  min-width: 190px;
}
.af-site .af-avito-check {
  display: flex;
  align-items: flex-start;
  gap: var(--af-space-3);
  font-size: var(--af-text-sm);
  line-height: 1.7;
  margin: var(--af-space-6) 0;
}
.af-site .af-avito-check input {
  margin-top: 0;
  flex-shrink: 0;
  /* The checkbox belongs to the first line of a label that may wrap to three lines. */
  transform: translateY(calc(0.5lh - 50%));
}
.af-site .af-avito-selection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--af-space-3);
  margin: var(--af-space-4) 0;
  font-size: var(--af-text-sm);
}
.af-site .af-avito-selection label {
  display: flex;
  align-items: center;
  gap: var(--af-space-2);
}
.af-site .af-history-row:has(.af-avito-select) {
  position: relative;
  padding-left: 44px;
}
.af-site .af-avito-select {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.af-site .af-avito-select input,.af-site .af-avito-selection input {
  width: 17px;
  height: 17px;
  accent-color: var(--af-accent);
}
.af-site .af-avito-dialog {
  background: var(--af-surface);
  width: min(950px,100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 28px;
  border-radius: var(--af-radius-dialog);
  box-shadow: var(--af-shadow-dialog);
}
.af-site .af-avito-dialog h2 {
  font-size: var(--af-text-metric);
}
.af-site .af-avito-preview {
  padding: 20px 0;
  border-top: 1px solid var(--af-line);
  margin-top: 20px;
}
.af-site .af-avito-preview h3 {
  font-size: var(--af-text-lg);
  overflow-wrap: anywhere;
}
.af-site .af-avito-preview-photos {
  display: flex;
  gap: var(--af-space-2);
  overflow-x: auto;
  margin: var(--af-space-4) 0;
}
.af-site .af-avito-preview-photos img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--af-radius-sm);
}
.af-site .af-avito-error {
  color: var(--af-red);
  font-size: var(--af-text-sm);
  line-height: 1.7;
  margin: 12px 0;
}
.af-site #avitoFeed .af-field input[readonly] {
  font-family: var(--af-font-mono);
  font-size: var(--af-text-xs);
  line-height: 1.6;
  overflow-wrap: anywhere;
  cursor: text;
}
/* Feed page: summary metrics, the permanent link and one table of publications. */
.af-site .af-avito-metrics {
  margin-bottom: var(--af-space-4);
}
.af-site .af-avito-metrics-list {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: var(--af-space-3);
  margin: 0;
}
.af-site .af-avito-metric {
  margin: 0;
}
.af-site .af-avito-metric dt {
  color: var(--af-muted);
  font-size: var(--af-text-xs);
  margin-bottom: var(--af-space-2);
}
.af-site .af-avito-metric dd {
  margin: 0;
}
.af-site #avitoFeed {
  margin-bottom: var(--af-space-4);
}
.af-site #avitoFeed .af-field input {
  font-family: var(--af-font-mono);
  font-size: var(--af-text-xs);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.af-site .af-avito-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--af-space-3);
  margin-bottom: var(--af-space-4);
}
.af-site .af-avito-table {
  min-width: 760px;
}
.af-site .af-avito-cell-car {
  display: flex;
  align-items: center;
  gap: var(--af-space-3);
  min-width: 0;
  font-weight: 500;
}
.af-site .af-avito-cell-car small {
  display: block;
  font-weight: 400;
  margin-top: var(--af-space-1);
}
.af-site .af-avito-cell-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--af-space-2);
  white-space: nowrap;
}
.af-site .af-avito-price {
  display: block;
  font-weight: 500;
  margin-bottom: var(--af-space-1);
}
.af-site .af-avito-adstate {
  display: grid;
  gap: var(--af-space-1);
  justify-items: start;
}
@media (max-width: 900px) {
  .af-site .af-avito-metrics-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
.af-site .af-avito-fields-actions {
  margin-bottom: var(--af-space-4);
}
.af-site .af-avito-fields-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--af-space-2);
  font-size: var(--af-text-sm);
  font-weight: var(--af-weight-medium);
  padding-bottom: var(--af-space-2);
  border-bottom: 1px solid var(--af-line);
}
.af-site .af-avito-fields-list {
  margin: 0;
}
.af-site .af-avito-fields-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(0, 1fr);
  gap: var(--af-space-2) var(--af-space-4);
  padding: var(--af-space-3) 0;
  border-bottom: 1px solid var(--af-line);
  font-size: var(--af-text-sm);
}
.af-site .af-avito-fields-list dt {
  color: var(--af-muted);
}
.af-site .af-avito-fields-list dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--af-space-2);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .af-site .af-avito-fields-list > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
.af-site .af-avito-color {
  margin-top: var(--af-space-4);
  max-width: 320px;
}
.af-site .af-avito-car {
  margin-top: 28px;
}
.af-site .af-avito-car .af-form-section {
  padding: 16px 0;
  border: 0;
}
.af-site .af-avito-dialog .af-actions {
  position: sticky;
  bottom: -28px;
  background: var(--af-surface);
  padding: var(--af-space-4) 0;
  margin-bottom: 0;
}
@media(max-width:600px) {
  .af-site .af-avito-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .af-site .af-avito-dialog {
    padding: 16px;
  }
  .af-site .af-avito-selection>.af-btn {
    width: 100%;
  }
  .af-site .af-avito-dialog .af-actions {
    bottom: -16px;
  }
  .af-site .af-avito-car .af-row>button {
    width: 100%;
  }
  .af-site .af-avito-selection label {
    min-height: 36px;
  }
}
.af-site .af-integration-form {
  display: grid;
  gap: 16px;
}
.af-site .af-integration-form .af-field {
  display: flex;
  flex-direction: column;
  gap: var(--af-space-2);
  min-width: 0;
}
.af-site #avitoSettingsForm>.af-field,.af-site .af-integration-form .af-avito-grid,.af-site .af-integration-form .af-avito-check {
  margin: 0;
}
.af-site #avitoCategoryFields:empty {
  display: none;
}
.af-site .af-integration-form .af-avito-grow {
  min-width: min(190px,100%);
}
.af-site .af-integration-form .af-row:has(.af-avito-grow) {
  align-items: flex-end;
}
.af-site .af-kingsauto-page .af-title-row>div {
  min-width: 0;
  max-width: 100%;
}
.af-site .af-kingsauto-page h1,.af-site #kingsautoJournal,.af-site #kingsautoCarState {
  overflow-wrap: anywhere;
  min-width: 0;
}
.af-site #kingsautoJournal .af-row>*,.af-site #kingsautoCarState .af-row>* {
  min-width: 0;
  max-width: 100%;
}
.af-site #kingsautoJournal dl div,.af-site #kingsautoCarState dl div {
  min-width: 0;
}
.af-site #kingsautoJournal dd,.af-site #kingsautoCarState dd {
  margin: 4px 0 0;
}
.af-site #kingsautoCar {
  margin-top: 28px;
}
.af-site .af-car-integration {
  display: grid;
  gap: var(--af-space-4);
  container: car-integration / inline-size;
}
.af-site .af-car-integration > .af-btn {
  justify-self: start;
}
.af-site .af-car-integration > [aria-live]:empty {
  display: none;
}
.af-site .af-car-integration > [aria-live] > .af-form-section {
  margin: 0;
  padding: 0;
}
@container car-integration (max-width: 540px) {
  .af-site .af-car-integration > .af-row {
    align-items: stretch;
    flex-direction: column;
  }
  .af-site .af-car-integration > .af-row > .af-btn,
  .af-site .af-car-integration > .af-btn {
    width: 100%;
  }
}
.af-site #kingsautoCarState>.af-form-section {
  border: 0;
  padding: 16px 0;
}
@media(max-width:600px) {
  .af-site #kingsautoDialog {
    padding: var(--af-space-3);
  }
  .af-site #kingsautoDialog .af-actions>.af-btn {
    width: 100%;
  }
}
.af-site .af-history-row:has(.af-avito-select) .af-avito-select {
  top: 40px;
}
.af-site .af-history-price {
  display: grid;
  gap: var(--af-space-1);
}
.af-site #historySection > h2 {
  margin-bottom: var(--af-space-4);
}
.af-site #historySection .af-search {
  max-width: 320px;
}
.af-site .af-settings-content > .af-form-section {
  margin-bottom: 0;
}
.af-site #selectedCarActions {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .af-site .af-import-input > .af-btn {
    width: 100%;
  }
  .af-site .af-settings-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--af-space-2);
  }
}
@media (max-width: 560px) {
  .af-site #historySection .af-search {
    max-width: none;
    width: 100%;
  }
  .af-site #selectedCarActions {
    width: 100%;
  }
  .af-site #selectedCarActions > .af-btn {
    width: 100%;
  }
  .af-site .af-history-editor > summary .af-note {
    display: block;
    margin-left: var(--af-space-4);
  }
}
@media(max-width:900px) {
  .af-site .af-history-price {
    grid-column: 1/-1;
  }
  .af-site .af-history-row>.af-badge {
    grid-column: 1;
    justify-self: start;
  }
  .af-site .af-history-row>.af-history-actions {
    grid-column: 2/-1;
  }
  .af-site .af-history-row:has(.af-avito-select) .af-avito-select {
    top: 44px;
  }
}
/* Page layout only; shared tables, typography and menus live in design-system.css. */
.af-site .af-overview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--af-space-6); margin: 0; }
.af-site .af-overview-metrics dd { margin: 0; }
.af-site .af-overview-metrics .af-form-stack { gap: var(--af-space-2); }
.af-site .af-chart-plot { height: 280px; min-width: 0; }
.af-site .af-history-data-table { min-width: 860px; }
.af-site .af-admin-car-thumb { display: grid; place-items: center; width: 64px; height: 48px; object-fit: cover; }
@media (max-width: 600px) {
  .af-site .af-overview-metrics { grid-template-columns: 1fr; }
}
