:root {
  --ink: var(--field-ink, #071725);
  --ink-2: #253544;
  --muted: var(--field-neutral-fg, #5a6473);
  --muted-2: var(--field-mute, #7a8699);
  --paper: var(--field-paper, #fff);
  --canvas: #f3f6f9;
  --line: #dce3ea;
  --line-strong: #c9d2dc;
  --blue: var(--field-action, #0f74ae);
  --blue-dark: var(--field-action-hover, #0b5e92);
  --blue-soft: var(--field-info-bg, #e4f1fa);
  --green: var(--field-success-fg, #157f5b);
  --green-soft: var(--field-success-bg, #e6f6ef);
  --red: var(--field-danger-fg, #c43a45);
  --red-soft: var(--field-danger-bg, #fbe9ea);
  --amber: var(--field-warning-fg, #a65d00);
  --amber-soft: var(--field-warning-bg, #fcefdd);
  --tenant-accent: var(--field-action, #0f74ae);
  --tenant-accent-dark: var(--field-action-hover, #0b5e92);
  --tenant-accent-soft: var(--field-info-bg, #e4f1fa);
  --tenant-neutral: var(--field-neutral-fg, #5a6473);
  --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: var(--field-font-system, 'Manrope', system-ui, sans-serif);
  font-size: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
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 color-mix(in srgb, var(--field-focus, #0f74ae) 28%, transparent); 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: 138px; align-content: center; gap: 18px; padding: 20px 24px; border-bottom: 1px solid #2a3039; }
.sidebar-brand .tenant-logo { width: 168px; }
.field-product-lockup { display: inline-flex; align-items: center; gap: 9px; color: var(--field-ink); font-size: 14px; font-weight: 650; }
.field-product-lockup img { width: 20px; height: 25px; object-fit: contain; }
.field-product-lockup strong { font-weight: 850; }
.sidebar .field-product-lockup { color: white; }
.sidebar .field-product-lockup img { width: 18px; height: 23px; }
.field-product-lockup.compact { gap: 7px; font-size: 13px; }
.field-product-lockup.compact img { width: 16px; height: 20px; }
.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(--tenant-accent-dark); }
.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; }
.mobile-tenant-logo { width: 104px; }
.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(--tenant-accent-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(--tenant-accent-dark); }
.button.success { background: var(--green); }
.button.danger { background: var(--red); }
.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: var(--field-neutral-fg, #5a6473); background: var(--field-neutral-bg, #eef1f4); }
.status.IN_PROGRESS { color: #88500d; background: var(--amber-soft); }
.status.SUBMITTED { color: var(--field-info-fg, #0f74ae); 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); }
.signed-lock { grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-bottom: 14px; }
.signed-lock strong, .signed-lock span { grid-column: 1; }
.signed-lock button { grid-column: 2; grid-row: 1 / span 2; }
.save-status { min-height: 15px; color: var(--muted-2); font-size: 10px; font-weight: 750; }
.save-status.saving { color: var(--blue-dark); }
.save-status.saved { color: var(--green); }
.save-status.error { color: var(--red); }
.autosave-footer { min-height: 34px; padding: 4px 12px 12px; }
.signed-lock { grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-bottom: 14px; }
.signed-lock strong, .signed-lock span { grid-column: 1; }
.signed-lock button { grid-column: 2; grid-row: 1 / span 2; }
.save-status { min-height: 15px; color: var(--muted-2); font-size: 10px; font-weight: 750; }
.save-status.saving { color: var(--blue-dark); }
.save-status.saved { color: var(--green); }
.save-status.error { color: var(--red); }
.autosave-footer { min-height: 34px; padding: 4px 12px 12px; }
.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: 22px; margin-bottom: 56px; }
.login-logo { width: 220px; }
.login-brand .field-product-lockup { padding-top: 18px; border-top: 1px solid var(--line); }
.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(--tenant-accent); 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: grid; grid-template-columns: auto auto; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; }
  .mobile-brand .field-product-lockup { padding-left: 9px; border-left: 1px solid var(--line-strong); }
  .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(--tenant-accent-dark); background: var(--tenant-accent-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 .field-product-lockup { gap: 5px; font-size: 10px; }
  .mobile-brand .field-product-lockup img { width: 13px; height: 17px; }
  .mobile-tenant-logo { width: 92px; }
  .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; }
}

/* P2H field workflow */
.field-stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: white; }
.field-stepper button { display: flex; min-width: 0; min-height: 58px; align-items: center; justify-content: center; gap: 7px; padding: 8px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: white; font-size: 12px; font-weight: 850; }
.field-stepper button:last-child { border-right: 0; }
.field-stepper button span { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 11px; }
.field-stepper button.active { color: var(--blue-dark); box-shadow: inset 0 -3px var(--blue); background: var(--blue-soft); }
.field-stepper button.active span { border-color: var(--blue); color: white; background: var(--blue); }
.field-stepper button.done span { border-color: var(--green); color: white; background: var(--green); }
.field-stepper button.attention { color: var(--red); background: var(--red-soft); }
.field-stepper button.attention span { border-color: var(--red); color: white; background: var(--red); }
.field-stage { max-width: 980px; margin: 0 auto; }
.step-actions { display: flex; justify-content: space-between; margin-top: 14px; }
.step-actions .button { min-width: 140px; }
.chantier-card { overflow: hidden; }
.chantier-identity { padding: 24px; border-bottom: 1px solid var(--line); }
.chantier-identity h2 { margin-bottom: 7px; font-size: 25px; }
.chantier-identity > strong { display: block; font-size: 17px; }
.chantier-identity > p:last-child { margin: 5px 0 0; color: var(--muted); }
.chantier-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.chantier-facts > div { display: grid; gap: 4px; padding: 16px 24px; border-right: 1px solid var(--line); }
.chantier-facts > div:last-child { border-right: 0; }
.chantier-facts span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.installation-brief { display: grid; gap: 1px; padding: 16px 24px; background: var(--line); }
.installation-brief > div { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; padding: 12px; background: white; }
.installation-brief span { color: var(--blue-dark); font-weight: 900; }
.installation-brief small { color: var(--muted); }
.start-control { width: calc(100% - 48px); min-height: 52px; margin: 0 24px 24px; }
.memory-block { margin: 18px 24px; }
.memory-block > h3 { margin-bottom: 9px; }
.control-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr) 46px; align-items: center; gap: 12px; min-height: 92px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.control-copy { display: grid; gap: 7px; }
.control-copy input { min-height: 36px; }
.control-line .segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.control-line .segments button { min-height: 40px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: white; font-size: 11px; font-weight: 850; }
.control-line .segments button.active.OK { border-color: var(--green); color: white; background: var(--green); }
.control-line .segments button.active.NOK { border-color: var(--red); color: white; background: var(--red); }
.control-line .segments button.active.NA { color: white; background: var(--ink-2); }
.quick-photo { position: relative; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--blue-dark); background: var(--blue-soft); cursor: pointer; }
.quick-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.quick-photo b { position: absolute; top: -6px; right: -6px; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 10px; }
.finding-installations { display: grid; gap: 12px; padding: 16px; background: var(--canvas); }
.finding-form { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.finding-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.finding-head > div { display: grid; gap: 3px; }
.finding-head span:not(.status) { color: var(--muted); font-size: 12px; }
.finding-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.finding-option { border: 1px solid var(--line); border-radius: 6px; background: white; }
.finding-option.selected { border-color: #ef9b5c; background: #fffaf6; }
.finding-option > label { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; cursor: pointer; }
.finding-option > label input { width: 21px; min-height: 21px; flex: 0 0 21px; }
.finding-option > label > span { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 8px; }
.finding-detail { padding: 0 12px 12px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.suggestions button { padding: 6px 8px; border: 1px solid #efc7a8; border-radius: 5px; color: #7e3c0d; background: #fff4eb; font-size: 11px; text-align: left; }
.finding-detail textarea { min-height: 76px; margin-top: 5px; }
.finding-form > .form-actions { padding: 0 12px 12px; }
.legacy-findings { display: grid; gap: 4px; margin: 16px; padding: 13px; border-left: 4px solid var(--amber); background: var(--amber-soft); }
.photo-context-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 18px 18px; }
.photo-context-grid article { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; }
.photo-context-grid article > img { width: 72px; height: 58px; flex: 0 0 72px; border-radius: 4px; object-fit: cover; background: var(--soft); }
.photo-context-grid article div { display: grid; gap: 3px; }
.photo-context-grid small { color: var(--muted); }
.human-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 18px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.human-summary > div { padding: 14px; border-right: 1px solid var(--line); }
.human-summary > div:last-child { border-right: 0; }
.human-summary span, .human-summary strong { display: block; }
.human-summary span { min-height: 31px; color: var(--muted); font-size: 11px; }
.human-summary strong { font-size: 23px; }
.summary-findings { display: grid; gap: 7px; padding: 0 18px 16px; }
.summary-findings article { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; }
.summary-findings p { margin: 3px 0 0; color: var(--muted); }
.signature-notice { margin: 0 18px 16px; padding: 12px; border-left: 4px solid var(--blue); background: var(--blue-soft); color: var(--ink-2); font-size: 12px; }
.signature-blocker { margin: 0 18px 16px; text-align: left; }
.signature-blocker .button, .send-blockers .button { width: max-content; margin-top: 8px; }
.send-panel { padding: 28px; text-align: center; }
.send-panel h2 { margin: 10px 0; font-size: 26px; }
.send-panel > p:not(.section-kicker) { color: var(--muted); }
.send-panel .notice { margin: 18px auto; text-align: left; }
.send-blockers span::before { content: '• '; font-weight: 900; }
.send-panel .next-maintenance-field { max-width: 340px; margin: 18px auto; }
.send-actions { display: grid; gap: 8px; max-width: 420px; margin: 20px auto 0; }
.history-meta { display: block; margin-top: 5px; color: var(--blue-dark) !important; }

@media (max-width: 760px) {
  .field-stepper { grid-template-columns: repeat(3, 1fr); }
  .field-stepper button { min-height: 48px; border-bottom: 1px solid var(--line); font-size: 10px; }
  .field-stepper button:nth-child(3n) { border-right: 0; }
  .field-stepper button:nth-last-child(-n+3) { border-bottom: 0; }
  .field-stepper button span { width: 20px; height: 20px; flex-basis: 20px; }
  .chantier-facts { grid-template-columns: 1fr; }
  .chantier-facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .installation-brief > div { grid-template-columns: 1fr; gap: 3px; }
  .control-line { grid-template-columns: minmax(0, 1fr) 44px; gap: 9px; padding: 12px; }
  .control-line .segments { grid-column: 1 / -1; grid-row: 2; }
  .quick-photo-form { grid-column: 2; grid-row: 1; }
  .finding-catalog, .photo-context-grid { grid-template-columns: 1fr; }
  .finding-option > label > span { align-items: flex-start; flex-direction: column; }
  .human-summary { grid-template-columns: repeat(2, 1fr); }
  .human-summary > div:nth-child(2) { border-right: 0; }
  .human-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* P2F field worker experience */
.worker-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.worker-hero h1 { margin-bottom: 5px; }
.worker-hero p:last-child { margin: 0; color: var(--muted); }
.worker-new { min-height: 50px; padding-inline: 22px; }
.worker-section { margin-bottom: 24px; }
.worker-section > .section-head { min-height: 54px; padding-inline: 0; border: 0; }
.worker-section.correction { padding: 0 16px 16px; border: 1px solid #e4c18b; border-radius: 7px; background: #fffbf2; }
.count-badge { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 50%; color: white !important; background: var(--blue); font-weight: 900; }
.worker-card-list { display: grid; gap: 10px; }
.worker-visit-card { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 126px; padding: 17px 18px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 7px; background: white; box-shadow: var(--shadow); }
.worker-time { display: grid; align-content: center; align-self: stretch; padding-right: 16px; border-right: 1px solid var(--line); }
.worker-time strong { font-size: 20px; }
.worker-time span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.worker-job > div { display: flex; align-items: center; gap: 8px; }
.worker-job h3 { margin: 7px 0 3px; font-size: 18px; }
.worker-job p { margin: 0 0 6px; color: var(--muted); }
.worker-job small { color: var(--muted); }
.worker-card-actions { display: flex; gap: 6px; }
.worker-empty { display: grid; gap: 4px; min-height: 92px; place-content: center; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted); text-align: center; }
.worker-empty strong { color: var(--ink); }
.field-review-alert { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; width: 100%; margin-bottom: 16px; padding: 13px 16px; border: 1px solid #e4c18b; border-radius: 7px; color: var(--ink); background: var(--amber-soft); text-align: left; }
.field-review-alert > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: white; background: var(--amber); font-weight: 900; }
.field-review-alert div { display: grid; gap: 2px; }
.field-review-alert small { color: #754506; }
.field-review-alert i { color: var(--amber); font-style: normal; font-weight: 850; }
.planning-toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.planning-toolbar .filter-tabs { border: 0; }
.segmented { display: flex; gap: 2px; margin-right: 12px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.segmented button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 4px; color: var(--muted); background: white; }
.segmented button.active { color: white; background: var(--ink); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 320px; overflow: auto; }
.check-choice { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.check-choice input { width: 20px; min-height: 20px; }
.check-choice span { display: grid; gap: 2px; }
.check-choice small { color: var(--muted); }
.wizard-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-bottom: 16px; }
.wizard-progress span { padding: 10px; border-bottom: 3px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 850; }
.wizard-progress span.active { border-color: var(--blue); color: var(--blue-dark); }
.field-wizard { margin-bottom: 14px; }
.field-wizard > .search-field { padding: 16px 18px 0; }
.select-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 16px 18px 18px; }
.select-card { display: grid; gap: 4px; min-height: 76px; align-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; text-align: left; }
.select-card span { color: var(--muted); font-size: 12px; }
.select-card.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-soft); }
.inline-create { margin: 0 18px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.field-wizard > .choice-grid { margin: 16px 18px; }
.spontaneous-start { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--line); }
.spontaneous-start div { display: grid; gap: 3px; }
.spontaneous-start span { color: var(--muted); font-size: 12px; }
.dossier-contact { display: grid; grid-template-columns: 1fr 2fr; gap: 1px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--line); overflow: hidden; }
.dossier-contact > div { display: grid; gap: 4px; padding: 14px 18px; background: white; }
.dossier-contact span { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 850; }
.installation-dossier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 18px 18px; }
.installation-dossier-grid article { padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.installation-dossier-grid h3 { margin-top: 10px; font-size: 18px; }
.installation-dossier-grid p { margin: 3px 0 14px; color: var(--muted); }
.installation-dossier-grid dl { display: grid; gap: 7px; margin: 0; }
.installation-dossier-grid dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.installation-dossier-grid dt { color: var(--muted); }
.installation-dossier-grid dd { margin: 0; font-weight: 750; text-align: right; }
.dossier-columns { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; margin-top: 14px; }
.history-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.history-line div { display: grid; gap: 3px; }
.history-line span { color: var(--muted); font-size: 12px; }
.previous-anomaly-list { display: grid; gap: 8px; padding: 16px 18px 18px; }
.previous-anomaly-list article { padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 6px; }
.previous-anomaly-list article > div:first-child { display: grid; gap: 5px; }
.previous-anomaly-list p { margin: 0; color: var(--muted); }
.anomaly-review-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.field-review-list { display: grid; }
.field-review-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.field-review-list article > div:nth-child(2) { display: grid; gap: 3px; }
.field-review-list article > div:last-child { display: flex; gap: 5px; }
.field-review-list small { color: var(--muted); }
.entity-pill { padding: 5px 7px; border-radius: 4px; color: var(--blue-dark); background: var(--blue-soft); font-size: 10px; font-weight: 900; }
.field-instructions { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 15px; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.field-instructions span { color: #244f81; }
.progress-strip { grid-template-columns: repeat(6, 1fr); }
.installation-checks + .installation-checks { border-top: 8px solid var(--canvas); }
.installation-heading { padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.installation-heading span { color: var(--blue-dark); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.installation-heading h3 { margin-top: 4px; font-size: 17px; }
.installation-heading small { color: var(--muted); }
.photo-central .photo-upload { grid-template-columns: minmax(190px, .75fr) minmax(190px, .75fr) 1fr 1fr auto; }
.camera-action { display: grid; min-height: 104px; align-content: center; justify-items: center; padding: 12px; border: 2px dashed var(--blue); border-radius: 6px; color: var(--blue-dark); background: var(--blue-soft); cursor: pointer; }
.camera-action input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.camera-action > span { font-size: 26px; line-height: 1; }
.camera-action small { color: var(--muted); }
.photo-preview { position: relative; height: 104px; overflow: hidden; border-radius: 6px; background: var(--ink); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview span { position: absolute; inset: auto 0 0; padding: 5px 8px; color: white; background: rgba(0,0,0,.6); font-size: 10px; }
.signature-summary { display: grid; gap: 4px; margin: 16px 18px 0; padding: 14px; border-left: 4px solid var(--green); background: var(--green-soft); }
.signature-summary small { margin-top: 5px; color: #0b7047; }
.next-maintenance-field { margin: 14px 0; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.next-maintenance-field small { color: var(--muted); }
.modal-copy { margin: 0 0 14px; color: var(--muted); }
.duplicate-candidates { display: grid; gap: 8px; max-height: 300px; overflow: auto; }
.duplicate-candidates .select-card { width: 100%; min-height: 64px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.submitted-confirmation { display: grid; min-height: 65vh; place-content: center; justify-items: center; max-width: 680px; margin: 0 auto; text-align: center; }
.submitted-mark { display: grid; width: 72px; height: 72px; place-items: center; margin-bottom: 18px; border-radius: 50%; color: white; background: var(--green); font-size: 34px; font-weight: 900; }
.submitted-confirmation h1 { margin-bottom: 12px; }
.submitted-confirmation > p:not(.kicker), .submitted-confirmation > span { color: var(--muted); }
.submitted-confirmation > div:last-child { display: flex; gap: 8px; margin-top: 24px; }
.admin-review-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, 1fr); gap: 28px; margin-bottom: 20px; padding: 26px; color: #fff; background: #20252a; border-left: 5px solid var(--orange); }
.admin-review-hero > div { display: grid; justify-items: start; gap: 5px; }
.admin-review-hero h2 { margin: 8px 0 0; font-size: 28px; }
.admin-review-hero p, .admin-review-hero > div > span:not(.status) { margin: 0; color: #d3d7da; }
.admin-review-hero dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: #4a4e52; }
.admin-review-hero dl div { padding: 14px; background: #2c3136; }
.admin-review-hero dt { color: #b8bdc2; font-size: 12px; }
.admin-review-hero dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; }
.admin-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.admin-review-main, .admin-review-side { display: grid; gap: 20px; }
.admin-review-side { position: sticky; top: 20px; }
.review-section h2 { margin-top: 4px; }
.review-equipment + .review-equipment { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-equipment > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.review-equipment > header span { color: var(--orange-dark); font-size: 12px; font-weight: 800; }
.review-equipment h3 { margin: 2px 0 0; }
.review-checks { border: 1px solid var(--line); }
.review-checks > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; min-height: 58px; padding: 10px 14px; }
.review-checks > div + div { border-top: 1px solid var(--line); }
.review-checks small { display: block; margin-top: 3px; color: var(--muted); }
.result-label { font-weight: 800; }
.result-label.OK { color: var(--green); }
.result-label.NOK { color: var(--red); }
.result-label.NA { color: var(--muted); }
.review-findings { display: grid; gap: 10px; }
.review-findings article { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--orange); }
.review-findings h3, .review-findings p { margin: 3px 0; }
.review-findings small { color: var(--muted); }
.review-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.review-photos figure { margin: 0; border: 1px solid var(--line); }
.review-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.review-photos figcaption { display: grid; gap: 3px; padding: 10px; }
.review-photos figcaption span { color: var(--muted); font-size: 12px; }
.review-signatures { display: grid; gap: 12px; }
.review-signatures > div { display: grid; gap: 3px; padding: 12px; border-left: 3px solid var(--green); background: var(--green-soft); }
.review-signatures span, .review-signatures small { color: var(--muted); font-size: 12px; }
.review-decision { border-top: 4px solid var(--orange); }
.review-decision .button + .button { margin-top: 8px; }
.validation-recap { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 18px; background: var(--line); border: 1px solid var(--line); }
.validation-recap > div { display: grid; gap: 3px; padding: 12px; background: #fff; }
.validation-recap span { color: var(--muted); font-size: 12px; }
.validation-success .submitted-mark { background: var(--green); }
.compact-modal { max-width: 500px; }
.search-with-clear { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.admin-search { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; }
.admin-search label { font-size: 12px; font-weight: 800; }
.admin-search input { min-height: 42px; }
.planning-days { display: grid; gap: 20px; }
.planning-days > section > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 2px solid var(--ink); text-transform: capitalize; }
.planning-days > section > header span { color: var(--muted); font-size: 12px; }
.client-detail-head { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-bottom: 20px; border: 1px solid var(--line); background: var(--line); }
.client-detail-head > div { display: grid; gap: 5px; min-width: 0; padding: 15px; background: #fff; }
.client-detail-head span { color: var(--muted); font-size: 12px; }
.client-detail-head strong { overflow-wrap: anywhere; }
.client-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 20px; }
.client-site-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 72px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.client-site-row > div:first-child { display: grid; gap: 4px; }
.client-site-row span { color: var(--muted); }

@media (max-width: 900px) {
  .admin-review-hero, .admin-review-layout { grid-template-columns: 1fr; }
  .admin-review-side { position: static; }
  .client-detail-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .client-detail-grid { grid-template-columns: 1fr; }
  .worker-visit-card { grid-template-columns: 76px 1fr; }
  .worker-card-actions { grid-column: 2; }
  .dossier-columns, .installation-dossier-grid { grid-template-columns: 1fr; }
  .photo-central .photo-upload { grid-template-columns: 1fr 1fr; }
  .photo-central .photo-upload .button { align-self: stretch; }
}

@media (max-width: 620px) {
  .admin-review-hero dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-photos { grid-template-columns: 1fr 1fr; }
  .admin-search { grid-template-columns: 1fr auto; }
  .admin-search label { grid-column: 1 / -1; }
  .client-detail-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-site-row { grid-template-columns: 1fr auto; }
  .client-site-row .button { grid-column: 1 / -1; }
  .worker-bottom-nav { grid-template-columns: repeat(3, 1fr); }
  .worker-hero { align-items: flex-start; flex-direction: column; gap: 16px; padding-top: 8px; }
  .worker-new { width: 100%; }
  .worker-section { margin-bottom: 20px; }
  .worker-visit-card { grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 12px; min-height: 0; padding: 14px 12px; }
  .worker-time { padding-right: 9px; }
  .worker-time strong { font-size: 16px; }
  .worker-job > div { align-items: flex-start; justify-content: space-between; }
  .worker-job h3 { font-size: 16px; }
  .worker-job p { font-size: 12px; }
  .worker-card-actions { grid-column: 1 / -1; display: grid; grid-template-columns: .7fr 1.3fr; }
  .worker-card-actions .button { min-height: 46px; }
  .choice-grid, .select-cards { grid-template-columns: 1fr; }
  .field-wizard .section-head { align-items: flex-start; flex-direction: column; }
  .field-wizard .section-head > div:last-child { display: grid; width: 100%; gap: 6px; }
  .field-wizard .section-head .button { width: 100%; }
  .spontaneous-start { align-items: stretch; flex-direction: column; }
  .spontaneous-start .button { min-height: 50px; }
  .dossier-contact { grid-template-columns: 1fr; }
  .installation-dossier-grid { padding: 12px; }
  .field-review-list article { grid-template-columns: auto 1fr; }
  .field-review-list article > div:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .planning-toolbar { align-items: stretch; flex-direction: column; }
  .segmented { align-self: flex-end; margin: 0 12px 10px; }
  .progress-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .progress-strip > div { min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 10px; }
  .progress-strip > div, .progress-strip > div:nth-child(2) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .progress-strip > div:nth-child(3n) { border-right: 0; }
  .progress-strip > div:nth-last-child(-n+3) { border-bottom: 0; }
  .photo-central .photo-upload { grid-template-columns: 1fr; }
  .camera-action, .photo-preview { min-height: 150px; height: 150px; }
  .signature-summary { margin: 12px 12px 0; }
  .anomaly-review-actions { display: grid; }
  .anomaly-review-actions .button { min-height: 44px; }
  .submitted-confirmation { min-height: 60vh; padding: 20px; }
  .submitted-confirmation > div:last-child { width: 100%; flex-direction: column; }
}

.field-client-name{font-size:20px;line-height:1.4;overflow-wrap:anywhere}.activation-shell{grid-template-columns:minmax(0,560px);justify-content:center;align-items:center;background:var(--field-photon,#E8EEF5);padding:24px}.activation-shell .login-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:38px}.activation-shell .login-brand{margin-bottom:30px}@media(max-width:600px){.activation-shell{padding:18px}.activation-shell .login-panel{padding:26px 20px}}
