/* Becky's Blinds — Trade Portal
   Brand taken from beckysblinds.com Wix theme (Oct 2026):
   --color_1/15 #31403F teal, --color_5 #B38A4C gold, --color_23 #FE7B3C CTA,
   --color_7 #C7D4D3 mist, --color_4 #F7F7F7 page ground.
   Fonts: Roboto (headings, font_0–6) + Montserrat (nav/UI, font_7–9).
   Professional B2B, en-GB, mobile-first */

/* Self-hosted Google Fonts (variable woff2, latin + latin-ext; £ U+00A3 is in latin).
   Same families/weights as the old fonts.googleapis.com link. Files are versioned and
   served by the Worker with a long immutable cache. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/montserrat-v31-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/montserrat-v31-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/roboto-v51-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/roboto-v51-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #31403f;
  --ink-soft: #3e5150;
  --muted: #5c7876;
  --line: #c7d4d3;
  --line-strong: #8fa9a7;
  --surface: #ffffff;
  --bg: #f7f7f7;
  --bg-warm: #fff8f3;
  --brand: #31403f;
  --brand-dark: #31403f;
  --brand-mid: #5c7876;
  --brand-soft: #e8efee;
  --brand-mist: #c7d4d3;
  --accent: #b38a4c;
  --accent-hot: #fe7b3c;
  --accent-hot-dark: #a95228;
  --accent-soft: #ffd3be;
  --accent-line: #febd9d;
  --success: #2d6a4f;
  --success-bg: #e7f3ec;
  --danger: #9b331d;
  --danger-bg: #fceaea;
  --soon: #8f8f8f;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(49, 64, 63, 0.06), 0 10px 28px rgba(49, 64, 63, 0.08);
  --shadow-sm: 0 1px 2px rgba(49, 64, 63, 0.05);
  --font: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui: "Montserrat", "Roboto", Helvetica, Arial, sans-serif;
  --max: 1100px;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--accent-hot);
}

.container {
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .container {
    width: min(100% - 2.5rem, var(--max));
  }
}

/* Author .field { display:flex } would otherwise override the UA [hidden] rule. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ——— Header ——— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-mid) 45%, var(--accent) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-block: 0.55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:hover {
  color: inherit;
}

.brand-logo {
  display: block;
  height: 2.85rem;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  min-width: 0;
}

.brand-tag {
  margin-top: 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.header-note,
.header-nav {
  font-size: 0.88rem;
  color: var(--muted);
}

.header-note {
  text-align: right;
  max-width: 14rem;
  line-height: 1.35;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--brand);
}

.header-nav a:hover {
  color: var(--accent-hot);
}

.header-nav span[aria-hidden="true"] {
  color: var(--brand-mist);
}

/* ——— Hero / intro ——— */
.hero,
.page-intro {
  padding: 2rem 0 1.75rem;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(179, 138, 76, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero .container,
.page-intro .container {
  max-width: 42rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0.28rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--brand-mist);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--brand-dark);
}

.lede {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
}

.trust-chip::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ——— Products ——— */
.products {
  padding: 2rem 0 1.5rem;
}

.section-label {
  font-family: var(--font-ui);
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem 1.3rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.product-card--active {
  border-color: var(--brand-mist);
}

.product-card--active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

a.product-card:hover {
  border-color: var(--brand-mid);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(36, 51, 50, 0.06), 0 16px 32px rgba(36, 51, 50, 0.1);
  color: inherit;
}

a.product-card:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.product-card--soon {
  opacity: 0.78;
  background: var(--bg-warm);
  box-shadow: none;
  cursor: not-allowed;
}

.product-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.product-card p {
  margin: 0;
  flex: 1;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.product-card__cta {
  font-weight: 700;
  color: var(--brand);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

a.product-card:hover .product-card__cta {
  color: var(--accent-hot);
}

.product-card__cta--muted {
  color: var(--soon);
  font-weight: 500;
}

/* ——— Info strip ——— */
.info-strip {
  padding: 0.5rem 0 2.75rem;
}

.info-strip__grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .info-strip__grid {
    grid-template-columns: 1.45fr 1fr;
    align-items: stretch;
  }
}

.info-strip h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.05rem;
}

.steps {
  counter-reset: step;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.callout strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #7a5520;
  font-size: 0.95rem;
}

.callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ——— Form ——— */
.form-section {
  padding: 1.75rem 0 3rem;
}

.form-layout {
  /* Single full-width column — sidebar removed */
  display: block;
}

.form-layout > form {
  width: 100%;
  max-width: none;
}

.fieldset {
  margin: 0 0 1.35rem;
  padding: 1.35rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--brand);
}

.fieldset legend {
  padding: 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--brand-dark);
}

.fieldset-help {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Single-column stack on all breakpoints (mobile-friendly).
   Modifiers kept for HTML compatibility but never go multi-column. */
.field-grid--2,
.field-grid--3,
.field-grid--4,
.field-grid--5 {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.field-grid .field {
  margin-bottom: 0;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.req {
  color: #df3131;
  font-weight: 700;
}

.opt {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: lowercase;
}

.field-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

input[readonly] {
  background: #f4f6f8;
  color: var(--ink);
  cursor: default;
}


.field-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(92, 120, 118, 0.22);
}

input.invalid,
textarea.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
}

textarea {
  resize: vertical;
  min-height: 4rem;
}

/* Line cards */
.lines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.line-card {
  padding: 1.05rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 3px solid var(--accent);
}

.line-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.line-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
}

.btn-text {
  border: none;
  background: none;
  color: var(--danger);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--accent-hot);
  color: #fff;
  box-shadow: 0 1px 2px rgba(169, 82, 40, 0.22);
}

.btn--primary:hover {
  background: var(--accent-hot-dark);
  color: #fff;
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--brand-mist);
  color: var(--brand);
}

.btn--secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn--ghost:hover {
  color: var(--brand);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.5rem;
}

.form-footnote {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 40rem;
}

.muted {
  color: var(--muted) !important;
}

/* Success */
.success-section {
  padding: 2.25rem 0 3.5rem;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(45, 106, 79, 0.08) 0%, transparent 60%),
    var(--bg);
}

.success-panel {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.15rem 1.5rem 1.75rem;
  text-align: center;
  border-top: 3px solid var(--success);
}

.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(45, 106, 79, 0.15);
}

.success-panel h1 {
  font-size: clamp(1.65rem, 3.5vw, 2rem);
}

.success-panel .lede {
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.success-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.pdf-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.success-panel .form-actions {
  justify-content: center;
}

.order-summary {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.order-summary h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.summary-meta {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.summary-meta dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-meta dd {
  margin: 0 0 0.55rem;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.summary-table th,
.summary-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.summary-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.email-note {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: #7a5520;
  text-align: left;
}

/* Admin */
.admin-section {
  padding: 2rem 0 3rem;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.admin-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

.admin-order {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border-left: 3px solid var(--brand);
}

.admin-order:last-child {
  margin-bottom: 0;
}

.admin-order header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-order h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-dark);
}

.admin-order time {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--brand);
  color: rgba(255, 255, 255, 0.88);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}

.footer-meta {
  color: rgba(255, 255, 255, 0.62);
}

.footer-meta em {
  font-style: normal;
  color: var(--accent);
}

@media (max-width: 640px) {
  .header-note {
    display: none;
  }

  .brand-logo {
    height: 2.4rem;
  }

  .success-panel {
    padding: 1.75rem 1.15rem 1.4rem;
  }

  .success-panel .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fieldset {
    padding: 1.15rem 1rem 1rem;
  }

  .form-actions .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 0.4rem);
  }
}

/* ——— Live price feedback ——— */
select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: auto;
}

select:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(92, 120, 118, 0.22);
}

select.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.line-price {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  font-size: 0.92rem;
}

.line-price--ok {
  border-style: solid;
  border-color: var(--brand-mist);
  background: var(--brand-soft);
}

.line-price--error {
  border-style: solid;
  border-color: #e8b4b4;
  background: var(--danger-bg);
}

.line-price__idle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.line-price__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.line-price__grid {
  display: grid;
  gap: 0.65rem 1.25rem;
}

@media (min-width: 640px) {
  .line-price__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.line-price__grid--simple {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .line-price__grid--simple {
    grid-template-columns: repeat(2, 1fr);
  }
}

.line-price__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.line-price__grid strong {
  font-size: 1.05rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.line-price__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.line-price__note {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.line-price__vat {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--muted);
}

.order-totals {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
}

.order-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.order-totals__row strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--brand-dark);
}

.order-totals__vat {
  font-size: 0.85rem;
  color: var(--muted);
}

.order-totals__note {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.order-totals__row--soft {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.order-totals__row--soft + .order-totals__row {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}


/* ——— Trade sign-in ——— */
.login-screen {
  padding: 2.25rem 0 3rem;
}

.login-card {
  width: min(100%, 28rem);
  margin-inline: auto;
  padding: 1.6rem 1.4rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.login-card h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}

.login-card .lede {
  margin-bottom: 1.15rem;
  font-size: 1rem;
}

.login-card .field:last-of-type {
  margin-bottom: 0.35rem;
}

.login-actions {
  margin-top: 1rem;
}

.login-actions .btn {
  width: 100%;
}

.login-footnote {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.portal-banner {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.portal-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--brand-dark);
}

.portal-banner p {
  margin: 0;
  font-size: 0.95rem;
}

.portal-toolbar .section-label {
  margin: 0;
}

.portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portal-who {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.login-links {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.15rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.choice-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .choice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

.hero .portal-who {
  margin: 0.85rem 0 0;
}

/* ——— Accounts, quotes, review ——— */
html.auth-pending body {
  visibility: hidden;
}

html[data-mode="quote"] #order-submit-actions,
html[data-mode="quote"] #order-footnote {
  display: none !important;
}

html[data-mode="order"] #quote-actions {
  display: none !important;
}

.review-panel {
  text-align: left;
}

.review-panel h1,
.review-panel .lede {
  text-align: left;
}

.review-panel .eyebrow {
  margin-bottom: 0.75rem;
}

.review-panel .form-actions {
  justify-content: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--success-bg);
  color: var(--success);
}

.badge--stop {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge--draft {
  background: var(--accent-soft);
  color: #7a5520;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.45rem 0;
  font-weight: 600;
}

.check input {
  width: auto;
  margin-top: 0.28rem;
}

.product-picks {
  border: 0;
  padding: 0;
  margin: 0 0 0.85rem;
}

.product-picks legend {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 0.35rem;
  font-family: var(--font);
}

.admin-jump {
  margin-bottom: 1rem;
}

.admin-jump a {
  margin-right: 0.85rem;
}

#company-form {
  margin-bottom: 1.25rem;
}

#on-stop-banner {
  margin-bottom: 1rem;
}

#account-terms {
  margin-bottom: 1rem;
}

#company-form-legend {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-dark);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.portal-actions .btn {
  min-width: 12rem;
}

@media print {
  body.printing-statement * {
    visibility: hidden;
  }

  body.printing-statement #statement-preview,
  body.printing-statement #statement-preview * {
    visibility: visible;
  }

  body.printing-statement #statement-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  body.printing-statement .no-print {
    display: none !important;
  }
}

.todo-item--done h3 {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-check {
  margin-bottom: 0.35rem;
}

.admin-note-list {
  margin: 0.35rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.admin-note-list li {
  margin: 0.35rem 0;
}

.admin-block {
  margin-bottom: 2rem;
}


/* Manufacturing worksheet preview / print (admin only) */
.worksheet-preview {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.worksheet-preview h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--brand-dark);
}
.ws-line-block {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.ws-line-block h4 {
  margin: 0 0 0.5rem;
  color: var(--brand-dark);
}
.ws-cut-blank {
  margin-top: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--muted);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.92rem;
}
.ws-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 0.65rem;
  font-size: 0.92rem;
}
.ws-ticks span::before {
  content: "☐ ";
}
.ws-sign {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--accent);
}
@media print {
  body.printing-worksheet * {
    visibility: hidden;
  }
  body.printing-worksheet #worksheet-preview,
  body.printing-worksheet #worksheet-preview * {
    visibility: visible;
  }
  body.printing-worksheet #worksheet-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    border: none;
  }
  body.printing-worksheet .no-print {
    display: none !important;
  }
}


/* On-screen price matrix editor (admin) */
.price-edit-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin: 0.75rem 0 1rem;
}
.price-edit-table {
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 100%;
}
.price-edit-table th,
.price-edit-table td {
  border: 1px solid var(--line);
  padding: 0.2rem 0.25rem;
  text-align: right;
  white-space: nowrap;
}
.price-edit-table th {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.price-edit-table th:first-child,
.price-edit-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--brand-soft);
  text-align: left;
  font-weight: 600;
  z-index: 2;
}
.price-edit-table input {
  width: 4.6rem;
  max-width: 100%;
  padding: 0.25rem 0.3rem;
  border: 1px solid transparent;
  border-radius: 3px;
  text-align: right;
  font: inherit;
  background: transparent;
}
.price-edit-table input:focus {
  outline: 2px solid var(--accent-hot);
  background: #fff;
}
.price-edit-table td.price-cell--changed {
  background: #fff3e8;
}
.price-edit-table td.price-cell--changed input {
  background: #ffe0cc;
  border-color: var(--accent-hot);
  font-weight: 600;
}
.price-edit-table td.price-cell--warn {
  background: #fceaea;
}
.price-edit-table td.price-cell--warn input {
  background: #f8d4d0;
  border-color: var(--danger);
}
.price-edit-table td.price-cell--invalid input {
  border-color: var(--danger);
  background: #fceaea;
}


/* Customer order progress */
.order-progress { margin: 0.75rem 0 0.5rem; }
.progress-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); gap: 0.25rem;
  counter-reset: none;
}
.progress-step {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  font-size: 0.85rem; color: var(--muted); padding-top: 0.1rem;
}
.progress-step::before {
  content: ""; position: absolute; top: 0.95rem; left: -50%; width: 100%; height: 3px;
  background: var(--line); z-index: 0;
}
.progress-step:first-child::before { display: none; }
.progress-step.is-done::before { background: var(--brand); }
.progress-dot {
  position: relative; z-index: 1; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  background: #fff; border: 2px solid var(--line); color: var(--muted); font-family: var(--font-ui);
}
.progress-step.is-done .progress-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress-step.is-current .progress-dot {
  background: var(--accent-hot); border-color: var(--accent-hot); color: #fff;
  box-shadow: 0 0 0 4px rgba(254, 123, 60, 0.22);
}
.progress-label { margin-top: 0.35rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.progress-step:not(.is-done) .progress-label { color: var(--muted); font-weight: 500; }
.progress-step.is-current .progress-label { color: var(--accent-hot-dark); }
.progress-date { font-size: 0.78rem; color: var(--muted); min-height: 1em; }
.progress-note { margin: 0.6rem 0 0; font-size: 0.95rem; }
.order-progress--compact .progress-step { font-size: 0.78rem; }
.order-progress--compact .progress-dot { width: 1.55rem; height: 1.55rem; font-size: 0.78rem; }
.order-progress--compact .progress-step::before { top: 0.78rem; }
@media (max-width: 560px) {
  .progress-steps { grid-template-columns: 1fr; gap: 0.4rem; }
  .progress-step { flex-direction: row; text-align: left; gap: 0.6rem; }
  .progress-step::before { display: none; }
  .progress-label { margin-top: 0; }
  .progress-date { margin-left: auto; }
}

/* Admin order status + sales reports */
.order-status-admin { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px dashed var(--line); }
.report-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.report-block { margin-top: 1.25rem; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.95rem; }
.report-table th, .report-table td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); text-align: left; }
.report-table thead th { background: var(--brand-soft); color: var(--brand-dark); font-family: var(--font-ui); font-weight: 600; }
.report-table tfoot th { border-top: 2px solid var(--brand); }
.report-table .num { text-align: right; white-space: nowrap; }
.report-summary { margin: 1rem 0 0; font-size: 1.05rem; }

.badge--disc-active { background: #e3f3ea; color: #1f6b3d; }
.badge--disc-scheduled { background: #fff3dc; color: #8a5a00; }
.badge--disc-expired { background: #eceeee; color: #5c6566; }

/* Proforma (pay before production) */
.proforma-panel {
  border: 1px solid #e7c3a6; border-left: 4px solid #D47A3A; background: #fdf6f0;
  border-radius: var(--radius-sm, 6px); padding: 0.9rem 1rem; margin: 0.75rem 0 1rem; text-align: left;
}
.proforma-panel p { margin: 0.35rem 0 0.75rem; }
.badge--awaiting { background: #fdf0e4; color: #9a4f17; border: 1px solid #e7c3a6; }
.order-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.25rem 0 0.75rem; }
.order-filter .is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.invoice-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 640px) { .invoice-settings-grid { grid-template-columns: 1fr; } }

/* Admin orders email list */
.email-list { list-style: none; margin: 0.25rem 0 0.75rem; padding: 0; }
.email-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm, 6px); background: #fff; margin-bottom: 0.4rem; }
.order-notify { margin: 0.75rem 0; }

/* Email sending status (Resend) */
.portal-banner--error {
  border-color: #c0392b;
  background: #fdf0ee;
  color: #7b241c;
}
.email-result { margin: 0.75rem 0; }
.email-result--ok { color: #1e6b3a; }
.email-result--fail { color: #a93226; }
.email-log-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.email-log-table th, .email-log-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid #e4e4e0; vertical-align: top; }
.email-log-table td.email-log-error { color: #a93226; max-width: 28rem; word-break: break-word; }
.email-test-response { white-space: pre-wrap; word-break: break-word; background: #F7F7F5; border: 1px solid #e4e4e0; padding: 0.6rem; font-size: 0.85rem; max-height: 16rem; overflow: auto; }
.badge--sent { background: #d8efe0; color: #1e6b3a; }
.badge--failed { background: #f8d7d3; color: #7b241c; }
.badge--not_configured { background: #f1e6cf; color: #6b4e16; }
.admin-order.is-highlighted { outline: 3px solid #FE7B3C; outline-offset: 2px; }
.table-scroll { overflow-x: auto; }
.ws-cut-filled { border-style: solid; }
.ws-cut-table { border-collapse: collapse; margin-top: 0.35rem; font-size: 0.92rem; }
.ws-cut-table th { text-align: left; font-weight: 600; padding: 0.15rem 1rem 0.15rem 0; }
.ws-cut-table td { padding: 0.15rem 1rem 0.15rem 0; }

/* ——— Back office shell (sidebar + routed pages) ——— */
.admin-body { background: var(--bg); }
.admin-topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: var(--header-h);
  padding: 0.5rem 1.25rem;
}
.admin-topbar-inner .brand { margin-right: auto; }
.admin-menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.admin-menu-icon,
.admin-menu-icon::before,
.admin-menu-icon::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  content: "";
}
.admin-menu-icon::before { position: absolute; top: -6px; }
.admin-menu-icon::after { position: absolute; top: 6px; }
.admin-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  /* keep the teal column running the full page height, past the sticky sidebar */
  background: linear-gradient(to right, var(--brand) 236px, transparent 236px);
}
.admin-topbar #sign-out { white-space: nowrap; }
.admin-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 3px);
  height: calc(100vh - var(--header-h) - 3px);
  overflow-y: auto;
  background: var(--brand);
  color: #fff;
  padding: 1.1rem 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #e3ebea;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.admin-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-left-color: var(--accent-hot);
  font-weight: 600;
}
.admin-nav a:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 1px; }
.admin-sidebar-who {
  margin: auto 0 0;
  padding: 1rem 0.85rem 0;
  font-size: 0.8rem;
  color: #b9c9c7;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-main {
  min-width: 0;
  padding: 1.75rem 2rem 2.5rem;
  outline: none;
}
.admin-page { max-width: 1120px; }
.admin-page-head { margin-bottom: 1.25rem; }
.admin-page-head h1 {
  margin: 0 0 0.3rem;
  font-family: var(--font-ui);
  font-size: 1.6rem;
  color: var(--ink);
}
.admin-page-lede { margin: 0; color: var(--muted); max-width: 60rem; }
.admin-subhead {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.admin-page > .admin-subhead:first-of-type,
.settings-jump + .admin-subhead { margin-top: 0.5rem; }
.settings-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }
.settings-jump a {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.settings-jump a:hover { border-color: var(--accent-hot); }
.admin-footer {
  max-width: 1120px;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.admin-scrim { display: none; }

/* Dashboard */
.dash-note { margin: -0.5rem 0 1rem; font-size: 0.85rem; color: var(--muted); }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.05rem 1.15rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.dash-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.dash-card:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 2px; }
.dash-card--alert { border-top-color: var(--accent-hot); }
.dash-card--ok { border-top-color: var(--success); }
.dash-card--bad { border-top-color: var(--danger); }
.dash-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-value {
  font-family: var(--font-ui);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.dash-value--text { font-size: 1.25rem; padding: 0.35rem 0 0.2rem; }
.dash-sub { font-size: 0.86rem; color: var(--muted); }
.dash-sub strong { color: var(--ink); }
.dash-up { color: var(--success); font-weight: 600; }
.dash-down { color: var(--danger); font-weight: 600; }
.dash-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.15rem;
}
.dash-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.dash-panel h2 { margin: 0; font-family: var(--font-ui); font-size: 1.05rem; color: var(--ink); }
.dash-panel header a { font-size: 0.85rem; font-family: var(--font-ui); }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { border-top: 1px solid var(--line); }
.dash-list li:first-child { border-top: none; }
.dash-list a,
.dash-list .dash-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.15rem;
  text-decoration: none;
  color: var(--ink);
}
.dash-list a:hover { background: var(--bg); }
.dash-row-main { min-width: 0; }
.dash-row-main strong { display: block; font-size: 0.95rem; }
.dash-row-main small { display: block; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-side { text-align: right; flex-shrink: 0; font-size: 0.85rem; }
.dash-row-side small { display: block; color: var(--muted); }
.dash-status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.dash-status--awaiting_payment { background: #ffe7da; color: #8a3a12; }
.dash-status--shipped, .dash-status--delivered { background: var(--success-bg); color: var(--success); }

@media (max-width: 959px) {
  .admin-menu-toggle { display: inline-flex; }
  .admin-shell { display: block; background: none; }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: min(280px, 82vw);
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  }
  .admin-body.admin-menu-open .admin-sidebar { transform: none; }
  .admin-scrim {
    position: fixed;
    inset: 0;
    background: rgba(20, 28, 27, 0.45);
    z-index: 60;
  }
  .admin-body.admin-menu-open .admin-scrim:not([hidden]) { display: block; }
  .admin-main { padding: 1.25rem 1rem 2rem; }
  .admin-topbar-inner { padding: 0.45rem 0.9rem; }
  .dash-columns { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .dash-card { padding: 0.8rem 0.85rem; }
  .dash-value { font-size: 1.6rem; }
  .dash-value--text { font-size: 1.05rem; }
  .admin-topbar-inner .brand-logo { height: 2.2rem; }
  .admin-page-head h1 { font-size: 1.35rem; }
  .admin-topbar-inner { gap: 0.55rem; }
  .admin-topbar #sign-out { padding: 0.45rem 0.75rem; font-size: 0.9rem; }
}
@media print {
  .admin-sidebar, .admin-topbar, .admin-footer, .admin-scrim { display: none !important; }
  .admin-shell { display: block; background: none; }
}

/* ——— Compact lists: Orders, Quotes, Worksheets (search + filters + expandable rows) ——— */
.list-tools { display: grid; gap: 0.6rem; margin: 0 0 0.9rem; }
.list-search input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c7876' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.75rem center;
}
.list-search input:focus { outline: 2px solid #FE7B3C; outline-offset: 1px; border-color: #FE7B3C; }
.list-tools .order-filter { margin: 0; gap: 0.4rem; }
.list-tools .order-filter .btn { padding: 0.4rem 0.75rem; font-size: 0.85rem; min-height: 0; }
.list-tools .order-filter .btn span:empty { display: none; }
.list-tools .order-filter .btn span { opacity: 0.75; font-weight: 500; }
.list-count { margin: 0; font-size: 0.85rem; color: var(--muted); }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
.admin-panel--list { padding: 0; overflow: hidden; }
.admin-panel--list > .admin-empty { padding: 1.5rem 1rem; }

.olist { --olist-cols: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(6.5rem, 0.7fr) minmax(8.5rem, 0.9fr) 1.25rem; }
.olist--worksheets { --olist-cols: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(8.5rem, 0.9fr) 1.25rem; }
.olist-head, .olist-row {
  display: grid;
  grid-template-columns: var(--olist-cols);
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 1rem;
}
.olist-head {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f3f6f6;
  border-bottom: 1px solid var(--line);
}
.olist .num { text-align: right; font-variant-numeric: tabular-nums; }
.olist-item { border-bottom: 1px solid #e3eaea; scroll-margin-top: calc(var(--header-h) + 1rem); }
.olist-item:last-child { border-bottom: 0; }
.olist-row { cursor: pointer; list-style: none; min-height: 2.75rem; }
.olist-row::-webkit-details-marker { display: none; }
.olist-row:hover { background: #f5f8f8; }
.olist-row:focus-visible { outline: 2px solid #FE7B3C; outline-offset: -2px; }
.olist-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist-company { font-weight: 600; color: var(--brand-dark); }
.olist-ref { color: #3b4b4a; }
.olist-status { display: flex; gap: 0.3rem; flex-wrap: wrap; white-space: normal; }
.olist-chev {
  width: 0.55rem; height: 0.55rem; justify-self: end;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s ease;
}
.olist-item[open] > .olist-row .olist-chev { transform: rotate(225deg) translate(-2px, -2px); }
.olist-item[open] > .olist-row { background: #eef3f3; }
.olist-detail {
  padding: 0.9rem 1rem 1.1rem 1.25rem;
  border-left: 3px solid var(--brand);
  background: var(--bg);
}
.olist-detail header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.olist-detail h3 { margin: 0; font-size: 1rem; color: var(--brand-dark); }
.olist-detail time { font-size: 0.85rem; color: var(--muted); }
.olist-item.is-highlighted { outline: 3px solid #FE7B3C; outline-offset: -3px; }
.olist-item.is-highlighted > .olist-row { background: #fff1e9; }

.sbadge {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.55rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; white-space: nowrap;
  background: #e6eeee; color: var(--brand-dark);
}
.sbadge--awaiting_payment { background: #ffe7da; color: #8a3a12; border: 1px solid #f3c2a6; }
.sbadge--ordered { background: #e4edf7; color: #24486e; }
.sbadge--in_production, .sbadge--ws-in_production { background: #fff3dc; color: #7a5300; }
.sbadge--ready { background: #e7e3f6; color: #4a3a86; }
.sbadge--shipped, .sbadge--delivered, .sbadge--converted, .sbadge--ws-done { background: var(--success-bg); color: var(--success); }
.sbadge--paid { background: #d8efe0; color: #1e6b3a; font-weight: 600; }
.sbadge--draft { background: var(--accent-soft); color: #7a3b17; }
.sbadge--ws-new { background: #e4edf7; color: #24486e; }
.email-short { cursor: help; border-bottom: 1px dotted currentColor; }
.email-log-link { font-size: 0.85rem; margin-left: 0.25rem; }

@media (max-width: 700px) {
  .olist-head { display: none; }
  .olist-row,
  .olist--worksheets .olist-row {
    grid-template-columns: minmax(0, 1fr) auto 1rem;
    grid-template-areas: "company value chev" "ref status chev";
    gap: 0.2rem 0.6rem;
    padding: 0.6rem 0.85rem;
  }
  .olist--worksheets .olist-row { grid-template-areas: "company status chev" "ref status chev"; }
  .olist-company { grid-area: company; }
  .olist-ref { grid-area: ref; font-size: 0.88rem; color: var(--muted); }
  .olist-value { grid-area: value; font-weight: 600; }
  .olist-status { grid-area: status; justify-content: flex-end; }
  .olist-chev { grid-area: chev; }
  .olist-detail { padding: 0.8rem 0.85rem 1rem; }
  .list-tools .order-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.2rem; -webkit-overflow-scrolling: touch; }
  .list-tools .order-filter .btn { flex: 0 0 auto; }
}
@media print {
  .list-tools, .olist-head, .olist-chev { display: none !important; }
}

/* ——— Customers: compact list + Add customer dialog ——— */
.list-tools-row { display: flex; gap: 0.6rem; align-items: stretch; }
.list-tools-row .list-search { flex: 1; min-width: 0; }
.list-tools-row .btn { white-space: nowrap; }
.olist--customers { --olist-cols: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(5.5rem, 0.5fr) 1.25rem; }
.olist-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; white-space: normal; }
.ptag {
  display: inline-block; padding: 0.12rem 0.5rem; border-radius: 4px;
  font-size: 0.74rem; font-weight: 600; background: #e6eeee; color: var(--brand-dark);
}
.sbadge--onstop { background: var(--danger-bg); color: var(--danger); border: 1px solid #ebb9b2; }
.company-edit-slot > .fieldset { margin: 0.75rem 0 0; background: #fff; }
.company-edit-slot > .fieldset #company-form-legend { font-size: 1.05rem; }
#company-status:not([hidden]) { margin: 0 0 0.9rem; }

.admin-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(20, 28, 27, 0.35);
  overflow: auto;
}
.admin-dialog::backdrop { background: rgba(20, 28, 27, 0.55); }
.admin-dialog-body > .fieldset { margin: 0; border: 0; box-shadow: none; padding: 1.4rem 1.5rem 1.5rem; }
.admin-dialog-close {
  position: sticky; top: 0.5rem; float: right; margin: 0.5rem 0.5rem 0 0; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--brand-dark);
}
.admin-dialog-close:hover { background: #f3f6f6; }
.admin-dialog-close:focus-visible { outline: 2px solid #FE7B3C; }

@media (max-width: 700px) {
  .olist--customers .olist-row {
    grid-template-columns: minmax(0, 1fr) auto 1rem;
    grid-template-areas: "company status chev" "ref ref chev" "tags tags chev";
  }
  .olist-tags { grid-area: tags; margin-top: 0.15rem; }
  .olist--customers .olist-status:empty { display: none; }
  .list-tools-row .btn { padding-left: 0.8rem; padding-right: 0.8rem; }
  .admin-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .admin-dialog-body > .fieldset { padding: 1rem 1rem 1.5rem; }
}
@media (max-width: 520px) {
  .list-tools-row { flex-wrap: wrap; }
  .list-tools-row .list-search { flex: 1 1 100%; }
  .list-tools-row .btn { flex: 1 1 100%; }
}

/* Perfect Fit multi-buy (admin-only notes) */
.multibuy-note { margin: 0.4rem 0; padding: 0.35rem 0.6rem; border-left: 3px solid #FE7B3C; background: #fff4ec; color: #7a3b17; font-size: 0.92rem; }
.multibuy-line { color: #9a4f17; font-size: 0.9em; }

/* Line waiting for its live price from the server (keeps the last price, slightly faded). */
.line-pending .line-price { opacity: 0.55; transition: opacity 0.15s ease; }

/* Copy a blind line */
.line-card__actions { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.btn-text.btn-copy { color: var(--brand); }
.btn-text:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: none; }
@media (max-width: 640px) {
  .line-card__actions .btn-text { min-height: 44px; min-width: 44px; padding: 0.5rem 0.75rem; }
}
.line-copied-note { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--brand); font-weight: 600; }
.line-card--copied { box-shadow: 0 0 0 3px rgba(240, 128, 48, 0.45); transition: box-shadow 0.6s ease; }
.field-highlight { background: #fff7d6 !important; border-color: #e0a100 !important; box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.25); }

/* Oversize / outside the standard size range */
.line-price--oversize { border-color: #c2410c; background: #fff4ed; }
.line-price--oversize .line-price__error a { font-weight: 700; color: inherit; text-decoration: underline; }
.oversize-note { margin: 0 0 0.85rem; padding: 0.75rem 1rem; border: 1px solid #c2410c; border-left-width: 4px; border-radius: var(--radius, 6px); background: #fff4ed; color: #7c2d12; font-size: 0.92rem; }
.oversize-note a { color: inherit; font-weight: 700; }

/* Remake badges on the customer portal / order status */
.sbadge { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; vertical-align: middle; }
.sbadge--remake { background: #eef2ff; color: #3730a3; }
.sbadge--foc { background: #ecfdf5; color: #065f46; }
.remake-links { margin: 0.4rem 0; padding: 0.45rem 0.65rem; background: #f8fafc; border-left: 3px solid #64748b; border-radius: 0 6px 6px 0; font-size: 0.92rem; }
.remake-links a { font-weight: 700; }
