:root {
  --ink: #171a1f;
  --muted: #5f6875;
  --line: #d9dee6;
  --paper: #f6f7f9;
  --white: #ffffff;
  --red: #b8292f;
  --red-dark: #8f1f27;
  --teal: #0f7d79;
  --yellow: #e1a529;
  --graphite: #242932;
  --shadow: 0 18px 50px rgba(23, 26, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body:not([data-public-mode="live"]) .auction-live-only {
  display: none;
}

body[data-public-mode="live"] [data-pickup-only] {
  display: none;
}

body:not([data-backend-access="on"]) .admin-section {
  display: none;
}

body[data-feature-bidding="off"] .bid-button,
body[data-feature-max-bid="off"] .max-bid-form,
body[data-feature-registration="off"] .header-actions .solid-button,
body[data-feature-registration="off"] .pickup-register-form,
body[data-feature-seller-intake="off"] #sell,
body[data-feature-deals="off"] #deals,
.lot-card.is-unpublished {
  display: none;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--graphite);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 32px);
  color: #333945;
  font-size: 0.95rem;
}

.header-actions,
.hero-actions,
.lot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.solid-button,
.ghost-button,
.icon-button,
.solid-link,
.outline-link,
.segmented-control button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.solid-button,
.solid-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--white);
  background: var(--red);
  font-weight: 700;
}

.solid-button:hover,
.solid-link:hover {
  background: var(--red-dark);
}

.ghost-button,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.outline-link {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  font-size: 1.35rem;
}

.hero {
  position: relative;
  min-height: min(74vh, 760px);
  overflow: hidden;
  background: var(--graphite);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(18, 20, 24, 0.9) 0%, rgba(18, 20, 24, 0.68) 42%, rgba(18, 20, 24, 0.22) 100%),
    linear-gradient(0deg, rgba(18, 20, 24, 0.5), transparent 45%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  padding: clamp(78px, 14vw, 150px) 0 clamp(88px, 12vw, 140px) clamp(18px, 6vw, 72px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 720px;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.status-strip article {
  padding: 22px clamp(18px, 3vw, 36px);
  background: var(--white);
}

.status-strip strong {
  display: block;
  color: var(--teal);
  font-size: 2rem;
  line-height: 1;
}

.status-strip span {
  color: var(--muted);
}

.tool-band,
.split-section,
.operations,
.pickup-band,
.admin-section {
  padding: clamp(56px, 7vw, 86px) clamp(18px, 4vw, 52px);
}

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

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented-control button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.segmented-control button.active {
  color: var(--white);
  background: var(--graphite);
}

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

.auction-empty {
  display: none;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auction-empty.is-visible {
  display: block;
}

.auction-empty strong,
.auction-empty span {
  display: block;
}

.auction-empty span {
  color: var(--muted);
}

.lot-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 26, 31, 0.06);
}

.lot-card.is-hidden {
  display: none;
}

.lot-image {
  min-height: 230px;
  background-image: url("auction-hero.png");
  background-size: 210%;
  border-bottom: 1px solid var(--line);
}

.lot-image-a {
  background-position: 74% 58%;
}

.lot-image-b {
  background-position: 43% 72%;
}

.lot-image-c {
  background-position: 92% 76%;
}

.lot-body {
  padding: 18px;
}

.lot-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.lot-body p {
  min-height: 58px;
  color: var(--muted);
}

.bid-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bid-stats div {
  padding: 12px;
  background: #fbfcfd;
}

.bid-stats dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.bid-stats dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.countdown {
  color: var(--red);
  font-weight: 800;
}

.countdown.is-soon {
  color: var(--red-dark);
}

.max-bid-form {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.max-bid-form label {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.max-bid-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.max-bid-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.max-bid-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.max-bid-status.is-set {
  color: var(--teal);
  font-weight: 800;
}

.max-bid-status.is-error {
  color: var(--red);
  font-weight: 800;
}

.bid-button {
  flex: 1;
}

.watch-button.is-watched {
  color: var(--yellow);
  border-color: var(--yellow);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.copy-block p:not(.eyebrow),
.pickup-band p {
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list article,
.ops-grid article {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list span,
.ops-grid p {
  color: var(--muted);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--teal);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.pickup-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 36px;
  align-items: center;
  color: var(--white);
  background: var(--graphite);
}

.pickup-band p {
  color: rgba(255, 255, 255, 0.78);
}

.pickup-only-public {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(42px, 6vw, 68px) clamp(18px, 4vw, 52px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.pickup-only-public p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.pickup-register-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.pickup-register-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

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

.form-checks {
  display: grid;
  gap: 8px;
}

.pickup-register-form input,
.pickup-register-form select {
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
}

.consent-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.consent-row input {
  min-height: 0;
  margin-top: 4px;
}

.pickup-register-status {
  min-height: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.pickup-register-status.is-set {
  color: #9de3d7;
  font-weight: 800;
}

.admin-section {
  background: #eef1f4;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}

.admin-login p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.login-panel,
.catalog-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-panel label,
.catalog-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.login-panel input,
.login-panel select,
.catalog-form input,
.catalog-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.catalog-form textarea {
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
}

.login-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

.login-status.is-open {
  color: var(--teal);
  font-weight: 800;
}

.admin-shell {
  display: none;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 520px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 26, 31, 0.06);
}

.admin-shell.is-open {
  display: grid;
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px;
  background: var(--graphite);
}

.admin-sidebar button {
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.admin-sidebar button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-sidebar button[hidden] {
  display: none;
}

.admin-panels {
  min-width: 0;
  padding: 22px;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-heading h3 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.export-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.export-download-link[hidden] {
  display: none;
}

.export-actions span {
  color: var(--muted);
  font-size: 0.84rem;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
}

.settings-panel,
.publish-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-panel fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.settings-panel fieldset:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-panel legend,
.publish-panel h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.radio-row,
.toggle-row,
.publish-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle-row {
  align-items: center;
}

.radio-row input,
.toggle-row input,
.publish-row input {
  margin-top: 3px;
}

.radio-row strong,
.radio-row small,
.publish-row strong,
.publish-row small {
  display: block;
}

.radio-row small,
.publish-row small {
  color: var(--muted);
  font-weight: 400;
}

.publish-row {
  grid-template-columns: auto 1fr auto;
}

.publish-row em {
  color: var(--teal);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
}

.publish-summary {
  padding: 12px;
  color: var(--graphite);
  background: #eef1f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.queue-list,
.seller-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.queue-list article,
.seller-metrics article {
  padding: 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.queue-list strong,
.seller-metrics strong {
  display: block;
  color: var(--teal);
  font-size: 1.75rem;
  line-height: 1.05;
}

.queue-list span,
.seller-metrics span {
  color: var(--muted);
}

.review-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.review-table div {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 12px;
  padding: 14px 16px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.review-table div:last-child {
  border-bottom: 0;
}

.review-table span {
  color: var(--muted);
}

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

.user-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.user-metrics article {
  padding: 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-metrics strong {
  display: block;
  color: var(--teal);
  font-size: 1.75rem;
  line-height: 1.05;
}

.user-metrics span {
  color: var(--muted);
}

.user-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-table {
  min-width: 920px;
}

.user-table div {
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 0.95fr 1.2fr 1.05fr 0.8fr 0.75fr;
  gap: 12px;
  padding: 12px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.user-table div:first-child {
  color: var(--ink);
  background: #eef1f4;
  font-weight: 800;
}

.user-table div:last-child {
  border-bottom: 0;
}

.user-table span {
  color: var(--muted);
}

.payment-section,
.policy-section {
  padding: clamp(56px, 7vw, 86px) clamp(18px, 4vw, 52px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.payment-section {
  background: #eef1f4;
}

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

.payment-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--teal);
  border-radius: 8px;
  font-weight: 800;
}

.payment-card p {
  color: var(--muted);
}

.payment-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-rules article {
  padding: 18px;
  background: #fbfcfd;
}

.payment-rules strong,
.payment-rules span {
  display: block;
}

.payment-rules span {
  color: var(--muted);
}

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

.policy-card {
  padding: 24px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.policy-card li::marker {
  color: var(--teal);
}

.policy-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 52px);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .header-actions .ghost-button {
    display: none;
  }

  .status-strip,
  .auction-grid,
  .ops-grid,
  .split-section,
  .pickup-band,
  .admin-login,
  .admin-shell,
  .admin-grid,
  .control-grid,
  .pickup-only-public,
  .policy-grid,
  .payment-grid,
  .payment-rules {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar button {
    text-align: center;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .export-actions {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .header-actions .icon-button {
    display: none;
  }

  .solid-button,
  .solid-link,
  .outline-link {
    padding: 0 12px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions,
  .form-grid {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

  .bid-stats {
    grid-template-columns: 1fr;
  }

  .max-bid-form div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .queue-list,
  .seller-metrics,
  .user-metrics,
  .review-table div,
  .publish-row {
    grid-template-columns: 1fr;
  }
}
