:root {
  --ink: #101418;
  --muted: #5d6670;
  --line: #d9dee5;
  --paper: #f4f6f9;
  --panel: #ffffff;
  --brand: #1d4578;
  --brand-dark: #132f55;
  --brand-ink: #07111f;
  --accent: #000000;
  --soft: #e8eef6;
  --danger: #8b451d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 48%, #e9eef5 100%);
}

@supports (min-height: 100svh) {
  body {
    min-height: 100svh;
  }
}

img,
video,
canvas {
  max-width: 100%;
}

body.embedded-client {
  background: transparent;
}

.offline-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 2100;
  padding: 10px 16px;
  color: white;
  background: var(--brand-dark);
  font-weight: 800;
  text-align: center;
}

body.is-offline .offline-banner {
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
  font-size: max(16px, 1em);
}

a.primary-button,
a.secondary-button,
label.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(19, 47, 85, 0.07);
}

.embedded-client .topbar {
  display: none;
}

.staff-login-screen .topbar {
  display: none;
}

.client-share-link .mode-tabs {
  display: none;
}

.client-share-link .topbar-actions {
  display: none;
}

.client-share-link .install-button {
  display: none !important;
}

.embedded-client .app-shell {
  width: 100%;
  padding: 0;
}

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

.embedded-client .quote-card {
  display: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-copy {
  min-width: 0;
}

.product-logo-frame,
.login-logo-frame {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
}

.product-logo-fallback {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: white;
  background: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.product-logo-missing .product-logo {
  display: none;
}

.product-logo-missing .product-logo-fallback {
  display: grid;
}

.logo-fallback {
  display: none;
  width: 150px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--brand);
  background: white;
  text-align: center;
}

.logo-fallback strong,
.logo-fallback span {
  display: block;
}

.logo-fallback strong {
  color: var(--brand);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1;
}

.logo-fallback span {
  margin-top: 4px;
  color: var(--brand-ink);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.logo-fallback-active [data-logo] {
  display: none;
}

body.logo-fallback-active .logo-fallback {
  display: block;
}

.brand-lockup .eyebrow {
  margin-bottom: 2px;
  font-size: 0.65rem;
}

.brand-lockup h1 {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.45rem;
  line-height: 1.05;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  color: var(--brand-ink);
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.topbar-logout {
  white-space: nowrap;
}

.install-button {
  white-space: nowrap;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1;
}

.tab.active {
  color: white;
  background: var(--brand);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.client-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.quote-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(19, 47, 85, 0.08);
}

.quote-card {
  padding: 24px;
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.quote-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 62%, #000000 62%, #000000 100%);
}

.quote-logo {
  display: block;
  width: 150px;
  height: 94px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.quote-logo-fallback {
  margin: 0 auto 12px;
}

.quote-card h2 {
  margin-bottom: 22px;
  font-size: 2rem;
}

.client-meta {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  color: var(--muted);
}

.client-meta strong {
  color: var(--ink);
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.secure-pill,
.risk-badge,
.integration-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.send-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.send-status-pill.sent {
  border-color: #b7dcc2;
  color: #14632f;
  background: #eefaf1;
}

.send-status-pill.pending {
  border-color: #d5dce5;
  color: #5d6670;
  background: #f5f7fa;
}

.secure-pill {
  color: var(--brand-dark);
  background: var(--soft);
}

.details-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.details-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.details-form input,
.details-form select,
.details-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.details-form textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

.address-field-wrap {
  position: relative;
  display: block;
}

.address-powered {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 0.72rem;
  font-weight: 800;
  pointer-events: none;
}

.address-field-wrap input {
  padding-right: 142px;
}

.address-field-wrap.google-ready .address-powered {
  color: white;
  background: var(--brand);
}

.address-suggestion-list {
  display: none;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 38px rgba(19, 47, 85, 0.16);
}

.address-suggestion-list.visible {
  display: block;
}

.address-suggestion-list button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--ink);
  background: white;
  text-align: left;
  cursor: pointer;
}

.address-suggestion-list button:last-child {
  border-bottom: 0;
}

.address-suggestion-list button:hover,
.address-suggestion-list button:focus {
  outline: none;
  background: var(--soft);
}

.pac-container {
  z-index: 10000 !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(7, 17, 31, 0.16);
  background: white;
  font-family: inherit;
}

.pac-item {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  cursor: pointer;
}

.pac-item-query {
  font-size: 15px;
}

.details-form input:focus,
.details-form select:focus,
.details-form textarea:focus {
  outline: 3px solid rgba(29, 69, 120, 0.16);
  border-color: var(--brand);
}

.details-form .wide {
  grid-column: 1 / -1;
}

.form-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.form-section-heading strong,
.form-section-heading span {
  display: block;
}

.form-section-heading span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.docket-plastics-editor {
  grid-column: 1 / -1;
}

.prepack-materials-editor {
  grid-column: 1 / -1;
}

.packing-material-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  border: 1px solid #c8d7ec;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-size: 0.9rem;
  font-weight: 600;
}

.packing-material-suggestion[hidden] {
  display: none;
}

.range-increments {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
}

.range-increments span:first-child {
  text-align: left;
}

.range-increments span:last-child {
  text-align: right;
}

.prepack-material-head,
.prepack-material-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 96px;
  gap: 8px;
  align-items: center;
}

.prepack-material-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.prepack-material-list {
  display: grid;
  gap: 8px;
}

.prepack-material-list label {
  margin: 0;
}

.prepack-material-list span:nth-child(2) {
  color: var(--muted);
  font-size: 0.86rem;
}

.docket-plastic-head,
.docket-plastic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 36px;
  gap: 8px;
  align-items: center;
}

.docket-plastic-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.docket-plastic-list {
  display: grid;
  gap: 8px;
}

.docket-plastic-row select,
.docket-plastic-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.docket-requirement-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.docket-requirement-group h3 {
  margin: 0;
  font-size: 0.95rem;
}

.docket-requirement-group ul {
  margin: 0;
  padding-left: 18px;
}

.checkbox-field {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  line-height: 1.35;
  font-weight: 600;
}

.checkbox-field input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.checkbox-field span {
  min-width: 0;
}

.client-flow-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}

.client-flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #fbfcfd;
  cursor: pointer;
  text-align: left;
}

.client-flow-step span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.client-flow-step strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-flow-step.active {
  color: var(--brand-dark);
  border-color: #adc1dc;
  background: #eef4fb;
}

.client-flow-step.active span,
.client-flow-step.complete span {
  color: white;
  background: var(--brand);
}

.client-flow-step.complete {
  color: var(--ink);
}

.client-step-panel[hidden] {
  display: none;
}

.client-step-panel {
  display: grid;
  gap: 14px;
}

.client-step-actions {
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
}

.selected-room-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fbfcfd;
}

.next-step-heading {
  margin-bottom: 14px;
}

.risk-badge.medium {
  color: var(--danger);
  background: #fff1df;
}

.integration-badge {
  color: var(--brand-dark);
  background: var(--soft);
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 2px dashed #b8c5bb;
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  background: #fbfcfd;
}

.upload-zone.locked {
  opacity: 0.62;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone.locked input {
  pointer-events: none;
}

.upload-zone p {
  max-width: 520px;
  color: var(--muted);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 2rem;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
}

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

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

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  color: var(--brand-dark);
  background: var(--soft);
}

.danger-button {
  color: #7b1f1f;
  background: #f5e6e6;
}

.small {
  min-height: 44px;
  padding: 9px 12px;
}

.room-checklist {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

.room-section {
  display: grid;
  gap: 10px;
}

.room-section h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.room-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.scan-path-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.scan-path-panel h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.scan-path-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.scan-path-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  color: var(--ink);
  background: white;
  text-align: left;
  cursor: pointer;
}

.scan-path-step.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 69, 120, 0.13);
}

.scan-path-step.complete {
  background: #f1f8f4;
}

.scan-path-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: white;
  background: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
}

.scan-path-copy {
  min-width: 0;
}

.scan-path-copy strong,
.scan-path-copy small {
  display: block;
}

.scan-path-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-path-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.room-upload-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.room-upload-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.room-upload-card h3 {
  margin-bottom: 3px;
  font-size: 1rem;
}

.room-upload-card p,
.muted-copy {
  margin-bottom: 0;
  color: var(--muted);
}

.action-status {
  margin-top: 10px;
}

.action-status a {
  color: var(--brand);
  font-weight: 800;
}

.compact-form {
  margin-bottom: 12px;
}

.manual-item-form {
  margin: 8px 0 12px;
}

.manual-item-form label {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
  display: block;
}

.manual-item-controls {
  display: grid;
  grid-template-columns: 2fr 1.25fr 0.8fr auto;
  gap: 8px;
  align-items: center;
}

.manual-item-controls input,
.manual-item-controls select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.manual-item-controls button {
  white-space: nowrap;
}

.follow-up-draft {
  min-height: 210px;
}

.room-upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.room-upload-trigger {
  min-height: 44px;
}

.room-upload-card.locked {
  opacity: 0.62;
}

.room-file-count {
  font-weight: 800;
  color: var(--brand);
}

.file-list {
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: 130px 52px minmax(0, 1fr) auto auto;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.file-room {
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.file-preview {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f7f9fb;
  font-size: 0.72rem;
  font-weight: 600;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.file-actions input {
  display: none;
}

.client-review-panel {
  display: none;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.client-review-panel.visible {
  display: block;
}

.client-portal-panel {
  margin-bottom: 20px;
}

.client-portal-progress-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.client-portal-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8eef6;
}

.client-portal-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  transition: width 180ms ease;
}

.client-portal-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.client-portal-progress-copy strong {
  color: var(--brand-dark);
  white-space: nowrap;
}

.client-portal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.client-portal-summary div,
.client-portal-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.client-portal-summary span,
.client-portal-step small {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.client-portal-summary strong,
.client-portal-step strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.96rem;
}

.client-portal-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.client-portal-step {
  min-height: 112px;
}

.client-portal-step.complete {
  border-color: #b7dcc2;
  background: #eefaf1;
}

.client-portal-step.current {
  border-color: #ead6aa;
  background: #fff7e7;
}

.client-portal-step-marker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--brand-dark);
  background: #fff;
  font-size: 0.75rem;
}

.client-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-detected-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.client-detected-room {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-detected-room-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  color: var(--brand-dark);
  background: #eef4fb;
}

.client-detected-room-heading h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.client-detected-room-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.client-detected-room-items {
  display: grid;
}

.client-detected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
}

.client-detected-row:first-child {
  border-top: 0;
}

.client-detected-item-name {
  color: var(--ink);
  font-size: 0.96rem;
}

.client-detected-row .secondary-button {
  white-space: nowrap;
}

.quote-draft {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
  line-height: 1.45;
}

.quote-draft:focus {
  outline: 3px solid rgba(29, 69, 120, 0.16);
  border-color: var(--brand);
}

.saved-quotes-panel {
  max-width: 980px;
  margin: 0 auto;
}

.saved-search {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 800;
}

.saved-search input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.saved-quotes-list {
  display: grid;
  gap: 12px;
}

.saved-quotes-list.scroll-limited,
.sales-leads-list.scroll-limited {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.saved-quotes-list.scroll-limited::-webkit-scrollbar,
.sales-leads-list.scroll-limited::-webkit-scrollbar {
  width: 6px;
}

.saved-quotes-list.scroll-limited::-webkit-scrollbar-thumb,
.sales-leads-list.scroll-limited::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d4deeb;
}

.saved-quotes-list.scroll-limited::-webkit-scrollbar-track,
.sales-leads-list.scroll-limited::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.saved-quote-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.saved-quote-select {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.saved-quote-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.saved-quote-row strong,
.saved-quote-row span {
  display: block;
}

.saved-quote-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.saved-email-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.saved-quote-row .email-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.saved-quote-row .ai-status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 26px;
  margin-top: 10px;
  border: 1px solid #c8d7ec;
  border-radius: 999px;
  padding: 4px 9px;
  color: #1d4578;
  background: #eef4fb;
  font-size: 0.78rem;
  font-weight: 900;
}

.ai-status-pill.complete {
  border-color: #b7dcc2;
  color: #14632f;
  background: #eefaf1;
}

.ai-status-pill.partial {
  border-color: #ead6aa;
  color: #7a4c06;
  background: #fff7e7;
}

.ai-status-pill.queued,
.ai-status-pill.pending {
  border-color: #c8d7ec;
  color: #1d4578;
  background: #eef4fb;
}

.ai-status-pill.sample,
.ai-status-pill.failed {
  border-color: #f0b4b4;
  color: #8a1f1f;
  background: #fff0f0;
}

.email-status-pill.sent {
  border-color: #b7dcc2;
  color: #14632f;
  background: #eefaf1;
}

.email-status-pill.pending {
  border-color: #ead6aa;
  color: #7a4c06;
  background: #fff7e7;
}

.email-status-pill.action-needed {
  border-color: #d45454;
  color: #8a1f1f;
  background: #fff0f0;
}

.saved-quote-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.job-workspace-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.job-workspace-nav h2 {
  margin-bottom: 0;
}

.job-workspace-nav .heading-actions {
  flex-wrap: wrap;
}

.job-workspace-nav .heading-actions .active {
  color: white;
  background: var(--brand);
}

.email-progress-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fbfcfd;
}

.email-progress-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.email-progress-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.email-progress-strip .send-status-pill {
  min-height: 30px;
}

.staff-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.link-builder-panel {
  max-width: 820px;
  margin: 0 auto;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 10px;
  align-items: start;
}

#dashboardView .panel {
  padding: 18px;
}

#dashboardView .panel-heading {
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-hero-panel,
.dashboard-calendar-panel {
  grid-column: 1 / -1;
}

.dashboard-manual-event-panel {
  grid-column: 1 / -1;
}

.dashboard-recent-panel {
  padding-bottom: 10px;
}

.dashboard-metric-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-period-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px 4px 10px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.82rem;
}

.dashboard-period-control select {
  min-height: 30px;
  border: 0;
  color: var(--brand-dark);
  background: transparent;
  font: inherit;
}

.dashboard-stats-period-label {
  margin: -4px 0 0;
}

.dashboard-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.dashboard-calendar-heading {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-calendar-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fbfcfd;
}

.dashboard-calendar-day.empty {
  border-style: dashed;
  background: #f5f7fa;
}

.dashboard-calendar-day.today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(29, 69, 120, 0.18);
}

.dashboard-calendar-day strong {
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 600;
}

.dashboard-calendar-event {
  overflow: hidden;
  border-radius: 6px;
  padding: 4px 6px;
  color: #153457;
  background: #eef4fb;
  font-size: 0.76rem;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-event.move,
.dashboard-calendar-event.delivery {
  color: #14632f;
  background: #eefaf1;
}

.dashboard-calendar-event.follow-up {
  color: #7a4c06;
  background: #fff7e7;
}

.dashboard-calendar-event.accepted {
  color: #8a1f1f;
  background: #fff0f0;
}

.dashboard-calendar-event.custom {
  color: #153457;
  background: #eaf1f8;
}

.dashboard-calendar-event.public-holiday {
  border-left: 3px solid #bf3f3f;
  color: #7f1d1d;
  background: #fff0f0;
}

.dashboard-calendar-event.notable-day {
  border-left: 3px solid #8b6f2f;
  color: #6a4b08;
  background: #fff8df;
}

.dashboard-calendar-event.sync-failed {
  color: #8a1f1f;
  background: repeating-linear-gradient(135deg, #fff0f0, #fff0f0 7px, #ffe4e4 7px, #ffe4e4 14px);
}

.dashboard-calendar-more {
  color: var(--muted);
  font-size: 0.76rem;
}

.dashboard-job-list {
  display: grid;
  gap: 7px;
}

.dashboard-manual-event-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}

.dashboard-manual-event-details {
  display: grid;
}

.dashboard-manual-event-summary {
  list-style: none;
  cursor: pointer;
  width: 100%;
  margin: 0;
  padding: 0;
}

.dashboard-manual-event-summary::-webkit-details-marker {
  display: none;
}

.dashboard-manual-event-summary::marker {
  display: none;
}

.dashboard-manual-event-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: auto;
}
.dashboard-manual-event-details[open] .dashboard-manual-event-summary::after {
  transform: rotate(-135deg);
}
.manual-event-panel-content {
  margin-top: 10px;
}

.dashboard-job-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  text-decoration: none;
}

.dashboard-job-row > strong {
  color: var(--brand-dark);
  font-size: 0.88rem;
}

.dashboard-job-row b,
.dashboard-job-row small {
  display: block;
}

.dashboard-job-row small {
  margin-top: 2px;
  color: var(--muted);
}

.dashboard-job-row em {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-size: 0.74rem;
  font-style: normal;
  white-space: nowrap;
}

.dashboard-truck-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-truck-day {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #fbfcfd;
  min-width: 0;
}

.dashboard-truck-day h3 {
  margin: 0;
  white-space: nowrap;
  text-transform: capitalize;
  color: var(--brand-dark);
  font-size: 0.88rem;
  line-height: 1.2;
}

.dashboard-truck-day-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-truck-day-unallocated {
  display: grid;
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.dashboard-truck-day-unallocated-title {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.dashboard-truck-day-unallocated-list {
  display: grid;
  gap: 4px;
  max-height: 82px;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-unassigned-job {
  appearance: none;
  border: 1px dashed #95abc6;
  border-radius: 6px;
  padding: 5px 7px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: grab;
}

.dashboard-unassigned-job:hover {
  background: #eef4fb;
}

.dashboard-unassigned-job.is-dragging {
  opacity: 0.6;
}

.dashboard-truck-available,
.dashboard-truck-warning,
.dashboard-truck-resource {
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.74rem;
  line-height: 1.2;
}

.dashboard-truck-available,
.dashboard-truck-resource.available {
  color: #14632f;
  background: #eefaf1;
}

.dashboard-truck-warning {
  color: #7a4c06;
  background: #fff7e7;
}

.dashboard-truck-resource.assigned {
  color: var(--brand-dark);
  background: #eef4fb;
}

.dashboard-truck-resource.drag-over {
  border-color: var(--brand);
  background: #e4ecf7;
}

.dashboard-truck-resource span,
.dashboard-truck-resource a,
.dashboard-truck-resource small {
  display: block;
}

.dashboard-truck-resource span {
  margin-bottom: 3px;
  font-weight: 600;
  font-size: 0.74rem;
}

.dashboard-truck-resource a {
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
}

.dashboard-truck-resource small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.dashboard-truck-warning {
  margin-top: 2px;
  line-height: 1.3;
}

body .dashboard-truck-board .dashboard-muted {
  color: var(--muted);
  font-size: 0.7rem;
}

.dashboard-list {
  display: grid;
  gap: 7px;
}

.dashboard-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  text-decoration: none;
}

.dashboard-recent-list {
  max-height: 214px;
  padding-right: 5px;
  overflow-y: auto;
  overflow-x: hidden;
}

.dashboard-recent-list .dashboard-list-row {
  padding: 9px 10px;
}

.dashboard-recent-list::-webkit-scrollbar {
  width: 6px;
}

.dashboard-recent-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d4deeb;
}

.dashboard-recent-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.dashboard-list-dismissable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: stretch;
}

.dashboard-list-dismissable .dashboard-list-row {
  min-width: 0;
}

.dashboard-dismiss-task {
  width: 30px;
  min-height: 30px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.dashboard-dismiss-task:hover,
.dashboard-dismiss-task:focus-visible {
  color: #9f2d2d;
  border-color: #e6b9b9;
  background: #fff5f5;
}

.dashboard-list-row strong,
.dashboard-list-row small {
  display: block;
}

.dashboard-list-row small {
  margin-top: 2px;
  color: var(--muted);
}

.dashboard-list-row em {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.sales-panel {
  max-width: 1120px;
  margin: 0 auto;
}

.sales-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.sales-period-control {
  margin: 0;
}

.sales-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.85fr);
  gap: 14px;
  margin: 0 0 18px;
}

.sales-dashboard-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.sales-pipeline-card {
  grid-row: span 2;
}

.compact-heading {
  margin: 0;
}

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

.sales-pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sales-pipeline-stage {
  display: grid;
  gap: 5px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.sales-pipeline-stage span,
.sales-pipeline-stage small {
  color: var(--muted);
  font-size: 0.78rem;
}

.sales-pipeline-stage strong {
  color: var(--brand-dark);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.sales-pipeline-stage.sent,
.sales-pipeline-stage.follow-up {
  border-top-color: #d99a22;
}

.sales-pipeline-stage.accepted {
  border-top-color: #18864b;
}

.sales-pipeline-stage.lost {
  border-top-color: #b83b3b;
}

.sales-follow-up-queue,
.sales-source-list {
  display: grid;
  gap: 8px;
}

.sales-follow-up-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: inherit;
  background: white;
  text-decoration: none;
}

.sales-follow-up-row span {
  display: grid;
  gap: 3px;
}

.sales-follow-up-row strong,
.sales-follow-up-row small {
  display: block;
}

.sales-follow-up-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.sales-follow-up-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
}

.sales-follow-up-row em.overdue {
  color: #8a1f1f;
  background: #fff0f0;
}

.sales-follow-up-row em.today {
  color: #7a4c06;
  background: #fff7e7;
}

.sales-source-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.sales-source-row strong,
.sales-source-row span {
  display: block;
}

.sales-source-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sales-source-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e7edf4;
}

.sales-source-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.sales-leads-list {
  display: grid;
  gap: 12px;
}

.sales-lead-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.35fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.sales-lead-copy strong,
.sales-lead-copy span {
  display: block;
}

.sales-lead-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.sales-status-pill {
  display: inline-flex;
  width: max-content;
  margin-top: 10px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-size: 0.78rem;
  font-weight: 600;
}

.sales-status-pill.won {
  border-color: #b7dcc2;
  color: #14632f;
  background: #eefaf1;
}

.sales-status-pill.lost,
.sales-status-pill.no-response,
.sales-status-pill.not-proceeding {
  border-color: #f0b4b4;
  color: #8a1f1f;
  background: #fff0f0;
}

.sales-status-pill.follow-up,
.sales-status-pill.quote-sent {
  border-color: #ead6aa;
  color: #7a4c06;
  background: #fff7e7;
}

.sales-lead-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.sales-lead-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.sales-lead-controls label.wide {
  grid-column: 1 / -1;
}

.sales-lead-controls input,
.sales-lead-controls select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.sales-lead-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.sales-save-status {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.settings-panel {
  max-width: 1040px;
  margin: 0 auto;
}

.settings-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #f7f9fb;
}

.settings-tab {
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.settings-tab.active {
  color: white;
  background: var(--brand);
}

.settings-panel-body {
  margin-top: 12px;
}

.organisation-settings-layout {
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.organisation-settings-menu {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #f7f9fb;
}

.organisation-settings-menu-button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.organisation-settings-menu-button.active {
  color: white;
  background: var(--brand);
}

.organisation-settings-content {
  min-width: 0;
}

.organisation-settings-panel:not(.active) {
  display: none;
}

.settings-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.settings-list-tight {
  gap: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.settings-row h3 {
  margin-bottom: 6px;
}

.settings-row h4 {
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 600;
}

.settings-row-block {
  display: grid;
  align-items: start;
}

.settings-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 420px);
}

.settings-action-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.backup-settings-row {
  gap: 14px;
}

.backup-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.backup-action-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.backup-action-card .settings-action-stack {
  justify-content: flex-start;
}

.backup-action-card button,
.backup-restore-grid button,
.backup-app-row button {
  justify-self: start;
}

.backup-inline-status {
  border-radius: 8px;
  padding: 8px 10px;
  background: #f5f7fa;
}

.backup-restore-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  width: 100%;
}

.backup-file-picker {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.backup-file-picker input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.backup-app-row {
  padding: 13px 16px;
}

.integration-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.integration-status-card {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.integration-status-card h4 {
  margin: 0;
}

.integration-status-list {
  display: grid;
  gap: 8px;
}

.integration-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.integration-status-row strong,
.integration-status-row span {
  display: block;
}

.integration-status-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.integration-status-row em {
  border-radius: 999px;
  padding: 5px 8px;
  color: #8a1f1f;
  background: #fff0f0;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.integration-status-row.ready em {
  color: #14632f;
  background: #eefaf1;
}

.integration-status-row.optional em {
  color: #5d6670;
  background: #eef2f7;
}

.compact-status {
  width: 100%;
  margin-top: 0;
}

.settings-control.stacked {
  align-items: stretch;
  flex-direction: column;
}

.settings-control input,
.settings-control select,
.settings-control textarea {
  flex: 1 1 240px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.settings-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.settings-field-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.settings-field-grid label.wide {
  grid-column: 1 / -1;
}

.settings-field-grid input,
.settings-field-grid select,
.settings-field-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.account-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.account-usage-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.account-usage-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

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

.account-usage-copy span,
.account-usage-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.account-usage-row.at-limit {
  border-color: #efb4b4;
  background: #fff7f7;
}

.account-usage-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7edf4;
}

.account-usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.account-usage-row.at-limit .account-usage-meter span {
  background: #b83b3b;
}

.staff-seat-summary {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.9rem;
}

.staff-seat-summary.at-limit {
  border-color: #efc36d;
  color: #6d4a05;
  background: #fff9ea;
}

.staff-user-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.staff-user-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) repeat(2, minmax(120px, 0.7fr)) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.staff-user-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.staff-user-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #fbfcfd;
}

.staff-user-empty strong,
.staff-user-empty span {
  display: block;
}

.compact-actions {
  margin-top: 0;
}

.launch-readiness-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.launch-readiness-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.launch-readiness-row strong,
.launch-readiness-row span {
  display: block;
}

.launch-readiness-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.launch-readiness-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: #8a1f1f;
  background: #fff0f0;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.launch-readiness-row.ready em {
  color: #14632f;
  background: #eefaf1;
}

.logo-settings-control {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.logo-settings-control img {
  width: 150px;
  height: 105px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.terms-settings-control {
  display: grid;
  gap: 10px;
  width: 100%;
}

.terms-settings-control input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.terms-page-list {
  display: grid;
  gap: 8px;
}

.terms-page-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: white;
}

.terms-page-row img {
  width: 58px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f5f7fa;
}

.terms-page-row strong,
.terms-page-row span {
  display: block;
}

.terms-page-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.fleet-summary {
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.fleet-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.fleet-row {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.9fr 0.7fr minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.fleet-row label,
.email-template-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.fleet-row .wide {
  min-width: 0;
}

.fleet-row input,
.fleet-row select,
.email-template-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  font: inherit;
}

.email-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.email-template-grid label:first-child {
  grid-column: 1 / -1;
}

.email-template-grid textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

.template-help {
  width: 100%;
}

.import-help {
  display: grid;
  gap: 6px;
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.import-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.import-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.import-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 1.35rem;
  font-weight: 600;
}

.import-results-list {
  display: grid;
  gap: 8px;
  width: 100%;
  max-height: 280px;
  overflow: auto;
}

.import-result-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.import-result-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.import-result-row strong {
  color: var(--ink);
  font-weight: 500;
}

.yard-map-panel {
  display: grid;
  gap: 16px;
}

.yard-map-panel:not(.editing) {
  gap: 12px;
}

.yard-map-panel:not(.editing) [data-yard-edit-only] {
  display: none;
}

.yard-size-controls,
.yard-map-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.yard-map-controls {
  grid-template-columns: 1.4fr 150px 130px auto;
}

.yard-size-controls span {
  display: block;
  margin: 3px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.yard-map-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yard-layout-editor {
  display: grid;
  gap: 10px;
}

.yard-editor-row {
  display: grid;
  grid-template-columns: 122px minmax(150px, 1.4fr) minmax(78px, 0.7fr) minmax(68px, 0.5fr) minmax(118px, 0.8fr) repeat(4, minmax(76px, 0.7fr)) auto auto auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.yard-editor-row.laneway {
  background: #f6f8fb;
}

.yard-editor-row.parking {
  background: #f7fbf7;
}

.yard-editor-row.selected {
  border-color: var(--brand-blue);
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(29, 69, 120, 0.12);
}

.yard-editor-row strong {
  color: var(--brand-dark);
  align-self: center;
}

.yard-editor-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.yard-editor-field.wide {
  min-width: 150px;
}

.yard-editor-row input,
.yard-editor-row select {
  min-height: 38px;
}

.yard-map-preview {
  overflow-x: auto;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.yard-map-panel:not(.editing) .yard-map-preview {
  padding: 10px;
}

.yard-map-panel:not(.editing) #yardMapStatus {
  margin-top: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 0.86rem;
}

.yard-map-scale {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.yard-map-canvas {
  position: relative;
  min-width: 760px;
  height: clamp(440px, 54vw, 680px);
  border: 2px solid #c8d7ec;
  border-radius: 8px;
  background:
    linear-gradient(rgba(29, 69, 120, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 69, 120, 0.08) 1px, transparent 1px),
    #f4f8fc;
  background-size: 5% 5%;
}

.yard-map-canvas::before {
  content: "Yard / storage area";
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 1;
  color: rgba(29, 69, 120, 0.55);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.yard-map-object {
  position: absolute;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 54px;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid #9eb6d5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(16, 35, 63, 0.08);
  outline: none;
  touch-action: none;
}

.yard-map-canvas.view-only .yard-map-object {
  cursor: default;
  touch-action: auto;
}

.yard-map-object.row {
  border-color: #7fa3ce;
  background: rgba(255, 255, 255, 0.98);
}

.yard-map-object.selected,
.yard-map-object:focus-visible {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(29, 69, 120, 0.2), 0 12px 22px rgba(16, 35, 63, 0.12);
}

.yard-map-object.editing {
  opacity: 0.92;
}

.yard-object-title {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  padding: 5px 7px;
  color: white;
  background: var(--brand-dark);
  font-size: 0.74rem;
  line-height: 1.1;
  cursor: grab;
  user-select: none;
}

.yard-object-title:active {
  cursor: grabbing;
}

.yard-map-panel:not(.editing) .yard-object-title {
  cursor: default;
  pointer-events: none;
}

.yard-map-object.laneway {
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: stretch;
  border-style: dashed;
  border-color: #6f86a3;
  background: repeating-linear-gradient(
    135deg,
    rgba(224, 232, 242, 0.96),
    rgba(224, 232, 242, 0.96) 12px,
    rgba(199, 213, 231, 0.96) 12px,
    rgba(199, 213, 231, 0.96) 24px
  );
  box-shadow: none;
}

.yard-map-object.laneway .yard-object-title {
  position: sticky;
  top: 0;
  color: white;
  background: #49627e;
  text-align: center;
}

.yard-map-object.parking {
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: stretch;
  border-color: #6d9079;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    rgba(231, 243, 235, 0.96);
  background-size: 22px 22px;
  box-shadow: 0 8px 18px rgba(35, 83, 57, 0.08);
}

.yard-map-object.parking .yard-object-title {
  position: sticky;
  top: 0;
  color: white;
  background: #3f6655;
  text-align: center;
}

.yard-laneway-label,
.yard-parking-label {
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 6px;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.yard-laneway-label {
  color: #314963;
}

.yard-parking-label {
  color: #2f5f43;
}

.yard-map-resize-handle {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(29, 69, 120, 0.45);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(29, 69, 120, 0.55) 46% 54%, transparent 55%),
    white;
  cursor: nwse-resize;
  opacity: 0.82;
  padding: 0;
  touch-action: none;
}

.yard-map-resize-handle:hover,
.yard-map-resize-handle:focus {
  opacity: 1;
  outline: 2px solid rgba(29, 69, 120, 0.24);
}

.yard-map-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: stretch;
}

.yard-map-row > strong {
  display: grid;
  place-items: center;
  border: 1px solid #c8d7ec;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #eef4fb;
}

.yard-bay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 5px;
  min-width: 0;
  overflow: auto;
  padding: 7px;
}

.yard-bay {
  display: grid;
  gap: 4px;
  min-height: 42px;
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  padding: 6px;
  color: #1d4578;
  background: white;
  font-weight: 900;
  line-height: 1.1;
}

.yard-bay strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yard-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 4px;
}

.yard-stack {
  display: grid;
  gap: 2px;
  min-height: 28px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  padding: 4px;
  color: #1d4578;
  background: #f8fafc;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.yard-stack:hover,
.yard-stack:focus-visible {
  border-color: var(--brand);
  outline: 2px solid rgba(29, 69, 120, 0.16);
}

.yard-stack span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yard-stack.occupied {
  border-color: #b7dcc2;
  color: #14632f;
  background: #eefaf1;
}

.yard-laneway {
  border: 1px dashed #8ca3bf;
  border-radius: 8px;
  padding: 12px;
  color: #49627e;
  background: repeating-linear-gradient(
    135deg,
    #f2f5f9,
    #f2f5f9 12px,
    #e6edf5 12px,
    #e6edf5 24px
  );
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.login-panel {
  max-width: 460px;
  margin: 72px auto;
  text-align: center;
}

.thanks-panel {
  max-width: 620px;
  margin: 46px auto;
  text-align: center;
}

.thanks-reference {
  margin: 16px 0;
  color: var(--brand);
  font-weight: 800;
}

.login-logo {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 18px;
}

.login-logo-frame {
  width: 112px;
  margin: 0 auto 18px;
}

.login-logo-frame .login-logo {
  margin: 0;
}

.login-logo-frame .product-logo-fallback {
  width: 112px;
  height: 112px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.login-logo-fallback {
  width: 180px;
  margin: 0 auto 18px;
}

.login-form {
  margin-top: 22px;
  text-align: left;
}

.login-error {
  min-height: 22px;
  margin: 14px 0 0;
  color: #7b1f1f;
  font-weight: 800;
}

.summary-panel {
  grid-column: 1 / -1;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #fbfcfd;
}

button.metric {
  width: 100%;
  text-align: left;
}

.dashboard-shortcut {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-shortcut:hover,
.dashboard-shortcut:focus-visible {
  border-color: rgba(29, 69, 120, 0.45);
  box-shadow: 0 10px 24px rgba(19, 47, 85, 0.1);
  transform: translateY(-1px);
}

.dashboard-shortcut:focus-visible {
  outline: 2px solid rgba(29, 69, 120, 0.35);
  outline-offset: 2px;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.metric strong {
  font-size: 1.35rem;
}

.metric.featured {
  color: white;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.metric.featured span {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-panel-highlight {
  animation: dashboard-panel-pulse 1.35s ease;
}

@keyframes dashboard-panel-pulse {
  0%,
  100% {
    box-shadow: 0 18px 50px rgba(19, 47, 85, 0.1);
  }
  35% {
    border-color: rgba(29, 69, 120, 0.7);
    box-shadow: 0 0 0 4px rgba(29, 69, 120, 0.12), 0 18px 50px rgba(19, 47, 85, 0.14);
  }
}

.review-client-details {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.review-client-details-heading h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.review-client-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.review-client-detail-grid div {
  min-width: 0;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.review-client-detail-grid span,
.review-client-detail-grid strong {
  display: block;
}

.review-client-detail-grid span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.review-client-detail-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.review-client-detail-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.review-client-detail-grid label {
  display: grid;
  gap: 4px;
}

.review-date-pair {
  display: grid;
  gap: 8px;
}

.review-date-pair label {
  gap: 4px;
}

.review-date-pair span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.adjuster {
  display: grid;
  grid-template-columns: 150px 1fr 70px;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.adjuster label {
  font-weight: 800;
}

.adjuster output {
  text-align: right;
  font-weight: 800;
}

.compact-review-panel {
  min-height: 0;
}

.inventory-list {
  display: grid;
  gap: 10px;
  max-height: min(620px, 68vh);
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.inventory-room-banner,
.client-detected-room-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--brand-dark);
  background: #eef4fb;
  font-weight: 900;
}

.inventory-room-banner span {
  color: var(--muted);
  font-size: 0.86rem;
}

.inventory-row {
  display: grid;
  grid-template-columns: 1fr 78px 34px;
  gap: 8px;
  align-items: center;
}

.inventory-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.inventory-row-summary {
  grid-template-columns: minmax(0, 1fr) 92px minmax(180px, 0.8fr);
}

.inventory-row-summary input {
  color: var(--brand-dark);
  background: #eef4fb;
}

.inventory-summary-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.carton-estimate-banner {
  margin-top: 4px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: #111111;
  cursor: pointer;
}

.risk-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.risk-list li + li {
  margin-top: 10px;
}

.staff-notes {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.staff-note-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.staff-note-group h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.staff-note-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.staff-note-group li + li {
  margin-top: 8px;
}

.scan-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  align-content: start;
  gap: 10px;
  max-height: min(430px, 58vh);
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.scan-media-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.scan-media-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: #eef2f7;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.scan-media-preview img,
.scan-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-media-preview video {
  background: #101418;
}

.scan-media-fallback {
  font-weight: 900;
}

.scan-media-copy {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.scan-media-copy strong,
.scan-media-copy span,
.scan-media-copy a {
  overflow-wrap: anywhere;
}

.scan-media-copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.scan-media-copy a {
  color: var(--brand);
  font-weight: 900;
}

.scan-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.scan-media-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.media-preview-modal {
  display: grid;
  gap: 12px;
  width: min(1040px, 100%);
  max-height: calc(100vh - 36px);
}

.media-preview-frame {
  display: grid;
  place-items: center;
  overflow: auto;
  min-height: 220px;
  max-height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f5f7fa;
}

.media-preview-frame img,
.media-preview-frame video {
  display: block;
  max-width: 100%;
  max-height: calc(72vh - 30px);
  border-radius: 6px;
  object-fit: contain;
  background: #101418;
}

.media-preview-actions {
  margin-top: 0;
}

.secondary-button.disabled,
.secondary-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.ai-status {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: #fbfcfd;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  transform: translateY(16px);
  opacity: 0;
  border-radius: 8px;
  padding: 14px 16px;
  color: white;
  background: var(--brand-dark);
  box-shadow: 0 16px 40px rgba(19, 47, 85, 0.22);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.modal-backdrop {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  place-items: center;
  padding: 18px;
  background: rgba(7, 17, 31, 0.62);
}

.modal-backdrop.visible {
  display: grid;
}

.modal {
  width: min(520px, 100%);
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 22px;
  background: white;
  box-shadow: 0 22px 70px rgba(7, 17, 31, 0.28);
}

.privacy-modal {
  border-top: 6px solid #8a1f1f;
}

body {
  font-weight: 400;
}

h1,
h2,
h3,
strong,
b,
.offline-banner,
.logo-fallback span,
.eyebrow,
.section-kicker,
.secure-pill,
.risk-badge,
.integration-badge,
.details-form label,
.address-powered,
.prepack-material-head,
.docket-plastic-head,
.primary-button,
.secondary-button,
.action-status a,
.room-file-count,
.file-room,
.saved-search,
.saved-quote-row .email-status-pill,
.saved-quote-row .ai-status-pill,
.yard-size-controls span,
.yard-editor-row strong,
.yard-editor-field,
.yard-map-scale,
.yard-map-canvas::before,
.yard-object-title,
.yard-map-object.laneway .yard-object-title,
.yard-map-object.parking .yard-object-title,
.yard-laneway-label,
.yard-parking-label,
.yard-map-row > strong,
.yard-bay,
.yard-bay strong,
.yard-stack,
.yard-stack span,
.yard-laneway,
.thanks-reference,
.login-error,
.adjuster label,
.adjuster output,
.inventory-room-banner,
.client-detected-room-banner,
.scan-media-fallback,
.scan-media-copy a {
  font-weight: 600;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .panel-heading,
  .actions-row,
  .job-workspace-nav,
  .email-progress-strip,
  .settings-row {
    align-items: stretch;
    flex-direction: column;
  }

  .email-progress-pills {
    justify-content: flex-start;
  }

  .sales-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sales-pipeline-card {
    grid-row: auto;
  }

  .sales-pipeline-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .organisation-settings-menu {
    display: flex;
    overflow-x: auto;
    padding: 5px;
  }

  .organisation-settings-menu-button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 9px;
    margin-bottom: 14px;
    padding: 10px;
  }

  .brand-lockup {
    align-items: center;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-lockup h1 {
    font-size: 1.25rem;
  }

  .brand-lockup .eyebrow {
    font-size: 0.62rem;
  }

  .mode-tabs {
    justify-content: flex-start;
  }

  .tab {
    padding: 8px 9px;
  }

  .client-layout,
  .dashboard-layout,
  .details-form,
  .staff-grid,
  .settings-field-grid,
  .account-summary-grid,
  .import-summary-grid,
  .metric-grid,
  .review-client-detail-grid,
  .dashboard-metric-grid,
  .sales-metric-grid,
  .client-portal-summary,
  .client-portal-progress,
  .email-template-grid,
  .fleet-row,
  .staff-user-row,
  .backup-action-grid,
  .backup-restore-grid,
  .integration-status-grid,
  .yard-size-controls,
  .yard-map-controls,
  .yard-editor-row,
  .yard-map-row {
    grid-template-columns: 1fr;
  }

  .backup-action-card button,
  .backup-restore-grid button,
  .backup-app-row button {
    justify-self: stretch;
  }

  .terms-page-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .terms-page-row button {
    grid-column: 1 / -1;
  }

  .yard-map-canvas {
    min-width: 640px;
    height: 520px;
  }

  .dashboard-truck-board {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .dashboard-truck-day {
    padding: 8px;
  }

  .dashboard-truck-day-header {
    flex-direction: column;
    gap: 5px;
  }

  .quote-card {
    position: static;
  }

  .room-grid {
    grid-template-columns: 1fr;
  }

  .room-upload-card,
  .inventory-row,
  .file-row,
  .docket-plastic-row,
  .prepack-material-list label,
  .client-detected-row,
  .dashboard-job-row,
  .import-result-row {
    grid-template-columns: 1fr;
  }

  .docket-plastic-head,
  .prepack-material-head {
    display: none;
  }

  .file-actions {
    justify-content: stretch;
  }

  .file-preview {
    width: 64px;
    height: 64px;
  }

  .settings-control {
    align-items: stretch;
    flex-direction: column;
  }

  .file-actions button,
  .client-detected-row button {
    width: 100%;
  }

  .saved-quote-row {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-calendar-heading {
    display: none;
  }

  .dashboard-calendar-day.empty {
    display: none;
  }

  .sales-lead-row,
  .sales-lead-controls {
    grid-template-columns: 1fr;
  }

  .sales-lead-actions {
    justify-items: stretch;
  }

  .saved-quote-actions {
    justify-content: stretch;
  }

  .saved-quote-actions button,
  .saved-quote-actions a {
    flex: 1;
  }

  .adjuster {
    grid-template-columns: 1fr;
  }

  .manual-item-controls {
    grid-template-columns: 1fr;
  }

  .address-powered {
    position: static;
    display: inline-block;
    margin-bottom: 6px;
  }

  .address-field-wrap input {
    padding-right: 12px;
  }

  .adjuster output {
    text-align: left;
  }

  .dashboard-period-control {
    justify-content: space-between;
    width: 100%;
  }

  .dashboard-period-control select {
    flex: 1;
  }

  .client-share-link .app-shell {
    width: 100%;
    padding: 0 0 28px;
  }

  .client-share-link .topbar {
    grid-template-columns: 1fr;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 8px 12px;
    box-shadow: none;
  }

  .client-share-link .brand-lockup {
    gap: 8px;
  }

  .client-share-link .brand-logo {
    width: 38px;
    height: 38px;
  }

  .client-share-link .brand-lockup .eyebrow {
    display: none;
  }

  .client-share-link .brand-lockup h1 {
    font-size: 1.05rem;
  }

  .client-share-link .client-layout {
    gap: 0;
  }

  .client-share-link .client-portal-panel {
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 10px 14px;
    box-shadow: none;
  }

  .client-share-link .client-portal-progress-strip {
    gap: 6px;
    margin-bottom: 8px;
  }

  .client-share-link .client-portal-progress-copy {
    align-items: center;
    font-size: 0.78rem;
  }

  .client-share-link .client-portal-summary,
  .client-share-link .client-portal-progress {
    display: none;
  }

  .client-share-link .quote-card {
    display: none;
  }

  .client-share-link .upload-panel {
    border: 0;
    border-radius: 0;
    padding: 14px 14px 24px;
    box-shadow: none;
  }

  .client-share-link .upload-panel > .panel-heading {
    display: block;
    margin-bottom: 10px;
  }

  .client-share-link .upload-panel > .panel-heading .section-kicker,
  .client-share-link .upload-panel > .panel-heading .secure-pill {
    display: none;
  }

  .client-share-link .upload-panel > .panel-heading h2 {
    font-size: 1.15rem;
  }

  .client-share-link .client-flow-progress {
    position: sticky;
    z-index: 12;
    top: 0;
    gap: 4px;
    margin: 0 -14px 12px;
    border-bottom: 1px solid var(--line);
    padding: 8px 14px 7px;
    background: white;
  }

  .client-share-link .client-flow-step {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-radius: 7px;
    padding: 6px 4px;
    text-align: center;
  }

  .client-share-link .client-flow-step span {
    width: 24px;
    height: 24px;
    font-size: 0.76rem;
  }

  .client-share-link .client-flow-step strong {
    width: 100%;
    font-size: 0.74rem;
    text-align: center;
    white-space: normal;
  }

  .client-share-link .client-step-panel {
    gap: 10px;
  }

  .client-share-link .selected-room-summary {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .client-share-link #clientDetailsForm {
    gap: 10px;
    margin-bottom: 18px;
  }

  .client-share-link #clientDetailsForm label {
    gap: 5px;
    font-size: 0.86rem;
  }

  .client-share-link input,
  .client-share-link select,
  .client-share-link textarea {
    font-size: 16px;
  }

  .client-share-link #clientDetailsForm input,
  .client-share-link #clientDetailsForm select,
  .client-share-link #clientDetailsForm textarea {
    min-height: 42px;
    border-radius: 7px;
    padding: 9px 11px;
  }

  .client-share-link #clientDetailsForm textarea {
    min-height: 84px;
  }

  .client-share-link .room-grid {
    gap: 8px;
  }

  .client-share-link .room-option,
  .client-share-link .room-upload-card {
    border-radius: 7px;
    padding: 10px;
  }

  .client-share-link .upload-zone {
    min-height: 210px;
    padding: 18px;
  }

  .client-share-link .file-row {
    gap: 9px;
  }

  .client-share-link .client-step-actions {
    position: sticky;
    z-index: 14;
    bottom: 0;
    margin: 12px -14px -24px;
    border-top: 1px solid var(--line);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: white;
    box-shadow: 0 -10px 24px rgba(19, 47, 85, 0.08);
  }

  .client-share-link .client-step-actions button {
    width: 100%;
  }
}

/* Softer type treatment for a cleaner staff-tool feel. */
body {
  font-weight: 400;
}

h1,
h2,
h3,
strong,
b,
.metric strong,
.saved-quote-row strong,
.dashboard-list-row strong,
.sales-lead-copy strong,
.client-meta strong,
.yard-editor-row strong,
.yard-map-row > strong {
  font-weight: 600;
}

.offline-banner,
.logo-fallback span,
.eyebrow,
.section-kicker,
.secure-pill,
.risk-badge,
.integration-badge,
.details-form label,
.address-powered,
.prepack-material-head,
.docket-plastic-head,
.primary-button,
.secondary-button,
.action-status a,
.room-file-count,
.file-room,
.saved-search,
.saved-quote-row .email-status-pill,
.saved-quote-row .ai-status-pill,
.client-portal-step-marker,
.dashboard-calendar-heading,
.dashboard-calendar-day strong,
.dashboard-job-row > strong,
.dashboard-job-row b,
.dashboard-job-row em,
.dashboard-list-row em,
.sales-status-pill,
.sales-lead-controls label,
.yard-size-controls span,
.yard-editor-field,
.yard-map-scale,
.yard-map-canvas::before,
.yard-object-title,
.yard-map-object.laneway .yard-object-title,
.yard-map-object.parking .yard-object-title,
.yard-laneway-label,
.yard-parking-label,
.yard-bay,
.yard-bay strong,
.yard-stack,
.yard-stack span,
.yard-laneway,
.dashboard-truck-resource span,
.thanks-reference,
.login-error,
.adjuster label,
.adjuster output,
.inventory-room-banner,
.client-detected-room-banner,
.scan-media-fallback,
.scan-media-copy a {
  font-weight: 500;
}
