/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --ink: #18221f;
  --muted: #5f6f69;
  --page: #f6f7f5;
  --surface: #ffffff;
  --line: #dce3df;
  --deep-green: #16322f;
  --green: #1f7a5b;
  --red: #ba2f3a;
  --amber: #a86b18;
  --blue: #276a8c;
  --shadow: 0 18px 45px rgb(23 40 35 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}

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

button {
  touch-action: manipulation;
}

.app-shell {
  display: grid;
  gap: 0;
  min-height: 100vh;
}

.workspace-shell {
  display: block;
  min-height: 100vh;
  background: var(--page);
}

.workspace-capture {
  background: var(--deep-green);
  color: #f8fbf8;
}

.workspace-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  width: min(100%, 880px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 5vw, 42px) calc(132px + env(safe-area-inset-bottom));
  gap: 16px;
}

.workspace-header .workspace-scope {
  color: var(--green);
}

.workspace-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  padding: 8px max(10px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  box-shadow: 0 -10px 26px rgb(23 40 35 / 12%);
}

.workspace-nav button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #41514b;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.workspace-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workspace-nav button.is-active {
  background: var(--deep-green);
  color: #f8fbf8;
}

.workspace-nav em {
  min-width: 20px;
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.45;
}

.workspace-nav button.is-active em {
  background: rgb(255 255 255 / 20%);
  color: #ffffff;
}

.workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.capture-workspace {
  min-height: calc(100vh - 310px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  align-content: center;
  justify-items: center;
  gap: 20px;
}

.workspace-capture.has-install-prompt .capture-workspace {
  align-content: start;
  gap: 12px;
  min-height: auto;
}

.workspace-capture.has-install-prompt .record-surface {
  gap: 12px;
  padding: 6px 0 0;
}

.workspace-capture.has-install-prompt .record-button {
  border-width: 6px;
  font-size: 1rem;
  width: clamp(132px, 38vw, 152px);
}

.workspace-capture.has-install-prompt .record-meta {
  gap: 3px;
  min-height: 54px;
}

.workspace-capture.has-install-prompt .timer {
  font-size: clamp(1.85rem, 9vw, 3rem);
}

.workspace-capture.has-install-prompt .capture-quick-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.workspace-capture.has-install-prompt .capture-quick-actions .secondary-button {
  font-size: 0.78rem;
  gap: 5px;
  min-width: 0;
  padding: 0 6px;
}

.capture-section-heading {
  width: 100%;
}

.current-visit-summary {
  display: grid;
  width: 100%;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.current-visit-summary.is-dark {
  width: min(100%, 480px);
  border-color: rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 9%);
  color: #f8fbf8;
  box-shadow: none;
}

.field-orientation {
  display: grid;
  width: min(100%, 640px);
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  color: #f8fbf8;
  padding: 16px;
}

.field-orientation h2,
.field-orientation p {
  margin: 0;
}

.field-orientation h2 {
  font-size: 1.25rem;
  line-height: 1.15;
}

.field-orientation p {
  color: rgb(255 255 255 / 78%);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 5px;
}

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

.field-orientation__steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  background: rgb(255 255 255 / 10%);
  color: #f8fbf8;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  padding: 8px 10px;
}

.field-orientation__steps svg {
  flex: 0 0 auto;
  color: #d7ffe5;
}

.field-orientation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-orientation .text-button {
  background: rgb(255 255 255 / 12%);
  border: 1px solid rgb(255 255 255 / 18%);
  color: #f8fbf8;
}

.active-visit-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(207 224 215 / 88%);
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  padding: 6px 8px;
}

.active-visit-strip__main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.active-visit-strip__title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-visit-strip__meta {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}

.active-visit-strip__customer {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  flex: 1 1 auto;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-visit-strip__sync,
.active-visit-strip__count {
  border-left: 1px solid rgb(65 81 75 / 18%);
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  padding-left: 5px;
  white-space: nowrap;
}

.active-visit-strip__sync--local_only,
.active-visit-strip__sync--needs_context,
.active-visit-strip__sync--no_visit,
.active-visit-strip__count {
  color: #41514b;
}

.active-visit-strip__sync--pending_sync {
  color: #8a520f;
}

.active-visit-strip__sync--syncing {
  color: #1e5678;
}

.active-visit-strip__sync--synced {
  color: #0f6a48;
}

.active-visit-strip__sync--sync_failed {
  color: #7b1720;
}

.active-visit-strip__count {
  font-weight: 850;
}

.active-visit-strip__button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #eef7f1;
  color: #0f6a48;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
}

.active-visit-strip__button svg {
  flex: 0 0 auto;
}

.active-visit-strip__button:focus-visible {
  outline: 3px solid rgb(31 122 91 / 22%);
  outline-offset: 2px;
}

.summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-heading h2,
.current-visit-summary p {
  margin: 0;
}

.summary-heading h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 5vw, 1.8rem);
  line-height: 1.05;
}

.current-visit-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.current-visit-summary.is-dark p {
  color: #d2e5df;
}

.summary-badges,
.summary-meta,
.summary-actions,
.capture-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-badges {
  justify-content: flex-end;
}

.summary-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.current-visit-summary.is-dark .summary-meta span {
  background: rgb(255 255 255 / 14%);
  color: #f8fbf8;
}

.summary-meta .summary-alert {
  background: #ffe2dd;
  color: var(--red);
}

.capture-quick-actions {
  justify-content: center;
}

.video-capture-panel {
  display: grid;
  width: min(100%, 680px);
  gap: 16px;
  border: 1px solid #bfd0ca;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: clamp(14px, 4vw, 22px);
  box-shadow: 0 18px 42px rgb(7 24 18 / 24%);
}

.video-capture-panel__header,
.local-video-list__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.video-capture-panel__header h3,
.video-capture-panel__header p,
.video-interruption-decision p,
.local-video-card strong,
.local-video-card span {
  margin: 0;
}

.video-capture-panel__header h3 {
  font-size: clamp(1.1rem, 4.8vw, 1.45rem);
  line-height: 1.15;
}

.video-capture-panel .eyebrow {
  margin-bottom: 4px;
  color: var(--green);
}

.video-capture-panel .secondary-button {
  border-color: #9eb6ae;
  color: var(--deep-green);
}

.video-capture-panel .destructive-button {
  border-color: #dc9ca3;
  background: #fff4f4;
  color: #8e202b;
}

.video-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #0b1412;
  color: #c9d8d3;
}

.video-preview video,
.video-evidence-playback {
  display: block;
  width: 100%;
  max-height: min(58vh, 520px);
  background: #0b1412;
  object-fit: contain;
}

.video-preview video {
  height: 100%;
  opacity: 0;
}

.video-preview.has-stream video {
  opacity: 1;
}

.video-preview__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.video-capture-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.video-capture-status strong {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.55rem, 8vw, 2.35rem);
  line-height: 1;
}

.video-capture-status span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.video-capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-privacy-notice {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid #d8c9a8;
  border-radius: 8px;
  background: #fff9ea;
  color: #5f4a1d;
  padding: 12px 14px;
}

.video-privacy-notice strong {
  margin: 0;
  font-size: 0.92rem;
}

.video-privacy-notice p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.video-capture-toolbar {
  display: flex;
  justify-content: flex-end;
}

.video-privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d8c9a8;
  border-radius: 999px;
  background: #fff9ea;
  color: #5f4a1d;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.video-privacy-chip:disabled {
  opacity: 0.55;
  cursor: default;
}

.video-interruption-decision {
  display: grid;
  gap: 14px;
}

.video-interruption-decision > div:first-child {
  display: grid;
  gap: 6px;
}

.video-interruption-decision p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.local-video-list {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.local-video-list__heading span {
  min-width: 26px;
  border-radius: 999px;
  background: #e9f7f0;
  color: var(--green);
  padding: 3px 8px;
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.local-video-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.local-video-card .video-evidence-playback {
  max-height: 180px;
  border-radius: 7px;
}

.video-evidence-poster,
.video-evidence-poster-placeholder {
  display: block;
  width: 100%;
  min-height: 120px;
  max-height: 180px;
  border-radius: 7px;
  background: #0b1412;
  object-fit: contain;
}

.video-evidence-poster-placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: #c9d8d3;
}

.video-evidence-player,
.video-evidence-play-action {
  display: grid;
  gap: 7px;
}

.video-evidence-play-action > span {
  font-size: 0.74rem;
}

.local-video-card > .note-readiness,
.local-video-card > .video-finding-state,
.local-video-card > .local-video-card__actions {
  grid-column: 1 / -1;
}

.local-video-card__actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.video-finding-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.video-finding-state em {
  color: #9d5900;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.local-video-card > div {
  display: grid;
  gap: 5px;
}

.local-video-card span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.video-capture-unavailable {
  width: min(100%, 680px);
  margin: 0;
  color: #d2e5df;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 560px) {
  .video-capture-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .video-capture-status span {
    text-align: left;
  }

  .video-capture-actions,
  .video-capture-actions .primary-button,
  .video-capture-actions .secondary-button {
    width: 100%;
  }

  .local-video-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .local-video-card .video-evidence-playback {
    max-height: 320px;
  }

  .video-evidence-poster,
  .video-evidence-poster-placeholder {
    max-height: 320px;
  }
}

.photo-capture-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.recording-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.capture-band {
  display: grid;
  align-content: start;
  gap: 28px;
  padding: max(20px, env(safe-area-inset-top)) clamp(18px, 5vw, 56px) 34px;
  background: var(--deep-green);
  color: #f8fbf8;
}

.recordings-band {
  display: grid;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 56px) max(36px, env(safe-area-inset-bottom));
}

.app-header,
.section-heading,
.recording-row,
.recording-details,
.recording-actions,
.toolbar,
.visit-heading {
  display: flex;
  align-items: center;
}

.app-header,
.section-heading,
.recording-row,
.visit-heading {
  justify-content: space-between;
  gap: 18px;
}

.app-header > div:first-child {
  min-width: 0;
}

.app-header h1,
.section-heading h2,
.recording-card h3,
.visit-heading h2,
.app-header p,
.recording-card p {
  margin: 0;
}

.app-header h1 {
  max-width: 11ch;
  font-size: clamp(2.1rem, 10vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.eyebrow {
  color: #bdd8ce;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.connection-pill,
.status-pill,
.visit-sync-badge {
  display: inline-grid;
  min-width: max-content;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
}

.connection-pill {
  background: #dff6e8;
  color: #123f2b;
}

.connection-pill.is-offline {
  background: #ffe2dd;
  color: #7b1720;
}

.workspace-header .connection-pill {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.current-visit {
  display: grid;
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 8%);
  padding: 16px;
}

.recordings-workspace .current-visit {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-index-heading,
.visit-index-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visit-index-heading {
  flex-wrap: wrap;
}

.visit-index-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.visit-index-actions .primary-button,
.visit-index-actions .text-button {
  white-space: nowrap;
}

.visit-count-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 0 9px;
  font-size: 0.74rem;
  font-weight: 850;
}

.visit-heading h2 {
  font-size: 1.15rem;
  line-height: 1.15;
}

.visit-sync-badge {
  background: #dff6e8;
  color: #123f2b;
}

.visit-sync-no_visit {
  background: #edf1ee;
  color: #41514b;
}

.visit-sync-sync_failed {
  background: #ffe2dd;
  color: #7b1720;
}

.visit-sync-pending_sync {
  background: #fff0d9;
  color: #6d4210;
}

.visit-sync-syncing {
  background: #def3ff;
  color: #1e5678;
}

.visit-sync-synced {
  background: #dff6e8;
  color: #123f2b;
}

.visit-field {
  display: grid;
  gap: 6px;
}

.visit-field-label-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.visit-field label {
  color: #d2e5df;
  font-size: 0.78rem;
  font-weight: 800;
}

.visits-workspace .visit-field label,
.recordings-workspace .visit-field label {
  color: var(--muted);
}

.current-visit-summary:not(.is-dark) .eyebrow,
.visit-editor .eyebrow,
.visits-workspace .visit-details summary {
  color: var(--green);
}

.visit-field input,
.visit-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  padding: 9px 11px;
  font-weight: 700;
}

.visit-field textarea {
  min-height: 78px;
  resize: vertical;
}

.visit-directory-control {
  position: relative;
}

.visit-directory-control input {
  padding-right: 38px;
}

.visit-directory-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--deep-green);
}

.visit-directory-clear:hover,
.visit-directory-clear:focus-visible {
  background: #edf7f1;
  outline: none;
}

.visit-directory-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 248px;
  overflow-y: auto;
  border: 1px solid #b9cec5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(23 40 35 / 18%);
  padding: 6px;
}

.visit-directory-option {
  display: grid;
  width: 100%;
  min-height: 44px;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.visit-directory-option:hover,
.visit-directory-option:focus-visible,
.visit-directory-option[aria-selected="true"] {
  background: #edf7f1;
  color: var(--deep-green);
  outline: none;
}

.visit-directory-option strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.2;
}

.visit-directory-option span,
.visit-field-hint {
  color: #4c6259;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.3;
}

.visit-directory-option-action {
  border-top: 1px solid #e3ece8;
  margin-top: 4px;
}

.visit-site-sheet-trigger {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 7px;
  background: rgb(255 255 255 / 14%);
  color: #ecf8f3;
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 850;
}

.visit-site-sheet-trigger:hover,
.visit-site-sheet-trigger:focus-visible {
  background: rgb(255 255 255 / 24%);
  outline: 2px solid rgb(255 255 255 / 26%);
  outline-offset: 2px;
}

.visits-workspace .visit-site-sheet-trigger,
.recordings-workspace .visit-site-sheet-trigger {
  background: #edf1ee;
  color: var(--deep-green);
}

.visits-workspace .visit-site-sheet-trigger:hover,
.visits-workspace .visit-site-sheet-trigger:focus-visible,
.recordings-workspace .visit-site-sheet-trigger:hover,
.recordings-workspace .visit-site-sheet-trigger:focus-visible {
  background: #dff6e8;
  outline-color: rgb(31 122 91 / 22%);
}

.visit-site-sheet-layer,
.visit-editor-sheet-layer {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgb(8 20 16 / 42%);
  overflow: hidden;
  padding-top: max(18px, env(safe-area-inset-top));
}

.visit-site-sheet,
.visit-editor-sheet {
  width: min(100%, 680px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  justify-self: center;
  border: 1px solid #c5d6cf;
  border-radius: 18px 18px 0 0;
  background: #fbfdfc;
  color: var(--ink);
  overscroll-behavior: contain;
  scroll-padding-bottom: 148px;
  box-shadow: 0 -24px 60px rgb(8 20 16 / 28%);
  padding: 18px clamp(16px, 5vw, 28px) max(18px, env(safe-area-inset-bottom));
  animation: site-sheet-enter 180ms ease-out;
}

.visit-site-sheet form,
.visit-editor-sheet form {
  display: grid;
  gap: 16px;
}

.visit-site-sheet-header,
.visit-site-sheet-actions,
.visit-editor-sheet-header,
.visit-editor-sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visit-site-sheet-header h3,
.visit-editor-sheet-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.14rem;
  letter-spacing: 0;
}

.visit-site-sheet-close,
.visit-editor-sheet-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cfddd7;
  border-radius: 8px;
  background: #fff;
  color: var(--deep-green);
}

.visit-site-sheet-close:hover,
.visit-site-sheet-close:focus-visible,
.visit-editor-sheet-close:hover,
.visit-editor-sheet-close:focus-visible {
  background: #edf7f1;
  outline: 3px solid rgb(31 122 91 / 16%);
}

.visit-site-sheet-fields,
.visit-editor-sheet-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visit-site-sheet .visit-field label,
.visit-editor-sheet .visit-field label {
  color: var(--muted);
}

.visit-site-sheet .visit-field input,
.visit-site-sheet .visit-field textarea,
.visit-editor-sheet .visit-field input,
.visit-editor-sheet .visit-field textarea {
  border-color: #bccbc4;
  background: #fff;
  color: var(--ink);
}

.visit-site-sheet-field-wide,
.visit-editor-sheet-field-wide {
  grid-column: 1 / -1;
}

.visit-editor-sheet-site-details {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d7e4de;
  border-radius: 8px;
  margin: 0;
  background: #f6faf8;
  padding: 12px;
}

.visit-editor-sheet-site-details legend {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  padding: 0 4px;
}

.visit-editor-sheet-site-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visit-editor-sheet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #dce7e2;
  padding-top: 12px;
}

.visit-site-sheet-actions,
.visit-editor-sheet-actions {
  justify-content: flex-end;
}

.visit-editor-sheet-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  border-top: 1px solid #dce7e2;
  background: #fbfdfc;
  box-shadow: 0 -12px 18px rgb(251 253 252 / 92%);
  padding-top: 12px;
  padding-bottom: 2px;
}

.visit-editor-sheet-error {
  margin: 0;
  border: 1px solid #f1b3a9;
  border-radius: 8px;
  background: #fff1ef;
  color: var(--red);
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

@keyframes site-sheet-enter {
  from {
    transform: translateY(22px);
  }

  to {
    transform: translateY(0);
  }
}

.visit-editor-sheet-layer.is-closing {
  animation: visit-sheet-layer-exit 180ms ease-in forwards;
}

.visit-editor-sheet.is-closing {
  animation: visit-sheet-exit 180ms ease-in forwards;
}

@keyframes visit-sheet-layer-exit {
  from {
    background: rgb(8 20 16 / 42%);
  }

  to {
    background: rgb(8 20 16 / 0%);
  }
}

@keyframes visit-sheet-exit {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(104%);
  }
}

.visit-context-source {
  display: inline-flex;
  min-height: 22px;
  max-width: 145px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 16%);
  color: #ecf8f3;
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visit-context-source-selected,
.visit-context-source-server_linked {
  background: #dff6e8;
  color: #123f2b;
}

.visit-context-source-structured {
  background: #fff0d9;
  color: #6d4210;
}

.visits-workspace .visit-field input,
.visits-workspace .visit-field textarea {
  border-color: #bccbc4;
  background: #fbfdfc;
  box-shadow: inset 0 1px 0 rgb(23 40 35 / 4%);
}

.visits-workspace .visit-field input:focus,
.visits-workspace .visit-field textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgb(31 122 91 / 16%);
}

.visits-workspace .visit-context-source {
  background: #edf1ee;
  color: #41514b;
}

.visits-workspace .visit-context-source-selected,
.visits-workspace .visit-context-source-server_linked {
  background: #dff6e8;
  color: #123f2b;
}

.visits-workspace .visit-context-source-structured {
  background: #fff0d9;
  color: #6d4210;
}

.visit-type-picker {
  display: grid;
  gap: 6px;
}

.visit-type-control {
  position: relative;
}

.visit-type-control input {
  padding-right: 42px;
}

.visit-type-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--deep-green);
}

.visit-type-toggle:hover,
.visit-type-toggle:focus-visible {
  background: #edf7f1;
  outline: none;
}

.visit-type-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 232px;
  overflow-y: auto;
  border: 1px solid #b9cec5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(23 40 35 / 18%);
  padding: 6px;
}

.visit-type-option {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 800;
}

.visit-type-option:hover,
.visit-type-option:focus-visible {
  background: #edf7f1;
  color: var(--deep-green);
  outline: none;
}

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

.visit-details {
  display: grid;
  gap: 12px;
}

.visit-details[open] {
  gap: 14px;
}

.visit-details summary {
  cursor: pointer;
  color: #f8fbf8;
  font-weight: 800;
}

.visit-details > * + * {
  margin-top: 12px;
}

.visit-new-button {
  justify-self: start;
}

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

.record-surface {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 20px 0 4px;
}

.active-visit-summary {
  display: grid;
  width: min(100%, 440px);
  gap: 4px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  padding: 12px 14px;
  text-align: center;
}

.active-visit-summary span,
.active-visit-summary em {
  color: #d2e5df;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 750;
}

.active-visit-summary strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
}

.record-button {
  display: grid;
  width: clamp(152px, 48vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid #dcece6;
  border-radius: 50%;
  background: #f5fbf8;
  color: var(--deep-green);
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.record-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.record-button.is-recording {
  border-color: #ffd9dc;
  background: var(--red);
  color: #ffffff;
}

.record-meta {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 62px;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 11vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
}

.capture-status {
  color: #d2e5df;
  font-size: 0.98rem;
  font-weight: 700;
}

.capture-limit,
.capture-limit-warning {
  font-size: 0.84rem;
  font-weight: 800;
}

.capture-limit {
  color: #a9c5bb;
}

.capture-limit-warning {
  border-radius: 999px;
  background: #fff0d9;
  color: var(--amber);
  padding: 6px 10px;
}

.toolbar {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.primary-button:disabled,
.secondary-button:disabled,
.text-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button svg,
.secondary-button svg,
.text-button svg {
  flex: 0 0 auto;
}

.primary-button {
  border-color: var(--deep-green);
  border-radius: 8px;
  background: var(--deep-green);
  color: #f8fbf8;
  padding: 0 16px;
}

.secondary-button {
  border-color: #90ada4;
  border-radius: 8px;
  background: transparent;
  color: #f8fbf8;
  padding: 0 16px;
}

.workspace-shell:not(.workspace-capture) .secondary-button {
  border-color: #9eb6ae;
  color: var(--deep-green);
}

.text-button {
  border-radius: 8px;
  background: #eef7f3;
  color: var(--green);
  padding: 0 14px;
}

.text-button-danger {
  background: #fff1f2;
  color: #9f1d2b;
}

.text-button-danger:disabled {
  cursor: not-allowed;
}

.error-message,
.photo-message,
.wake-message,
.recording-error {
  margin: 0;
  border-radius: 8px;
  font-weight: 700;
}

.error-message {
  background: #ffe9e5;
  color: #7b1720;
  padding: 12px 14px;
}

.error-message__link {
  color: inherit;
  display: inline-flex;
  font-weight: 950;
  margin-left: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wake-message {
  background: #fff0d9;
  color: #6d4210;
  padding: 12px 14px;
}

.photo-message {
  background: #e9f7f0;
  color: #123f2b;
  padding: 12px 14px;
}

.recording-error {
  background: #ffe9e5;
  color: #7b1720;
  padding: 10px 12px;
}

.section-heading h2 {
  font-size: clamp(1.35rem, 5vw, 2.25rem);
  line-height: 1;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.recording-list {
  display: grid;
  gap: 14px;
}

.photo-evidence-strip {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  justify-self: center;
  padding-top: 8px;
}

.photo-evidence-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.photo-evidence-heading p,
.photo-evidence-heading h3 {
  margin: 0;
}

.photo-evidence-heading .eyebrow {
  color: #a9c5bb;
  font-size: 0.72rem;
}

.photo-evidence-heading h3 {
  color: #f8fbf8;
  font-size: 1.05rem;
  line-height: 1.15;
}

.photo-evidence-heading > span {
  color: #d2e5df;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.photo-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.photo-evidence-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  position: relative;
  gap: 10px;
  align-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 9%);
  padding: 8px 42px 8px 8px;
}

.photo-thumb {
  display: grid;
  width: 54px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgb(255 255 255 / 14%);
  color: #d2e5df;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-evidence-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.photo-evidence-copy strong,
.photo-evidence-copy span,
.photo-evidence-copy em {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.photo-evidence-copy strong {
  color: #f8fbf8;
}

.photo-evidence-copy span {
  color: #d2e5df;
}

.photo-evidence-copy em {
  color: #a9c5bb;
}

.photo-delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-color: rgb(255 255 255 / 22%);
  background: rgb(23 40 35 / 62%);
  color: #f8fbf8;
}

.recent-visits {
  display: grid;
  gap: 14px;
}

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

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.visit-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.visit-card.is-active {
  border-color: #0f6a48;
  background: #f8fcf9;
  box-shadow: 0 0 0 3px rgb(31 122 91 / 14%), 0 10px 24px rgb(23 40 35 / 8%);
}

.visit-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.visit-card-main:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.visit-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #eef7f3;
  color: var(--green);
}

.visit-card.is-active .visit-card-icon {
  background: #dff6e8;
  color: #0f6a48;
}

.visit-card-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.visit-card-copy strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
}

.visit-card.is-active .visit-card-copy strong {
  color: #123f2b;
}

.visit-card-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.visit-life-badge {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.visit-life-open {
  background: #dff6e8;
  color: #123f2b;
}

.visit-life-completed {
  background: #edf1ee;
  color: #41514b;
}

.visit-card-action-cue {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--deep-green);
}

.visit-card-meta,
.visit-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visit-card-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.visit-card-meta .visit-card-alert {
  background: #ffe2dd;
  color: var(--red);
}

.visit-card-meta .visit-card-current {
  background: #dff6e8;
  color: #123f2b;
}

.visit-card-meta .visit-sync-local_only,
.visit-card-meta .visit-sync-needs_context,
.visit-card-meta .visit-sync-no_visit {
  background: #edf1ee;
  color: #41514b;
}

.visit-card-meta .visit-sync-pending_sync {
  background: #fff0d9;
  color: #6d4210;
}

.visit-card-meta .visit-sync-syncing {
  background: #def3ff;
  color: #1e5678;
}

.visit-card-meta .visit-sync-synced {
  background: #dff6e8;
  color: #123f2b;
}

.visit-card-meta .visit-sync-sync_failed {
  background: #ffe2dd;
  color: #7b1720;
}

.visit-card-actions .text-button:disabled {
  cursor: not-allowed;
}

.recording-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.recording-card h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.recording-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.recording-card .recording-visit {
  color: #41514b;
}

.recording-card audio {
  width: 100%;
  min-height: 42px;
}

.recording-details,
.recording-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.recording-details span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.note-readiness {
  display: grid;
  gap: 8px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.note-readiness-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.note-status-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.note-readiness-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.note-status-group em,
.note-readiness-heading strong {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.note-status-group em {
  background: #edf1ee;
  color: #41514b;
  font-style: normal;
  font-weight: 800;
}

.note-readiness-queued .note-readiness-heading strong,
.note-readiness-processing .note-readiness-heading strong {
  background: #fff0d9;
  color: var(--amber);
}

.note-readiness-ready .note-readiness-heading strong {
  background: #dff6e8;
  color: var(--green);
}

.note-readiness-no_speech .note-readiness-heading strong {
  background: #edf1ee;
  color: #41514b;
}

.note-readiness-failed .note-readiness-heading strong {
  background: #ffe2dd;
  color: var(--red);
}

.note-preview,
.note-error,
.note-empty {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.recording-card .note-preview {
  color: #24352f;
  background: #fff;
}

.recording-card .note-error {
  color: #7b1720;
  background: #ffe9e5;
}

.recording-card .note-empty {
  color: #41514b;
  background: #edf1ee;
}

.findings-review {
  display: grid;
  gap: 14px;
}

.quote-review,
.quote-draft-review,
.quote-line-list {
  display: grid;
  gap: 14px;
}

.findings-toolbar,
.finding-empty-actions,
.finding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.findings-toolbar {
  justify-content: center;
}

.finding-alert {
  border-radius: 8px;
  background: #fff0d9;
  color: #6d4210;
  padding: 12px 14px;
  font-weight: 700;
}

.photo-match-status {
  border: 1px solid #d8e5dc;
  border-radius: 8px;
  background: #f6fbf8;
  color: #183c32;
  padding: 12px 14px;
}

.photo-match-status-content {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.photo-match-status-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e8f7ed;
  color: var(--green);
}

.photo-match-status strong {
  display: block;
  color: var(--deep-green);
  font-size: 0.95rem;
  line-height: 1.2;
}

.photo-match-status p {
  margin: 4px 0 0;
  color: #52625c;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.photo-match-status-active .photo-match-status-icon {
  animation: pulse-photo-match 1.35s ease-in-out infinite;
}

.photo-match-status-no_suggestions {
  border-color: #e0e5e2;
  background: #f7f8f7;
}

.photo-match-status-failed {
  border-color: #ffd2cb;
  background: #fff0ee;
}

.photo-match-status-failed .photo-match-status-icon {
  background: #ffe2dd;
  color: var(--red);
}

@keyframes pulse-photo-match {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(38 166 91 / 20%);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 7px rgb(38 166 91 / 0%);
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-match-status-active .photo-match-status-icon {
    animation: none;
  }
}

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

.finding-summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-summary-card span,
.finding-section-heading span,
.finding-source span,
.finding-field span,
.finding-edit-field span,
.finding-photo-heading > span,
.finding-missing span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.finding-summary-card strong {
  color: var(--deep-green);
  font-size: 1.35rem;
  line-height: 1;
}

.finding-section,
.finding-list,
.extraction-list {
  display: grid;
  gap: 12px;
}

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

.finding-section-heading h3,
.finding-card h3,
.finding-card p,
.finding-source p,
.finding-field p,
.finding-missing ul,
.extraction-row p {
  margin: 0;
}

.finding-section-heading h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.extraction-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.extraction-row > div {
  display: grid;
  gap: 4px;
}

.extraction-row strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.extraction-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.extraction-row em,
.finding-source-meta em {
  width: max-content;
  border-radius: 999px;
  background: #fff0d9;
  color: #6d4210;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.extraction-row p,
.finding-error {
  border-radius: 8px;
  background: #ffe9e5;
  color: #7b1720;
  padding: 9px 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.extraction-no_findings {
  background: #f7faf8;
}

.extraction-failed {
  border-color: #ffc7bf;
}

.finding-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-card-reviewed {
  border-color: #b9d7ca;
}

.finding-card-dismissed {
  background: #f8faf8;
}

.finding-index-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-index-item-reviewed {
  border-color: #b9d7ca;
}

.finding-index-item-dismissed {
  background: #f8faf8;
}

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

.finding-index-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(68px, 0.42fr) minmax(112px, 0.58fr) minmax(94px, 0.54fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.finding-index-main:hover .finding-index-title strong,
.finding-index-main:focus-visible .finding-index-title strong {
  color: var(--deep-green);
}

.finding-index-main:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgb(31 122 91 / 18%);
  outline-offset: 3px;
}

.finding-index-title {
  min-width: 0;
}

.finding-index-title strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.2;
}

.finding-index-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finding-index-cell span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.finding-index-cell strong {
  overflow-wrap: anywhere;
  color: #24352f;
  font-size: 0.84rem;
  line-height: 1.15;
}

.finding-index-state .finding-badge {
  justify-self: start;
}

.finding-index-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.finding-index-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--deep-green);
  cursor: pointer;
}

.finding-index-action-button:hover,
.finding-index-action-button:focus-visible {
  border-color: #9eb6ae;
  background: #edf6f0;
}

.finding-index-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.issue-detail-screen {
  display: grid;
  gap: 12px;
}

.issue-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.issue-detail-toolbar > span,
.issue-sync-badge {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.issue-detail-toolbar > span,
.issue-sync-saved_locally,
.issue-sync-pending_sync {
  background: #fff0d9;
  color: #6d4210;
}

.issue-sync-syncing {
  background: #def3ff;
  color: #1e5678;
}

.issue-sync-synced {
  background: #dff6e8;
  color: #123f2b;
}

.issue-sync-sync_failed {
  background: #ffe9e5;
  color: #7b1720;
}

.finding-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finding-card h3 {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.15;
}

.finding-card-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.finding-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.finding-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
}

.finding-review-draft,
.finding-severity-unknown,
.finding-confidence-low {
  background: #fff0d9;
  color: #6d4210;
}

.finding-review-reviewed,
.finding-confidence-high {
  background: #dff6e8;
  color: #123f2b;
}

.finding-review-dismissed {
  background: #edf1ee;
  color: #41514b;
}

.finding-severity-low {
  background: #def3ff;
  color: #1e5678;
}

.finding-severity-medium,
.finding-confidence-medium {
  background: #e8f0ff;
  color: #214d7a;
}

.finding-severity-high,
.finding-severity-urgent {
  background: #ffe2dd;
  color: #7b1720;
}

.finding-source {
  display: grid;
  gap: 8px;
  border-left: 3px solid #9eb6ae;
  padding-left: 12px;
}

.finding-source p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.finding-source-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.finding-source-meta span {
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: none;
}

.finding-field-grid,
.finding-editor {
  display: grid;
  gap: 12px;
}

.finding-field {
  display: grid;
  gap: 4px;
}

.finding-field p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.42;
}

.finding-missing {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: #fff0d9;
  padding: 12px;
}

.finding-missing ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.finding-missing li {
  color: #52320c;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.finding-photo-evidence {
  display: grid;
  gap: 10px;
  border-radius: 8px;
  background: #f7faf8;
  padding: 12px;
}

.finding-photo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finding-photo-grid,
.finding-photo-picker {
  display: grid;
  gap: 10px;
}

.finding-photo-suggestions {
  display: grid;
  gap: 8px;
}

.finding-photo-suggestions-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finding-photo-suggestion {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  border: 1px solid rgba(21, 128, 91, 0.28);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 8px;
}

.finding-photo-suggestion .finding-photo-image {
  width: 72px;
}

.finding-photo-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.finding-photo-suggestion-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.finding-photo-suggestion-title strong {
  min-width: 0;
  overflow: hidden;
  color: #16241f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-suggestion-copy p {
  margin: 0;
  color: #53615c;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.finding-photo-suggestion-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finding-photo-match-badge {
  flex: 0 0 auto;
  border: 0;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.finding-photo-match-high {
  background: #dff7e8;
  color: var(--deep-green);
}

.finding-photo-match-medium {
  background: #fff1d6;
  color: #6a4109;
}

.finding-photo-match-low {
  background: #eef2f0;
  color: #53615c;
}

.finding-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.finding-photo-picker {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.finding-photo-option {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 6px;
}

.finding-photo-thumb {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.finding-photo-thumb-quote {
  border-color: rgba(21, 128, 91, 0.4);
  box-shadow: inset 0 0 0 1px rgba(21, 128, 91, 0.12);
}

.finding-photo-option {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.finding-photo-option:disabled,
.finding-photo-thumb button:disabled {
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-green);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.finding-photo-image {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1ee;
  color: var(--muted);
}

.finding-photo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finding-photo-thumb > div {
  min-width: 0;
}

.finding-photo-thumb strong,
.finding-photo-option span,
.finding-photo-thumb span,
.finding-photo-empty {
  color: #24352f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.finding-photo-thumb strong,
.finding-photo-option span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-thumb span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.finding-photo-quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
}

.finding-photo-quote-toggle {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: #24352f;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.finding-photo-quote-toggle input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--deep-green);
}

.finding-photo-quote-toggle span {
  display: inline;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  color: #24352f;
  font-size: inherit;
  line-height: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finding-photo-quote-badge {
  flex: 0 0 auto;
  min-width: 0;
  border: 0;
  background: #dff7e8;
  color: var(--deep-green);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.finding-photo-thumb .icon-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-color: rgba(217, 224, 220, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(5, 32, 24, 0.14);
}

.finding-photo-empty {
  margin: 0;
  color: var(--muted);
}

.finding-photo-status {
  margin: 0;
  color: var(--deep-green);
  font-size: 0.8rem;
  font-weight: 800;
}

.finding-editor {
  grid-template-columns: minmax(0, 1fr);
}

.finding-edit-field {
  display: grid;
  gap: 6px;
}

.finding-edit-field input,
.finding-edit-field textarea,
.finding-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bccbc4;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 9px 11px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgb(23 40 35 / 4%);
}

.finding-edit-field textarea {
  min-height: 92px;
  resize: vertical;
}

.finding-edit-field input:focus,
.finding-edit-field textarea:focus,
.finding-select:focus {
  border-color: var(--green);
  outline: 3px solid rgb(31 122 91 / 16%);
}

.finding-error {
  margin: 0;
}

.finding-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.quote-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.finding-empty-state h3,
.finding-empty-state p,
.quote-empty-state h3,
.quote-empty-state p {
  margin: 0;
}

.finding-empty-state h3,
.quote-empty-state h3 {
  font-size: 1.06rem;
  line-height: 1.2;
}

.finding-empty-state p,
.quote-empty-state p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.quote-draft-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 7%);
}

.quote-draft-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-draft-header h3,
.quote-draft-header p,
.quote-draft-header span,
.quote-customer-summary p,
.quote-blocker-note p,
.quote-line-card h4,
.quote-line-description,
.quote-line-missing ul,
.quote-source-context p {
  margin: 0;
}

.quote-draft-header h3 {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  line-height: 1.08;
}

.quote-draft-header > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quote-status-badge,
.quote-pricing-badge,
.quote-manual-badge {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 850;
}

.quote-status-draft,
.quote-pricing-priced,
.quote-pricing-not_applicable {
  background: #dff6e8;
  color: #123f2b;
}

.quote-status-approved {
  background: #def3ff;
  color: #1e5678;
}

.quote-status-voided {
  background: #edf1ee;
  color: #41514b;
}

.quote-pricing-needs_pricing {
  background: #fff0d9;
  color: #6d4210;
}

.quote-manual-badge {
  background: #edf1ee;
  color: #41514b;
}

.quote-customer-summary span,
.quote-line-facts span,
.quote-line-missing span,
.quote-photo-evidence > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-customer-summary {
  display: grid;
  gap: 8px;
  border-left: 3px solid #9eb6ae;
  padding-left: 12px;
}

.quote-customer-summary p,
.quote-line-description,
.quote-source-context p {
  color: #24352f;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}

.quote-blocker-note,
.quote-line-missing {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: #fff0d9;
  color: #52320c;
  padding: 12px;
}

.quote-pricing-jump-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.quote-pricing-jump {
  display: grid;
  min-height: 44px;
  width: 100%;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #e4b074;
  border-radius: 8px;
  background: #fffaf2;
  color: #52320c;
  padding: 8px 10px;
  text-align: left;
}

.quote-pricing-jump:hover,
.quote-pricing-jump:focus-visible {
  background: #fff6e8;
  outline: 2px solid #d9822b;
  outline-offset: 2px;
}

.quote-pricing-jump span {
  color: #86500f;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-pricing-jump strong {
  overflow-wrap: anywhere;
  color: #2d2113;
  font-size: 0.9rem;
  line-height: 1.2;
}

.quote-price-rule-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e3dd;
  border-radius: 8px;
  background: #f3f8f5;
  padding: 12px;
}

.quote-price-rule-selected {
  border-color: #b8d6c8;
  background: #eaf7ef;
}

.quote-price-rule-panel > span,
.quote-price-warning-summary span,
.quote-price-rule-empty {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-price-rule-panel strong,
.quote-price-rule-panel p {
  margin: 0;
}

.quote-price-rule-panel strong {
  overflow-wrap: anywhere;
  color: var(--deep-green);
  font-size: 0.98rem;
  line-height: 1.2;
}

.quote-price-rule-panel p,
.quote-price-rule-panel em {
  color: #41514b;
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.quote-price-rule-options {
  display: grid;
  gap: 8px;
}

.quote-price-rule-option {
  display: grid;
  min-height: 52px;
  gap: 3px;
  border: 1px solid #cbd8d2;
  border-radius: 8px;
  background: #fff;
  color: var(--deep-green);
  padding: 10px;
  text-align: left;
}

.quote-price-rule-option:not(:disabled):hover {
  border-color: #7ca291;
  background: #f8fbf8;
}

.quote-price-rule-option span {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
}

.quote-price-rule-search {
  display: grid;
  gap: 8px;
}

.quote-price-rule-clear {
  justify-self: start;
}

.quote-price-warning-summary {
  display: flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: #fff7e6;
  color: #6d4210;
  padding: 6px 10px;
}

.quote-current-card,
.quote-history-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #cfe4d8;
  border-radius: 8px;
  background: #f7fcf9;
  padding: 14px;
  box-shadow: 0 8px 22px rgb(23 40 35 / 6%);
}

.quote-current-header,
.quote-history-heading,
.quote-history-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-current-header h3,
.quote-current-header p,
.quote-current-header span,
.quote-history-heading h3,
.quote-history-heading p,
.quote-history-row h4,
.quote-history-row p,
.quote-version-note p {
  margin: 0;
}

.quote-current-header h3,
.quote-history-heading h3 {
  overflow-wrap: anywhere;
  font-size: 1.18rem;
  line-height: 1.12;
}

.quote-current-header > div > span,
.quote-history-heading > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

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

.quote-current-facts div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: #edf5f0;
  padding: 10px;
}

.quote-current-facts span,
.quote-history-row-main span,
.quote-history-row-facts span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-current-facts strong {
  overflow-wrap: anywhere;
  color: var(--deep-green);
  font-size: 0.95rem;
  line-height: 1.2;
}

.quote-version-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #f4d8aa;
  border-radius: 8px;
  background: #fff8eb;
  color: #52320c;
  padding: 12px;
}

.quote-version-note span {
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-version-note p {
  margin-top: 4px;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

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

.quote-history-row {
  display: grid;
  gap: 10px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.quote-history-row-warning {
  border-color: #f1c78c;
  background: #fff9ef;
}

.quote-history-row h4 {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--deep-green);
  font-size: 1rem;
  line-height: 1.18;
}

.quote-history-row-main p,
.quote-history-event {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.quote-history-row-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-history-row-facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #edf1ee;
  color: #41514b;
  padding: 6px 9px;
  text-transform: none;
}

.quote-history-row-facts .quote-history-warning-text {
  background: #fff0d9;
  color: #6d4210;
}

.quote-history-preview-link {
  justify-self: start;
}

.quote-approval-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-radius: 8px;
  padding: 12px;
}

.quote-approval-ready,
.quote-approval-approved {
  background: #dff6e8;
  color: #123f2b;
}

.quote-approval-blocked {
  background: #fff0d9;
  color: #52320c;
}

.quote-approval-panel span {
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-approval-panel p,
.quote-approval-panel ul {
  margin: 6px 0 0;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.quote-approval-panel ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.quote-blocker-note strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.quote-blocker-note p,
.quote-line-missing li {
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.quote-line-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #fbfdfc;
  padding: 14px;
}

.quote-line-card:focus {
  outline: 2px solid #d9822b;
  outline-offset: 3px;
}

.quote-line-card-needs-pricing {
  border-color: #e4b074;
  background: #fffaf2;
  box-shadow: inset 4px 0 0 #d9822b;
}

.quote-line-card h4 {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.15;
}

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

.quote-line-facts div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: #edf1ee;
  padding: 10px;
}

.quote-line-facts strong {
  color: var(--deep-green);
  font-size: 0.92rem;
  line-height: 1.25;
}

.quote-line-missing ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.quote-edit-panel {
  border: 1px solid #dce6e1;
  border-radius: 8px;
  background: #f7faf8;
  padding: 0;
}

.quote-edit-panel summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 850;
  padding: 12px;
}

.quote-edit-panel-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid #dce6e1;
  padding: 12px;
}

.quote-line-edit-panel {
  background: #fff;
}

.quote-form-field {
  display: grid;
  gap: 6px;
}

.quote-form-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-form-field textarea {
  min-height: 92px;
  resize: vertical;
}

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

.quote-select {
  min-height: 40px;
  width: 100%;
  border: 1px solid #cbd8d2;
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-green);
  padding: 0 10px;
  font-weight: 750;
}

.quote-edit-actions,
.quote-line-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.quote-line-toolbar {
  justify-content: space-between;
}

.quote-line-toolbar h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.quote-save-state {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.quote-save-error {
  margin: 0;
  border-radius: 8px;
  background: #ffe7e7;
  color: #9b1c1c;
  padding: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.quote-photo-evidence {
  display: grid;
  gap: 10px;
}

.quote-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.quote-photo-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.quote-photo-remove {
  color: #9b1c1c;
}

.quote-photo-error {
  grid-column: 1 / -1;
}

.quote-photo-image {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1ee;
  color: var(--muted);
}

.quote-photo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-photo-card div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.quote-photo-card strong,
.quote-photo-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-photo-card strong {
  color: #24352f;
  font-size: 0.82rem;
  font-weight: 850;
}

.quote-photo-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-source-context {
  border-top: 1px solid #dce6e1;
  padding-top: 10px;
}

.quote-source-context summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 850;
}

.quote-source-context div {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.quote-source-context strong {
  color: var(--deep-green);
  font-size: 0.9rem;
}

.quote-preview-link {
  white-space: nowrap;
}

.quote-preview-shell {
  min-height: 100vh;
  background: #f3f5f2;
  color: var(--ink);
}

.quote-preview-frame {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) max(28px, env(safe-area-inset-bottom));
}

.quote-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.quote-preview-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--deep-green);
  font-weight: 850;
  text-decoration: none;
}

.quote-preview-action-button,
.quote-preview-print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #9cb4aa;
  border-radius: 8px;
  background: #ffffff;
  color: var(--deep-green);
  padding: 0 16px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgb(23 40 35 / 8%);
}

.quote-preview-action-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.quote-preview-action-button-primary {
  border-color: var(--deep-green);
  background: var(--deep-green);
  color: #ffffff;
}

.quote-preview-action-button-danger {
  border-color: #e6c3c3;
  color: #8b2f36;
}

.quote-preview-action-button-danger:hover {
  background: #fff4f4;
}

.quote-preview-action-button:focus-visible,
.quote-preview-print-button:focus-visible {
  outline: 3px solid rgb(45 140 112 / 28%);
  outline-offset: 2px;
}

.quote-delivery-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.38fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
  border: 1px solid #cfe1d9;
  border-radius: 8px;
  background: #f7fbf9;
  padding: 16px;
  box-shadow: 0 12px 30px rgb(23 40 35 / 8%);
}

.quote-delivery-copy {
  display: grid;
  gap: 8px;
}

.quote-delivery-copy h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.quote-delivery-copy p {
  margin: 0;
  color: #40524c;
  line-height: 1.45;
}

.quote-delivery-url {
  overflow-wrap: anywhere;
  border: 1px solid #d9e6e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1a332c;
  padding: 9px 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 760;
}

.quote-delivery-feedback {
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 850;
}

.quote-delivery-feedback-success {
  background: #dcfce7;
  color: #166534;
}

.quote-delivery-feedback-error {
  background: #fee2e2;
  color: #991b1b;
}

.quote-delivery-feedback-neutral {
  background: #edf2ef;
  color: #40524c;
}

.quote-delivery-actions {
  display: grid;
  gap: 10px;
}

.quote-preview-document {
  display: grid;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: clamp(22px, 5vw, 46px);
  box-shadow: 0 18px 44px rgb(23 40 35 / 10%);
}

.quote-preview-business {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.4fr);
  gap: 24px;
  align-items: start;
  border-bottom: 2px solid var(--deep-green);
  padding-bottom: 20px;
}

.quote-preview-business-title {
  display: grid;
  gap: 6px;
}

.quote-preview-business-title h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.quote-preview-business-title p,
.quote-preview-business-details p {
  margin: 0;
  color: #40524c;
  line-height: 1.45;
}

.quote-preview-business-details {
  display: grid;
  gap: 10px;
  color: #40524c;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.quote-preview-business-details address {
  display: grid;
  gap: 2px;
  font-style: normal;
}

.quote-preview-business-details dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.quote-preview-business-details dl div {
  display: grid;
  gap: 2px;
}

.quote-preview-business-details dt {
  color: #65756f;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-preview-business-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.quote-preview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
  gap: 24px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.quote-preview-eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-preview-header h1,
.quote-preview-error h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.quote-preview-header p,
.quote-preview-error p {
  margin: 12px 0 0;
  max-width: 700px;
  color: #40524c;
  font-size: 1rem;
  line-height: 1.55;
}

.quote-preview-meta,
.quote-preview-context dl,
.quote-preview-line-pricing {
  display: grid;
  gap: 12px;
  margin: 0;
}

.quote-preview-meta div,
.quote-preview-context dl div,
.quote-preview-line-pricing div {
  display: grid;
  gap: 3px;
}

.quote-preview-meta dt,
.quote-preview-context dt,
.quote-preview-line-pricing dt {
  color: #65756f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-preview-meta dd,
.quote-preview-context dd,
.quote-preview-line-pricing dd {
  margin: 0;
  font-weight: 850;
}

.quote-preview-section {
  display: grid;
  gap: 16px;
}

.quote-preview-section h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.quote-preview-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-preview-section-heading span {
  color: #65756f;
  font-weight: 850;
}

.quote-preview-context dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 16px;
}

.quote-preview-lines {
  display: grid;
  gap: 14px;
}

.quote-preview-line {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.quote-preview-line-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.32fr);
  gap: 20px;
}

.quote-preview-line-main > div:first-child {
  display: grid;
  gap: 7px;
}

.quote-preview-line-main span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-preview-line h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.quote-preview-line p {
  margin: 0;
  color: #40524c;
  line-height: 1.5;
}

.quote-preview-line-pricing {
  align-content: start;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.quote-preview-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.quote-preview-photo {
  display: grid;
  gap: 8px;
  margin: 0;
}

.quote-preview-photo img,
.quote-preview-photo-fallback {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ef;
  object-fit: cover;
}

.quote-preview-photo-fallback {
  display: grid;
  place-items: center;
  color: #65756f;
}

.quote-preview-photo figcaption {
  display: grid;
  gap: 2px;
  color: #40524c;
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.25;
}

.quote-preview-photo time {
  color: #65756f;
  font-size: 0.78rem;
  font-weight: 700;
}

.quote-preview-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 2px solid var(--deep-green);
  padding-top: 18px;
}

.quote-preview-total span {
  color: #65756f;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-preview-total strong {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}

.quote-preview-terms {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: #40524c;
  padding-top: 18px;
}

.quote-preview-terms div {
  display: grid;
  gap: 6px;
}

.quote-preview-terms h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.quote-preview-terms p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.quote-preview-blocked {
  display: grid;
  align-content: start;
  gap: 14px;
  justify-items: start;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 5vw, 40px);
}

.quote-preview-error {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 18px 44px rgb(23 40 35 / 10%);
}

.quote-preview-error svg {
  margin-top: 4px;
  color: var(--green);
}

@media (min-width: 560px) {
  .quote-approval-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 720px) {
  .quote-preview-business,
  .quote-delivery-panel,
  .quote-preview-header,
  .quote-preview-line-main {
    grid-template-columns: 1fr;
  }

  .quote-preview-line-pricing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    padding-left: 0;
  }
}

@media (max-width: 520px) {
  .quote-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-preview-print-button {
    width: 100%;
  }

  .quote-preview-action-button {
    width: 100%;
  }

  .quote-preview-document {
    padding: 18px;
  }

  .quote-preview-context dl,
  .quote-preview-line-pricing {
    grid-template-columns: 1fr;
  }

  .quote-preview-total {
    display: grid;
  }

  .quote-preview-error {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111c18 !important;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quote-preview-no-print {
    display: none !important;
  }

  .quote-preview-shell {
    min-height: auto;
    background: #ffffff !important;
    color: #111c18 !important;
  }

  .quote-preview-frame {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .quote-preview-document,
  .quote-preview-error {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .quote-preview-document {
    gap: 18px;
  }

  .quote-preview-header,
  .quote-preview-business,
  .quote-preview-section,
  .quote-preview-line,
  .quote-preview-total,
  .quote-preview-terms,
  .quote-preview-photo {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .quote-preview-header {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.34fr);
    gap: 20px;
    padding-bottom: 16px;
  }

  .quote-preview-business {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.34fr);
    gap: 20px;
    padding-bottom: 14px;
  }

  .quote-preview-business-title h2 {
    font-size: 20pt;
    line-height: 1.08;
  }

  .quote-preview-header h1 {
    font-size: 28pt;
    line-height: 1.06;
  }

  .quote-preview-header p,
  .quote-preview-line p {
    color: #263b34;
  }

  .quote-preview-context dl,
  .quote-preview-line {
    border-color: #cfdad5;
  }

  .quote-preview-context dl {
    background: #ffffff;
  }

  .quote-preview-line-main {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.32fr);
  }

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

  .quote-preview-photo img,
  .quote-preview-photo-fallback {
    max-height: 2.2in;
  }

  .quote-preview-total {
    margin-top: 4px;
  }

  .quote-preview-total strong {
    font-size: 24pt;
  }
}

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

.note-editor textarea {
  min-height: 112px;
  resize: vertical;
}

.status-saved_locally {
  background: #e8f0ff;
  color: #214d7a;
}

.status-pending_upload {
  background: #fff0d9;
  color: var(--amber);
}

.status-uploading {
  background: #def3ff;
  color: var(--blue);
}

.status-uploaded {
  background: #dff6e8;
  color: var(--green);
}

.status-sync_failed {
  background: #ffe2dd;
  color: var(--red);
}

@media (min-width: 860px) {
  .app-shell:not(.workspace-shell) {
    grid-template-columns: minmax(360px, 0.85fr) minmax(460px, 1.15fr);
  }

  .workspace-shell {
    display: block;
  }

  .workspace-frame {
    max-width: 980px;
    padding-bottom: 48px;
  }

  .workspace-nav {
    position: sticky;
    top: 12px;
    bottom: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 24px rgb(23 40 35 / 9%);
  }

  .workspace-nav button {
    min-height: 46px;
    grid-auto-flow: column;
    justify-content: center;
  }

  .capture-workspace {
    min-height: calc(100vh - 330px);
  }

  .active-visit-strip {
    padding: 7px 10px;
  }

  .app-shell:not(.workspace-shell) .capture-band,
  .app-shell:not(.workspace-shell) .recordings-band {
    min-height: 100vh;
  }

  .app-shell:not(.workspace-shell) .capture-band {
    position: sticky;
    top: 0;
  }

  .app-header h1 {
    font-size: clamp(3.5rem, 6vw, 5.2rem);
  }

  .workspace-header .workspace-product-mark {
    max-width: 12rem;
    font-size: 1.05rem;
  }

  .app-shell:not(.workspace-shell) .recordings-band {
    align-content: start;
    padding-top: 46px;
  }

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

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

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

  .finding-field:first-child,
  .finding-edit-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .finding-index-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .finding-index-main {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .finding-index-title {
    grid-column: 1 / -1;
  }

  .finding-index-cell {
    grid-column: 1;
  }

  .finding-index-actions {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: start;
    flex-direction: column;
  }

  .issue-detail-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .app-header {
    align-items: flex-start;
  }

  .workspace-header {
    align-items: center;
    gap: 10px;
  }

  .workspace-product-line {
    gap: 6px;
  }

  .workspace-header .workspace-product-mark {
    max-width: 5.8rem;
    font-size: 0.92rem;
  }

  .workspace-scope {
    max-width: 6.8rem;
    font-size: 0.62rem;
  }

  .account-context__name {
    max-width: calc(100vw - 188px);
  }

  .account-context__role {
    display: none;
  }

  .connection-pill {
    min-height: 30px;
    padding: 0 10px;
  }

  .active-visit-strip {
    gap: 6px;
    padding: 5px 6px;
  }

  .active-visit-strip__title {
    font-size: 0.88rem;
  }

  .active-visit-strip__customer {
    font-size: 0.7rem;
  }

  .active-visit-strip__meta {
    gap: 5px;
  }

  .active-visit-strip__sync,
  .active-visit-strip__count {
    font-size: 0.66rem;
  }

  .active-visit-strip__button {
    min-height: 40px;
    gap: 5px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .capture-workspace {
    align-content: start;
  }

  .visit-card {
    gap: 10px;
    padding: 12px;
  }

  .recording-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .visit-card-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .visit-card-copy strong,
  .visit-card-copy span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
  }

  .visit-card-copy strong {
    -webkit-line-clamp: 2;
    font-size: 0.95rem;
  }

  .visit-card-copy span {
    -webkit-line-clamp: 3;
    font-size: 0.8rem;
  }

  .visit-life-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .visit-card-action-cue {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .visit-card-meta {
    gap: 6px;
  }

  .visit-card-meta span {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .finding-card-header,
  .extraction-row {
    align-items: stretch;
    flex-direction: column;
  }

  .finding-badges {
    justify-content: flex-start;
  }
}

.auth-shell {
  align-items: center;
  background: var(--page);
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(23 40 35 / 10%);
  margin: 0 auto;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.auth-panel h1 {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.05;
  margin: 4px 0 20px;
}

.auth-copy {
  color: var(--muted);
  margin: -8px 0 18px;
}

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

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-field input,
.auth-field select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 10px 12px;
}

.auth-submit {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
}

.auth-error {
  background: #fee2e2;
  border-radius: 8px;
  color: #7f1d1d;
  font-weight: 700;
  margin: 0 0 16px;
  padding: 12px;
}

.workspace-header {
  min-height: 44px;
}

.workspace-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workspace-product-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.workspace-header .workspace-product-mark {
  max-width: min(34vw, 10rem);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.workspace-scope {
  min-width: 0;
  overflow: hidden;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-context {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
}

.account-context__name {
  min-width: 0;
  max-width: min(52vw, 30rem);
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-context__role {
  border: 1px solid rgb(65 81 75 / 18%);
  border-radius: 999px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
  padding: 4px 6px;
  text-transform: uppercase;
}

.app-header-actions {
  align-items: center;
  align-self: center;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: max-content 40px;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
  white-space: nowrap;
}

.settings-button {
  align-items: center;
  background: #dff6e8;
  border: 0;
  border-radius: 999px;
  color: #123f2b;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  width: 40px;
  text-decoration: none;
}

.settings-button svg {
  height: 19px;
  width: 19px;
}

.settings-button:focus-visible {
  outline: 3px solid rgb(216 247 224 / 70%);
  outline-offset: 2px;
}

.workspace-capture .account-context {
  color: rgb(255 255 255 / 74%);
}

.workspace-capture .workspace-header .workspace-product-mark {
  color: #ffffff;
}

.workspace-capture .workspace-scope {
  color: #d7ffe5;
}

.workspace-capture .account-context__role {
  border-color: rgb(255 255 255 / 18%);
  color: rgb(255 255 255 / 82%);
}

.workspace-capture .settings-button {
  background: #dff6e8;
  color: #123f2b;
}

.field-settings-panel {
  background: #fff;
  border: 1px solid #dce3df;
  border-radius: 8px;
  box-shadow: 0 20px 48px rgb(23 40 35 / 18%);
  color: #18221f;
  display: grid;
  gap: 12px;
  min-width: min(280px, calc(100vw - 32px));
  padding: 14px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  white-space: normal;
  z-index: 30;
}

.field-settings-panel__header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.field-settings-panel__header p {
  color: #18221f;
  font-size: 0.9rem;
  font-weight: 950;
  margin: 0;
}

.field-settings-panel__close {
  align-items: center;
  background: #eef4f0;
  border: 0;
  border-radius: 999px;
  color: #123f2b;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  width: 32px;
}

.field-settings-panel__close svg {
  height: 16px;
  width: 16px;
}

.field-settings-panel__list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.field-settings-panel__list div {
  display: grid;
  gap: 2px;
}

.field-settings-panel__list dt {
  color: #789088;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.field-settings-panel__list dd {
  color: #18221f;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.3;
  margin: 0;
}

.field-settings-panel__form {
  margin: 0;
}

.field-settings-panel__actions {
  display: grid;
  gap: 8px;
}

.field-settings-panel__link,
.field-settings-panel__button {
  align-items: center;
  background: #f2f8f4;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  color: #123f2b;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  text-decoration: none;
}

.field-settings-panel__link {
  justify-content: flex-start;
  width: 100%;
}

.field-settings-panel__button {
  background: #fff7f4;
  border-color: #f3c8bc;
  color: #8a2c18;
  cursor: pointer;
  font-family: inherit;
  justify-content: flex-start;
  width: 100%;
}

.field-settings-panel__link svg,
.field-settings-panel__button svg {
  height: 17px;
  width: 17px;
}

.field-settings-panel__link:focus-visible,
.field-settings-panel__button:focus-visible {
  outline: 3px solid rgb(31 122 91 / 22%);
  outline-offset: 2px;
}

.field-install-prompt {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b8d6c8;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgb(23 40 35 / 12%);
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 12px;
}

.field-install-prompt__icon {
  align-items: center;
  align-self: start;
  background: #e7f3ed;
  border-radius: 8px;
  color: #123f2b;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.field-install-prompt__icon svg {
  height: 20px;
  width: 20px;
}

.field-install-prompt__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-install-prompt__eyebrow,
.field-install-prompt__body h2,
.field-install-prompt__body p {
  margin: 0;
}

.field-install-prompt__eyebrow {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.field-install-prompt__body h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.15;
}

.field-install-prompt__body p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.field-install-prompt__actions {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-install-prompt__primary,
.field-install-prompt__dismiss {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 950;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  text-decoration: none;
}

.field-install-prompt__primary {
  background: var(--deep-green);
  border: 1px solid var(--deep-green);
  color: #ffffff;
}

.field-install-prompt__primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.field-install-prompt__dismiss {
  background: #f5f8f6;
  border: 1px solid #dce3df;
  color: #41514b;
}

.field-install-prompt__primary svg,
.field-install-prompt__dismiss svg {
  height: 16px;
  width: 16px;
}

.field-install-prompt__primary:focus-visible,
.field-install-prompt__dismiss:focus-visible {
  outline: 3px solid rgb(31 122 91 / 22%);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .visit-site-sheet,
  .visit-editor-sheet {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }

  .visit-site-sheet-fields,
  .visit-editor-sheet-fields {
    grid-template-columns: 1fr;
  }

  .visit-editor-sheet-site-grid {
    grid-template-columns: 1fr;
  }

  .visit-editor-sheet-status {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .visit-site-sheet-actions,
  .visit-editor-sheet-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .visit-editor-sheet .visit-directory-menu,
  .visit-editor-sheet .visit-type-menu {
    max-height: 220px;
  }

  .visit-site-sheet-actions .secondary-button,
  .visit-site-sheet-actions .primary-button,
  .visit-editor-sheet-actions .secondary-button,
  .visit-editor-sheet-actions .primary-button {
    width: 100%;
  }

  .field-orientation__steps {
    grid-template-columns: 1fr;
  }

  .field-orientation__actions {
    display: grid;
  }

  .field-orientation__actions .secondary-button,
  .field-orientation__actions .text-button {
    width: 100%;
  }

  .app-header-actions {
    grid-template-columns: max-content 40px;
  }

  .settings-button {
    height: 40px;
    min-height: 40px;
    min-width: 40px;
    width: 40px;
  }

  .settings-button svg {
    height: 19px;
    width: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .visit-editor-sheet-layer.is-closing,
  .visit-site-sheet,
  .visit-editor-sheet {
    animation: none;
  }
}


/* iOS Safari horizontal-overflow hardening: Safari resolves grid/flex
   min-width:auto to min-content and will not shrink items below it (Chrome
   does), so a wide descendant can push the workspace frame past the viewport.
   Floor every link of the chain and let long unbreakable tokens wrap. */
.workspace-shell {
  max-width: 100vw;
  overflow-x: clip;
}

.workspace-frame > *,
.workspace-panel > *,
.quote-review,
.quote-review > *,
.quote-draft-review,
.quote-current-card,
.quote-history-panel,
.quote-history-row,
.quote-line-list,
.quote-line-card,
.quote-line-disclosure,
.quote-line-detail,
.quote-approval-panel,
.quote-customer-summary,
.quote-blocker-note,
.quote-pricing-jump-list,
.quote-price-rule-panel,
.quote-edit-panel,
.quote-edit-panel-body,
.quote-photo-evidence,
.quote-source-context,
.active-visit-strip,
.active-visit-strip__main,
.active-visit-strip__meta {
  min-width: 0;
  max-width: 100%;
}

.quote-draft-header,
.quote-current-header,
.quote-history-heading,
.quote-history-row-main,
.quote-version-note,
.quote-line-toolbar {
  min-width: 0;
  flex-wrap: wrap;
}

.quote-draft-header > div,
.quote-current-header > div,
.quote-history-heading > div,
.quote-history-row-main > div,
.quote-version-note > div,
.quote-approval-panel > div {
  min-width: 0;
}

.quote-actions-menu > div {
  max-width: min(14rem, calc(100vw - 32px));
}

.active-visit-strip {
  width: 100%;
  overflow: hidden;
}

.active-visit-strip__meta {
  overflow: hidden;
}

.active-visit-strip__sync,
.active-visit-strip__count {
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-approval-panel p,
.quote-approval-panel li,
.quote-customer-summary p,
.quote-blocker-note p,
.quote-line-description,
.quote-line-missing li,
.quote-line-facts strong,
.quote-price-rule-panel p,
.quote-price-rule-panel em,
.quote-source-context p {
  overflow-wrap: anywhere;
}

.quote-approval-panel .primary-button,
.quote-line-toolbar .secondary-button {
  max-width: 100%;
  white-space: normal;
}
