/*
 * Quote Engine v4 — workshop command-centre theme
 *
 * Kept as a focused override layer so the original styling remains available
 * and the application logic/markup stays backwards compatible.
 */

:root {
  color-scheme: dark;
  --bg: #080c12;
  --panel: #111722;
  --panel-2: #151d29;
  --panel-3: #1a2432;
  --text: #f3f6fa;
  --muted: #98a4b5;
  --muted-2: #6f7b8c;
  --red: #f04452;
  --red-hot: #ff5a66;
  --red-dark: #c92e3a;
  --accent-rgb: 240, 68, 82;
  --red-soft: rgba(var(--accent-rgb), .12);
  --black: #080c12;
  --chrome: #0d131c;
  --grey: #1c2735;
  --border: #253142;
  --border-hi: #35445a;
  --footer: #0b1119;
  --green: #40d69a;
  --amber: #f3b95f;
  --blue: #6ca8ff;
  --shadow: 0 18px 55px rgba(0, 0, 0, .26);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --cut: none;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -16%, rgba(var(--accent-rgb), .13), transparent 35rem),
    radial-gradient(circle at 6% 46%, rgba(108, 168, 255, .05), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, .017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .017) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 40px 40px, 40px 40px, auto;
  color: var(--text);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.012em;
}

::selection {
  color: #fff;
  background: rgba(var(--accent-rgb), .65);
}

/* Header / command bar */
.topbar {
  min-height: 84px;
  gap: 32px;
  padding: 14px max(28px, calc((100vw - 1480px) / 2));
  background: rgba(9, 14, 21, .9);
  border-bottom-color: rgba(53, 68, 90, .72);
  box-shadow: 0 12px 42px rgba(0, 0, 0, .24);
  backdrop-filter: blur(22px) saturate(140%);
}

.topbar::after {
  width: min(23vw, 340px);
  height: 3px;
  background: linear-gradient(90deg, var(--red-hot), var(--red) 55%, transparent);
}

.brand { gap: 14px; }
.brand-copy { line-height: 1.08; }
.brand-kicker {
  margin-bottom: 5px;
  color: #d8dde6;
  font-size: 8px;
  letter-spacing: .22em;
}
.brand strong {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -.01em;
}
.brand .sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.logo {
  flex-basis: 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .15), transparent 48%),
    linear-gradient(145deg, var(--red-hot), var(--red-dark));
  clip-path: none;
  box-shadow: 0 12px 28px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 11px;
  letter-spacing: .08em;
}
.logo::after {
  inset: 7px;
  border-color: rgba(255, 255, 255, .28);
  border-radius: 7px;
  clip-path: none;
}

.topbar-actions { flex: 1; justify-content: flex-end; gap: 10px; }

/* Inputs and actions */
.search,
input,
textarea,
select {
  min-height: 40px;
  padding: 9px 12px;
  margin-bottom: 8px;
  color: var(--text);
  background: #0d141e;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.search {
  min-width: 320px;
  max-width: 520px;
  min-height: 42px;
  margin: 0;
  padding-left: 40px;
  background:
    radial-gradient(circle at 20px 18px, transparent 5px, #7f8b9c 5.5px 6.5px, transparent 7px),
    linear-gradient(45deg, transparent 48%, #7f8b9c 49% 57%, transparent 58%) 25px 25px / 8px 8px no-repeat,
    #0d141e;
}

input::placeholder,
textarea::placeholder,
.search::placeholder { color: #6f7b8c; }

input:hover,
textarea:hover,
select:hover,
.search:hover {
  border-color: #415269;
  background-color: #111a26;
}

input:focus,
textarea:focus,
select:focus,
.search:focus {
  border-color: var(--red-hot);
  background-color: #111a26;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12);
}

.btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: -.005em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible,
.state-tab:focus-visible,
.record-tab:focus-visible,
.area-tab:focus-visible {
  outline: 3px solid rgba(108, 168, 255, .34);
  outline-offset: 2px;
}
.btn.primary {
  background: linear-gradient(135deg, var(--red-hot), var(--red-dark));
  border-color: rgba(255, 255, 255, .08);
  border-radius: var(--radius-sm);
  clip-path: none;
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), .2), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #ff6b75, #dd3542);
  box-shadow: 0 13px 28px rgba(var(--accent-rgb), .27);
}
.btn.ghost {
  color: #dbe1e9;
  background: #151e2a;
  border-color: var(--border-hi);
}
.btn.ghost:hover {
  background: #1b2735;
  border-color: #50627a;
}
.btn.danger {
  color: #ff8089;
  background: rgba(var(--accent-rgb), .06);
  border-color: rgba(var(--accent-rgb), .38);
}
.btn.small {
  min-height: 38px;
  height: 38px;
  padding: 8px 13px;
  font-size: 11px;
}

/* Dashboard */
main {
  max-width: 1528px;
  padding: 38px 28px 110px;
}

.workspace-head {
  align-items: center;
  gap: 38px;
  margin: 4px 0 30px;
}
.eyebrow {
  color: #b0bac8;
  font-size: 9px;
  letter-spacing: .19em;
}
.workspace-head h1 {
  margin-top: 11px;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 730;
  line-height: .96;
  letter-spacing: -.058em;
  text-transform: none;
}
.workspace-head p {
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.metrics {
  min-width: min(100%, 440px);
  overflow: hidden;
  border-color: var(--border);
  border-radius: var(--radius);
  background: rgba(17, 23, 34, .76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.metric {
  min-width: 132px;
  padding: 17px 19px;
  border-right-color: var(--border);
}
.metric span {
  color: #929ead;
  font-size: 9px;
  letter-spacing: .105em;
}
.metric strong {
  margin-top: 7px;
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -.04em;
}
.metric.accent {
  background: linear-gradient(145deg, rgba(var(--accent-rgb), .15), rgba(var(--accent-rgb), .03));
}
.metric.accent::after {
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--red-hot);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .72);
}

.state-tabs {
  gap: 8px;
  margin-bottom: 14px;
  padding: 2px;
}
.state-tab {
  min-width: 112px;
  padding: 11px 12px 11px 15px;
  color: #9da8b7;
  background: rgba(16, 23, 33, .82);
  border-color: var(--border);
  border-radius: 10px;
  font-size: 11px;
}
.state-tab b {
  min-width: 24px;
  padding: 3px 7px;
  color: #a8b2c0;
  background: #202b39;
  border-radius: 7px;
}
.state-tab.active {
  color: #fff;
  border-color: rgba(var(--accent-rgb), .5);
  background: linear-gradient(120deg, rgba(var(--accent-rgb), .17), rgba(19, 27, 38, .94) 72%);
  box-shadow: inset 0 -2px 0 var(--red), 0 7px 18px rgba(0, 0, 0, .14);
}
.state-tab.active b { background: var(--red); }

.list-panel,
.record-view {
  background: rgba(16, 23, 34, .95);
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.list-panel::before,
.record-view::before { display: none; }

.list-heading {
  min-height: 78px;
  padding: 16px 22px;
  border-bottom-color: var(--border);
  background: linear-gradient(90deg, #151d29, #111722);
}
.panel-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  border: 1px solid rgba(var(--accent-rgb), .36);
  border-radius: 9px;
  background: rgba(var(--accent-rgb), .1);
  font-size: 9px;
}
.list-heading h2 { font-size: 15px; font-weight: 720; }
.list-heading p { margin-top: 3px; font-size: 11px; }
.live-state {
  padding: 7px 10px;
  border: 1px solid rgba(64, 214, 154, .18);
  border-radius: 999px;
  background: rgba(64, 214, 154, .06);
}

.table-scroll { scrollbar-gutter: stable; }
.quote-list { font-size: 12px; }
.quote-list th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 15px;
  color: #8793a3;
  background: #0e151f;
  border-bottom-color: var(--border);
  letter-spacing: .1em;
}
.quote-list td {
  height: 56px;
  padding: 10px 15px;
  color: #d4dae2;
  border-bottom-color: #202c3a;
}
.quote-list .job-row:nth-child(even) { background: rgba(255, 255, 255, .01); }
.quote-list .job-row:hover {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .1), rgba(108, 168, 255, .025));
  box-shadow: inset 3px 0 0 var(--red);
}
.quote-list a { font-size: 13px; }

.status {
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
}

/* Record workspace */
.record-view { overflow: visible; }
.record-tabs {
  position: sticky;
  top: 84px;
  z-index: 12;
  display: grid;
  grid-template-columns: auto auto auto auto minmax(90px, 1fr) auto;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(12, 18, 27, .94);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px) saturate(140%);
}
.record-tab {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 11px;
}
.record-tab.active {
  background: rgba(var(--accent-rgb), .13);
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: inset 0 -2px 0 var(--red);
}
.record-ref {
  align-self: center;
  margin: 0 8px;
  color: #f2f5f9;
  font-size: 13px;
}
.lifecycle { margin-left: 0; }
.lifecycle select { min-width: 118px; }

.lifecycle-track {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
}
.stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #687587;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .03em;
}
.stage:not(:last-child) { margin-right: 14px; }
.stage:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  width: 7px;
  height: 1px;
  background: #344154;
}
.stage i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #354257;
  border-radius: 50%;
  background: #111925;
  color: #7e8a9a;
  font-style: normal;
  font-size: 8px;
}
.stage.complete { color: #87bba5; }
.stage.complete i {
  color: #07150f;
  border-color: var(--green);
  background: var(--green);
}
.stage.complete i::before { content: "✓"; }
.stage.complete i { font-size: 0; }
.stage.complete i::before { font-size: 10px; }
.stage.active { color: #fff; }
.stage.active i {
  color: #fff;
  border-color: var(--red-hot);
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .11);
}

.tab-pane { padding: 26px; }
.pane-grid {
  grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr);
  gap: 18px;
}

fieldset {
  display: grid;
  grid-template-columns: minmax(108px, 128px) minmax(0, 1fr);
  align-content: start;
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  padding: 20px;
  border-color: var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(21, 29, 41, .96), rgba(17, 23, 34, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
fieldset:nth-child(2) { grid-row: span 2; }
fieldset:nth-child(4) {
  grid-column: 1 / -1;
  grid-template-columns: minmax(108px, 128px) minmax(0, 1fr) minmax(108px, 128px) minmax(0, 1fr);
}

legend {
  padding: 0 10px;
  color: #f0f3f7;
  font-size: 10px;
  letter-spacing: .12em;
}
.field-label {
  margin: 0;
  color: #9aa6b6;
  font-size: 10px;
}
fieldset > input,
fieldset > select,
fieldset > textarea,
fieldset > .rego-row {
  margin: 0;
}
fieldset > .tag { grid-column: 2; }
.rego-row { align-items: center; gap: 7px; }
.rego-row input { min-height: 38px; margin: 0; }

.details-actions {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 22, 32, .72);
}
.invoicing {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 22, 32, .72);
}
.invoicing h4 { font-size: 11px; letter-spacing: .1em; }

/* Quote builder */
.area-tabs {
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
}
.area-tab {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 9px;
  background: #161f2b;
}
.area-tab.active {
  background: rgba(var(--accent-rgb), .13);
  border-color: rgba(var(--accent-rgb), .48);
  box-shadow: inset 0 -2px 0 var(--red);
}
.plugin-bar,
.assessor-legend {
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-color: var(--border);
  border-radius: 11px;
  background: #101722;
}
.quote-toolbar {
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(16, 23, 34, .72);
}

.editor-cols {
  grid-template-columns: minmax(190px, .6fr) minmax(290px, .95fr) minmax(410px, 1.45fr);
  gap: 12px;
  min-height: 500px;
}
.col {
  min-height: 500px;
  overflow: hidden;
  border-color: var(--border);
  border-radius: 12px;
  background: #101722;
  box-shadow: var(--shadow-soft);
}
.col h4 {
  padding: 13px 14px;
  color: #9ea9b8;
  background: #0d141e;
  border-bottom-color: var(--border);
}
.group-item,
.choice {
  padding: 11px 13px;
  border-bottom-color: #202b39;
  color: #cbd2dc;
}
.group-item:hover,
.choice:hover { background: rgba(var(--accent-rgb), .09); }
.group-item.active {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .16), transparent);
  border-left-color: var(--red);
}
.sel-table th {
  padding: 10px;
  color: #8c98a8;
  background: #0d141e;
  border-bottom-color: var(--border);
}
.sel-table td {
  padding: 8px 9px;
  border-bottom-color: #202b39;
}
.part-add { padding: 12px; border-top-color: var(--border); }

.quote-footer {
  bottom: 12px;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  color: #a7b1bf;
  background: rgba(10, 16, 24, .94);
  border-color: var(--border);
  border-left: 0;
  border-radius: 11px;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .22);
}
.quote-footer .grand {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}
.quote-footer .grand b { font-size: 15px; }

/* Printable estimate preview */
.view-toolbar {
  max-width: 1080px;
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #101722;
}
.quote-paper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 50px 56px;
  border: 0;
  border-top: 5px solid var(--red);
  border-radius: 6px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .36);
  font-size: 13px;
}
.quote-paper h1 { font-size: 24px; letter-spacing: -.02em; }
.quote-paper .shop-meta { color: #536070; }
.quote-paper th {
  padding: 7px 6px;
  color: #46515f;
  border-bottom-color: #222b35;
}
.quote-paper td { padding: 5px 6px; }
.quote-paper .section-title {
  margin-top: 18px;
  padding-bottom: 4px;
  color: #c92e3a;
  border-bottom: 1px solid #e5e8ec;
}

/* Settings */
.modal {
  padding: 24px;
  background: rgba(3, 7, 12, .76);
  backdrop-filter: blur(14px);
}
.modal-card {
  width: min(760px, 96vw);
  padding: 26px;
  border-color: var(--border-hi);
  border-top: 1px solid var(--border-hi);
  border-radius: 16px;
  background: #111925;
  box-shadow: 0 36px 100px rgba(0, 0, 0, .58);
}
.modal-card h2 {
  font-size: 25px;
  font-weight: 720;
  text-transform: none;
}
.plugin-card {
  border-radius: 10px;
  background: #101722;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0b1119; }
::-webkit-scrollbar-thumb {
  background: #344255;
  border: 3px solid #0b1119;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #4b5d73; }

@media (max-width: 1180px) {
  .record-tabs { grid-template-columns: auto auto auto auto 1fr; }
  .lifecycle { grid-column: 1 / -1; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--border); }
  .editor-cols { grid-template-columns: minmax(170px, .65fr) 1fr; }
  .col.selected { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .table-scroll { overflow: visible; padding: 12px; }
  .quote-list,
  .quote-list tbody { display: block; width: 100%; min-width: 0; }
  .quote-list thead { display: none; }
  .quote-list tbody { display: grid; gap: 10px; }
  .quote-list .job-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #121a26;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
  }
  .quote-list .job-row:nth-child(even) { background: #121a26; }
  .quote-list .job-row:hover,
  .quote-list .job-row:focus-visible {
    outline: none;
    border-color: rgba(var(--accent-rgb), .48);
    background: linear-gradient(120deg, rgba(var(--accent-rgb), .09), #121a26 52%);
    box-shadow: inset 3px 0 0 var(--red), 0 10px 24px rgba(0, 0, 0, .17);
  }
  .quote-list td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    height: auto;
    padding: 7px 0;
    border-bottom: 1px solid rgba(37, 49, 66, .7);
    text-align: right;
  }
  .quote-list td::before {
    content: attr(data-label);
    color: #7f8c9d;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .quote-list td[data-label="Reference"],
  .quote-list td[data-label="Owner"] {
    grid-column: 1 / -1;
  }
  .quote-list td[data-label="Reference"] {
    padding-top: 0;
    border-bottom-color: var(--border);
  }
  .quote-list td[data-label="Reference"] a { font-size: 16px; }
  .quote-list td[data-label="Owner"] {
    justify-content: flex-start;
    padding: 10px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
  }
  .quote-list td[data-label="Owner"]::before { display: none; }
  .quote-list td[data-label="Status"],
  .quote-list td[data-label="Total"] { border-bottom: 0; }
  .quote-list .empty { display: block; padding: 42px 18px; }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 13px 18px;
  }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .topbar-actions .search { flex: 1 1 100%; max-width: none; }
  main { padding: 26px 16px 100px; }
  .workspace-head { align-items: stretch; flex-direction: column; margin-bottom: 22px; }
  .metrics { width: 100%; }
  .record-tabs { position: static; grid-template-columns: auto repeat(3, 1fr); border-radius: 14px 14px 0 0; }
  .record-ref { grid-column: 1 / -1; margin: 5px 0 0; }
  .lifecycle { justify-content: flex-start; }
  .pane-grid,
  .editor-cols { grid-template-columns: 1fr; }
  fieldset:nth-child(2) { grid-row: auto; }
  fieldset:nth-child(4) {
    grid-column: auto;
    grid-template-columns: minmax(108px, 128px) minmax(0, 1fr);
  }
  .col.selected { grid-column: auto; }
  .ops-list,
  .sel-table-wrap { max-height: 320px; }
  .tab-pane { padding: 18px; }
  .quote-paper { padding: 34px 26px; }
}

@media (max-width: 600px) {
  .brand-kicker { display: none; }
  .brand strong { font-size: 15px; }
  .brand .sub { max-width: 205px; }
  .logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 11px;
    clip-path: none;
  }
  .topbar-actions .btn { flex: 1; }
  .workspace-head h1 { font-size: 38px; }
  .metrics { grid-template-columns: 1fr; }
  .metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .metric:last-child { border-bottom: 0; }
  .metric strong { margin: 0; }
  .state-tab { min-width: 102px; }
  .record-tabs { grid-template-columns: 1fr 1fr; }
  #btn-back { grid-column: 1 / -1; }
  .record-ref { grid-column: 1 / -1; }
  .lifecycle { grid-column: 1 / -1; align-items: stretch; }
  .lifecycle > * { flex: 1 1 auto; }
  .lifecycle-track { flex-basis: 100%; justify-content: space-between; padding: 5px 2px 10px; }
  .stage { gap: 4px; }
  .stage:not(:last-child) { margin-right: 6px; }
  .stage:not(:last-child)::after { display: none; }
  .stage b { display: none; }
  .lifecycle select { width: 100%; }
  fieldset {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 17px;
  }
  fieldset:nth-child(4) { grid-template-columns: 1fr; }
  fieldset > .tag { grid-column: 1; }
  .field-label { margin-top: 5px; }
  .rego-row { align-items: stretch; }
  .rego-row .btn { flex: 1 1 auto; }
  .area-actions { width: 100%; margin: 4px 0 0; }
  .quote-footer .grand {
    width: 100%;
    margin-left: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
  .part-add,
  .part-add.one,
  .part-add.labour { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .quote-paper {
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
