:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5f6c7a;
  --line: rgba(15, 50, 80, 0.18);
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --bg: #edf4f8;
  --brand: #064e92;
  --brand-strong: #01253d;
  --accent: #b2872f;
  --good: #177245;
  --warn: #9a6115;
  --danger: #a43a36;
  --button-gradient: linear-gradient(90deg, #000428 0%, #004e92 51%, #000428 100%);
  --glass: rgba(255, 255, 255, 0.58);
  --field: rgba(255, 255, 255, 0.92);
  --field-gradient: linear-gradient(180deg, rgba(248, 253, 255, 0.95) 0%, rgba(228, 242, 251, 0.82) 54%, rgba(205, 227, 243, 0.7) 100%);
  --select-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(191, 226, 248, 0.48) 52%, rgba(125, 181, 219, 0.34) 100%);
  --select-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.08) 42%, rgba(14, 88, 145, 0.12));
  --select-border: rgba(30, 99, 151, 0.34);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23064e92' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --shadow: 0 12px 34px rgba(18, 35, 54, 0.18);
}

body.night-mode,
html[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f3f8fc;
  --muted: #b7c7d8;
  --line: rgba(184, 217, 245, 0.28);
  --panel: rgba(14, 31, 49, 0.82);
  --panel-solid: #101c2b;
  --bg: #061727;
  --brand: #2a87db;
  --brand-strong: #dceeff;
  --accent: #d6b15d;
  --glass: rgba(37, 80, 121, 0.42);
  --field: rgba(7, 23, 38, 0.84);
  --field-gradient: linear-gradient(180deg, rgba(28, 70, 108, 0.8) 0%, rgba(9, 36, 61, 0.9) 55%, rgba(4, 20, 35, 0.94) 100%);
  --select-glass: linear-gradient(180deg, rgba(75, 151, 212, 0.44) 0%, rgba(19, 74, 119, 0.52) 52%, rgba(5, 23, 40, 0.86) 100%);
  --select-sheen: linear-gradient(135deg, rgba(218, 241, 255, 0.2), rgba(218, 241, 255, 0.05) 42%, rgba(37, 122, 189, 0.28));
  --select-border: rgba(132, 196, 240, 0.38);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23d6ecff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.42), 0 1px 10px rgba(228, 243, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg), #f8fbfd 64%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16.5px;
}

body.night-mode {
  background: linear-gradient(135deg, #030b14, var(--bg) 62%);
}

[hidden] {
  display: none !important;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 26px;
  overflow-y: auto;
  color: #eef5fa;
  background: linear-gradient(180deg, rgba(1, 37, 61, 0.98), rgba(3, 12, 22, 0.96));
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.18);
}

.brand-block {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 10px 8px 14px;
  border: 1px solid rgba(218, 234, 249, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(37, 80, 121, 0.28), rgba(1, 24, 39, 0.34));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.brand-block img {
  width: min(162px, 74%);
  height: auto;
  max-height: 94px;
  object-fit: contain;
  filter: none;
}

.brand-title {
  width: 100%;
  display: grid;
  gap: 3px;
  justify-items: center;
}

.brand-title strong {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(214, 177, 93, 0.46);
  border-radius: 6px;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0, 4, 40, 0.18), rgba(0, 78, 146, 0.34), rgba(0, 4, 40, 0.18));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.12), inset 0 0 8px rgba(214, 177, 93, 0.12);
  font-size: clamp(0.68rem, 0.6rem + 0.28vw, 0.82rem);
  letter-spacing: 0;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.brand-title span,
.connection-card small {
  color: #aab8c5;
  font-size: 0.86rem;
}

body.day-mode .brand-block {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(37, 80, 121, 0.28));
}

body.night-mode .brand-block {
  border-color: rgba(184, 217, 245, 0.26);
  background: linear-gradient(180deg, rgba(8, 28, 46, 0.82), rgba(3, 12, 22, 0.7));
  box-shadow: inset 0 0 0 1px rgba(184, 217, 245, 0.08), 0 12px 28px rgba(0, 0, 0, 0.34);
}

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

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 14px;
  color: #dbe6ef;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(37, 80, 121, 0.7);
  box-shadow: inset 0 0 0 1px rgba(203, 226, 246, 0.12), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.nav-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-menu-toggle::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.nav-menu-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.sidebar-submenu {
  display: grid;
  gap: 4px;
  margin: -2px 0 2px 12px;
  padding: 2px 0 4px 12px;
  border-left: 1px solid rgba(184, 217, 245, 0.3);
}

.sidebar-submenu-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 10px;
  color: #cfe0ed;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sidebar-submenu-item:hover,
.sidebar-submenu-item.is-active {
  border-color: rgba(184, 217, 245, 0.2);
  color: #ffffff;
  background: rgba(37, 80, 121, 0.54);
}

.connection-card {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
}

.status-dot.is-online {
  background: var(--good);
}

.workspace {
  height: 100vh;
  min-height: 0;
  min-width: 0;
  padding: 32px;
  overflow: auto;
}

.topbar,
.notice-row,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 18px;
}

.topbar > div:first-child {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 2.35rem;
}

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

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

[data-native-sync] {
  min-inline-size: 130px;
}

.icon-button-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button,
.icon-button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(174, 213, 247, 0.58);
  border-radius: 7px;
  color: #ffffff;
  background-image: var(--button-gradient);
  background-size: 200% auto;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 34, 70, 0.24);
  transition: background-position 0.35s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.button::after,
.icon-button::after,
.crm-menu-item::after,
.module-button::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -36%;
  width: 34%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  pointer-events: none;
}

.button:hover,
.icon-button:hover {
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 34, 70, 0.28);
}

.button:hover::after,
.icon-button:hover::after,
.crm-menu-item:hover::after,
.module-button:hover::after {
  opacity: 1;
  animation: swoosh 0.65s ease forwards;
}

@keyframes swoosh {
  from {
    left: -38%;
  }
  to {
    left: 112%;
  }
}

.button {
  padding: 10px 14px;
}

.button.compact {
  padding: 7px 10px;
  font-size: 0.82rem;
}

.button.secondary {
  color: var(--brand-strong);
  background: var(--glass);
  background-image: none;
  backdrop-filter: blur(10px);
}

.button.secondary.is-active {
  color: #ffffff;
  background: var(--brand);
  border-color: rgba(255, 255, 255, 0.36);
}

body.night-mode .button.secondary,
body.night-mode .icon-back {
  color: #f3f8fc;
  background: rgba(37, 80, 121, 0.62);
  border-color: rgba(184, 217, 245, 0.34);
}

body.night-mode .button.secondary.is-active {
  color: #ffffff;
  background: #2a87db;
  border-color: rgba(255, 255, 255, 0.42);
}

.button.danger {
  color: #ffffff;
  background: var(--danger);
  background-image: linear-gradient(90deg, #8a1515 0%, #d03636 51%, #8a1515 100%);
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  font-size: 1.4rem;
}

.button-row > .icon-button {
  height: auto;
  min-height: 34px;
  align-self: stretch;
}

.info-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(0, 78, 146, 0.28);
  border-radius: 50%;
  color: var(--brand-strong);
  background: var(--glass);
  font-weight: 800;
  cursor: pointer;
}

.button svg,
.icon-button svg,
.icon-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button svg {
  flex: 0 0 auto;
}

.danger-icon {
  border-color: rgba(164, 58, 54, 0.38);
  background-image: linear-gradient(90deg, #8a1515 0%, #d03636 51%, #8a1515 100%);
}

.icon-back {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand);
  background: var(--glass);
  cursor: pointer;
}

.icon-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-row {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
}

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

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

.app-shell[data-connected="true"] .notice-row {
  min-height: 62px;
  margin-bottom: 16px;
  padding: 10px 16px;
}

.app-shell[data-connected="true"] .notice-identity {
  min-width: 0;
}

.app-shell[data-connected="true"] [data-connected-company] {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.app-shell[data-connected="true"] [data-version-label] {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.sync-activity {
  margin: 0 12px 0 auto;
  max-width: min(52ch, 55%);
  color: #07578d;
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: right;
}
.sync-activity[hidden] { display: none; }
.sync-activity[data-tone="warning"] { color: var(--warn); }
.sync-activity[data-tone="error"] { color: var(--danger); }
body.night-mode .sync-activity:not([data-tone]) { color: #9ad8ff; }
@media (max-width: 700px) {
  .sync-activity { max-width: 45%; font-size: 0.76rem; }
}

.app-shell[data-connected="true"] [data-update-label],
.app-shell[data-connected="true"] [data-storage-status],
.app-shell[data-connected="true"] [data-connected-status] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.sync-indicator {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #0766ae;
  background: rgba(19, 125, 209, 0.1);
  cursor: pointer;
}

.sync-indicator:hover { background: rgba(19, 125, 209, 0.22); }
.sync-indicator:focus-visible { outline: 2px solid #278ac9; outline-offset: 3px; }
.sync-indicator:disabled { cursor: wait; opacity: 0.7; }

.update-action-wrap { position: relative; display: inline-flex; }
.update-action-wrap [data-check-updates] { position: relative; }
.update-action-wrap [data-check-updates]:has(.update-count:not([hidden])) { padding-left: 36px; }
.update-count {
  position: absolute;
  left: 8px;
  bottom: 7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c72d2d;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.update-count[hidden], .update-available-toast[hidden] { display: none; }
.update-available-toast {
  position: absolute;
  z-index: 15;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 30px));
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  line-height: 1.35;
}
.sidebar-scrim[hidden], .mobile-nav-toggle[hidden] { display: none; }
.mobile-nav-toggle { display: none; }

.sync-indicator svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sync-indicator[data-state="syncing"] svg {
  animation: sync-turn 1.1s linear infinite;
}

.sync-indicator[data-state="pending"] {
  color: var(--warn);
  background: rgba(154, 97, 21, 0.1);
}

.sync-indicator[data-state="offline"],
.sync-indicator[data-state="review"] {
  color: var(--danger);
  background: rgba(164, 58, 54, 0.1);
}

body.night-mode .sync-indicator[data-state="synced"],
body.night-mode .sync-indicator[data-state="syncing"] {
  color: #79c7ff;
}

@keyframes sync-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sync-indicator[data-state="syncing"] svg { animation: none; }
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.metric-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric-grid:has([data-qc-metric]:not([hidden])) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric,
.module-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric span,
.module-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
}

.dashboard-work-queue { min-width: 0; }

.qc-review-queue { margin-bottom: 18px; border-left: 4px solid #c58116; }
.qc-review-queue .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qc-priority-label { color: #b86c09; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.qc-review-row {
  display: grid;
  grid-template-columns: minmax(95px, 0.55fr) minmax(150px, 1fr) minmax(170px, 1.25fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 6px;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.qc-review-row:hover, .qc-review-row:focus-visible { color: var(--brand-strong); background: var(--glass); }
.qc-review-row span:last-child { color: var(--brand-strong); font-weight: 700; }
@media (max-width: 760px) {
  .qc-review-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.report-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.crm-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.archive-shell,
.deleted-shell,
.settings-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

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

.settings-panel[data-settings-panel="inspectors"].is-active {
  grid-column: 1 / -1;
}

.firm-profile-panel {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-header {
  margin-bottom: 16px;
}

.agents-intro {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.click-table tbody tr {
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.click-table tbody tr:hover,
.click-table tbody tr:focus {
  outline: none;
  background: rgba(0, 78, 146, 0.1);
  box-shadow: inset 3px 0 0 var(--brand);
}

.click-table tbody tr:active {
  transform: translateY(1px);
}

.click-row {
  cursor: pointer;
}

.work-queue-warning-row td {
  padding-top: 0;
  border-top: 0;
}

.work-queue-warning-row span {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1.35;
  text-shadow:
    -0.5px -0.5px 0 #101010,
    0.5px -0.5px 0 #101010,
    -0.5px 0.5px 0 #101010,
    0.5px 0.5px 0 #101010;
}

.work-queue-warning-row.is-fresh span {
  color: #18a957;
  background: rgba(24, 169, 87, 0.1);
}

.work-queue-warning-row.is-overdue span {
  color: #d93636;
  background: rgba(217, 54, 54, 0.1);
}

.work-queue-warning-row.is-variance span {
  color: #d09018;
  background: rgba(208, 144, 24, 0.12);
}

.selected-order-warning {
  margin: 0 0 14px;
}

.record-item > .selected-order-warning {
  grid-column: 1 / -1;
  width: 100%;
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.selected-order-warning span {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1.35;
  text-shadow:
    -0.5px -0.5px 0 #101010,
    0.5px -0.5px 0 #101010,
    -0.5px 0.5px 0 #101010,
    0.5px 0.5px 0 #101010;
}

.selected-order-warning.is-fresh span {
  color: #18a957;
  background: rgba(24, 169, 87, 0.1);
}

.selected-order-warning.is-overdue span {
  color: #d93636;
  background: rgba(217, 54, 54, 0.1);
}

.selected-order-warning.is-variance span {
  color: #d09018;
  background: rgba(208, 144, 24, 0.12);
}

body.day-mode .work-queue-warning-row span,
body.day-mode .selected-order-warning span {
  text-shadow: none;
}

body.day-mode .work-queue-warning-row.is-overdue span,
body.day-mode .selected-order-warning.is-overdue span {
  color: #a32228;
}

.crm-empty-space {
  min-height: 430px;
}

.roadmap {
  margin: 0;
  padding-left: 20px;
}

.roadmap li {
  margin-bottom: 10px;
}

.crm-menu,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.header-actions {
  margin: 0;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.report-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
}

.report-title-row h2 {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1;
  transform: translateY(1px);
}

.form-actions-right {
  justify-content: flex-end;
}

.crm-menu {
  display: grid;
}

.crm-menu-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--brand);
  background: var(--glass);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.crm-menu-item.is-active,
.crm-menu-item:hover {
  color: #ffffff;
  background: rgba(0, 78, 146, 0.94);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 38, 73, 0.2);
}

.crm-panel {
  display: none;
}

.crm-panel.is-active {
  display: block;
}

.crm-panel[data-crm-panel="deleted-records"] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.archive-panel,
.deleted-panel {
  display: none;
}

.archive-panel.is-active,
.deleted-panel.is-active {
  display: block;
}

.archive-menu-panel,
.deleted-menu-panel {
  align-self: start;
}

.instruction-text {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.form-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
}

.form-note p,
.form-note strong {
  margin: 0;
}

.form-note p {
  color: var(--muted);
  line-height: 1.4;
}

.repeat-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

body.night-mode .repeat-section {
  background: rgba(13, 34, 54, 0.58);
}

.repeat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repeat-grid {
  display: grid;
  gap: 12px;
}

.repeat-add-button {
  justify-self: start;
}

.credential-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(64px, auto);
  gap: 12px;
  align-items: end;
}

.credential-row:has(.credential-na) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(64px, auto);
}

.credential-na {
  align-self: center;
  margin-bottom: 7px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
}

.inspector-radius-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
}

.inspector-radius-card strong,
.inspector-radius-card span {
  margin: 0;
}

.inspector-radius-card span {
  color: var(--muted);
}

.radius-orbit {
  grid-row: span 2;
  justify-self: end;
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 78, 146, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 8%, rgba(0, 78, 146, 0.1) 9% 38%, transparent 39%),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(0, 78, 146, 0.09) 18px),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(0, 78, 146, 0.09) 18px);
}

body.night-mode .radius-orbit {
  border-color: rgba(126, 200, 255, 0.48);
  background:
    radial-gradient(circle, rgba(238, 248, 255, 0.95) 0 8%, rgba(126, 200, 255, 0.18) 9% 38%, transparent 39%),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(126, 200, 255, 0.1) 18px),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(126, 200, 255, 0.1) 18px);
}

.radius-orbit span {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 8px rgba(0, 78, 146, 0.13);
}

.stacked-records {
  margin-top: 18px;
}

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

.report-order-display {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
}

.report-order-display strong {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--glass);
  overflow-wrap: anywhere;
}

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

.custom-block-grid label {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--glass);
  font-weight: 700;
}

.compact-blocks {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.customize-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
}

.compact-header {
  margin-bottom: 10px;
}

.custom-template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.inspection-admin-card {
  position: relative;
  padding: 0;
}

.module-card-button {
  display: grid;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.inspection-admin-card .info-button {
  position: absolute;
  left: 12px;
  bottom: 12px;
}

.form-library,
.settings-record-editor {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.settings-record-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.settings-record-split.is-editing {
  grid-template-columns: 1fr;
}

.settings-record-split.is-editing .settings-record-list-pane {
  display: none;
}

.settings-record-split .settings-record-editor {
  margin-top: 0;
}

.settings-record-list-pane {
  min-width: 0;
}

.settings-inspector-page {
  display: grid;
  grid-template-columns: minmax(300px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.settings-inspector-intro {
  margin-bottom: 0;
}

.settings-inspector-list-pane,
.settings-inspector-general-pane {
  min-width: 0;
}

.settings-inspector-list-pane {
  display: grid;
  gap: 12px;
  align-content: start;
}

.settings-inspector-page > .settings-record-editor {
  display: none;
  margin-top: 0;
}

.settings-inspector-page.is-editing {
  display: block;
}

.settings-inspector-page.is-editing .settings-inspector-list-pane,
.settings-inspector-page.is-editing .settings-inspector-general-pane {
  display: none;
}

.settings-inspector-page.is-editing > .settings-record-editor {
  display: grid;
}

.settings-editor-actions {
  justify-content: flex-start;
}

.form-library-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-library-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.custom-form-builder {
  margin-top: 18px;
}

.muted-inline,
.panel-copy {
  color: var(--muted);
}

.custom-block-grid input {
  width: auto;
}

.logo-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--glass);
}

.logo-preview img {
  width: 96px;
  max-height: 58px;
  object-fit: contain;
}

.logo-preview .icon-button {
  margin-left: auto;
}

.signature-upload-panel {
  display: grid;
  gap: 16px;
}

.signature-inspector-picker {
  max-width: 420px;
}

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

.signature-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
}

.signature-preview-box {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
}

body.night-mode .signature-preview-box {
  background: rgba(3, 16, 29, 0.38);
}

.signature-image-button {
  width: 100%;
  min-height: 132px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.signature-preview-box img,
.signature-modal-preview img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.signature-file-button input {
  display: none;
}

.signature-modal-preview {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.signature-modal-preview p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.portal-summary {
  margin-bottom: 20px;
}

.permission-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-chip-row span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--glass);
  font-size: 0.86rem;
  font-weight: 700;
}

body.night-mode .permission-chip-row span {
  color: #f3f8fc;
}

.report-form {
  display: grid;
  gap: 16px;
}

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

.wind-section-title > div {
  display: grid;
  gap: 3px;
}

.wind-section-title span,
.wind-photo-group-header span {
  color: var(--muted);
  font-size: 0.82rem;
}

.wind-form-grid {
  align-items: start;
}

.wind-question-group,
.wind-shared-facts {
  align-content: start;
}

.wind-question-group > legend {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wind-info-button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand-strong);
  background: var(--surface);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.wind-info-button:hover,
.wind-info-button:focus-visible {
  color: #ffffff;
  background: var(--brand);
}

.wind-question-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.wind-qualification-list {
  grid-template-columns: 1fr;
}

.wind-qualification-list > label,
.wind-qualification-row label {
  display: flex !important;
  min-width: 0;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.wind-qualification-list > label input,
.wind-qualification-row label input {
  flex: 0 0 auto;
  width: auto !important;
  margin: 0.24em 0 0;
}

.wind-qualification-list > label[hidden] {
  display: none !important;
}

.wind-qualification-list > .wind-swr-underside {
  margin-left: 26px;
}

.wind-qualification-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.wind-qualification-row .wind-info-button {
  margin-top: -3px;
}

.wind-roof-covering-group,
.wind-roof-wall-group,
.wind-opening-group {
  grid-column: 1 / -1;
}

.wind-roof-covering-table {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.wind-roof-covering-head,
.wind-roof-covering-row {
  display: grid;
  grid-template-columns: 46px minmax(150px, 1.35fr) minmax(130px, 0.9fr) minmax(145px, 1fr) minmax(150px, 1fr) 92px;
  gap: 8px;
  align-items: end;
}

.wind-roof-covering-head {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.wind-roof-covering-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.7;
}

.wind-roof-covering-row.is-selected {
  border-color: var(--brand-2);
  background: var(--glass);
  opacity: 1;
}

.wind-roof-covering-row label {
  min-width: 0;
}

.wind-cover-check,
.wind-no-info {
  align-self: center;
  justify-self: center;
}

.wind-mobile-label {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.wind-opening-matrix-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wind-opening-matrix {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  color: var(--ink);
  background: var(--glass);
}

.wind-opening-matrix th,
.wind-opening-matrix td {
  border: 1px solid var(--line);
  padding: 7px;
  text-align: center;
  vertical-align: middle;
}

.wind-opening-matrix thead th,
.wind-opening-matrix tbody th {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.wind-opening-matrix tbody th {
  width: 260px;
  text-align: left;
}

.matrix-check {
  display: grid !important;
  place-items: center;
}

.matrix-check input {
  width: auto;
}

.wind-opening-matrix .not-applicable {
  color: var(--muted);
  background: rgba(127, 144, 160, 0.12);
}

.wind-photo-section {
  display: grid;
  gap: 12px;
}

.wind-photo-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.wind-photo-group {
  display: grid;
  min-width: 0;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.wind-photo-group-header {
  display: grid;
  gap: 3px;
}

.wind-photo-group-header h4 {
  margin: 0;
}

.wind-photo-strip {
  grid-template-columns: 1fr;
}

.photo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.photo-correction-editor {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.photo-correction-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.photo-correction-toolbar .is-active {
  border-color: #55b8ff;
  background: rgba(30, 120, 188, 0.34);
  box-shadow: 0 0 0 2px rgba(85, 184, 255, 0.18);
}

.photo-correction-editor canvas {
  display: block;
  width: auto;
  max-width: min(100%, 760px);
  height: auto;
  max-height: 58vh;
  border: 1px solid var(--line);
  background: #071727;
  cursor: crosshair;
  touch-action: none;
}

.photo-correction-editor p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.form-grid label,
.settings-list label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.field-with-inline-control {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field-label-row {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.field-label-row > label:first-child {
  color: var(--muted);
  font-weight: 700;
}

.inline-field-check {
  flex: 0 0 auto;
  gap: 6px !important;
  color: var(--ink) !important;
  font-size: 0.84rem;
  white-space: nowrap;
}

.field-with-inline-control.is-auto-filled select,
.field-with-inline-control.is-auto-filled input:not([type="checkbox"]) {
  border-color: var(--brand-2);
}

.inspection-type-picker {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
}

.inspection-type-field-label {
  color: var(--muted);
  font-weight: 700;
}

.inspection-type-details {
  position: relative;
}

.inspection-type-details summary {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--select-border);
  border-radius: 6px;
  padding: 10px 42px 10px 10px;
  color: var(--ink);
  background-color: rgba(184, 221, 244, 0.76);
  background-image: var(--select-sheen), var(--select-glass);
  background-clip: padding-box;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), inset 0 -14px 22px rgba(35, 101, 147, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.32), 0 1px 4px rgba(0, 40, 70, 0.12);
  cursor: pointer;
  list-style: none;
}

.inspection-type-details summary::-webkit-details-marker {
  display: none;
}

.inspection-type-details summary::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.inspection-type-details[open] summary::after {
  transform: translateY(3px) rotate(225deg);
}

.inspection-type-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: min(520px, max(100%, 320px));
  max-height: 330px;
  gap: 4px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(0, 26, 48, 0.3);
}

.inspection-type-menu label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-radius: 4px;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
}

[data-opening-protection-picker] .inspection-type-menu,
[data-multi-picker] .inspection-type-menu {
  background: var(--panel-solid);
  width: 100%;
}

[data-opening-protection-summary] {
  overflow-wrap: anywhere;
}

[data-multi-summary] {
  overflow-wrap: anywhere;
}

.inspection-type-menu label:hover {
  background: var(--glass);
}

.inspection-type-menu input {
  width: auto;
  margin-top: 2px;
}

.inspection-type-picker.is-empty [data-inspection-type-summary],
.inspection-type-picker.is-empty [data-polybutylene-location-summary],
.inspection-type-picker.is-empty [data-special-hazards-summary],
.inspection-type-picker.is-empty [data-opening-protection-summary],
.inspection-type-picker.is-empty [data-multi-summary] {
  color: var(--muted);
}

.inspection-type-picker.is-invalid summary {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(164, 58, 54, 0.15);
}

.survey-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.survey-group legend {
  padding: 0 6px;
  color: var(--brand);
  font-weight: 900;
}

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

.hazard-detail-column {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.paired-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
}

.checkbox-line {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
}

.checkbox-line input {
  width: auto;
}

.checkbox-line.is-disabled {
  opacity: 0.55;
}

.checkbox-line input:disabled {
  cursor: not-allowed;
}

.security-check-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 12px;
  align-items: center;
  align-content: start;
  margin: -2px 0 2px;
}

.security-supplement-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: start;
}

.security-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.form-grid label:has(textarea),
.form-grid label:has(input[type="file"]),
.wide-field {
  grid-column: 1 / -1;
}

.field-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: start;
}

.field-action-header {
  display: flex;
  min-height: 32px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.field-action-header > label:not(.field-action-control) {
  color: var(--muted);
  font-weight: 700;
}

.field-action-header .button {
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.field-action-control {
  width: max-content;
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.field-action-row > textarea {
  width: 100%;
}

.aluminum-detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.aluminum-detail-panel[hidden] {
  display: none;
}

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

.survey-subgroup {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.survey-subgroup.wind-qualification-list {
  grid-template-columns: minmax(0, 1fr);
}

.survey-subgroup legend {
  padding: 0 6px;
  color: var(--brand-2);
  font-size: 0.86rem;
  font-weight: 900;
}

.photo-upload-label {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
}

.photo-upload-label input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-label span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 13px;
  color: #ffffff;
  background-image: var(--button-gradient);
  background-size: 220% auto;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 34, 70, 0.24);
  white-space: nowrap;
}

.photo-upload-label span:hover {
  background-position: right center;
  box-shadow: 0 7px 18px rgba(0, 66, 120, 0.34);
}

.cover-upload-label,
.system-photo-upload {
  gap: 5px;
}

.system-photo-upload strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.system-photo-upload span {
  width: auto;
  min-width: 104px;
  min-height: 34px;
  padding: 7px 10px;
}

.automate-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.automate-line input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  background: var(--field-gradient);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.42), inset 0 -10px 18px rgba(64, 132, 178, 0.08), 0 1px 2px rgba(0, 26, 48, 0.04);
}

select {
  appearance: none;
  -webkit-appearance: none;
  color: var(--ink);
  border-color: var(--select-border);
  padding-right: 42px;
  background-color: rgba(184, 221, 244, 0.76);
  background-image: var(--select-arrow), var(--select-sheen), var(--select-glass);
  background-clip: padding-box;
  background-position: right 12px center, left top, left top;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 18px 18px, 100% 100%, 100% 100%;
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), inset 0 -14px 22px rgba(35, 101, 147, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.32), 0 1px 4px rgba(0, 40, 70, 0.12);
}

select option,
select optgroup {
  color: #17202a;
  background-color: #eaf6fc;
}

select option:checked {
  color: #ffffff;
  background-color: #064e92;
}

input.is-invalid,
input:user-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(164, 58, 54, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.night-mode input,
body.night-mode select,
body.night-mode textarea {
  color: var(--ink);
  background: var(--field-gradient);
}

body.night-mode select {
  color: #f3f8fc;
  border-color: var(--select-border);
  background-color: rgba(11, 54, 91, 0.72);
  background-image: var(--select-arrow), var(--select-sheen), var(--select-glass);
  background-position: right 12px center, left top, left top;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 18px 18px, 100% 100%, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(228, 243, 255, 0.32), inset 0 -16px 26px rgba(42, 135, 219, 0.24), 0 0 0 1px rgba(135, 195, 239, 0.18), 0 6px 18px rgba(0, 0, 0, 0.2);
}

body.night-mode select option,
body.night-mode select optgroup,
html[data-theme='dark'] select option,
html[data-theme='dark'] select optgroup {
  color: #f3f8fc;
  background-color: #0b2a46;
}

body.night-mode select option:checked,
html[data-theme='dark'] select option:checked {
  color: #ffffff;
  background-color: #155f9f;
}

textarea {
  resize: vertical;
  overflow: hidden;
  min-height: 84px;
}

.hazard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.hazard-grid legend {
  color: var(--brand);
  font-weight: 800;
}

.hazard-grid legend .button {
  margin-left: 10px;
}

.hazard-grid label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.hazard-grid input {
  width: auto;
}

.gfci-exclusive {
  font-weight: 900 !important;
}

.gfci-grid-spacer {
  min-height: 1px;
}

.section-divider {
  height: 1px;
  background: var(--line);
}

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

.order-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.prior-inspection-alert {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(245, 171, 53, 0.55);
  border-radius: 6px;
  background: rgba(245, 171, 53, 0.14);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.prior-inspection-date {
  white-space: nowrap;
}

body.night-mode .prior-inspection-alert {
  background: rgba(245, 171, 53, 0.18);
  color: #fff2cf;
}

.table-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.record-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.record-item p,
.record-item strong {
  margin: 0;
}

.record-main {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.record-main:hover strong {
  color: var(--brand);
}

.status-token,
.status-select {
  font-weight: 800;
}

.status-token.is-active-status,
.status-select.is-active-status {
  color: #1fa35b;
}

.status-token.is-inactive,
.status-select.is-inactive {
  color: #f2c94c;
}

.status-token.is-on-hold,
.status-select.is-on-hold {
  color: #ef4444;
}

body.day-mode .status-token,
body.day-mode .status-select {
  text-shadow:
    -0.55px -0.55px 0 #000,
    0.55px -0.55px 0 #000,
    -0.55px 0.55px 0 #000,
    0.55px 0.55px 0 #000;
}

body.night-mode .status-token,
body.night-mode .status-select {
  text-shadow: none;
}

.status-field select {
  font-weight: 800;
}

.record-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.detail-grid div {
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
}

.detail-grid .order-report-actions {
  min-height: 0;
  padding: 3px 0 8px;
  border: 0;
  border-radius: 0;
  background: none;
}
.order-report-actions .button-row { margin-top: 10px; }

.detail-grid strong {
  display: block;
  color: var(--brand);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.detail-grid span {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.module-card {
  padding: 15px;
}

.module-button {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 400;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.module-button.is-report-complete {
  padding-bottom: 48px;
}

body.day-mode .module-button.is-report-complete {
  box-shadow: 0 12px 26px rgba(15, 59, 45, 0.2), 0 2px 7px rgba(15, 59, 45, 0.12);
}

.form-complete-mark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  width: 30px;
  height: 30px;
  border: 2px solid #177245;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(14, 87, 55, 0.25);
  animation: report-complete-pop 550ms ease-out both;
}

.form-complete-mark::before {
  position: absolute;
  top: 5px;
  left: 9px;
  width: 7px;
  height: 12px;
  border: solid #177245;
  border-width: 0 3px 3px 0;
  content: "";
  transform: rotate(45deg);
}

body.night-mode .form-complete-mark {
  border-color: #5bd697;
  background: rgba(8, 37, 29, 0.94);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.32);
}

body.night-mode .form-complete-mark::before {
  border-color: #5bd697;
}

.order-report-button.is-report-complete {
  position: relative;
  padding-right: 42px;
}

body.day-mode .order-report-button.is-report-complete {
  box-shadow: 0 5px 14px rgba(15, 59, 45, 0.2);
}

.order-report-button .form-complete-mark {
  right: 8px;
  bottom: 5px;
  width: 20px;
  height: 20px;
}

.order-report-button .form-complete-mark::before {
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border-width: 0 2px 2px 0;
}

@keyframes report-complete-pop {
  from { opacity: 0; transform: scale(0.55); }
  70% { opacity: 1; transform: scale(1.12); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .form-complete-mark { animation: none; }
}

.module-button:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 78, 146, 0.62);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 32px rgba(0, 45, 85, 0.22);
}

body.night-mode .module-button:hover {
  background: rgba(37, 80, 121, 0.62);
}

.module-card strong {
  display: block;
  margin-bottom: 8px;
}

.module-card.is-live {
  border-color: rgba(23, 114, 69, 0.42);
}

.module-card.is-planned {
  border-style: dashed;
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.photo-sheet-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.photo-sheet-strip .photo-count {
  grid-column: 1 / -1;
}

.photo-count {
  flex: 1 0 100%;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.photo-thumb {
  width: 132px;
  margin: 0;
}

.cover-photo-thumb {
  display: grid;
  width: min(420px, 100%);
  gap: 8px;
}

.photo-sheet-thumb {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.photo-remove {
  width: 100%;
  min-height: 34px;
  margin-top: 5px;
  border: 0;
  border-radius: 4px;
  padding: 5px;
  color: var(--danger);
  background: #f7e8e6;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.photo-thumb img,
.report-photos img,
.report-cover-photo {
  width: 112px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.cover-photo-thumb img {
  width: 100%;
  height: 238px;
}

.photo-sheet-thumb img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: var(--field);
}

.photo-sheet-label-field,
.photo-description-field {
  display: block;
  margin: 0;
}

.photo-sheet-label-field textarea,
.photo-description-field textarea {
  width: 100%;
  min-height: 38px;
}

.photo-sheet-label-field textarea {
  border-width: 2px;
  color: var(--ink);
  font-weight: 800;
}

.photo-description-field textarea {
  min-height: 58px;
  resize: none;
  overflow: hidden;
}

.system-photo-description {
  margin: 3px 0 0;
  font-size: 0.7rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.photo-sheet-thumb .photo-remove {
  width: max-content;
}

.cover-photo-thumb .photo-remove {
  width: auto;
  justify-self: start;
  padding-inline: 12px;
}

.photo-thumb figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.missing-photo {
  display: grid;
  place-content: center;
  min-height: 140px;
  padding: 12px;
  color: var(--ink);
  background: var(--field);
  white-space: normal;
  overflow-wrap: anywhere;
}

.photo-label-modal {
  display: grid;
  gap: 12px;
}

.photo-label-modal img {
  width: min(420px, 100%);
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: var(--field);
}

.photo-label-modal label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.inspection-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--glass);
}

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

.section-title h3,
.report-section-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.section-title label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.section-title input {
  width: auto;
}

.report-preview {
  --report-label-color: #064e92;
  --report-label-contrast: #ffffff;
  --report-label-text: #064e92;
  --report-label-soft: #e2eef8;
  --report-label-dark: #073967;
  counter-reset: report-page;
  width: 100%;
  min-height: 360px;
  margin-inline: auto;
  padding: 26px;
  border: 0;
  color: #111111;
  background: #cfd7de;
  overflow: auto;
  scrollbar-gutter: stable;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.preview-view .report-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 164px);
  overflow: visible;
}

.preview-view .report-preview {
  overflow: auto;
}

.preview-view .report-preview-panel > .panel-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -8px -8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-solid);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.preview-action-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.report-preview h2 {
  margin-bottom: 12px;
  color: var(--brand-strong);
}

.report-doc-header {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(180px, 0.4fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--brand);
}

.report-logo {
  width: 108px;
  max-height: 86px;
  object-fit: contain;
}

.report-logo-placeholder {
  width: 108px;
  min-height: 1px;
}

.report-doc-header p,
.report-doc-header span {
  margin: 0;
  color: #111111;
}

.report-doc-header h2 {
  margin: 4px 0;
}

.report-company-lines {
  display: grid;
  gap: 4px;
  color: var(--muted);
  text-align: right;
}

.report-cover-wrap {
  display: flex;
  justify-content: center;
  margin: 14px auto 18px;
  padding: 10px;
  border: 2px solid var(--brand);
  border-radius: 8px;
  background: var(--glass);
}

.report-cover-wrap:not(.empty-cover) {
  width: min(684px, 100%);
  height: 444px;
  min-height: 300px;
  flex: 0 1 444px;
  box-sizing: border-box;
}

.report-cover-page > :not(.report-cover-wrap) {
  flex-shrink: 0;
}

.empty-cover {
  min-height: 260px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.report-cover-title {
  margin: 14px 0 14px;
  text-align: center;
}

.report-cover-title h2 {
  margin: 0;
  font-size: 2.12rem;
  line-height: 1.12;
}

.report-cover-title p,
.report-cover-title span {
  color: var(--muted);
}

.full-home-builder h3 { margin: 18px 0; font-size: 21px; }
.home-section-navigation { display: flex; align-items: end; gap: 12px; }
.home-section-navigation > label { flex: 1; min-width: 0; }
.home-section-navigation select { width: 100%; }
.home-section-controls { display: grid; gap: 6px; flex: 0 0 auto; }
.home-section-controls > span { font-weight: 700; font-size: 14px; color: var(--muted); }
.home-section-controls .button { min-width: 76px; height: 36px; }
.report-draft-actions { align-items: end; }
[data-home-navigation-bottom] { margin-left: auto; }
.home-component-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 14px; }
.home-component-heading h4 { margin: 0; }
.home-heading-main { min-width: 0; flex: 1; }
.home-visibility-checks { display: grid; gap: 8px; margin-top: 10px; }
.home-hoa-checks { display: grid; gap: 8px; max-width: 46%; }
.home-visibility-checks:empty, .home-hoa-checks:empty { display: none; }
.home-field-pair { margin: 0; }
.home-observation-group h5 { margin: 0 0 10px; font-size: 15px; }
.home-observation-group > .form-grid { row-gap: 12px; }
.home-inspection-status { display: flex; align-items: start; gap: 8px; }
.home-info-button { display: grid; place-items: center; width: 22px; height: 22px; padding: 2px; border: 0; background: transparent; flex: 0 0 22px; }
.home-info-button img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
body.day-mode .home-info-button img { filter: brightness(0) saturate(100%) invert(25%) sepia(40%) saturate(800%) hue-rotate(160deg); }
.home-info-button:hover, .home-info-button:focus-visible { background: var(--panel); outline: 1px solid var(--border); }
.home-material-picker { min-width: 0; }
.home-material-picker .inspection-type-details > summary span { white-space: normal; overflow-wrap: anywhere; }
.home-deficiency > label { display: grid; gap: 8px; margin-top: 14px; }
body.day-mode .home-finding [data-home-remove],
body.day-mode .home-area-delete { background: #e6f0f6; background-image: none; border-color: #92b0c3; color: #164766; }
body.day-mode .home-finding [data-home-remove]:hover,
body.day-mode .home-area-delete:hover { background: #c9e2ee; border-color: #367c9f; }
@media (max-width: 600px) {
  .home-section-navigation { flex-wrap: wrap; }
  .home-section-navigation > label { flex-basis: 100%; }
  .home-section-navigation > .home-section-controls { margin-left: auto; }
  .home-component-heading { flex-wrap: wrap; }
  .home-heading-main { flex-basis: 100%; }
  .home-hoa-checks { max-width: 100%; margin-left: 0; }
  .home-field-pair .home-pair-empty { display: none; }
}
.home-section-navigation .icon-button,
.home-finding .icon-button,
.home-area-delete { width: 34px; height: 34px; padding: 7px; flex: 0 0 34px; }
.home-section-navigation .icon-button img,
.home-finding .icon-button img,
.home-area-delete img { width: 18px; height: 18px; object-fit: contain; }
.home-section-navigation .icon-button img { filter: brightness(0) invert(1); }
.home-finding [data-home-remove] img,
.home-area-delete img { filter: brightness(0) saturate(100%) invert(51%) sepia(96%) saturate(1419%) hue-rotate(328deg) brightness(100%) contrast(105%); }
.home-area-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 16px; }
.home-area-actions > label { flex: 1; min-width: 200px; }
.home-component { padding: 18px 0; border-top: 3px solid var(--border); }
.home-component h4, .home-section-photos h4 { margin: 0 0 14px; font-size: 17px; }
.home-component .home-component-heading h4 { margin: 0; }
.home-generated:empty { display: none; }
.home-address-fields { display: grid; gap: 12px; }
.home-address-fields input[readonly] { opacity: 0.8; }
.home-occupancy-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.home-property-subgroup { min-width: 0; }
.home-property-subgroup h5 { margin: 0 0 12px; font-size: 15px; }
.home-check-list { display: grid; gap: 12px; }
.home-check-list > label:not(.home-check) { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
.full-home-builder [data-home-field]:disabled { opacity: 0.55; cursor: not-allowed; }
.home-fence-picker .inspection-type-menu { width: 100%; background: var(--panel-solid); }
.home-fence-picker summary { height: 44px; }
.home-fence-picker summary span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .home-occupancy-groups { grid-template-columns: 1fr; gap: 24px; }
}
.home-component .home-check { display: flex; flex-direction: row; align-items: start; gap: 9px; }
.home-check input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin-top: 3px; flex: 0 0 16px; }
.home-check span { overflow-wrap: anywhere; }
.home-findings { display: grid; gap: 14px; margin-top: 14px; }
.home-finding { padding: 12px; border: 1px solid var(--border); border-radius: 6px; }
.home-finding-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.home-finding-note-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.home-finding-note-heading > label { font-weight: 700; color: var(--muted); }
.home-default-notes { display: inline-flex; align-items: center; gap: 6px; }
.home-default-notes img { width: 14px; height: 14px; filter: brightness(0) invert(1); }
body.day-mode .home-default-notes img { filter: brightness(0) saturate(100%) invert(25%) sepia(40%) saturate(800%) hue-rotate(160deg); }
.home-finding > textarea { width: 100%; min-height: 110px; }
.home-finding p, .home-generated p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.home-generated { font-weight: 400; }
.home-section-photos { border-top: 1px solid var(--border); padding-top: 20px; }
.home-finding-photos { margin-top: 16px; display: grid; gap: 12px; }
.home-finding > label { display: grid; gap: 6px; }
.full-home-builder .home-section-photos .photo-strip,
.full-home-builder .home-finding-photos .photo-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.full-home-builder .photo-count { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .full-home-builder .home-section-photos .photo-strip,
  .full-home-builder .home-finding-photos .photo-strip { grid-template-columns: 1fr; }
}
.home-photo-finding-title { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.home-pagination-probe { position: absolute; visibility: hidden; left: -10000px; top: 0; pointer-events: none; }
.full-home-page .home-report-content { flex: 0 0 auto; }
.full-home-page .home-report-entry, .full-home-page .home-report-finding { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid #d5dde4; }
.full-home-page .home-report-content strong { display: block; font-size: 14px; line-height: 1.4; }
.full-home-page .home-report-content p { margin: 6px 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.full-home-page .home-legal-paragraph { margin: 0 0 10px; padding: 0; border: 0; }
.full-home-page .home-legal-paragraph p { margin: 0; white-space: normal; }
.full-home-page [data-home-page-prefix] { display: flow-root; flex: 0 0 auto; }
.full-home-page .home-order-summary { display: flow-root; margin-bottom: 18px; }
.full-home-page .home-order-summary .report-info-grid { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-home-page .home-report-topic-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 10px; padding: 7px 0; border-top: 3px solid #607c94; border-bottom: 2px solid #607c94; }
.full-home-page .home-report-topic-heading h4 { margin: 0; font-size: 15px; line-height: 1.4; color: #111; }
.full-home-page .home-report-visibility { display: grid; gap: 2px; max-width: 48%; text-align: right; font-size: 12px; font-weight: 700; line-height: 1.4; }
.full-home-page .home-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 10px; }
.full-home-page .home-report-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; grid-column: 1 / -1; break-inside: avoid; }
.full-home-page .home-report-topic > .home-report-pair { margin-bottom: 10px; }
.full-home-page .home-report-cell { min-width: 0; }
.full-home-page .home-report-cell strong { font-size: 14px; font-weight: 800; line-height: 1.4; color: #172b3c; }
.full-home-page .home-report-cell p { margin: 2px 0 0; }
.full-home-page .home-report-note { margin-top: 12px; }
.full-home-page .home-report-note p { margin-bottom: 0; }
.full-home-page .home-report-topic .home-report-finding { margin: 0; padding: 0; border: 0; }
.full-home-page .home-report-photo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.full-home-page .home-report-photo-row figure { margin: 0; min-width: 0; }
.full-home-page .home-report-photo-media { height: 220px; background: #f5f7f9; border: 1px solid #ccd6de; }
.full-home-page .home-report-photo-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.full-home-page .home-report-photo-single { width: 348px; max-width: 100%; margin-top: 8px; }
.full-home-page .home-report-photo-group figcaption p { font-size: 12px; line-height: 1.4; }
.full-home-page .home-property-facts { margin-top: 14px; }
.full-home-page .home-report-content > .home-report-topic { margin-top: 14px; }
.home-comment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.home-comment-heading > label { font-weight: 700; }
.home-comment-heading .button-row { margin: 0; }
.home-comments [data-home-recap-remove] img { width: 18px; height: 18px; filter: brightness(0) saturate(100%) invert(51%) sepia(96%) saturate(1419%) hue-rotate(328deg) brightness(100%) contrast(105%); }
body.day-mode .button.secondary,
body.day-mode .icon-button,
body.day-mode .icon-back { color: #164766; background: #e6f0f6; background-image: none; border-color: #92b0c3; box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgba(34, 76, 103, 0.16); }
body.day-mode .button.secondary:not(:disabled):hover,
body.day-mode .icon-button:not(:disabled):hover,
body.day-mode .icon-back:not(:disabled):hover { color: #0b354d; background: #c9e2ee; border-color: #367c9f; box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px rgba(34, 76, 103, 0.24); }
body.day-mode .button.secondary.is-active { color: #ffffff; background: #17698c; border-color: #125575; }
body.day-mode .button:focus-visible,
body.day-mode .icon-button:focus-visible,
body.day-mode .icon-back:focus-visible { outline: 2px solid #267898; outline-offset: 3px; }
@media (max-width: 600px) { .home-comment-heading { flex-wrap: wrap; } }

.report-page {
  position: relative;
  counter-increment: report-page;
  display: flex;
  flex-direction: column;
  width: 8.5in;
  min-width: 8.5in;
  height: 11in;
  min-height: 11in;
  margin: 0 auto 26px;
  padding: 0.62in 0.44in 0.44in;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(45, 59, 71, 0.22), 0 12px 28px rgba(15, 28, 39, 0.18);
  box-sizing: border-box;
  overflow: hidden;
  break-after: page;
}

.report-page:last-child {
  margin-bottom: 0;
}

.report-page::before {
  content: "Page " counter(report-page);
  position: absolute;
  z-index: 8;
  top: 0.18in;
  left: 0.28in;
  color: #4f5b66;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
}

.report-preview .report-page,
.report-preview .report-info-grid div,
.report-preview .report-field-grid div,
.report-preview .report-cover-wrap,
.report-preview .report-section.full,
.report-preview .cpic-template-page {
  border-color: #c4cfda;
  color: #111111;
  background: #ffffff;
}

.report-preview .report-page:not(.cpic-template-page) {
  padding-top: 0.62in;
  padding-bottom: 0.44in;
}

.report-preview .report-page.report-cover-page,
.report-preview .report-page.legal-sheet,
.report-preview .report-page.report-info-page {
  padding-top: 0.32in;
}

.report-preview .report-logo,
.report-preview .report-info-grid span,
.report-preview .cover-prepared-grid,
.report-preview .link-line,
.report-preview a {
  cursor: default;
  pointer-events: none;
}

.report-preview h2,
.report-preview h3,
.report-preview p,
.report-preview span,
.report-preview div,
.report-preview strong,
.report-preview figcaption {
  color: #111111;
}

.report-preview .report-section-heading {
  color: var(--report-label-contrast);
  background: var(--report-label-color);
}

.report-preview .report-section-heading h3,
.report-preview .report-section-heading span {
  color: var(--report-label-contrast);
}

.report-preview .report-info-grid strong,
.report-preview .report-field-grid strong {
  color: var(--report-label-text);
}

.report-preview .link-line {
  color: #005dab;
}

.professional-header {
  display: block;
  padding-bottom: 12px;
}

.report-contact-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  min-height: 20px;
  margin-bottom: 8px;
}

.report-contact-strip > span:last-child {
  margin-left: auto;
  text-align: right;
}

.report-contact-strip span,
.report-contact-strip strong {
  color: #111111;
}

.report-header-body {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
}

.report-header-left,
.report-header-center,
.report-header-balance {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.report-header-left > div {
  display: grid;
  gap: 6px;
}

.report-header-left {
  align-self: start;
  justify-items: start;
}

.report-header-left .report-logo {
  width: 116px;
  max-height: 82px;
}

.report-header-center {
  text-align: center;
}

.report-business-name {
  font-size: 1.72rem;
  line-height: 1.08;
}

.report-inspector-credentials {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  text-align: center;
}

.report-inspector-credentials span {
  font-size: 0.86rem;
}

.report-header-links {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-width: 0;
  margin-top: 8px;
  color: #111111;
  font-size: 0.82rem;
  text-align: left;
}

.report-header-links span {
  max-width: 100%;
  color: #111111;
  white-space: nowrap;
}

.report-header-links .link-line {
  color: #005dab;
}

.report-header-links span strong {
  color: #111111;
}

.four-point-section-banner {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-left: 5px solid var(--report-label-color, #064e92);
  color: var(--report-label-dark, #073967);
  background: var(--report-label-soft, #e2eef8);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.two-column-print {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.half-section {
  margin-top: 0;
}

.legal-sheet > p {
  line-height: 1.5;
  text-transform: uppercase;
}

.legal-sheet-lower-rule {
  width: 100%;
  margin-top: 18px;
  border-top: 3px solid var(--brand);
}

.print-only {
  display: none;
}

.report-preview .print-only {
  display: flex;
}

.report-cover-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 0;
  border-radius: 4px;
}

.report-info-grid,
.report-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-info-grid {
  margin-top: 18px;
}

.report-info-grid div,
.report-field-grid div {
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

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

.system-report-page .report-field-grid {
  gap: 7px;
}

.system-report-page .report-field-grid > div {
  min-height: 44px;
  padding: 5px 8px;
}

.report-comment-field span {
  line-height: 1.35;
  white-space: pre-wrap;
}

.report-info-grid strong,
.report-field-grid strong {
  display: block;
  color: var(--report-label-text, var(--brand));
  font-size: 0.72rem;
  text-transform: uppercase;
}

.report-info-grid span,
.report-field-grid span {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.report-section {
  margin-top: 18px;
  break-inside: avoid;
}

.report-survey-page {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}

.report-section.full {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compacted-general-comments { margin-top: 20px; }
.compacted-general-comments p { white-space: pre-wrap; overflow-wrap: anywhere; }
.work-order-content .report-field-grid { margin-top: 16px; }
.work-order-content .report-field-grid > div { padding: 7px 0; border-bottom: 1px solid #d8e0e8; }
.work-worksheet { color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 0.86rem; }
.work-worksheet .report-section-heading { margin-bottom: 15px; }
.work-worksheet-identification { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.work-worksheet-identification .work-worksheet-line:nth-child(3) { grid-column: 1 / -1; }
.work-worksheet-line { display: flex; gap: 8px; min-height: 25px; border-bottom: 1px solid #a7b4c2; }
.work-worksheet-line strong { white-space: nowrap; }
.work-worksheet-line span { overflow-wrap: anywhere; }
.work-worksheet h4 { margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #9fb1c4; font-size: 0.9rem; }
.work-worksheet-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 15px; }
.work-worksheet-checks > div { display: flex; align-items: center; gap: 7px; }
.work-worksheet-box { flex: none; width: 13px; height: 13px; border: 1px solid #333333; }
.work-worksheet-checks + .work-worksheet-line { margin-top: 12px; }
.work-worksheet-notes > div { height: 27px; border-bottom: 1px solid #b9c4cf; }
.work-worksheet-signoff { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.pdf-attachments .photo-strip { margin-top: 10px; }
.pdf-document-report { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pdf-document-report img { display: block; width: 100%; max-height: 8.7in; min-height: 0; flex: 1; object-fit: contain; object-position: center top; }

.report-subsection {
  margin-top: 10px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.report-subsection h4 {
  margin: 0 0 6px;
  padding: 5px 8px;
  border: 1px solid #9fb1c4;
  color: #111111;
  background: #e9f0f7;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-subsection-grid {
  margin-bottom: 8px;
}

.report-section-heading {
  padding: 8px 10px;
  color: var(--report-label-contrast, #ffffff);
  background: var(--report-label-color, var(--brand));
}

.report-section-heading span {
  color: var(--report-label-contrast, #dce8f2);
  font-size: 0.82rem;
}

.report-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.report-photos figure {
  margin: 0;
  break-inside: avoid;
}

.report-photos img {
  width: 100%;
  height: 120px;
}

.report-photos figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.report-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
}

.credit-only-footer {
  padding-top: 0;
  border-top: 0;
}

.form-footer {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.54rem;
  line-height: 1.28;
  text-transform: uppercase;
}

.form-footer p {
  margin: 0;
}

.software-credit {
  margin-top: 7px;
  color: #111111;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.cpic-template-page {
  position: relative;
  width: min(8.5in, 100%);
  aspect-ratio: 8.5 / 11;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
  contain: layout paint;
}

.wind-template-page {
  position: relative;
  display: block;
  width: 8.5in;
  min-width: 8.5in;
  height: 11in;
  min-height: 11in;
  padding: 0 !important;
  overflow: hidden;
  background: #ffffff;
  contain: layout paint;
}

.report-preview .report-page.wind-template-page {
  padding: 0 !important;
}

.wind-template-page::before {
  display: none;
}

.wind-template-bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.wind-pdf-text,
.wind-pdf-check,
.wind-pdf-image {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
}

.wind-pdf-text {
  display: flex;
  align-items: center;
  padding: 0 1px;
  overflow: hidden;
  color: #111111;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7.4pt;
  line-height: 1;
  white-space: nowrap;
}

.wind-product-approval-value {
  overflow: visible;
  padding-inline: 0;
}

.wind-pdf-check {
  display: grid;
  place-items: center;
  color: #111111;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 8pt;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.wind-pdf-image {
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.wind-other-cover-description {
  left: 12%;
  top: 82.75%;
  width: 14.4%;
  height: 1.1%;
  align-items: flex-start;
  padding: 0;
  background: transparent;
}

.wind-template-page-1 .wind-pdf-text,
.wind-template-page-6 .wind-pdf-text {
  font-size: 9pt;
  font-weight: 700;
}

.wind-template-page .wind-pdf-text.wind-property-address-value {
  overflow: visible;
  padding-left: 7px;
  font-size: 10pt;
  font-weight: 800;
}

.wind-inspector-override {
  position: absolute;
  z-index: 4;
  left: 5.9%;
  top: 48.15%;
  display: grid;
  width: 88.2%;
  height: 4.75%;
  grid-template-columns: 36% 30% 34%;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "name licenseType licenseNumber" "company company phone";
  overflow: hidden;
  border: 1px solid #222222;
  color: #111111;
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

.wind-inspector-override > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 2px 6px;
  border-right: 1px solid #333333;
  border-bottom: 1px solid #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  line-height: 1.1;
  white-space: nowrap;
}

.wind-inspector-override > div span {
  overflow: hidden;
  text-overflow: clip;
}

.wind-override-name {
  grid-area: name;
}

.wind-override-license-type {
  grid-area: licenseType;
}

.wind-override-license-number {
  grid-area: licenseNumber;
  border-right: 0 !important;
}

.wind-override-company {
  grid-area: company;
  border-bottom: 0 !important;
}

.wind-override-phone {
  grid-area: phone;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.photo-report-page h3 {
  margin: 10px 0 14px;
  color: #111111;
  font-size: 1.35rem;
  text-align: center;
}

.photo-report-grid {
  display: grid;
  align-content: start;
  gap: 14px;
}

.photo-report-figure {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.photo-report-media {
  display: grid;
  width: fit-content;
  max-width: 100%;
  justify-items: stretch;
}

.photo-report-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 3.35in;
  justify-self: center;
  border: 1px solid #9aa6b2;
  background: #ffffff;
}

.photo-report-media figcaption {
  min-height: 34px;
  border: 1px solid #5d6873;
  border-top: 0;
  padding: 7px 9px;
  color: #111111;
  font-weight: 800;
  text-align: left;
}

.photo-report-description {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  margin: 0;
  border: 1px solid #9aa6b2;
  padding: 8px 9px;
  color: #111111;
  line-height: 1.35;
  white-space: pre-wrap;
}

.wind-photo-report-page.is-document-photo-page .photo-report-grid {
  grid-template-columns: 1fr;
  flex: 1 1 auto;
  align-content: center;
}

.wind-photo-report-page.is-document-photo-page .photo-report-figure {
  height: 100%;
  align-content: center;
}

.wind-photo-report-page.is-document-photo-page .photo-report-media {
  width: 100%;
}

.wind-photo-report-page.is-document-photo-page .photo-report-media img {
  width: auto;
  max-width: 100%;
  max-height: 8.4in;
}

.wind-photo-report-page.is-document-photo-page .photo-report-media figcaption {
  width: 100%;
  box-sizing: border-box;
}

.schedule-calendar-panel {
  overflow: auto;
}

.schedule-calendar-header {
  align-items: center;
}

.schedule-calendar-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.schedule-calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-view-toggle {
  display: inline-flex;
  gap: 2px;
  margin-right: 10px;
}

.schedule-view-toggle [aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.schedule-calendar-month {
  margin: 10px 0 14px;
  font-size: 1.1rem;
}

.schedule-calendar-grid {
  display: grid;
  min-width: 680px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.schedule-calendar-weekday,
.schedule-calendar-day {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-calendar-weekday {
  padding: 8px 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.schedule-calendar-day {
  min-height: 112px;
  padding: 6px;
  background: var(--surface);
}

.schedule-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.schedule-calendar-day-number {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

button.schedule-calendar-day-number {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

button.schedule-calendar-day-number:hover,
button.schedule-calendar-day-number:focus-visible {
  background: var(--brand);
  color: #fff;
}

.schedule-calendar-event {
  display: grid;
  width: 100%;
  gap: 2px;
  margin-top: 4px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  color: var(--text);
  background: var(--glass);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.schedule-calendar-event time {
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 900;
}

.schedule-calendar-event span,
.schedule-calendar-event small {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-calendar-event small {
  color: var(--muted);
}

.schedule-calendar-more {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.schedule-day-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.schedule-day-toolbar label {
  max-width: 220px;
}

.schedule-day-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  padding-top: 14px;
}

.schedule-day-list {
  min-width: 0;
}

.schedule-day-order {
  display: grid;
  width: 100%;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.schedule-day-order:hover,
.schedule-day-order:focus-visible {
  background: var(--glass);
}

.schedule-day-order time {
  color: var(--brand-strong);
  font-weight: 800;
}

.schedule-day-order strong,
.schedule-day-order small {
  display: block;
  overflow-wrap: anywhere;
}

.schedule-day-order small {
  margin-top: 3px;
  color: var(--muted);
}

.schedule-map-wrap {
  min-width: 0;
}

.schedule-map {
  width: 100%;
  height: 410px;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .schedule-day-layout { grid-template-columns: minmax(0, 1fr); }
  .schedule-map { height: 330px; }
}

@media (max-width: 600px) {
  .schedule-calendar-header { display: block; }
  .schedule-calendar-controls { margin-top: 10px; width: 100%; min-width: 0; }
  .schedule-view-toggle { margin-right: 0; }
  .schedule-day-toolbar label { width: 100%; max-width: none; }
  .schedule-day-toolbar [data-calendar-route] { max-width: 100%; white-space: normal; }
}

.report-page .system-report-photos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 14px 10px;
}

.system-report-photos img {
  height: 2.18in;
  object-fit: contain;
  background: #ffffff;
}

.system-report-photos figcaption {
  min-height: 2.2em;
  color: #111111;
  font-weight: 700;
  text-align: center;
}

.cpic-template-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.cpic-four-supplement {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cpic-four-supplement legend {
  padding: 0 6px;
  font-weight: 700;
}

.cpic-four-overlay {
  position: absolute;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.08;
  overflow: hidden;
}

.cpic-four-text {
  white-space: nowrap;
}

.cpic-four-check {
  display: grid;
  place-items: center;
  font-weight: 700;
  line-height: 1;
}

.cpic-four-comments {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cpic-four-signature {
  object-fit: contain;
  object-position: center;
}

.cpic-overlay {
  position: absolute;
  z-index: 2;
  display: block;
  min-height: 0;
  padding: 0;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.6rem;
  line-height: 1.05;
  white-space: normal;
  overflow: hidden;
  transform: none;
}

.cpic-roof-value,
.rfg-roof-value {
  font-size: 0.56rem;
  line-height: 1.03;
  transform: none;
}

.rfg-cover-value {
  white-space: nowrap;
  overflow: visible;
}

.rfg-center {
  text-align: center;
}

.rfg-identity-value {
  font-size: 9pt;
  line-height: 1.05;
  white-space: nowrap;
}

.cpic-signature-value,
.rfg-signature-value {
  font-size: 7.2pt;
  font-weight: 700;
  line-height: 1.02;
  white-space: nowrap;
  transform: none;
}

.rfg-signature-image {
  object-fit: contain;
  object-position: left center;
  padding: 0;
  overflow: visible;
}

.cpic-comments,
.rfg-comments {
  display: block;
  height: 14.1%;
  font-size: 10.5pt;
  line-height: 1.15;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transform: none;
}

.cpic-check {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 0.105in;
  height: 0.105in;
  place-items: center;
  color: #111111;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: none;
}

.cpic-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.2%;
  z-index: 2;
}

.cover-prepared-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px 26px;
  margin-top: 30px;
  color: #111111;
  font-size: 1.13rem;
  line-height: 1.35;
}

.cover-prepared-grid strong {
  font-weight: 900;
}

.cover-prepared-grid strong {
  color: #111111;
}

.report-survey-page > .report-section-heading {
  align-items: stretch;
}

.report-survey-page > .report-section-heading h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.report-survey-page > .report-section-heading span {
  align-self: flex-end;
  padding-bottom: 2px;
}

.wide-detail {
  grid-column: 1 / -1;
}

.completed-report-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--glass);
}

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

.completed-report-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.34);
}

body.night-mode .completed-report-card {
  background: rgba(37, 80, 121, 0.24);
}

.completed-report-card p,
.completed-report-card strong {
  margin: 0;
}

.saved-toast {
  align-self: center;
  padding: 8px 12px;
  border: 1px solid rgba(23, 114, 69, 0.35);
  border-radius: 6px;
  color: #0f5c34;
  background: rgba(211, 244, 225, 0.94);
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.saved-toast.is-visible {
  opacity: 1;
}

.tier-list,
.settings-list {
  display: grid;
  gap: 12px;
}

.settings-list label {
  grid-template-columns: 20px 1fr;
  align-items: start;
}

.settings-list input {
  width: auto;
  margin-top: 3px;
}

.settings-list .report-color-setting {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.report-color-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-list input[type="color"] {
  width: 64px;
  height: 40px;
  margin: 0;
  border-radius: 6px;
  padding: 3px;
  cursor: pointer;
}

.report-color-picker-row output {
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
}

.report-label-color-sample {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-solid);
}

.report-label-color-sample strong,
.report-label-color-sample span {
  display: block;
  padding: 8px 10px;
}

.report-label-color-sample strong {
  color: var(--report-label-contrast, #ffffff);
  background: var(--report-label-color, #064e92);
}

.report-label-color-sample span {
  color: var(--report-label-text, #064e92);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.tier-pill {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tier-pill strong {
  display: block;
}

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

.login-screen,
.business-setup {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #030b14, #08243f 62%);
}

.login-screen {
  align-content: center;
  gap: 14px;
}

.business-setup {
  position: fixed;
  inset: 0;
  z-index: 18;
  overflow: auto;
}

.login-card,
.business-setup-card {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  padding: 26px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.login-card {
  justify-items: stretch;
  color: #f3f8fc;
  background: rgba(8, 28, 46, 0.96);
  border: 1px solid rgba(184, 217, 245, 0.28);
  text-align: center;
}

.login-recovery { width: min(560px, 100%); text-align: left; }
.login-recovery h2 { margin: 0; font-size: 1.1rem; }
.login-recovery ul { max-height: 180px; overflow: auto; margin: 0; padding-left: 22px; }
.login-recovery li { margin: 4px 0; }
.login-recovery .button { white-space: normal; }

.login-progress { justify-items: center; min-height: 250px; align-content: center; }
.login-progress strong { font-size: 1.08rem; }
.login-progress-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(184, 217, 245, 0.28);
  border-top-color: #d6b15d;
  border-radius: 50%;
  animation: login-spin 0.8s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .login-progress-spinner { animation: none; border-color: #d6b15d; } }

.login-logo {
  justify-self: center;
  width: min(340px, 100%);
  height: auto;
  max-height: 190px;
  object-fit: contain;
  filter: none;
}

.login-card h1 {
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.05;
}

.business-setup-card {
  width: min(880px, 100%);
  margin: auto;
}

.login-card h1,
.login-card p,
.business-setup-card h2,
.business-setup-card p {
  margin: 0;
}

.login-card small {
  color: #dbe9f6;
}

.login-card label,
.login-card p {
  color: #dbe9f6;
}

.login-card label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  text-align: center;
}

.login-card input {
  color: #f3f8fc;
  background: rgba(7, 23, 38, 0.88);
  border-color: rgba(184, 217, 245, 0.34);
}

.login-card input:focus {
  border-color: rgba(214, 177, 93, 0.76);
  box-shadow: 0 0 0 3px rgba(214, 177, 93, 0.18);
}

.login-card label + label {
  margin-top: 8px;
}

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

.login-field + .login-field { margin-top: 8px; }
.login-input-wrap { position: relative; min-width: 0; }
.login-input-wrap input { width: 100%; }
.login-input-wrap input[name="password"] { padding-right: 48px; }

.login-email-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 3;
  padding: 4px 0;
  border: 1px solid #b8c2ca;
  border-radius: 4px;
  background: #fff;
  color: #15222d;
  box-shadow: 0 4px 12px #0003;
  text-align: left;
}

.login-email-suggestions button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #15222d;
  text-align: left;
  font: inherit;
  overflow-wrap: anywhere;
}

.login-email-suggestions button:hover,
.login-email-suggestions button[aria-selected="true"] { background: #e7f0f9; }

.login-password-reveal {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #f3f8fc;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.login-password-reveal:hover,
.login-password-reveal[aria-pressed="true"] { background: #ffffff1f; }
.login-password-reveal:focus-visible { outline: 2px solid #d6b15d; outline-offset: -3px; }
.login-eye-icon { width: 20px; height: 20px; background: currentColor; mask: url("icons/lucide-eye.svg") center / contain no-repeat; }

.login-subtitle {
  margin: 0;
  color: #dbe9f6;
  font-weight: 700;
  text-align: center;
}

.login-message {
  min-height: 20px;
  color: var(--danger);
  font-size: 0.92rem;
}

.photo-thumb .button-icon {
  display: inline-block;
  flex: none;
  width: 15px;
  min-width: 15px;
  max-width: 15px;
  height: 15px;
  min-height: 15px;
  max-height: 15px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.photo-thumb [data-markup-photo-section],
.photo-card-actions [data-adjust-photo-section] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  min-height: 34px;
  line-height: 1;
  white-space: nowrap;
}

.login-message.is-ok {
  color: var(--good);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 32, 0.52);
}

.modal-card {
  width: min(460px, 100%);
  padding: 22px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.modal-backdrop[data-modal-mode="assignment"] .modal-card { width: min(640px, 100%); }
.modal-backdrop[data-modal-mode="assignment"] [data-order-assignment-form] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.modal-backdrop[data-modal-mode="assignment"] [data-order-assignment-form] .field-note { margin: 0; }
.modal-backdrop[data-modal-mode="assignment"] [data-order-assignment-form] label { min-width: 0; }
.modal-backdrop[data-modal-mode="assignment"] [data-order-assignment-form] select { width: 100%; min-width: 0; }

.modal-backdrop.is-photo-correction .modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.modal-backdrop.is-photo-markup {
  padding: 12px;
}

.modal-backdrop.is-photo-markup .modal-card {
  display: flex;
  flex-direction: column;
  width: min(1500px, 100%);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  padding: 16px;
}

.modal-backdrop.is-photo-markup [data-modal-body] {
  min-height: 0;
  max-height: none;
  overflow: auto;
  white-space: normal;
}

.photo-markup-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 12px;
  min-width: 0;
}

.photo-markup-editor.tools-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.photo-upload-preview {
  display: grid;
  gap: 12px;
}

.photo-upload-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-upload-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
}

.photo-upload-fields textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.photo-markup-main,
.photo-markup-sidebar {
  min-width: 0;
}

.photo-markup-topbar,
.photo-markup-history {
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-markup-topbar {
  justify-content: space-between;
  margin-bottom: 8px;
}

.photo-markup-stage {
  display: grid;
  place-items: center;
  min-height: 300px;
  max-height: 58vh;
  overflow: auto;
  background: #111c26;
}

.photo-markup-stage canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 58vh;
  touch-action: none;
  cursor: crosshair;
}

.photo-markup-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
}

.photo-markup-tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.photo-markup-tool {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--field);
  cursor: pointer;
}

.photo-markup-tool.is-active {
  border-color: #2f9ed5;
  box-shadow: 0 0 0 2px rgba(47, 158, 213, 0.3);
}

.photo-markup-tool img,
.button-icon,
[data-markup-tools-toggle] img {
  width: 17px;
  height: 17px;
  vertical-align: middle;
}

body.night-mode .photo-markup-tool img,
body.night-mode .button-icon,
body.night-mode [data-markup-tools-toggle] img {
  filter: brightness(0) invert(1);
}

.photo-markup-controls,
.photo-markup-text-controls {
  display: grid;
  gap: 10px;
}

.photo-markup-controls label,
.photo-markup-text-controls label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 700;
}

.photo-markup-controls input[type="range"],
.photo-markup-text-controls input[type="range"],
.photo-markup-text-controls textarea,
.photo-markup-text-controls select {
  width: 100%;
}

.photo-markup-controls input[type="color"],
.photo-markup-text-controls input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.photo-markup-controls input[type="color"]::-webkit-color-swatch,
.photo-markup-text-controls input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 2px;
}

.photo-markup-error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 800px) {
  .photo-markup-editor { grid-template-columns: minmax(0, 1fr); }
  .photo-upload-fields { grid-template-columns: minmax(0, 1fr); }
  .photo-markup-sidebar { max-height: 30vh; }
  .photo-markup-stage, .photo-markup-stage canvas { max-height: 48vh; }
}

body.night-mode .login-card,
body.night-mode .business-setup-card,
body.night-mode .modal-card {
  color: #f3f8fc;
  background: rgba(8, 28, 46, 0.96);
  border: 1px solid rgba(184, 217, 245, 0.24);
}

body.night-mode .login-card label,
body.night-mode .login-card p,
body.night-mode .login-card small,
body.night-mode .business-setup-card p,
body.night-mode .modal-card p,
body.night-mode .modal-card [data-modal-body] {
  color: #dbe9f6;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.45;
}

.modal-card [data-modal-body] {
  max-height: min(70vh, 750px);
  overflow: auto;
  line-height: 1.5;
  white-space: pre-line;
}

.signed-update-progress {
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 14px;
  accent-color: #2784bf;
}

.modal-actions {
  margin-top: 16px;
}

.modal-card [data-modal-body] > p:first-child,
.modal-filter-form p {
  color: var(--muted);
  line-height: 1.45;
}

.modal-filter-form {
  margin-top: 6px;
}

.modal-choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.archive-readonly-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(154, 97, 21, 0.28);
  border-radius: 6px;
  color: var(--warn);
  background: rgba(255, 244, 214, 0.78);
  font-weight: 800;
}

body.night-mode .archive-readonly-note {
  color: #f2d38a;
  background: rgba(83, 57, 14, 0.36);
  border-color: rgba(242, 211, 138, 0.28);
}

.photo-edit-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.photo-label-field {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.photo-label-field input,
.photo-label-field textarea {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.74rem;
}

.photo-label-field textarea,
.photo-label-modal textarea {
  min-height: 30px;
  resize: none;
  overflow: hidden;
}

.photo-label-modal textarea {
  min-height: 48px;
}

@media screen and (max-width: 980px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    gap: 16px;
    padding: 18px 12px;
  }

  .workspace {
    padding: 20px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .split-layout,
  .crm-shell,
  .archive-shell,
  .deleted-shell,
  .settings-grid,
  .settings-record-split,
  .settings-inspector-page,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .metric-grid:has([data-qc-metric]:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

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

  .wind-photo-groups {
    grid-template-columns: 1fr;
  }

  .wind-roof-covering-head {
    display: none;
  }

  .wind-roof-covering-row {
    grid-template-columns: 34px 1fr;
    align-items: start;
  }

  .wind-roof-covering-row > label:not(.wind-cover-check) {
    grid-column: 2;
  }

  .wind-cover-check {
    grid-row: 1 / span 5;
  }

  .wind-no-info {
    justify-self: start;
  }

  .wind-mobile-label {
    display: inline;
  }

  .custom-block-grid,
  .compact-blocks,
  .paired-fields,
  .hazard-grid,
  .credential-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .gfci-grid-spacer {
    display: none;
  }

  .section-title,
  .report-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .inspector-radius-card {
    grid-template-columns: 1fr;
  }

  .radius-orbit {
    justify-self: start;
    grid-row: auto;
  }

  .brand-block img {
    width: min(150px, 54vw);
    max-height: 86px;
  }

  .brand-title strong {
    font-size: clamp(0.62rem, 2.5vw, 0.78rem);
  }

  .report-doc-header,
  .professional-header,
  .report-header-body,
  .report-info-grid,
  .report-field-grid,
  .report-photos,
  .two-column-print {
    grid-template-columns: 1fr;
  }

  .report-company-lines {
    text-align: left;
  }

  .report-header-center,
  .report-header-links {
    text-align: left;
  }

  .report-header-left,
  .report-header-links {
    justify-items: start;
  }
}

@media screen and (max-width: 700px) {
  .app-shell { grid-template-columns: 1fr; }
  .workspace { padding: 16px; }
  .sidebar {
    position: fixed;
    z-index: 31;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(290px, calc(100vw - 44px));
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  body.mobile-nav-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 30; inset: 0; border: 0; background: rgba(0, 0, 0, 0.5); }
  .mobile-nav-toggle { display: inline-grid; margin-right: 8px; vertical-align: middle; }
  .mobile-nav-toggle img { width: 18px; height: 18px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { width: 100%; }
}

@media screen and (max-width: 650px) {
  .report-builder-layout > .panel > .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .report-builder-layout .header-actions {
    flex-wrap: wrap;
  }
}

@media print {
  @page {
    size: 8.5in 11in;
    margin: 0;
  }

  html,
  body {
    width: 8.5in;
    min-width: 8.5in;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .sidebar,
  .topbar,
  .notice-row,
  .nav-list,
  .report-preview-panel .panel-header,
  .panel:not(.report-preview-panel) {
    display: none;
  }

  .app-shell,
  .workspace,
  .split-layout {
    display: block;
    width: 8.5in;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .preview-view,
  .preview-view .report-preview-panel,
  .preview-view .report-preview {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .preview-view .report-preview-panel {
    display: block;
    width: 8.5in;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff !important;
    box-shadow: none;
  }

  .preview-view .report-preview {
    width: 8.5in;
    max-width: none;
    margin: 0;
    border: 0;
    padding: 0;
    color: #111111;
    background: #ffffff !important;
    overflow: visible;
  }

  .report-preview,
  .report-preview * {
    box-shadow: none !important;
  }

  .print-only {
    display: block !important;
  }

  .report-page {
    width: 8.5in;
    min-width: 8.5in;
    height: 11in;
    min-height: 11in;
    margin: 0;
    padding: 0.56in 0.42in 0.38in;
    border: 0;
    border-radius: 0;
    color: #111111;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
  }

  .photo-report-page {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .photo-report-page .photo-report-grid {
    flex: 0 0 auto;
  }

  .report-page::before {
    top: 0.18in;
    left: 0.22in;
    color: #3f4851;
    font-size: 7.5pt;
  }

  .report-preview .report-page.report-cover-page,
  .report-preview .report-page.legal-sheet,
  .report-preview .report-page.report-info-page {
    padding-top: 0.32in;
  }

  .professional-header .report-header-body {
    display: grid;
    grid-template-columns: 1.25in minmax(0, 1fr) 1.25in;
    align-items: center;
  }

  .professional-header .report-header-left {
    justify-items: start;
    text-align: left;
  }

  .professional-header .report-header-center {
    justify-items: center;
    text-align: center;
  }

  .professional-header .report-header-links {
    justify-items: start;
    text-align: left;
  }

  .professional-header .report-business-name,
  .professional-header .report-inspector-credentials {
    width: 100%;
    text-align: center;
  }

  .cpic-template-page {
    width: 8.5in;
    height: 11in;
    max-width: none;
    aspect-ratio: auto;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none !important;
    transform: none;
  }

  .cpic-overlay {
    min-height: 0;
    padding: 0;
    font-size: 6.8pt;
    line-height: 1.05;
    transform: none;
  }

  .rfg-identity-value {
    font-size: 9pt;
    line-height: 1.05;
  }

  .cpic-roof-value,
  .rfg-roof-value {
    font-size: 6.6pt;
    line-height: 1.03;
    transform: none;
  }

  .rfg-cover-value {
    white-space: nowrap;
    overflow: visible;
  }

  .cpic-signature-value,
  .rfg-signature-value {
    font-size: 7.2pt;
    line-height: 1.02;
    transform: none;
  }

  .rfg-signature-image {
    object-fit: contain;
    object-position: left center;
    padding: 0;
    overflow: visible;
  }

  .cpic-comments,
  .rfg-comments {
    height: 14.1%;
    font-size: 10.5pt;
    line-height: 1.15;
    transform: none;
  }

  .cpic-check {
    width: 0.09in;
    height: 0.09in;
    font-size: 6.8pt;
    line-height: 1;
    transform: none;
  }

  .report-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .report-info-grid,
  .report-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .report-section,
  .report-field-grid div,
  .report-info-grid div,
  .report-photos figure,
  .report-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-section {
    break-inside: auto;
    page-break-inside: auto;
  }
}
/* Keep the exit and save actions visible in the long first-run form. */
.business-setup-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: var(--panel, #fff);
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  z-index: 2;
}

[data-storage-status] { display: block; font-size: 12px; margin-top: 4px; }
.storage-problem { color: #b91c1c; font-weight: 700; }
.address-suggestions { position: fixed; z-index: 1100; max-height: 260px; overflow: auto; background: var(--panel, #fff); border: 1px solid var(--line, #cbd5e1); box-shadow: 0 8px 24px #0003; border-radius: 4px; }
.address-suggestions[hidden] { display: none; }
.address-suggestion { display: block; width: 100%; padding: 8px 10px; color: var(--text, #17212b); background: transparent; border: 0; text-align: left; font: inherit; cursor: pointer; }
.address-suggestion:hover, .address-suggestion[aria-selected="true"] { background: var(--button-hover, #dcecf6); }
.address-suggestions-credit { display: block; padding: 5px 10px; font-size: 11px; color: var(--muted, #526273); }
