:root {
  --page: #f2f1ed;
  --surface: #ffffff;
  --surface-subtle: #f7f7f4;
  --ink: #1d2025;
  --ink-soft: #50565f;
  --muted: #777d85;
  --line: #d9d9d3;
  --line-strong: #bfc1bb;
  --header: #171a1f;
  --primary: #205fe5;
  --primary-dark: #1747aa;
  --primary-soft: #edf3ff;
  --success: #18764d;
  --success-soft: #eaf6ef;
  --danger: #b4232c;
  --danger-soft: #fff0f0;
  --warning: #9a5d05;
  --radius: 6px;
  --header-height: 64px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--header);
  border-bottom: 1px solid #2b2f36;
}

.header-inner {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  align-items: center;
  width: min(1760px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #59616e;
  border-radius: 4px;
  color: #a9c6ff;
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: #8f98a7;
  font-family: "Bahnschrift", sans-serif;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-item {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 104px;
  padding: 0 18px;
  color: #aeb5c0;
  font-size: 13px;
  font-weight: 600;
}

.nav-item:hover {
  color: #fff;
  background: #20242a;
}

.nav-item.is-active {
  color: #fff;
}

.nav-item.is-active::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  background: #5f91ff;
  content: "";
}

.environment-tag {
  border: 1px solid #454b55;
  border-radius: 999px;
  padding: 4px 9px;
  color: #9ca4b0;
  font-size: 11px;
}

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.page-shell-wide {
  width: min(1760px, calc(100% - 32px));
}

.settings-shell {
  width: min(980px, calc(100% - 40px));
}

.workspace-shell {
  padding-top: 14px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-surface,
.filter-surface,
.settings-surface {
  padding: 22px;
}

.results-surface,
.table-surface {
  margin-top: 10px;
  padding: 0 18px 18px;
}

.workspace-tool.search-surface,
.workspace-tool.filter-surface {
  padding: 0;
  overflow: hidden;
}

.workspace-tool + .workspace-tool {
  margin-top: 8px;
}

.workspace-tool-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 9px 16px;
  list-style: none;
  user-select: none;
}

.workspace-tool-summary::-webkit-details-marker {
  display: none;
}

.workspace-tool-summary > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.workspace-tool-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.workspace-tool-summary small,
.tool-body-heading {
  color: var(--muted);
  font-size: 11px;
}

.summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.summary-link {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.summary-link:hover {
  text-decoration: underline;
}

.summary-toggle {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 2px solid #6f757e;
  border-bottom: 2px solid #6f757e;
  transition: transform 0.16s ease;
}

.workspace-tool[open] .summary-toggle {
  transform: rotate(225deg) translate(-2px, -2px);
}

.workspace-tool-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.tool-body-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.tool-body-heading .btn {
  min-height: 28px;
  padding: 5px 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-heading {
  margin-bottom: 14px;
}

.result-heading {
  min-height: 68px;
  margin: 0;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label,
.field-label,
.dock-field > label,
.dock-field legend {
  color: #444a52;
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: #a0a4aa;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 95, 229, 0.1);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(140px, 0.7fr) minmax(130px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
}

.search-submit {
  min-height: 38px;
}

.advanced-options,
.inline-advanced,
.settings-advanced,
.raw-details {
  border-top: 1px solid var(--line);
}

.advanced-options {
  margin-top: 18px;
}

.advanced-options summary,
.inline-advanced summary,
.raw-details summary {
  width: fit-content;
  padding: 12px 0 0;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.field-span-2 {
  grid-column: 1 / -1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: #29303a;
}

.btn-secondary:hover:not(:disabled),
.btn-quiet:hover:not(:disabled) {
  border-color: #9da2aa;
  background: #f4f4f1;
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: #555c66;
}

.btn-danger {
  border-color: #e1b5b8;
  background: #fff;
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.btn.is-loading::before {
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  content: "";
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-right: 0;
  border-left: 0;
  background: var(--surface-subtle);
}

.result-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.result-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.compact-result-summary {
  min-height: 0;
  border: 0;
  background: transparent;
}

.compact-result-summary span {
  padding: 5px 12px;
}

.result-heading-tools,
.compact-pagination {
  display: flex;
  align-items: center;
}

.result-heading-tools {
  gap: 10px;
}

.compact-pagination {
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.compact-pagination .btn {
  min-height: 30px;
  padding: 6px 8px;
}

.compact-pagination strong {
  color: var(--ink);
}

.table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
}

.filter-table-wrap {
  max-height: calc(100vh - 210px);
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 1140px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #e5e5e0;
  padding: 10px 11px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f4f1;
  color: #5e646c;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f8faff;
}

.table-wrap.is-virtualized {
  --virtual-row-height: 82px;
  min-height: min(520px, calc(100vh - 220px));
}

.is-virtualized table {
  table-layout: fixed;
}

.is-virtualized th:nth-child(1) { width: 330px; }
.is-virtualized th:nth-child(2) { width: 120px; }
.is-virtualized th:nth-child(3) { width: 130px; }
.is-virtualized th:nth-child(4) { width: 90px; }
.is-virtualized th:nth-child(5) { width: 120px; }
.is-virtualized th:nth-child(6) { width: 180px; }
.is-virtualized th:nth-child(7) { width: 100px; }
.is-virtualized th:nth-child(8) { width: 110px; }

.is-virtualized tbody .virtual-row {
  height: var(--virtual-row-height);
}

.is-virtualized tbody .virtual-row > td {
  height: var(--virtual-row-height);
  overflow: hidden;
}

.is-virtualized .goods-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.is-virtualized .price-stack {
  overflow: hidden;
  max-height: 58px;
}

.virtual-spacer,
.virtual-spacer:hover {
  background: transparent;
}

.virtual-spacer > td {
  border: 0;
  padding: 0;
}

.goods-name {
  min-width: 290px;
  max-width: 480px;
  color: #22262c;
  font-weight: 650;
}

.goods-name-link {
  text-underline-offset: 3px;
}

.goods-name-link:hover,
.goods-name-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.merchant-filter-trigger {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-filter-trigger:hover,
.merchant-filter-trigger:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.price-stack {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.pill-off {
  color: #8b5d61;
}

.dock-state {
  color: var(--muted);
  font-size: 11px;
}

.dock-state.is-docked {
  color: var(--success);
  font-weight: 650;
}

.action-column {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 92px;
  background: #f4f4f1;
}

td.action-column {
  z-index: 1;
  background: #fff;
}

tbody tr:hover td.action-column {
  background: #f8faff;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.empty-state span {
  margin: 7px 0 16px;
  font-size: 12px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 50px;
  color: var(--muted);
  font-size: 11px;
}

.pagination-bar strong {
  color: var(--ink);
}

.raw-drawer {
  display: none;
  margin-top: 12px;
}

.raw-drawer.is-open {
  display: block;
}

.raw-details {
  margin-top: 14px;
}

.raw-details[open] summary {
  margin-bottom: 10px;
}

pre {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  border-radius: 4px;
  background: #1c2026;
  color: #cfe0ff;
  padding: 14px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(160px, 0.9fr) 130px 130px;
  gap: 12px;
  align-items: end;
}

.filter-grid-secondary {
  grid-template-columns: minmax(290px, 1.4fr) 150px 130px minmax(170px, 0.8fr);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price-range-field {
  display: grid;
  gap: 7px;
}

.range-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.range-divider {
  color: var(--muted);
}

.inline-advanced {
  min-height: 38px;
  border: 0;
}

.inline-advanced summary {
  padding: 11px 0;
}

.inline-advanced[open] {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
}

.inline-advanced[open] .field {
  max-width: 440px;
  margin-top: 10px;
}

.filter-error,
.form-error {
  margin-top: 12px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 9px 11px;
  font-size: 12px;
}

.settings-surface {
  padding-bottom: 0;
}

.settings-panel {
  margin: 0 -22px;
  border-top: 1px solid var(--line);
}

.login-settings-panel {
  margin-top: -22px;
  border-top: 0;
}

.settings-panel-summary {
  cursor: pointer;
}

.settings-panel[open] > .settings-panel-summary .summary-toggle {
  transform: rotate(225deg) translate(-2px, -2px);
}

.settings-panel-body {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
}

.experimental-label {
  border: 1px solid #bfd0f5;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.login-submit {
  min-width: 142px;
}

.login-advanced {
  width: min(100%, 620px);
}

.login-advanced > summary {
  width: max-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.login-security-field {
  margin-top: 10px;
}

.login-security-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.login-security-control .btn {
  min-width: 92px;
}

.human-verification-panel {
  display: grid;
  width: min(100%, 430px);
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fafafa;
}

.human-verification-panel[hidden] {
  display: none;
}

.human-verification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.human-verification-head > div {
  display: grid;
  gap: 2px;
}

.human-verification-head strong {
  color: var(--ink);
  font-size: 12px;
}

.human-verification-head span {
  color: var(--muted);
  font-size: 10px;
}

.human-verification-close {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.human-verification-close:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.human-verification-frame {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  background: #fafafa;
}

.login-feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
}

.transport-warning {
  color: var(--warning);
  font-size: 10px;
  white-space: nowrap;
}

.security-label {
  flex-shrink: 0;
  border: 1px solid #b6d7c4;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.security-label.is-disconnected {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
  color: var(--muted);
}

.cookie-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
  gap: 18px;
}

.cookie-input-panel {
  display: grid;
  gap: 14px;
}

.cookie-input-panel textarea {
  min-height: 188px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
}

.cookie-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0;
  background: var(--surface-subtle);
  list-style: none;
}

.cookie-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cookie-steps li + li {
  border-top: 1px solid var(--line);
}

.cookie-step-index {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.cookie-step-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cookie-steps strong {
  color: var(--text);
}

.cookie-steps kbd {
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface-subtle);
  padding: 1px 4px;
  color: var(--text);
  font: 700 9px var(--font-mono);
}

.cookie-guide {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #17171d;
}

.cookie-guide a {
  display: block;
  overflow: hidden;
  background: #17171d;
}

.cookie-guide img {
  display: block;
  width: 100%;
  aspect-ratio: 1669 / 971;
  object-fit: cover;
  transition: transform 160ms ease, opacity 160ms ease;
}

.cookie-guide a:hover img {
  opacity: 0.92;
  transform: scale(1.012);
}

.cookie-guide figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-top: 1px solid #373843;
  color: #fff;
  font-size: 10px;
}

.cookie-guide figcaption span {
  color: #aeb3bd;
}

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

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.required-mark {
  color: var(--danger);
  font-size: 10px;
}

.settings-advanced-body {
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}

.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  margin: 0 -22px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.inline-status {
  color: var(--muted);
  font-size: 12px;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
}

.input-suffix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 95, 229, 0.1);
}

.input-suffix input {
  border: 0;
  box-shadow: none;
}

.input-suffix input:focus {
  box-shadow: none;
}

.input-suffix span {
  padding-right: 10px;
  color: var(--muted);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  top: calc(var(--header-height) + 18px);
  right: 20px;
  z-index: 100;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  transform: translateY(-8px);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--primary);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(28, 31, 36, 0.16);
  opacity: 0;
  padding: 13px 14px 13px 11px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.toast-success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }

.dock-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(92vh, 960px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(15, 17, 20, 0.34);
}

.dock-dialog::backdrop {
  background: rgba(13, 15, 18, 0.64);
}

.dock-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(92vh, 960px);
}

.dock-dialog-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}

.dock-dialog-head .eyebrow {
  margin-bottom: 3px;
}

.dock-dialog-head h2 {
  margin: 0;
  font-size: 17px;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5c626b;
  font-size: 23px;
}

.dialog-close:hover {
  background: #f0f0ed;
}

.dock-dialog-body {
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 22px 28px 30px;
}

.dock-product-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-left: 3px solid var(--primary);
  background: var(--surface-subtle);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
}

.product-type-label {
  border: 1px solid #bfd0f5;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
}

.dock-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.price-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}

.price-overview > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.price-overview > div + div {
  border-left: 1px solid var(--line);
}

.price-overview span {
  color: var(--muted);
  font-size: 10px;
}

.price-overview strong {
  font-family: "Bahnschrift", sans-serif;
  font-size: 22px;
}

.radio-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.pricing-options label {
  position: relative;
  display: block;
}

.pricing-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pricing-options label > span {
  display: grid;
  min-height: 68px;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 10px 12px;
}

.pricing-options strong {
  font-size: 12px;
}

.pricing-options small {
  color: var(--muted);
  font-size: 10px;
}

.pricing-options input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.field-help,
.price-limit-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.price-limit-note {
  margin-top: -10px;
}

.dock-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sync-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #59616b;
  font-size: 11px;
  cursor: pointer;
}

.sync-control input {
  width: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--primary);
}

.description-preview {
  min-height: 250px;
  white-space: pre-wrap;
}

.dock-dialog textarea:disabled {
  background: #f4f4f1;
  color: #777d85;
  cursor: not-allowed;
}

.dock-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 66px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.dock-dialog-footer .btn {
  min-width: 92px;
}

@media (max-width: 1080px) {
  .header-inner {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .environment-tag {
    display: none;
  }

  .filter-grid,
  .filter-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-search-field,
  .price-range-field {
    grid-column: 1 / -1;
  }

  .compact-result-summary {
    display: none;
  }

  .result-heading-tools {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 58px;
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 12px;
  }

  .brand-copy {
    display: none;
  }

  .main-nav {
    justify-content: flex-end;
  }

  .nav-item {
    min-width: auto;
    padding: 0 10px;
    font-size: 11px;
  }

  .nav-item.is-active::after {
    right: 9px;
    left: 9px;
  }

  .page-shell,
  .page-shell-wide,
  .settings-shell {
    width: min(100% - 20px, 100%);
    padding: 24px 0 36px;
  }

  .workspace-shell {
    padding-top: 10px;
  }

  .search-surface,
  .filter-surface,
  .settings-surface {
    padding: 16px;
  }

  .workspace-tool.search-surface,
  .workspace-tool.filter-surface {
    padding: 0;
  }

  .workspace-tool-summary {
    min-height: 44px;
    padding: 8px 12px;
  }

  .workspace-tool-summary small {
    overflow: hidden;
    max-width: 170px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-tool-body {
    padding: 12px;
  }

  .results-surface,
  .table-surface {
    padding: 0 10px 12px;
  }

  .search-row,
  .login-grid,
  .cookie-setup-grid,
  .advanced-grid,
  .filter-grid,
  .filter-grid-secondary,
  .form-grid,
  .pricing-options {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .filter-search-field,
  .price-range-field {
    grid-column: auto;
  }

  .cookie-setup-grid {
    gap: 16px;
  }

  .section-heading,
  .result-heading {
    align-items: flex-start;
  }

  .result-heading {
    min-height: 62px;
  }

  .section-actions {
    flex-shrink: 0;
  }

  .result-heading-tools {
    flex-shrink: 0;
  }

  .result-summary span {
    flex: 1;
    justify-content: center;
    min-width: 50%;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap.is-virtualized,
  .filter-table-wrap.is-virtualized {
    min-height: 420px;
    max-height: calc(100dvh - 150px);
  }

  .settings-panel {
    margin-right: -16px;
    margin-left: -16px;
  }

  .login-settings-panel {
    margin-top: -16px;
  }

  .login-submit {
    width: 100%;
  }

  .login-security-control {
    grid-template-columns: 1fr;
  }

  .login-security-control .btn {
    width: 100%;
  }

  .login-feedback-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .transport-warning {
    white-space: normal;
  }

  .settings-footer {
    margin: 0 -16px;
    padding: 12px 16px;
  }

  .inline-status {
    max-width: 60%;
  }

  .dock-dialog-body {
    gap: 16px;
    padding: 18px 16px 24px;
  }

  .pricing-options label > span {
    min-height: 58px;
  }

  .toast-region {
    top: calc(var(--header-height) + 10px);
    right: 10px;
  }
}
