:root {
  --ink: #171c24;
  --ink-2: #303844;
  --muted: #687487;
  --muted-2: #94a0b2;
  --paper: #fff;
  --canvas: #f3f6f9;
  --line: #dce3ea;
  --line-strong: #c9d2dc;
  --blue: #1769e0;
  --blue-dark: #0d4fae;
  --blue-soft: #eaf2ff;
  --green: #158557;
  --green-soft: #e7f6ee;
  --red: #d63b3b;
  --red-soft: #feebeb;
  --amber: #9a5a08;
  --amber-soft: #fff3df;
  --shadow: 0 1px 2px rgba(19, 28, 38, .08), 0 8px 24px rgba(19, 28, 38, .05);
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body { margin: 0; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(23, 105, 224, .22); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
.boot { display: grid; min-height: 100vh; place-items: center; color: var(--muted); }
.app-layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 238px; flex-direction: column; border-right: 1px solid #252b35; color: white; background: #151a21; }
.sidebar-brand { display: grid; min-height: 112px; align-content: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #2a3039; }
.sidebar-brand img { width: 168px; filter: brightness(0) invert(1); }
.sidebar-brand > div { display: flex; align-items: center; gap: 9px; }
.efc-tag { display: inline-grid; min-width: 42px; min-height: 28px; place-items: center; border-radius: 5px; color: white; background: #171c24; font-size: 12px; font-weight: 900; letter-spacing: 0; }
.sidebar .efc-tag { color: #151a21; background: white; }
.sidebar nav { display: grid; gap: 3px; padding: 16px 12px; overflow: auto; }
.nav-item { min-height: 42px; padding: 0 13px; border: 0; border-radius: 6px; color: #aeb9c7; background: transparent; text-align: left; font-weight: 700; }
.nav-item:hover { color: white; background: #252c35; }
.nav-item.active { color: white; background: var(--blue); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 18px 24px; color: #8e9aaa; font-size: 11px; font-weight: 800; }
.env-dot { width: 7px; height: 7px; border-radius: 50%; background: #44c48a; }
.workspace { min-height: 100vh; margin-left: 238px; }
.workspace-head { position: sticky; top: 0; z-index: 20; display: flex; min-height: 66px; align-items: center; justify-content: flex-end; padding: 9px 28px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
.mobile-brand { display: none; }
.account { display: flex; align-items: center; gap: 12px; }
.account > div { display: grid; text-align: right; }
.account span { color: var(--muted); font-size: 12px; }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: white; font-size: 18px; }
.page { width: min(1260px, calc(100% - 56px)); margin: 0 auto; padding: 34px 0 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.kicker, .section-kicker { margin-bottom: 6px; color: var(--blue-dark); font-size: 11px; font-weight: 900; text-transform: uppercase; }
h1 { margin-bottom: 0; font-size: 31px; line-height: 1.15; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.25; letter-spacing: 0; }
h3 { margin-bottom: 0; font-size: 15px; letter-spacing: 0; }
.page-meta { margin: 7px 0 0; color: var(--muted); }
.muted { color: var(--muted); }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 6px; color: white; background: var(--ink); font-weight: 800; text-decoration: none; }
.button:hover { filter: brightness(.97); }
.button.primary { background: var(--blue); }
.button.success { background: var(--green); }
.button.secondary { border-color: var(--line-strong); color: var(--ink); background: white; }
.button.tertiary { min-height: 35px; padding: 0 10px; border-color: transparent; color: var(--blue-dark); background: transparent; }
.button.danger-text { color: var(--red); }
.button.wide { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .48; filter: none; }
.text-button { padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-weight: 800; }
.environment-banner { display: flex; align-items: center; gap: 9px; margin: -10px 0 18px; color: var(--muted); font-size: 12px; }
.environment-banner span { padding: 3px 6px; border-radius: 3px; color: white; background: var(--ink); font-weight: 900; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { display: grid; min-height: 122px; align-content: start; padding: 17px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; box-shadow: var(--shadow); text-align: left; }
.metric strong { font-size: 28px; }
.metric span { min-height: 38px; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric i { margin-top: 5px; color: var(--blue-dark); font-size: 11px; font-style: normal; font-weight: 800; opacity: 0; }
.metric:hover i { opacity: 1; }
.metric.attention strong { color: var(--blue); }
.metric.danger strong { color: var(--red); }
.surface { border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.section-head { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.section-head p { margin-bottom: 3px; }
.section-head > span { color: var(--muted); font-size: 13px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, .65fr); align-items: start; gap: 16px; }
.compact-surface { padding-bottom: 16px; }
.summary-list { display: grid; margin: 0; padding: 8px 18px 16px; }
.summary-list > div { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 850; }
.compact-surface > .button { width: calc(100% - 36px); margin: 0 18px; }
.worker-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.worker-summary > div { padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.worker-summary strong, .worker-summary span { display: block; }
.worker-summary strong { font-size: 27px; }
.worker-summary span { color: var(--muted); font-size: 12px; }
.worker-feed { border: 1px solid var(--line); border-radius: 7px; background: white; }
.visit-list { display: grid; }
.visit-card { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 94px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.visit-card:last-child { border-bottom: 0; }
.visit-date { display: grid; align-content: center; min-height: 56px; border-right: 1px solid var(--line); }
.visit-date span { font-size: 17px; font-weight: 900; }
.visit-date small { color: var(--muted); }
.visit-title { display: flex; align-items: center; gap: 9px; }
.visit-main h3 { margin-top: 4px; }
.visit-main p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.inline-alert { margin-top: 6px; color: var(--amber); font-size: 12px; font-weight: 800; }
.status { display: inline-flex; min-height: 24px; align-items: center; width: max-content; padding: 0 8px; border-radius: 999px; color: #475466; background: #edf0f3; font-size: 11px; font-weight: 850; white-space: nowrap; }
.status.PLANNED { color: #305984; background: #e8f1fb; }
.status.IN_PROGRESS { color: #88500d; background: var(--amber-soft); }
.status.SUBMITTED { color: #0e55b5; background: var(--blue-soft); }
.status.CHANGES_REQUESTED, .status.NOK, .status.CRITICAL { color: #9d2929; background: var(--red-soft); }
.status.VALIDATED, .status.SENT, .status.OK { color: #0b7047; background: var(--green-soft); }
.status.WATCH { color: var(--amber); background: var(--amber-soft); }
.status.AMENDED, .status.INFO, .status.NA { color: #555f6e; background: #edf0f3; }
.status.neutral { color: var(--muted); background: #edf0f3; }
.filter-tabs { display: flex; gap: 2px; overflow: auto; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.filter-tabs button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-weight: 750; white-space: nowrap; }
.filter-tabs button.active { color: var(--blue-dark); background: var(--blue-soft); }
.create-drawer { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.create-drawer:not([open]) { display: none; }
.create-drawer summary { padding: 17px 20px; font-weight: 850; cursor: pointer; }
.drawer-body { padding: 18px 20px 20px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.span-2 { grid-column: 1 / -1; }
label { color: var(--ink-2); font-size: 12px; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: white; }
textarea { min-height: 96px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.table-surface { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; color: var(--muted); background: #f8fafc; font-size: 10px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
td small { display: block; margin-top: 3px; color: var(--muted); }
.table-actions { display: flex; align-items: center; gap: 5px; }
.icon-link { min-height: 30px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--blue-dark); background: white; font-size: 11px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.due-date { font-weight: 750; white-space: nowrap; }
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.site-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.site-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.site-card-tools { display: flex; align-items: center; gap: 6px; }
.site-card-head p { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 750; }
.site-address { min-height: 46px; margin: 14px 0; color: var(--muted); }
.site-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.site-stats span, .site-stats strong { display: block; }
.site-stats span { margin-bottom: 4px; color: var(--muted-2); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.site-stats strong { font-size: 13px; }
.user-list { display: grid; }
.user-line { display: grid; grid-template-columns: 38px minmax(160px, 1fr) auto auto minmax(280px, auto); align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.user-line:last-child { border-bottom: 0; }
.user-line > div:nth-child(2) { display: grid; }
.user-line > div:nth-child(2) span { color: var(--muted); font-size: 12px; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-weight: 900; }
.role-pill { font-size: 10px; font-weight: 900; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.row-actions select { width: 108px; min-height: 35px; }
.seat-preview { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #bcd1ef; border-radius: 5px; color: #244f81; background: var(--blue-soft); }
.seat-preview span { font-size: 12px; }
.notice { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #bcd1ef; border-radius: 6px; color: #244f81; background: var(--blue-soft); }
.notice span { font-size: 13px; }
.notice.warning { border-color: #e4c18b; color: #754506; background: var(--amber-soft); }
.notice.error { border-color: #ecb5b5; color: #942929; background: var(--red-soft); }
.notice.success { border-color: #a9d9c2; color: #0b7047; background: var(--green-soft); }
.reset-notice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr); align-items: center; margin-bottom: 16px; }
.reset-notice code { overflow-wrap: anywhere; padding: 9px; color: var(--ink); background: white; }
.filter-bar { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.filter-actions { display: flex; gap: 5px; }
.form-surface { padding: 0 18px 20px; }
.form-surface > .section-head { margin: 0 -18px 18px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 16px; align-items: start; }
.settings-grid > :last-child { grid-column: 2; }
.sequence-preview { display: grid; gap: 4px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.sequence-preview span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.sequence-preview strong { font-size: 22px; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-line div { display: grid; gap: 3px; }
.setting-line div span { color: var(--muted); font-size: 12px; }
.subscription-hero { display: grid; grid-template-columns: 1.3fr 1fr; overflow: hidden; margin-bottom: 16px; border-radius: 7px; color: white; background: #171c24; box-shadow: var(--shadow); }
.subscription-hero > div { padding: 28px; }
.subscription-hero p { margin: 18px 0 5px; color: #9eabbc; font-size: 12px; font-weight: 850; }
.subscription-hero h2 { font-size: 38px; }
.subscription-hero h2 small { font-size: 14px; }
.subscription-hero > div > span:last-child { display: block; margin-top: 8px; color: #9eabbc; font-size: 12px; }
.subscription-price { display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 10px 14px; background: var(--blue-dark); }
.subscription-price strong { font-size: 20px; }
.subscription-price span { align-self: center; color: #ccddf5; }
.subscription-detail { padding-bottom: 18px; }
.subscription-detail > .notice { margin: 0 18px; }
.decision-badge { padding: 5px 8px; border: 1px solid #e4c18b; border-radius: 4px; color: #754506 !important; background: var(--amber-soft); font-size: 10px !important; font-weight: 900; }
.seat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 18px; background: var(--line); }
.seat-grid > div { display: grid; gap: 8px; padding: 18px; background: white; }
.seat-grid span { color: var(--muted); font-size: 12px; }
.seat-grid strong { font-size: 25px; }
.progress-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.progress-strip > div { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-right: 1px solid var(--line); }
.progress-strip > div:last-child { border-right: 0; }
.progress-strip span { color: var(--muted); font-size: 12px; }
.visit-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 16px; }
.visit-content { display: grid; gap: 14px; }
.visit-review { position: sticky; top: 82px; }
.review-card { display: grid; gap: 14px; padding: 18px; }
.review-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.checklist { display: grid; }
.check-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--muted); background: #edf1f5; font-size: 12px; font-weight: 850; }
.check-copy { display: grid; gap: 7px; }
.check-copy input { min-height: 36px; }
.segments { display: flex; gap: 4px; }
.segments button { min-width: 70px; min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); background: white; font-size: 11px; font-weight: 850; }
.segments button.active.OK { border-color: var(--green); color: white; background: var(--green); }
.segments button.active.NOK { border-color: var(--red); color: white; background: var(--red); }
.segments button.active.NA { border-color: var(--ink-2); color: white; background: var(--ink-2); }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 18px; }
.separated { padding: 18px; border-top: 1px solid var(--line); }
.anomaly-list { display: grid; gap: 8px; padding: 0 18px 18px; }
.anomaly-list article { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; }
.anomaly-list p { margin: 4px 0 0; color: var(--muted); }
.photo-upload { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 18px; }
.file-drop { display: grid; min-height: 72px; align-content: center; padding: 10px 14px; border: 1px dashed var(--blue); border-radius: 5px; color: var(--blue-dark); background: var(--blue-soft); cursor: pointer; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop span { color: var(--muted); font-size: 11px; }
.attachment-list { display: grid; gap: 7px; padding: 0 18px 18px; }
.attachment-list > div { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; }
.attachment-list > div > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 11px; font-weight: 900; }
.attachment-list small { color: var(--muted); }
.signature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; }
.signature-box { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; }
.signature-box p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.signature-box canvas { display: block; width: 100%; height: 135px; border: 1px dashed var(--line-strong); background: white; touch-action: none; }
.signature-box.signed { min-height: 180px; align-content: center; text-align: center; background: var(--green-soft); }
.signature-box.signed strong { font-size: 20px; }
.signature-box.signed span { color: var(--green); font-size: 12px; }
.signature-actions { display: flex; justify-content: space-between; gap: 8px; }
.empty-state { display: grid; min-height: 150px; place-content: center; gap: 5px; padding: 28px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink-2); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15, 20, 27, .58); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; border-radius: 7px; background: white; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.timeline { display: grid; }
.timeline > div { display: grid; grid-template-columns: 16px 1fr; gap: 10px; min-height: 56px; }
.timeline > div > span { position: relative; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--blue); }
.timeline > div > span:after { position: absolute; top: 10px; bottom: -42px; left: 4px; width: 1px; content: ""; background: var(--line); }
.timeline > div:last-child > span:after { display: none; }
.timeline p { display: grid; gap: 3px; margin: 0; }
.timeline small { color: var(--muted); }
.email-history { padding-top: 16px; border-top: 1px solid var(--line); }
.email-history p { display: grid; }
.email-history span { color: var(--muted); font-size: 12px; }
.attachment-preview { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; }
.attachment-preview > span { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: var(--red); font-size: 10px; font-weight: 900; }
.attachment-preview div { display: grid; }
.attachment-preview small { color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 150; max-width: 380px; padding: 13px 16px; border-radius: 6px; color: white; background: var(--ink); box-shadow: 0 14px 34px rgba(0, 0, 0, .2); }
.toast.error { background: var(--red); }
.worker-bottom-nav { display: none; }

.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 480px) 1fr; background: white; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 50px 58px; }
.login-brand { display: grid; gap: 20px; margin-bottom: 56px; }
.login-logo { width: 220px; }
.product-lockup { display: flex; align-items: center; gap: 10px; font-weight: 850; }
.login-copy { margin-bottom: 26px; }
.login-copy h1 { font-size: 34px; }
.login-copy > p:last-child { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.login-foot { margin: 30px 0 0; color: var(--muted-2); font-size: 11px; text-align: center; }
.login-visual { position: relative; display: grid; align-items: end; overflow: hidden; padding: 70px; color: white; background: #171c24; }
.login-visual:before { position: absolute; inset: 0 0 0 42%; content: ""; background: var(--blue); clip-path: polygon(38% 0, 100% 0, 68% 100%, 0 100%); opacity: .9; }
.visual-grid { position: relative; display: grid; grid-template-columns: repeat(3, auto); align-items: end; gap: 18px; }
.visual-grid span { padding-bottom: 10px; border-bottom: 2px solid rgba(255, 255, 255, .32); color: #aeb9c7; font-size: 12px; font-weight: 850; }
.visual-grid strong { grid-column: 1 / -1; max-width: 620px; font-size: 46px; line-height: 1.08; }
.mfa-setup { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; margin-bottom: 18px; }
.mfa-qr { width: 150px; height: 150px; border: 1px solid var(--line); }
.mfa-key { display: block; overflow-wrap: anywhere; padding: 10px; border: 1px solid var(--line); background: var(--canvas); }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.recovery-codes code { padding: 9px; border: 1px solid var(--line); background: var(--canvas); text-align: center; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .user-line { grid-template-columns: 38px 1fr auto auto; }
  .row-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; border: 0; border-bottom: 1px solid #252b35; }
  .sidebar-brand { display: none; }
  .sidebar nav { display: flex; padding: 8px 12px; overflow-x: auto; }
  .nav-item { flex: 0 0 auto; }
  .sidebar-foot { display: none; }
  .workspace { margin-left: 0; }
  .workspace-head { top: 58px; justify-content: space-between; padding: 9px 18px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; }
  .page { width: min(100% - 32px, 1260px); padding-top: 26px; }
  .dashboard-columns, .settings-grid, .visit-workspace { grid-template-columns: 1fr; }
  .settings-grid > :last-child { grid-column: auto; }
  .visit-review { position: static; }
  .site-grid { grid-template-columns: 1fr; }
  .subscription-hero { grid-template-columns: 1fr; }
  .seat-grid { grid-template-columns: repeat(2, 1fr); }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

@media (max-width: 620px) {
  body { padding-bottom: 68px; }
  .worker-layout .sidebar { display: none; }
  .worker-layout .workspace-head { top: 0; }
  .worker-bottom-nav { position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(2, 1fr); min-height: 64px; padding: 7px 10px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: white; box-shadow: 0 -5px 20px rgba(19, 28, 38, .08); }
  .worker-bottom-nav .nav-item { min-height: 48px; color: var(--muted); text-align: center; }
  .worker-bottom-nav .nav-item.active { color: var(--blue-dark); background: var(--blue-soft); }
  .sidebar nav { gap: 1px; padding: 7px 8px; }
  .nav-item { min-height: 38px; padding: 0 10px; font-size: 12px; }
  .workspace-head { top: 52px; min-height: 58px; padding: 8px 12px; }
  .account > div { display: none; }
  .mobile-brand strong { font-size: 13px; }
  .page { width: min(100% - 22px, 1260px); padding: 20px 0 36px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 18px; }
  .page-head > .button { width: 100%; }
  h1 { font-size: 27px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 102px; padding: 14px; }
  .dashboard-columns { display: block; }
  .dashboard-columns > * + * { margin-top: 14px; }
  .worker-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .worker-summary > div { padding: 12px 8px; text-align: center; }
  .worker-summary strong { font-size: 23px; }
  .visit-card { grid-template-columns: 48px minmax(0, 1fr); gap: 11px; padding: 13px 12px; }
  .visit-date { min-height: 48px; }
  .visit-actions { grid-column: 2; }
  .visit-actions .button { width: 100%; }
  .visit-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .form-grid, .signature-grid, .photo-upload, .inline-form { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { width: 100%; }
  .site-stats { grid-template-columns: 1fr; }
  .user-line { grid-template-columns: 36px 1fr auto; gap: 9px; }
  .user-line > .status { grid-column: 2; }
  .row-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .row-actions select { width: 100%; }
  .reset-notice { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .field:nth-child(n+3) { grid-column: 1 / -1; }
  .filter-actions .button { flex: 1; }
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 12px; border-bottom: 1px solid var(--line); }
  td { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding: 6px 0; border: 0; }
  td:before { color: var(--muted-2); content: attr(data-label); font-size: 9px; font-weight: 900; text-transform: uppercase; }
  .progress-strip { grid-template-columns: repeat(2, 1fr); }
  .progress-strip > div:nth-child(2) { border-right: 0; }
  .progress-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .check-row { grid-template-columns: 28px minmax(0, 1fr); padding: 14px 12px; }
  .segments { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .segments button { min-height: 44px; }
  .signature-grid { padding: 12px; }
  .signature-box canvas { height: 150px; }
  .photo-upload { padding: 14px; }
  .file-drop { min-height: 88px; }
  .visit-workspace { display: flex; flex-direction: column; }
  .visit-review { position: sticky; top: 66px; z-index: 15; order: -1; }
  .review-card { box-shadow: 0 8px 24px rgba(19, 28, 38, .12); }
  .review-card h2, .review-card p, .review-card > .status { display: none; }
  .seat-grid { grid-template-columns: 1fr 1fr; margin: 12px; }
  .seat-grid > div { padding: 13px; }
  .subscription-hero > div { padding: 22px; }
  .subscription-hero h2 { font-size: 31px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-height: 92vh; border-radius: 7px 7px 0 0; }
  .login-panel { padding: 28px 24px; }
  .login-brand { margin-bottom: 38px; }
  .login-logo { width: 205px; }
  .login-copy h1 { font-size: 30px; }
  .mfa-setup, .recovery-codes { grid-template-columns: 1fr; }
  .mfa-qr { width: 180px; height: 180px; }
  .toast { right: 11px; bottom: 78px; left: 11px; max-width: none; }
}
