:root {
  --ink: #172235;
  --muted: #657084;
  --line: #d8dee8;
  --paper: #ffffff;
  --ground: #f6f8fc;
  --navy: #082d68;
  --navy-soft: #edf3fd;
  --teal: #008f86;
  --teal-soft: #dff5f1;
  --blue: #0d4d9a;
  --blue-soft: #e9f1fc;
  --amber: #b76300;
  --amber-soft: #fff0dc;
  --red: #a83333;
  --red-soft: #fbe5e3;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 750; min-height: 42px; padding: 0 14px; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button.secondary { background: #edf1f6; color: var(--navy); }
button.ghost { background: transparent; color: var(--navy); padding: 0; min-height: auto; }
a { color: var(--navy); font-weight: 700; text-decoration: none; }
.app-shell { width: 100%; max-width: 1120px; margin: 0 auto; min-height: 100vh; overflow-x: hidden; overflow-x: clip; }
.login-view { width: min(420px, calc(100% - 32px)); margin: 14vh auto 0; }
.login-brand, .wordmark { color: var(--teal); font-weight: 850; letter-spacing: 1.5px; font-size: 13px; }
.login-view h1 { font-size: 34px; margin: 4px 0 8px; }
.login-view p { color: var(--muted); line-height: 1.5; }
.login-form { margin-top: 26px; background: var(--paper); border: 1px solid var(--line); padding: 20px; border-radius: var(--radius); display: grid; gap: 10px; }
.google-login { display: grid; place-items: center; min-height: 42px; padding: 0 14px; border: 1px solid #b9c8c1; border-radius: 6px; background: #fff; color: var(--ink); font-weight: 750; }
.login-form .ghost { justify-self: center; margin-top: 4px; }
label { font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #b9c8c1; border-radius: 6px; color: var(--ink); background: #fff; min-height: 42px; padding: 9px 10px; }
.form-error { color: var(--red) !important; margin: 0; font-size: 14px; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); padding: max(16px, env(safe-area-inset-top)) 18px 14px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; min-width: 0; }
.topbar h1 { font-size: 22px; margin: 2px 0 0; }
.tab-view { padding: 18px 14px 98px; }
.tab-view[hidden] { display: none !important; }
#reports-view { display: flex; flex-direction: column; overscroll-behavior-y: contain; }
.pull-refresh-indicator { align-items: center; background: var(--teal-soft); color: var(--teal); display: flex; font-size: 12px; font-weight: 750; justify-content: center; max-height: 0; opacity: 0; overflow: hidden; padding: 0 12px; transition: max-height .15s ease, opacity .15s ease, padding .15s ease; }
.pull-refresh-indicator:not([hidden]) { max-height: 44px; opacity: 1; padding: 9px 12px; }
.pull-refresh-indicator[data-state="ready"] { background: var(--teal); color: #fff; }
.pull-refresh-indicator[data-state="refreshing"] { background: var(--blue-soft); color: var(--blue); }
.workflow-status { background: var(--teal-soft); border-bottom: 1px solid #abd8cf; color: #13534e; font-size: 13px; font-weight: 750; margin: 0; padding: 9px 14px; }
.view-intro { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 16px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 4px 8px; }
.section-heading h2 { font-size: 16px; margin: 0; }
.count { color: var(--muted); font-size: 13px; }
.job-list { display: grid; gap: 9px; inline-size: 100%; max-inline-size: 100%; min-width: 0; }
.job-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; overflow-wrap: anywhere; }
.job-card.selected { outline: 2px solid var(--teal); outline-offset: -2px; }
.card-header { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.card-title { font-size: 16px; line-height: 1.25; margin: 0; }
.card-subtitle { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; padding: 3px 8px; font-weight: 750; white-space: nowrap; }
.tag.good { background: var(--teal-soft); color: #14544f; }.tag.warn { background: var(--amber-soft); color: #7c4509; }.tag.danger { background: var(--red-soft); color: #842727; }.tag.info { background: var(--blue-soft); color: #24577f; }
.card-actions { display: flex; gap: 10px; align-items: center; margin-top: 13px; flex-wrap: wrap; min-width: 0; }
.card-actions button, .card-actions a { flex: 1 1 120px; min-width: 0; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.check { font-size: 12px; padding: 4px 7px; border-radius: 4px; background: #edf1ef; color: #485752; }.check.ok { background: var(--teal-soft); color: #13534e; }.check.missing { background: var(--amber-soft); color: #85500d; }.check.neutral { background: #e9edf2; color: #5b6673; }.status-detail { min-height: 30px; font-weight: 750; }
.contact-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.contact-info span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.contact-info strong { color: var(--ink); display: block; font-size: 11px; margin-bottom: 2px; }
.previous-match { background: #f6f8f7; border-left: 3px solid var(--blue); display: grid; gap: 3px; margin-top: 12px; padding: 10px; }
.previous-match > span { color: var(--muted); font-size: 13px; }
.workflow-card { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 13px; inline-size: 100%; max-inline-size: 100%; min-width: 0; }
.workflow-checklist { display: grid; gap: 7px; list-style: none; margin: 10px 0 0; padding: 0; }
.workflow-checklist li { align-items: baseline; border-left: 3px solid #b9c8c1; display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: space-between; min-width: 0; padding: 4px 0 4px 8px; }
.workflow-checklist li span { font-size: 13px; font-weight: 700; }
.workflow-checklist li small { color: var(--muted); font-size: 12px; max-inline-size: 100%; overflow-wrap: anywhere; text-align: right; }
.workflow-checklist li.workflow-done, .workflow-checklist li.workflow-complete, .workflow-checklist li.workflow-skipped { border-color: var(--teal); }
.workflow-checklist li.workflow-error { border-color: var(--red); }
.workflow-links a { flex: 1; text-align: center; }
.ready-card { border-color: #9cc6d3; }
.ready-links { align-items: center; flex-wrap: wrap; }
.ready-links a { flex: 1 1 92px; text-align: center; }
.invoice-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.invoice-controls label { display: grid; gap: 5px; }.invoice-controls .wide { grid-column: span 2; }
.calendar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 0 0 14px; }
.calendar-header { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 6px; text-align: center; font-size: 14px; }
.calendar-header button { min-height: 34px; font-size: 12px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.calendar-weekdays span { color: var(--muted); font-size: 11px; font-weight: 750; text-align: center; }
.calendar-day, .calendar-empty { aspect-ratio: 1; min-height: 34px; padding: 0; border-radius: 5px; }
.calendar-day { display: grid; grid-template-rows: 1fr 7px; place-items: center; background: #edf1ef; color: var(--ink); font-size: 13px; }
.calendar-attention-dot { width: 6px; height: 6px; border-radius: 50%; background: #238a54; }
.calendar-day.selected { background: var(--teal); color: #fff; }
.calendar-day.selected .calendar-attention-dot { background: #8ce8b3; }
.calendar-day:disabled { background: transparent; color: #aab4b0; opacity: 1; }
.selection-bar { margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; gap: 10px; justify-content: center; }
.selection-bar[hidden] { display: none; }
.selection-bar button { width: min(520px, 100%); }
.other-links { display: grid; gap: 10px; }
.other-picker { display: grid; gap: 10px; }.other-back { justify-self: start; margin-bottom: 2px; }.swipe-workspace { display: grid; gap: 10px; min-width: 0; }.swipe-frame { background: #101315; border: 1px solid var(--line); border-radius: var(--radius); height: calc(100dvh - 185px); min-height: 520px; max-inline-size: 100%; min-width: 0; width: 100%; }
#operations-view.swipe-active { background: #101315; inset: 0; position: fixed; z-index: 10; }
#operations-view.swipe-active .topbar, #operations-view.swipe-active .workflow-status, #operations-view.swipe-active .bottom-nav { display: none; }
#operations-view.swipe-active #other-view { display: block; inset: 0; margin: 0; padding: 0; position: absolute; }
#operations-view.swipe-active .swipe-workspace { height: 100dvh; width: 100%; }
#operations-view.swipe-active .swipe-frame { border: 0; border-radius: 0; display: block; height: 100%; max-inline-size: none; min-height: 0; width: 100%; }
.other-link { align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); display: grid; gap: 4px; min-height: 80px; padding: 14px; text-align: left; width: 100%; }
.other-link strong { color: var(--teal); font-size: 16px; }.other-link span { color: var(--muted); font-size: 13px; }
.job-folder-workspace { display: grid; gap: 12px; }.job-folder-input-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }.job-folder-status { display: grid; gap: 10px; }.job-folder-fields { display: grid; gap: 10px; }.job-folder-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }.field-help { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.35; }.action-link { align-items: center; display: inline-flex; justify-content: center; text-decoration: none; }.job-folder-result { display: grid; gap: 4px; }.job-folder-result p { margin: 0; }.job-folder-manual-details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(23, 34, 53, .035); overflow: hidden; }.job-folder-manual-details > summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; padding: 14px; }.job-folder-manual-details > summary::-webkit-details-marker { display: none; }.job-folder-manual-details > summary > span:first-child { display: grid; gap: 3px; }.job-folder-manual-details > summary strong { color: var(--ink); font-size: 15px; }.job-folder-manual-details > summary small { color: var(--muted); font-size: 12px; }.job-folder-summary-icon { color: var(--navy); font-size: 24px; line-height: 1; }.job-folder-manual-details[open] > summary { border-bottom: 1px solid var(--line); }.job-folder-manual-details[open] .job-folder-summary-icon { font-size: 0; }.job-folder-manual-details[open] .job-folder-summary-icon::after { content: "−"; font-size: 24px; }.job-folder-manual-details #job-folder-manual-container { padding: 12px; }
.voice-workspace { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-height: calc(100vh - 170px); display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; }
.voice-status { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 14px; }.voice-status h2 { font-size: 18px; margin: 2px 0 0; }.voice-status > span { background: var(--teal-soft); border-radius: 999px; color: var(--teal); font-size: 12px; font-weight: 750; padding: 4px 8px; }
.voice-conversation { display: flex; flex-direction: column; gap: 10px; min-height: 260px; overflow-y: auto; padding: 14px; }.voice-message { background: #f5f8f6; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; line-height: 1.45; max-width: 92%; padding: 11px; white-space: pre-wrap; }.voice-message.user { align-self: flex-end; background: var(--teal-soft); border-color: #abd8cf; }.voice-message.assistant { align-self: flex-start; }.voice-card { background: var(--paper); border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; white-space: pre-wrap; }.voice-card strong { display: block; font-size: 12px; margin-bottom: 4px; }
.voice-settings { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; padding: 10px 14px; }.voice-toggle { align-items: center; display: flex; gap: 7px; }.voice-toggle input { min-height: auto; width: auto; }
.voice-composer { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 9px; grid-template-columns: 64px 1fr; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }.voice-mic { min-height: 42px; padding: 0 8px; }.voice-mic.listening { background: var(--red); }.voice-composer form { display: grid; gap: 8px; grid-template-columns: 1fr auto; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 66px; display: flex; background: var(--paper); border-top: 1px solid var(--line); z-index: 3; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { flex: 1; color: var(--muted); background: transparent; border-radius: 0; min-height: 60px; display: grid; align-content: center; gap: 2px; font-size: 12px; font-weight: 700; }.nav-item span { font-size: 18px; }.nav-item.active { color: var(--teal); box-shadow: inset 0 3px 0 var(--teal); }
html.dialog-open, body.dialog-open { overflow: hidden; }
.app-dialog { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); margin:0; border:0; padding:0; background:transparent; width:min(620px,calc(100dvw - 24px)); max-height:calc(100dvh - 24px); }.app-dialog::backdrop { background: rgba(16, 31, 29, .45); }.dialog-frame { display:grid; width:100%; max-height:calc(100dvh - 24px); overflow:hidden; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); }.confirm-frame { grid-template-rows:auto minmax(0,1fr) auto; }.detail-frame { grid-template-rows:auto minmax(0,1fr); }.dialog-header { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; padding:14px 18px; border-bottom:1px solid var(--line); }.dialog-body { min-height:0; overflow-y:auto; padding:18px; }.close-button { background:#e7ece9; color:var(--ink); width:34px; min-height:34px; padding:0; font-size:28px; line-height:1; }
dialog { border: 0; padding: 0; background: transparent; max-width: 620px; width: min(100% - 24px, 620px); }dialog::backdrop { background: rgba(16, 31, 29, .45); }
.confirm-dialog form, .detail-dialog { background: var(--paper); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); max-height: min(80vh, 720px); overflow: auto; }
.dialog-heading h2 { margin: 2px 0 12px; font-size: 22px; }.eyebrow { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; margin: 0; }.dialog-actions { display: flex; gap: 10px; margin-top: 18px; }.dialog-actions button { flex: 1; }
.detail-dialog { position: relative; }.close-button { position: static; background: #e7ece9; color: var(--ink); width: 34px; min-height: 34px; padding: 0; font-size: 25px; }.detail-dialog h2 { margin: 2px 0 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }.detail-grid div { padding: 10px; background: #f6f8f7; border-radius: 5px; }.detail-grid dt { color: var(--muted); font-size: 12px; }.detail-grid dd { margin: 3px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 18px 0; }.timeline li { border-left: 2px solid var(--line); padding: 0 0 13px 12px; margin-left: 5px; font-size: 13px; }.timeline time { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.empty { background: var(--paper); border: 1px dashed #b9c8c1; border-radius: var(--radius); color: var(--muted); padding: 22px; text-align: center; }.loading { color: var(--muted); padding: 28px 10px; }.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); max-width: calc(100% - 30px); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 6; font-size: 14px; }
.report-card { inline-size: 100%; max-inline-size: 100%; min-width: 0; padding: 0; }.report-card-toggle { align-items: center; background: transparent; color: var(--ink); display: flex; justify-content: space-between; max-inline-size: 100%; min-width: 0; padding: 14px; text-align: left; width: 100%; }.report-card-toggle > span:first-child { display: grid; flex: 1 1 0; gap: 3px; min-width: 0; }.report-card-toggle strong { overflow-wrap: anywhere; }.report-card-toggle small { color: var(--muted); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }.report-card-toggle > span:last-child { flex: 0 0 auto; color: var(--teal); font-size: 22px; transition: transform .15s ease; }.report-card-toggle[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }.report-card-details { border-top: 1px solid var(--line); inline-size: 100%; max-inline-size: 100%; min-width: 0; overflow-x: hidden; padding: 0 14px 14px; }.report-card-details a, .report-card-details button { max-inline-size: 100%; overflow-wrap: anywhere; }.detail-list { display: grid; gap: 8px; margin: 0; padding-left: 20px; }.detail-list li { line-height: 1.45; overflow-wrap: anywhere; }.photo-links { display: grid; gap: 8px; }.photo-links a { background: #f6f8f7; border-radius: 6px; padding: 10px; overflow-wrap: anywhere; }
.missing-labs, .matched-labs, .unmatched-labs { inline-size: 100%; max-inline-size: 100%; min-width: 0; }.matched-labs { order: 1; }.missing-labs { order: 2; }.unmatched-labs { order: 3; }.missing-lab-group { margin-top: 18px; }.missing-lab-group h3 { color: var(--muted); font-size: 13px; margin: 0 0 8px 4px; }.missing-lab-card { display: grid; gap: 8px; }.completed-actions { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 13px; }.completed-action { align-items: center; background: #fff; border: 2px solid var(--navy); border-radius: 8px; color: var(--navy); display: flex; font-size: 12px; font-weight: 750; justify-content: center; min-height: 42px; min-width: 0; overflow-wrap: anywhere; padding: 7px; text-align: center; }.completed-action:last-child { background: var(--navy); color: #fff; }.completed-action.unavailable { background: #eef1f5; border-color: #eef1f5; color: var(--muted); opacity: .8; }.draft-action button { flex-basis: 100%; }.precheck-action { margin-top: 12px; }.unmatched-labs .section-heading { align-items: end; }.unmatched-labs label { color: var(--muted); display: grid; font-size: 11px; gap: 3px; min-width: 96px; }.unmatched-labs select { min-height: 34px; padding: 5px 8px; }

/* Compact navy phone treatment. */
button:not(.ghost) { box-shadow: 0 1px 2px rgba(8, 45, 104, .14); }
button:not(:disabled):hover { filter: brightness(1.06); }
.job-card, .calendar, .other-link, .voice-workspace, .dialog-frame { border-color: #dbe1ea; box-shadow: 0 2px 8px rgba(23, 34, 53, .035); }
.section-heading { margin-top: 20px; }
.section-heading h2 { color: var(--ink); font-size: 17px; }
.tag { border-radius: 6px; }
.tag.good, .check.ok { background: var(--teal-soft); color: #00766e; }
.tag.warn, .check.missing { background: var(--amber-soft); color: #a35300; }
.workflow-checklist li.workflow-done, .workflow-checklist li.workflow-complete, .workflow-checklist li.workflow-skipped { border-color: var(--teal); }
.workflow-status { background: var(--navy-soft); border-bottom-color: #cad8f1; color: var(--navy); }
.reports-toolbar { background: var(--ground); box-shadow: 0 5px 10px rgba(23, 34, 53, .07); margin: -18px -14px 6px; order: 0; padding: 14px 14px 10px; position: sticky; top: 0; z-index: 2; }
.reports-toolbar-actions { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reports-toolbar-actions button { min-height: 54px; padding: 8px 10px; }
.reports-updated-at { color: var(--muted); font-size: 12px; font-weight: 700; margin: 8px 2px 0; text-align: right; }
.reports-refresh-status { color: var(--blue); font-size: 12px; font-weight: 750; margin: 0 2px; min-height: 16px; text-align: right; }
.report-card { border-color: #d9e0e9; border-radius: 12px; }
.report-card.ready-card { border-color: #b8d9d5; }
.report-card-toggle { min-height: 82px; padding: 13px 14px; }
.report-card-toggle > .report-card-summary { align-items: center; display: flex; flex: 1 1 0; gap: 12px; min-width: 0; }
.report-card-copy { display: grid; gap: 4px; min-width: 0; }
.report-card-copy strong { color: var(--ink); font-size: 16px; line-height: 1.28; }
.report-card-copy small { color: var(--muted); font-size: 13px; font-weight: 700; }
.report-status-icon { align-items: center; border-radius: 50%; display: inline-flex; flex: 0 0 36px; font-size: 20px; font-weight: 850; height: 36px; justify-content: center; width: 36px; }
.report-status-icon.is-generated { background: var(--teal); color: #fff; }
.report-status-icon.is-pending { background: var(--amber); color: #fff; }
.report-card-toggle > .report-card-chevron { color: var(--navy); flex: 0 0 auto; font-size: 24px; transition: transform .15s ease; }
.report-card-toggle[aria-expanded="true"] > .report-card-chevron { transform: rotate(180deg); }
.report-card-details { border-top-color: #e1e5ec; padding: 0 14px 14px; }
.precheck-action .secondary { background: var(--navy-soft); color: var(--navy); }
.bottom-nav { border-top-color: #d5dce7; box-shadow: 0 -3px 12px rgba(23, 34, 53, .07); }
.nav-item.active { color: var(--navy); box-shadow: inset 0 3px 0 var(--navy); }
.other-link strong, .voice-status > span, .eyebrow { color: var(--navy); }
.voice-message.user { background: var(--navy-soft); border-color: #cad8f1; }
.app-dialog::backdrop { background: rgba(8, 25, 55, .48); }
@media (min-width: 760px) { .tab-view { padding: 26px 24px 38px; }.bottom-nav { position: fixed; top: 0; left: max(0px, calc(50% - 560px)); right: auto; width: 210px; height: 100vh; border-top: 0; border-right: 1px solid var(--line); flex-direction: column; padding-top: 126px; }.nav-item { flex: 0 0 64px; text-align: left; grid-template-columns: 26px 1fr; align-items: center; padding-left: 22px; }.tab-view { margin-left: 210px; }.toast { bottom: 30px; } }
@media (max-width: 380px) { .contact-info { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .tab-view { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }.app-dialog { width: calc(100dvw - 24px); max-width: calc(100dvw - 24px); max-height: calc(100dvh - 24px); }.dialog-frame { max-height: calc(100dvh - 24px); }.dialog-header, .dialog-body { padding-left: 14px; padding-right: 14px; }.dialog-actions { flex-wrap: wrap; padding: 0 14px 14px; }.dialog-actions button { flex: 1 1 120px; }.detail-grid { grid-template-columns: 1fr; }.invoice-controls { grid-template-columns: 1fr; }.invoice-controls .wide { grid-column: auto; }.card-actions > * { flex-basis: 100%; }.ready-links a { flex-basis: 100%; }.completed-actions { gap: 6px; }.completed-action { font-size: 11px; padding: 5px; } }

/* Global search and source-to-report review. */
.global-job-search { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 10px; }
.global-job-search input, .dialog-search input { background: #fff; border: 1px solid #c8d3e1; border-radius: 8px; color: var(--ink); min-width: 0; padding: 10px 11px; }
.global-job-search button { min-height: 42px; }
.review-actions { margin-top: 10px; }.review-actions button:first-child { background: var(--navy-soft); color: var(--navy); }
.dialog-search { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 10px; }.dialog-search button { min-height: 42px; }
.index-status { background: var(--navy-soft); border-radius: 7px; color: var(--navy); font-size: 12px; margin: 0 0 12px; padding: 9px 10px; }
.search-results { display: grid; gap: 9px; }.search-result { background: #f8fafc; border: 1px solid #dbe1ea; border-radius: 9px; display: grid; gap: 8px; padding: 11px; }.search-result > div:first-child { display: grid; gap: 3px; }.search-result small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.review-section { margin-top: 22px; }.review-section h3 { font-size: 18px; margin: 0; }.review-pair { background: #fff; border: 1px solid #dbe1ea; border-radius: 10px; display: grid; gap: 0; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); margin-top: 10px; overflow: hidden; }.review-pair.has-warning { border-color: #e7c781; }.review-pair-number { align-items: flex-start; background: var(--navy); color: #fff; display: flex; font-weight: 850; justify-content: center; padding-top: 13px; }.review-source, .review-generated { min-width: 0; padding: 10px; }.review-source { background: #f4f7f9; border-right: 1px solid #dbe1ea; }.review-source p, .review-generated p { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .3px; margin: 0 0 6px; text-transform: uppercase; }.review-source div, .review-generated div { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }.review-generated-copy { border-radius: 6px; cursor: text; min-height: 38px; outline-offset: 3px; }.review-generated-copy:focus { outline: 2px solid var(--teal); }.review-edit-button { font-size: 12px; margin-top: 9px; min-height: 34px; padding: 6px 10px; }.review-area-name { color: var(--navy) !important; font-size: 13px !important; letter-spacing: 0 !important; margin-bottom: 8px !important; text-transform: none !important; }.review-edit-panel { display: grid; gap: 9px; }.review-edit-panel label { display: grid; gap: 5px; }.review-edit-panel label > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }.review-edit-panel textarea { font: inherit; font-size: 16px; line-height: 1.45; min-height: 116px; resize: vertical; }.review-match-picker { border: 1px solid #e7c781; border-radius: 8px; display: grid; gap: 8px; margin: 0; padding: 10px; }.review-match-picker legend { color: #754c10; font-size: 12px; font-weight: 800; padding: 0 3px; }.review-match-picker label { align-items: flex-start; color: var(--ink); cursor: pointer; display: flex; font-size: 13px; gap: 8px; line-height: 1.4; }.review-match-picker input { flex: 0 0 auto; margin-top: 3px; }.review-warning { background: #fff3dc; border-left: 3px solid var(--amber); color: #754c10; font-size: 12px; grid-column: 2 / -1; line-height: 1.4; margin: 0; padding: 8px 10px; }.review-complete-note { background: var(--teal-soft); border-radius: 8px; color: #13534e; font-size: 13px; margin: 12px 0 0; padding: 10px; }.review-footer { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; }
.health-panel { display: grid; gap: 15px; }.health-panel h2 { margin: -8px 0 0; }.health-grid { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }.health-grid article { background: var(--paper); border: 1px solid #dbe1ea; border-radius: 10px; display: grid; gap: 5px; min-width: 0; padding: 12px; }.health-grid small { color: var(--muted); font-size: 11px; font-weight: 750; }.health-grid strong { color: var(--navy); font-size: 16px; overflow-wrap: anywhere; }.health-grid .health-bad { color: var(--red); }.health-drive { background: #f7faf9; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }.health-drive h3, .health-panel section h3 { font-size: 15px; margin: 0 0 6px; }.health-drive p { font-size: 13px; margin: 0; }.health-counts { display: flex; flex-wrap: wrap; gap: 8px; }.health-count { background: var(--navy-soft); border-radius: 7px; color: var(--navy); display: grid; font-size: 11px; min-width: 72px; padding: 8px; text-transform: capitalize; }.health-count strong { font-size: 16px; }
.photo-import-workspace { display: grid; gap: 14px; }.photo-import-workspace section > h3 { font-size: 15px; margin: 0 0 8px; }.photo-import-heading { align-items: center; margin-top: 0; }.photo-import-heading h2 { margin: 2px 0 0; }.photo-import-heading button { min-height: 40px; }.photo-import-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }.photo-import-choice { align-items: center; background: var(--paper); border: 1px solid #dbe1ea; color: var(--ink); display: flex; gap: 10px; justify-content: space-between; min-height: 72px; padding: 11px 12px; text-align: left; width: 100%; }.photo-import-choice > span:first-child { display: grid; gap: 3px; min-width: 0; }.photo-import-choice strong, .photo-import-choice small { overflow-wrap: anywhere; }.photo-import-choice small { color: var(--muted); font-size: 12px; font-weight: 600; }.photo-import-choice.selected { background: var(--navy-soft); border: 2px solid var(--navy); }.photo-import-choice.unavailable { opacity: .58; }.photo-count { background: var(--teal-soft); border-radius: 999px; color: #13534e; flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 5px 8px; }.photo-import-workspace input[type="search"] { background: #fff; border: 1px solid #c8d3e1; border-radius: 8px; color: var(--ink); font-size: 16px; margin-bottom: 8px; padding: 10px 11px; width: 100%; }.photo-import-result { display: grid; gap: 7px; }.photo-import-result p { margin: 0; }.photo-import-confirm { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }.photo-import-confirm div { background: #f6f8f7; border-radius: 6px; padding: 9px; }.photo-import-confirm dt { color: var(--muted); font-size: 11px; font-weight: 750; }.photo-import-confirm dd { font-size: 13px; margin: 3px 0 0; overflow-wrap: anywhere; }.photo-import-files { max-height: 180px; overflow-y: auto; padding-left: 22px; }.photo-import-files li { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 540px) { .global-job-search { grid-template-columns: minmax(0, 1fr) 78px; }.global-job-search input { font-size: 16px; }.review-pair { grid-template-columns: 34px minmax(0, 1fr); }.review-pair-number { grid-row: span 2; }.review-source { border-bottom: 1px solid #dbe1ea; border-right: 0; }.review-warning { grid-column: 2; }.health-grid { grid-template-columns: 1fr; } }
