:root {
  --ink: #27201f;
  --muted: #766d66;
  --line: #e8e0d5;
  --surface: #ffffff;
  --surface-muted: #f7f2eb;
  --canvas: #faf6f0;
  --brand: #44224f;
  --brand-dark: #2e1538;
  --brand-soft: #f1e9f3;
  --accent: #44224f;
  --taupe: #9a8274;
  --gold: #b08a4c;
  --gold-deep: #86672f;
  --gold-soft: #f6ecd8;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sidebar: 236px;
  --amber: #9a620f;
  --amber-soft: #fff4dc;
  --green: #287653;
  --green-soft: #e4f4ec;
  --blue: #41689a;
  --blue-soft: #eaf0f8;
  --red: #ad493f;
  --red-soft: #fbe9e6;
  --demo-bg: #fff7e8;
  --demo-fg: #6b4d10;
  --demo-border: #f1d99b;
  --status-dot: 8px;
  --shadow: 0 1px 2px rgba(60,40,30,.04), 0 6px 18px rgba(60,40,30,.05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { background: var(--canvas); }
button, input, textarea { font: inherit; }
button { min-width: 44px; min-height: 44px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(81,27,101,.25); outline-offset: 2px; }

.app-shell { min-height: 100dvh; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-inner { max-width: 1180px; margin: 0 auto; min-height: 64px; padding: 9px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: white; font-family: Georgia, serif; font-weight: 700; letter-spacing: -.04em; }
.brand-copy { min-width: 0; }
.brand-name { margin: 0; color: var(--brand); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.prototype-label { font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.role-button { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 9px; padding: 8px 11px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; }
.role-button:hover { box-shadow: var(--shadow); }

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 32px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(26px, 7vw, 36px); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.025em; text-wrap: balance; }
h3 { margin-bottom: 5px; font-size: 17px; }
.eyebrow { margin-bottom: 7px; color: var(--brand); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); text-wrap: pretty; }
.small { font-size: 13px; }

.demo-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 8px 12px; background: var(--demo-bg); border: 1px solid var(--demo-border); color: var(--demo-fg); border-radius: 12px; font-size: 12px; font-weight: 750; }
.demo-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 14px; background: #eef4f1; border: 1px solid #cadbd4; border-radius: 15px; font-size: 13px; color: #355c50; }
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(216,111,69,.14); flex: 0 0 auto; }
.release-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 12px 14px; background: linear-gradient(135deg, #183f35, #286553); border-radius: 15px; color: white; font-size: 13px; box-shadow: var(--shadow); }
.release-banner.compact { background: var(--demo-bg); color: var(--demo-fg); border: 1px solid var(--demo-border); box-shadow: none; }
.release-pill { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #f2b68e; color: #55301e; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.membership-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 15px; border: 1px solid #bad0c7; border-radius: 18px; background: #edf6f2; }
.membership-card h2, .membership-card p { margin-bottom: 3px; }
.scope-chip { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: white; color: var(--brand); border: 1px solid #c8ddd4; font-size: 11px; font-weight: 850; }
.capability-preview { margin-top: 12px; padding-top: 11px; border-top: 1px solid #c8ddd4; }
.capability-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 7px; }
.capability-list span { padding: 5px 8px; border-radius: 999px; background: white; border: 1px solid #c8ddd4; color: var(--brand); font-size: 11px; font-weight: 800; }

.staff-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.staff-session-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.staff-session-name { margin: 0; font-weight: 800; letter-spacing: -.01em; }
.status-dot { width: var(--status-dot); height: var(--status-dot); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(40,118,83,.16); flex: 0 0 auto; }
.today-dashboard { display: grid; align-content: start; }
.today-welcome { margin-bottom: 16px; }
.today-greeting { margin-bottom: 7px; font-size: clamp(26px, 7vw, 36px); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.today-welcome p:last-child { margin-bottom: 0; }
.today-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 2px 0 18px; }
.today-status-tile { min-width: 0; min-height: 96px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; box-shadow: var(--shadow); cursor: pointer; }
.today-status-tile:hover { border-color: #d3c6d7; transform: translateY(-1px); }
.today-status-icon { grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 15px; font-weight: 900; }
.today-status-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.today-status-value { align-self: end; font-size: 25px; line-height: 1; font-weight: 850; letter-spacing: -.03em; }
.today-status-label { align-self: start; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.2; }
.today-status-tile.tone-coral .today-status-icon { background: var(--red-soft); color: var(--red); }
.today-status-tile.tone-green .today-status-icon { background: var(--green-soft); color: var(--green); }
.today-status-tile.tone-amber .today-status-icon { background: var(--amber-soft); color: var(--amber); }
.recent-activity { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.activity-row { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row p, .activity-row small { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.activity-row small { display: block; }
.activity-marker { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); }
.activity-marker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.activity-empty { border: 0; border-radius: 0; }
.customer-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.customer-summary > div { min-width: 0; }
.customer-summary > div strong { display: block; font-size: 18px; margin-top: 2px; }
.customer-summary > span { color: var(--brand); font-size: 24px; }
.manager-work { display: grid; gap: 8px; min-width: 0; }
.manager-column { min-width: 0; }
.manager-column > .section-heading { margin-top: 4px; }
.manager-list { display: grid; gap: 10px; }
.manager-job { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.manager-job .eyebrow { margin-bottom: 4px; overflow-wrap: anywhere; }
.manager-job h3 { margin-bottom: 8px; overflow-wrap: anywhere; }
.manager-job-next { margin: 0 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.manager-job-coverage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manager-job-coverage dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.manager-job-coverage dd { margin: 3px 0 0; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.manager-job-coverage dd.unassigned { color: var(--muted); font-weight: 650; font-style: italic; }
.manager-job-issues { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 750; }
.manager-job-issues.attention { color: var(--red); }
.manager-issue { width: 100%; min-width: 0; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; box-shadow: var(--shadow); cursor: pointer; }
.manager-issue-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.manager-issue-top strong { min-width: 0; overflow-wrap: anywhere; }
.manager-issue .work-card-next { margin-top: 8px !important; }
.manager-customer-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }

.next-action-card { margin-bottom: 14px; border-left: 3px solid var(--brand); }
.button[data-action="open-job-form"] + .customer-job-card { margin-top: 14px; }
.next-action-card h2 { font-size: 20px; }
.context-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 2px; color: var(--muted); font-size: 12px; font-weight: 750; }
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.summary-card { min-width: 0; padding: 13px 8px; border: 1px solid var(--line); border-radius: 16px; background: white; text-align: center; }
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { font-size: 24px; color: var(--brand); }
.summary-card span { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 750; }
.space-card, .customer-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.space-card p, .space-card h3, .customer-card p, .customer-card h3 { margin-bottom: 3px; }
.customer-list { margin: 12px 0 16px; }
.customer-card > span { color: var(--brand); font-size: 24px; }
.customer-empty { margin-top: 18px; }
.jobs-directory-header { margin-bottom: 18px; }
.jobs-directory-header h1 { margin: 2px 0 6px; }
.jobs-directory-search { display: block; margin-bottom: 20px; }
.jobs-directory-list { display: grid; gap: 10px; }
.jobs-directory-row { width: 100%; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.jobs-directory-row[hidden] { display: none; }
.jobs-directory-copy { min-width: 0; display: grid; gap: 3px; }
.jobs-directory-copy strong { font-size: 17px; line-height: 1.25; }
.jobs-directory-copy .eyebrow, .jobs-directory-copy .muted { overflow-wrap: anywhere; }
.jobs-directory-side { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--brand); font-size: 22px; }
.jobs-directory-inactive { margin-top: 20px; }
.jobs-directory-inactive summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 800; cursor: pointer; }
.jobs-directory-no-results { margin-top: 12px; }
.jobs-directory-no-results[hidden] { display: none; }
.space-card-side { display: flex; align-items: center; gap: 8px; font-size: 22px; }
.v11-module-list { margin-top: 14px; }
.linked-count { margin: 18px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 0 0 22px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 14px; min-width: 0; box-shadow: var(--shadow); }
.metric-value { display: block; font-size: 28px; line-height: 1; font-weight: 850; letter-spacing: -.04em; }
.metric-label { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.2; }
.metric.attention { background: var(--amber-soft); border-color: #efd8ad; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 22px 0 11px; }
.section-heading h2 { margin: 0; }
.stack { display: grid; gap: 12px; }
.job-space-list { margin-top: 14px; }
.swipe-row { position: relative; min-width: 0; overflow: hidden; border-radius: 11px; background: #b22b2b; }
.swipe-content { position: relative; z-index: 2; touch-action: pan-y; transition: transform .18s ease; }
.swipe-row.revealed .swipe-content { transform: translateX(-88px); }
.swipe-row.revealed .swipe-delete { z-index: 3; }
.swipe-delete { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 88px; min-height: 100%; border: 0; background: #b22b2b; color: white; display: grid; place-content: center; justify-items: center; gap: 3px; font-size: 12px; font-weight: 850; cursor: pointer; }
.trash-icon { font-size: 24px; line-height: 1; }
.item-card { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: white; color: var(--ink); text-align: left; box-shadow: var(--shadow); cursor: pointer; }
.item-card:hover { transform: translateY(-1px); }
.item-card-top, .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-card p { margin: 4px 0 0; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 650; }
.work-queue { margin-top: 22px; }
.work-queue + .work-queue { padding-top: 4px; }
.work-card-context { margin-top: 10px !important; color: var(--ink); font-size: 13px; font-weight: 750; }
.work-card-next { display: flex; align-items: center; min-height: 44px; margin-top: 12px !important; padding: 0 12px; border: 1px solid #d9c4df; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 850; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; gap: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--blue-soft); color: var(--blue); }
.status::before { content: ""; width: var(--status-dot); height: var(--status-dot); border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 auto; }
.status[data-status="Awaiting material"] { background: var(--amber-soft); color: var(--amber); }
.status[data-status="Ready for visit"] { background: var(--green-soft); color: var(--green); }
.status[data-status="Work completed"] { background: var(--brand-soft); color: var(--brand); }
.status[data-status="Closed"] { background: #e8ebe9; color: #4d5853; }

.button { border: 0; border-radius: 9px; padding: 11px 16px; background: var(--brand); color: white; font-weight: 800; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.accent { background: var(--brand); }
.button.accent:hover { background: var(--brand-dark); }
.button.ghost { background: transparent; color: var(--brand); }
.button.danger { background: var(--red); }
.button.danger-outline { background: white; color: var(--red); border: 1px solid #d8a8a3; }
.button.full { width: 100%; margin-top: 10px; }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.detail-danger-zone { margin-top: 28px; padding: 16px; border: 1px solid #ebc4c0; border-radius: 17px; background: var(--red-soft); }
.detail-danger-zone p { margin-bottom: 3px; }
.danger-text { color: var(--red); }

.detail-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.back-button { border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); font-size: 20px; }
.detail-grid { display: grid; gap: 14px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 16px; box-shadow: var(--shadow); }
.definition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.definition-grid dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.definition-grid dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.covered-spaces { grid-column: 1 / -1; }
.covered-space-actions { display: grid; gap: 7px; margin-top: 9px; }
.covered-space-button { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 1px solid #c8ddd4; border-radius: 12px; background: #edf6f2; color: var(--brand-dark); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.covered-space-button:hover { background: #e1f0ea; }
.progress-track { height: 8px; border-radius: 999px; background: #e7ece9; overflow: hidden; margin: 14px 0 5px; }
.progress-fill { height: 100%; background: var(--brand); border-radius: inherit; }
.checks { display: grid; gap: 8px; margin-top: 12px; }
.check { display: flex; gap: 9px; align-items: center; font-size: 13px; }
.check-icon { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 900; }
.check-icon.pending { background: #ecefed; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 14px 0 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px white; }
.timeline strong, .timeline span { display: block; }
.timeline span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.timeline li + li::before { background: white; border: 2px solid var(--brand); box-sizing: border-box; }

.hub-header, .exception-hero { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.hub-header .detail-header, .exception-hero .detail-header { margin-bottom: 0; align-items: flex-start; }
.hub-header h1, .exception-hero h1 { margin-bottom: 0; font-size: clamp(24px, 6.4vw, 32px); }
.hub-header-meta, .exception-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0 54px; }
.exception-hero-meta .muted { margin: 0; overflow-wrap: anywhere; }
.hub-stage { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.hub-stage::before { content: ""; width: var(--status-dot); height: var(--status-dot); border-radius: 50%; background: currentColor; }
.hub-stage.inactive { background: #ecebed; color: #5c5560; }
.hub-glance { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 14px; }
.hub-glance-tile { min-width: 0; display: grid; align-content: start; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.hub-glance-value { font-size: 24px; line-height: 1; font-weight: 850; letter-spacing: -.03em; color: var(--brand); }
.hub-glance-label { color: var(--ink); font-size: 12px; font-weight: 750; line-height: 1.2; }
.hub-glance-meta { color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.2; }
.hub-next-action { background: var(--brand); border-color: var(--brand); color: white; }
.hub-next-action .eyebrow { color: rgba(255,255,255,.78); }
.hub-next-action .muted { color: rgba(255,255,255,.82); margin-bottom: 0; }
.hub-next-action .button.secondary { background: white; color: var(--brand); border-color: white; }
.hub-columns, .hub-primary, .hub-secondary { display: grid; gap: 14px; align-content: start; min-width: 0; }
.hub-primary > .section-heading { margin: 8px 0 0; }
.hub-primary > .button.full, .hub-primary > .job-space-list { margin-top: 0; }
.job-next-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid #dccbe2; border-left: 4px solid var(--brand); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.job-next-action > div { display: grid; gap: 2px; min-width: 0; }
.job-next-action .eyebrow { margin: 0; }
.job-next-action strong { overflow-wrap: anywhere; }
.job-next-action .button { flex: none; min-height: 44px; margin: 0; }
.job-work-section { display: grid; gap: 10px; min-width: 0; }
.job-work-section > .section-heading { margin: 0; }
.job-work-section > .button { margin: 0; }
.job-work-card { margin: 0; }
.job-current-plan-copy { display: grid; gap: 5px; margin-top: 12px; }
.job-current-plan-copy .status { justify-self: start; }
.job-current-plan-copy .muted { margin: 0; }
.job-current-plan-actions, .job-plan-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.job-current-plan-actions .button, .job-plan-controls .button { min-width: 0; min-height: 44px; margin: 0; text-align: center; }
.job-plan-controls .button:only-child { grid-column: 1 / -1; }
.job-files-manager { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.job-files-manager > .section-heading { margin: 0; }
.installation-summary { display: grid; gap: 3px; margin: 10px 0; color: var(--muted); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.exception-lead { display: grid; gap: 14px; margin-bottom: 14px; }
.exception-summary-line { margin-bottom: 6px; font-weight: 800; }
.exception-summary-note { margin-bottom: 0; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
.exception-next-step { border-color: #dccbe2; border-left: 4px solid var(--brand); background: var(--brand-soft); }
.exception-next-step h2 { margin-bottom: 0; }
.exception-next-step .actions { margin-top: 12px; }
.exception-next-step .actions:empty { display: none; }
.exception-next-step .actions .button { width: 100%; min-height: 48px; }
.exception-next-step.waiting { background: white; border-left-color: var(--taupe); }
.hub-header-meta .muted { margin: 0; overflow-wrap: anywhere; }
.hub-space-type { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0; }
.hub-header > .button.full { margin-top: 12px; }
.space-next-title { margin-bottom: 4px; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.space-next-action > .button { min-height: 48px; background: white; color: var(--brand); }
.space-next-action > .button:hover { background: var(--brand-soft); }
.space-next-action.waiting { background: white; border-color: var(--line); border-left-color: var(--taupe); color: var(--ink); }
.space-next-action.waiting .eyebrow { color: var(--brand); }
.space-next-action.waiting .muted { color: var(--muted); }
.space-group { display: grid; gap: 14px; align-content: start; min-width: 0; }
.space-group > .section-heading { margin: 8px 0 0; }
.space-group > .button.full, .space-group > .v11-module-list { margin-top: 0; }
.space-group > .linked-count { margin: 0; }
.room-header .hub-header-meta { margin: 10px 0 0; justify-content: space-between; }
.room-header-edit { min-height: 44px; padding: 9px 12px; font-size: 13px; }
.room-layout { display: grid; gap: 14px; align-items: start; }
.room-workspace, .room-details { display: grid; gap: 10px; align-content: start; min-width: 0; }
.room-details { gap: 14px; }
.room-details .panel h2 { margin-bottom: 0; }
.room-task { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--brand-soft); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.room-task.attention { border-color: #ebc4c0; border-left-color: var(--red); background: var(--red-soft); }
.room-task-title { margin: 0; font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.room-task-summary { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.room-task.attention .room-task-summary { color: var(--red); font-weight: 800; }
.room-task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.room-task-actions .button { flex: 1 1 auto; min-height: 44px; margin: 0; }
.room-task > .panel { box-shadow: none; }
.preview-banner { display: flex; flex-wrap: wrap; gap: 2px 8px; width: min(100% - 32px, 1124px); margin: 12px auto 0; padding: 10px 14px; border: 1px dashed var(--demo-border); border-radius: 11px; background: var(--demo-bg); color: var(--demo-fg); font-size: 13px; }
.more-page h1 { margin-bottom: 14px; }
.more-menu, .preview-tools { display: grid; gap: 8px; max-width: 640px; }
.more-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label chevron" "description chevron"; align-items: center; column-gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.more-row:hover { border-color: #d7c6dc; background: var(--surface-muted); }
.more-row-label { grid-area: label; font-weight: 800; }
.more-row-description { grid-area: description; color: var(--muted); font-size: 12px; font-weight: 600; }
.more-row-chevron { grid-area: chevron; color: var(--muted); font-size: 22px; }
.preview-tools { margin-top: 24px; padding: 14px; border: 1px dashed var(--demo-border); border-radius: 12px; background: var(--demo-bg); }
.preview-tools .eyebrow { color: var(--demo-fg); }
.preview-tools .muted { margin: 0 0 4px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.topbar-search { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--brand); font-size: 11px; font-weight: 800; }
.topbar-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

@media (max-width: 380px) {
  .topbar-search > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .job-next-action { align-items: stretch; flex-direction: column; }
  .job-current-plan-actions, .job-plan-controls { grid-template-columns: 1fr; }
}

.bottom-nav { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; min-height: 68px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 2px; box-shadow: 0 -4px 18px rgba(43,24,50,.05); }
.nav-button { flex: 1; max-width: 180px; border: 0; border-radius: 9px; background: transparent; color: #817982; padding: 6px 5px; font-size: 10px; font-weight: 750; }
.nav-button[hidden] { display: none; }
.nav-button.active { background: transparent; color: var(--brand); }
.nav-icon { display: grid; place-items: center; height: 24px; margin-bottom: 1px; }
.nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.notification { display: flex; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: white; }
.notification-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--accent); flex: 0 0 auto; }

.sheet { position: fixed; inset: auto; top: var(--keyboard-safe-center-y, 50dvh); left: 50%; transform: translate(-50%, -50%); margin: 0; width: min(100% - 20px, 500px); max-height: calc(var(--keyboard-safe-height, 100dvh) - 20px); overflow-y: auto; border: 0; border-radius: 18px; padding: 20px; color: var(--ink); box-shadow: 0 24px 80px rgba(28,14,34,.28); }
.sheet::backdrop { background: rgba(35,20,40,.6); backdrop-filter: blur(3px); }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: #d6ddda; margin: -7px auto 18px; }
.role-options button { border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; padding: 12px 15px; font-weight: 800; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px; color: var(--ink); background: white; border: 1px solid #cfc7d1; border-radius: 9px; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #b9aabd; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(81,27,101,.08); }
.field textarea { min-height: 92px; resize: vertical; }
.form-sheet-header { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.form-sheet-header h2 { margin-bottom: 5px; }
.form-sheet-header p:last-child { margin-bottom: 0; font-size: 13px; line-height: 1.45; }
.form-sheet-icon, .file-acquisition-icon { display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); }
.form-sheet-icon { width: 42px; height: 42px; border-radius: 11px; }
.form-sheet-icon svg, .file-acquisition-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.form-sheet-group { min-width: 0; margin: 0 0 14px; padding: 4px 14px 2px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.form-sheet-group legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.form-sheet-group .field { margin: 12px 0; }
.form-sheet-actions { display: grid; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-sheet-actions .button { margin-top: 0; min-height: 48px; }
.type-guidance { margin: 14px 0 4px; padding: 12px; border-radius: 12px; background: #f2f5f3; font-size: 13px; }
.direct-schedule { margin: 18px 0; padding: 12px; border: 1px solid #b9cfc5; border-radius: 16px; background: #edf6f1; }
.direct-schedule-toggle { margin: 0; border: 0; background: transparent; padding: 4px; }
.direct-schedule-toggle small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.direct-schedule [hidden] { display: none; }
.measurement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet:has(.measurement-worksheet) { width: min(100% - 20px, 780px); padding-bottom: 0; }
.measurement-worksheet-unit { margin: 0 0 10px; }
.measurement-worksheet-references { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.measurement-worksheet-references .button { margin: 0; min-height: 44px; }
.measurement-rows { display: grid; gap: 10px; }
.measurement-row { padding: 10px 12px 4px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; background: white; }
.measurement-row[data-row-state="draft"], .measurement-row[data-row-state="changed"] { border-left-color: var(--amber); background: var(--amber-soft); }
.measurement-row[data-row-state="empty"] { border-left-color: var(--brand-soft); }
.measurement-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.measurement-row-number { color: var(--muted); font-size: 12px; font-weight: 850; }
.measurement-row-chip { padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 800; }
.measurement-row[data-row-state="draft"] .measurement-row-chip, .measurement-row[data-row-state="changed"] .measurement-row-chip { background: white; color: var(--amber); }
.measurement-row[data-row-state="empty"] .measurement-row-chip { background: var(--surface-muted); color: var(--muted); }
.measurement-row-fields { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 0 10px; }
.measurement-row-fields .field { margin: 8px 0; min-width: 0; }
.measurement-row-label { grid-column: 1 / -1; }
.measurement-row-fields input { scroll-margin: 90px 0 150px; }
.measurement-row-hint, .measurement-row-error { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.measurement-row-hint { color: var(--green); }
.measurement-row-hint:empty { display: none; }
.measurement-row-error { color: var(--red); }
.measurement-add-row { margin-top: 12px; min-height: 48px; }
.measurement-worksheet-actions { position: sticky; bottom: 0; z-index: 1; display: grid; gap: 8px; margin: 14px -20px 0; padding: 12px 20px 16px; background: white; border-top: 1px solid var(--line); }
.measurement-worksheet-actions .button { margin: 0; min-height: 48px; }
.measurement-worksheet-status { margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.measurement-worksheet-status[data-tone="draft"] { color: var(--amber); }
.measurement-worksheet-status[data-tone="saving"] { color: var(--blue); }
.measurement-worksheet-status[data-tone="saved"] { color: var(--green); }
.measurement-worksheet-status[data-tone="error"] { color: var(--red); }
.room-task-draft { margin: 4px 0 0; color: var(--amber); font-size: 13px; font-weight: 800; }
@media (min-width: 720px) {
  .jobs-directory-header, .jobs-directory-search { max-width: 680px; }
  .jobs-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .measurement-row-fields { grid-template-columns: minmax(0, 1fr) 180px 92px; }
  .measurement-row-label { grid-column: auto; }
  .measurement-worksheet-actions { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .measurement-worksheet-actions .button { width: auto; padding-inline: 22px; }
}
@media (max-width: 380px) { .measurement-grid { grid-template-columns: 1fr; gap: 0; } }
.evidence-button.attached { background: var(--green-soft); color: var(--green); border: 1px solid #b9dec7; }
.photo-gallery { display: grid; gap: 12px; }
.photo-card { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.photo-card:has(> .check-icon) { grid-template-columns: auto 1fr; }
.stored-photo, .photo-preview img { display: block; width: 100%; height: auto; max-height: 240px; object-fit: cover; border-radius: 10px; background: var(--surface-muted); }
.photo-copy { display: grid; gap: 3px; }
.photo-copy small { display: block; }
.file-input-button { position: relative; overflow: hidden; display: block; }
.file-input-button > input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  background: transparent;
  border: 0;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
  opacity: 0;
}
.file-input-button > *:not(input) { pointer-events: none; }
.file-acquisition-tile { min-height: 96px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 13px; padding: 15px; border: 1.5px dashed #b9aabd; border-radius: 11px; background: var(--surface-muted); color: var(--ink); cursor: pointer; }
.file-acquisition-tile:hover { border-color: var(--brand); background: var(--brand-soft); }
.file-acquisition-icon { width: 46px; height: 46px; border-radius: 12px; background: white; border: 1px solid #ddcfdf; }
.file-acquisition-tile strong, .file-acquisition-tile small { display: block; }
.file-acquisition-tile strong { color: var(--brand); font-size: 15px; }
.file-acquisition-tile small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.35; }
.photo-preview { display: grid; gap: 8px; margin: 12px 0; }
.photo-preview[hidden] { display: none; }
@media (max-width: 380px) { .photo-card { grid-template-columns: 82px 1fr; } }
.photo-card .photo-annotate-button { margin-top: 6px; }
.photo-card .annotation-badge { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 0.78rem; font-weight: 600; }
.annotation-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); overflow: hidden; touch-action: none; }
.annotation-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.annotation-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.annotation-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.room-sketch-canvas { display: block; width: 100%; height: auto; max-height: 55vh; margin: 14px 0 10px; border: 2px solid var(--brand); border-radius: 16px; background: #fffdf8; box-shadow: inset 0 0 0 1px rgba(43,24,50,.08); touch-action: none; }
.sketch-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.sketch-toolbar.sketch-tool-picker { grid-template-columns: repeat(3, 1fr); }
.sketch-workspace { display: grid; gap: 0; }
.sketch-workspace .sketch-toolbar .button { min-height: 44px; margin-top: 0; }
.sketch-workspace .sketch-toolbar:last-child { margin-bottom: 0; }
.saved-room-sketch { display: block; width: 100%; aspect-ratio: 1; margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; background: repeating-linear-gradient(0deg, transparent 0 49px, #eee7dd 50px), repeating-linear-gradient(90deg, #fffdf8 0 49px, #eee7dd 50px); }
.saved-room-sketch path { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.schedule-choices { margin: 16px 0; }
.select-row { display: grid; grid-template-columns: 26px 1fr; gap: 11px; align-items: center; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; }
.select-row input { width: 22px; height: 22px; accent-color: var(--brand); }
.select-row strong, .select-row small { display: block; }
.select-row small { margin-top: 3px; color: var(--muted); }
.toast { position: fixed; z-index: 30; inset: auto auto calc(90px + env(safe-area-inset-bottom)) 50%; margin: 0; max-width: calc(100% - 32px); padding: 12px 16px; border: 0; border-radius: 13px; background: var(--ink); color: white; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.sheet > .toast { inset: auto 16px 16px; max-width: none; transform: translateY(20px); }
.sheet > .toast.show { transform: translateY(0); }
.empty { padding: 30px 18px; text-align: center; border: 1px dashed #b9c4bf; border-radius: 18px; color: var(--muted); }
.guide-step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.step-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 850; }

.document-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); overflow-wrap: anywhere; }
.document-card.current-installation-plan { border: 2px solid var(--brand); background: var(--brand-soft); }
.document-card.current-installation-plan .status { display: inline-flex; margin-bottom: 8px; }
.document-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.document-actions .button { min-width: 0; text-align: center; }
.document-preview-scroll { max-width: 100%; overflow: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.document-preview-scroll table { min-width: 100%; border-collapse: collapse; background: white; }
.document-preview-scroll td { padding: 10px; border: 1px solid var(--line); white-space: nowrap; }
.field-reference-grid { display: grid; gap: 14px; align-items: start; }
.approved-plan-column, .field-reference-column { min-width: 0; }
.approved-plan-preview { display: block; width: 100%; min-height: 360px; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; background: white; object-fit: contain; }
.field-reference-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.field-photo-gallery { display: grid; gap: 12px; }
.field-photo-reference { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); overflow-wrap: anywhere; }
.field-photo-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: white; }
.field-photo-stage img, .field-photo-stage svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.field-photo-stage img { object-fit: cover; }
.field-photo-stage svg { pointer-events: none; }
.field-photo-stage path { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.completion-receipt { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.completion-receipt .panel { margin: 0; }
.receipt-hero { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 4px; text-align: center; }
.receipt-hero h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.receipt-hero .muted { margin: 2px 0 0; max-width: 34ch; }
.receipt-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; color: white; background: var(--green); box-shadow: 0 0 0 8px var(--green-soft); }
.receipt-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.receipt-list { display: grid; gap: 12px; margin: 0; }
.receipt-list dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.receipt-list dd { margin: 3px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.receipt-status { color: var(--green); background: var(--green-soft); }
.receipt-counts { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.receipt-counts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 9px 0; border-top: 1px solid var(--line); }
.receipt-label { display: grid; gap: 2px; min-width: 0; font-weight: 700; }
.receipt-label small { color: var(--muted); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.receipt-value { flex: none; color: var(--brand); font-size: 18px; font-weight: 850; }
.receipt-actions { display: grid; gap: 10px; }
.receipt-actions .button { min-height: 48px; }

@media (min-width: 720px) {
  main { padding-top: 32px; }
  .today-dashboard { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); column-gap: 24px; }
  .today-dashboard > * { grid-column: 1; }
  .today-dashboard > .staff-session { grid-column: 2; grid-row: 1; align-self: start; }
  .today-dashboard > .recent-activity-block { grid-column: 2; grid-row: 2 / span 5; align-self: start; }
  .today-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .manager-today > .manager-work, .manager-today > .recent-activity-block { grid-column: 1 / -1; grid-row: auto; }
  .metrics { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .stack.cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: 1.08fr .92fr; align-items: start; }
  .detail-grid .timeline-panel { grid-column: 2; grid-row: 1 / span 3; }
  .exception-lead { grid-template-columns: 1.08fr .92fr; align-items: stretch; }
  .hub-glance { grid-auto-columns: minmax(0, 220px); }
  .hub-header > .button.full { width: auto; margin-left: 54px; }
  .field-reference-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .field-photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completion-receipt { max-width: 1100px; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr); align-items: start; }
  .receipt-hero, .receipt-actions { grid-column: 1 / -1; }
  .receipt-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .hub-columns, .room-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 24px; }
  .manager-work { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); align-items: start; column-gap: 24px; }
  .hub-next-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center; }
  .hub-next-action > :not(.button) { grid-column: 1; }
  .hub-next-action > .button { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; width: auto; }
}

@media (min-width: 1180px) {
  .topbar-inner, main { padding-left: 28px; padding-right: 28px; }
  .today-dashboard { column-gap: 32px; }
  .bottom-nav { gap: 18px; }
  .nav-button { max-width: 120px; }
}


/* ===== v269 design refresh: refined brand, calmer type, desktop sidebar ===== */
body { font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, .today-greeting, .space-next-title, .receipt-hero h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; }
h1, .today-greeting { font-size: clamp(30px, 7.4vw, 44px); line-height: 1.05; }
h2 { font-size: 22px; line-height: 1.15; }
h3 { font-size: 17px; font-weight: 650; }
.eyebrow { color: var(--gold-deep); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.muted { color: var(--muted); }

/* header & brand */
.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 66px; }
.brand { gap: 12px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(145deg, #55295f, #2e1538); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--gold); }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: #ecd29d; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: grid; gap: 1px; }
.brand-name { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: 0; }
.brand-sub { margin: 0; color: var(--gold-deep); font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
.account-button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #dccfe0; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 14px; letter-spacing: .02em; cursor: pointer; }
.account-button:hover { background: #e7dbeb; }
.topbar-search { border-radius: 12px; border-color: var(--line); color: var(--brand); }
.role-button { border-radius: 12px; }

/* surfaces */
.panel, .metric, .manager-job, .manager-issue, .space-card, .customer-card, .jobs-directory-row, .item-card, .today-status-tile, .hub-glance-tile, .hub-header, .exception-hero, .job-next-action, .room-task, .recent-activity, .more-row, .staff-session { border-radius: 16px; border-color: var(--line); }
.jobs-directory-row:hover, .customer-card:hover, .more-row:hover, .today-status-tile:hover, .space-card:hover { border-color: #d6c3b0; box-shadow: 0 2px 4px rgba(60,40,30,.05), 0 10px 26px rgba(60,40,30,.08); }
.hub-header, .exception-hero { border-top: 3px solid var(--gold); }
.next-action-card { border-left: 4px solid var(--gold); }
.job-next-action { border-left-color: var(--gold); }
.exception-next-step { border-left-color: var(--brand); }
.staff-session { padding: 10px 14px; box-shadow: none; background: var(--surface-muted); }
.today-welcome { margin: 4px 0 18px; }
.today-greeting { margin-bottom: 6px; }

/* controls */
.button { min-height: 48px; border-radius: 12px; padding: 12px 18px; font-weight: 650; letter-spacing: .005em; transition: background .15s ease, box-shadow .15s ease, transform .1s ease; }
.button:active { transform: translateY(1px); }
.button.secondary { border-color: #d9cfc2; color: var(--brand); background: #fff; }
.button.secondary:hover { background: var(--surface-muted); }
.field label { font-size: 13px; font-weight: 650; color: #4a403c; }
.field input, .field textarea, .field select { border-color: #d8cdbf; border-radius: 12px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(68,34,79,.1); }
.status { font-weight: 650; }
.sheet { border-radius: 22px; }
.empty { border-color: #d9cfc2; border-radius: 16px; background: rgba(255,255,255,.55); }

/* toast sits at the top so it never covers forms or navigation */
.toast { inset: auto auto calc(88px + env(safe-area-inset-bottom)) 50%; transform: translate(-50%, 14px); border-radius: 12px; box-shadow: 0 10px 30px rgba(30,20,15,.28); z-index: 40; }
.toast.show { transform: translate(-50%, 0); }

/* navigation */
.bottom-nav { background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 22px rgba(60,40,30,.06); gap: 0; backdrop-filter: blur(14px); }
.nav-button { position: relative; max-width: none; color: #8a8079; font-size: 11px; font-weight: 650; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; }
.nav-button.active { color: var(--brand); }
.nav-button.active::before { content: ""; position: absolute; top: -8px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }

@media (max-width: 380px) { .brand-sub { display: none; } .brand-name { font-size: 20px; } }

/* desktop & tablet landscape: left sidebar instead of bottom bar */
@media (min-width: 960px) {
  .app-shell { padding-bottom: 0; }
  .topbar-inner { max-width: none; padding: 9px 32px; }
  .bottom-nav { top: 66px; right: auto; bottom: 0; width: var(--sidebar); min-height: 0; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line); box-shadow: none; background: #fff; backdrop-filter: none; }
  .nav-button { flex: 0 0 auto; width: 100%; flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 10px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left; color: #5d534d; }
  .nav-button:hover { background: var(--surface-muted); }
  .nav-button.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
  .nav-button.active::before { top: 10px; bottom: 10px; left: -14px; right: auto; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  .nav-icon { height: auto; margin: 0; }
  .nav-icon svg { width: 22px; height: 22px; }
  .app-shell > main { margin: 0 0 0 var(--sidebar); max-width: 1340px; padding: 36px 44px 56px; }
  .app-shell > .preview-banner { margin-left: calc(var(--sidebar) + 44px); width: auto; max-width: 1100px; }
  .toast { inset: auto auto 28px calc(50% + var(--sidebar) / 2); transform: translate(-50%, 14px); }
  .toast.show { transform: translate(-50%, 0); }
}
@media (min-width: 1180px) { .nav-button { max-width: none; } .bottom-nav { gap: 4px; } .topbar-inner { padding-left: 32px; padding-right: 32px; } }

/* sticky header needs a non-scrolling overflow clip, not hidden */
html, body { overflow-x: clip; }

/* page headers: keep the primary action usable on narrow phones */
.hero > div { min-width: 0; }
@media (max-width: 560px) {
  .hero { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero > .button { width: 100%; }
}
.more-row[data-action="staff-logout"] { margin-top: 10px; border-color: #e3c7c2; }
.more-row[data-action="staff-logout"] .more-row-label { color: var(--red); }

@media (max-width: 430px) {
  .topbar-search { padding: 7px; }
  .topbar-search > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .brand-name { white-space: nowrap; }
  .role-button { padding: 8px 9px; font-size: 12px; }
}

/* signed-out landing */
.landing { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 520px at 50% -10%, #f1e9f3 0%, transparent 60%), var(--canvas); }
.landing-card { width: min(100%, 420px); display: grid; justify-items: center; gap: 0; padding: 36px 28px 26px; text-align: center; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 22px; box-shadow: 0 2px 4px rgba(60,40,30,.05), 0 18px 48px rgba(60,40,30,.1); }
.landing-mark { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; background: linear-gradient(145deg, #55295f, #2e1538); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--gold); }
.landing-mark svg { width: 36px; height: 36px; fill: none; stroke: #ecd29d; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.landing-name { margin: 0; font-size: clamp(32px, 9vw, 40px); line-height: 1; }
.landing-card .brand-sub { margin: 8px 0 18px; font-size: 11px; }
.landing-tag { text-wrap: balance; margin: 0 0 24px; color: var(--muted); max-width: 30ch; }
.landing-card .button.full { margin-top: 10px; }
.landing-foot { margin: 20px 0 0; }
