﻿:root {
  color-scheme: light;
  --bg: #f4faf4;
  --surface: #ffffff;
  --surface-2: #e7f3ec;
  --ink: #1d2420;
  --muted: #667064;
  --line: #dfe7df;
  --brand: #2f7f39;
  --brand-600: #276b30;
  --brand-dark: #225d2a;
  --brand-deep: #184720;
  --amber: #b55325;
  --amber-bg: #fff0e9;
  --danger: #a33a2b;
  --danger-bg: #ffe9e4;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 16px 42px rgba(17, 24, 39, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #eef6ef; color: var(--ink); overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; max-width: 720px; margin: 0 auto; background: linear-gradient(180deg, #eef7ef 0%, #f8fbf8 44%, #f8fbf8 100%); }

.login-screen { min-height: 100vh; display: grid; align-content: center; padding: 22px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(180deg, var(--brand-dark), var(--brand)); color: #fff; box-shadow: 0 8px 20px rgba(35, 110, 45, .2); overflow: hidden; }
.logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.logo-pets { padding: 5px; }
.brand h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.brand p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.login-card { padding: 18px; }
#password-setup-form > .help-text { margin: 0 0 16px; }
#setup-cancel { width: 100%; margin-top: 12px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field span { color: var(--muted); font-size: 13px; font-weight: 700; }
.field input,
.field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 12px; background: #fff; color: var(--ink); }
.field input:focus,
.field select:focus { outline: 2px solid rgba(35, 110, 45, .16); border-color: var(--brand); }
.login-advanced { margin: -2px 0 14px; color: var(--muted); font-size: 13px; }
.login-advanced summary { cursor: pointer; font-weight: 800; }
.login-advanced .field { margin: 10px 0 0; }
.primary-btn, .ghost-btn, .danger-btn { border: 0; border-radius: 8px; padding: 12px 14px; font-weight: 800; }
.primary-btn { width: 100%; color: #fff; background: var(--brand); }
.primary-btn:hover { background: var(--brand-600); }
.primary-btn:disabled { cursor: wait; opacity: .72; }
.call-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 1px solid #f4c8c0; border-radius: 8px; background: #fff6f4; color: var(--danger); font-weight: 900; text-decoration: none; }
.call-btn:hover { background: #ffecea; }
.ghost-btn { color: var(--brand); background: var(--surface-2); }
.danger-btn { color: var(--danger); background: var(--danger-bg); }
.help-text { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.error { margin: 0 0 12px; padding: 10px 12px; color: var(--danger); background: var(--danger-bg); border-radius: 10px; font-weight: 700; }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 90; width: min(640px, calc(100% - 28px)); transform: translateX(-50%); padding: 12px 14px; border: 1px solid rgba(47, 127, 57, .28); border-radius: 12px; background: rgba(47, 127, 57, .97); color: #fff; box-shadow: 0 18px 40px rgba(47, 127, 57, .24); font-size: 14px; font-weight: 850; line-height: 1.35; text-align: center; }
.pull-refresh-indicator { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); z-index: 95; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; max-width: min(280px, calc(100% - 36px)); padding: 9px 13px; border: 1px solid rgba(47, 127, 57, .22); border-radius: 999px; background: rgba(255, 255, 255, .96); color: var(--brand-dark); box-shadow: 0 16px 34px rgba(17, 24, 39, .16); opacity: 0; pointer-events: none; transform: translate(-50%, -70px); transition: opacity .16s ease, transform .18s ease, background .16s ease; }
.pull-refresh-indicator.is-visible { opacity: 1; }
.pull-refresh-indicator.is-ready { background: #e7f3ec; border-color: rgba(47, 127, 57, .34); }
.pull-refresh-indicator span { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; }
.pull-refresh-indicator svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pull-refresh-indicator strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 950; line-height: 1; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .42); }
.confirm-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px); }
.confirm-dialog { position: fixed; left: 50%; top: 50%; z-index: 90; width: min(420px, calc(100% - 34px)); transform: translate(-50%, -50%); display: grid; gap: 14px; padding: 18px; border: 1px solid rgba(223, 231, 223, .94); border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%); box-shadow: 0 24px 70px rgba(17, 24, 39, .28); }
.confirm-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #e7f3ec; color: var(--brand); }
.confirm-icon svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.confirm-copy { display: grid; gap: 8px; }
.confirm-copy h2 { margin: 0; color: #173d22; font-size: 19px; line-height: 1.2; }
.confirm-copy p { margin: 0; color: #26332d; font-size: 15px; font-weight: 750; line-height: 1.45; }
.confirm-copy p strong { color: var(--danger); font-weight: 950; white-space: nowrap; }
.confirm-copy small { color: var(--muted); font-size: 13px; font-weight: 750; line-height: 1.35; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 2px; }
.confirm-actions .primary-btn,
.confirm-actions .ghost-btn { width: 100%; min-height: 44px; }
.booking-message-dialog { gap: 12px; }
.booking-message-form { display: grid; gap: 12px; }
.booking-message-field { margin: 0; }
.booking-message-field textarea { min-height: 132px; }
.bottom-sheet { position: fixed; left: 50%; bottom: 0; z-index: 60; width: min(720px, 100%); max-height: min(88vh, 760px); transform: translateX(-50%); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; padding: 8px 16px max(18px, env(safe-area-inset-bottom)); border: 1px solid rgba(223, 231, 223, .92); border-bottom: 0; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #ffffff 0%, #f9fbf9 100%); box-shadow: 0 -18px 50px rgba(17, 24, 39, .24); overflow: hidden; }
.bottom-sheet.is-booking-sheet { height: min(78vh, 680px); }
.bottom-sheet.is-client-sheet { height: min(88vh, 760px); }
.sheet-grabber { justify-self: center; width: 44px; height: 5px; border-radius: 999px; background: #c8d4cb; }
.sheet-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sheet-title-copy { min-width: 0; }
.sheet-head h2 { margin: 0; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.sheet-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.sheet-head .sheet-expiry-label { color: var(--danger); font-size: 12px; font-weight: 900; line-height: 1.2; }
.sheet-title-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: #e7f3ec; color: var(--brand); }
.sheet-title-icon svg,
.sheet-summary-icon svg,
.sheet-action-icon svg,
.sheet-map-cta svg { width: 21px; height: 21px; display: block; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.sheet-close,
.sheet-back { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 24px; font-weight: 900; line-height: 1; }
.sheet-back { font-size: 30px; color: var(--brand-dark); }
.sheet-summary { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sheet-summary-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 9px; align-items: center; min-width: 0; padding: 11px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 3px 12px rgba(17, 24, 39, .035); }
.sheet-time-picker { position: relative; display: block; padding: 0; overflow: visible; }
.sheet-summary-card.is-disabled { opacity: .68; }
.sheet-summary-card span:not(.sheet-summary-icon) { color: var(--muted); font-size: 12px; font-weight: 800; }
.sheet-summary-card strong { min-width: 0; color: var(--brand-dark); font-size: 13px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.sheet-notes-toggle { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; width: 100%; color: inherit; text-align: left; }
.sheet-notes-toggle:disabled { cursor: default; opacity: .74; }
.sheet-notes-toggle:focus { outline: 2px solid rgba(35, 110, 45, .18); outline-offset: 2px; }
.sheet-notes-toggle strong { grid-column: 2; line-height: 1.25; }
.sheet-notes-chevron { grid-column: 3; grid-row: 1 / span 2; align-self: center; color: #69756d; font-size: 22px !important; font-weight: 900 !important; }
.sheet-notes-panel { grid-column: 1 / -1; display: grid; gap: 6px; padding: 12px; border: 1px solid rgba(47, 127, 57, .22); border-radius: 8px; background: #f3faf5; }
.sheet-notes-panel span { color: var(--muted); font-size: 12px; font-weight: 850; }
.sheet-notes-panel p { margin: 0; color: #1f3327; font-size: 14px; font-weight: 800; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-summary-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #e7f3ec; color: var(--brand); }
.sheet-time-card-button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 9px; align-items: center; width: 100%; min-height: 58px; padding: 11px 10px; border: 0; border-radius: 8px; background: #fff; color: inherit; text-align: left; }
.sheet-time-card-button:focus { outline: 2px solid rgba(35, 110, 45, .18); outline-offset: 2px; }
.sheet-time-card-button.is-submitting { cursor: wait; background: #f7fbf8; }
.sheet-time-card-button strong { font-size: 15px; }
.sheet-time-caret { grid-column: 3; grid-row: 1 / span 2; color: #69756d; font-size: 19px; font-weight: 900; transform: rotate(180deg); }
.sheet-time-status { display: block; margin: -2px 10px 10px 53px; color: var(--brand-dark); font-size: 12px; font-weight: 850; }
.sheet-time-menu { position: absolute; left: -1px; top: calc(100% + 6px); z-index: 8; width: calc(100% + 2px); max-height: 232px; overflow-y: auto; padding: 7px; border: 1px solid rgba(47, 127, 57, .28); border-radius: 0 0 12px 12px; background: #fff; box-shadow: 0 18px 34px rgba(17, 24, 39, .18); }
.sheet-time-option { display: block; width: 100%; min-height: 42px; border: 0; border-radius: 0; background: #fff; color: #26332d; font-size: 15px; font-weight: 850; text-align: left; }
.sheet-time-option:disabled { cursor: wait; opacity: .78; }
.sheet-time-option + .sheet-time-option { border-top: 1px solid #edf0ed; }
.sheet-time-option.active { background: #dff1df; color: #173d22; font-weight: 950; }
.sheet-time-option:active { background: #edf6ef; }
.sheet-section-title { margin: 2px 0 -2px; color: #1d2420; font-size: 14px; font-weight: 950; }
.sheet-actions { display: grid; gap: 10px; }
.event-reschedule-form { display: grid; gap: 10px; padding: 12px; border: 1px solid #f2d6b5; border-radius: 8px; background: #fffaf3; }
.event-reschedule-form.is-appointment { border-color: rgba(47, 127, 57, .28); background: #f3faf5; }
.event-reschedule-form.is-reminder { border-color: #f2d6b5; background: #fffaf3; }
.event-reschedule-form .field { margin-bottom: 0; }
.event-form-time-picker { position: relative; width: 100%; }
.event-form-time-picker .visit-time-button { width: 100%; min-height: 44px; }
.event-form-time-picker .sheet-time-menu { position: relative; left: auto; top: auto; z-index: 1; width: 100%; max-height: 210px; margin-top: 6px; padding: 5px; box-shadow: 0 10px 24px rgba(17, 24, 39, .12); }
.event-form-time-picker .sheet-time-option { min-height: 40px; font-size: 14px; }
.sheet-action { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; text-align: left; text-decoration: none; box-shadow: 0 3px 12px rgba(17, 24, 39, .04); }
.sheet-action.primary { border-color: rgba(47, 127, 57, .32); background: var(--surface-2); }
.sheet-action.is-completed-toggle { border-color: rgba(47, 127, 57, .38); background: #f3faf5; }
.sheet-action.warning { border-color: #f2d6b5; background: #fffaf3; }
.sheet-action.danger { border-color: #f4c8c0; background: #fff6f4; }
.sheet-action:disabled { cursor: not-allowed; opacity: .64; }
.sheet-action-picker { cursor: pointer; }
.sheet-action-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #edf6ef; color: var(--brand); }
.sheet-action.warning .sheet-action-icon { background: #fff0db; color: #c7771f; }
.sheet-action.is-completed-toggle .sheet-action-icon { background: #dff1df; color: var(--brand-dark); }
.sheet-action.danger .sheet-action-icon { background: var(--danger-bg); color: var(--danger); }
.sheet-action.walk-action { border-color: rgba(37, 95, 145, .24); background: #f2f8ff; }
.sheet-action.walk-action .sheet-action-icon { background: #e1f0ff; color: #255f91; }
.sheet-action-copy { display: grid; gap: 3px; min-width: 0; }
.sheet-action span.sheet-action-copy { color: inherit; font-size: inherit; font-weight: inherit; }
.sheet-action-copy strong { color: var(--ink); font-size: 14px; font-weight: 950; line-height: 1.2; overflow-wrap: anywhere; }
.sheet-action-copy small { color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.sheet-action-chevron { color: #667064; font-size: 24px; font-weight: 700; line-height: 1; }
.sheet-bottom-ctas { display: grid; gap: 10px; margin-top: 2px; }
.sheet-map-cta { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; margin-top: 2px; border-radius: 8px; background: linear-gradient(180deg, #21813a, #176d2e); color: #fff; font-size: 14px; font-weight: 950; text-decoration: none; box-shadow: 0 10px 24px rgba(39, 107, 48, .26); }
.sheet-bottom-ctas .sheet-walk-cta { width: 100%; border: 0; background: linear-gradient(180deg, #21813a, #176d2e); box-shadow: 0 10px 24px rgba(39, 107, 48, .26); }
.sheet-scroll { min-height: 0; overflow-y: auto; display: grid; gap: 12px; padding-bottom: 4px; }
.action-sheet-scroll { align-content: start; scrollbar-width: none; }
.action-sheet-scroll::-webkit-scrollbar { width: 0; height: 0; }
.sheet-scroll .card { box-shadow: none; }
.booking-sheet-scroll { height: 100%; grid-template-rows: auto minmax(0, 1fr); }
.booking-segment { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #edf6ef; }
.booking-segment button { min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 900; }
.booking-segment button.active { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 6px rgba(17, 24, 39, .08); }
.booking-tab-panel { min-height: 0; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.booking-tab-panel { scrollbar-width: none; }
.booking-tab-panel::-webkit-scrollbar { width: 0; height: 0; }
.booking-sheet-scroll .detail-card { min-height: 0; }
.booking-sheet-scroll .visits-head { margin: 0; }
.booking-sheet-scroll .visits-table-wrap { overflow: visible; }
.message-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.message-current { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbf9; }
.message-current span,
.message-field span { color: var(--muted); font-size: 12px; font-weight: 800; }
.message-current strong { color: var(--ink); font-size: 15px; font-weight: 900; line-height: 1.35; }
.message-current p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.message-field { margin-bottom: 0; }
.message-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; color: var(--ink); }
.message-field textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
.message-field textarea:focus { outline: 2px solid rgba(35, 110, 45, .16); border-color: var(--brand); }
.intro-report-field { gap: 9px; }
.intro-report-field > span { color: #21372a; font-size: 13px; font-weight: 950; line-height: 1.25; }
.intro-report-prompts { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: #4d5c53; font-size: 13px; font-weight: 750; line-height: 1.32; }
.intro-report-prompts li { padding-left: 3px; }
.history-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.history-summary div { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.history-summary span { color: var(--muted); font-size: 11px; font-weight: 800; }
.history-summary strong { color: var(--brand-dark); font-size: 15px; overflow-wrap: anywhere; }
.history-overview { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(47, 127, 57, .32); border-radius: 8px; background: #f7fbf8; box-shadow: 0 4px 14px rgba(17, 24, 39, .06); }
.history-overview-head { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #dfeadf; }
.history-overview-head h2 { margin: 0; color: #1d2420; font-size: 16px; font-weight: 950; }
.history-overview-head p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.3; }
.history-overview-grid { display: grid; gap: 8px; }
.history-overview-card { display: grid; gap: 8px; padding: 10px; border: 1px solid #e0ebe0; border-radius: 8px; background: #fff; }
.history-overview-card.is-history-past { border-color: #bddac5; background: #f4faf5; }
.history-overview-card.is-history-current { border-color: #ead9a5; background: #fffaf0; }
.history-overview-card.is-history-future { border-color: #bfd7ec; background: #f2f8ff; }
.history-overview-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.history-overview-title strong { color: var(--brand-dark); font-size: 14px; font-weight: 950; }
.history-overview-title span { color: var(--muted); font-size: 11px; font-weight: 850; white-space: nowrap; }
.history-overview-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.history-overview-money div { min-width: 0; display: grid; gap: 4px; padding: 7px 6px; border: 1px solid rgba(223, 231, 223, .8); border-radius: 7px; background: rgba(255, 255, 255, .82); }
.history-overview-money span { color: var(--muted); font-size: 9px; font-weight: 850; line-height: 1.1; }
.history-overview-money strong { color: #1f3327; font-size: 11px; font-weight: 950; overflow-wrap: anywhere; }
.history-overview-money .is-balance { background: var(--danger-bg); }
.history-overview-money .is-balance strong { color: var(--danger); }
.history-totals { display: grid; margin: 0 0 10px; border: 1px solid rgba(47, 127, 57, .32); border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(17, 24, 39, .06); overflow: hidden; }
.history-totals-row { display: grid; grid-template-columns: minmax(92px, 1.25fr) repeat(3, minmax(58px, 1fr)); align-items: stretch; min-height: 54px; background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%); }
.history-totals-row + .history-totals-row { border-top: 1px solid #e7eee7; }
.history-totals-row > div { min-width: 0; padding: 8px 7px; border-left: 1px solid #edf2ed; }
.history-totals-row > .history-totals-name { border-left: 0; }
.history-totals-row span,
.history-totals-row strong { display: block; line-height: 1.15; }
.history-totals-row span { color: var(--muted); font-size: 9px; font-weight: 850; }
.history-totals-row strong { color: #1f3327; font-size: 11px; font-weight: 950; overflow-wrap: anywhere; }
.history-totals-name strong { color: var(--brand-dark); font-size: 12px; white-space: nowrap; }
.history-totals-name span { margin-top: 2px; font-size: 10px; font-weight: 900; }
.history-totals-row .is-balance strong { color: var(--danger); }
.history-list { display: grid; gap: 10px; }
.history-item { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.history-item.is-history-past { border-color: #bddac5; background: #f6fbf7; }
.history-item.is-history-current { border-color: #ead9a5; background: #fffaf0; }
.history-item.is-history-future { border-color: #bfd7ec; background: #f2f8ff; }
.history-item.is-history-past .history-item-top { color: #236532; }
.history-item.is-history-current .history-item-top { color: #86651a; }
.history-item.is-history-future .history-item-top { color: #255f91; }
.history-item-top { display: flex; justify-content: space-between; gap: 10px; color: var(--brand-dark); font-size: 13px; font-weight: 900; }
.history-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.history-caregiver-note { padding: 7px 8px; border: 1px solid rgba(37, 95, 145, .18); border-radius: 7px; background: rgba(255, 255, 255, .72); color: #38556d !important; font-weight: 850; }
.history-money { display: flex; flex-wrap: wrap; gap: 6px; }
.history-money span,
.history-money strong { padding: 5px 7px; border: 1px solid rgba(223, 231, 223, .85); border-radius: 7px; background: rgba(255, 255, 255, .86); color: #26332d; font-size: 12px; font-weight: 850; }
.history-money strong { color: var(--danger); background: var(--danger-bg); }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.history-settlement-btn,
.history-message-btn { justify-self: start; min-height: 36px; padding: 8px 12px; border: 1px solid rgba(47, 127, 57, .32); border-radius: 8px; background: #e7f3ec; color: var(--brand-dark); font-size: 13px; font-weight: 950; }
.history-settlement-btn:disabled { cursor: wait; opacity: .72; }
.history-settlement-btn.is-pending { cursor: default; border-color: #d7dddc; background: rgba(255, 255, 255, .72); color: #60706a; }
.history-message-btn { border-color: rgba(37, 95, 145, .24); background: #edf6ff; color: #255f91; }
.history-paid-to { color: #4b5b52 !important; }

.app-header { position: relative; z-index: 10; min-height: 190px; padding: max(18px, env(safe-area-inset-top)) 22px 78px; background: radial-gradient(circle at 24% 8%, rgba(255,255,255,.12), transparent 30%), linear-gradient(150deg, #10391d 0%, #1f7630 64%, #2f8f40 100%); color: #fff; border-bottom: 1px solid rgba(17, 24, 39, .14); box-shadow: 0 8px 24px rgba(17, 24, 39, .12); }
.header-row { position: relative; display: block; min-height: 66px; }
.header-back { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; font-weight: 800; line-height: 1; }
.header-back:active { transform: translateY(1px); background: rgba(255,255,255,.18); }
.header-brand { display: block; min-width: 0; padding-right: 106px; }
.header-logo { position: absolute; top: -4px; right: 0; width: 94px; height: 94px; display: grid; place-items: center; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.header-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.header-title { min-width: 0; }
.eyebrow { margin: 0 0 6px; font-size: 13px; color: rgba(255,255,255,.74); letter-spacing: .04em; font-weight: 900; }
.header-title h1 { margin: 0; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.header-subtitle { margin: 7px 0 0; color: rgba(255,255,255,.82); font-size: 14px; font-weight: 750; }
.app-version-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: 11px; font-weight: 950; vertical-align: middle; }
.content { padding: 0 20px 104px; }
.stats { position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 30; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: -46px 0 24px; padding: 8px; border: 1px solid rgba(223, 231, 223, .9); border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: var(--soft-shadow); backdrop-filter: blur(14px); }
.stat { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 60px; padding: 7px 8px; border-radius: 12px; background: transparent; border: 0; color: inherit; text-align: left; box-shadow: none; }
.stat-button { width: 100%; }
.stat-button:active { transform: translateY(1px); background: #f8faf8; }
.stat-button.is-selected { background: #e6f5eb; box-shadow: inset 0 0 0 1px rgba(47, 127, 57, .24); }
.stat:not(:last-child) { border-right: 1px solid var(--line); }
.stat-icon { grid-row: 1 / span 2; display: grid !important; place-items: center; width: 34px; height: 34px; margin: 0 !important; border-radius: 11px; background: #edf6ef; color: var(--brand); font-size: 20px !important; font-weight: 900 !important; }
.stat-icon svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.stat strong { display: block; color: #17231d; font-size: 26px; line-height: .95; }
.stat > span:not(.stat-icon) { display: block; margin-top: 2px; max-width: none; font-size: 10px; color: var(--muted); font-weight: 750; line-height: 1.12; overflow-wrap: normal; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 10px; }
.section-head h2 { margin: 0; font-size: 17px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.schedule-head { align-items: center; margin-top: 0; }
.schedule-head h2 { color: #234d31; font-size: 19px; }
.schedule-nav { display: grid; justify-items: end; gap: 6px; }
.date-picker { display: grid; grid-template-columns: 34px 76px 34px; gap: 6px; align-items: center; }
.date-nav-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--brand-dark); font-size: 24px; font-weight: 800; line-height: 1; }
.date-nav-btn:active { transform: translateY(1px); background: var(--surface-2); }
.today-btn { min-height: 34px; padding: 0 12px; border: 1px solid rgba(47, 127, 57, .28); border-radius: 10px; background: var(--surface-2); color: var(--brand-dark); font-size: 13px; font-weight: 900; white-space: nowrap; box-shadow: 0 3px 12px rgba(17, 24, 39, .04); }
.today-btn:active { transform: translateY(1px); background: #d9eadf; }
.agenda-count { margin: 0; color: var(--brand-dark); font-size: 12px; font-weight: 900; text-align: right; text-transform: capitalize; }
.stack { display: grid; gap: 10px; }
.job-card { display: grid; gap: 10px; padding: 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); color: inherit; text-decoration: none; box-shadow: 0 3px 12px rgba(17, 24, 39, .04); }
.job-card[data-job-id] { cursor: pointer; }
.job-card:active { transform: translateY(1px); }
.job-card.is-outstanding { position: relative; border-left: 0 !important; padding-left: 15px; padding-right: 42px; box-shadow: none; }
.job-card.is-outstanding .job-top { display: grid; justify-content: stretch; gap: 8px; }
.job-card.is-outstanding .badge { justify-self: start; padding: 4px 8px; font-size: 11px; line-height: 1.15; white-space: normal; }
.job-card.is-outstanding .job-title { color: #1f2b25; font-size: 15px; line-height: 1.22; font-weight: 850; }
.job-card.is-outstanding .job-meta { margin-top: 5px; color: #7a837d; font-size: 13px; line-height: 1.3; }
.job-card.is-outstanding .job-outstanding-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #7a827c; font-size: 30px; }
.job-card.is-pending-request { border-left: 1px solid var(--line); box-shadow: 0 3px 12px rgba(17, 24, 39, .04); }
.job-card.is-pending-request .job-title { color: #1d2420; }
.job-card.is-pending-request .job-meta { color: #667064; font-weight: 750; }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.job-card-chevron { flex: 0 0 auto; color: #789083; font-size: 28px; font-weight: 400; line-height: 1; }
.job-address-link,
.job-booking-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 38px; border: 0; border-radius: 8px; padding: 7px 8px; background: #f7faf7; color: #33423a; font-size: 13px; font-weight: 850; line-height: 1.3; text-align: left; text-decoration: none; }
.job-address-link { color: #53645b; }
.job-address-link:active,
.job-booking-row:active { background: #edf6ef; transform: translateY(1px); }
.job-address-link.is-disabled { color: #8a948d; pointer-events: none; }
.job-booking-row { color: var(--brand-dark); background: #eef7f1; }
.job-row-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #e7f3ec; color: var(--brand); }
.job-row-icon svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.job-action-divider { height: 1px; background: var(--line); }
.job-title { margin: 0; font-size: 16px; line-height: 1.2; }
.job-expiry-label { margin: 4px 0 0; color: var(--danger); font-size: 12px; font-weight: 900; line-height: 1.2; }
.job-meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.badge { border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.pending { color: var(--amber); background: var(--amber-bg); }
.badge.active { color: var(--brand-dark); background: var(--surface-2); }
.badge.done { color: var(--muted); background: #eef0ee; }
.badge.outstanding { color: #57615c; background: #edf0ee; }
.job-detail-line { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.job-detail-line span { padding: 6px 8px; border-radius: 7px; background: #f5f8f5; }
.job-detail-line .pending-status-chip { background: var(--amber-bg); color: var(--amber); font-weight: 900; }
.job-pill-button { min-height: 30px; border: 0; border-radius: 7px; padding: 6px 9px; background: #e7f3ec; color: var(--brand-dark); font-size: 13px; font-weight: 900; }
.job-pill-button.active { background: var(--brand); color: #fff; }
.job-response-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.job-response-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 950; line-height: 1.15; }
.job-response-btn.is-accept { background: var(--brand); color: #fff; }
.job-response-btn.is-reject { background: var(--danger-bg); color: var(--danger); }
.job-response-btn.is-message { grid-column: 1 / -1; background: #eef4f1; color: #315847; }
.job-response-btn:disabled { cursor: wait; opacity: .72; }
.job-action-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; }
.job-action-icon svg { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.job-visits-popover { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(47, 127, 57, .18); border-radius: 8px; background: #f8fbf8; }
.job-visits-popover p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.job-visit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; background: #fff; color: #26332d; font-size: 13px; }
.job-visit-row span { min-width: 0; font-weight: 800; }
.job-visit-row strong { color: var(--brand-dark); font-weight: 950; white-space: nowrap; }
.empty { padding: 24px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,.68); }
.agenda { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 26px rgba(17, 24, 39, .06); }
.agenda-swipe-area { touch-action: pan-y; }
.agenda-row { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px 40px 16px 10px; background: #f7fcf8; color: #173d25; text-decoration: none; border-bottom: 1px solid #e3eee6; border-left: 4px solid #b9dfc2; }
.agenda-row:last-child { border-bottom: 0; }
.agenda-row:active { background: #f8faf8; }
.agenda-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 4px rgba(47, 127, 57, .10); }
.agenda-time { min-width: 0; color: #2f6f3d; font-size: 15px; font-weight: 900; line-height: 1.2; }
.agenda-main { display: grid; gap: 4px; min-width: 0; }
.agenda-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.agenda-title { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; color: #173d25; font-size: 15px; line-height: 1.25; }
.agenda-title strong { font-weight: 900; }
.agenda-code { color: #2f6f3d; }
.agenda-address { color: #42634d; font-size: 13px; line-height: 1.3; }
.agenda-status { flex: 0 0 auto; align-self: flex-start; border-radius: 999px; padding: 4px 8px; background: #eef0ee; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.15; text-align: right; white-space: nowrap; }
.agenda-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #7a827c; font-size: 30px; line-height: 1; }
.agenda-done-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #8da18f; border-radius: 999px; color: #6b846f; font-size: 14px; font-weight: 900; line-height: 1; }
.agenda-row.is-done { background: #f7faf7; border-left-color: #b6d2bd; border-bottom-color: #e1e8e3; color: #607367; }
.agenda-row.is-event { background: #f7f9f7; border-left-color: #c7d0ca; border-bottom-color: #e2e7e3; color: #303a34; }
.agenda-row.is-event .agenda-dot { background: #9aa39d; box-shadow: 0 0 0 4px rgba(154, 163, 157, .14); }
.agenda-row.is-event .agenda-time,
.agenda-row.is-event .agenda-title { color: #303a34; }
.agenda-row.is-event .agenda-address { color: #4f5a54; }
.agenda-row.is-key-reminder { background: #f7f9f7; border-left-color: #c7d0ca; }
.agenda-row.is-key-reminder .agenda-dot { background: #9aa39d; box-shadow: 0 0 0 4px rgba(154, 163, 157, .14); }
.agenda-row.is-key-reminder .agenda-time,
.agenda-row.is-key-reminder .agenda-title { color: #303a34; }
.agenda-row.is-key-reminder .agenda-address { color: #4f5a54; }
.agenda-row.is-key-reminder .agenda-status { background: rgba(255,255,255,.88); color: #4f5a54; }
.agenda-row.is-key-appointment { background: #fffdf4; border-left-color: #e4b53c; }
.agenda-row.is-key-appointment .agenda-dot { background: #d7a72d; box-shadow: 0 0 0 4px rgba(228, 181, 60, .12); }
.agenda-row.is-key-appointment .agenda-time,
.agenda-row.is-key-appointment .agenda-title { color: #4b3a12; }
.agenda-row.is-key-appointment .agenda-address { color: #6f5a24; }
.agenda-row.is-key-appointment .agenda-status { background: #fff0b8; color: #80620e; }
.agenda-row.is-intro-meeting { background: #fffdf4; border-left-color: #e4b53c; }
.agenda-row.is-intro-meeting .agenda-dot { background: #d7a72d; box-shadow: 0 0 0 4px rgba(228, 181, 60, .12); }
.agenda-row.is-intro-meeting .agenda-time,
.agenda-row.is-intro-meeting .agenda-title { color: #4b3a12; }
.agenda-row.is-intro-meeting .agenda-address { color: #6f5a24; }
.agenda-row.is-intro-meeting .agenda-status { background: #fff0b8; color: #80620e; }
.agenda-row.is-free-appointment { background: #f7fcf8; border-left-color: #b9dfc2; }
.agenda-row.is-free-appointment .agenda-dot { background: #2b9a83; box-shadow: 0 0 0 4px rgba(43, 154, 131, .14); }
.agenda-row.is-free-appointment .agenda-time,
.agenda-row.is-free-appointment .agenda-title { color: #123f36; }
.agenda-row.is-free-appointment .agenda-address { color: #58736c; }
.agenda-row.is-free-appointment .agenda-status { background: #ddf5ef; color: #17705f; }
.agenda-row.is-done,
.agenda-row.is-free-appointment.is-done { background: #f7faf7; border-left-color: #b6d2bd; color: #607367; }
.agenda-row.is-event.is-done,
.agenda-row.is-key-reminder.is-done,
.agenda-row.is-key-appointment.is-done,
.agenda-row.is-intro-meeting.is-done { background: #f7f9f7; border-left-color: #c7d0ca; color: #303a34; }
.agenda-row.is-done .agenda-dot,
.agenda-row.is-free-appointment.is-done .agenda-dot { background: #8da18f; box-shadow: 0 0 0 4px rgba(47, 127, 57, .12); }
.agenda-row.is-event.is-done .agenda-dot,
.agenda-row.is-key-reminder.is-done .agenda-dot,
.agenda-row.is-key-appointment.is-done .agenda-dot,
.agenda-row.is-intro-meeting.is-done .agenda-dot { background: #9aa39d; box-shadow: 0 0 0 4px rgba(154, 163, 157, .14); }
.agenda-row.is-done .agenda-time,
.agenda-row.is-done .agenda-title,
.agenda-row.is-done .agenda-code,
.agenda-row.is-done .agenda-address { color: #718377; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(79, 90, 84, .5); }
.agenda-row.is-done .agenda-status { background: rgba(255,255,255,.78); color: #607367; }
.agenda-row.is-pending { background: #fffaf5; border-left-color: #f6a24a; }
.agenda-row.is-pending .agenda-dot { background: #f6a24a; box-shadow: 0 0 0 4px rgba(246, 162, 74, .18); }
.agenda-row.is-pending .agenda-time,
.agenda-row.is-pending .agenda-title { color: #5f341b; }
.agenda-row.is-pending .agenda-address { color: #9a4f1f; font-weight: 850; }
.agenda-row.is-pending .agenda-code { color: #b55325; }
.agenda-row.is-pending .agenda-status { background: var(--amber-bg); color: var(--amber); }
.agenda-pending-meta { color: #7f6250; font-size: 12px; line-height: 1.3; }
.agenda-row.is-outstanding-pending { position: relative; background: #fffaf5; border-left-color: #f2c28b; }
.agenda-row.is-outstanding-pending .agenda-dot { background: #f6a24a; box-shadow: 0 0 0 4px rgba(246, 162, 74, .18); }
.agenda-row.is-outstanding-pending .agenda-time,
.agenda-row.is-outstanding-pending .agenda-title { color: #5f341b; }
.agenda-row.is-outstanding-pending .agenda-address { color: #7d4b22; font-weight: 850; }
.agenda-row.is-outstanding-pending .agenda-code { color: #b55325; }
.agenda-row.is-outstanding-pending .agenda-pending-meta { color: #7f6250; }
.agenda-row.is-outstanding-pending .agenda-status { background: #ffe1c2; color: #9a4f1f; }

.tabs { position: fixed; left: 50%; bottom: 0; z-index: 50; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.98); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; backdrop-filter: blur(16px); box-shadow: 0 -8px 28px rgba(17, 24, 39, .08); overflow: visible; }
.tab { min-height: 58px; border: 0; border-radius: 12px; padding: 8px 3px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 850; line-height: 1.08; overflow-wrap: anywhere; }
.tab.active { color: var(--brand); background: var(--surface-2); }
.tab-icon { display: grid; place-items: center; height: 22px; font-size: 18px; line-height: 1; margin-bottom: 3px; }
.tab-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tab:nth-child(3) { position: relative; margin-top: -28px; color: var(--brand-dark); background: transparent; }
.tab:nth-child(3) .tab-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 4px; border-radius: 999px; background: linear-gradient(180deg, #3a9749, #276b30); color: #fff; box-shadow: 0 10px 24px rgba(39, 107, 48, .34); font-size: 34px; font-weight: 500; }
.tab:nth-child(3).active { background: transparent; }
.stat .stat-icon { color: var(--brand); font-size: 20px; font-weight: 900; }
.detail-panel { display: grid; gap: 12px; }
.detail-title { padding: 16px; }
.detail-title h2 { margin: 0; font-size: 22px; }
.detail-title p { margin: 6px 0 0; color: var(--muted); }
.detail-card { padding: 14px; }
.detail-card h3 { margin: 0 0 12px; font-size: 16px; color: var(--brand-dark); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-field { display: grid; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbf9; }
.detail-field-wide { grid-column: 1 / -1; }
.detail-field span { color: var(--muted); font-size: 12px; font-weight: 800; }
.detail-field strong,
.detail-field a { color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-field a { color: var(--brand); text-decoration: none; }
.detail-field a:active { color: var(--brand-dark); }
.notes { white-space: pre-wrap; color: #33403a; line-height: 1.45; }
.visits-head { margin-top: 8px; }
.visits-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.visits-table { width: 100%; min-width: 420px; border-collapse: collapse; }
.visits-table th,
.visits-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.visits-table th { color: var(--brand-dark); background: var(--surface-2); font-size: 13px; font-weight: 900; }
.visits-table td { color: #26332d; font-size: 14px; font-weight: 750; }
.visits-table tr:last-child td { border-bottom: 0; }
.visit-row-completed { background: #fafafa; }
.visit-row-completed td { color: #8a9298; }
.visit-row-completed td:nth-child(2),
.visit-row-completed td:nth-child(3) { text-decoration: line-through; }
.visit-date-cell { display: grid; gap: 4px; align-items: start; }
.visit-completed-badge { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 3px 7px; background: #eef0ee; color: #6b846f; font-size: 11px; font-weight: 900; text-decoration: none; }
.visit-time-select { width: 106px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--ink); background: #fff; font-weight: 850; }
.visit-time-select:focus { outline: 2px solid rgba(35, 110, 45, .16); border-color: var(--brand); }
.visit-time-picker { position: relative; width: 116px; overflow: visible; }
.visit-time-button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--ink); font-weight: 850; text-align: left; }
.visit-time-button:focus { outline: 2px solid rgba(35, 110, 45, .16); border-color: var(--brand); }
.visit-time-button.is-submitting { cursor: wait; color: var(--brand-dark); background: #f7fbf8; }
.visit-time-button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-time-caret { color: #69756d; font-size: 14px; font-weight: 950; line-height: 1; }
.visit-time-note { display: block; max-width: 150px; margin-top: 5px; color: #607068; font-size: 11px; font-weight: 750; line-height: 1.25; white-space: normal; }
.visit-time-note-flexible { max-width: 230px; font-weight: 650; }
.visit-time-note-flexible span { display: block; }
.visit-time-picker .sheet-time-menu { left: 0; top: calc(100% + 5px); width: 142px; max-height: 210px; padding: 5px; }
.visit-time-picker .sheet-time-option { min-height: 38px; font-size: 14px; }
.calendar-toolbar { display: grid; gap: 10px; margin: 0 0 12px; }
.calendar-nav { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 10px; align-items: center; }
.calendar-date-jump { font-size: 15px; text-transform: capitalize; }
.calendar-segment { position: relative; z-index: 30; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: -68px 0 10px; padding: 6px; border: 1px solid rgba(223, 231, 223, .9); border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: var(--soft-shadow); backdrop-filter: blur(14px); }
.calendar-view-button { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 7px; align-items: center; min-height: 46px; padding: 5px 7px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; }
.calendar-view-button:not(:last-child) { border-right: 1px solid var(--line); }
.calendar-view-button:active { transform: translateY(1px); background: #f8faf8; }
.calendar-view-button.active { background: #e6f5eb; box-shadow: inset 0 0 0 1px rgba(47, 127, 57, .24); }
.calendar-view-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: #edf6ef; color: var(--brand); }
.calendar-view-icon svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.calendar-view-button strong { min-width: 0; color: #17231d; font-size: 13px; line-height: 1.05; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-strip { --calendar-hour-height: 56px; isolation: isolate; display: grid; grid-template-columns: 54px repeat(var(--calendar-day-count), minmax(92px, 1fr)); grid-template-rows: 42px auto; max-height: calc(100dvh - 266px - env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 26px rgba(17, 24, 39, .06); }
.calendar-strip.is-view-day { grid-template-columns: 54px minmax(0, 1fr); }
.calendar-strip.is-view-3day { grid-template-columns: 54px repeat(3, minmax(0, 1fr)); }
.calendar-strip.is-view-week { grid-template-columns: 46px repeat(7, minmax(0, 1fr)); }
.calendar-time-head { position: sticky; left: 0; top: 0; z-index: 21; background: #f8fbf8; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day-head { position: sticky; top: 0; z-index: 20; display: grid; place-items: center; min-width: 0; padding: 4px 4px; border: 0; border-bottom: 1px solid var(--line); border-left: 1px solid #edf2ed; background: #f8fbf8; color: #26332d; }
.calendar-day-line { display: inline-grid; place-items: center; max-width: 100%; min-height: 26px; padding: 0 7px; border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 900; line-height: 1.05; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-day-head.is-today .calendar-day-line { background: #ffe2ec; color: #9f2c67; }
.calendar-day-head.is-selected { background: #edf6ef; }
.calendar-day-head.is-selected .calendar-day-line { background: var(--brand); color: #fff; }
.calendar-times { position: sticky; left: 0; z-index: 4; display: grid; grid-template-rows: repeat(24, var(--calendar-hour-height)); grid-column: 1; grid-row: 2; background: #fbfdfb; border-right: 1px solid var(--line); }
.calendar-times span { display: block; padding: 6px 8px 0 0; color: #5d6962; font-size: 11px; font-weight: 850; text-align: right; border-top: 1px solid #edf2ed; }
.calendar-day-column { position: relative; min-width: 0; min-height: 1344px; border-left: 1px solid #edf2ed; background-color: #fff; background-image: linear-gradient(to bottom, #edf2ed 1px, transparent 1px), linear-gradient(to bottom, #f4f7f4 1px, transparent 1px); background-size: 100% var(--calendar-hour-height), 100% calc(var(--calendar-hour-height) / 2); }
.calendar-day-column.is-today { background-color: #fbfefb; }
.calendar-hour-grid { display: none; }
.calendar-events-layer { position: relative; min-height: 1344px; padding: 0 3px; }
.calendar-event-position { position: absolute; left: 3px; right: 3px; min-height: 32px; z-index: 2; overflow: visible; }
.calendar-event-card { position: relative; display: grid; align-content: start; gap: 2px; height: 100%; min-height: 32px; overflow: visible; padding: 5px 6px; border: 1px solid #b9dfc2; border-radius: 8px; background: #dff3e5; color: #173d25; text-decoration: none; box-shadow: 0 2px 8px rgba(47, 127, 57, .12); }
.calendar-event-card[data-calendar-drag-visit-id] { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.calendar-event-card.is-calendar-dragging { z-index: 40; cursor: grabbing; opacity: .9; box-shadow: 0 14px 32px rgba(17, 24, 39, .24); }
.calendar-event-card strong { min-width: 0; font-size: 11px; font-weight: 950; line-height: 1.15; overflow: hidden; overflow-wrap: anywhere; }
.calendar-event-card small { color: #42634d; font-size: 10px; font-weight: 800; line-height: 1.15; overflow: hidden; overflow-wrap: anywhere; }
.calendar-event-card.is-half-hour { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; }
.calendar-event-card.is-half-hour .calendar-event-time { flex: 0 0 auto; font-size: 10px; line-height: 1; }
.calendar-event-card.is-half-hour strong { flex: 1 1 auto; min-width: 0; font-size: 10.5px; line-height: 1; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; overflow-wrap: normal; }
.calendar-event-card.is-half-hour small { display: none; }
.calendar-event-card.is-half-hour .calendar-event-status { display: inline-flex; }
.calendar-strip.is-view-day .calendar-event-card { gap: 3px; padding: 6px 7px; }
.calendar-strip.is-view-day .calendar-event-card strong { font-size: 12px; line-height: 1.12; }
.calendar-strip.is-view-day .calendar-event-card small { font-size: 10.5px; line-height: 1.12; }
.calendar-strip.is-view-day .calendar-event-time { font-size: 10.5px; }
.calendar-strip.is-view-day .calendar-event-card.is-half-hour { display: flex; align-items: center; gap: 6px; padding: 4px 8px; }
.calendar-strip.is-view-day .calendar-event-card.is-half-hour .calendar-event-time { font-size: 10px; }
.calendar-strip.is-view-day .calendar-event-card.is-half-hour strong { font-size: 10.5px; line-height: 1; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
.calendar-strip.is-view-3day .calendar-event-card small,
.calendar-strip.is-view-week .calendar-event-card small { display: none; }
.calendar-strip.is-view-week .calendar-day-line { min-height: 22px; padding: 0 3px; font-size: 9px; }
.calendar-strip.is-view-week .calendar-times span { padding-right: 4px; font-size: 9px; }
.calendar-strip.is-view-week .calendar-events-layer { padding: 0 1px; }
.calendar-strip.is-view-week .calendar-event-position { left: 1px; right: 1px; min-height: 28px; }
.calendar-strip.is-view-week .calendar-event-card { padding: 3px 3px; border-radius: 6px; }
.calendar-strip.is-view-week .calendar-event-card strong { font-size: 8.5px; line-height: 1.04; }
.calendar-strip.is-view-week .calendar-event-time { font-size: 8px; }
.calendar-event-time { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #2f6f3d; font-size: 10px; font-weight: 950; line-height: 1; }
.calendar-event-status { position: absolute; top: 4px; right: 5px; z-index: 8; display: inline-flex; max-width: none; padding: 2px 5px; border-radius: 999px; background: rgba(255,255,255,.78); color: #4f5a54; font-size: 8.5px; font-weight: 950; line-height: 1.1; text-align: right; white-space: nowrap; }
.calendar-event-check { flex: 0 0 auto; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 999px; background: #e7f3ec; color: var(--brand); font-size: 10px; font-weight: 950; line-height: 1; }
.calendar-event-card.is-event { border-color: #c7d0ca; background: #e7ece8; color: #303a34; box-shadow: 0 2px 8px rgba(79, 90, 84, .12); gap: 1px; padding: 18px 5px 4px; }
.calendar-event-card.is-event .calendar-event-time,
.calendar-event-card.is-event small { color: #4f5a54; }
.calendar-event-card.is-event .calendar-event-time { font-size: 9.5px; }
.calendar-event-card.is-event strong { display: -webkit-box; color: #303a34; font-size: 10px; line-height: 1.08; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.calendar-event-card.is-event .calendar-event-status { background: rgba(255,255,255,.88); color: #4f5a54; font-size: 8px; }
.calendar-event-card.is-event.is-half-hour strong { display: block; line-height: 1; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event-card.is-key-appointment,
.calendar-event-card.is-intro-meeting { border-color: #e4c85b; background: #fff8d8; color: #4b3a12; box-shadow: 0 2px 8px rgba(153, 118, 21, .10); }
.calendar-event-card.is-key-appointment .calendar-event-time,
.calendar-event-card.is-intro-meeting .calendar-event-time,
.calendar-event-card.is-key-appointment small,
.calendar-event-card.is-intro-meeting small { color: #6f5a24; }
.calendar-event-card.is-key-appointment strong,
.calendar-event-card.is-intro-meeting strong { color: #4b3a12; }
.calendar-event-card.is-key-appointment .calendar-event-status,
.calendar-event-card.is-intro-meeting .calendar-event-status { background: #fff0b8; color: #80620e; }
.calendar-event-card.is-key-reminder { border-color: #c7d0ca; background: #e7ece8; color: #303a34; }
.calendar-event-card.is-pending { border-color: #f2c28b; background: #fff3e6; color: #5f341b; box-shadow: 0 2px 8px rgba(181, 83, 37, .12); }
.calendar-event-card.is-pending .calendar-event-time,
.calendar-event-card.is-pending small { color: #7d4b22; }
.calendar-event-card.is-pending .calendar-event-status { background: #ffe1c2; color: #9a4f1f; }
.calendar-event-card.is-outstanding-pending { border-color: #f2c28b; background: #fff3e6; color: #5f341b; box-shadow: 0 2px 8px rgba(181, 83, 37, .12); padding-top: 20px; }
.calendar-event-card.is-outstanding-pending .calendar-event-time,
.calendar-event-card.is-outstanding-pending small { color: #7d4b22; }
.calendar-strip.is-view-3day .calendar-event-card.is-event,
.calendar-strip.is-view-week .calendar-event-card.is-event { padding: 5px 5px 4px; }
.calendar-strip.is-view-3day .calendar-event-card.is-outstanding-pending,
.calendar-strip.is-view-week .calendar-event-card.is-outstanding-pending { padding-top: 5px; }
.calendar-strip.is-view-week .calendar-event-card { align-content: center; }
.calendar-event-card.is-done { border-color: #b6d2bd; background: #d8e9dd; color: #607367; box-shadow: none; }
.calendar-event-card.is-done .calendar-event-time { color: #6e8275; }
.calendar-event-card.is-done strong,
.calendar-event-card.is-done small { color: #718377; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(79, 90, 84, .5); }
.calendar-event-card.is-event.is-done { border-color: #c7d0ca; background: #e7ece8; color: #303a34; }
.calendar-event-card.is-event.is-done .calendar-event-time,
.calendar-event-card.is-event.is-done small { color: #4f5a54; }
.calendar-event-card.is-event.is-done strong { color: #4f5a54; text-decoration-color: rgba(79, 90, 84, .5); }
.calendar-empty-day { position: absolute; top: 9px; left: 8px; right: 8px; color: #9aa39d; font-size: 12px; font-weight: 850; text-align: center; }
.calendar-time-dialog { gap: 12px; }
.calendar-time-options { display: grid; gap: 8px; }
.calendar-time-options .sheet-action { min-height: 58px; }
.calendar-time-dialog .confirm-actions { grid-template-columns: 1fr; }
.calendar-import-note { display: none; gap: 5px; margin: 12px 0 4px; padding: 12px; border: 1px solid rgba(37, 95, 145, .18); border-radius: 8px; background: #f2f8ff; }
.calendar-import-note strong { color: #255f91; font-size: 13px; font-weight: 950; }
.calendar-import-note p { margin: 0; color: #38556d; font-size: 12px; font-weight: 750; line-height: 1.35; }
.calendar-import-note + .visits-head,
.calendar-import-note + .visits-head + .agenda { display: none; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { min-height: 156px; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.day strong { display: block; font-size: 13px; margin-bottom: 8px; }
.event { display: block; margin: 6px 0; padding: 7px; border-radius: 8px; background: var(--surface-2); color: var(--brand-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.profile-card { padding: 16px; display: grid; gap: 12px; }
.profile-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-row span { color: var(--muted); }
@media (max-width: 430px) {
  .stats { gap: 3px; margin-top: -44px; padding: 7px; }
  .stat { grid-template-columns: 30px minmax(0, 1fr); justify-items: stretch; min-height: 58px; text-align: left; padding: 7px 5px; column-gap: 6px; }
  .stat-icon { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 10px; }
  .stat-icon svg { width: 18px; height: 18px; }
  .stat strong { font-size: 25px; }
  .stat > span:not(.stat-icon) { font-size: 9.5px; margin-top: 2px; max-width: none; line-height: 1.08; }
  .app-header { min-height: 174px; padding-left: 18px; padding-right: 18px; padding-bottom: 70px; }
  .header-row { min-height: 62px; }
  .header-brand { padding-right: 98px; }
  .header-logo { top: -5px; width: 88px; height: 88px; }
  .header-title h1 { font-size: 20px; }
  .content { padding-left: 12px; padding-right: 12px; }
  .confirm-dialog { width: min(390px, calc(100% - 24px)); padding: 16px; border-radius: 14px; }
  .confirm-copy h2 { font-size: 18px; }
  .confirm-actions { grid-template-columns: 1fr; }
  .schedule-head { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .schedule-nav { justify-items: stretch; }
  .date-picker { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .date-nav-btn { width: 40px; height: 40px; }
  .today-btn { min-height: 40px; }
  .calendar-toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .calendar-nav { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .calendar-segment { gap: 2px; margin: -64px 0 9px; padding: 6px; }
  .calendar-view-button { grid-template-columns: 27px minmax(0, 1fr); min-height: 44px; padding: 5px 5px; column-gap: 5px; }
  .calendar-view-icon { width: 27px; height: 27px; border-radius: 9px; }
  .calendar-view-icon svg { width: 15px; height: 15px; }
  .calendar-view-button strong { font-size: 11px; }
  .calendar-strip { --calendar-hour-height: 52px; grid-template-columns: 46px repeat(var(--calendar-day-count), minmax(86px, 1fr)); grid-template-rows: 40px auto; max-height: calc(100dvh - 258px - env(safe-area-inset-bottom)); }
  .calendar-strip.is-view-day { grid-template-columns: 46px minmax(0, 1fr); }
  .calendar-strip.is-view-3day { grid-template-columns: 46px repeat(3, minmax(0, 1fr)); }
  .calendar-strip.is-view-week { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); }
  .calendar-times span { padding-right: 5px; font-size: 10px; }
  .calendar-day-head { min-width: 0; padding: 3px 2px; }
  .calendar-day-line { min-height: 24px; padding: 0 5px; font-size: 10px; }
  .calendar-strip.is-view-day .calendar-day-line { font-size: 11px; }
  .calendar-strip.is-view-week .calendar-day-line { min-height: 22px; padding: 0 2px; font-size: 8.5px; }
  .calendar-strip.is-view-week .calendar-times span { padding-right: 3px; font-size: 8.5px; }
  .calendar-strip.is-view-week .calendar-event-card { padding: 2px 2px; }
  .calendar-strip.is-view-week .calendar-event-card strong { font-size: 8px; }
  .calendar-strip.is-view-week .calendar-event-time { font-size: 7.5px; }
  .calendar-day-column { min-width: 0; min-height: 1248px; }
  .calendar-events-layer { min-height: 1248px; }
  .calendar-event-card { padding: 5px 6px; }
  .calendar-event-card strong { font-size: 10.5px; }
  .calendar-event-card small { display: none; }
  .calendar-strip.is-view-day .calendar-event-card { padding: 5px 6px; }
  .calendar-strip.is-view-day .calendar-event-card strong { font-size: 10.5px; }
  .calendar-strip.is-view-day .calendar-event-card small { display: block; font-size: 9.5px; }
  .calendar-strip.is-view-day .calendar-event-time { font-size: 10px; }
  .agenda-count { text-align: left; }
  .agenda-row { grid-template-columns: 12px minmax(0, 1fr); gap: 8px; padding: 14px 36px 14px 10px; }
  .agenda-time { font-size: 14px; }
  .agenda-title { font-size: 14px; }
  .agenda-status { font-size: 10.5px; }
  .job-card.is-pending-request .job-top { display: flex; }
  .job-card.is-pending-request .badge { justify-self: start; white-space: normal; line-height: 1.15; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-field-wide { grid-column: auto; }
  .bottom-sheet { max-height: 88vh; padding-left: 12px; padding-right: 12px; }
  .sheet-head h2 { font-size: 17px; }
  .history-summary { grid-template-columns: 1fr; }
  .history-overview { padding: 10px; }
  .history-overview-money { grid-template-columns: 1fr; }
  .history-overview-money div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .history-overview-money span { font-size: 10px; }
  .history-overview-money strong { font-size: 12px; text-align: right; }
  .history-totals-row { grid-template-columns: minmax(82px, 1.1fr) repeat(3, minmax(50px, 1fr)); }
  .history-totals-row > div { padding: 8px 5px; }
  .history-totals-row span { font-size: 8.5px; line-height: 1.1; }
  .history-totals-row strong { font-size: 10.5px; }
  .booking-segment button { min-height: 38px; font-size: 12px; }
  .visits-table { min-width: 0; }
  .visits-table th,
  .visits-table td { padding: 10px 8px; font-size: 12px; white-space: normal; }
  .visit-time-select { width: 92px; min-height: 34px; padding: 5px 6px; font-size: 12px; }
}

/* Post-appointment response in the existing home pending-work panel. */
.intro-followup-card { display: block; }
.intro-followup-card fieldset { border: 0; padding: 0; margin: 12px 0; }
.intro-followup-card legend { font-weight: 700; margin-bottom: 8px; }
.intro-followup-card label { display: block; margin: 10px 0; }
.intro-followup-card input[type="radio"] { width: auto; margin-right: 7px; accent-color: #2f7f39; }
.intro-followup-card textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; }
.intro-followup-card button[type="submit"] { width: 100%; background: #2f7f39; color: #fff; border: 0; border-radius: 10px; padding: 12px; font: inherit; font-weight: 700; }
.intro-followup-card button:disabled { opacity: .6; }
.intro-followup-error { color: #b80f56; }

.header-notification-row { display: flex; align-items: center; gap: 16px; margin-bottom: 5px; }
.header-notification-row .eyebrow { margin: 0; }
.notification-bell { position: relative; display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 6px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: white; background: rgba(255,255,255,.12); cursor: pointer; }
.notification-bell svg { width: 22px; height: 22px; }
.notification-bell[aria-pressed="true"] { background: rgba(255,255,255,.28); }
.notification-bell:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.notification-count { position: absolute; top: -5px; right: -7px; min-width: 18px; padding: 1px 4px; border-radius: 10px; background: #b80f56; color: white; font-size: 11px; font-weight: 700; }
.notification-count[hidden] { display: none; }
.reminder-notifications { display: grid; gap: 14px; }
.reminder-notifications h2 { margin: 0; font-size: 20px; }
.reminder-notification h3 { margin: 0; font-size: 16px; line-height: 1.5; }
.reminder-notification p { margin: 0; color: var(--muted); line-height: 1.5; }
.reminder-notification .btn { min-height: 44px; padding: 10px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand-dark); background: #e7f3ec; border: 1px solid #cce4d1; }
