/* style.css — Adam Buys Alabama Houses design system (matches main site: navy / gold / cream) */

:root,
[data-theme='light'] {
  /* Surfaces — cream, matching adambuysalabamahouses.com */
  --color-bg: #f7f3e6;
  --color-surface: #ffffff;
  --color-surface-2: #fdfbf5;
  --color-surface-offset: #efe8d3;
  --color-surface-offset-2: #e6ddc2;
  --color-surface-dynamic: #d9cca4;
  --color-divider: #e3dabd;
  --color-border: #d6c9a4;

  /* Text — deep navy */
  --color-text: #12233a;
  --color-text-muted: #5b6b7f;
  --color-text-faint: #97a2b0;
  --color-text-inverse: #f7f3e6;

  /* Primary — brand gold (accent / CTA color from the main site) */
  --color-primary: #c8912e;
  --color-primary-hover: #ac7a22;
  --color-primary-active: #8f651c;
  --color-primary-highlight: #f3e6c9;

  /* Brand navy — header band / dark accents, matching site's --color-band */
  --color-navy: #12233a;
  --color-navy-deep: #0b1626;
  --color-navy-ink: #f7f3e6;
  --color-navy-gold: #d9a53e;

  /* Condition tiers */
  --color-success: #3f7d3a;
  --color-success-hover: #2f5f2b;
  --color-success-highlight: #d8e6d3;

  --color-warning: #b9860f;
  --color-warning-hover: #96690b;
  --color-warning-highlight: #efdfba;

  --color-error: #a3311f;
  --color-error-hover: #822719;
  --color-error-highlight: #ecd3cd;

  /* Blueprint blue — informational accents */
  --color-blue: #2f5f7a;
  --color-blue-hover: #234a60;
  --color-blue-highlight: #d3dfe6;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 60 / 0.1);
  --shadow-lg: 0 16px 36px oklch(0.2 0.02 60 / 0.16);

  --content-narrow: 560px;
  --content-default: 780px;
  --content-wide: 960px;

  --font-display: 'Anton', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.2rem + 1vw, 1.875rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

[data-theme='dark'] {
  --color-bg: #0e1a2b;
  --color-surface: #142339;
  --color-surface-2: #17273f;
  --color-surface-offset: #1c2e47;
  --color-surface-offset-2: #21354f;
  --color-surface-dynamic: #2b4160;
  --color-divider: #243650;
  --color-border: #33465f;

  --color-text: #eef1f5;
  --color-text-muted: #a9b4c2;
  --color-text-faint: #6c7889;
  --color-text-inverse: #0e1a2b;

  --color-primary: #e0b158;
  --color-primary-hover: #eac37a;
  --color-primary-active: #f2d49b;
  --color-primary-highlight: #3a2f1a;

  --color-navy: #0b1626;
  --color-navy-deep: #07101c;
  --color-navy-ink: #f7f3e6;
  --color-navy-gold: #e0b158;

  --color-success: #7cb56f;
  --color-success-hover: #96c98a;
  --color-success-highlight: #2c3a26;

  --color-warning: #d9ab3f;
  --color-warning-hover: #e6bc5c;
  --color-warning-highlight: #3d341c;

  --color-error: #d97160;
  --color-error-hover: #e08e7f;
  --color-error-highlight: #402620;

  --color-blue: #7fa6be;
  --color-blue-hover: #9dbccf;
  --color-blue-highlight: #223038;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 36px oklch(0 0 0 / 0.45);
}

/* ---------- Layout shell ---------- */

.page {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-4) var(--space-32);
}

@media (min-width: 640px) {
  .page {
    padding-inline: var(--space-6);
  }
}

/* ---------- Header ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--color-navy) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-navy-deep);
  padding: var(--space-4) var(--space-4);
  margin-inline: calc(var(--space-4) * -1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .app-header {
    margin-inline: calc(var(--space-6) * -1);
    padding-inline: var(--space-6);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--color-navy-gold);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-navy-ink);
}

.brand-text p {
  font-size: var(--text-xs);
  color: color-mix(in oklab, var(--color-navy-ink) 70%, transparent);
  max-width: none;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--color-navy-ink) 25%, transparent);
  background: color-mix(in oklab, var(--color-navy-ink) 12%, transparent);
  color: var(--color-navy-ink);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: color-mix(in oklab, var(--color-navy-ink) 20%, transparent);
}

/* ---------- Section cards ---------- */

.section {
  margin-top: var(--space-8);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

/* ---------- Template action row ---------- */

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}
.pill-btn:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-faint);
}
.pill-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pill-btn.warn {
  color: var(--color-error);
  border-color: color-mix(in oklab, var(--color-error) 40%, var(--color-border));
}
.pill-btn.warn:hover {
  background: var(--color-error-highlight);
}

/* ---------- Property info form ---------- */

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .field-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
  .field-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .field-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 860px) {
  .field-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-base);
  min-height: 44px;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-primary);
}

.field.money input {
  font-variant-numeric: tabular-nums;
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

/* ---------- Room cards ---------- */

.room-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.room-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

/* "+ Add custom space here" inline picker between room cards (walkthrough
   edits #25) — a slim, low-emphasis row so it doesn't compete visually with
   the room cards themselves, but stays easy to spot and tap. */
.room-insert-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.room-insert-row:hover,
.room-insert-row:focus-within {
  opacity: 1;
}
.room-insert-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted, currentColor);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}
.room-insert-select {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm, 0.85rem);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md, 6px);
  background: transparent;
  padding: 3px var(--space-2);
  color: inherit;
}

.room-card-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  align-items: start;
  margin-bottom: var(--space-3);
}

.room-name-input {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  background: transparent;
  padding: var(--space-1) 0;
  border-bottom: 1px dashed var(--color-border);
  min-height: 36px;
  width: 100%;
}
.room-name-input:focus-visible {
  border-color: var(--color-primary);
}

.room-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-faint);
  flex-shrink: 0;
}
.room-remove:hover {
  background: var(--color-error-highlight);
  color: var(--color-error);
}
.room-remove svg {
  width: 18px;
  height: 18px;
}

.room-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .room-grid.three {
    grid-template-columns: 1.1fr 1fr 0.9fr;
  }
}

.room-grid .field label {
  margin-bottom: var(--space-1);
}

.condition-select-wrap {
  position: relative;
}

.condition-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  margin-top: var(--space-1);
}
.condition-badge.tier-good {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.condition-badge.tier-fair {
  background: var(--color-warning-highlight);
  color: var(--color-warning);
}
.condition-badge.tier-poor {
  background: var(--color-error-highlight);
  color: var(--color-error);
}

.room-notes {
  margin-top: var(--space-3);
}

/* ---------- Kind-specific field groups ---------- */

.room-cost-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
}
.room-cost-display span {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.room-cost-display strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.kind-group {
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  border-top: 1px dashed var(--color-divider);
}
.kind-group:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.kind-group.is-disabled {
  opacity: 0.5;
}

.kind-group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

/* Inline per-subsection cost badge (walkthrough edits v2 #9). */
.kind-group-cost {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface-raised, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 2px var(--space-2);
  white-space: nowrap;
}

.kind-group-cost.is-zero {
  color: var(--color-text-faint);
  font-weight: 500;
  background: transparent;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .field-row.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.field-row .field:empty,
.field-row > .field:has(> :only-child:empty) {
  display: none;
}

.fx-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
  grid-column: 1 / -1;
}

/* Severity-tinted hints — used for hazardous electrical panel brands and
   wiring types that require remediation. */
.fx-hint.fx-warn,
.fx-hint.fx-caution {
  border-left: 3px solid var(--color-border);
  border-radius: var(--radius-sm, 4px);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
  line-height: 1.5;
}

.fx-hint.fx-warn {
  color: var(--color-error);
  background: var(--color-error-highlight);
  border-left-color: var(--color-error);
}

.fx-hint.fx-caution {
  color: var(--color-warning);
  background: var(--color-warning-highlight);
  border-left-color: var(--color-warning);
}

.fx-hint.fx-warn em,
.fx-hint.fx-caution em {
  opacity: 0.8;
}

/* ---------- Add room button ---------- */

.add-room-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: var(--text-sm);
  background: transparent;
}
.add-room-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.add-room-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Totals sticky bar ---------- */

.totals-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: var(--space-8) calc(var(--space-4) * -1) 0;
  padding: var(--space-4) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--color-surface) 96%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  .totals-bar {
    margin-inline: calc(var(--space-6) * -1);
    padding-inline: var(--space-6);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

.totals-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.totals-lines {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.totals-lines strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.grand-total {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.grand-total .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.grand-total .value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  min-height: 44px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-surface-offset);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Info / caveat callouts ---------- */

.callout {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
}

.callout.blue {
  border-color: color-mix(in oklab, var(--color-blue) 35%, var(--color-border));
  background: var(--color-blue-highlight);
  color: var(--color-text);
}

.callout strong {
  color: var(--color-text);
}

.callout ul {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
  list-style: disc;
}
.callout li {
  margin-bottom: var(--space-1);
}
.callout a {
  color: var(--color-blue);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--color-blue) 40%, transparent);
}

/* ---------- Footer ---------- */

.app-footer {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

@media (min-width: 640px) {
  .toast {
    bottom: 108px;
  }
}

/* ---------- Small button variant (Import Property Data, modal actions) ---------- */

.btn-small {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
}

/* ---------- Import Property Data modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0.15 0.01 60 / 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 100;
}
.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 1;
}
.modal-header h3 {
  font-size: var(--text-lg);
  font-weight: 700;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface-offset);
  color: var(--color-text);
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--color-surface-offset-2);
}
.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.modal-section-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.lookup-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.lookup-link-btn {
  text-decoration: none;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 1;
}

/* ---------- Auto-filled field indicator ---------- */

.auto-filled {
  color: var(--color-error) !important;
  font-weight: 600;
}

/* ---------- Section Sidebar Navigation ---------- */

.section-nav-toggle {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.section-nav-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.section-nav-scrim {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.45);
  z-index: 55;
}

.section-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  max-width: 82vw;
  overflow-y: auto;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--space-16) var(--space-4) var(--space-8);
  z-index: 56;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.section-nav.open {
  transform: translateX(0);
}

.section-nav-group-label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  flex-shrink: 0;
}

.section-nav-group-label:first-child {
  margin-top: 0;
}

.section-nav-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.section-nav-link:hover,
.section-nav-link:focus-visible {
  background: var(--color-surface-offset);
}

.section-nav-link.active {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 899px) {
  .app-header {
    padding-left: 132px;
  }
}

@media (min-width: 900px) {
  .section-nav-toggle,
  .section-nav-scrim {
    display: none;
  }

  .section-nav {
    transform: translateX(0);
    box-shadow: none;
  }

  .page {
    margin-left: 240px;
    max-width: calc(var(--content-wide) + 240px);
  }
}

/* ---------- Exterior siding rows / checkbox rows / estimate hints ---------- */

.siding-row {
  align-items: end;
}

.siding-row .btn {
  height: fit-content;
  margin-bottom: 2px;
}

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

.checkbox-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding-top: var(--space-5);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.estimate-btn {
  margin-top: var(--space-2);
  white-space: nowrap;
}

/* Multi-type whole-house flooring rows (walkthrough edits) */
.flooring-row {
  align-items: end;
}
.flooring-row-remove {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}
.flooring-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* Full-replacement quick presets (walkthrough edits) */
.preset-group {
  background: var(--color-primary-soft, rgba(21, 91, 74, 0.06));
  border-radius: var(--radius-md, 8px);
  padding: var(--space-3);
}
.preset-group:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: var(--space-3);
}
.preset-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.preset-btn {
  white-space: normal;
  text-align: center;
}

/* ---------- Lending Costs summary ---------- */

.lending-summary {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.lending-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.lending-summary-row strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.lending-summary-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-1);
  padding-top: var(--space-3);
  font-weight: 600;
}

.lending-summary-row.total strong {
  font-size: var(--text-base);
}

.lending-summary-row.highlight {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-1);
  padding-top: var(--space-3);
}

.lending-summary-row.highlight strong {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

/* ---------- Resume banner (IndexedDB autosave restore prompt) ---------- */

.callout.warning {
  border-color: color-mix(in oklab, var(--color-warning) 40%, var(--color-border));
  background: var(--color-warning-highlight);
  color: var(--color-text);
}

.resume-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.resume-banner[hidden] {
  display: none;
}

.resume-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---------- Per-room photo capture ---------- */

.photo-section {
  padding: var(--space-3);
  margin: var(--space-3) 0;
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  border: 1px dashed var(--color-border);
}

.photo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.photo-header-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.photo-count {
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.photo-actions .btn svg {
  width: 15px;
  height: 15px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--space-2);
}

.photo-grid:empty {
  display: none;
}

.photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.photo-remove-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: oklch(0.15 0.01 60 / 0.65);
  color: #fff;
  flex-shrink: 0;
}
.photo-remove-btn svg {
  width: 11px;
  height: 11px;
}
.photo-remove-btn:hover {
  background: var(--color-error);
}

/* ---------- Photo lightbox ---------- */

.photo-lightbox .modal-box.photo-lightbox-box {
  background: transparent;
  box-shadow: none;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  overflow: visible;
  position: relative;
}

.photo-lightbox-box img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.photo-lightbox-box .modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

/* ---------- Deal analysis: exit-strategy toggle (walkthrough edits v2 #12) ---------- */

.exit-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.exit-option {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.exit-option:hover {
  border-color: var(--color-primary);
}

.exit-option.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight, color-mix(in oklab, var(--color-primary) 10%, transparent));
  color: var(--color-text);
}

.exit-option-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.exit-option-sub {
  font-size: var(--text-xs);
  line-height: 1.35;
}

.deal-basis {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 400;
  color: var(--color-text-muted);
}

.lending-summary-row strong .deal-basis {
  text-align: right;
}

.deal-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-2);
}

/* ---------- Scope summary (walkthrough edits v2 #10) ---------- */

.scope-group + .scope-group {
  margin-top: var(--space-5);
}

.scope-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-primary);
}

.scope-group-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.scope-group-total {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}

.scope-group-total em {
  display: block;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 400;
  color: var(--color-text-muted);
}

.scope-room {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.scope-room-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.scope-room-head strong {
  font-variant-numeric: tabular-nums;
}

.scope-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 2px 0 2px var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.scope-line span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.scope-note {
  margin: var(--space-2) 0 0 var(--space-4);
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-muted);
}

.scope-totals {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 620px) {
  .exit-toggle {
    grid-template-columns: 1fr;
  }
}

/* Estimate basis notices under "Use est." hints */
.est-basis {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
}
.est-basis-ok { color: var(--color-success); }
.est-basis-missing {
  color: var(--color-text);
  background: var(--color-warning-highlight);
  border-left: 3px solid var(--color-warning);
  padding: 3px 6px;
  border-radius: 3px;
}

/* MAO input gate */
.mao-locked {
  border: 1px solid var(--color-warning);
  background: var(--color-warning-highlight);
  border-radius: 8px;
  padding: 14px 16px;
}
.mao-locked-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--color-text);
}
.mao-missing-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.mao-missing-link {
  width: 100%;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--color-text);
  cursor: pointer;
}
.mao-missing-link::before { content: "\25CB\00a0\00a0"; color: var(--color-primary); }
.mao-missing-link:hover, .mao-missing-link:focus-visible { border-color: var(--color-primary); outline: none; }
.write-mao-bar {
  margin-top: var(--space-4, 16px);
  padding-top: var(--space-4, 16px);
  border-top: 1px solid var(--color-divider);
}
.write-mao-bar .btn { width: 100%; }
.write-mao-bar .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Major Numbers card */
.major-arv { max-width: 320px; margin-bottom: var(--space-4, 16px); }
.major-locked {
  margin: 0 0 var(--space-4, 16px);
  padding: 10px 12px;
  border-left: 3px solid var(--color-warning);
  background: var(--color-warning-highlight);
  border-radius: 4px;
  color: var(--color-text);
  font-size: 0.9rem;
}
.linklike {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--color-text); text-decoration: underline; cursor: pointer;
}
.major-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.major-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  min-width: 0;
}
.major-tile.major-hero { border-color: var(--color-primary); background: var(--color-primary-highlight); }
.major-label {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-muted); font-weight: 700;
}
.major-value { font-size: 1.35rem; color: var(--color-text); font-variant-numeric: tabular-nums; }
.major-hero .major-value { font-size: 1.6rem; }
.major-note { font-size: 0.78rem; color: var(--color-text-muted); line-height: 1.3; }
.major-dash { color: var(--color-text-faint); }
@media (max-width: 480px) {
  .major-grid { grid-template-columns: 1fr 1fr; }
  .major-tile.major-hero { grid-column: 1 / -1; }
  .major-value { font-size: 1.1rem; }
}

/* Flip vs Wholetail */
.vs-title { margin: 0 0 4px; font-family: 'Archivo Black', sans-serif; font-size: 1.15rem; color: var(--color-text); font-weight: 400; }
.vs-intro { margin: 0 0 var(--space-4, 16px); }
.vs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.vs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 520px; }
.vs-table th, .vs-table td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--color-divider); vertical-align: middle; font-size: 0.9rem; }
.vs-table thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 700; }
.vs-table tbody th { text-align: left; font-weight: 400; color: var(--color-text); max-width: 180px; }
.vs-table td { color: var(--color-text); }
.vs-table td:last-child { color: var(--color-text-muted); font-size: 0.82rem; }
.vs-table input, .vs-table select { width: 100%; min-width: 88px; text-align: right; padding: 6px 8px; font: inherit; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-2, var(--color-surface)); color: var(--color-text); }
.vs-input-row th { font-weight: 700 !important; }
.vs-hero td, .vs-hero th { font-weight: 700 !important; font-size: 1rem; }
.vs-hero td:not(:last-child) { color: var(--color-text); }
.vs-sub { display: block; font-size: 0.72rem; color: var(--color-text-muted); font-weight: 400; }
.vs-win { color: var(--color-success); font-weight: 700; }
.vs-neg { color: #c0392b; }
.vs-missing { font-size: 0.78rem; color: var(--color-text); background: var(--color-warning-highlight); border-left: 3px solid var(--color-warning); padding: 3px 6px; display: block; text-align: left; border-radius: 3px; }
.vs-diff-note { font-size: 0.75rem !important; }
.vs-offer { margin-top: var(--space-4, 16px); padding-top: var(--space-4, 16px); border-top: 1px solid var(--color-divider); }
.vs-offer .field { max-width: 320px; }
.vs-offer-head { margin: 8px 0; color: var(--color-text); }
.vs-offer-grid { grid-template-columns: 1fr 1fr !important; }
.vs-diff-mobile { display: none; }
@media (max-width: 600px) {
  .vs-table { min-width: 0; }
  .vs-diff-col { display: none; }
  .vs-diff-mobile { display: block; font-size: 0.72rem; color: var(--color-text-muted); font-weight: 400; margin-top: 2px; }
  .vs-table th, .vs-table td { padding: 7px 4px; font-size: 0.82rem; }
  .vs-table tbody th { max-width: 132px; }
  .vs-table input, .vs-table select { min-width: 0; padding: 6px; }
  .vs-hero td, .vs-hero th { font-size: 0.9rem; }
}

/* Income tax rate check */
.tax-helper { margin-top: 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.tax-helper summary { cursor: pointer; padding: 8px 10px; font-weight: 700; font-size: 0.88rem; color: var(--color-text); }
.tax-helper-body { padding: 4px 10px 10px; display: grid; gap: 8px; }
.th-rate { margin: 4px 0 0; color: var(--color-text); }
.th-rate strong { font-size: 1.2rem; }

/* ===== Show to Seller view ===== */
body.seller-mode .page,
body.seller-mode .totals-bar,
body.seller-mode .section-nav,
body.seller-mode .section-nav-toggle,
body.seller-mode .section-nav-scrim,
body.seller-mode .toast,
body.seller-mode .modal-overlay { display: none !important; }
body.seller-mode { background: #ffffff; padding-bottom: 0; }
.seller-view[hidden] { display: none; }
.seller-view { background: #ffffff; color: #132338; font-family: 'Lato', sans-serif; min-height: 100vh; min-height: 100dvh; }
.seller-view-inner { max-width: 920px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); font-size: 16px; line-height: 1.45; }
.ss-bar { background: #132338; border-radius: 10px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ss-brand { display: flex; align-items: center; gap: 12px; }
.ss-mark { height: 84px; width: auto; display: block; }
.ss-word { display: flex; flex-direction: column; font-family: 'Anton', 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: .02em; line-height: .94; white-space: nowrap; }
.ss-word .l1 { font-size: 37px; color: #F7F3E7; }
.ss-word .l2 { font-size: 24px; color: #D9A540; }
.ss-ph { color: #F7F3E7; font-size: 14px; text-align: right; line-height: 1.35; }
.ss-ph b { color: #D9A540; font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 20px; }
.ss-h1 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 32px; line-height: 1.12; margin: 20px 0 4px; color: #132338; }
.ss-h1 span { color: #B8862A; }
.ss-addr { font-weight: 700; color: #5b6472; margin: 0 0 8px; font-size: 15px; }
.ss-lede { margin: 8px 0 12px; font-size: 17px; }
.ss-how { background: #F7F3E7; border-left: 5px solid #D9A540; padding: 12px 16px; border-radius: 6px; margin: 0 0 16px; }
.ss-how b { font-family: 'Archivo Black', sans-serif; font-weight: 400; }
.ss-ex { border: 1px solid #d8d2c0; border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.ss-facts { display: flex; gap: 10px; margin: 0 0 12px; }
.ss-fact { flex: 1; background: #F7F3E7; border-radius: 8px; padding: 8px 12px; }
.ss-fact .k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #5b6472; font-weight: 700; }
.ss-fact .v { font-family: 'Archivo Black', sans-serif; font-size: 24px; color: #132338; }
.ss-fact.gold { background: #132338; }
.ss-fact.gold .k { color: #D9A540; }
.ss-fact.gold .v { color: #F7F3E7; }
.ss-desc { margin: 0 0 10px; color: #2b3a4f; }
.ss-cmp { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ss-cmp th { font-family: 'Archivo Black', sans-serif; font-weight: 400; text-align: right; padding: 8px 10px; border-bottom: 2px solid #132338; color: #132338; }
.ss-cmp th:first-child { text-align: left; }
.ss-cmp td { padding: 7px 10px; border-bottom: 1px solid #e6e1d3; text-align: right; color: #132338; }
.ss-cmp td:first-child { text-align: left; color: #2b3a4f; }
.ss-cmp .me { background: #FBF4E2; }
.ss-cmp th.me { background: #D9A540; }
.ss-cmp tr.net td { font-weight: 900; font-size: 17px; border-top: 2px solid #132338; border-bottom: 1px solid #132338; }
.ss-cmp tr.time td { font-weight: 700; white-space: nowrap; }
.ss-cmp tr.time td:first-child { white-space: normal; }
.ss-take { margin: 12px 0 0; }
.ss-cols { display: flex; gap: 14px; }
.ss-box { flex: 1; background: #F7F3E7; border-radius: 8px; padding: 12px 16px; font-size: 15px; }
.ss-box h3 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 16px; margin: 0 0 6px; color: #132338; }
.ss-box ul { margin: 0; padding-left: 18px; }
.ss-box li { margin: 0 0 3px; }
.ss-sign { margin: 16px 0 0; }
.ss-sign b { font-family: 'Archivo Black', sans-serif; font-weight: 400; }
.ss-fine { font-size: 12px; color: #4a5566; line-height: 1.4; margin: 14px 0 0; }
.seller-view-foot { display: flex; justify-content: flex-end; margin-top: 18px; }
.seller-view-close { position: relative; overflow: hidden; isolation: isolate; border: 1px solid #c9c2ad; background: #ffffff; color: #8a8f99; font: 700 13px 'Lato', sans-serif; padding: 8px 14px; border-radius: 999px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.seller-view-close span { font-weight: 400; }
.seller-view-close::before { content: ''; position: absolute; inset: 0; background: #F7F3E7; transform: scaleX(0); transform-origin: left; z-index: -1; }
.seller-view-close.holding::before { transform: scaleX(1); transition: transform 1s linear; }
@media (max-width: 700px) {
  .ss-facts, .ss-cols { flex-direction: column; }
  .ss-cmp { font-size: 13px; }
  .ss-h1 { font-size: 26px; }
}
.vs-offer-title { margin: 0 0 4px; font-size: var(--text-sm, 15px); font-weight: 900; color: var(--color-text); }

/* Offline update prompt */
.update-ready { position: fixed; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); z-index: 9999; background: #132338; color: #F7F3E7; border: 1px solid #D9A540; border-radius: 999px; padding: 10px 18px; font: 700 14px 'Lato', sans-serif; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
body.seller-mode .update-ready { display: none; }

/* Saved walkthroughs */
.history-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border, #d8d2c0); border-radius: 10px; background: var(--color-surface, #fff); }
.history-item.is-current { border-color: #D9A540; box-shadow: inset 4px 0 0 #D9A540; }
.history-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-main strong { font-size: 16px; }
.history-meta { font-size: 13px; color: var(--color-text-muted, #5b6472); }
.history-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #D9A540; color: #132338; border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.history-actions { display: flex; gap: 8px; flex-shrink: 0; }
.app-version-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
