@charset "utf-8";
/* New template CSS Document */

html,
body {
  height: 100%;
}

body {
  overflow-y: auto;
}

body {
  padding: 0;
  margin: 0;
  font-family: Helvetica, "sans-serif";
  font-size: 62.5%;

  background-image: url("../media/AdobeStock_330944103.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#wrapper {
  height: auto;
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
}

header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

header img {
  margin-right: 20px;
  padding: 0;
  display: block;
  max-height: 300px;
  max-width: 225px;
  object-fit: contain;
}

nav {
  height: 40px;
  background-color: rgba(65, 153, 192, 0.5);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  margin-left: 20px;
}

nav p {
  font-size: 2em;
  color: #1a3a5f;
  text-align: right;
  line-height: 30px;
}

nav p a {
  text-decoration: none;
  padding: 0 20px;
  margin: 0 10px;
  transition: color 0.3s;
  color: #1a3a5f;
}

nav p a:hover {
  color: #13304a;
}

.user-menu {
  position: absolute;
  top: 10px;
  right: 20px;
  text-align: center;
}

.user-initials {
  background-color: #4199c0;
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.user-initials:hover {
  background-color: #6da06e;
}

.logout-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.logout-menu a {
  display: block;
  padding: 5px 10px;
  color: #333;
  text-decoration: none;
}

.logout-menu a:hover {
  background-color: #f0f0f0;
}

main {
  height: auto; /*let it expand */
  width: 100%; /*be responsive*/
  margin: 0 auto;
  background-color: rgba(65, 153, 192, 0.5);
  display: block; /*avoidside-by-side suprises*/
}

main h1 {
  font-size: 30px;
  color: #1a3a5f;
  margin: auto;
}

footer {
  height: 80px;
  width: 1900px;
  margin: 0 auto;
  padding: 5px 0 0 10px;
  clear: both;
}

footer p {
  color: white;
  font-size: 1.2em;
  line-height: 145%;
}

.login-page {
  background-image: url("../media/AdobeStock_319188064.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-wrapper {
  max-width: 400px;
  margin: 100px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #1a3a5f;
}

.login-form input {
  width: 95%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.login-form button {
  width: 100%;
  padding: 10px;
  background-color: #4199c0;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-form button:hover {
  background-color: #2e7ba8;
}

.forgot-password {
  display: block;
  margin-top: 10px;
  color: #1a3a5f;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

.select-message {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.select-message h1 {
  font-size: 100px;
  color: #b7bdc4;
  font-weight: bold;
}

.select-message h2 {
  font-size: 2rem;
  color: #1a3a5f;
  font-weight: bold;
}

.quotes-container /* center children horizontally */ {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}

.quotes-container > section /* keep others full width */ {
  width: 100%;
}

#basic-info-section /* center + constrain form */ {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* Generic grid for any image selection section */
.choice-grid {
  display: none; /* start hidden; JS sets to flex when needed */
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Each clickable tile */
.choice-grid .choice {
  flex: 0 1 320px;
  text-align: center;
}

/* Radio is visually hidden but accessible */
.choice-grid .choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Clickable card */
.choice-grid .choice label {
  display: block;
  cursor: pointer;
  border-radius: 10px;
  transition:
    outline 0.2s,
    filter 0.2s,
    opacity 0.2s,
    transform 0.2s;
}

/* Image sizing */
.choice-grid .choice img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Hover lift only before a selection is finalized */
.choice-grid:not(.chosen) .choice label:hover {
  transform: translateY(-2px);
}

/* When a choice has been made: dim everything... */
.choice-grid.chosen .choice label {
  opacity: 0.45;
  filter: grayscale(70%);
}

/* ...except the selected one */
.choice-grid.chosen .choice input[type="radio"]:checked + label {
  opacity: 1;
  filter: none;
  outline: 3px solid #4199c0;
  outline-offset: 4px;
}

/* Lock state */
.locked .choice label {
  cursor: default;
  pointer-events: none;
}

/* ==== Phenolic Heights overlay card ==== */
.height-overlay .height-card {
  position: relative;
  display: inline-block;
}

/* The mounting diagram image */
.height-overlay .height-card > img {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* The floating see-through box */
.height-overlay .height-controls {
  position: absolute;
  /* inset creates a centered, breathable overlay area */
  inset: 8% 8% auto 8%; /* top right bottom left */
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(26, 58, 95, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: saturate(120%) blur(2px);
}

/* Fieldset tidy */
.height-overlay fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/* Each radio row */
.height-overlay .option {
  display: flex;
  gap: 8px;
  align-items: start;
  margin: 6px 0;
  cursor: pointer;
}

.height-overlay .option input[type="radio"] {
  margin-top: 3px;
}

.height-overlay #phenolic-custom-form .row {
  display: flex; /* instead of grid */
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.height-overlay #phenolic-custom-form .row label {
  flex: 1 1 auto; /* label takes remaining space */
}

.height-overlay #phenolic-custom-form .row input[type="number"] {
  flex: 0 0 140px; /* fixed 140px column for input */
  width: 140px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #c9c9c9;
}

.height-overlay #phenolic-custom-form input[type="number"] {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #c9c9c9;
}

.height-overlay #phenolic-custom-form .actions {
  margin-top: 8px;
  text-align: right;
}

/* Lock visuals if you want (optional) */
.height-overlay.locked {
  opacity: 0.9;
}

.height-overlay.locked input,
.height-overlay.locked button {
  pointer-events: none;
}

.height-overlay {
  display: none;
}

/* Mobile fallback: if overlay gets cramped, stack it under the image */
@media (max-width: 780px) {
  .height-overlay .height-controls {
    position: static; /* falls under the image */
    margin-top: 10px;
  }
}

.choice-grid.colors .choice {
  flex: 0 1 180px;
  text-align: center;
}

/* Keep the label a neat card */
.choice-grid.colors .choice label {
  display: block;
  padding: 8px;
  border-radius: 10px;
}

.choice-grid.colors .choice img {
  width: 160px; /* fixed, compact */
  height: 160px; /* make it square */
  aspect-ratio: 1 / 1; /* helps in modern browsers */
  object-fit: cover; /* crop to square without distortion */
  border-radius: 8px;
  display: inline-block; /* keep it from stretching full width */
}

/* Optional: keep titles from wrapping too tall */
.choice-grid.colors .choice h3 {
  font-size: 0.95rem;
  line-height: 1.2;
  margin: 8px 0 0;
  min-height: 2.4em; /* keep rows aligned (2 lines) */
  overflow: hidden;
}

.choice-grid .choice input[type="radio"]:focus-visible + label {
  outline: 3px dashed #4199c0;
  outline-offset: 4px;
}

.diagram-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.diagram {
  display: block;
  max-width: 540px;
}

.diagram img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
}

.diagram figcaption {
  text-align: center;
  margin-top: 6px;
  opacity: 0.8;
}

/* Quote 2 — height section */
.height-section {
  max-width: 700px;
  margin: 20px auto 30px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  color: #1a3a5f;
  font-size: 1.4rem;
}

.height-section h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 2rem;
}

.height-note {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.3rem;
  opacity: 0.9;
}

.height-presets {
  border: 0;
  margin: 0 0 16px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.height-presets legend {
  font-weight: bold;
  margin-bottom: 6px;
}

.height-preset-option {
  flex: 1 1 180px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(65, 153, 192, 0.08);
  border: 1px solid rgba(65, 153, 192, 0.4);
  cursor: pointer;
}

.height-preset-option input[type="radio"] {
  margin-top: 3px;
}

.height-preset-option span small {
  display: block;
  font-size: 1.1rem;
  opacity: 0.85;
}

.height-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
}

.height-grid label {
  display: flex;
  flex-direction: column;
  font-size: 1.3rem;
}

.height-grid input[type="number"] {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #c9c9c9;
  font-size: 1.3rem;
}

.height-actions {
  max-width: 700px;
  margin: 20px auto 40px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

#height-ceiling-wrapper.is-required::after {
  content: " *";
  color: #b00020;
  font-weight: 700;
}

/* =============================================================================
   QUOTES 4 — Estimator Canvas (CSS additions)
   Add these near the bottom of style.css so they override earlier rules.
   ============================================================================= */

/* Page shell for Quotes4 */
.q4-shell {
  width: 100%;
  max-width: 1400px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

/* Two-column layout: left controls + right canvas */
.q4-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

/* Stack on smaller screens */
@media (max-width: 980px) {
  .q4-layout {
    grid-template-columns: 1fr;
  }
}

/* Left controls panel */
.q4-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Right canvas area */
.q4-canvas {
  min-height: 360px; /* visible “blank” area even before add */
  padding: 16px;
}

/* Reusable white card (same spirit as Quotes2 height section) */
.q4-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  color: #1a3a5f;
}

/* Canvas empty state */
.q4-empty {
  border: 2px dashed rgba(26, 58, 95, 0.35);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  font-size: 1.4rem;
  line-height: 1.4;
  opacity: 0.9;
}

/* Buttons used in Quotes4 (not the image-choice tiles) */
.q4-btn {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 95, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: #1a3a5f;
  font-size: 1.4rem;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.15s,
    opacity 0.15s;
}

.q4-btn:hover {
  transform: translateY(-1px);
}

.q4-btn:active {
  transform: translateY(0);
}

/* Primary action */
.q4-btn.primary {
  background: rgba(65, 153, 192, 0.9);
  color: #fff;
  border-color: rgba(65, 153, 192, 0.9);
}

.q4-btn.primary:hover {
  filter: brightness(0.98);
}

/* Danger action (delete) */
.q4-btn.danger {
  background: rgba(176, 0, 32, 0.12);
  border-color: rgba(176, 0, 32, 0.25);
  color: #5a0a18;
}

/* Disabled state (your “dimmed and not working originally”) */
.q4-btn:disabled,
.q4-btn.is-disabled {
  opacity: 0.45;
  filter: grayscale(70%);
  cursor: not-allowed;
  transform: none;
}

/* Room header within the canvas */
.q4-room-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.q4-room-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.q4-room-subtitle {
  font-size: 1.3rem;
  margin: 0;
  opacity: 0.9;
}

/* Simple field layout inside canvas */
.q4-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.q4-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.q4-field {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q4-field label {
  font-size: 1.3rem;
  font-weight: 700;
}

.q4-field input[type="text"],
.q4-field input[type="number"],
.q4-field select {
  padding: 10px 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 58, 95, 0.25);
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1a3a5f;
}

.q4-field input[type="number"] {
  max-width: 140px;
}

/* “Section inside the canvas” visual grouping */
.q4-section {
  padding: 14px;
  border-radius: 12px;
  background: rgba(65, 153, 192, 0.08);
  border: 1px solid rgba(65, 153, 192, 0.25);
}

.q4-section h3 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
}

/* CTA row under the canvas (save/continue/clear all) */
.q4-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.q4-cta-row .q4-btn {
  width: auto;
  min-width: 180px;
}

.q4-canvas.q4-card {
  backdrop-filter: saturate(120%) blur(2px);
}

/* Quotes4 — small helpers */
.q4-help {
  font-size: 1.2rem;
  opacity: 0.85;
  margin: 6px 0 0;
}

.q4-inline {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.q4-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(65, 153, 192, 0.12);
  border: 1px solid rgba(65, 153, 192, 0.25);
  font-size: 1.3rem;
}

.q4-error {
  color: #b00020;
  font-size: 1.2rem;
  margin-top: 6px;
}

/* ===============================
   Quotes5 — Header layout
   =============================== */

.q5-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 1.5rem;
}

.q5-header-left,
.q5-header-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q5-header-right {
  text-align: right;
}

/* ===============================
   Quotes5 — Description Table
   =============================== */

.q5-desc {
  margin-top: 18px;
}

.q5-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1.6rem;
  color: #1a3a5f;
}

.q5-table th,
.q5-table td {
  border: 2px solid #000;
  padding: 16px 12px;
  vertical-align: middle;
}

.q5-table th {
  font-weight: 400; /* closer to your screenshot */
}

.q5-cell-center {
  text-align: center;
}

/* ===============================
   Quotes5 — Line Items Table
   =============================== */

.q5-lines {
  margin-top: 18px;
}

.q5-lines-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1.6rem;
  color: #1a3a5f;
}

.q5-lines-table th,
.q5-lines-table td {
  border: 2px solid #000;
  padding: 14px 10px;
  vertical-align: top;
}

.q5-lines-table thead th {
  font-weight: 700;
  text-align: center;
}

.q5-col-qty {
  width: 14%;
}

.q5-col-desc {
  width: 46%;
  text-align: center; /* header only; body cells will be left by default */
}

.q5-col-len,
.q5-col-hgt {
  width: 14%;
}

.q5-col-total {
  width: 12%;
}

.q5-lines-table tbody td:nth-child(2) {
  text-align: left; /* description body column */
}

.q5-lines-blank td {
  padding: 0;
  height: 0; /* default is collapsed */
}

.q5-lines-blank.is-empty td {
  height: 420px; /* tall only when empty */
}

.q5-auto-row td {
  vertical-align: middle;
}

/* Quotes5 — Add Item button row */
.q5-add-row td {
  vertical-align: middle;
  padding: 10px;
}

.q5-add-btn {
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  border: 2px solid #000;
  background: #fff;
  color: #1a3a5f;
  font-size: 1.4rem;
  cursor: pointer;
}

.q5-add-btn:hover {
  filter: brightness(0.98);
}

/* Quotes5 — inline inputs */
.q5-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 8px;
  border: 1px solid rgba(26, 58, 95, 0.35);
  border-radius: 6px;
  font-size: 1.4rem;
  color: #1a3a5f;
  background: rgba(255, 255, 255, 0.95);
}

.q5-input-qty {
  text-align: center;
}

.q5-input-dim,
.q5-input-total {
  text-align: center;
}

.q5-total-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q5-save-btn {
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  border: 2px solid #000;
  background: #fff;
  color: #1a3a5f;
  font-size: 1.4rem;
  cursor: pointer;
}

.q5-save-btn:hover {
  filter: brightness(0.98);
}

.q5-cancel-btn {
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid rgba(26, 58, 95, 0.35);
  background: rgba(65, 153, 192, 0.08);
  color: #1a3a5f;
  font-size: 1.4rem;
  cursor: pointer;
}

.q5-cancel-btn:hover {
  filter: brightness(0.98);
}
/* Quotes5 — Auto/Locked rows styling */
.q5-auto-row td {
  background: rgba(65, 153, 192, 0.08);
}

.q5-auto-row td:nth-child(2) {
  font-weight: 700; /* emphasize the auto description */
}
/* ===============================
   Quotes5 — Bottom layout (Notes + Totals)
   =============================== */

.q5-bottom {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 380px; /* notes flexible, totals fixed */
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .q5-bottom {
    grid-template-columns: 1fr; /* stack on small screens */
  }
}

.q5-notes-box {
  border: 2px solid #000;
  padding: 12px;
  min-height: 220px; /* gives you that big notes area */
}

.q5-notes-label {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #1a3a5f;
}

.q5-notes-input {
  width: 100%;
  box-sizing: border-box;
  border: 0; /* looks like a big white writing area */
  outline: none;
  resize: vertical;
  min-height: 170px;
  font-size: 1.4rem;
  color: #1a3a5f;
  background: transparent;
}

/* Totals table on the right */
.q5-totals-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1.6rem;
  color: #1a3a5f;
  border: 2px solid #000;
}

.q5-totals-table td {
  border: 2px solid #000;
  padding: 14px 10px;
  vertical-align: middle;
}

.q5-totals-key {
  width: 45%;
  text-align: right;
  font-style: italic; /* similar feel to your screenshot */
  padding-right: 14px;
}

.q5-totals-val {
  width: 55%;
  text-align: center;
}

.q5-totals-grand td {
  background: rgba(0, 0, 0, 0.12);
  font-weight: 700;
  font-style: normal;
  font-size: 1.9rem;
}
/* Quotes5 — Notes list + actions (reuses q5-add-btn/q5-save-btn/q5-cancel-btn/q5-input) */

.q5-notes-list {
  margin: 0 0 10px 0;
  padding-left: 18px; /* bullet indent */
  font-size: 1.4rem;
  color: #1a3a5f;
}

.q5-notes-list li {
  margin: 6px 0;
}

.q5-notes-actions {
  margin-top: 10px;
  max-width: 160px; /* keeps Add note button from stretching too wide */
}

.q5-notes-editor {
  margin-top: 10px;
}

.q5-notes-editor-buttons {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}
/* Quotes5 — Manual note row + actions */
.q5-note-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.q5-note-text {
  flex: 1 1 auto;
}

.q5-note-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 8px;
}

/* Reuse your button look, but smaller */
.q5-mini-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(26, 58, 95, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: #1a3a5f;
  font-size: 1.2rem;
  cursor: pointer;
}

.q5-mini-btn:hover {
  filter: brightness(0.98);
}

/* Logistics block */
.q5-logistics {
  border: 2px solid #000;
  padding: 12px;
  margin-bottom: 12px;
  color: #1a3a5f;
}

.q5-logistics-title {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.q5-logistics-options {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.q5-radio {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.q5-radio input {
  transform: translateY(1px);
}

/* Destination fields */
.q5-destination-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.q5-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 220px;
}

.q5-field label {
  font-size: 1.2rem;
  font-weight: 700;
}

.q5-field-state {
  flex: 0 0 90px;
}

.q5-destination-error {
  margin-top: 8px;
  font-size: 1.2rem;
  color: #b00020;
}

/* ==========================================
   Orders Page UI
   ========================================== */

.orders-shell {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  box-sizing: border-box;
}

.orders-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.orders-subtitle {
  font-size: 1.5rem;
  color: #1a3a5f;
  margin: 8px 0 0;
}

.orders-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  padding: 20px;
  backdrop-filter: saturate(120%) blur(2px);
}

.orders-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.orders-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.orders-section h2 {
  margin: 0 0 16px;
  font-size: 2.2rem;
  color: #1a3a5f;
}

.orders-grid {
  display: grid;
  gap: 14px 16px;
}

.orders-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.orders-grid.one-col {
  grid-template-columns: 1fr;
}

.orders-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.orders-field-full {
  grid-column: 1 / -1;
}

.orders-field label,
.orders-label-inline {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a3a5f;
}

.orders-field input[type="text"],
.orders-field input[type="date"],
.orders-field select,
.orders-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 95, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: #1a3a5f;
  font-size: 1.4rem;
  font-family: Helvetica, "sans-serif";
}

.orders-field textarea {
  resize: vertical;
  min-height: 110px;
}

.orders-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.orders-radio,
.orders-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  color: #1a3a5f;
}

.orders-doc-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.orders-doc-status {
  font-size: 1.35rem;
  color: #1a3a5f;
  margin: 0;
}

.orders-doc-actions,
.orders-header-actions,
.orders-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.orders-action-stack {
  flex-direction: column;
}

.orders-btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 95, 0.2);
  background: rgba(255, 255, 255, 0.88);
  color: #1a3a5f;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.15s;
}

.orders-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.orders-btn-primary {
  background: #4199c0;
  color: #fff;
  border-color: #4199c0;
}

.orders-btn-danger {
  background: rgba(176, 0, 32, 0.12);
  color: #7a1026;
  border-color: rgba(176, 0, 32, 0.22);
}
.orders-dynamic-placeholder {
  border: 2px dashed rgba(26, 58, 95, 0.28);
  border-radius: 12px;
  padding: 18px;
  background: rgba(65, 153, 192, 0.08);
}

.orders-dynamic-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5f;
}

.orders-dynamic-copy {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #1a3a5f;
}

.orders-upload-box {
  border: 2px dashed rgba(26, 58, 95, 0.28);
  border-radius: 12px;
  padding: 16px;
  background: rgba(65, 153, 192, 0.08);
}

.orders-upload-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1a3a5f;
}

.orders-upload-copy {
  margin: 0 0 12px;
  font-size: 1.3rem;
  color: #1a3a5f;
}

.orders-upload-box input[type="file"] {
  font-size: 1.3rem;
  color: #1a3a5f;
}

.orders-doc-preview {
  margin-top: 4px;
}

.orders-qr-placeholder {
  min-height: 160px;
  border: 2px dashed rgba(26, 58, 95, 0.28);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 1.35rem;
  color: #1a3a5f;
  background: rgba(65, 153, 192, 0.08);
  text-align: center;
}

.orders-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.orders-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.orders-step-copy {
  margin: 6px 0 0;
  font-size: 1.35rem;
  color: #1a3a5f;
}

.orders-step-form {
  display: block;
}

.orders-step-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.orders-edit-btn {
  white-space: nowrap;
}

.orders-step.is-locked {
  border: 1px solid rgba(65, 153, 192, 0.28);
}

.orders-step.is-locked .orders-step-actions button[type="submit"] {
  opacity: 0.55;
}

#orders-qr-placeholder {
  flex-direction: column;
  gap: 10px;
}

#orders-qr-empty-text {
  display: inline-block;
}

#orders-qr-image {
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

/* ==========================================
   Hardware Terminal
   ========================================== */

.terminal-shell {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  box-sizing: border-box;
}

.terminal-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  padding: 20px;
  backdrop-filter: saturate(120%) blur(2px);
}

.terminal-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.terminal-subtitle {
  font-size: 1.5rem;
  color: #1a3a5f;
  margin: 8px 0 0;
}

.terminal-badge-wrap {
  display: flex;
  align-items: center;
}

.terminal-station-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #1a3a5f;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

.terminal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.terminal-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.terminal-card-header {
  margin-bottom: 14px;
}

.terminal-card h2 {
  margin: 0 0 6px;
  font-size: 2.2rem;
  color: #1a3a5f;
}

.terminal-copy {
  margin: 0;
  font-size: 1.35rem;
  color: #1a3a5f;
}

.terminal-form {
  display: block;
}

.terminal-grid {
  display: grid;
  gap: 14px 16px;
}

.terminal-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.terminal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-field-full {
  grid-column: 1 / -1;
}

.terminal-field label {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a3a5f;
}

.terminal-field input[type="text"],
.terminal-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 95, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: #1a3a5f;
  font-size: 1.4rem;
  font-family: Helvetica, "sans-serif";
}

.terminal-field textarea {
  resize: vertical;
  min-height: 100px;
}

.terminal-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.terminal-actions-tight {
  margin-top: 12px;
}

.terminal-btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 95, 0.2);
  background: rgba(255, 255, 255, 0.88);
  color: #1a3a5f;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.15s;
}

.terminal-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.terminal-btn-primary {
  background: #4199c0;
  color: #fff;
  border-color: #4199c0;
}

.terminal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: #1a3a5f;
  font-size: 1.25rem;
  font-weight: 700;
}

.terminal-divider::before,
.terminal-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(26, 58, 95, 0.2);
}

.terminal-empty {
  border: 2px dashed rgba(26, 58, 95, 0.25);
  border-radius: 12px;
  padding: 18px;
  font-size: 1.4rem;
  color: #1a3a5f;
  background: rgba(65, 153, 192, 0.08);
}

.terminal-active-order {
  border: 1px solid rgba(65, 153, 192, 0.25);
  background: rgba(65, 153, 192, 0.08);
  border-radius: 12px;
  padding: 18px;
}

.terminal-active-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.terminal-kicker {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a3a5f;
  opacity: 0.8;
}

.terminal-active-top h3 {
  margin: 0;
  font-size: 2.2rem;
  color: #1a3a5f;
}

.terminal-live-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(109, 160, 110, 0.2);
  color: #215b22;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.terminal-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.terminal-order-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-order-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a3a5f;
  opacity: 0.8;
}

.terminal-order-item strong {
  font-size: 1.45rem;
  color: #1a3a5f;
}

.terminal-check-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  color: #1a3a5f;
}

.terminal-log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terminal-log-card {
  border: 1px solid rgba(26, 58, 95, 0.16);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.terminal-log-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 1.35rem;
  color: #1a3a5f;
}

.terminal-log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.terminal-log-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-log-grid span {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a3a5f;
  opacity: 0.8;
}

.terminal-log-grid strong {
  font-size: 1.3rem;
  color: #1a3a5f;
}

.terminal-log-notes {
  margin: 0;
  font-size: 1.3rem;
  color: #1a3a5f;
}

.terminal-scanner-shell {
  margin-top: 14px;
  padding: 14px;
  border: 2px dashed rgba(26, 58, 95, 0.22);
  border-radius: 12px;
  background: rgba(65, 153, 192, 0.08);
}

.terminal-qr-reader {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.terminal-scanner-help {
  margin: 12px 0 0;
  font-size: 1.25rem;
  color: #1a3a5f;
  text-align: center;
}

@media (max-width: 1100px) {
  .terminal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .terminal-grid.two-col,
  .terminal-order-grid,
  .terminal-log-grid {
    grid-template-columns: 1fr;
  }

  .terminal-page-header,
  .terminal-active-top,
  .terminal-log-top {
    flex-direction: column;
  }
}

.orders-qr-meta {
  margin-top: 14px;
  text-align: center;
}

.orders-qr-meta-label {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a3a5f;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.orders-qr-meta-value {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a3a5f;
  word-break: break-word;
}

.orders-qr-meta-help {
  margin: 0;
  font-size: 1.2rem;
  color: #1a3a5f;
  opacity: 0.85;
}

.terminal-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.terminal-step.is-locked {
  border: 1px solid rgba(65, 153, 192, 0.28);
}

.terminal-edit-btn {
  white-space: nowrap;
}

.terminal-photo-help {
  margin: 8px 0 0;
  font-size: 1.2rem;
  color: #1a3a5f;
  opacity: 0.85;
}

.terminal-photo-preview-wrap {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(65, 153, 192, 0.08);
  border: 1px solid rgba(65, 153, 192, 0.22);
}

#hardware-photo-preview {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 10px;
}

.terminal-log-photo-wrap {
  margin-top: 12px;
}

.terminal-log-photo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 10px;
}

.terminal-photo-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.terminal-photo-preview-item {
  border: 1px solid #d7dce5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.terminal-photo-preview-item img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.terminal-log-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.terminal-log-photo-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.terminal-log-photo {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.terminal-camera-shell {
  margin-top: 12px;
  border: 1px solid #d7dce5;
  border-radius: 12px;
  overflow: hidden;
  background: #0f1720;
}

.terminal-camera-video {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: #000;
}

.terminal-photo-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.terminal-photo-preview-item {
  position: relative;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.terminal-photo-preview-item img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.terminal-photo-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}

.terminal-photo-remove-btn {
  border: 1px solid #d7dce5;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.terminal-log-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.terminal-log-photo-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.terminal-log-photo {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .orders-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .orders-grid.two-col {
    grid-template-columns: 1fr;
  }

  .orders-page-header {
    flex-direction: column;
  }
}

footer {
  width: 100%;
}
