:root {
  --bell-burgundy: #a62b47;
  --bell-green: #006557;
  --bell-green-dark: #004b41;
  --ink: #17211f;
  --muted: #60706c;
  --line: #d8e1de;
  --surface: #ffffff;
  --surface-soft: #f4f7f6;
  --surface-warm: #fbf8f8;
  --warning: #9a5a00;
  --warning-bg: #fff6e7;
  --error: #a42525;
  --error-bg: #fff0f0;
  --success: #11664f;
  --success-bg: #eef8f4;
  --shadow: 0 18px 44px rgba(31, 55, 49, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, rgba(0, 101, 87, 0.08), transparent 26rem),
    #eef3f1;
  color: var(--ink);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 60px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: var(--bell-burgundy);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(166, 43, 71, 0.18);
}

.site-header h1 {
  margin: 1px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}

.eyebrow {
  margin: 0;
  color: var(--bell-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 30px auto 56px;
}

.intro-card,
.form-card {
  border: 1px solid rgba(216, 225, 222, 0.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(24px, 4vw, 38px);
  margin-bottom: 22px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 246, 0.95)),
    var(--surface);
}

.intro-card h2 {
  max-width: 780px;
  margin: 7px 0 8px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.15;
}

.intro-card p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.status-pill {
  flex: 0 0 auto;
  max-width: 290px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #edf1f0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.status-pill-ready {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill-error {
  background: var(--error-bg);
  color: var(--error);
}

.form-card {
  margin-top: 22px;
  padding: clamp(22px, 3.4vw, 36px);
}

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

.section-heading h2 {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.2;
}

.section-number {
  margin: 0;
  color: var(--bell-burgundy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.field > span {
  color: #30413d;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bccac6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

input,
select {
  min-height: 44px;
  padding: 9px 11px;
}

textarea {
  resize: vertical;
  padding: 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--bell-green);
  box-shadow: 0 0 0 3px rgba(0, 101, 87, 0.12);
}

.floor-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.floor-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.floor-tab.is-active {
  background: #fff;
  color: var(--bell-green-dark);
  box-shadow: 0 3px 12px rgba(31, 55, 49, 0.08);
}

.tab-count,
.section-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: #e4ece9;
  color: #42534f;
  font-size: 11px;
  font-weight: 800;
}

.floor-tab.is-active .tab-count {
  background: rgba(0, 101, 87, 0.12);
  color: var(--bell-green);
}

.floor-panel {
  animation: panel-in 170ms ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
  padding: 16px 18px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.toggle-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.toggle-line input {
  width: 19px;
  height: 19px;
  min-height: auto;
  margin: 2px 0 0;
  accent-color: var(--bell-green);
}

.toggle-line span {
  display: grid;
  gap: 1px;
}

.toggle-line small {
  color: var(--muted);
}

.floor-summary {
  color: var(--bell-green-dark);
  font-size: 13px;
  font-weight: 800;
}

.floor-content {
  transition: opacity 130ms ease;
}

.floor-content.is-disabled {
  opacity: 0.52;
}

.compact-grid {
  margin-bottom: 18px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 6px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}

.check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3f514d;
  font-size: 13px;
  font-weight: 700;
}

.check-grid input {
  width: 17px;
  height: 17px;
  min-height: auto;
  accent-color: var(--bell-green);
}

.product-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 14px;
}

.product-heading h3 {
  margin: 0;
  font-size: 20px;
}

.product-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search-field {
  width: min(310px, 100%);
}

.product-groups {
  display: grid;
  gap: 11px;
}

.product-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.product-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f7f9f8;
  color: #293b37;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.product-section > summary::-webkit-details-marker {
  display: none;
}

.product-section > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--bell-green);
  font-size: 20px;
  line-height: 1;
}

.product-section[open] > summary::after {
  content: "−";
}

.product-list {
  display: grid;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 10px 16px;
  border-top: 1px solid #e8eeec;
}

.product-row:hover {
  background: #fbfcfc;
}

.product-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-info strong {
  font-size: 13px;
  line-height: 1.35;
}

.product-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quantity-input {
  min-height: 38px;
  padding: 7px 9px;
  text-align: center;
  font-weight: 800;
}

.manual-review-field {
  margin-top: 24px;
  padding: 16px;
  border-left: 4px solid #c77600;
  border-radius: 9px;
  background: var(--warning-bg);
}

.manual-review-field textarea {
  background: #fffdf8;
}

.review-card {
  margin-bottom: 0;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.submit-note {
  margin: 0;
  font-weight: 700;
}

.submit-subnote {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 100ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--bell-green);
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  background: var(--bell-green-dark);
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: #384a46;
}

.button-small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.button-full {
  width: 100%;
}

.message {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.message-info {
  background: #eef6f5;
  color: var(--bell-green-dark);
}

.message-error {
  background: var(--error-bg);
  color: var(--error);
}

.success-panel {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #bcded2;
  border-radius: 11px;
  background: var(--success-bg);
}

.success-panel h3 {
  margin: 0 0 5px;
  color: var(--success);
  font-size: 21px;
}

.success-panel p {
  margin: 0;
}

.generated-files {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.generated-file {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
}

.generated-file span {
  color: var(--muted);
  font-size: 12px;
}

.manual-review-warning {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
  font-weight: 800;
}

.submission-reference {
  margin-top: 15px !important;
  color: var(--muted);
  font-size: 12px;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.05);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 34px;
  color: #6c7c78;
  font-size: 12px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(440px, calc(100% - 36px));
}

.login-card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-mark {
  margin-bottom: 20px;
}

.login-card h1 {
  margin: 6px 0 8px;
  font-size: 30px;
}

.login-copy {
  margin: 0 0 22px;
  color: var(--muted);
}

.login-card .button {
  margin-top: 18px;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    padding: 14px 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 21px;
  }

  .site-header h1 {
    font-size: 17px;
  }

  .page-shell {
    width: min(100% - 22px, 1220px);
    margin-top: 16px;
  }

  .intro-card,
  .form-card {
    padding: 19px;
    border-radius: 12px;
  }

  .section-heading,
  .section-heading-stack-mobile,
  .product-heading,
  .floor-toolbar,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    gap: 12px;
  }

  .floor-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .product-row {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 10px;
    padding-inline: 12px;
  }

  .generated-file {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .button-primary {
    width: 100%;
  }

  .site-footer {
    width: min(100% - 24px, 1220px);
  }
}


/* BPS portal brand refinement */
.brand-logo {
  display: block;
  width: 178px;
  height: auto;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.brand-block > h1 {
  margin: 0;
  white-space: nowrap;
}

.floor-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.login-logo {
  display: block;
  width: min(220px, 78%);
  height: auto;
  margin: 0 0 24px;
}

.login-card h1 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .brand-logo {
    width: 132px;
  }

  .brand-divider {
    height: 28px;
  }

  .brand-block > h1 {
    font-size: 16px;
  }

  .floor-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: 100%;
  }
}


/* Compact BPS ordering interface */
.future-order-details,
.section-number,
.section-note,
.status-pill,
.toggle-line small,
.product-heading p,
.submit-subnote {
  display: none !important;
}

.floor-heading {
  align-items: center;
}

.floor-toolbar {
  padding: 12px 14px;
  margin-bottom: 16px;
}

.product-heading {
  align-items: center;
  margin: 18px 0 12px;
}

.product-groups {
  gap: 12px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #e8eeec;
}

.product-row {
  grid-template-columns: minmax(0, 1fr) 70px;
  min-height: 58px;
  padding: 10px 12px;
  border-top: 0;
  background: #fff;
}

.product-row:hover {
  background: #f8faf9;
}

.product-info strong {
  font-size: 12px;
}

.product-meta {
  font-size: 10px;
  color: #52635f;
}

.quantity-input {
  width: 66px;
  min-height: 36px;
}

.manual-review-field {
  margin-top: 18px;
}

.order-history-card {
  margin-top: 22px;
}

.history-status {
  color: var(--muted);
  font-size: 13px;
}

.order-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.history-order {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.history-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-order-header > div {
  display: grid;
  gap: 2px;
}

.history-order-header span {
  color: var(--muted);
  font-size: 12px;
}

.history-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f1;
  color: #43524f !important;
  font-size: 11px !important;
  font-weight: 800;
  text-transform: capitalize;
}

.history-badge-completed {
  background: var(--success-bg);
  color: var(--success) !important;
}

.history-badge-failed {
  background: var(--error-bg);
  color: var(--error) !important;
}

.history-files {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1000px) {
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-list {
    grid-template-columns: 1fr;
  }
}

/* Order editing and file downloads */
.edit-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #b8d8cf;
  border-radius: 11px;
  background: #edf8f4;
  box-shadow: var(--shadow);
}

.edit-mode-banner > div {
  display: grid;
  gap: 2px;
}

.edit-mode-banner span {
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-mode-banner strong {
  font-size: 18px;
}

.edit-mode-banner small {
  color: var(--muted);
}

.generated-file {
  align-items: center;
}

.generated-file-info,
.history-file-info {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.generated-file-info span,
.history-file-info span {
  color: var(--muted);
  font-size: 12px;
}

.history-header-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px !important;
}

.history-files {
  gap: 8px;
  margin-top: 12px;
}

.history-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.download-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .edit-mode-banner,
  .history-order-header,
  .history-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .history-header-actions {
    justify-content: flex-start;
  }

  .download-button {
    width: 100%;
  }
}


.button-danger {
  border-color: #e6b8b8;
  background: #fff;
  color: #a42525;
}

.button-danger:hover:not(:disabled) {
  border-color: #a42525;
  background: #fff0f0;
}

.history-badge-archived {
  background: #f0f1f1;
  color: #5f6966 !important;
}

.history-other-products {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #c77600;
  border-radius: 7px;
  background: #fff6e7;
  color: #6e4a16;
  font-size: 12px;
}

.history-other-products strong {
  color: #6e4a16;
}

.history-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}


/* Order note and quantity input refinement */
.quantity-input {
  width: 82px;
  min-width: 82px;
  padding-left: 12px;
  padding-right: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quantity-input::placeholder {
  text-align: center;
}

.manual-review-field > span {
  font-weight: 700;
}


/* Centred header logo and native quantity spinner alignment */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.site-header .brand-block {
  grid-column: 2;
  justify-self: center;
}

.site-header #logoutButton {
  grid-column: 3;
  justify-self: end;
}

.brand-logo {
  width: 178px;
}

.quantity-input {
  width: 94px;
  min-width: 94px;
  box-sizing: border-box;
  padding-left: 26px;
  padding-right: 16px;
  text-align: center;
}

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

  .brand-logo {
    width: 132px;
  }

  .site-header #logoutButton {
    padding-inline: 10px;
  }

  .quantity-input {
    width: 88px;
    min-width: 88px;
    padding-left: 23px;
    padding-right: 14px;
  }
}


/* Fix quantity input overflow inside the three-column product grid */
.product-row {
  grid-template-columns: minmax(0, 1fr) 94px;
  column-gap: 12px;
}

.quantity-input {
  width: 94px;
  min-width: 94px;
  max-width: 94px;
  justify-self: end;
}

@media (max-width: 640px) {
  .product-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .quantity-input {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
  }
}


/* ================================================================
   Excel-style standard order form
   ================================================================ */
.page-shell {
  width: min(1540px, calc(100% - 32px));
}

.order-sheet-card {
  padding: clamp(18px, 2.5vw, 30px);
}

.sheet-heading {
  align-items: center;
}

.sheet-heading h1 {
  margin: 3px 0 0;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.15;
}

.sheet-kicker {
  margin: 0;
  color: var(--bell-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.excel-order-sheet {
  display: grid;
  gap: 18px;
}

.sheet-section {
  overflow: hidden;
  border: 1px solid #aeb9b5;
  border-radius: 3px;
  background: #fff;
}

.sheet-section-title {
  padding: 8px 10px;
  border-bottom: 1px solid #8d9995;
  background: #e7ecea;
  color: #16211f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-align: center;
  text-transform: uppercase;
}

.matrix-scroller,
.lower-table-scroller {
  overflow: auto;
  scrollbar-color: #aab6b2 #eef2f1;
  scrollbar-width: thin;
}

.excel-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 10px;
}

.excel-matrix th,
.excel-matrix td {
  width: 58px;
  min-width: 58px;
  height: 38px;
  padding: 3px;
  border-right: 1px solid #a9b2af;
  border-bottom: 1px solid #a9b2af;
  text-align: center;
  vertical-align: middle;
}

.excel-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8faf9;
  color: #1c2825;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

.excel-matrix thead tr:nth-child(2) th {
  top: 38px;
  background: #fff;
  font-weight: 700;
}

.excel-matrix .matrix-length-heading,
.excel-matrix .matrix-length-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 66px;
  min-width: 66px;
  background: #fff;
  font-weight: 800;
}

.excel-matrix .matrix-length-heading {
  z-index: 8;
  background: #f8faf9;
}

.sheet-quantity-cell {
  background: #fff;
}

.sheet-blocked-cell {
  background: #969696;
}

.quantity-input {
  display: block;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 29px;
  min-height: 29px;
  margin: 0 auto;
  padding: 2px 16px 2px 5px;
  border: 1px solid #b6c0bd;
  border-radius: 4px;
  background: #fff;
  color: #17211f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: none;
}

.quantity-input:focus {
  border-color: var(--bell-green);
  box-shadow: 0 0 0 2px rgba(0, 101, 87, 0.12);
}

.lower-sheet-grid {
  display: grid;
  grid-template-columns:
    minmax(210px, 0.8fr)
    minmax(260px, 1fr)
    minmax(430px, 1.55fr)
    minmax(250px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.lower-sheet-lane {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lower-sheet-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.lower-sheet-table th,
.lower-sheet-table td {
  height: 36px;
  padding: 4px 5px;
  border-right: 1px solid #a9b2af;
  border-bottom: 1px solid #a9b2af;
  text-align: center;
  vertical-align: middle;
}

.lower-sheet-table thead th {
  background: #f8faf9;
  font-size: 9px;
  font-weight: 800;
}

.lower-sheet-table tbody th {
  width: 48%;
  background: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.lower-sheet-table tbody th span,
.lower-sheet-table tbody th small {
  display: block;
}

.lower-sheet-table tbody th small {
  margin-top: 2px;
  color: #6b7773;
  font-size: 8px;
  font-weight: 500;
}

.lower-sheet-table .sheet-blocked-cell {
  background: #969696;
}

.order-note-field {
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #c9b27a;
  border-left: 4px solid #c77600;
  border-radius: 4px;
  background: #fff8e9;
}

.order-note-field textarea {
  min-height: 84px;
  border-radius: 4px;
}

.review-card {
  padding-block: 22px;
}

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

.mapping-warning {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid #8b6a13;
  border-radius: 6px;
  background: #fff8dc;
  color: #72540d;
  font-size: 12px;
  font-weight: 700;
}

.history-note-block,
.history-mapping-block {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 12px;
}

.history-note-block {
  display: grid;
  gap: 3px;
  border-left: 3px solid #c77600;
  background: #fff6e7;
  color: #6e4a16;
}

.history-mapping-block {
  border-left: 3px solid #8b6a13;
  background: #fff8dc;
  color: #604a0d;
}

.history-mapping-block summary {
  cursor: pointer;
  font-weight: 800;
}

.history-mapping-block span {
  display: block;
  margin-top: 4px;
}

@media (max-width: 1260px) {
  .lower-sheet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 16px, 1540px);
    margin-top: 16px;
  }

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

  .floor-tabs {
    width: 100%;
  }

  .floor-tab {
    flex: 1;
    justify-content: center;
  }

  .lower-sheet-grid {
    grid-template-columns: 1fr;
  }

  .excel-matrix th,
  .excel-matrix td {
    width: 55px;
    min-width: 55px;
  }
}


/* ================================================================
   Order-form usability refinement
   ================================================================ */

.draft-status {
  min-height: 16px;
  margin: 7px 0 0;
  color: #66736f;
  font-size: 11px;
  font-weight: 600;
}

.draft-status[data-status="saving"] {
  color: #8a6711;
}

.draft-status[data-status="saved"],
.draft-status[data-status="restored"] {
  color: var(--bell-green);
}

.draft-status[data-status="error"] {
  color: #a42525;
}

/* LENGTH and mm are intentionally separate rows, matching the form. */
.excel-matrix .matrix-length-heading,
.excel-matrix .matrix-unit-heading,
.excel-matrix .matrix-length-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 66px;
  min-width: 66px;
  font-weight: 800;
}

.excel-matrix .matrix-length-heading {
  top: 0;
  z-index: 9;
  background: #e7ecea;
}

.excel-matrix .matrix-unit-heading {
  top: 38px;
  z-index: 9;
  background: #fff;
}

.excel-matrix .matrix-length-cell {
  background: #fff;
}

/*
 * Every white cell is an available order position.
 * The inset outline makes that obvious even before a quantity is entered.
 */
.sheet-quantity-cell {
  background: #fbfffd;
  box-shadow: inset 0 0 0 1px #a7b5b0;
}

.sheet-quantity-cell:hover,
.sheet-quantity-cell:focus-within {
  background: #eef8f4;
  box-shadow: inset 0 0 0 2px #5f7e74;
}

.sheet-blocked-cell {
  background: #a3a6a5;
  box-shadow: none;
}

.quantity-input {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  height: 30px;
  min-height: 30px;
  padding: 2px 16px 2px 6px;
  border: 1.5px solid #6f817b;
  border-radius: 4px;
  background: #fff;
  color: #101816;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.quantity-input:hover {
  border-color: #3e6257;
}

.quantity-input:focus {
  border-color: var(--bell-green);
  box-shadow: 0 0 0 2px rgba(0, 101, 87, 0.16);
}

/*
 * Multi 4 and Multi 3 use grouped axis labels so 1350/1200 cannot
 * be mistaken for board thickness.
 */
.multi-board-table thead tr:first-child th {
  background: #e7ecea;
  font-size: 8px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.multi-board-table .multi-thickness-heading {
  width: 44%;
}

.multi-board-table .multi-width-heading {
  text-align: center;
}

.multi-board-table thead tr:nth-child(2) th {
  background: #fff;
  font-size: 9px;
}

.multi-board-table tbody th {
  font-weight: 700;
}

@media (max-width: 760px) {
  .draft-status {
    margin-bottom: 4px;
  }

  .quantity-input {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
  }
}


/* ================================================================
   Knauf PDF-inspired BPS order form redesign
   ================================================================ */
:root { --form-blue: #e8eefc; --form-header: #c6d0d6; --grid: #aeb9bf; }
.page-shell { width: min(1540px, calc(100% - 28px)); }
.order-card { padding: 26px; }
.form-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding-bottom:18px; border-bottom:1px solid #d6dfdc; }
.form-title-row h1 { margin:3px 0 0; font-size:34px; line-height:1.05; }
.form-eyebrow { margin:0; color:var(--bell-green); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.draft-status { margin:8px 0 0; color:#65716e; font-size:11px; font-weight:600; }
.draft-status[data-status="saving"]{color:#8a6711}.draft-status[data-status="saved"],.draft-status[data-status="restored"]{color:var(--bell-green)}.draft-status[data-status="error"]{color:#a42525}
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

.order-details-panel { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(360px,.9fr); gap:14px; margin:18px 0; border:1px solid var(--grid); background:#fff; }
.details-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-content:start; }
.compact-field { display:grid; grid-template-columns:112px minmax(0,1fr); align-items:stretch; min-height:42px; border-right:1px solid var(--grid); border-bottom:1px solid var(--grid); }
.compact-field>span { display:flex; align-items:center; padding:8px; background:#f0f3f5; color:#26312f; font-size:11px; font-weight:700; }
.compact-field input,.compact-field textarea { width:100%; min-width:0; border:0; border-left:1px solid var(--grid); border-radius:0; background:var(--form-blue); padding:9px 10px; font:600 12px/1.35 Inter,sans-serif; box-shadow:none; }
.compact-field textarea { resize:vertical; }
.compact-field input:focus,.compact-field textarea:focus { outline:2px solid var(--bell-green); outline-offset:-2px; }
.compact-field input[readonly] { color:#33423e; background:#eef2f1; }
.field-wide { grid-column:span 2; }
.field-full { grid-column:1/-1; }
.field-full>span { align-items:flex-start; padding-top:11px; }
.compact-field.is-optional>span::after { content:" (optional for pickup)"; margin-left:3px; color:#6b7774; font-size:9px; font-weight:500; }
.delivery-options { display:grid; grid-template-columns:1fr 1.55fr 1fr; align-content:start; }
.choice-panel { min-width:0; margin:0; padding:0; border:0; border-left:1px solid var(--grid); }
.choice-panel legend { width:100%; padding:8px 10px; border-bottom:1px solid var(--grid); background:var(--form-header); font-size:11px; font-weight:800; }
.choice-grid,.choice-list { display:grid; background:#fff; }
.choice-grid-five { grid-template-columns:repeat(5,1fr); }
.choice-list-two { grid-template-columns:1fr; }
.choice-panel label { display:flex; align-items:center; gap:7px; min-height:34px; padding:6px 8px; border-right:1px solid #d5dde0; border-bottom:1px solid #d5dde0; cursor:pointer; font-size:10px; font-weight:600; }
.choice-panel input { width:14px; height:14px; margin:0; accent-color:var(--bell-green); }

.pdf-order-sheet { display:grid; gap:12px; }
.product-top-layout { display:grid; grid-template-columns:minmax(900px,4fr) minmax(245px,1fr); gap:0; align-items:start; }
.product-lower-layout { display:grid; grid-template-columns:1.08fr 1.12fr .92fr; gap:0; align-items:start; }
.product-layout-column { min-width:0; }
.product-section { overflow:hidden; border:1px solid var(--grid); border-radius:0; background:#fff; }
.product-layout-column .product-section + .product-section { border-top:0; }
.product-section h3 { margin:0; padding:7px 8px; border-bottom:1px solid var(--grid); background:var(--form-header); color:#1e2927; font-size:10px; font-weight:800; letter-spacing:.015em; text-align:left; text-transform:uppercase; }
.main-board-section h3 { text-align:left; }
.product-section-body { min-width:0; }
.table-scroller { overflow:auto; scrollbar-width:thin; }
.product-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:9px; }
.product-table th,.product-table td { height:31px; padding:3px 4px; border-right:1px solid var(--grid); border-bottom:1px solid var(--grid); text-align:center; vertical-align:middle; }
.product-table thead th { background:#eef2f3; font-weight:800; }
.product-table tbody th { background:#fff; text-align:left; font-weight:700; }
.product-table tbody th span,.product-table tbody th small { display:block; }
.product-table tbody th small { color:#66736f; font-size:8px; font-weight:500; }
.main-board-table { width:max-content; min-width:100%; }
.main-board-table th,.main-board-table td { width:62px; min-width:62px; }
.main-board-table .sticky-left { position:sticky; left:0; z-index:4; width:60px; min-width:60px; background:#fff; }
.main-board-table thead .sticky-left { z-index:7; background:#eef2f3; }
.unit-heading { font-weight:700; }
.row-label { text-align:center!important; }
.quantity-cell { padding:0!important; background:var(--form-blue); }
.unavailable-cell { background:#fff; }
.quantity-input { display:block; width:100%; height:100%; min-height:30px; margin:0; padding:2px 14px 2px 5px; border:0!important; border-radius:0!important; background:transparent; color:#121a18; font-size:11px; font-weight:800; text-align:center; box-shadow:none!important; }
.quantity-input:focus { outline:2px solid var(--bell-green); outline-offset:-2px; background:#fff; }
.quantity-input:hover { background:rgba(255,255,255,.45); }
.specialty-stack { min-width:0; }
.specialty-section + .specialty-section { border-top:0; }
.specialty-row,.list-product-row { display:grid; grid-template-columns:minmax(0,1fr) 62px; align-items:stretch; min-height:38px; border-bottom:1px solid var(--grid); }
.specialty-row>div:first-child,.list-product-row>div:first-child { display:flex; flex-direction:column; justify-content:center; padding:5px 7px; }
.specialty-row strong,.list-product-row strong { font-size:9px; }
.specialty-row span,.list-product-row span { margin-top:2px; color:#5e6b67; font-size:8px; }
.standalone-quantity { border-left:1px solid var(--grid); background:var(--form-blue); }
.standalone-quantity .quantity-input { min-height:38px; }
.compact-table th:first-child { width:52%; }
.compact-table .quantity-cell { width:58px; }
.nested-section { border:0; }
.nested-section h3 { background:#eef2f3; }
.acoustic-format { display:flex; align-items:center; gap:14px; margin:0; padding:7px 8px; border:0; border-bottom:1px solid var(--grid); }
.acoustic-format legend { float:left; margin-right:auto; font-size:9px; font-weight:800; }
.acoustic-format label { display:flex; gap:5px; align-items:center; font-size:9px; font-weight:700; }
.other-materials-header,.other-material-row { display:grid; grid-template-columns:minmax(0,1fr) 66px; }
.other-materials-header { background:#eef2f3; border-bottom:1px solid var(--grid); font-size:9px; font-weight:800; }
.other-materials-header span { padding:6px; }
.other-materials-header span+span { border-left:1px solid var(--grid); text-align:center; }
.other-material-row { min-height:34px; border-bottom:1px solid var(--grid); }
.other-material-row input { width:100%; min-width:0; border:0; border-radius:0; background:var(--form-blue); padding:6px; font:600 10px Inter,sans-serif; box-shadow:none; }
.other-material-row input+input { border-left:1px solid var(--grid); text-align:center; }
.other-material-row input:focus { outline:2px solid var(--bell-green); outline-offset:-2px; background:#fff; }
.review-card { padding-block:20px; }
.history-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-top:10px; }
.history-detail-grid>div { display:grid; gap:2px; padding:8px 10px; border:1px solid #d8e0dd; border-radius:6px; background:#f7f9f8; }
.history-detail-grid span { color:#697572; font-size:10px; font-weight:700; text-transform:uppercase; }
.history-detail-grid strong { font-size:12px; }

@media(max-width:1200px){.order-details-panel{grid-template-columns:1fr}.delivery-options{border-top:1px solid var(--grid)}.product-top-layout{grid-template-columns:1fr}.specialty-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.product-lower-layout{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.page-shell{width:calc(100% - 12px)}.order-card{padding:12px}.form-title-row{flex-direction:column}.floor-tabs{width:100%}.floor-tab{flex:1;justify-content:center}.details-fields{grid-template-columns:1fr}.compact-field,.field-wide,.field-full{grid-column:1}.delivery-options{grid-template-columns:1fr}.choice-panel{border-left:0}.product-lower-layout,.specialty-stack{grid-template-columns:1fr}.history-detail-grid{grid-template-columns:1fr}}


/* Searchable Accrivia catalogue for Other Materials */
.searchable-materials-section .product-section-body {
  padding: 12px;
  background: #f8fafc;
}

.other-materials-intro {
  margin: 0 0 10px;
  color: #5d6966;
  font-size: 11px;
  line-height: 1.45;
}

.catalogue-picker {
  position: relative;
  z-index: 20;
}

.catalogue-search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #879993;
  border-radius: 5px;
  background: #fff;
  color: #17211f;
  font: 600 13px Inter, sans-serif;
}

.catalogue-search-input:focus {
  border-color: #006557;
  outline: 2px solid rgba(0, 101, 87, .16);
  outline-offset: 0;
}

.catalogue-search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #9eaaa7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 52, 46, .18);
}

.catalogue-result {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e1e7e5;
  border-radius: 0;
  background: #fff;
  color: #17211f;
  text-align: left;
  cursor: pointer;
}

.catalogue-result:last-child { border-bottom: 0; }
.catalogue-result:hover,
.catalogue-result.is-active { background: #edf7f3; }
.catalogue-result strong { color: #006557; font-size: 12px; }
.catalogue-result span { overflow-wrap: anywhere; font-size: 11px; }
.catalogue-no-results { padding: 13px; color: #65716e; font-size: 12px; }

.selected-materials {
  margin-top: 11px;
  border: 1px solid #b3bfbb;
  border-radius: 5px;
  background: #fff;
}

.selected-materials-empty {
  padding: 13px;
  color: #6b7673;
  font-size: 11px;
}

.selected-materials-header,
.selected-material-row {
  display: grid;
  grid-template-columns: minmax(82px, .7fr) minmax(190px, 2.2fr) 62px 66px;
  align-items: center;
  gap: 8px;
}

.selected-materials-header {
  padding: 7px 9px;
  border-bottom: 1px solid #b3bfbb;
  background: #dfe7eb;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.selected-material-row {
  padding: 8px 9px;
  border-bottom: 1px solid #e0e6e4;
  font-size: 11px;
}

.selected-material-row:last-child { border-bottom: 0; }
.selected-material-row > strong { color: #006557; overflow-wrap: anywhere; }
.selected-material-description { overflow-wrap: anywhere; line-height: 1.35; }
.selected-material-row .other-material-quantity {
  width: 58px;
  min-height: 32px;
  padding: 4px 14px 4px 5px;
  border: 1px solid #7f918b;
  border-radius: 4px;
  text-align: center;
  font: 700 12px Inter, sans-serif;
}

.remove-material-button {
  padding: 6px 7px;
  border: 1px solid #d7a5a5;
  border-radius: 4px;
  background: #fff;
  color: #9d2929;
  font: 700 10px Inter, sans-serif;
  cursor: pointer;
}
.remove-material-button:hover { background: #fff1f1; }

@media (max-width: 700px) {
  .selected-materials-header { display: none; }
  .selected-material-row {
    grid-template-columns: 1fr 62px;
  }
  .selected-material-description { grid-column: 1 / -1; grid-row: 2; }
  .remove-material-button { grid-column: 1 / -1; width: fit-content; }
}


/* ================================================================
   KIOSK INTERFACE — Bell Plaster
   Primary: Maroon #A62B45
   Complementary: Green #006557
   ================================================================ */

:root {
  --brand-maroon: #A62B45;
  --brand-maroon-dark: #842038;
  --brand-maroon-soft: #F8ECEF;
  --brand-green: #006557;
  --brand-green-dark: #004E44;
  --brand-green-soft: #EAF5F2;
  --kiosk-bg: #F3F5F4;
  --kiosk-surface: #FFFFFF;
  --kiosk-text: #171A19;
  --kiosk-muted: #68726F;
  --kiosk-line: #DDE3E1;
  --kiosk-line-dark: #C7D0CD;
  --kiosk-danger: #B4232D;
  --kiosk-radius: 18px;
  --kiosk-shadow: 0 18px 45px rgba(23, 35, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.kiosk-body {
  margin: 0;
  overflow: hidden;
  background: var(--kiosk-bg);
  color: var(--kiosk-text);
  font-family: "Inter", sans-serif;
}

.kiosk-header {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--kiosk-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
}

.kiosk-logo {
  grid-column: 2;
  width: 154px;
  height: auto;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-left {
  justify-self: start;
}

.header-right {
  justify-self: end;
}

.header-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--kiosk-line);
  border-radius: 11px;
  background: #fff;
  color: var(--kiosk-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.header-action:hover {
  border-color: var(--brand-maroon);
  color: var(--brand-maroon);
  transform: translateY(-1px);
}

.header-action-icon {
  font-size: 17px;
}

.header-save-status {
  max-width: 190px;
  margin: 0;
  overflow: hidden;
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-nav {
  position: relative;
  z-index: 70;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--kiosk-line);
  background: #fff;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: #87908D;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.journey-step strong,
.journey-step small {
  display: block;
}

.journey-step strong {
  font-size: 13px;
  line-height: 1.25;
}

.journey-step small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
}

.journey-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 50%;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.journey-step.is-active {
  color: var(--brand-maroon);
}

.journey-step.is-active .journey-number {
  border-color: var(--brand-maroon);
  background: var(--brand-maroon);
  color: #fff;
  box-shadow: 0 8px 18px rgba(166, 43, 69, 0.22);
}

.journey-step.is-complete {
  color: var(--brand-green);
}

.journey-step.is-complete .journey-number {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
  color: var(--brand-green);
}

.journey-connector {
  width: 90px;
  height: 1px;
  background: var(--kiosk-line);
}

.kiosk-message {
  position: fixed;
  z-index: 200;
  top: 162px;
  left: 50%;
  width: min(560px, calc(100% - 32px));
  padding: 13px 16px;
  border: 1px solid var(--kiosk-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--kiosk-shadow);
  color: var(--kiosk-text);
  font-size: 13px;
  font-weight: 700;
  transform: translateX(-50%);
}

.kiosk-message.message-error {
  border-color: #F2B8BE;
  background: #FFF4F5;
  color: #9E1D29;
}

.kiosk-message.message-info {
  border-color: #B8D6CF;
  background: #F0F8F6;
  color: var(--brand-green);
}

.kiosk-main {
  height: calc(100vh - 148px);
  overflow: hidden;
}

#orderForm,
.kiosk-step-panel {
  height: 100%;
}

.kiosk-step-panel[hidden] {
  display: none !important;
}

.kiosk-step-panel.is-active {
  display: block;
}

.kiosk-edit-banner {
  position: fixed;
  z-index: 95;
  right: 28px;
  bottom: 24px;
  width: min(430px, calc(100vw - 56px));
  margin: 0;
  box-shadow: var(--kiosk-shadow);
}

/* DETAILS */

.details-stage,
.review-stage {
  height: 100%;
  overflow-y: auto;
  padding: 34px clamp(24px, 5vw, 78px) 44px;
}

.stage-intro {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}

.stage-eyebrow {
  margin: 0 0 8px;
  color: var(--brand-maroon);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-intro h1 {
  margin: 0;
  color: var(--kiosk-text);
  font-size: clamp(31px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.stage-intro > p:last-child {
  margin: 12px 0 0;
  color: var(--kiosk-muted);
  font-size: 15px;
}

.details-layout {
  width: min(1050px, 100%);
  margin: 0 auto;
}

.details-card {
  border: 1px solid var(--kiosk-line);
  border-radius: var(--kiosk-radius);
  background: var(--kiosk-surface);
  box-shadow: var(--kiosk-shadow);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
  padding: 16px 19px;
}

.account-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-maroon);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.account-card span,
.account-card strong,
.account-card small {
  display: block;
}

.account-card span {
  color: var(--kiosk-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-card strong {
  margin-top: 3px;
  font-size: 15px;
}

.account-card small {
  margin-top: 3px;
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 700;
}

.delivery-card {
  padding: 24px;
}

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

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

.kiosk-field > span {
  color: #4D5754;
  font-size: 11px;
  font-weight: 750;
}

.kiosk-field input,
.kiosk-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 11px;
  background: #fff;
  color: var(--kiosk-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: 150ms ease;
}

.kiosk-field textarea {
  resize: vertical;
}

.kiosk-field input:focus,
.kiosk-field textarea:focus {
  border-color: var(--brand-maroon);
  box-shadow: 0 0 0 3px rgba(166, 43, 69, 0.11);
}

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

.delivery-choice-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.kiosk-choice-card {
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--kiosk-line);
  border-radius: 14px;
  background: #FAFBFB;
}

.kiosk-choice-card legend {
  padding: 0 5px;
  color: #4D5754;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.segmented-options,
.tile-options,
.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.kiosk-choice-card label {
  cursor: pointer;
}

.kiosk-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kiosk-choice-card label span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 9px;
  background: #fff;
  color: #4B5552;
  font-size: 11px;
  font-weight: 700;
  transition: 140ms ease;
}

.segmented-options label {
  flex: 1;
}

.tile-options label {
  flex: 1 1 calc(50% - 5px);
}

.chip-options label {
  flex: 1 1 auto;
}

.kiosk-choice-card input:checked + span {
  border-color: var(--brand-maroon);
  background: var(--brand-maroon);
  color: #fff;
  box-shadow: 0 6px 15px rgba(166, 43, 69, 0.18);
}

.stage-actions {
  display: flex;
  width: min(1050px, 100%);
  margin: 22px auto 0;
  align-items: center;
  justify-content: space-between;
}

.stage-actions-end {
  justify-content: flex-end;
}

.button.button-primary {
  border-color: var(--brand-maroon);
  background: var(--brand-maroon);
}

.button.button-primary:hover {
  border-color: var(--brand-maroon-dark);
  background: var(--brand-maroon-dark);
}

.button-large {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 12px;
  font-size: 13px;
}

/* PRODUCTS */

.product-stage {
  background: #EEF2F0;
}

.product-stage-topbar {
  position: relative;
  z-index: 35;
  display: grid;
  grid-template-columns: auto minmax(320px, 620px);
  height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--kiosk-line);
  background: #fff;
}

.adding-to-control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.adding-to-control > span {
  color: var(--kiosk-muted);
  font-size: 11px;
  font-weight: 700;
}

.kiosk-floor-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #F0F2F1;
}

.kiosk-floor-tabs .floor-tab {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #66706D;
  font-size: 12px;
  font-weight: 750;
}

.kiosk-floor-tabs .floor-tab.is-active {
  background: var(--brand-maroon);
  color: #fff;
  box-shadow: 0 6px 15px rgba(166, 43, 69, 0.19);
}

.kiosk-floor-tabs .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.global-product-search {
  position: relative;
}

.global-product-search .search-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  color: var(--brand-maroon);
  font-size: 21px;
  transform: translateY(-50%);
}

#globalProductSearch {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 44px;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 14px;
  background: #F8FAF9;
  color: var(--kiosk-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: 150ms ease;
}

#globalProductSearch:focus {
  border-color: var(--brand-maroon);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(166, 43, 69, 0.1);
}

.global-search-results {
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(480px, 58vh);
  border: 1px solid var(--kiosk-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 55px rgba(22, 30, 27, 0.2);
}

.global-search-results .catalogue-result {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 46px;
  min-height: 62px;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #EEF1F0;
  background: #fff;
  text-align: left;
}

.global-search-results .catalogue-result:first-child {
  border-radius: 15px 15px 0 0;
}

.global-search-results .catalogue-result:last-child {
  border-bottom: 0;
  border-radius: 0 0 15px 15px;
}

.global-search-results .catalogue-result strong {
  color: var(--brand-maroon);
  font-size: 12px;
}

.global-search-results .catalogue-result span {
  overflow: hidden;
  color: #303835;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-results .catalogue-result em {
  color: var(--brand-green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.global-search-results .catalogue-result.is-active,
.global-search-results .catalogue-result:hover {
  background: var(--brand-maroon-soft);
}

.product-stage-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 350px;
  height: calc(100% - 74px);
  min-height: 0;
}

.category-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding: 20px 12px;
  border-right: 1px solid var(--kiosk-line);
  background: #fff;
}

.category-rail-heading {
  padding: 0 10px 12px;
}

.category-rail-heading span,
.category-rail-heading small {
  display: block;
}

.category-rail-heading span {
  font-size: 14px;
  font-weight: 800;
}

.category-rail-heading small {
  margin-top: 3px;
  color: var(--kiosk-muted);
  font-size: 10px;
}

.category-button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #505A57;
  font: inherit;
  font-size: 11px;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
  transition: 140ms ease;
}

.category-button:hover {
  background: #F5F7F6;
  color: var(--kiosk-text);
}

.category-button.is-active {
  background: var(--brand-maroon-soft);
  color: var(--brand-maroon);
}

.category-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #F1F3F2;
  font-size: 14px;
}

.category-button.is-active .category-icon {
  background: var(--brand-maroon);
  color: #fff;
}

.category-search-button {
  margin-top: 7px;
  border: 1px solid rgba(0, 101, 87, 0.14);
  background: var(--brand-green-soft);
  color: var(--brand-green);
}

.category-search-button .category-icon {
  background: var(--brand-green);
  color: #fff;
}

.category-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-green);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.product-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 66px minmax(0, 1fr);
  border-right: 1px solid var(--kiosk-line);
  background: #F7F9F8;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--kiosk-line);
  background: rgba(255, 255, 255, 0.88);
}

.workspace-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.workspace-header p {
  margin: 3px 0 0;
  color: var(--kiosk-muted);
  font-size: 10px;
}

.workspace-floor-label {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--brand-green-soft);
  color: var(--brand-green);
  font-size: 10px;
  font-weight: 800;
}

.product-workspace .floor-panel {
  min-height: 0;
  overflow: hidden;
}

.category-product-canvas {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.category-panel[hidden] {
  display: none !important;
}

.category-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.category-content-boards {
  display: grid;
  gap: 14px;
}

.product-section {
  overflow: hidden;
  border: 1px solid var(--kiosk-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 35, 31, 0.04);
}

.product-section > h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--kiosk-line);
  background: #F6F8F7;
  color: #26302D;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-section-body {
  min-width: 0;
}

.product-top-layout,
.product-lower-layout {
  display: contents;
}

.main-board-section {
  grid-column: 1 / -1;
}

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

.specialty-stack .product-section {
  min-width: 0;
}

/* One visual border per quantity cell */
.product-table {
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  border: 1px solid #D5DCDA;
}

.quantity-cell {
  min-width: 48px;
  height: 42px;
  padding: 0 !important;
  background: #F1F4FF;
  transition: 120ms ease;
}

.quantity-cell:focus-within {
  position: relative;
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--brand-maroon);
}

.quantity-cell .quantity-input {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 41px !important;
  min-height: 41px !important;
  margin: 0 !important;
  padding: 0 13px 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #23302C;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.quantity-cell .quantity-input.has-value {
  background: var(--brand-maroon-soft) !important;
  color: var(--brand-maroon);
}

.standalone-quantity .quantity-input {
  min-height: 40px;
  border-color: var(--kiosk-line-dark);
}

.unavailable-cell {
  background: #A7ADAB !important;
}

.current-order-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff;
}

.current-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 17px 14px;
  border-bottom: 1px solid var(--kiosk-line);
}

.current-order-header span,
.current-order-header strong {
  display: block;
}

.current-order-header span {
  color: var(--kiosk-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.current-order-header strong {
  margin-top: 3px;
  font-size: 16px;
}

.text-button {
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--brand-maroon);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.current-order-list {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.basket-empty {
  display: grid;
  min-height: 240px;
  place-content: center;
  padding: 25px;
  text-align: center;
}

.basket-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 15px;
  background: var(--brand-maroon-soft);
  color: var(--brand-maroon);
  font-size: 24px;
}

.basket-empty strong {
  font-size: 14px;
}

.basket-empty p {
  max-width: 190px;
  margin: 7px auto 0;
  color: var(--kiosk-muted);
  font-size: 11px;
  line-height: 1.45;
}

.basket-floor-group {
  margin-bottom: 15px;
}

.basket-floor-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 8px;
  color: var(--kiosk-muted);
  font-size: 10px;
}

.basket-floor-group > header strong {
  color: var(--brand-green);
  font-size: 11px;
}

.basket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid var(--kiosk-line);
  border-radius: 11px;
  background: #fff;
}

.basket-line-info {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.basket-line-info strong,
.basket-line-info span {
  display: block;
}

.basket-line-info strong {
  overflow: hidden;
  color: #222A28;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.basket-line-info span {
  margin-top: 3px;
  color: var(--kiosk-muted);
  font-size: 8px;
  font-weight: 650;
}

.basket-line-controls {
  display: grid;
  grid-template-columns: 26px 42px 26px;
  align-items: center;
  align-self: center;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 9px;
  overflow: hidden;
}

.basket-line-controls button,
.basket-line-controls input {
  width: 100%;
  height: 30px;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--kiosk-text);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.basket-line-controls button {
  color: var(--brand-maroon);
  cursor: pointer;
}

.basket-line-controls input {
  border-right: 1px solid var(--kiosk-line);
  border-left: 1px solid var(--kiosk-line);
  -moz-appearance: textfield;
}

.basket-line-controls input::-webkit-inner-spin-button,
.basket-line-controls input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.current-order-footer {
  padding: 14px;
  border-top: 1px solid var(--kiosk-line);
  background: #FBFCFC;
}

.basket-totals {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  color: var(--kiosk-muted);
  font-size: 9px;
}

.basket-totals strong {
  color: var(--kiosk-text);
}

.current-order-footer .button {
  width: 100%;
}

/* Search additions table */
.selected-materials {
  padding: 12px;
}

.selected-materials-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  color: var(--kiosk-muted);
  font-size: 12px;
  text-align: center;
}

.selected-materials-header,
.selected-material-row {
  grid-template-columns: 100px minmax(0, 1fr) 76px 64px;
}

.selected-material-row {
  border-radius: 9px;
}

.other-materials-intro {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--kiosk-line);
  color: var(--kiosk-muted);
}

/* REVIEW */

.review-stage {
  padding-bottom: 70px;
}

.review-intro {
  margin-bottom: 22px;
}

.review-layout {
  display: grid;
  width: min(1000px, 100%);
  margin: 0 auto;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 16px;
  align-items: start;
}

.review-summary-card {
  overflow: hidden;
  border: 1px solid var(--kiosk-line);
  border-radius: var(--kiosk-radius);
  background: #fff;
  box-shadow: var(--kiosk-shadow);
}

.review-summary-card > header {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--kiosk-line);
}

.review-summary-card h2 {
  margin: 0;
  font-size: 16px;
}

.review-details-grid {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.review-details-grid > div span,
.review-details-grid > div strong {
  display: block;
}

.review-details-grid > div span {
  color: var(--kiosk-muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.review-details-grid > div strong {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.review-order-lines {
  max-height: 440px;
  overflow-y: auto;
  padding: 12px;
}

.review-floor-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 5px;
  color: var(--brand-green);
  font-size: 11px;
}

.review-product-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 8px;
  border-bottom: 1px solid #EEF1F0;
}

.review-product-line > div {
  min-width: 0;
}

.review-product-line > div strong,
.review-product-line > div span {
  display: block;
}

.review-product-line > div strong {
  font-size: 11px;
}

.review-product-line > div span {
  margin-top: 2px;
  color: var(--kiosk-muted);
  font-size: 9px;
}

.review-product-line > strong {
  flex: 0 0 auto;
  color: var(--brand-maroon);
  font-size: 12px;
}

.review-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-top: 1px solid var(--kiosk-line);
  background: #F8FAF9;
  font-size: 11px;
}

.review-total strong {
  color: var(--brand-green);
}

.review-actions {
  width: min(1000px, 100%);
}

.kiosk-success-panel {
  width: min(720px, 100%);
  margin: 24px auto 0;
  padding: 28px;
  border: 1px solid #B9D9D1;
  border-radius: var(--kiosk-radius);
  background: #F0F8F6;
  text-align: center;
}

.success-check {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 27px;
  font-weight: 800;
}

/* HISTORY DRAWER */

.drawer-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  background: rgba(15, 20, 18, 0.35);
  opacity: 0;
  transition: opacity 200ms ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
}

.history-drawer {
  position: fixed;
  z-index: 160;
  top: 0;
  right: 0;
  width: min(620px, 94vw);
  height: 100vh;
  padding: 0;
  overflow: hidden;
  border-left: 1px solid var(--kiosk-line);
  background: #F5F7F6;
  box-shadow: -22px 0 55px rgba(20, 27, 24, 0.16);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.history-drawer.is-open {
  transform: translateX(0);
}

.history-drawer-header {
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--kiosk-line);
  background: #fff;
}

.history-drawer-header span {
  color: var(--brand-maroon);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-drawer-header h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.drawer-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--kiosk-line);
  border-radius: 11px;
  background: #fff;
  color: var(--kiosk-text);
  font-size: 24px;
  cursor: pointer;
}

.history-drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
}

.history-drawer-list {
  height: calc(100vh - 134px);
  overflow-y: auto;
  padding: 0 16px 30px;
}

.history-order {
  border-radius: 14px;
}

/* RESPONSIVE */

@media (max-width: 1180px) {
  .product-stage-grid {
    grid-template-columns: 158px minmax(0, 1fr) 300px;
  }

  .category-button {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding-inline: 7px;
    font-size: 10px;
  }

  .current-order-panel {
    font-size: 92%;
  }

  .delivery-choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kiosk-choice-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  body.kiosk-body {
    overflow: auto;
  }

  .kiosk-main {
    height: auto;
    overflow: visible;
  }

  #orderForm,
  .kiosk-step-panel {
    height: auto;
  }

  .product-stage-grid {
    display: block;
    height: auto;
  }

  .category-rail {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--kiosk-line);
  }

  .category-rail-heading {
    display: none;
  }

  .category-button {
    grid-template-columns: 24px auto;
    min-width: max-content;
  }

  .category-count {
    display: none;
  }

  .product-workspace {
    min-height: 620px;
    border-right: 0;
  }

  .current-order-panel {
    min-height: 540px;
    border-top: 1px solid var(--kiosk-line);
  }

  .product-stage-topbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .adding-to-control {
    justify-content: space-between;
  }

  .review-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .kiosk-header {
    height: 64px;
    padding-inline: 12px;
  }

  .kiosk-logo {
    width: 126px;
  }

  .header-save-status,
  .header-action-icon {
    display: none;
  }

  .header-action {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .journey-nav {
    height: 64px;
  }

  .journey-step {
    gap: 5px;
    padding-inline: 5px;
  }

  .journey-step small {
    display: none;
  }

  .journey-number {
    width: 27px;
    height: 27px;
  }

  .journey-connector {
    width: 20px;
  }

  .kiosk-main {
    min-height: calc(100vh - 128px);
  }

  .details-stage,
  .review-stage {
    padding: 22px 12px 36px;
  }

  .stage-intro {
    text-align: left;
  }

  .stage-intro h1 {
    font-size: 32px;
  }

  .details-grid,
  .delivery-choice-grid,
  .category-content {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .kiosk-choice-card:last-child {
    grid-column: auto;
  }

  .delivery-card {
    padding: 16px;
  }

  .product-stage-topbar {
    padding: 10px;
  }

  .adding-to-control {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .kiosk-floor-tabs .floor-tab {
    flex: 1;
  }

  .specialty-stack {
    grid-template-columns: 1fr;
  }

  .category-product-canvas {
    padding: 10px;
  }

  .selected-materials-header {
    display: none;
  }

  .selected-material-row {
    grid-template-columns: 1fr 78px;
  }

  .selected-material-row > strong,
  .selected-material-description {
    grid-column: 1;
  }

  .selected-material-row .other-material-quantity,
  .selected-material-row .remove-material-button {
    grid-column: 2;
  }
}


/* ================================================================
   DELIVERY DETAILS REFINEMENT
   ================================================================ */

/* First and review screens now use normal page scrolling.
   This removes the clipped lower section seen on shorter screens. */
body.kiosk-body {
  overflow-y: auto;
  overflow-x: hidden;
}

.kiosk-header {
  position: sticky;
  top: 0;
}

.journey-nav {
  position: sticky;
  top: 72px;
}

.kiosk-main {
  min-height: calc(100vh - 148px);
  height: auto;
  overflow: visible;
}

#orderForm,
.kiosk-step-panel {
  min-height: calc(100vh - 148px);
  height: auto;
}

.details-stage,
.review-stage {
  min-height: calc(100vh - 148px);
  height: auto;
  overflow: visible;
  padding-bottom: 72px;
}

.product-stage.is-active {
  height: calc(100vh - 148px);
  min-height: 640px;
  overflow: hidden;
}

.kiosk-field > label,
.kiosk-field > span {
  color: #4D5754;
  font-size: 11px;
  font-weight: 750;
}

.kiosk-field.has-error input,
.kiosk-field.has-error textarea,
.kiosk-field.has-error .date-entry,
.kiosk-field.has-error .address-autocomplete-mount {
  border-color: #C73542 !important;
}

.kiosk-field.has-error input:focus,
.kiosk-field.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(199, 53, 66, 0.11);
}

.field-help {
  color: var(--kiosk-muted);
  font-size: 10px;
  line-height: 1.4;
}

.field-error {
  margin: 0;
  color: #A31F2B;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.field-warning {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #EBC98C;
  border-radius: 10px;
  background: #FFF8EA;
  color: #774800;
  font-size: 10px;
  line-height: 1.45;
}

.field-warning[hidden] {
  display: none;
}

.warning-confirmation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  cursor: pointer;
}

.warning-confirmation input {
  width: 17px !important;
  min-height: 17px !important;
  height: 17px;
  accent-color: var(--brand-maroon);
}

.date-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 11px;
  background: #fff;
  transition: 150ms ease;
}

.date-entry:focus-within {
  border-color: var(--brand-maroon);
  box-shadow: 0 0 0 3px rgba(166, 43, 69, 0.11);
}

.date-entry #requiredDate {
  min-height: 46px;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.date-picker-button {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--kiosk-line);
  background: #F8FAF9;
  color: var(--brand-maroon);
  font-size: 17px;
}

.date-picker-button:hover {
  background: var(--brand-maroon-soft);
}

.native-date-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.delivery-address-field {
  position: relative;
}

.address-entry-area {
  display: grid;
  gap: 10px;
}

.address-autocomplete-mount {
  min-height: 50px;
  border: 1px solid var(--kiosk-line-dark);
  border-radius: 11px;
  background: #fff;
}

.address-autocomplete-mount:focus-within {
  border-color: var(--brand-maroon);
  box-shadow: 0 0 0 3px rgba(166, 43, 69, 0.11);
}

.address-autocomplete-mount gmp-place-autocomplete {
  display: block;
  width: 100%;
  min-height: 48px;
  border-radius: 11px;
  color-scheme: light;
}

#deliveryAddressManual[hidden],
#addressAutocompleteMount[hidden] {
  display: none;
}

.address-selected-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #B8D6CF;
  border-radius: 11px;
  background: #F0F8F6;
}

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

.address-selected-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.address-selected-summary small,
.address-selected-summary strong {
  display: block;
}

.address-selected-summary small {
  color: var(--brand-green);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.address-selected-summary strong {
  margin-top: 3px;
  color: #25302D;
  font-size: 11px;
  line-height: 1.45;
}

.address-field-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.inline-link-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-maroon);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.inline-link-button:disabled {
  color: var(--kiosk-muted);
}

.address-search-status {
  margin: 0;
  color: var(--brand-green);
  font-size: 10px;
  font-weight: 650;
}

.delivery-address-field.is-pickup .address-entry-area {
  opacity: 0.48;
  pointer-events: none;
}

.delivery-address-field.is-pickup .address-field-footer {
  opacity: 0.6;
}

@media (max-width: 920px) {
  .kiosk-header {
    top: 0;
  }

  .journey-nav {
    top: 72px;
  }

  .product-stage.is-active {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .journey-nav {
    top: 64px;
  }

  .address-field-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}


/* ================================================================
   MOBILE-ONLY CONTACT + DATE WARNING LAYOUT FIX
   ================================================================ */

/* Grid items must keep their natural height. Without this, the order-date
   field stretches to match the required-date warning beside it. */
.details-grid {
  align-items: start;
}

.details-grid > .kiosk-field {
  align-self: start;
  min-height: 0;
}

.details-grid > .kiosk-field > input,
.details-grid > .kiosk-field > textarea,
.details-grid > .kiosk-field > .date-entry {
  align-self: start;
}

/* Keep the six-month warning compact rather than changing the whole row. */
#requiredDateWarning {
  gap: 7px;
  padding: 9px 11px;
}

#requiredDateWarning .warning-confirmation {
  min-height: 20px;
}

#requiredDateWarning .warning-confirmation input {
  margin: 0;
}

/* Descriptive helper copy was removed from the first screen. */
#addressSearchStatus[hidden] {
  display: none !important;
}
