:root {
  --bg: #eef1fa;
  --ink: #090f3f;
  --ink-soft: #555d86;
  --line: #d6dcf2;
  --line-soft: #e5e9f7;
  --tile: #fff;
  --selected: #dfe5f6;
  --blue: #001489;
  --orange: #ff4f05;
  --orange-disabled: #f7aa9e;
  --tint-orange: #fff1eb;
  --radius: 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  max-width: 230px;
  width: auto;
  display: block;
  border-radius: 2px;
  object-fit: contain;
}

.brand-fallback {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  border-radius: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.lang-switch {
  display: flex;
  gap: 3px;
}

.lang-btn {
  font-size: 11px;
  letter-spacing: .03em;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  border-radius: var(--radius);
  text-decoration: none;
}

.lang-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.checkout-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 24px 90px;
}

.checkout-alert {
  max-width: 900px;
  margin: 0 auto 22px;
  padding: 14px 18px;
  border: 1px solid #cc3f04;
  background: var(--tint-orange);
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 20px 80px;
}

.picker-view {
  max-width: 760px;
  margin: 0 auto;
}

.picker-view h1,
.qty-heading {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
}

.picker-view h1 {
  margin: 0 0 10px;
}

.lead-copy {
  color: var(--ink-soft);
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 28px;
}

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

.model-tile {
  height: 92px;
  border: 1px solid var(--line);
  background: var(--tile);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.model-tile img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.model-tile strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.model-tile.selected,
.qty-tile.selected {
  background: var(--selected);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.qty-area {
  margin-top: 26px;
}

.qty-heading {
  margin: 0 0 22px;
}

.section-label {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.qty-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.qty-tile {
  min-height: 102px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tile);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.qty-title {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.qty-sub {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

.qty-price {
  align-self: end;
  justify-self: end;
  font-size: 20px;
  font-weight: 500;
}

.qty-divider {
  margin: 24px 0 10px;
  color: var(--ink);
  letter-spacing: .055em;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.qty-divider::before,
.qty-divider::after {
  content: none;
}

.custom-qty-row {
  position: relative;
  min-height: 108px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 34px;
  gap: 10px 16px;
  align-items: center;
  padding: 14px 14px 10px;
}

.custom-qty-row.selected::before {
  content: "";
  position: absolute;
  inset: 8px 8px 48px;
  background: var(--selected);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 0;
}

.custom-qty-copy,
.custom-qty-price,
.stepper {
  position: relative;
  z-index: 1;
}

.stepper {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
}

.stepper button,
.stepper span {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.stepper button {
  background: var(--selected);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.stepper button:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}

.stepper span {
  cursor: default;
}

.stepper button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.custom-qty-copy {
  min-width: 0;
}

.custom-qty-title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.custom-qty-price {
  justify-self: end;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 500;
}

.custom-qty-meta {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.continue-btn {
  width: 100%;
  height: 52px;
  margin-top: 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.continue-btn:disabled {
  background: var(--orange-disabled);
  cursor: default;
}

.checkout-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
}

.checkout-main {
  position: relative;
}

.order-line {
  margin-left: 34px;
  height: 70px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
}

.order-line img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-line strong {
  font-size: 14px;
}

.order-line button {
  border: 0;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
}

.rail {
  padding-top: 44px;
}

.rail-section {
  position: relative;
  padding-bottom: 42px;
}

.rail-section h2,
.checkout-section-heading {
  font-size: 20px;
  line-height: 1.1;
  margin: 0 0 12px;
  font-weight: 700;
}

.section-subcopy {
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 610px;
  margin: 0 0 20px;
}

.guest-note {
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.info-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
  font-size: 12px;
  display: grid;
  place-items: center;
}

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

.field-grid label {
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  display: grid;
  gap: 10px;
}

.field-grid .wide {
  grid-column: 1 / -1;
}

.field-grid input,
.field-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.address-search-field small {
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: none;
}

.address-preview {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
  text-transform: none;
}

.address-preview[hidden] {
  display: none;
}

.address-preview span {
  color: var(--ink-soft);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.address-preview strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.customer-summary-card {
  margin: 18px 0;
  min-height: 142px;
}

.customer-summary-card strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  line-height: 1.45;
  min-height: 92px;
}

.customer-summary-card span {
  color: var(--ink-soft);
  display: block;
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.address-preview button,
.manual-address-toggle button {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
  text-transform: uppercase;
}

.manual-address-toggle {
  margin-top: -4px;
}

.manual-address-fields {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.manual-address-fields[hidden] {
  display: none;
}

.address-validation-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
  text-transform: none;
}

.address-validation-message.ok {
  border-color: #bfd8ca;
  background: #f3faf6;
  color: #27583d;
}

.address-validation-message.warn {
  border-color: #ead5a9;
  background: #fff9ec;
  color: #72551d;
}

.address-validation-message.error {
  border-color: #edb8b0;
  background: #fff4f2;
  color: #88352d;
}

gmp-place-autocomplete {
  width: 100%;
  min-height: 42px;
  display: block;
  color-scheme: light;
}

.order-summary {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
}

.summary-product {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.summary-product img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-product strong {
  font-size: 14px;
}

.summary-product span {
  color: var(--ink-soft);
}

.summary-rule {
  border-top: 1px solid var(--line);
  margin: 8px 0 22px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  margin: 10px 0;
  font-size: 14px;
}

.sum-row strong {
  color: var(--ink);
  font-weight: 500;
}

.sum-row.total {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}

.sum-row.total strong {
  text-align: right;
}

.sum-row.total small {
  color: var(--ink-soft);
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  margin-top: 4px;
  min-height: 17px;
}

.guarantee {
  background: var(--tint-orange);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 22px 0;
  font-size: 14px;
}

.pay-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
}

.pay-btn:disabled {
  background: var(--orange-disabled);
  cursor: default;
}

.checkout-confirmations {
  display: grid;
  gap: 10px;
  margin: 22px 0 16px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.checkout-confirmations label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.checkout-confirmations input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.microcopy,
.fineprint {
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

.fineprint {
  text-align: left;
  margin-top: 26px;
}

.fineprint a {
  color: inherit;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-nav {
  background: var(--ink);
  color: #fff;
  padding: 24px;
}

.admin-brand {
  display: block;
  margin-bottom: 28px;
  text-decoration: none;
}

.admin-brand img {
  display: block;
  width: 158px;
  max-width: 100%;
  height: auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.admin-nav a {
  color: rgba(255, 255, 255, .8);
  display: block;
  padding: 9px 0;
  text-decoration: none;
}

.admin-site-toggle {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.admin-site-toggle-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #fff;
  font-weight: 700;
  text-align: left;
}

.admin-site-toggle-button.is-on {
  background: #1f7a4d;
}

.admin-site-toggle-button.is-off {
  background: #7a2630;
}

.admin-site-toggle-message {
  margin-top: 10px;
  color: #ffd6da;
  font-size: 12px;
  line-height: 1.35;
}

.admin-main {
  padding: 28px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.chart-panel {
  height: 100%;
}

.chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.chart-heading h2 {
  margin: 0;
}

.chart-heading span {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: right;
}

.chart-frame {
  position: relative;
  height: 250px;
}

.chart-frame-wide {
  height: 285px;
}

.orders-map {
  height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef1fa;
}

.map-note {
  color: var(--ink-soft);
  font-size: 12px;
  margin: 10px 0 0;
}

.order-map-marker {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px rgba(10, 17, 64, .25);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
}

.leaflet-popup-content {
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.leaflet-popup-content a {
  color: var(--blue);
  font-weight: 700;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.postnl-label-action {
  display: grid;
}

.postnl-label-form .postnl-label-action {
  padding-top: 32px;
}

.activity-log-list {
  display: grid;
  gap: 0;
}

.activity-log-entry {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.activity-log-entry:last-child {
  border-bottom: 0;
}

.activity-log-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.activity-log-meta,
.activity-log-context {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.activity-log-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.activity-log-details {
  margin-top: 10px;
}

.activity-log-details summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.activity-log-details h3 {
  color: var(--ink);
  font-size: 13px;
  margin: 12px 0 6px;
}

.activity-log-details pre {
  background: #eef1fa;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.shipment-label-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translation-table {
  min-width: 1320px;
}

.translation-table textarea {
  min-width: 170px;
  resize: vertical;
}

@media (max-width: 980px) {
  .checkout-shell {
    padding: 38px 18px;
  }

  .checkout-view,
  .field-grid,
  .manual-address-fields,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

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

  .model-tile {
    height: 82px;
    padding: 7px 4px;
  }

  .model-tile img {
    height: 38px;
  }

  .model-tile strong {
    font-size: 11px;
  }

  .picker-view h1,
  .qty-heading {
    font-size: 26px;
  }

  .order-summary {
    position: static;
  }

  .postnl-label-form .postnl-label-action {
    padding-top: 0;
  }
}

@media (max-width: 380px) {
  .checkout-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .model-tile {
    height: 78px;
  }

  .model-tile img {
    height: 34px;
  }

  .model-tile strong {
    font-size: 10px;
  }
}
