:root {
  --ink: #172321;
  --muted: #66736f;
  --line: #d8e1dd;
  --paper: #ffffff;
  --ground: #f3f6f4;
  --teal: #165a57;
  --teal-soft: #dff1ed;
  --blue: #285e92;
  --blue-soft: #e4f0fb;
  --amber: #9a5911;
  --amber-soft: #fff0d7;
  --red: #a83333;
  --red-soft: #fbe5e3;
  --radius: 8px;
}

* { box-sizing: border-box; }
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: 6px; background: var(--teal); color: #fff; font-weight: 700; min-height: 42px; padding: 0 14px; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button.secondary { background: #e7ece9; color: var(--ink); }
button.ghost { background: transparent; color: var(--teal); padding: 0; min-height: auto; }
a { color: var(--blue); font-weight: 650; text-decoration: none; }
.app-shell { max-width: 1120px; margin: 0 auto; min-height: 100vh; }
.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; }
.topbar h1 { font-size: 22px; margin: 2px 0 0; }
.icon-button { min-width: 72px; padding: 0 10px; font-size: 13px; }
.tab-view { padding: 18px 14px 98px; }
.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; }
.job-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.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; }
.card-actions button { flex: 1; }
.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; }
.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; }
.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; gap: 8px; justify-content: space-between; 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; 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-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; }
.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); }
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: absolute; right: 10px; top: 10px; background: #e7ece9; color: var(--ink); width: 34px; min-height: 34px; padding: 0; font-size: 25px; }.detail-dialog h2 { margin-top: 0; padding-right: 35px; }
.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; }
@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; }.topbar { padding-left: 234px; }.tab-view { margin-left: 210px; }.toast { bottom: 30px; } }
@media (max-width: 380px) { .contact-info { grid-template-columns: 1fr; } }
