:root {
  --ink-950: #07182e;
  --ink-900: #0b2345;
  --ink-800: #17385f;
  --ink-700: #2c4c6e;
  --ink-600: #486581;
  --ink-500: #5f7185;
  --ink-300: #b7c5d3;
  --ink-200: #d6e0e9;
  --ink-100: #e9eff4;
  --ink-50: #f5f8fb;
  --blue-700: #1356a2;
  --blue-600: #1769c2;
  --blue-500: #2580df;
  --blue-100: #dcecff;
  --blue-50: #eef6ff;
  --teal-700: #08766f;
  --teal-600: #0a8c83;
  --teal-100: #d9f4f0;
  --danger-700: #a83232;
  --danger-600: #c33e3e;
  --danger-100: #fde5e5;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(7 24 46 / 6%), 0 5px 16px rgb(7 24 46 / 5%);
  --shadow-md: 0 18px 50px rgb(7 24 46 / 14%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --sidebar-width: 238px;
  --focus-ring: 0 0 0 4px rgb(37 128 223 / 24%);
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink-50);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink-950);
  background: var(--ink-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:not(:disabled),
a,
input[type="checkbox"] {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--blue-500);
  box-shadow: var(--focus-ring);
  outline: 2px solid transparent;
}

[hidden] {
  display: none !important;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button--primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 7px 18px rgb(23 105 194 / 20%);
}

.button--primary:not(:disabled):hover {
  background: var(--blue-700);
  box-shadow: 0 9px 22px rgb(23 105 194 / 26%);
}

.button--secondary {
  color: var(--blue-700);
  border-color: #bcd6f4;
  background: var(--blue-50);
}

.button--secondary:not(:disabled):hover {
  border-color: #88b7e8;
  background: var(--blue-100);
}

.button--quiet {
  color: var(--ink-700);
  border-color: var(--ink-200);
  background: var(--white);
}

.button--quiet:not(:disabled):hover {
  color: var(--ink-950);
  border-color: var(--ink-300);
  background: var(--ink-50);
}

.button--danger {
  color: var(--white);
  background: var(--danger-600);
}

.button--danger:not(:disabled):hover {
  background: var(--danger-700);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.field-group {
  display: grid;
  gap: 7px;
}

.field-group label {
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 700;
}

.field-group input,
.field-group textarea,
.search-input input {
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-group input {
  min-height: 46px;
  padding: 10px 12px;
}

.field-group textarea {
  min-height: 112px;
  padding: 11px 12px;
  line-height: 1.65;
  resize: vertical;
}

.field-group input[aria-invalid="true"],
.field-group textarea[aria-invalid="true"] {
  border-color: var(--danger-600);
  box-shadow: 0 0 0 3px rgb(195 62 62 / 12%);
}

.field-hint,
.field-error {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
}

.field-hint {
  color: var(--ink-500);
}

.field-error {
  color: var(--danger-700);
  font-weight: 650;
}

.wechat-binding-summary {
  display: grid;
  padding: 13px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  background: var(--ink-50);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.wechat-binding-summary > div {
  display: grid;
  gap: 3px;
}

.wechat-binding-summary span,
.wechat-binding-summary small {
  color: var(--ink-500);
  font-size: 12px;
}

.wechat-binding-summary strong,
.wechat-binding-summary time {
  overflow-wrap: anywhere;
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 750;
}

.wechat-binding-summary small {
  grid-column: 1 / -1;
}

.vin-input,
.vin-cell {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.field-label {
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 750;
}

.vehicle-scope-field {
  padding: 15px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--ink-50);
}

.vehicle-scope-field__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.vehicle-scope-field__heading > div {
  display: grid;
  gap: 4px;
}

.vehicle-prefix-priority {
  margin: 10px 0 0;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 650;
}

.selected-vehicle-scopes {
  display: grid;
  margin-top: 12px;
  gap: 10px;
}

.selected-vehicle-card {
  display: grid;
  padding: 13px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  gap: 10px;
}

.selected-vehicle-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-vehicle-card__heading h4 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.selected-vehicle-card__heading > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 11px;
  font-weight: 700;
}

.vehicle-prefix-chips,
.vehicle-dialog-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vehicle-prefix-chip,
.vehicle-selected-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #bad7f5;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 700;
}

.vehicle-prefix-chip > span,
.vehicle-selected-tag > span {
  padding: 5px 3px 5px 10px;
}

.vehicle-prefix-chip button,
.vehicle-selected-tag button {
  width: 30px;
  min-height: 30px;
  color: inherit;
  background: transparent;
  font-size: 17px;
}

.vehicle-prefix-chip button:hover,
.vehicle-selected-tag button:hover {
  background: rgb(27 109 190 / 10%);
}

.vehicle-prefix-empty,
.vehicle-empty-message {
  color: var(--ink-500);
}

.vehicle-prefix-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.vehicle-prefix-editor input,
.vehicle-search-toolbar input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-950);
  background: var(--white);
  font: inherit;
}

.vehicle-prefix-editor input {
  text-transform: uppercase;
}

.legacy-vin-details {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.legacy-vin-details summary {
  padding: 12px 14px;
  color: var(--ink-700);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.legacy-vin-details[open] summary {
  border-bottom: 1px solid var(--ink-100);
}

.legacy-vin-details .field-group {
  padding: 14px;
}

/* Login */
.login-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgb(41 126 211 / 16%), transparent 30rem),
    radial-gradient(circle at 85% 90%, rgb(10 140 131 / 13%), transparent 28rem),
    linear-gradient(135deg, #071a34 0%, #0b2b50 46%, #0c3655 100%);
}

.login-page::before,
.login-page::after {
  position: fixed;
  pointer-events: none;
  content: "";
}

.login-page::before {
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.login-page::after {
  width: 760px;
  height: 180px;
  right: -150px;
  bottom: -75px;
  border: 1px solid rgb(111 195 255 / 22%);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgb(111 195 255 / 4%), 0 0 0 72px rgb(111 195 255 / 3%);
  transform: rotate(-7deg);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: max(32px, env(safe-area-inset-top)) 22px max(32px, env(safe-area-inset-bottom));
}

.login-card {
  position: relative;
  width: min(100%, 430px);
  padding: 42px 42px 30px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 26px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 35px 85px rgb(0 10 27 / 38%);
}

.login-card::before {
  position: absolute;
  width: 180px;
  height: 180px;
  top: -110px;
  right: -95px;
  border: 18px solid rgb(23 105 194 / 7%);
  border-radius: 50%;
  content: "";
}

.brand-mark {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 25px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-500), var(--teal-600));
  box-shadow: 0 12px 26px rgb(23 105 194 / 24%);
}

.brand-mark__road {
  position: absolute;
  width: 18px;
  height: 66px;
  border-right: 3px solid rgb(255 255 255 / 92%);
  border-left: 3px solid rgb(255 255 255 / 92%);
  transform: rotate(32deg);
}

.brand-mark__road::after {
  position: absolute;
  width: 2px;
  height: 7px;
  top: 8px;
  left: 5px;
  background: var(--white);
  box-shadow: 0 15px var(--white), 0 30px var(--white), 0 45px var(--white);
  content: "";
}

.brand-mark__hub {
  position: absolute;
  width: 10px;
  height: 10px;
  right: 9px;
  bottom: 9px;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.login-heading {
  margin-bottom: 27px;
}

.login-heading h1 {
  margin-bottom: 8px;
  color: var(--ink-950);
  font-size: clamp(27px, 7vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.login-heading > p:last-child {
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.input-shell {
  position: relative;
}

.input-shell input {
  padding-left: 49px;
}

.field-icon {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  top: 8px;
  left: 9px;
  place-items: center;
  border-radius: 7px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 800;
}

.check-control {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: var(--ink-700);
  font-size: 13px;
}

.check-control input {
  position: relative;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--ink-300);
  border-radius: 5px;
  background: var(--white);
}

.check-control label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
}

.check-control input:checked {
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.check-control input:checked::after {
  position: absolute;
  width: 7px;
  height: 4px;
  top: 4px;
  left: 4px;
  border-bottom: 2px solid var(--white);
  border-left: 2px solid var(--white);
  content: "";
  transform: rotate(-45deg);
}

.check-control input:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

.form-message {
  display: none;
  min-height: 22px;
  margin: -4px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--danger-600);
  border-radius: 5px;
  color: var(--danger-700);
  background: var(--danger-100);
  font-size: 13px;
  font-weight: 650;
}

.form-message.is-visible {
  display: block;
}

.login-submit {
  position: relative;
  min-height: 49px;
  margin-top: 1px;
}

.button-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 255 255 / 38%);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.button-spinner.is-visible {
  display: inline-block;
}

.vin-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 28px -42px 0;
  padding: 11px 42px;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-500);
  background: var(--ink-50);
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.vin-strip span {
  margin-right: 6px;
  font-weight: 800;
}

.vin-strip i {
  flex: 1;
  height: 7px;
  border-radius: 1px;
  background: repeating-linear-gradient(90deg, var(--ink-300) 0 1px, transparent 1px 3px);
}

.login-footnote {
  margin: 17px 0 0;
  color: var(--ink-500);
  font-size: 12px;
  text-align: center;
}

/* Dashboard shell */
.admin-page {
  overflow-x: hidden;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 17px max(20px, env(safe-area-inset-bottom));
  flex-direction: column;
  color: #cbd9e7;
  background:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px),
    var(--ink-950);
  background-size: 32px 32px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 25px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.sidebar-brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px 5px 11px 5px;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-500), var(--teal-600));
  font-size: 19px;
  font-weight: 850;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  color: var(--white);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.sidebar-brand small {
  margin-top: 3px;
  color: #7892aa;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.sidebar nav {
  margin-top: 25px;
}

.nav-item {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
}

.nav-item span {
  color: #8fb8e6;
  font-size: 19px;
}

.nav-item.is-active {
  border-color: rgb(95 165 238 / 18%);
  color: var(--white);
  background: linear-gradient(90deg, rgb(37 128 223 / 25%), rgb(37 128 223 / 9%));
  box-shadow: inset 3px 0 var(--blue-500);
}

.sidebar-footer {
  display: grid;
  width: 100%;
  margin-top: auto;
  gap: 10px;
}

.mcp-access-card,
.sidebar-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 10px;
  background: rgb(255 255 255 / 4%);
}

.mcp-access-card {
  width: 100%;
  min-height: 58px;
  color: #cbd9e7;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mcp-access-card:hover {
  border-color: rgb(95 165 238 / 30%);
  background: rgb(37 128 223 / 15%);
}

.mcp-access-card:active {
  transform: translateY(1px);
}

.mcp-access-card__icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-500), var(--teal-600));
  font-size: 12px;
  font-weight: 850;
}

.mcp-access-card strong,
.mcp-access-card small,
.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.mcp-access-card strong {
  color: var(--white);
  font-size: 12px;
}

.mcp-access-card small {
  margin-top: 2px;
  color: #8aa5bd;
  font-size: 9px;
}

.sidebar-note strong {
  color: #d9e6f1;
  font-size: 12px;
}

.sidebar-note small {
  color: #7892aa;
  font-size: 10px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border: 2px solid rgb(31 190 160 / 30%);
  border-radius: 50%;
  background: #31bea0;
  box-shadow: 0 0 0 4px rgb(49 190 160 / 9%);
}

.workspace {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 75px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid var(--ink-200);
  background: rgb(255 255 255 / 91%);
  backdrop-filter: blur(13px);
}

.topbar-kicker {
  margin-bottom: 1px;
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.topbar h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.account-actions,
.account-badge {
  display: flex;
  align-items: center;
}

.account-actions {
  gap: 12px;
}

.account-badge {
  gap: 8px;
  color: var(--ink-800);
  font-size: 13px;
}

.account-badge > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 13px;
  font-weight: 850;
}

.dashboard {
  width: 100%;
  margin: 0;
  padding: 34px clamp(20px, 3vw, 42px) 48px;
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.welcome-row h2 {
  margin-bottom: 7px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.welcome-row > div > p:last-child {
  margin-bottom: 0;
  color: var(--ink-600);
  font-size: 14px;
}

.date-chip {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  color: var(--ink-600);
  background: var(--white);
  font-size: 12px;
  font-weight: 650;
}

.stat-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 138px;
  align-items: center;
  gap: 18px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  position: absolute;
  width: 130px;
  height: 130px;
  right: -72px;
  bottom: -80px;
  border: 18px solid currentcolor;
  border-radius: 50%;
  opacity: 0.045;
  content: "";
}

.stat-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
}

.stat-card--blue .stat-icon {
  color: var(--blue-700);
  background: var(--blue-100);
}

.stat-card--teal .stat-icon {
  color: var(--teal-700);
  background: var(--teal-100);
}

.stat-card p,
.stat-card small,
.stat-card strong {
  display: block;
}

.stat-card p {
  margin-bottom: 2px;
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  margin-bottom: 1px;
  color: var(--ink-950);
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  color: var(--ink-500);
  font-size: 11px;
}

.data-panel {
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.admin-workspace {
  min-width: 0;
}

.framework-stage-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #bcd6f4;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 750;
}

.framework-status-grid {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.framework-status-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.framework-status-card {
  display: flex;
  min-height: 105px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.framework-status-card__icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-weight: 850;
}

.framework-status-card__icon--teal {
  color: var(--teal-700);
  background: var(--teal-100);
}

.framework-status-card__icon--muted {
  color: var(--ink-700);
  background: var(--ink-100);
}

.framework-status-card small,
.framework-status-card strong {
  display: block;
}

.framework-status-card small {
  margin-bottom: 4px;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 700;
}

.framework-status-card strong {
  color: var(--ink-950);
  font-size: 25px;
  line-height: 1;
}

.framework-connection-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #cfe1f5;
  border-radius: 11px;
  color: var(--ink-700);
  background: var(--blue-50);
  font-size: 12px;
}

.framework-connection-note > span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue-600);
  font-weight: 800;
}

.framework-connection-note p {
  margin: 1px 0 0;
}

.framework-connection-note strong {
  margin-right: 7px;
}

.framework-heading-actions,
.framework-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.framework-toolbar {
  padding: 14px 24px;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}

.framework-field {
  display: grid;
  width: min(260px, 100%);
  gap: 6px;
}

.framework-field--search {
  width: min(440px, 100%);
}

.framework-field > span {
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 750;
}

.framework-field input,
.framework-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-600);
  background: var(--white);
  font: inherit;
}

.framework-field :disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.framework-table-region {
  overflow-x: auto;
}

.framework-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.framework-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.framework-table th,
.framework-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--ink-100);
  text-align: left;
  vertical-align: middle;
}

.framework-table th {
  color: var(--ink-600);
  background: var(--ink-50);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.framework-empty-state {
  display: grid;
  min-height: 245px;
  padding: 38px 20px 46px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.framework-empty-state__mark {
  display: grid;
  min-width: 54px;
  height: 54px;
  margin-bottom: 13px;
  padding: 0 12px;
  place-items: center;
  border-radius: 16px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 14px;
  font-weight: 850;
}

.framework-empty-state h3 {
  margin-bottom: 7px;
  font-size: 16px;
}

.framework-empty-state p {
  max-width: 540px;
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-toolbar {
  justify-content: space-between;
}

.vehicle-code-search-form {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-end;
  gap: 10px;
}

.vehicle-code-search-form .framework-field {
  flex: 1;
}

.vin-configuration-toolbar {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.vin-configuration-search-form {
  display: flex;
  width: min(100%, 640px);
  max-width: 640px;
  min-width: 0;
  align-items: flex-end;
  gap: 12px;
}

.vin-configuration-search-form .framework-field {
  min-width: 0;
  flex: 1;
}

.merchant-vin-prefix.vin-configuration-prefix-code {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.vin-configuration-merchant-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vin-configuration-brand-name {
  color: var(--ink-800);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.vin-configuration-merchant-cell {
  display: grid;
  align-content: center;
  gap: 8px;
}

.vin-configuration-merchant-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid #c9dcf2;
  border-radius: 999px;
  color: #174f8f;
  background: #f3f8ff;
  line-height: 1.25;
}

.vin-configuration-merchant-toggle {
  min-height: 30px;
  justify-self: start;
  padding: 4px 9px;
  border-style: dashed;
  color: var(--blue-700);
  font-size: 12px;
  white-space: nowrap;
}

.vin-configuration-row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vin-configuration-row-actions .button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.vehicle-code-row-actions {
  display: flex;
  gap: 7px;
}

.vehicle-code-action {
  min-height: 36px;
  padding: 7px 10px;
}

.modal--vehicle-code {
  width: min(calc(100% - 32px), 780px);
}

.vehicle-code-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-code-brand-match {
  grid-column: 1 / -1;
  padding: 15px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--ink-50);
}

.vehicle-code-target-picker {
  display: grid;
  gap: 14px;
}

.vehicle-code-brand-directory,
.vehicle-code-series-panel {
  min-width: 0;
}

.vehicle-code-brand-match__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vehicle-code-brand-match__heading h3,
.vehicle-code-brand-match__heading p {
  margin: 0;
}

.vehicle-code-brand-match__heading h3 {
  color: var(--ink-950);
  font-size: 15px;
}

.vehicle-code-brand-match__heading p {
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-brand-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vehicle-code-brand-tools input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
}

.vehicle-code-brand-tools input:focus {
  border-color: var(--blue-500);
  outline: 3px solid rgb(37 132 255 / 14%);
}

.vehicle-code-brand-initials {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.vehicle-code-brand-initial {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  color: var(--ink-700);
  background: var(--white);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.vehicle-code-brand-initial:first-child,
.vehicle-code-brand-initial:last-child {
  padding-inline: 10px;
}

.vehicle-code-brand-initial:hover,
.vehicle-code-brand-initial.is-active {
  border-color: var(--blue-600);
  color: var(--blue-700);
  background: var(--blue-50);
}

.vehicle-code-brand-results {
  display: grid;
  max-height: 320px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.vehicle-code-brand-card {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.vehicle-code-brand-card:hover,
.vehicle-code-brand-card.is-selected,
.vehicle-code-brand-card.is-expanded {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgb(37 132 255 / 12%);
}

.vehicle-code-brand-card.is-expanded {
  background: var(--blue-50);
}

.vehicle-code-brand-card__logo {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-weight: 800;
}

.vehicle-code-brand-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vehicle-code-brand-card__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.vehicle-code-brand-card__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-code-brand-card__copy small,
.vehicle-code-brand-empty {
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-series-panel {
  padding: 13px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.vehicle-code-series-panel__heading {
  display: grid;
  margin-bottom: 12px;
  gap: 10px;
}

.vehicle-code-series-panel__heading h4,
.vehicle-code-series-panel__heading p {
  margin: 0;
}

.vehicle-code-series-panel__heading h4 {
  color: var(--ink-950);
  font-size: 14px;
}

.vehicle-code-series-panel__heading p {
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-series-panel__heading input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
}

.vehicle-code-series-panel__heading input:focus {
  border-color: var(--blue-500);
  outline: 3px solid rgb(37 132 255 / 14%);
}

.vehicle-code-series-results {
  display: grid;
  max-height: 320px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
}

.vehicle-code-series-card {
  display: grid;
  min-height: 58px;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.vehicle-code-series-card:hover,
.vehicle-code-series-card.is-selected {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 2px rgb(37 132 255 / 12%);
}

.vehicle-code-series-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-code-series-card small,
.vehicle-code-series-empty {
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-series-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px 12px;
  text-align: center;
}

.vehicle-code-series-empty p {
  margin: 0 0 10px;
}

.vehicle-code-brand-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  text-align: center;
}

.field-group select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
}

.vehicle-code-merchants,
.vehicle-code-form-error {
  grid-column: 1 / -1;
}

.vehicle-code-merchants {
  padding: 15px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--ink-50);
}

.vehicle-code-merchants__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.vehicle-code-merchants__heading h3,
.vehicle-code-merchants__heading p {
  margin: 0;
}

.vehicle-code-merchants__heading h3 {
  color: var(--ink-950);
  font-size: 15px;
}

.vehicle-code-merchants__heading p {
  margin-top: 4px;
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-merchant-search {
  display: flex;
  min-width: min(100%, 360px);
  gap: 8px;
}

.vehicle-code-merchant-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
}

.vehicle-code-merchant-results {
  display: grid;
  max-height: 320px;
  margin-top: 13px;
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 4px 2px 2px;
}

.vehicle-code-merchant-option {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.vehicle-code-merchant-option:hover {
  border-color: var(--blue-300);
}

.vehicle-code-merchant-option.is-selected {
  border-color: var(--blue-600);
  background: var(--blue-50);
  box-shadow: 0 0 0 2px rgb(37 132 255 / 12%);
}

.vehicle-code-merchant-option input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--blue-600);
}

.vehicle-code-merchant-option__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.vehicle-code-merchant-option__copy strong {
  overflow: hidden;
  color: var(--ink-950);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-code-merchant-option__copy small {
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-merchant-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  color: var(--ink-500);
  text-align: center;
}

.group-last-success {
  font-size: 16px !important;
  line-height: 1.25 !important;
}

.group-directory-panel {
  overflow: hidden;
}

.group-directory-layout {
  display: grid;
  min-height: 480px;
  grid-template-columns: minmax(245px, 300px) minmax(0, 1fr);
}

.group-list-panel {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--ink-200);
  background: var(--ink-50);
}

.group-list-heading,
.group-members-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.group-list-heading {
  margin-bottom: 14px;
}

.group-list-heading h3,
.group-members-heading h3 {
  margin: 0;
  color: var(--ink-950);
  font-size: 16px;
}

.group-list-heading small,
.group-members-heading p {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: 11px;
}

.group-all-button,
.group-list-item {
  min-height: 44px;
  border: 1px solid transparent;
  color: var(--ink-700);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.group-all-button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.group-all-button.is-active,
.group-list-item.is-active {
  border-color: #bcd6f4;
  color: var(--blue-700);
  background: var(--blue-50);
}

.group-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-search-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  font: inherit;
}

.group-list {
  display: grid;
  max-height: 440px;
  margin-top: 12px;
  gap: 6px;
  overflow-y: auto;
}

.group-list-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  overflow-wrap: anywhere;
}

.group-list-empty {
  margin: 22px 4px;
  color: var(--ink-500);
  font-size: 12px;
  text-align: center;
}

.group-members-panel {
  min-width: 0;
}

.group-members-heading {
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
}

.group-members-heading .group-search-form {
  width: min(390px, 60%);
}

.group-member-import-toolbar {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 100%;
  padding: 10px 18px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--white);
}

.group-member-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 750;
}

.group-member-select-all input,
.group-member-selection-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.group-member-import-toolbar p {
  margin: 0 0 0 auto;
  color: var(--ink-600);
  font-size: 12px;
}

.group-member-import-toolbar p[data-state="success"] {
  color: var(--teal-700);
}

.group-member-import-toolbar p[data-state="error"] {
  color: var(--danger-700);
}

.group-member-table {
  min-width: 980px;
}

.group-member-selection-cell {
  width: 68px;
}

.group-member-action-cell {
  width: 136px;
}

.group-member-import-button {
  min-height: 36px;
  padding: 7px 11px;
  white-space: nowrap;
}

.group-member-import-button:disabled:not([aria-busy="true"]) {
  cursor: not-allowed;
}

.group-member-pagination {
  position: sticky;
  left: 0;
  display: flex;
  min-width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--ink-100);
  background: #fbfcfd;
}

.group-member-pagination[hidden] {
  display: none;
}

.group-member-pagination p {
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
}

.group-member-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-600);
  font-size: 12px;
}

.group-member-pagination .button {
  min-height: 36px;
  padding: 7px 12px;
}

#group-member-page-select {
  min-width: 72px;
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-800);
  font: inherit;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 19px;
}

.panel-heading h2 {
  margin-bottom: 3px;
  font-size: 18px;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 12px;
}

.action-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}

.search-form {
  display: flex;
  width: min(100%, 610px);
  align-items: flex-end;
  gap: 9px;
}

.search-form > label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-input {
  position: relative;
  flex: 1;
}

.search-input > span {
  position: absolute;
  top: 9px;
  left: 13px;
  color: var(--ink-500);
  font-size: 19px;
}

.search-input input {
  min-height: 42px;
  padding: 9px 12px 9px 40px;
}

.search-input input::placeholder {
  color: var(--ink-500);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.merchant-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.merchant-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.merchant-table th,
.merchant-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--ink-100);
  text-align: left;
  vertical-align: middle;
}

.merchant-table th:first-child,
.merchant-table td:first-child {
  padding-left: 24px;
}

.merchant-table th:last-child,
.merchant-table td:last-child {
  padding-right: 24px;
}

.merchant-table th {
  color: var(--ink-600);
  background: #fbfcfd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.merchant-table td {
  color: var(--ink-700);
  font-size: 13px;
}

.merchant-table tbody tr:last-child td {
  border-bottom: 0;
}

.merchant-table tbody tr:hover {
  background: #f9fbfd;
}

.merchant-table th:nth-child(1) { width: 13%; }
.merchant-table th:nth-child(2) { width: 13%; }
.merchant-table th:nth-child(3) { width: 19%; }
.merchant-table th:nth-child(4) { width: 15%; }
.merchant-table th:nth-child(5) { width: 16%; }
.merchant-table th:nth-child(6) { width: 13%; }
.merchant-table th:nth-child(7) { width: 11%; }

.merchant-name-cell {
  color: var(--ink-950) !important;
  font-weight: 750;
}

.vin-cell {
  color: var(--blue-700) !important;
  font-size: 12px !important;
  font-weight: 700;
}

.vehicle-scopes-cell {
  color: var(--ink-800) !important;
}

.vehicle-scope-summary {
  display: grid;
  gap: 7px;
}

.vehicle-scope-summary > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.vehicle-scope-summary span {
  overflow: hidden;
  color: var(--ink-950);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-scope-summary small {
  overflow-wrap: anywhere;
  color: var(--blue-700);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.scope-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-cell {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px !important;
}

.wechat-binding-cell {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.wechat-binding-cell strong,
.wechat-binding-cell span,
.wechat-binding-cell small {
  overflow-wrap: anywhere;
}

.wechat-binding-cell strong {
  color: var(--ink-950);
  font-family: inherit;
}

.wechat-binding-cell span {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.wechat-binding-cell small {
  color: var(--ink-500);
  font-family: inherit;
  font-size: 11px;
}

.date-cell {
  color: var(--ink-500) !important;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.text-button {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.text-button--edit {
  color: var(--blue-700);
}

.text-button--edit:hover {
  background: var(--blue-50);
}

.text-button--delete {
  color: var(--danger-700);
}

.text-button--delete:hover {
  background: var(--danger-100);
}

.loading-state {
  padding: 10px 24px 16px;
}

.skeleton-row {
  display: grid;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-100);
  grid-template-columns: 1.1fr 1.3fr 1.5fr 1fr;
  gap: 30px;
}

.skeleton-row i {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-50) 45%, var(--ink-100) 65%);
  background-size: 220% 100%;
  animation: shimmer 1.35s ease-in-out infinite;
}

.empty-state {
  padding: 52px 22px 48px;
  text-align: center;
}

.empty-illustration {
  position: relative;
  display: grid;
  width: 72px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid #bad7f5;
  border-radius: 11px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.empty-illustration::before,
.empty-illustration::after {
  position: absolute;
  width: 17px;
  height: 5px;
  bottom: -5px;
  border-radius: 0 0 4px 4px;
  background: #bad7f5;
  content: "";
}

.empty-illustration::before { left: 8px; }
.empty-illustration::after { right: 8px; }

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.empty-state p {
  margin-bottom: 18px;
  color: var(--ink-500);
  font-size: 13px;
}

.pagination {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 24px;
  border-top: 1px solid var(--ink-100);
  background: #fbfcfd;
}

.pagination p {
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
}

.pagination > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination .button {
  min-height: 36px;
  padding: 7px 12px;
}

#page-indicator {
  min-width: 52px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

/* Dialogs and status */
.modal {
  width: min(calc(100% - 32px), 570px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink-950);
  background: transparent;
  box-shadow: var(--shadow-md);
}

.modal::backdrop {
  background: rgb(7 24 46 / 66%);
  backdrop-filter: blur(3px);
}

.modal-card {
  display: flex;
  max-height: calc(100dvh - 32px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 25px 18px;
  border-bottom: 1px solid var(--ink-100);
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-600);
  background: var(--ink-50);
  font-size: 24px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ink-950);
  background: var(--ink-100);
}

.modal-body {
  display: grid;
  padding: 21px 25px;
  overflow-y: auto;
  overscroll-behavior: contain;
  grid-template-columns: 1fr;
  gap: 16px;
}

.modal-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 25px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink-100);
  background: #fbfcfd;
}

.modal--compact {
  width: min(calc(100% - 32px), 430px);
}

.modal--compact .modal-card {
  align-items: center;
  padding: 30px 28px 0;
  text-align: center;
}

.modal--compact h2 {
  margin-bottom: 7px;
  font-size: 21px;
}

.modal--compact h2 + p {
  max-width: 330px;
  margin-bottom: 14px;
  color: var(--ink-600);
  font-size: 13px;
}

.modal--compact .modal-actions {
  width: calc(100% + 56px);
  margin: 22px -28px 0;
}

.modal--mcp {
  width: min(calc(100% - 32px), 720px);
}

.modal--vehicle {
  width: min(calc(100% - 32px), 920px);
}

.vehicle-dialog-body {
  display: grid;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 12px;
}

.vehicle-search-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 88px;
  gap: 12px;
}

.vehicle-dialog-selection {
  display: grid;
  min-height: 120px;
  max-height: 140px;
  padding: 10px 12px;
  overflow-y: auto;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: #fafbfc;
  gap: 8px;
}

.vehicle-selection-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vehicle-selection-heading h3 {
  margin: 0;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 650;
}

.vehicle-picker-grid {
  display: grid;
  height: clamp(300px, 52vh, 430px);
  min-height: 300px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 12px;
}

.vehicle-brand-panel,
.vehicle-preview-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: #f8fafc;
}

.vehicle-brand-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.vehicle-initials {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink-200);
  background: #f8fafc;
  gap: 3px 10px;
}

.vehicle-initial-button {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  color: var(--ink-600);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.vehicle-initial-button.is-active {
  color: var(--white);
  background: #0f766e;
}

.vehicle-brand-list {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vehicle-brand-list {
  display: grid;
  align-content: start;
  padding: 10px 12px;
  gap: 12px;
  scroll-behavior: smooth;
}

.vehicle-brand-group {
  display: grid;
  gap: 8px;
  scroll-margin-top: 8px;
}

.vehicle-brand-group__title {
  margin: 0;
  padding: 2px 2px 0;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-brand-card {
  display: grid;
  min-width: 0;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.vehicle-brand-card:hover,
.vehicle-brand-card.is-expanded,
.vehicle-brand-card.is-selected {
  border-color: #7fc8bf;
  box-shadow: var(--shadow-sm);
}

.vehicle-brand-row {
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 76px;
  padding: 8px 10px;
  cursor: pointer;
  gap: 10px;
}

.vehicle-brand-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.vehicle-brand-identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.vehicle-brand-identity strong {
  overflow: hidden;
  color: var(--ink-950);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-brand-identity small {
  color: var(--ink-500);
  font-size: 11px;
}

.vehicle-brand-logo {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--ink-100);
  border-radius: 8px;
  color: #0f766e;
  background: #e7f7f3;
  font-weight: 800;
}

.vehicle-brand-logo img {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: contain;
  background: var(--white);
}

.vehicle-select-button,
.vehicle-expand-button {
  min-height: 31px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #0f766e;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.vehicle-select-button[aria-pressed="true"] {
  color: var(--danger-700);
}

.vehicle-select-button:hover,
.vehicle-expand-button:hover {
  background: #e7f7f3;
}

.vehicle-series-dropdown {
  display: grid;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--ink-200);
  background: #f8fafc;
  gap: 8px;
}

.vehicle-series-dropdown__header {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vehicle-series-dropdown__header strong {
  font-size: 12px;
}

.vehicle-series-list {
  display: grid;
  gap: 8px;
}

.vehicle-series-option {
  display: grid;
  min-height: 54px;
  align-items: center;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--ink-200);
  border-radius: 7px;
  color: var(--ink-800);
  background: var(--white);
  text-align: left;
}

.vehicle-series-option:hover,
.vehicle-series-option.is-selected {
  border-color: #7fc8bf;
  background: #edf9f6;
}

.vehicle-series-thumb {
  position: relative;
  display: grid;
  width: 44px;
  height: 36px;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  color: #0f766e;
  background: #e7f7f3;
  font-size: 11px;
  font-weight: 800;
}

.vehicle-series-thumb img {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: contain;
  background: var(--white);
}

.vehicle-series-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.vehicle-series-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-series-copy small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-series-status {
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.vehicle-preview-panel {
  display: grid;
  place-items: center;
  padding: 20px;
}

.vehicle-preview-empty,
.vehicle-preview-card {
  display: grid;
  justify-items: center;
  color: var(--ink-500);
  text-align: center;
  gap: 9px;
}

.vehicle-preview-empty > span,
.vehicle-preview-media {
  display: grid;
  width: 96px;
  height: 96px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  color: #0f766e;
  background: #e7f7f3;
  font-size: 34px;
  font-weight: 850;
}

.vehicle-preview-media {
  position: relative;
  margin-bottom: 5px;
  border: 1px solid #d9f0eb;
  background: var(--white);
}

.vehicle-preview-media img {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 10px;
  inset: 0;
  object-fit: contain;
  background: var(--white);
}

.vehicle-preview-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink-900);
  font-size: 16px;
}

.vehicle-preview-card small {
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-preview-empty p,
.vehicle-empty-message {
  margin: 0;
  font-size: 12px;
}

.vehicle-empty-message {
  padding: 22px 12px;
  text-align: center;
}

.modal--vehicle #confirm-vehicle-dialog {
  border-color: #0f766e;
  background: #0f766e;
}

.mcp-access-body {
  gap: 17px;
}

.mcp-access-intro,
.mcp-access-status,
.mcp-access-error {
  margin: 0;
  font-size: 13px;
}

.mcp-access-intro {
  color: var(--ink-600);
}

.mcp-access-status {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--blue-700);
  background: var(--blue-50);
}

.mcp-access-error {
  padding: 10px 12px;
  border-left: 3px solid var(--danger-600);
  border-radius: var(--radius-sm);
  color: var(--danger-700);
  background: var(--danger-100);
  font-weight: 650;
}

.mcp-access-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.mcp-access-field label {
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 750;
}

.mcp-access-field input,
.mcp-access-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  background: var(--ink-50);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.mcp-access-field input {
  min-height: 44px;
  padding: 9px 11px;
}

.mcp-access-field textarea {
  min-height: 185px;
  padding: 11px 12px;
  overflow: auto;
  resize: vertical;
  white-space: pre;
}

.mcp-copy-control {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.mcp-copy-control .button {
  min-width: 72px;
}

.mcp-copy-config {
  justify-self: end;
}

.danger-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--danger-700);
  background: var(--danger-100);
  font-size: 23px;
  font-weight: 850;
}

.delete-target {
  max-width: 100%;
  margin: 0;
  padding: 6px 11px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--ink-800);
  background: var(--ink-50);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 100;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 17px 13px 43px;
  border: 1px solid #a8ddd6;
  border-radius: 10px;
  color: #075e58;
  background: #effbf9;
  box-shadow: 0 14px 34px rgb(7 24 46 / 18%);
  font-size: 13px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

.toast::before {
  position: absolute;
  display: grid;
  width: 20px;
  height: 20px;
  top: 12px;
  left: 14px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal-600);
  content: "✓";
  font-size: 12px;
}

.toast[data-kind="error"] {
  border-color: #efbaba;
  color: var(--danger-700);
  background: #fff5f5;
}

.toast[data-kind="error"]::before {
  background: var(--danger-600);
  content: "!";
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 82px;
  }

  .sidebar {
    align-items: center;
    padding-right: 12px;
    padding-left: 12px;
  }

  .sidebar-brand {
    padding-right: 0;
    padding-left: 0;
  }

  .sidebar-brand > span:last-child,
  .nav-item:not(.is-active) > :not(:first-child),
  .mcp-access-card > span:last-child,
  .sidebar-note > span:last-child {
    display: none;
  }

  .sidebar nav,
  .nav-item {
    width: 100%;
  }

  .nav-item {
    justify-content: center;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0;
  }

  .nav-item span {
    font-size: 20px;
  }

  .mcp-access-card,
  .sidebar-note {
    justify-content: center;
    padding: 13px 9px;
  }

  .table-scroll {
    overflow-x: auto;
  }

  .merchant-table {
    min-width: 1120px;
  }

  .framework-status-grid,
  .framework-status-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .vin-configuration-toolbar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .vin-configuration-search-form {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .framework-toolbar.vin-configuration-toolbar,
  .vehicle-code-search-form.vin-configuration-search-form {
    display: flex;
  }

  .vin-configuration-search-form .framework-field,
  .vin-configuration-search-form .button,
  .vin-configuration-toolbar > .button {
    width: 100%;
    max-width: 100%;
  }

  .vehicle-search-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .vehicle-picker-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .vehicle-brand-panel,
  .vehicle-preview-panel {
    min-height: 310px;
    max-height: 55dvh;
  }

  .vehicle-preview-panel {
    min-height: 220px;
  }
}

@media (min-width: 721px) {
  .modal--vehicle-code {
    width: min(calc(100% - 48px), 1040px);
  }

  .modal--vehicle-code .modal-body {
    max-height: calc(100dvh - 190px);
  }

  .modal--vehicle-code .modal-actions {
    position: sticky;
    z-index: 2;
    bottom: 0;
  }

  .vehicle-code-target-picker {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  }

  .vehicle-code-brand-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 64px;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px;
    flex-direction: row;
    justify-content: space-between;
  }

  .sidebar-brand {
    padding: 0;
    border: 0;
  }

  .sidebar-brand > span:last-child {
    display: block;
  }

  .sidebar-brand__mark {
    width: 34px;
    height: 34px;
  }

  .sidebar nav,
  .sidebar-note {
    display: none;
  }

  .workspace {
    width: 100%;
  }

  .topbar {
    min-height: 62px;
    padding: 9px 16px;
  }

  .topbar > div:first-child {
    display: none;
  }

  .account-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard {
    padding: 24px 15px 36px;
  }

  .welcome-row {
    display: block;
  }

  .date-chip {
    display: inline-block;
    margin-top: 14px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .framework-status-grid,
  .framework-status-grid--three {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .framework-heading-actions,
  .framework-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .framework-toolbar {
    padding: 13px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .framework-field,
  .framework-field--search {
    width: 100%;
  }

  .vehicle-code-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .vehicle-code-form-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-code-brand-match__heading {
    display: grid;
  }

  .vehicle-code-brand-results {
    grid-template-columns: 1fr;
  }

  .vehicle-code-merchants__heading {
    display: grid;
  }

  .vehicle-code-merchant-search {
    min-width: 0;
  }

  .vehicle-code-merchant-results {
    grid-template-columns: 1fr;
  }

  #vehicle-code-table-region {
    overflow-x: visible;
  }

  .vehicle-code-table {
    min-width: 0;
  }

  .vehicle-code-table thead {
    display: none;
  }

  .vehicle-code-table tbody,
  .vehicle-code-table tr,
  .vehicle-code-table td {
    display: block;
    width: 100%;
  }

  .vehicle-code-table tbody {
    display: grid;
    gap: 12px;
  }

  .vehicle-code-table tr {
    overflow: hidden;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .vehicle-code-table td {
    display: grid;
    min-height: 44px;
    padding: 11px 14px;
    grid-template-columns: minmax(96px, .4fr) minmax(0, 1fr);
    gap: 12px;
  }

  .vehicle-code-table td::before {
    color: var(--ink-500);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
  }

  .vehicle-code-table .vehicle-code-row-actions {
    display: flex;
    align-items: center;
  }

  .vehicle-code-table .vehicle-code-row-actions::before {
    min-width: 96px;
  }

  .framework-table-region {
    overflow-x: auto;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .stat-card {
    min-height: 120px;
    gap: 11px;
    padding: 17px 14px;
  }

  .stat-icon {
    width: 39px;
    height: 39px;
    border-radius: 10px;
    font-size: 10px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .stat-card small {
    display: none;
  }

  .data-panel {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .panel-heading {
    padding: 0 0 15px;
  }

  .panel-heading p {
    display: none;
  }

  .action-bar {
    display: grid;
    padding: 13px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-form {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .button,
  .text-button,
  .icon-button,
  .search-input input {
    min-height: 44px;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .merchant-table,
  .merchant-table tbody,
  .merchant-table tr,
  .merchant-table td {
    display: block;
    width: 100%;
  }

  .merchant-table {
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .merchant-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .merchant-table tr {
    display: grid;
    padding: 8px 15px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }

  .merchant-table td,
  .merchant-table td:first-child,
  .merchant-table td:last-child {
    display: grid;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-100);
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    white-space: normal;
  }

  .merchant-table td::before {
    color: var(--ink-500);
    content: attr(data-label);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
  }

  .merchant-table td:last-child {
    border-bottom: 0;
  }

  .scope-cell {
    overflow: visible;
    text-overflow: initial;
  }

  .row-actions {
    margin: -5px 0;
  }

  .loading-state {
    margin-top: 12px;
    padding: 10px 15px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .skeleton-row {
    grid-template-columns: 1fr 1fr;
  }

  .empty-state {
    margin-top: 12px;
    padding: 42px 18px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .pagination {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .pagination p {
    display: none;
  }

  .pagination > div {
    width: 100%;
    justify-content: space-between;
  }

  .modal {
    width: calc(100% - 22px);
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - max(22px, env(safe-area-inset-bottom)));
  }

  .modal-card {
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - max(22px, env(safe-area-inset-bottom)));
  }

  .modal-header {
    padding: 18px 18px 14px;
  }

  .modal-body {
    padding: 17px 18px;
    overflow-y: auto;
  }

  .modal-actions {
    padding: 13px 18px max(14px, env(safe-area-inset-bottom));
  }

  .modal-actions .button {
    flex: 1;
  }

  .vehicle-dialog-body {
    padding: 15px;
  }

  .vehicle-scope-field__heading {
    display: grid;
  }

  .vehicle-scope-field__heading .button {
    width: 100%;
  }

  .vehicle-selection-heading {
    display: grid;
    gap: 3px;
  }

  .vehicle-brand-row {
    grid-template-columns: minmax(0, 1fr) 70px;
  }

  .modal--compact .modal-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  .modal--compact .modal-actions {
    width: calc(100% + 40px);
    margin-right: -20px;
    margin-left: -20px;
  }

  .toast {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .login-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .login-card {
    padding: 32px 25px 25px;
    border-radius: 21px;
  }

  .vin-strip {
    margin-right: -25px;
    margin-left: -25px;
    padding-right: 25px;
    padding-left: 25px;
  }

  .account-badge strong {
    display: none;
  }

  .stat-card {
    display: block;
  }

  .stat-icon {
    margin-bottom: 10px;
  }

  .panel-heading .button {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .group-directory-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .group-members-heading {
    display: grid;
  }

  .group-members-heading .group-search-form {
    width: 100%;
  }

  .group-member-import-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .group-member-import-toolbar p {
    flex-basis: 100%;
    margin-left: 0;
  }

  .group-member-pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .group-member-pagination > div {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .group-directory-panel {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .group-directory-panel > .panel-heading {
    margin-bottom: 12px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .group-directory-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .group-list-panel,
  .group-members-panel {
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
  }

  .group-list-panel {
    padding: 14px;
  }

  .group-list {
    max-height: 260px;
  }

  .group-members-heading {
    padding: 14px;
  }

  .group-member-import-toolbar {
    padding: 12px 14px;
  }
}

.vehicle-merchant-chip[hidden] {
  display: none;
}

/* Vehicle aggregate desktop */
@media (min-width: 721px) {
.vehicle-aggregate-grid {
  overflow-x: auto;
}

.vehicle-aggregate-table {
  width: 100%;
  min-width: 860px;
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(16 45 84 / 7%);
  table-layout: fixed;
}

.vehicle-aggregate-table th {
  padding: 13px 16px;
  border-bottom: 1px solid #dbe5f1;
  color: #5b6f89;
  background: #f5f8fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: left;
}

.vehicle-aggregate-table th:nth-child(1) {
  width: 24%;
}

.vehicle-aggregate-table th:nth-child(2) {
  width: 18%;
}

.vehicle-aggregate-table th:nth-child(3) {
  width: auto;
}

.vehicle-aggregate-table th:nth-child(4) {
  width: 104px;
  text-align: right;
}

.vehicle-aggregate-row td {
  padding: 14px 16px;
  border-bottom: 1px solid #e6edf5;
  vertical-align: middle;
}

.vehicle-aggregate-row:last-child td {
  border-bottom: 0;
}

.vehicle-aggregate-row:hover td {
  background: #f8fbff;
}

.vehicle-aggregate-model-cell strong {
  color: #102d54;
  font-size: 15px;
  line-height: 1.5;
}

.vehicle-aggregate-prefixes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.vehicle-prefix-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #0b5ea8;
  font-size: 12px;
  font-weight: 750;
}

.vehicle-prefix-empty,
.vehicle-merchant-empty {
  color: #64748b;
  font-size: 13px;
}

.vehicle-merchant-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.vehicle-merchant-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 5px 4px 10px;
  border: 1px solid #dbe7f1;
  border-radius: 999px;
  color: #17385f;
  background: #f5f9fd;
  font-size: 13px;
  font-weight: 700;
}

.vehicle-merchant-chip__name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-merchant-delete {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #b42318;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.vehicle-merchant-delete:hover,
.vehicle-merchant-delete:focus-visible {
  background: #fee4e2;
}

.vehicle-merchant-disclosure {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #bcd8f2;
  border-radius: 999px;
  color: #0b6db7;
  background: #eef7ff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.vehicle-aggregate-operation-cell {
  text-align: right;
}

.vehicle-aggregate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.vehicle-aggregate-edit,
.vehicle-aggregate-delete {
  min-height: 36px;
  padding: 7px 13px;
}

.vehicle-aggregate-delete {
  border-color: #f1c4c0;
  color: var(--danger-700);
  background: #fff8f7;
}

.vehicle-aggregate-delete:hover,
.vehicle-aggregate-delete:focus-visible {
  border-color: var(--danger-600);
  background: #fff0ee;
}

.modal--vehicle-aggregate .modal-card {
  width: min(1040px, calc(100vw - 64px));
  max-height: 86vh;
}

.vehicle-aggregate-form-body {
  display: grid;
  gap: 20px;
  overflow-y: auto;
}

.vehicle-aggregate-picker,
.vehicle-aggregate-merchants {
  padding: 18px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #f8fbff;
}

.vehicle-aggregate-catalog {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 14px;
}

.vehicle-aggregate-brand-panel,
.vehicle-aggregate-series-panel {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
}

.vehicle-aggregate-brand-panel input,
.vehicle-aggregate-section-heading input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
}

.vehicle-aggregate-brand-results,
.vehicle-aggregate-series-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  margin-top: 12px;
  overflow-y: auto;
}

.vehicle-aggregate-brand-option,
.vehicle-aggregate-series-option {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  color: #17385f;
  cursor: pointer;
}

.vehicle-aggregate-brand-option[aria-pressed="true"],
.vehicle-aggregate-series-option[aria-pressed="true"] {
  border-color: #1688c9;
  background: #e8f6ff;
  box-shadow: 0 0 0 2px rgb(22 136 201 / 14%);
}

.vehicle-aggregate-merchant-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  margin-top: 14px;
  overflow-y: auto;
}

.vehicle-aggregate-merchant-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
}

.vehicle-aggregate-merchant-option span {
  display: grid;
  gap: 2px;
}

.vehicle-aggregate-impact-note {
  margin: 12px 0 0;
  color: #9a5a12;
  font-size: 13px;
}

}

@media (max-width: 1024px) and (min-width: 721px) {
  .vehicle-aggregate-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop admin visual system */
@media (min-width: 721px) {
  .admin-page {
    background: #eef3f8;
  }

  .workspace {
    min-height: 100vh;
    background:
      radial-gradient(circle at 100% 0, rgb(31 142 197 / 8%), transparent 32rem),
      #eef3f8;
  }

  .topbar {
    border-bottom-color: #dce6f1;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 1px 0 rgb(15 43 78 / 4%);
    backdrop-filter: blur(12px);
  }

  .dashboard {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px;
  }

  .dashboard > * + * {
    margin-top: 24px;
  }

  .welcome-row,
  .data-panel,
  .framework-connection-note,
  .framework-status-card,
  .stat-card {
    border-color: #dce6f1;
    box-shadow: 0 12px 30px rgb(24 52 88 / 6%);
  }

  .welcome-row {
    padding: 24px;
    border: 1px solid #dce6f1;
    border-radius: 18px;
    background: linear-gradient(118deg, #fff 0%, #f7fbff 100%);
  }

  .stat-grid,
  .framework-status-grid {
    gap: 16px;
  }

  .stat-card,
  .framework-status-card {
    min-height: 126px;
    border-radius: 16px;
    background: #fff;
  }

  .data-panel {
    overflow: hidden;
    border: 1px solid #dce6f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgb(24 52 88 / 7%);
  }

  .panel-heading,
  .action-bar,
  .framework-toolbar {
    padding: 24px;
  }

  .panel-heading {
    gap: 16px;
    border-bottom: 1px solid #e5edf5;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  }

  .button,
  .group-all-button,
  .group-list-item,
  .fallback-contact-option {
    min-height: 44px;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease,
      background-color 150ms ease;
  }

  .button:not(:disabled):hover,
  .fallback-contact-option:not(:disabled):hover {
    transform: translateY(-1px);
  }

  .group-directory-heading-actions,
  .group-settings-actions,
  .fallback-contact-compact,
  .fallback-contact-current-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .group-directory-heading-actions {
    justify-content: flex-end;
  }

  .group-settings-actions {
    gap: 6px;
  }

  .group-settings-actions .button {
    min-height: 36px;
    padding: 0 11px;
    border-color: #c8dcef;
    color: #315f8c;
    background: #f5f9fd;
    font-size: 12px;
  }

  .fallback-contact-compact {
    min-height: 44px;
    padding: 5px 6px 5px 12px;
    border: 1px solid #dce6f1;
    border-radius: 12px;
    color: #60748d;
    background: #f8fbff;
    font-size: 12px;
  }

  .fallback-contact-compact strong {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    vertical-align: bottom;
    color: #17385f;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agent-settings-trigger {
    gap: 7px;
    border-color: #c8dcef;
    color: #154d82;
    background: #f5faff;
  }

  .shared-delay-note {
    margin-top: 7px !important;
    color: #1769aa !important;
    font-size: 12px !important;
  }

  .modal--fallback {
    width: min(calc(100% - 48px), 820px);
  }

  .modal--agent-delay {
    width: min(calc(100% - 48px), 580px);
  }

  .modal--agent-delay .modal-card {
    max-height: min(72vh, 520px);
  }

  .agent-delay-dialog-body {
    overflow-y: auto;
  }

  .modal--fallback .modal-card {
    max-height: min(82vh, 760px);
  }

  .fallback-dialog-body {
    display: grid;
    overflow-y: auto;
    gap: 16px;
  }

  .agent-delay-panel,
  .fallback-settings-section {
    min-width: 0;
    padding: 20px;
    border: 1px solid #dce6f1;
    border-radius: 16px;
    background: #fff;
  }

  .agent-delay-panel {
    border-color: #bcd8f2;
    background: linear-gradient(135deg, #f6fbff 0%, #fff 72%);
  }

  .agent-settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
  }

  .agent-settings-section-heading h3,
  .agent-settings-section-heading p {
    margin: 0;
  }

  .agent-settings-section-heading h3 {
    color: #102d54;
    font-size: 19px;
  }

  .agent-settings-section-heading h3 + p {
    max-width: 610px;
    margin-top: 6px;
    color: #60748d;
    font-size: 13px;
    line-height: 1.65;
  }

  .mention-delay-form {
    display: grid;
    margin-top: 16px;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    align-items: end;
    gap: 12px;
  }

  .mention-delay-form label {
    align-self: center;
    color: #17385f;
    font-size: 14px;
    font-weight: 800;
  }

  .mention-delay-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #c9d8e7;
    border-radius: 10px;
    color: #102d54;
    background: #fff;
    font: inherit;
    font-weight: 800;
  }

  .mention-delay-form input:disabled {
    color: #8293a7;
    background: #edf3f8;
  }

  .agent-setting-feedback {
    min-height: 20px;
    margin: 10px 0 0;
    color: #60748d;
    font-size: 13px;
  }

  .agent-setting-feedback[data-state="error"] {
    color: #b42318;
  }

  .agent-setting-feedback[data-state="success"] {
    color: #087f5b;
  }

  .fallback-settings-section {
    display: grid;
    gap: 14px;
  }

  .fallback-contact-current-panel,
  .fallback-contact-picker {
    min-width: 0;
    padding: 20px;
    border: 1px solid #dce6f1;
    border-radius: 14px;
    background: #f8fbff;
  }

  .fallback-contact-current-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .fallback-contact-current-panel > div {
    display: grid;
    min-width: 0;
    gap: 8px;
  }

  .fallback-contact-current-panel small,
  .fallback-contact-picker p {
    color: #60748d;
  }

  .fallback-contact-current-panel strong {
    overflow-wrap: anywhere;
    color: #102d54;
    font-size: 19px;
  }

  .fallback-coverage-summary {
    margin: 0;
    color: #60748d;
    font-size: 13px;
  }

  .fallback-missing-groups {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 6px;
  }

  .fallback-missing-groups li {
    padding: 4px 8px;
    border-radius: 999px;
    color: #9a3412;
    background: #fff1e8;
    font-size: 12px;
    font-weight: 700;
  }

  .fallback-contact-current-actions {
    flex: 0 0 auto;
  }

  .fallback-contact-picker__heading,
  .fallback-contact-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .fallback-contact-picker__heading h3,
  .fallback-contact-picker__heading p,
  .fallback-contact-actions p {
    margin: 0;
  }

  .fallback-contact-picker__heading p {
    margin-top: 4px;
    font-size: 12px;
  }

  .fallback-contact-picker__heading .group-search-form {
    width: min(390px, 48%);
  }

  .fallback-contact-candidates {
    display: grid;
    min-height: 76px;
    max-height: 244px;
    margin-top: 16px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid #dce6f1;
    border-radius: 12px;
    background: #fff;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    color: #60748d;
  }

  .fallback-contact-option {
    padding: 10px 12px;
    border: 1px solid #dce6f1;
    border-radius: 10px;
    color: #17385f;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .fallback-contact-option.is-selected,
  .fallback-contact-option[aria-selected="true"] {
    border-color: #1688c9;
    background: #eaf6ff;
    box-shadow: 0 0 0 3px rgb(22 136 201 / 13%);
  }

  .fallback-contact-actions {
    margin-top: 16px;
  }

  .fallback-contact-actions p {
    font-size: 13px;
  }

  .fallback-contact-actions p[data-state="error"] {
    color: #b42318;
  }

  .fallback-contact-actions p[data-state="success"] {
    color: #087f5b;
  }

  #vin-fallback-status[data-state="stale"] {
    color: #9a5a12;
    background: #fff5dd;
  }

  #vin-fallback-status[data-state="warning"] {
    color: #9a5a12;
    background: #fff5dd;
  }

  .group-directory-layout {
    gap: 16px;
  }

  .group-list-panel,
  .group-members-panel {
    background: #fbfdff;
  }

  .framework-table tbody tr:hover {
    background: #f7fbff;
  }

  .vehicle-aggregate-grid {
    padding: 24px;
    background: #f7faff;
  }

  .vehicle-aggregate-table {
    border-color: #d8e4f0;
    box-shadow: 0 12px 28px rgb(16 45 84 / 7%);
  }

  .vehicle-aggregate-row {
    transition: background-color 150ms ease;
  }

  .modal .modal-card {
    border: 1px solid #d6e2ee;
    box-shadow: 0 28px 70px rgb(5 25 52 / 24%);
  }

  .modal-body {
    background: #fbfdff;
  }

  .modal-actions {
    position: sticky;
    z-index: 3;
    bottom: 0;
    padding: 16px 24px;
    border-top: 1px solid #dce6f1;
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 -10px 24px rgb(24 52 88 / 6%);
    backdrop-filter: blur(10px);
  }

  .vehicle-code-target-picker {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 16px;
  }

  .vehicle-code-brand-directory,
  .vehicle-code-series-panel,
  .vehicle-code-merchants,
  .vehicle-aggregate-picker,
  .vehicle-aggregate-merchants {
    border-color: #dce6f1;
    background: #f8fbff;
  }

  .vehicle-code-brand-option[aria-pressed="true"],
  .vehicle-code-series-option[aria-pressed="true"],
  .vehicle-aggregate-brand-option[aria-pressed="true"],
  .vehicle-aggregate-series-option[aria-pressed="true"] {
    border-color: #1688c9;
    background: #e8f6ff;
    box-shadow: 0 0 0 3px rgb(22 136 201 / 13%);
  }

  .framework-empty-state,
  .empty-state {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  }
}

@media (min-width: 1700px) {
  .vehicle-aggregate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.is-selected {
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.field-error:not(:empty)::before {
  content: "! ";
  font-weight: 800;
}

.merchant-vehicle-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.merchant-vehicle-actions .button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
  white-space: nowrap;
}

.merchant-vehicle-delete {
  border-color: #f1c4c0;
  color: var(--danger-700);
  background: #fff8f7;
}

.merchant-vehicle-delete:hover,
.merchant-vehicle-delete:focus-visible {
  border-color: var(--danger-600);
  background: #fff0ee;
}

.merchant-vehicle-dialog-subtitle {
  margin: 7px 0 0;
  color: var(--ink-500);
  font-size: 13px;
}

.merchant-vehicle-dialog-subtitle strong {
  color: var(--ink-800);
}

.merchant-vehicle-editor-body {
  gap: 16px;
  padding: 20px 24px;
  background: #f5f8fc;
}

.merchant-vehicle-selected-section,
.merchant-vehicle-catalog-section {
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 5px 18px rgb(24 52 88 / 4%);
}

.merchant-vehicle-selected-section {
  padding: 16px 18px;
}

.merchant-vehicle-selected-heading,
.merchant-vehicle-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.merchant-vehicle-selected-heading h3,
.merchant-vehicle-catalog-toolbar h3 {
  margin: 0;
  color: var(--ink-900);
  font-size: 16px;
}

.merchant-vehicle-selected-heading p,
.merchant-vehicle-catalog-toolbar p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 12px;
}

.merchant-vehicle-selected {
  display: flex;
  min-height: 38px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.merchant-vehicle-selected-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 4px 4px 4px 11px;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 13px;
  font-weight: 700;
}

.merchant-vehicle-selected-chip--brand,
.merchant-vehicle-selected-chip--custom {
  border-color: #c8e8e2;
  color: #08786d;
  background: #effbf9;
}

.merchant-vehicle-selected-remove {
  display: inline-grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--danger-700);
  background: rgb(255 255 255 / 82%);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.merchant-vehicle-selected-remove:hover,
.merchant-vehicle-selected-remove:focus-visible {
  background: #fee4e2;
}

.merchant-vehicle-selected-empty,
.merchant-vehicle-options-empty {
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
}

.merchant-vehicle-catalog-section {
  overflow: hidden;
}

.merchant-vehicle-catalog-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid #e5edf5;
  background: #fbfdff;
}

.merchant-vehicle-search-field {
  width: min(340px, 44%);
}

.merchant-vehicle-search-field input {
  width: 100%;
  min-height: 42px;
  margin: 0;
  border-color: #cfdceb;
  background: var(--white);
}

.merchant-vehicle-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.merchant-vehicle-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dbe5f1;
  border-radius: 11px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.merchant-vehicle-option:hover {
  border-color: #9cc8ef;
  background: #f8fbff;
}

.merchant-vehicle-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.merchant-vehicle-option-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.merchant-vehicle-option-copy strong {
  overflow: hidden;
  color: var(--ink-800);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-vehicle-option-copy small {
  color: var(--ink-500);
  font-size: 11px;
}

.merchant-vehicle-option-mark {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  color: var(--blue-700);
  background: #f5f9fd;
  font-weight: 800;
}

.merchant-vehicle-option:has(input:checked) .merchant-vehicle-option-mark {
  border-color: var(--blue-600);
  color: var(--white);
  background: var(--blue-600);
}

/* Compact merchant and vehicle workspaces */
@media (min-width: 901px) {
  .merchant-directory-panel,
  .model-directory-panel {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
  }

  .workspace-action {
    min-width: 88px;
    min-height: 42px;
    padding: 9px 16px;
    white-space: nowrap;
  }

  #add-vehicle-code-button {
    min-width: 156px;
  }

  .merchant-directory-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .merchant-directory-table th,
  .merchant-directory-table td {
    padding: 10px 16px;
  }

  .merchant-directory-table th:nth-child(1) {
    width: 24%;
  }

  .merchant-directory-table th:nth-child(2) {
    width: 180px;
  }

  .merchant-directory-table th:nth-child(3) {
    width: auto;
  }

  .merchant-directory-table th:nth-child(4),
  .merchant-directory-table td:nth-child(4) {
    width: 196px;
    text-align: right;
  }

  .merchant-vehicle-row {
    height: 64px;
  }

  .merchant-vehicle-row:hover {
    background: var(--blue-50);
  }

  .merchant-vehicle-name,
  .merchant-vehicle-display-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .merchant-vehicle-display-name {
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 12px;
  }

  .merchant-vin-prefixes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .merchant-vin-prefix {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #bfece5;
    border-radius: 999px;
    color: #08776c;
    background: #e8faf7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
  }

  .merchant-vin-prefix-empty {
    color: var(--ink-500);
    font-size: 12px;
  }

  .merchant-vehicle-labels {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .merchant-vehicle-label {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 3px 8px;
    overflow: hidden;
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .merchant-vehicle-disclosure,
  .merchant-vin-prefix-disclosure {
    min-height: 28px;
    padding: 3px 9px;
    border-style: dashed;
    border-color: var(--blue-500);
    color: var(--blue-700);
    background: var(--white);
    font-size: 12px;
  }

  .model-directory-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .model-directory-table th,
  .model-directory-table td {
    padding: 10px 16px;
  }

  .model-directory-table th:nth-child(1) {
    width: auto;
  }

  .model-directory-table th:nth-child(2) {
    width: 25%;
  }

  .model-directory-table th:nth-child(3) {
    width: 32%;
  }

  .model-directory-table th:nth-child(4),
  .model-directory-table td:nth-child(4) {
    width: 120px;
    text-align: right;
  }

  .vehicle-aggregate-row {
    height: 64px;
  }

  .vehicle-aggregate-row:hover {
    background: var(--blue-50);
  }

  .vehicle-aggregate-model-cell strong {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vehicle-aggregate-model-cell__chips,
  .vehicle-aggregate-prefix-cell__chips,
  .vehicle-aggregate-merchant-cell__chips {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .vehicle-aggregate-model-cell__chip,
  .vehicle-aggregate-prefix-cell__chip,
  .vehicle-aggregate-merchant-cell__chip {
    display: inline-flex;
    min-height: 26px;
    max-width: 150px;
    align-items: center;
    padding: 3px 8px;
    overflow: hidden;
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vehicle-aggregate-model-cell__chip {
    border-color: var(--ink-300);
    color: var(--ink-800);
    background: var(--ink-50);
  }

  .vehicle-aggregate-merchant-cell__chip {
    border-color: var(--teal-100);
    color: var(--teal-700);
    background: #effbf9;
  }

  .vehicle-aggregate-model-cell__more,
  .vehicle-aggregate-prefix-cell__more,
  .vehicle-aggregate-merchant-cell__more {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 3px 8px;
    border: 1px dashed var(--ink-300);
    border-radius: 999px;
    color: var(--ink-700);
    background: var(--white);
    font-size: 12px;
    font-weight: 800;
  }

  .vehicle-code-row-actions {
    justify-content: flex-end;
  }

  .modal--vehicle-code {
    width: min(calc(100% - 48px), 1080px);
  }

  .modal--vehicle-code .modal-card,
  .modal--vehicle-aggregate .modal-card {
    max-height: min(86dvh, 820px);
    overflow: hidden;
  }

  .modal--vehicle-code .modal-body,
  .modal--vehicle-aggregate .modal-body {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .vehicle-code-form-grid {
    gap: 14px;
  }

  .vehicle-code-target-picker {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: stretch;
    gap: 14px;
  }

  .vehicle-code-brand-directory,
  .vehicle-code-series-panel {
    min-height: 0;
  }

  .vehicle-code-brand-results,
  .vehicle-code-series-results {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .vehicle-code-prefix-entry {
    display: flex;
    align-items: stretch;
    gap: 8px;
  }

  .vehicle-code-prefix-entry input {
    min-width: 0;
    flex: 1;
  }

  .vehicle-code-prefix-rules {
    display: flex;
    max-height: 96px;
    margin-top: 8px;
    padding: 2px;
    overflow-y: auto;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    scrollbar-gutter: stable;
  }

  .vehicle-code-prefix-chip {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 6px;
    padding: 3px 4px 3px 9px;
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 12px;
  }

  .vehicle-code-prefix-chip small {
    color: var(--ink-600);
  }

  .vehicle-code-prefix-remove {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    color: var(--danger-700);
    background: var(--white);
  }

  .vehicle-code-merchant-results {
    max-height: 236px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .vehicle-code-merchant-option {
    min-height: 56px;
    padding: 8px 11px;
  }

  .vehicle-code-brand-card,
  .vehicle-code-series-card {
    min-height: 56px;
  }

  .merchant-vehicle-options {
    max-height: 390px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .merchant-vehicle-option:has(input:checked) {
    border-width: 2px;
    border-color: var(--blue-600);
    background: var(--blue-50);
    box-shadow: 0 0 0 2px rgb(37 128 223 / 20%);
  }

  .modal-actions {
    position: sticky;
    z-index: 4;
    bottom: 0;
  }

  .workspace-action:focus-visible,
  .merchant-directory-table button:focus-visible,
  .model-directory-table button:focus-visible,
  .modal--vehicle-code button:focus-visible,
  .modal--vehicle-code input:focus-visible,
  .modal--vehicle-aggregate button:focus-visible,
  .modal--vehicle-aggregate input:focus-visible {
    outline: 3px solid var(--blue-500);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
  }

  .workspace-action:disabled,
  .modal--vehicle-code :disabled,
  .modal--vehicle-aggregate :disabled {
    cursor: not-allowed;
    opacity: .58;
    filter: grayscale(.18);
  }

  [aria-busy="true"] {
    cursor: progress;
  }

  .framework-table-region[aria-busy="true"],
  .vehicle-code-brand-results[aria-busy="true"],
  .vehicle-code-series-results[aria-busy="true"],
  .vehicle-code-merchant-results[aria-busy="true"] {
    opacity: .68;
  }

  .button[aria-busy="true"]::after {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: spin 700ms linear infinite;
  }

  .empty-state:not([hidden]),
  .framework-empty-state:not([hidden]) {
    border: 1px dashed var(--ink-300);
    background: var(--ink-50);
  }

  .field-error:not(:empty) {
    padding-left: 10px;
    border-left: 3px solid var(--danger-600);
  }
}

/* Compact workspace reachability */
@media (max-width: 900px) {
  #merchant-vehicle-table-region,
  #vehicle-code-table-region {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .merchant-directory-table {
    min-width: 860px;
  }

  .model-directory-table {
    min-width: 820px;
  }

  .modal--vehicle-code,
  .modal--vehicle-aggregate,
  .modal--vehicle-code .modal-card,
  .modal--vehicle-aggregate .modal-card {
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - max(22px, env(safe-area-inset-bottom)));
  }

  .modal--vehicle-code .modal-body,
  .modal--vehicle-aggregate .modal-body {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .modal-actions {
    position: sticky;
    z-index: 4;
    bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Multi-series image selector ===== */
.vehicle-code-dialog-shell {
  display: grid;
  max-height: min(880px, calc(100dvh - 64px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.vehicle-code-dialog-body {
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.vehicle-code-step[hidden] {
  display: none;
}

.vehicle-code-picker {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.vehicle-code-brand-directory {
  min-width: 0;
}

.vehicle-code-series-panel__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.vehicle-code-brand-switch-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f0c36d;
  border-radius: 10px;
  color: var(--ink-800);
  background: #fff8e8;
  font-size: 13px;
}

.vehicle-code-brand-switch-confirm span {
  flex: 1;
}

.vehicle-code-series-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vehicle-code-series-toolbar p {
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-series-toolbar__actions {
  display: flex;
  gap: 8px;
}

.vehicle-series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vehicle-series-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.vehicle-series-card:hover {
  border-color: var(--blue-400);
}

.vehicle-series-card:has(input:checked) {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 2px rgb(37 132 255 / 14%);
}

.vehicle-series-card input {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue-600);
}

.vehicle-series-card:has(input:disabled) {
  cursor: not-allowed;
  opacity: .62;
}

.vehicle-series-card__media {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: var(--blue-700);
  background: #f5f8fc;
}

.vehicle-series-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vehicle-series-card__media-placeholder {
  font-size: 24px;
  font-weight: 800;
}

.vehicle-series-card__copy {
  display: block;
  min-width: 0;
  padding-right: 22px;
}

.vehicle-series-card__copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-900);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-series-card__status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--ink-600);
  background: rgb(255 255 255 / 92%);
  font-size: 11px;
  font-weight: 700;
}

.vehicle-code-selected-chips {
  display: flex;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.vehicle-code-selected-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
}

.vehicle-code-selected-remove {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 50%;
  color: var(--danger-700);
  background: var(--white);
}

.vehicle-code-rules-grid {
  display: grid;
  gap: 16px;
}

.vehicle-code-selected-summary {
  padding: 15px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--ink-50);
}

.vehicle-code-selected-summary__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-code-selected-summary__heading h3 {
  margin: 0;
  color: var(--ink-950);
  font-size: 15px;
}

.vehicle-code-selected-summary__heading p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 12px;
}

.vehicle-code-selected-series {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.vehicle-code-selected-card {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  background: var(--white);
}

.vehicle-code-selected-card .vehicle-series-card__media {
  aspect-ratio: 16 / 9;
}

.vehicle-code-selected-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}

.vehicle-code-selected-card figcaption strong {
  overflow: hidden;
  color: var(--ink-900);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-code-selected-locked {
  margin: 0;
  color: var(--ink-600);
  font-size: 13px;
}

.vehicle-code-configured-retry {
  grid-column: 1 / -1;
}

.vehicle-code-dialog-actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
}

@media (max-width: 900px) {
  .vehicle-code-dialog-shell {
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)) - max(22px, env(safe-area-inset-bottom)));
  }

  .vehicle-code-picker {
    grid-template-columns: 1fr;
  }

  .vehicle-series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-code-selected-series {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-code-series-toolbar,
  .vehicle-code-selected-summary__heading {
    display: grid;
  }

  .vehicle-code-series-toolbar__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .vehicle-series-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-code-brand-switch-confirm {
    flex-wrap: wrap;
  }
}

/* VIN-centered merchant assignment */
.merchant-directory-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vin-configuration-option-empty {
  color: var(--muted-text, #71839d);
}

.modal--vin-configuration .vin-configuration-card {
  width: min(780px, calc(100vw - 32px));
}

.vin-configuration-body {
  display: grid;
  min-height: 0;
  gap: 22px;
}

.vin-configuration-mode {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #f8fbff;
}

.vin-configuration-mode legend {
  padding: 0 6px;
  color: var(--ink-800);
  font-weight: 700;
}

.vin-configuration-mode label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
}

.vin-configuration-mode input {
  width: 18px;
  height: 18px;
}

#vin-configuration-existing {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.vin-configuration-picker {
  overflow: hidden;
  border: 1px solid #dbe7f4;
  border-radius: 14px;
  background: #f8fbff;
}

.vin-configuration-prefix-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
  margin-top: 8px;
}

.vin-configuration-prefix-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #a9dfd9;
  border-radius: 999px;
  color: #08756f;
  background: #ecfbf8;
  font-weight: 700;
}

.vin-configuration-picker-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #dbe7f4;
}

.vin-configuration-picker-heading h3,
.vin-configuration-picker-heading p {
  margin: 0;
}

.vin-configuration-picker-heading p {
  margin-top: 5px;
  color: var(--muted-text, #647a99);
}

.vin-configuration-picker-heading form {
  display: flex;
  width: min(360px, 52%);
  align-items: end;
  gap: 8px;
}

.vin-configuration-picker-heading form input {
  min-width: 0;
  flex: 1;
}

.vin-configuration-picker-heading > input {
  width: min(300px, 46%);
}

.vin-configuration-merchant-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: clamp(180px, 34dvh, 330px);
  padding: 16px;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: contain;
  scrollbar-color: #7f9bb8 #e8f0f7;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.vin-configuration-merchant-options::-webkit-scrollbar {
  width: 12px;
}

.vin-configuration-merchant-options::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e8f0f7;
}

.vin-configuration-merchant-options::-webkit-scrollbar-thumb {
  border: 3px solid #e8f0f7;
  border-radius: 999px;
  background: #7f9bb8;
}

.vin-configuration-merchant-options::-webkit-scrollbar-thumb:hover {
  background: #5f7f9f;
}

.vin-configuration-merchant-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #d6e3f1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.vin-configuration-merchant-option:has(input:checked) {
  border-color: #4d9ced;
  background: #edf6ff;
  box-shadow: 0 0 0 1px rgba(31, 126, 219, .12);
}

.vin-configuration-merchant-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.vin-configuration-merchant-option span {
  display: grid;
  min-width: 0;
}

.vin-configuration-merchant-option strong,
.vin-configuration-merchant-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vin-configuration-merchant-option small {
  margin-top: 3px;
  color: var(--muted-text, #647a99);
}

@media (max-width: 720px) {
  .vin-configuration-picker-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .vin-configuration-picker-heading form,
  .vin-configuration-picker-heading > input {
    width: 100%;
  }

  .vin-configuration-merchant-options {
    max-height: clamp(160px, 30dvh, 250px);
    grid-template-columns: 1fr;
  }

  .merchant-directory-toolbar-actions,
  .vin-configuration-mode {
    align-items: stretch;
    flex-direction: column;
  }
}
/* Merchant profile editor */
.modal--merchant-profile .modal-card {
  width: min(820px, calc(100vw - 32px));
}

.merchant-profile-body {
  display: grid;
  gap: 18px;
}

.merchant-profile-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  background: var(--ink-50);
}

.merchant-profile-section__heading h3,
.merchant-profile-section__heading p {
  margin: 0;
}

.merchant-profile-section__heading p {
  margin-top: 4px;
  color: var(--ink-600);
  font-size: .86rem;
}

.merchant-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.merchant-profile-field-label {
  color: var(--ink-600);
  font-size: .82rem;
  font-weight: 700;
}

.merchant-profile-readonly-field input,
.merchant-profile-readonly-field output {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink-600);
  overflow-wrap: anywhere;
}

.merchant-profile-prefix-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.merchant-profile-prefix-entry input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
}

.merchant-profile-prefixes-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-900);
  font: inherit;
}

.merchant-profile-prefixes,
.merchant-profile-vehicles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merchant-profile-prefix-chip,
.merchant-profile-vehicle-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #b9d5f5;
  border-radius: 999px;
  background: #eef6ff;
  color: #173f70;
}

.merchant-profile-prefix-remove {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.merchant-profile-prefix-remove:hover,
.merchant-profile-prefix-remove:focus-visible {
  background: #dcecff;
}

.merchant-profile-prefix-empty,
.merchant-profile-vehicle-empty {
  color: var(--ink-600);
}

.merchant-profile-error {
  min-height: 1.25rem;
}

.vehicle-aggregate-model-cell__chips,
.vehicle-aggregate-merchant-cell__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vehicle-aggregate-model-cell__chip,
.vehicle-aggregate-merchant-cell__chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #c9dcf2;
  border-radius: 999px;
  background: #f3f8ff;
  color: #174f8f;
  line-height: 1.25;
}

.vehicle-series-card__level {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf7f4;
  color: #176b5c;
  font-size: .75rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .merchant-profile-grid,
  .merchant-profile-prefix-entry {
    grid-template-columns: 1fr;
  }
}

/* VIN configuration desktop columns */
@media (min-width: 901px) {
  .vin-configuration-table th:nth-child(1) {
    width: 14%;
  }

  .vin-configuration-table th:nth-child(2) {
    width: 18%;
  }

  .vin-configuration-table th:nth-child(3) {
    width: auto;
  }

  .vin-configuration-table th:nth-child(4),
  .vin-configuration-table td:nth-child(4) {
    width: 260px;
    text-align: right;
  }

  .vin-configuration-row-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

/* VIN configuration mobile cards */
@media (max-width: 760px) {
  .vin-configuration-workspace .vin-configuration-table-region {
    width: 100%;
    min-width: 0;
    overflow-x: visible;
  }

  .vin-configuration-workspace .vin-configuration-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .vin-configuration-workspace .vin-configuration-table thead {
    display: none;
  }

  .vin-configuration-workspace .vin-configuration-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .vin-configuration-workspace .vin-configuration-table tr {
    display: block;
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }

  .vin-configuration-workspace .vin-configuration-table td {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 12px;
    grid-template-columns: minmax(76px, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--ink-100);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .vin-configuration-workspace .vin-configuration-table td:last-child {
    border-bottom: 0;
  }

  .vin-configuration-workspace .vin-configuration-table td::before {
    content: attr(data-label);
    color: var(--ink-500);
    font-size: 11px;
    font-weight: 800;
  }

  .vin-configuration-workspace .vin-configuration-table .vin-configuration-merchant-tags {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .vin-configuration-workspace .vin-configuration-table .vehicle-code-row-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .vin-configuration-workspace .vin-configuration-table .vin-configuration-merchant-tag {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
