@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #233644;
  background: #f5f6f6;
  font-synthesis: none;
  --green: #233644;
  --muted: #495c6b;
  --line: #cdd1d0;
  --lime: #f9c33c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 16px;
  background: #fff;
  color: var(--green);
  font-weight: 700;
  min-height: 44px;
}
button:hover {
  background: #f2f4f4;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: #495c6b;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: #233644;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #97a5a8;
  border-radius: 8px;
  background: white;
  color: #233644;
  min-height: 44px;
}
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  accent-color: var(--green);
}
input[type="radio"] {
  width: 19px;
  height: 19px;
  min-height: 19px;
  padding: 0;
  accent-color: var(--green);
}
input[type="number"] {
  width: 76px;
  text-align: center;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
h1,
h2,
h3,
.brand {
  font-family: Manrope, system-ui, sans-serif;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 12px 0;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
}
h3 {
  font-size: 16px;
  margin: 0 0 7px;
}
p {
  line-height: 1.5;
  margin: 6px 0 14px;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.brand {
  font-size: 37px;
  font-weight: 800;
  letter-spacing: -3px;
}
/* DOK's official logo (white, for the navy sidebar and sign-in panel). */
.brand img {
  display: block;
  height: 48px;
  width: auto;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #233644;
  color: #fff;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.sidebar .muted {
  color: #cdd1d0;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #ffffff;
}
.sidebar button.active {
  background: #495c6b;
  color: var(--lime);
}
.sidebar .foot {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.7;
}
.main {
  padding: 24px 38px 60px;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  gap: 15px;
  font-size: 13px;
}
.badge {
  display: inline-block;
  border-radius: 30px;
  padding: 5px 10px;
  background: #edf0f1;
  color: #233644;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.submitted,
.badge.in_review,
.badge.confirming {
  background: #e8e2fb;
  color: #604c83;
}
.badge.needs_changes {
  background: #fff0d1;
  color: #775d2c;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 27px 0 22px;
}
.hero p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 30px;
}
.metric {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metric strong {
  font-size: 30px;
  display: block;
  margin-top: 8px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.stack {
  display: grid;
  gap: 16px;
}
.empty {
  text-align: center;
  padding: 40px 15px;
  border: 1px dashed #cdd1d0;
  border-radius: 10px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-weight: 700;
  color: var(--muted);
  background: #f5f6f6;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td,
th {
  padding: 13px 10px;
  border-bottom: 1px solid #e5e8e9;
}
td small {
  display: block;
  margin-top: 4px;
}
tr:last-child td {
  border-bottom: 0;
}
.row-link {
  border: 0;
  padding: 0;
  background: none;
  min-height: 30px;
  text-align: left;
}
.summary {
  background: #ffffff;
  border: 1px solid #cdd1d0;
  border-radius: 12px;
  padding: 22px;
}
.notice {
  padding: 13px 16px;
  background: #fff4d9;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  margin: 15px 0;
}
/* A blocking error (owner request, October 28, 2026): it stops the action, so
   it is red, outlined and marked, never the yellow of an information notice.
   The red is the portal's existing error red (#9b1c1c). */
.notice-error {
  position: relative;
  padding: 13px 16px 13px 46px;
  background: #fdf1f1;
  border: 2px solid #9b1c1c;
  border-radius: 9px;
  color: #7a1616;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 15px 0;
}
.notice-error::before {
  content: "!";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #9b1c1c;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.notice-error[hidden] { display: none; }
/* A field the rep must correct: the error red, marked in words as well as colour. */
.field-error { display: block; margin-top: 6px; color: #9b1c1c; font-size: 13px; font-weight: 600; line-height: 1.4; }
.field-error::before { content: "! "; font-weight: 800; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #9b1c1c; box-shadow: 0 0 0 1px #9b1c1c; }
.notice-error:focus { outline: none; }
.notice-error:focus-visible { outline: 2px solid #f9c33c; outline-offset: 3px; }
.ok {
  color: #307646;
}
.money {
  font-variant-numeric: tabular-nums;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
}
.editor aside {
  position: sticky;
  top: 20px;
  align-self: start;
}
.destination-list {
  list-style: none;
  margin: 14px 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.destination-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.destination-list li.included {
  border-color: #233644;
}
.destination-list li.active {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #233644;
}
.destination-list .destination-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  text-align: left;
  border: 0;
  background: none;
  box-shadow: none;
  font: inherit;
}
.destination-list .destination-select.active strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.destination-list .destination-select .muted {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.destination-list .destination-status {
  font-size: 13px;
  color: var(--muted);
  flex: 1 1 160px;
}
.destination-list .destination-status.in-order {
  color: #233644;
  font-weight: 600;
}
.destination-list [data-add-location] {
  min-height: 44px;
}
@media (max-width: 640px) {
  .destination-list [data-add-location] {
    width: 100%;
  }
}
.matrix {
  min-width: 470px;
}
.matrix td:first-child {
  min-width: 170px;
}
.matrix input {
  max-width: 74px;
}
.filter {
  max-width: 290px;
}
.line-total {
  text-align: right;
}
.check {
  display: flex;
  gap: 9px;
  align-items: center;
}
.full {
  grid-column: 1/-1;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-intro {
  background: #233644;
  color: #fff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 25px;
}
.login-intro h1 {
  font-size: 55px;
  max-width: 500px;
  letter-spacing: -2px;
}
.login-intro p {
  color: #cdd1d0;
  max-width: 440px;
}
.login-form {
  padding: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-form .card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
#message:not(:empty) {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #233644;
  color: white;
  padding: 15px 22px;
  border-radius: 10px;
  box-shadow: 0 6px 28px #0003;
  max-width: 92vw;
  z-index: 20;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f9c33c;
  outline-offset: 3px;
}
.error {
  color: #943c2b;
}
.product-head {
  padding: 17px 10px;
  background: #e9edef;
  font-weight: 800;
}
.no-wrap {
  white-space: nowrap;
}
.status-label {
  text-transform: capitalize;
}
@media (max-width: 1100px) {
  .main {
    padding: 22px;
  }
  .editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor aside {
    position: static;
  }
  .summary .stack {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 14px 18px;
    gap: 10px;
  }
  .sidebar .brand {
    font-size: 29px;
  }
  .sidebar .brand img {
    height: 38px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 9px 11px;
  }
  .sidebar .foot,
  .sidebar > .muted {
    display: none;
  }
  .main {
    padding: 16px;
  }
  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding: 23px 0;
  }
  h1 {
    font-size: 28px;
  }
  .cards {
    gap: 8px;
  }
  .metric {
    padding: 14px 10px;
    font-size: 12px;
  }
  .metric strong {
    font-size: 25px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 17px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 30px;
    gap: 8px;
  }
  .login-intro h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .login-intro p {
    display: none;
  }
  .login-form {
    padding: 20px;
  }
  .topbar {
    font-size: 12px;
  }
  .summary .stack {
    grid-template-columns: 1fr;
  }
  .spread {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .filter {
    max-width: none;
  }
  .actions > button {
    flex: 1;
  }
  .matrix {
    min-width: 440px;
  }
}

/* Ordering workspace: keep the assortment compact and the totals in reach. */
.main { margin: 0 auto; }
.shell { grid-template-columns: 184px minmax(0, 1fr); }
.sidebar { padding: 24px 16px; }
.editor { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
.editor > section { min-width: 0; }
.quantity-grid { min-width: 100%; width: max-content; }
.quantity-grid th:first-child { position: sticky; left: 0; z-index: 1; background: #f0f2f3; min-width: 120px; }
.quantity-grid td, .quantity-grid th { padding: 9px 7px; text-align: center; }
.quantity-grid th:first-child { text-align: left; }
.quantity-grid input { width: 64px; min-height: 44px; padding: 7px; border-radius: 5px; }
.quantity-grid input:not(:placeholder-shown) { background: #fff3cc; font-weight: 700; }
.quantity-cell { display: grid; justify-items: center; gap: 3px; }
.quantity-cell small { font-weight: 400; font-size: 11px; margin: 0; }
.unavailable { color: #495c6b; background: #f5f6f6; }
.order-options > summary { cursor: pointer; font-weight: 700; padding: 2px 0; }
.order-options[open] > summary { margin-bottom: 18px; }
#save-status { color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1100px) { .editor { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 700px) {
 .shell { grid-template-columns: minmax(0,1fr); }
 .sidebar { padding: 12px 16px; }
 .quantity-grid th:first-child { min-width: 90px; max-width: 110px; }
 .quantity-grid input { width: 56px; }
 .topbar { flex-wrap: wrap; }
}
.table-wrap { position: relative; }
.sr-only { left: 0; top: 0; }

/* DOK palette and action hierarchy. */
button.primary, .sidebar button.primary { background:#f9c33c; color:#233644; border:1px solid #f9c33c; }
button.primary:hover, .sidebar button.primary:hover { background:#f9cf71; border-color:#f9cf71; }
.sidebar button.active { background:#495c6b; color:#fff; box-shadow:inset 3px 0 #f9c33c; }
.sidebar #new-order { text-align:center; width:100%; }
.summary { border-top:4px solid #f9c33c; }
button { border-radius:6px; }
.hero h1 { font-size:30px; }
.hero .eyebrow { display:none; }
.main { max-width:1700px; padding:24px 28px 48px; }
.quantity-grid { table-layout:fixed; width:100%; min-width:820px; }
.quantity-grid .color-column { width:144px; }
.quantity-grid th:first-child { min-width:0; }
.quantity-grid input { max-width:100%; }
.order-picker { width:min(620px,calc(100vw - 32px)); padding:26px; border:1px solid #cdd1d0; border-radius:12px; color:#233644; max-height:85vh; }
.order-picker::backdrop { background:#23364499; }
.order-picker h2 { margin:0; }
.order-picker > p { margin-top:18px; }
#picker-results { margin:18px 0; max-height:42vh; overflow:auto; }
.picker-row { display:flex; justify-content:space-between; gap:16px; align-items:center; width:100%; text-align:left; margin-bottom:8px; padding:14px; }
.picker-row small { display:block; font-weight:400; margin-top:5px; }
.picker-row > span:last-child { white-space:nowrap; }
.picker-footer { display:grid; gap:12px; border-top:1px solid #cdd1d0; padding-top:18px; }
#prospect-form details summary { cursor:pointer; font-weight:600; }
@media(max-width:700px) {
 .main { padding:16px; }
 .sidebar { gap:12px; }
 .sidebar #new-order { width:auto; align-self:flex-start; }
 .quantity-grid .color-column { width:115px; }
 .quantity-grid { min-width:760px; }
 .picker-row { align-items:flex-start; flex-direction:column; gap:8px; }
}

/* Keep payment choices and their consequences together. */
.order-options h2 { margin-top: 0; }
#ach-timing { margin-top: 18px; }
#terms-eligibility { margin-bottom: 16px; }
.terms-panel { margin: 14px 0; padding: 18px; border-left: 3px solid #f9c33c; background: #f6f7f7; }
.terms-panel > p { margin-top: 0; }
.ap-exception { margin: 18px 0; }
.ap-exception p { margin-bottom: 0; }
.payment-setup { margin-top: 20px; padding-top: 16px; border-top: 1px solid #cdd1d0; }
.payment-setup h3 { margin-top: 0; }
.order-notes { margin-top: 18px; }
.order-notes > summary { cursor: pointer; font-weight: 700; }
.order-notes[open] > summary { margin-bottom: 18px; }

.terms-choice { align-items: flex-start; }
#terms-standard, #transfer-requirement { display: block; margin-top: 6px; font-weight: 400; line-height: 1.5; }
.ap-exception { padding: 16px; background: #fff5cf; border: 1px solid #f9c33c; border-radius: 8px; }
.ap-exception .check { align-items: flex-start; }
.ap-exception input, .terms-choice input { flex-shrink: 0; margin-top: 3px; }
.ap-exception p { line-height: 1.5; }
/* Workspace reporting and access management; Create Order styles are unchanged. */
.cards .metric { text-align:left; min-width:0; white-space:normal; }
.cards .metric strong { overflow-wrap:anywhere; }
.cards .metric small { display:block; margin-top:8px; font-weight:400; }
#sales-report .cards { margin-top:18px; }
#metric-detail { margin-top:20px; }
#access-form fieldset { border:1px solid #cdd1d0; border-radius:8px; padding:16px; min-width:0; }
#assign-results { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.access-user { padding:14px 0; border-bottom:1px solid #cdd1d0; }
#admin-overview .card { margin-top:20px; }

@media(max-width:650px) {
  #sales-report .cards, #admin-overview .cards { grid-template-columns:1fr; }
  #sales-report .metric { padding:18px; }
  #sales-report .metric strong { font-size:28px; overflow-wrap:normal; }
}

/* Rep ordering: one summary, progressive detail, payment beside its destination. */
.order-checkout { margin-top:16px; border-top:1px solid #cdd1d0; padding-top:16px; }
.order-checkout > div > .primary { width:100%; }
.shipping-details { margin-top:14px; font-size:14px; }
.shipping-details summary, .login-form summary { cursor:pointer; }
.destination-payment { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.payment-dialog { width:min(620px,calc(100vw - 32px)); max-height:85vh; overflow:auto; box-sizing:border-box; }
.payment-dialog::backdrop { background:rgb(35 54 68 / 45%); }
.payment-dialog button { margin-top:12px; }
.payment-dialog [data-card-close] { width:100%; }
.summary dl { margin:0; }
.summary dd { margin-left:12px; }
.summary dl .spread { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; }
.summary dl dd { margin:0; text-align:right; }
.summary dl .spread:last-child { border-top:1px solid #cdd1d0; padding-top:12px; margin-top:12px; font-weight:700; }
@media(max-width:700px) {
 .destination-payment { align-items:flex-start; }
 .destination-payment button { width:100%; }
 .editor aside { min-width:0; }
}

/* Author layout rules must never override semantic hidden controls. */
[hidden] { display:none !important; }
.editor[data-review="true"] { display:block; }
.editor[data-review="true"] > section { display:none; }
.editor[data-review="true"] aside { max-width:760px; position:static; }
.editor[data-review="true"] .summary > .stack,
.editor[data-review="true"] .summary > .divider,
.editor[data-review="true"] .summary > label,
.editor[data-review="true"] .summary > p { display:none; }
[data-review-items] { margin:16px 0; }
[data-review-items] summary { cursor:pointer; }
.badge.paid { background:#f9c33c; color:#233644; }
.checkout-result { padding:20px; margin:0 0 22px; border:1px solid #cdd1d0; border-radius:12px; background:#f5f6f6; }
.checkout-result.paid { background:#f9c33c; border-color:#f9c33c; }
.checkout-result h3 { margin:0 0 8px; font-size:24px; }
.checkout-result p { margin:0; }
.order-progress { display:flex; align-items:center; gap:14px; padding:18px; margin-bottom:16px; background:#f5f6f6; border:1px solid #cdd1d0; border-radius:10px; }
.order-progress p { margin:4px 0 0; color:#495c6b; font-size:14px; }
.progress-spinner { flex:0 0 24px; width:24px; height:24px; box-sizing:border-box; border:3px solid #cdd1d0; border-top-color:#233644; border-radius:50%; animation:order-spin .8s linear infinite; }
@keyframes order-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .progress-spinner { animation:none; } }
.order-disclosure { border:1px solid #cdd1d0; border-radius:10px; overflow:hidden; }
.order-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; box-sizing:border-box; padding:14px 16px; background:#f5f6f6; font-weight:700; list-style:none; }
.order-disclosure > summary::-webkit-details-marker { display:none; }
.order-disclosure .disclosure-action { flex-shrink:0; font-size:13px; color:#495c6b; }
.order-disclosure:not([open]) .when-open, .order-disclosure[open] .when-closed { display:none; }
.order-disclosure > h4, .order-disclosure > p { margin-inline:16px; }
.order-disclosure > ul { padding-right:16px; }
.order-reference { display:block; font-weight:700; }
.money > small { display:block; font-weight:400; font-size:12px; }

/* Disclosure controls keep the same touch target as the surrounding actions. */
.order-notes > summary, .shipping-details > summary,
.login-form summary, [data-review-items] > summary, #summary summary,
#prospect-form details > summary {
 min-height:44px; padding-block:11px; line-height:22px;
}
/* Location details: plain fields in short labelled groups, used wherever a
   location is created or edited, and one summary per location. */
.location-details { display:grid; gap:18px; min-width:0; }
.location-details h3 { margin:0 0 2px; font-size:16px; }
.location-details p { margin:0; }
.location-details [data-detail] { display:grid; gap:10px; min-width:0; }
.location-details [data-detail] + [data-detail] { border-top:1px solid #cdd1d0; padding-top:16px; }
.location-details [data-detail] > button, .location-details [data-billing-fields] button { justify-self:start; }
.location-details [data-order-email-recipient] { overflow-wrap:anywhere; }
#destination-details-edit { margin:10px 0 14px; }
/* Secure card form: who authorizes, and whose card it is. */
.card-identity { border:1px solid #cdd1d0; border-radius:10px; padding:14px 16px 16px; margin:0; min-width:0; display:grid; gap:10px; }
.card-identity legend { font-weight:700; padding:0 6px; }
.card-identity p { margin:0; }
/* Review: what each destination's order will carry. */
.order-checkout .destination { padding:12px 0; border-top:1px solid #cdd1d0; }
.order-checkout .destination > p { margin:0 0 6px; }
.destination-summary { margin:0; display:grid; gap:6px; }
.destination-summary > div { display:grid; grid-template-columns:minmax(0,11em) minmax(0,1fr); gap:10px; }
.destination-summary dt { color:#495c6b; font-size:14px; }
.destination-summary dd, .summary .destination-summary dd { margin:0; overflow-wrap:anywhere; text-align:left; }
@media(max-width:700px) { .destination-summary > div { grid-template-columns:1fr; gap:0; } }
.location-row { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; flex-wrap:wrap; padding:16px 0; border-bottom:1px solid #cdd1d0; }
.location-row > div:first-child { min-width:0; flex:1 1 260px; }
.location-row p { margin:4px 0 0; overflow-wrap:anywhere; }
.location-row .actions { flex:0 0 auto; }
.location-row button { white-space:nowrap; }
[data-destination-contacts] { margin:8px 0 10px; overflow-wrap:anywhere; }
/* Retailer setup: the save progress line sits with the form's actions. */
#prospect-form .order-progress { margin-bottom:0; }
#prospect-form details > button { margin-top:12px; }
.payment-dialog .card-new-option { border-top:1px solid #cdd1d0; margin-top:20px; padding-top:16px; }
.payment-dialog .card-new-option p { margin:0; }
.payment-dialog .card-new-option button { margin-top:8px; }
.payment-dialog [data-card-back] { margin:0 0 16px; }
 .order-checkout .check, .payment-dialog .check { min-height:44px; margin-block:16px; align-items:flex-start; }
 .order-checkout .check input[type="checkbox"], .payment-dialog .check input[type="checkbox"] { flex-shrink:0; }
@media(max-width:700px) {
 .payment-dialog [data-card-use], .payment-dialog [data-card-authorize], .payment-dialog [data-card-add] { width:100%; margin-left:0; }
 .order-checkout [data-choose], .order-checkout [data-cancel] { display:block; width:100%; margin-top:8px; }
}
/* Cards (2026-10-02): the saved cards, the card each location uses, and the
   one Add a card form. */
.saved-cards { list-style:none; margin:8px 0 0; padding:0; }
.saved-cards li { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; padding:10px 0; border-bottom:1px solid #cdd1d0; }
.location-card { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid #cdd1d0; }
.location-card > div { display:grid; gap:2px; min-width:0; }
.notice-text { color:#8a4b00; }
.add-card-panel { border:1px solid #cdd1d0; border-radius:10px; padding:16px; margin:12px 0 4px; }
.add-card-panel h3, #account-cards h3 { margin:0; }
#account-cards > h3 { margin-top:22px; }
[data-add-card] .check, .card-choices .check, [data-card-permission] { min-height:44px; align-items:flex-start; margin:0; }
[data-add-card] .check input[type="checkbox"], [data-card-permission] input[type="checkbox"], .card-choices input[type="radio"] { flex-shrink:0; margin-top:3px; }
.card-choices { border:0; margin:0 0 4px; padding:0; display:grid; gap:4px; min-width:0; }
.card-choices legend { font-weight:700; padding:0; margin-bottom:6px; }
[data-card-use] + [data-card-add] { margin-left:8px; }
.payment-dialog [data-card-remove] { margin-top:20px; border-top:1px solid #cdd1d0; padding-top:12px; }
.payment-dialog [data-card-remove] summary { min-height:44px; line-height:22px; padding-block:11px; cursor:pointer; }
/* Invoices: the effective recipient at each location, and the choice. */
.invoice-line { margin:6px 0 0; overflow-wrap:anywhere; }
.link-button { min-height:44px; padding:0 10px; margin-left:4px; }
.location-details [data-detail="invoices"] .check, [data-invoice-only] .check { min-height:44px; align-items:flex-start; margin:0; }
.location-details [data-detail="invoices"] input[type="radio"], [data-invoice-only] input[type="radio"] { flex-shrink:0; margin-top:3px; }
#account-preferences .check { align-items:flex-start; min-height:44px; }
#account-preferences .check input { flex-shrink:0; margin-top:3px; }
/* Sentences beside a box read as text: the option's name is bold, the rest is not. */
[data-add-card] .check, .card-choices .check, [data-card-permission], #account-preferences .check,
.location-details [data-detail="invoices"] .check, [data-invoice-only] .check { font-weight:400; font-size:14px; line-height:1.45; }
@media(max-width:700px) { .location-card button, .saved-cards li { width:100%; } .saved-cards li { flex-direction:column; gap:2px; } .link-button { margin-left:0; } [data-card-use] + [data-card-add] { margin-left:0; margin-top:8px; } }
[data-grid-destination] {
  font-size: 15px;
  font-weight: 500;
}
/* Orders backorder usability — October 3, 2026: review lead, destination cards, inline progress, Delete draft. */
.review-lead { padding:16px; margin:0 0 14px; border:1px solid #cdd1d0; border-radius:12px; background:#f5f6f6; }
.review-lead h3 { margin:0 0 4px; }
.review-status { margin:0 0 10px; font-weight:700; }
.review-amounts { display:grid; gap:6px; margin:10px 0; }
.review-amounts > div { display:flex; justify-content:space-between; gap:12px; }
.review-amounts dt { color:#495c6b; }
.review-amounts dd { margin:0; font-weight:700; font-variant-numeric:tabular-nums; }
.checkout-result .review-amounts { margin-top:12px; }
.review-destinations { display:grid; gap:10px; margin:0 0 14px; }
.order-checkout .review-destination, .review-destination { border:1px solid #cdd1d0; border-radius:10px; padding:12px 14px; }
.review-destination header { gap:10px; align-items:baseline; }
.review-destination header .money { font-weight:700; }
.review-destination [data-destination-method] { margin:6px 0; }
.review-waves { margin:4px 0 8px; padding-left:18px; color:#495c6b; font-size:14px; }
.review-destination [data-job] { margin:6px 0; }
.review-destination .order-disclosure { margin-top:8px; }
.item-list ul { margin:8px 0 0; padding-left:18px; }
.item-list .sku { font-variant-numeric:tabular-nums; font-weight:600; }
.order-progress.inline { display:inline-flex; padding:8px 12px; margin:8px 0; gap:10px; }
.orders-section { margin:26px 0 8px; }
.danger, .danger-quiet { color:#8a4b00; border-color:#8a4b00; }
.danger { font-weight:700; }
@media (max-width:640px) {
  .review-destination header { flex-wrap:wrap; }
}

/* Order history on a phone: each order is a stacked card, so the status and
   the amounts are read without scrolling sideways. */
.order-locations { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
@media (max-width:640px) {
  .order-history .table-wrap { overflow:visible; }
  .order-history table, .order-history tbody, .order-history tr, .order-history td { display:block; width:auto; }
  .order-history thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .order-history tr { border:1px solid #dfe3e2; border-radius:10px; padding:10px 12px; margin-bottom:10px; }
  .order-history td { border:0; padding:4px 0 4px 104px; position:relative; min-height:20px; }
  .order-history td::before { content:attr(data-label); position:absolute; left:0; top:5px; width:96px; color:var(--muted); font-size:12px; font-weight:700; }
  .order-history td:first-child { padding:0 0 6px; }
  .order-history td:first-child::before { content:none; }
}

/* Agency payouts: upcoming payouts first, order detail on selection, history below.
   Ready to pay is the only final unpaid status; estimates are marked. */
.payout-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; margin:6px 0 16px; }
.payout-card { text-align:left; display:flex; flex-direction:column; gap:10px; padding:16px; border:1px solid #dfe3e2; border-radius:12px; background:#fff; color:inherit; font:inherit; cursor:pointer; }
.payout-card.selected { border-color:#233644; box-shadow:inset 0 0 0 1px #233644; }
.payout-card-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.payout-figures, .payout-totals { display:grid; gap:6px; margin:0; }
.payout-figures > div, .payout-totals > div { display:flex; justify-content:space-between; gap:12px; }
.payout-figures dt, .payout-totals dt { color:var(--muted); font-size:13px; }
.payout-figures dd, .payout-totals dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
.payout-payable dd { font-weight:700; font-size:16px; }
.payout-note { font-size:12px; }
.estimate-tag { display:inline-block; margin-left:6px; padding:1px 6px; border:1px dashed #8a959b; border-radius:6px; font-size:11px; font-weight:600; color:#5a666d; }
.payout-status.accumulating { background:#eef1f1; color:#3c4a52; }
.payout-status.ready_to_finalize { background:#e4eef6; color:#1d4566; }
.payout-status.waiting { background:#f2f0ec; color:#5a5246; }
.payout-status.needs_review { background:#fff1d6; color:#7a4b00; }
.payout-status.ready_to_pay { background:#233644; color:#fff; }
.payout-status.paid { background:#e3f1e6; color:#1f5a2c; }
.payout-detail { border-top:1px solid #dfe3e2; padding-top:16px; display:grid; gap:12px; }
.payout-detail h3 { display:flex; gap:10px; align-items:center; margin:0; }
.payout-totals { max-width:460px; }
.payout-reasons { border:1px solid #f0d9a8; background:#fffaf0; border-radius:10px; padding:12px 14px; }
.payout-reasons ul { margin:0; padding-left:18px; display:grid; gap:12px; }
.payout-action { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; margin-top:6px; }
.payout-lines tr.held td { background:#fffaf0; }
.flag { color:#8a4b00; font-weight:600; }
.payout-finalize, .payout-pay form { border:1px solid #233644; border-radius:10px; padding:14px; display:grid; gap:10px; }
.payout-pay { display:grid; gap:12px; }
.payout-history-item { border-bottom:1px solid #eef1f1; padding:10px 0; }
.payout-history-item summary { display:grid; grid-template-columns:1fr auto auto; gap:12px; align-items:center; cursor:pointer; }
@media (max-width:640px) {
  .payout-cards { grid-template-columns:1fr; }
  .payout-history-item summary { grid-template-columns:1fr auto; }
  .payout-history-item summary .badge { grid-column:1 / -1; justify-self:start; }
  .payout-lines thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .payout-lines, .payout-lines tbody, .payout-lines tr, .payout-lines td { display:block; }
  .payout-lines tr { border:1px solid #dfe3e2; border-radius:10px; padding:8px 10px; margin-bottom:8px; }
  .payout-lines td { border:0; padding:3px 0 3px 104px; position:relative; }
  .payout-lines td::before { content:attr(data-label); position:absolute; left:0; width:96px; color:var(--muted); font-size:12px; font-weight:700; }
  .payout-detail .table-wrap { overflow:visible; }
}
/* Agency payouts: the approved executive table/detail layout, in DOK colors. */
.payout-section-head,.payout-detail-head,.payout-detail-footer {display:flex;justify-content:space-between;align-items:center;gap:20px;}
.payout-section-head h2 {margin:0;}
.payout-section-head {margin-bottom:20px;flex-wrap:wrap;}
.payout-overview {width:100%;border-collapse:collapse;}
.payout-overview th,.payout-lines th {font-size:12px;letter-spacing:.025em;color:var(--muted);font-weight:600;text-align:left;}
.payout-overview th,.payout-overview td {padding:18px 14px;border-bottom:1px solid #e5e8e7;vertical-align:middle;}
.payout-overview small,.payout-lines small {display:block;font-size:12px;color:var(--muted);margin-top:5px;line-height:1.5;}
.payout-overview td.money,.payout-overview th.money,.payout-lines td.money,.payout-lines th.money {text-align:right;font-variant-numeric:tabular-nums;}
.payout-overview tr.selected {background:#f5f6f6;box-shadow:inset 3px 0 #f9c33c;}
.payout-view {white-space:nowrap;border:0;background:transparent;color:#233644;font-weight:650;}
.payout-view:focus-visible {outline:2px solid #233644;outline-offset:3px;}
.payout-detail {margin:20px 0;border:1px solid #cdd1d0;border-radius:12px;background:white;padding:26px;gap:18px;}
.payout-detail-head {align-items:flex-start;}
.payout-detail-head h3 {font-size:20px;}
.payout-detail-head p {font-size:13px;margin:8px 0 0;}
.payout-amount {text-align:right;flex-shrink:0;}
.payout-amount strong {display:block;font-size:32px;letter-spacing:-1px;color:#233644;line-height:1.15;font-variant-numeric:tabular-nums;}
.payout-amount span {display:block;color:var(--muted);font-size:12px;margin-top:8px;}
.payout-context {font-size:13px;color:var(--muted);margin:0;}
.payout-detail-footer {border-top:1px solid #e5e8e7;padding-top:18px;color:var(--muted);font-size:12px;}
.payout-detail-actions {display:flex;flex-wrap:wrap;gap:8px;}
.payout-reopen {margin-top:18px;border-top:1px solid #e5e8e7;padding-top:14px;}
.payout-reopen form {display:grid;gap:10px;max-width:560px;margin-top:10px;}
.payout-status.superseded {background:#eef0ef;color:#5b6a73;}
.payout-lines td {vertical-align:top;padding:15px 12px;}
.payout-reasons summary {font-weight:650;cursor:pointer;}
.payout-reasons ul {margin-top:16px;}
.payout-reasons li p {font-size:13px;}
.payout-held {color:#7a4b00!important;}
.payout-order { font-size:12px; font-weight:600; margin-left:4px; white-space:nowrap; }
[data-payout-planned].flag { color:#8a4b00; }
.payout-history-grid {display:grid;grid-template-columns:1.2fr 1.5fr 1.2fr .8fr .8fr;gap:16px;align-items:center;}
.payout-history-header {font-size:12px;color:var(--muted);padding:12px 0;border-bottom:1px solid #cdd1d0;}
.payout-history-item summary {display:grid;grid-template-columns:1.2fr 1.5fr 1.2fr .8fr .8fr;padding:12px 0;}
.payout-history-item summary small {display:block;color:var(--muted);font-size:12px;margin-top:5px;}
@media(max-width:700px){
 .payout-detail {padding:18px;}
 .payout-detail-head {flex-wrap:wrap;gap:16px;}
 .payout-amount {text-align:left;}
 .payout-detail-footer {align-items:flex-start;flex-direction:column;}
 .payout-overview thead,.payout-history-header {display:none;}
 .payout-overview,.payout-overview tbody,.payout-overview tr,.payout-overview td {display:block;}
 .payout-overview tr {padding:12px;margin:12px 0;border:1px solid #cdd1d0;border-radius:8px;}
 .payout-overview td {padding:8px 0;border:0;}
 .payout-overview td[data-label] {display:grid;grid-template-columns:105px minmax(0,1fr);gap:3px 10px;}
 .payout-overview td[data-label]::before {content:attr(data-label);font-size:12px;color:var(--muted);grid-column:1;grid-row:1/4;}
 .payout-overview td[data-label]>* {grid-column:2;}
 .payout-overview td.money {text-align:left;}
 .payout-overview td:last-child {text-align:right;}
 .payout-history-item summary {grid-template-columns:1fr 1fr;gap:14px;}
 .payout-lines td.money {text-align:left;}
 .payout-lines td {overflow-wrap:anywhere;}
 .payout-action label {max-width:100%;min-width:0;}
 .payout-detail .table-wrap {min-width:0;}
}

.payout-finalize[hidden],[data-statement-preview][hidden] {display:none;}
.payout-history-link {font-size:13px;font-weight:600;}
@media(max-width:700px){
 .payout-lines tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;padding:12px;}
 .payout-lines td {padding:5px 0;min-width:0;}
 .payout-lines td:first-child {grid-column:1 / -1;}
 .payout-lines td::before {position:static;display:block;width:auto;margin-bottom:4px;font-size:11px;}
}
/* What the checkout brings into view (review heading, placement progress,
   result, error) stops a little below the top edge rather than touching it. */
[data-review-lead] h3, [data-order-busy], [data-checkout-result], [data-action-error], [data-order-notice] { scroll-margin-top: 24px; }
[data-review-lead] h3:focus, [data-order-busy]:focus, [data-checkout-result]:focus, [data-action-error]:focus { outline: none; }
[data-review-lead] h3:focus-visible, [data-order-busy]:focus-visible, [data-checkout-result]:focus-visible, [data-action-error]:focus-visible { outline: 2px solid #f9c33c; outline-offset: 4px; }

/* Other payment arrangements (issue #61): a secondary request under the card
   choice, compact, in the existing terms-panel style. */
.arrangement { margin-top: 12px; }
/* A secondary request, quieter than the card choice: a text link, not a button. */
.arrangement .link-button { margin-left: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit;
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.arrangement .link-button:hover { text-decoration-thickness: 2px; }
.arrangement-form { margin: 12px 0 0; padding: 16px 18px; border: 0; border-left: 3px solid #f9c33c; background: #f6f7f7; }
.arrangement-form legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.arrangement-question { margin: 12px 0 4px; font-weight: 600; }
.arrangement-choices { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.arrangement-choices .check { min-height: 44px; margin: 0; }
.arrangement-form label:not(.check) { margin-top: 10px; }
.arrangement-form .link-button { margin: 8px 0 0; }
.arrangement-review, .arrangement-status { margin: 14px 0; padding: 14px 16px; border-left: 3px solid #f9c33c; background: #f6f7f7; }
.arrangement-review h4, .arrangement-status h4 { margin: 0 0 6px; }
.arrangement-review .check { min-height: 44px; align-items: flex-start; margin-block: 12px; }
.arrangement-review .check input[type="checkbox"] { flex-shrink: 0; }
@media (max-width: 700px) { .arrangement-choices { flex-direction: column; } .arrangement-form { padding: 14px; } }

/* Payment arrangements and payments received (issue #61): at phone widths each
   row is a labelled card, never a sideways-scrolling table (DESIGN.md). */
@media (max-width:640px) {
  .table-wrap:has(> table.card-table) { overflow:visible; }
  table.card-table thead { display:none; }
  table.card-table, table.card-table tbody, table.card-table tr, table.card-table td { display:block; width:auto; }
  table.card-table tr { border-bottom:1px solid #e5e8e7; padding:10px 0; }
  table.card-table td { border:0; padding:4px 0 4px 104px; position:relative; min-height:22px; min-width:0; overflow-wrap:anywhere; }
  table.card-table td::before { content:attr(data-label); position:absolute; left:0; top:6px; width:96px; color:var(--muted); font-size:12px; font-weight:700; }
  table.card-table td input[type=number] { width:100%; max-width:180px; }
}

/* Payment arrangements, usability pass (October 2026): the decision with the
   request, the consequence beside the primary button, the payment summary. */
.decision { border-top: 1px solid #e5e8e7; margin-top: 18px; padding-top: 14px; }
.decision h4 { margin: 12px 0 4px; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-start; margin-top: 12px; }
.decision-actions > .actions { margin: 0; flex: 0 0 auto; }
.decision-actions > .muted, .decision-actions > .payment-summary { flex: 1 1 260px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.payment-summary p { margin: 0 0 6px; }
.payment-summary ul { margin: 0; }
.lookup label { display: block; }
.lookup input[type=search] { width: 100%; max-width: 520px; }
.decision [data-terms-confirm] { margin-top: 12px; }
@media (max-width:640px) {
  /* An action-only cell (Resolve) needs no repeated label on a phone card. */
  table.card-table td:has(> button:only-child) { padding-left: 0; }
  table.card-table td:has(> button:only-child)::before { content: none; }
}

/* Combined delivery (October 19, 2026). */
.delivery-choice { border:1px solid var(--line, #cdd1d0); border-radius:8px; padding:12px 16px; margin:12px 0; }
.delivery-choice .check { min-height:44px; align-items:flex-start; margin:0; flex-wrap:wrap; }
.delivery-choice .check input[type="radio"] { flex-shrink:0; margin-top:3px; }
.delivery-choice .check small { flex-basis:100%; padding-left:28px; margin:2px 0 10px; }
.delivery-choice select { width:100%; }
.store-pos label { display:block; }
[data-received-fields] input { width:100%; }
[data-received-allocations] input { max-width:12rem; }

/* DOK's recovery of a paid shipment whose Shopify handoff did not complete. */
.handoff-recovery { display: block; margin-top: 8px; }
.handoff-recovery button { margin-right: 8px; }
.handoff-result { display: block; margin-top: 6px; font-weight: 600; }
/* Multi-store editor (October 20, 2026): stores in this order, the store
   picker, the copy row and collapsed store details. Existing colours only;
   every control keeps a 44-pixel target. */
.stores-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:14px; }
.stores-head h3 { margin:0; }
.stores-head button, .copy-row button, .items-tools button, [data-empty-stores] button, [data-check-empty-stores] button { min-height:44px; }
.destination-list li.empty { border-style:dashed; }
.destination-list .destination-status.needs-items { color:#7a4b00; font-weight:600; }
[data-empty-stores] ul, [data-check-empty-stores] ul { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:8px; }
[data-empty-stores] li, [data-check-empty-stores] li { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
[data-empty-stores] li span, [data-check-empty-stores] li span { flex:1 1 120px; font-weight:600; }
/* In the order check (a narrow column): the store's name, then its actions. */
[data-check-empty-stores] li span { flex-basis:100%; }
/* The last copy into this store, beside the copy controls until dismissed. */
.copy-result { margin:0 0 12px; }
.copy-result p { margin:0 0 6px; }
.copy-result ul { margin:0 0 6px; padding-left:18px; }
.copy-result [data-copy-dismiss] { min-height:44px; }
/* A complete copy: a compact, neutral confirmation on one line. The yellow
   notice is kept for a copy that skipped items. */
.copy-result.copy-complete { display:flex; align-items:center; gap:4px 12px; flex-wrap:wrap; padding:6px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; font-size:13px; }
.copy-result.copy-complete p { margin:0; flex:1 1 220px; }
.copy-result.copy-complete p::before { content:"✓ "; color:#2f6f3e; font-weight:700; }
.copy-result.copy-complete [data-copy-dismiss] { min-height:32px; }
/* The whole store card is one button: name, address, status and totals. */
.destination-list li:has(> .destination-card) { padding:0; display:block; }
.destination-list .destination-card { display:flex; flex-direction:row; align-items:center; flex-wrap:wrap; gap:4px 12px; width:100%; min-height:56px; padding:10px 14px; border-radius:10px; cursor:pointer; color:var(--green); }
.destination-list .destination-card .destination-name { display:flex; flex-direction:column; gap:2px; flex:1 1 220px; min-width:0; }
.destination-list .destination-card .destination-status { flex:0 1 auto; text-align:right; }
.destination-list .destination-card:hover:not(:disabled) { background:#eef2f1; }
.destination-list li.active .destination-card:hover:not(:disabled) { background:#f7f9f8; }
.destination-list .destination-card:focus-visible { outline:3px solid #233644; outline-offset:2px; }
.destination-list .destination-card:disabled { cursor:progress; }
@media (max-width: 640px) { .destination-list .destination-card .destination-status { text-align:left; flex-basis:100%; } }
/* Remove store: a compact secondary action beside "Items for [store]". */
.items-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.remove-store { min-height:32px; padding:4px 12px; font-size:13px; font-weight:600; background:transparent; border:1px solid var(--line); border-radius:8px; color:var(--muted); box-shadow:none; }
.remove-store:hover:not(:disabled), .remove-store:focus-visible { color:#9b1c1c; border-color:#9b1c1c; }
/* More size columns than fit: say so; the grid scrolls within itself. */
.grid-hint { margin:6px 0 4px; font-size:13px; font-weight:600; color:var(--muted); text-align:right; }
.items-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.items-head h2 { margin:0; }
.items-status { display:flex; gap:10px; font-size:13px; color:var(--muted); }
[data-save-inline][data-state="saving"], [data-save-inline][data-state="pending"] { color:#7a4b00; }
[data-save-inline][data-state="error"] { color:#9b1c1c; font-weight:600; }
.copy-row { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; margin:14px 0 10px; padding:12px 14px; border:2px solid #233644; border-radius:10px; background:#fff; }
.copy-row label { flex:1 1 260px; font-weight:600; }
.copy-row select { width:100%; min-height:44px; }
.items-tools { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:space-between; margin:10px 0; }
.items-tools .filter { flex:1 1 220px; }
.store-details { margin:10px 0 4px; border:1px solid var(--line); border-radius:10px; padding:8px 12px; }
.store-details summary { cursor:pointer; min-height:32px; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.store-details[open] summary { margin-bottom:8px; }
.store-picker { width:min(560px,calc(100vw - 32px)); max-height:85vh; overflow:auto; box-sizing:border-box; }
.store-choices { border:0; padding:0; margin:0; display:grid; gap:8px; }
.store-choice { padding:10px 12px; border:1px solid var(--line); border-radius:10px; min-height:44px; align-items:flex-start; }
.store-choice span { display:flex; flex-direction:column; gap:2px; }
button.link { background:none; border:0; box-shadow:none; padding:0; min-height:0; color:inherit; text-decoration:underline; font:inherit; cursor:pointer; }
@media (max-width: 640px) {
  .stores-head button, .copy-row button, .items-tools button { width:100%; }
  .items-actions { width:100%; justify-content:space-between; }
  .items-status { flex:1 1 auto; }
  .remove-store { min-height:40px; }
  .grid-hint { text-align:left; }
}
.items-head h2 [data-grid-destination] { font-size:inherit; font-weight:inherit; color:inherit; }
/* The status message only ever holds text: it never swallows a click on the
   control underneath it (October 20, 2026). */
#message { pointer-events: none; }

/* After an edit: progress beside Review order, from the first change. */
.edit-progress { display:grid; gap:4px; }
.edit-progress .muted { font-size:12px; margin:0; }
.autosave-note { font-size:12px; }
/* Payment reminders (DOK administration) */
#reminders-root {display:grid;gap:16px;}
#reminders-root form {display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-top:10px;}
#reminders-root form label {display:grid;gap:4px;min-width:220px;}
.reminder-table td small {display:block;color:#6a7780;font-size:12px;margin-top:2px;}
.reminder-approval, .reminder-followup {border-top:1px solid #e5e8e7;padding-top:12px;margin-top:12px;}
.reminder-sample pre {white-space:pre-wrap;font-size:13px;background:#f5f6f6;border:1px solid #e5e8e7;border-radius:8px;padding:12px;max-width:640px;}
[data-not-covered] li {margin:8px 0;}
[data-not-covered] small {display:block;color:#6a7780;}
.legacy-balance {border-top:1px solid #e5e8e7;padding-top:12px;margin-top:12px;}
.legacy-balance small {display:block;color:#6a7780;}
[data-legacy-held] small {display:block;color:#6a7780;}

/* Unified administration: one task-oriented shell, owner tools kept separate. */
.admin-shell { grid-template-columns: 216px minmax(0, 1fr); }
.admin-shell .sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 24px 16px; gap: 20px; }
.admin-shell .sidebar nav { gap: 18px; }
.admin-shell .nav-group { display: grid; gap: 3px; }
.admin-shell .nav-label { color: #cdd1d0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 5px; }
.admin-shell .sidebar button { padding: 12px; min-height: 44px; }
.admin-shell .nav-owner { border-top: 1px solid #495c6b; padding-top: 16px; }
.admin-shell .grid { align-items: start; }
.admin-shell .stack { align-content: start; }
.admin-shell label { align-content: start; }
.admin-shell .admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.admin-shell .admin-tabs .active { background: #233644; color: white; border-color: #233644; }
.admin-shell .home-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.admin-shell .home-queues { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.admin-shell .home-queue { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.admin-shell .home-queue h2 { font-size: 17px; }
.admin-shell .home-queue button { margin-top: auto; }
.admin-shell .home-queue small { display: block; color: #495c6b; margin-top: 8px; }
.admin-shell .queue-count { display: block; font-size: 34px; line-height: 1.25; }
.admin-shell #account-list .grid { grid-template-columns: 1fr; gap: 0; }
.admin-shell #account-list .card { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border: 0; border-bottom: 1px solid #cdd1d0; border-radius: 0; padding: 16px 0; margin: 0; }
.admin-shell #account-list .card h3 { min-width: 220px; flex: 1; margin: 0; }
.admin-shell #account-list .card p { display: none; }
.admin-shell #prospect-form { max-width: 720px; }
.admin-shell details > summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
@media(max-width:1100px) { .admin-shell .home-queues { grid-template-columns: repeat(2,minmax(0,1fr)); } }
/* Tablets and phones: the menu collapses, so wide tables keep the full width. */
@media(max-width:900px) {
  .admin-shell { display:block; }
  .admin-shell .sidebar { position:static; height:auto; overflow:visible; }
  .admin-shell .sidebar nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-shell .nav-owner { grid-column:1/-1; }
  /* A table wider than its card scrolls inside the card, never the page. */
  .admin-shell .card { min-width:0; }
  .admin-shell .card table { display:block; overflow-x:auto; max-width:100%; }
  .admin-shell input, .admin-shell select, .admin-shell textarea { max-width:100%; }
  .admin-shell label { min-width:0; }
}
@media(max-width:700px) {
  .admin-shell .home-queues { grid-template-columns:1fr; }
  .admin-shell .main { padding:16px; }
  .admin-shell #account-list .card .actions { width:100%; }
  .admin-shell #account-list .card .actions button { flex:1; }
}

/* A compact, keyboard-accessible menu on tablets and phones; New order stays visible. */
.admin-shell #admin-menu { display:none; }
@media(max-width:900px) {
  .admin-shell .sidebar { padding:16px; }
  .admin-shell .sidebar .brand { margin-bottom:12px; }
  .admin-shell .sidebar > .muted, .admin-shell .sidebar .foot { display:none; }
  .admin-shell .sidebar #new-order { display:inline-block; width:auto; margin:0 12px 0 0; align-self:flex-start; }
  .admin-shell #admin-menu { display:inline-block; width:auto; }
  .admin-shell .sidebar #admin-navigation { display:none; margin-top:16px; }
  .admin-shell .sidebar.menu-open #admin-navigation { display:grid; }
  .admin-shell .topbar { flex-wrap:wrap; gap:12px; }
  .admin-shell .hero { flex-wrap:wrap; gap:12px; }
  .admin-shell .admin-tabs { flex-wrap:wrap; }
}

/* Needs attention: a summary of each queue, then only the queues with work. */
.admin-shell .attention-summary { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 20px; padding:0; list-style:none; }
.admin-shell .attention-summary button { display:flex; align-items:baseline; gap:8px; min-height:44px; }
.admin-shell .attention-summary strong { font-size:18px; }
.admin-shell .attention-summary .has-work { border-color:#c98a00; background:#fff4d6; }
.admin-shell .attention-summary .unavailable { border-style:dashed; }
.admin-shell .attention-clear > summary { font-weight:700; }
.admin-shell .attention-clear[open] > summary { margin-bottom:12px; }

/* Owner-directed refinement, October 23: quiet shell, work first, details on demand. */
.admin-shell { --admin-space:24px; grid-template-columns:224px minmax(0,1fr); }
.admin-shell .main { margin:0 auto; padding:20px 36px 64px; }
.admin-shell .sidebar { padding:28px 16px 20px; gap:24px; }
.admin-shell .sidebar .brand { padding-left:12px; }
.admin-shell .sidebar > .muted { display:none; }
.admin-shell .sidebar .foot { padding-left:12px; font-size:11px; opacity:.7; }
.admin-shell .sidebar button { white-space:normal; overflow-wrap:anywhere; line-height:1.35; }
.admin-shell .sidebar button.active { background:#ffffff14; color:#fff; box-shadow:inset 3px 0 var(--lime); }
.admin-shell .sidebar #new-order { background:var(--lime); color:var(--green); text-align:center; }
.admin-shell .sidebar #new-order:hover { background:#ffcf54; }
.admin-shell .nav-label { font-size:10px; opacity:.8; }
.admin-shell .topbar { min-height:46px; padding-bottom:12px; color:var(--muted); }
.admin-shell .profile-menu { position:relative; }
.admin-shell .profile-menu > summary { list-style:none; padding:10px 12px; font-size:13px; font-weight:600; }
.admin-shell .profile-menu > summary::after { content:'⌄'; margin-left:12px; }
.admin-shell .profile-actions { position:absolute; right:0; top:100%; display:grid; width:190px; padding:8px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 8px 30px #23364418; z-index:20; }
.admin-shell .profile-actions button { border:0; text-align:left; }
.admin-shell .hero { padding:26px 0 24px; align-items:center; }
.admin-shell .hero h1 { margin:0 0 8px; font-size:30px; letter-spacing:-.8px; }
.admin-shell .hero p { font-size:14px; max-width:640px; }
.admin-shell .hero .eyebrow { display:none; }
.admin-shell .card { border-color:#dfe3e3; border-radius:14px; box-shadow:none; }
.admin-shell .card h2 { font-size:19px; letter-spacing:-.35px; }
.admin-shell .card p { font-size:14px; }
.admin-shell .admin-tabs { margin:18px 0 0; gap:4px; border-bottom:1px solid #dfe3e3; }
.admin-shell .admin-tabs button { border:0; border-radius:0; background:transparent; color:var(--muted); padding:12px 14px; }
.admin-shell .admin-tabs .active { background:transparent; color:var(--green); box-shadow:inset 0 -2px var(--green); }
.admin-shell .home-layout { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:32px; align-items:start; }
.admin-shell .home-search { margin:0 0 26px; }
.admin-shell .home-search label { font-size:14px; margin-bottom:8px; }
.admin-shell .home-search > div { display:flex; gap:8px; }
.admin-shell .home-search input { min-width:0; background:#fff; padding:14px; }
.admin-shell .home-work { padding:0 24px; }
.admin-shell .section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 0; border-bottom:1px solid #e8ebeb; }
.admin-shell .section-heading h2 { margin:0; font-size:18px; }
.admin-shell .text-action { background:none; border:0; padding:8px 0; font-size:13px; }
.admin-shell .home-queues { display:block; }
.admin-shell .home-queue { display:flex; flex-direction:row; align-items:center; gap:16px; padding:18px 0; border-bottom:1px solid #e8ebeb; }
.admin-shell .queue-copy { min-width:0; flex:1; }
.admin-shell .home-queue h3 { font-size:15px; margin:0 0 4px; }
.admin-shell .home-queue p { font-size:13px; margin:0 0 8px; color:var(--muted); }
.admin-shell .home-queue button { border:0; background:#f4f6f6; padding:10px 12px; font-size:13px; margin:0; flex-shrink:0; }
.admin-shell .queue-count { display:inline; font-size:inherit; }
.admin-shell .queue-status { display:inline-block; font-size:12px; color:var(--muted); }
.admin-shell .queue-status.has-work { border-radius:5px; padding:3px 7px; background:#fff0d1; color:#775d2c; }
.admin-shell .queue-status.unavailable { font-size:12px; }
.admin-shell .home-queue .queue-preview { display:block; font-size:12px; margin:6px 0 0; overflow-wrap:anywhere; }
.admin-shell .home-clear { border-bottom:1px solid #e8ebeb; }
.admin-shell .home-clear summary { font-size:13px; color:var(--muted); }
.admin-shell .home-scope { font-size:12px; color:var(--muted); margin:14px 0 18px; }
.admin-shell .home-complete { padding:22px 0; }
.admin-shell .home-shortcuts { padding-top:0; }
.admin-shell .home-shortcuts h2 { font-size:13px; color:var(--muted); font-weight:600; margin:0 0 12px; }
.admin-shell .home-shortcuts button { display:grid; grid-template-columns:1fr 20px; width:100%; padding:18px 0; text-align:left; background:transparent; border:0; border-bottom:1px solid #dfe3e3; border-radius:0; }
.admin-shell .home-shortcuts strong { font-size:14px; }
.admin-shell .home-shortcuts span { font-size:12px; font-weight:400; color:var(--muted); grid-row:2; margin-top:5px; }
.admin-shell .home-shortcuts b { grid-column:2; grid-row:1/3; align-self:center; font-weight:400; }
.admin-shell .attention-summary { margin-bottom:16px; }
.admin-shell .attention-shortcut { background:white; font-size:13px; }
.admin-shell .attention-task { background:#fff; border:1px solid #dfe3e3; border-radius:12px; margin-bottom:12px; }
.admin-shell .attention-task > summary { display:flex; align-items:center; gap:16px; list-style:none; padding:20px; }
.admin-shell summary::-webkit-details-marker { display:none; }
.admin-shell .task-heading { display:grid; flex:1; min-width:0; gap:5px; }
.admin-shell .task-heading strong { font-size:16px; }
.admin-shell .task-heading small { font-size:13px; font-weight:400; }
.admin-shell .task-symbol { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#f1f3f3; font-weight:700; flex-shrink:0; }
.admin-shell .task-count { font-size:12px; white-space:nowrap; color:var(--muted); }
.admin-shell .task-chevron { font-size:20px; }
.admin-shell .attention-task[open] > summary { border-bottom:1px solid #e8ebeb; }
.admin-shell .attention-task[open] .task-chevron { transform:rotate(180deg); }
.admin-shell .task-body { padding:20px; margin:0; }
.admin-shell .task-body > p:first-child { max-width:780px; }
.admin-shell .task-body [data-cancellation] { border-top:1px solid #dfe3e3; padding:20px 0; }
.admin-shell .task-body [data-cancellation] > button { width:max-content; max-width:100%; }
.admin-shell .attention-clear { margin-top:24px; padding:8px 18px; background:transparent; }
.admin-shell .attention-clear > summary { font-size:13px; color:var(--muted); }
.admin-shell .attention-clear .attention-task { margin-top:12px; }
.admin-shell #account-list .card { padding:20px 0; }
.admin-shell #account-list .card h3 { flex:1 1 260px; }
.admin-shell #account-list .card .actions button { font-size:13px; }
.admin-shell #account-list .card .actions button.primary { background:#f2f4f4; border-color:#dfe3e3; color:var(--green); }
.admin-shell #reminders-root .reminder-status { padding:18px 22px; background:#edf0f1; }
.admin-shell .policy-note { margin-top:10px; }
.admin-shell .policy-note summary { font-size:13px; color:var(--muted); }
.admin-shell .system-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.admin-shell .system-grid .card { margin:0; }
.admin-shell .system-grid h2 { font-size:18px; }
.admin-shell .system-grid p { font-size:13px; }
.admin-shell :is(button,summary,a,input,select,textarea):focus-visible { outline:3px solid #af7800; outline-offset:3px; }
@media(max-width:1150px) { .admin-shell .home-layout { grid-template-columns:1fr; gap:24px; } .admin-shell .home-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; } .admin-shell .home-shortcuts h2 { grid-column:1/-1; } }
@media(max-width:900px) {
 .admin-shell { display:block; }
 .admin-shell .sidebar { position:sticky; top:0; z-index:30; display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; padding:12px 20px; height:auto; max-height:100dvh; overflow-y:auto; }
 .admin-shell .sidebar .brand { margin:0; padding:0; }
 .admin-shell .brand img { height:34px; width:auto; }
 .admin-shell .sidebar #new-order { margin:0; padding:10px 14px; align-self:center; font-size:13px; }
 .admin-shell #admin-menu { margin:0; padding:10px; font-size:13px; }
 .admin-shell .sidebar #admin-navigation { grid-column:1/-1; margin:8px 0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
 .admin-shell .sidebar .nav-group { min-width:0; }
 .admin-shell .sidebar .nav-group button { width:100%; min-width:0; white-space:normal; }
 .admin-shell .main { padding:12px 24px 48px; }
 .admin-shell .topbar { min-height:44px; padding:0 0 8px; gap:8px; flex-wrap:nowrap; }
 .admin-shell .topbar > span { font-size:12px; min-width:0; overflow-wrap:anywhere; }
 .admin-shell .topbar .actions { flex-shrink:0; gap:4px; }
 .admin-shell .topbar .badge { display:none; }
 .admin-shell .system-grid { grid-template-columns:1fr; }
}
@media(max-width:600px) {
 .admin-shell .sidebar { padding:10px 16px; }
 .admin-shell .main { padding:8px 16px 40px; }
 .admin-shell .topbar > span > .muted { display:none; }
 .admin-shell .hero { padding:22px 0 18px; flex-wrap:nowrap; gap:10px; }
 .admin-shell .hero h1 { font-size:26px; }
 .admin-shell .hero p { font-size:13px; }
 .admin-shell .hero > button { font-size:12px; padding:8px 10px; }
 .admin-shell .admin-tabs { gap:0; margin-top:12px; }
 .admin-shell .admin-tabs button { padding:10px 12px; font-size:13px; }
 .admin-shell .card { padding:18px; }
 .admin-shell .home-work { padding:0 16px; }
 .admin-shell .home-search { margin-bottom:20px; }
 .admin-shell .home-search input { font-size:16px; }
 .admin-shell .section-heading h2 { font-size:16px; }
 .admin-shell .home-queue { gap:8px; padding:16px 0; }
 .admin-shell .home-queue h3 { font-size:14px; }
 .admin-shell .home-queue p { font-size:12px; }
 .admin-shell .home-queue button { font-size:12px; padding:10px; }
 .admin-shell .home-shortcuts { grid-template-columns:1fr; }
 .admin-shell .attention-task > summary { padding:16px; gap:10px; flex-wrap:wrap; }
 .admin-shell .task-symbol { display:none; }
 .admin-shell .task-heading { flex-basis:65%; }
 .admin-shell .task-heading strong { font-size:15px; }
 .admin-shell .task-count { font-size:11px; }
 .admin-shell .task-chevron { display:none; }
 .admin-shell .task-body { padding:16px; }
 .admin-shell .task-body .actions { align-items:stretch; }
 .admin-shell #account-list .card .actions { display:flex; flex-wrap:wrap; gap:8px; }
 .admin-shell #account-list .card .actions button { flex:1 1 95px; font-size:12px; padding:10px 8px; }
 .admin-shell .table-wrap:has(>.admin-record-table) { overflow:visible; }
 .admin-shell .card table.admin-record-table, .admin-shell table.admin-record-table { display:table; width:100%; overflow:visible; }
 .admin-shell table.admin-record-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .admin-shell table.admin-record-table tbody { display:block; }
 .admin-shell table.admin-record-table tr { display:block; padding:14px 0; border-bottom:1px solid #dfe3e3; }
 .admin-shell table.admin-record-table td { display:grid; grid-template-columns:95px minmax(0,1fr); gap:4px 12px; border:0; padding:6px 0; width:auto; min-width:0; font-size:13px; overflow-wrap:anywhere; }
 .admin-shell table.admin-record-table td::before { content:attr(data-label); font-size:11px; font-weight:600; color:var(--muted); grid-column:1; grid-row:1; }
 .admin-shell table.admin-record-table td > * { grid-column:2; min-width:0; max-width:100%; }
 .admin-shell table.admin-record-table td.record-wide { display:block; }
 .admin-shell table.admin-record-table td.record-wide::before { display:none; }
 .admin-shell table.admin-record-table form { display:grid; margin:0; }
 .admin-shell table.admin-record-table form label { min-width:0; }
 .admin-shell #reminders-root form { align-items:stretch; }
 .admin-shell #reminders-root form label { min-width:0; width:100%; }
 .admin-shell #reminders-root form button { align-self:start; }
 .admin-shell .reminder-sample { padding-top:0!important; }
}

.admin-shell .hero { flex-direction:row; text-align:left; }
.admin-shell .admin-record-table .badge { white-space:normal; max-width:100%; }
.admin-shell .team-layout { display:flex; flex-direction:column; gap:20px; }
.admin-shell .team-layout > section { order:-1; }
.admin-shell .team-editor { max-width:720px; padding:0 22px; }
.admin-shell .team-editor > summary { font-weight:700; padding:18px 0; }
.admin-shell .team-editor #access-form { border:0; padding:0 0 20px; margin:0; background:transparent; }
.admin-shell .team-editor #access-form h2 { display:none; }
.admin-shell .access-user { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; }
.admin-shell .access-user h3 { flex:1 1 180px; margin:0; }
.admin-shell .access-user p { flex:2 1 260px; margin:0; }
.admin-shell .system-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.admin-shell .system-grid > .card:nth-child(2) { grid-column:2; grid-row:1/3; }
@media(max-width:900px) { .admin-shell .system-grid { display:flex; flex-direction:column; } .admin-shell .system-grid > .card { width:100%; } }
@media(max-width:600px) {
 .admin-shell .home-search input { padding:12px; }
 .admin-shell .hero > div { min-width:0; }
 .admin-shell .hero > button { flex-shrink:0; }
 .admin-shell .task-count { white-space:normal; max-width:80px; }
 .admin-shell .admin-record-table td small { margin:0; }
 .admin-shell table.admin-record-table td:has(>button:only-child) { display:block; }
 .admin-shell table.admin-record-table td:has(>button:only-child)::before { display:none; }
 .admin-shell .access-user { display:block; }
 .admin-shell .access-user p { margin:6px 0; }
}

.admin-shell .badge { text-transform:none; }
@media(max-width:600px) {
 .admin-shell table.admin-record-table td.record-empty { display:none; }
 .admin-shell .attention-task > summary .task-chevron { display:block; font-size:16px; width:12px; }
 .admin-shell .attention-task > summary { flex-wrap:nowrap; }
 .admin-shell .task-heading { flex-basis:auto; }
}

/* One store in the order: who, which store, where it is delivered (owner request, November 6, 2026). */
.single-delivery { border:1px solid var(--line, #cdd1d0); border-radius:8px; padding:12px 16px; margin:12px 0; }
.delivery-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 20px; margin:0; }
.delivery-summary dt { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted, #495c6b); }
.delivery-summary dd { margin:4px 0 0; overflow-wrap:anywhere; }
.delivery-summary dd:focus { outline:3px solid #af7800; outline-offset:3px; }
.single-delivery [data-deliver-own] { min-height:44px; margin-top:8px; }
@media (max-width:700px) { .delivery-summary { grid-template-columns:minmax(0,1fr); } }

/* Product identification in the quantity matrix. */
.quantity-grid { min-width:800px; }
.quantity-grid .color-column { width:212px; }
.quantity-grid tbody th:first-child { padding:6px 8px; }
.color-label { display:flex; align-items:center; gap:10px; min-width:0; }
.color-name { font-size:15px; font-weight:700; line-height:1.25; overflow-wrap:break-word; hyphens:manual; text-align:left; text-transform:none; letter-spacing:normal; color:#233644; }
.color-thumb { flex:none; width:52px; height:52px; padding:0; border:1px solid #cdd1d0; border-radius:6px; background:#fff; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; cursor:zoom-in; }
.color-thumb img { width:100%; height:100%; object-fit:contain; display:block; }
.color-thumb.missing { background:#eef0f1; cursor:default; }
.color-thumb:focus-visible { outline:3px solid #af7800; outline-offset:2px; }
.grid-product { display:block; font-size:11px; font-weight:700; color:var(--muted, #495c6b); text-transform:uppercase; letter-spacing:.04em; }
/* Size headings stay visible while scrolling the page where the grid fits its
   column (no sideways scrolling, measured: #matrix.fits); the color column
   always stays on the left. */
#matrix.table-wrap.fits { overflow:visible; }
#matrix.fits .quantity-grid thead th { position:sticky; top:0; z-index:2; background:#f0f2f3; box-shadow:0 1px 0 #cdd1d0; }
#matrix.fits .quantity-grid thead th:first-child { z-index:3; }
.image-preview { width:min(720px,calc(100vw - 32px)); max-height:90vh; overflow:auto; box-sizing:border-box; }
.image-preview::backdrop { background:#23364499; }
.image-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.image-preview-head h2 { margin:0; font-size:18px; }
.image-preview-head button { min-height:44px; }
.image-preview-frame { margin-top:14px; display:flex; justify-content:center; align-items:center; min-height:200px; background:#fff; }
.image-preview-frame img { max-width:100%; max-height:70vh; height:auto; }
@media (max-width:700px) {
  .quantity-grid .color-column { width:172px; }
  .quantity-grid { min-width:820px; }
  .quantity-grid tbody th:first-child, .quantity-grid thead th:first-child { max-width:none; width:172px; min-width:172px; box-sizing:border-box; }
  .color-label { gap:8px; }
  .color-thumb { width:48px; height:48px; }
  .color-name { font-size:14px; }
}
