:root {
  --i247-navy: #0b1f3a;
  --i247-blue: #1565c0;
  --i247-blue-light: #e3f2fd;
  --i247-green: #2e7d32;
  --i247-green-bg: #e8f5e9;
  --i247-red: #c62828;
  --i247-red-bg: #ffebee;
  --i247-orange: #ef6c00;
  --i247-orange-bg: #fff3e0;
  --i247-grey: #607d8b;
  --i247-grey-bg: #eceff1;
  --i247-surface: #f5f7fa;
  --i247-card: #ffffff;
  --i247-text: #1a2332;
  --i247-muted: #607d8b;
  --i247-border: #e0e6ed;
  --i247-border-soft: #e8eef3;
  --i247-topbar: #0b1f3a;
  --i247-on-topbar: #ffffff;
  --i247-input-bg: #ffffff;
  --i247-sig-stroke: #0b1f3a;
  --i247-sig-bg: #fafafa;
  --i247-hub-primary-from: #0b1f3a;
  --i247-hub-primary-to: #1565c0;
  --i247-hub-accent-from: #12324f;
  --i247-hub-accent-to: #1b6b5a;
  --i247-hub-on-primary: #ffffff;
  --i247-radius: 12px;
  --i247-shadow: 0 2px 12px rgba(11, 31, 58, 0.08);
  color-scheme: light;
}

/* Follow OS / browser dark preference (also applied when data-theme is set by theme.js) */
@media (prefers-color-scheme: dark) {
  :root {
    --i247-navy: #90caf9;
    --i247-blue: #64b5f6;
    --i247-blue-light: #1a334d;
    --i247-green: #81c784;
    --i247-green-bg: #1b3320;
    --i247-red: #ef9a9a;
    --i247-red-bg: #4a2222;
    --i247-orange: #ffb74d;
    --i247-orange-bg: #4a320f;
    --i247-grey: #90a4ae;
    --i247-grey-bg: #2a3441;
    --i247-surface: #0f1419;
    --i247-card: #1a2332;
    --i247-text: #e8eef3;
    --i247-muted: #90a4ae;
    --i247-border: #2d3a47;
    --i247-border-soft: #263140;
    --i247-topbar: #0a1628;
    --i247-on-topbar: #ffffff;
    --i247-input-bg: #121a24;
    --i247-sig-stroke: #e3f2fd;
    --i247-sig-bg: #121a24;
    --i247-hub-primary-from: #16324f;
    --i247-hub-primary-to: #1e4f8c;
    --i247-hub-accent-from: #14352c;
    --i247-hub-accent-to: #1a5c4e;
    --i247-hub-on-primary: #e8eef3;
    --i247-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
  html:not([data-theme="light"]) .public-contact-form-shell {
    background:
      radial-gradient(circle at top right, rgba(61, 139, 253, 0.16), transparent 36%),
      linear-gradient(180deg, #121c28, #0f1720);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  }

  html:not([data-theme="light"]) .public-contact-form-badge {
    background: rgba(61, 139, 253, 0.12);
    border-color: rgba(61, 139, 253, 0.28);
  }

  html:not([data-theme="light"]) .public-contact-icon {
    background: rgba(61, 139, 253, 0.14);
    border-color: rgba(61, 139, 253, 0.24);
  }

  html:not([data-theme="light"]) .public-vcard-card {
    background:
      radial-gradient(circle at top right, rgba(61, 139, 253, 0.14), transparent 36%),
      linear-gradient(180deg, #121c28, #0f1720);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  }

  html:not([data-theme="light"]) .public-vcard-qr-panel {
    background: linear-gradient(180deg, rgba(18, 28, 40, 0.95), rgba(15, 23, 32, 0.98));
  }

  html:not([data-theme="light"]) .public-vcard-qr-link {
    background: #0f1720;
    border-color: rgba(255, 255, 255, 0.08);
  }
}

html[data-theme="light"] {
  --i247-navy: #0b1f3a;
  --i247-blue: #1565c0;
  --i247-blue-light: #e3f2fd;
  --i247-green: #2e7d32;
  --i247-green-bg: #e8f5e9;
  --i247-red: #c62828;
  --i247-red-bg: #ffebee;
  --i247-orange: #ef6c00;
  --i247-orange-bg: #fff3e0;
  --i247-grey: #607d8b;
  --i247-grey-bg: #eceff1;
  --i247-surface: #f5f7fa;
  --i247-card: #ffffff;
  --i247-text: #1a2332;
  --i247-muted: #607d8b;
  --i247-border: #e0e6ed;
  --i247-border-soft: #e8eef3;
  --i247-topbar: #0b1f3a;
  --i247-on-topbar: #ffffff;
  --i247-input-bg: #ffffff;
  --i247-sig-stroke: #0b1f3a;
  --i247-sig-bg: #fafafa;
  --i247-hub-primary-from: #0b1f3a;
  --i247-hub-primary-to: #1565c0;
  --i247-hub-accent-from: #12324f;
  --i247-hub-accent-to: #1b6b5a;
  --i247-hub-on-primary: #ffffff;
  --i247-shadow: 0 2px 12px rgba(11, 31, 58, 0.08);
  color-scheme: light;
}

html[data-theme="dark"] {
  --i247-navy: #90caf9;
  --i247-blue: #64b5f6;
  --i247-blue-light: #1a334d;
  --i247-green: #81c784;
  --i247-green-bg: #1b3320;
  --i247-red: #ef9a9a;
  --i247-red-bg: #4a2222;
  --i247-orange: #ffb74d;
  --i247-orange-bg: #4a320f;
  --i247-grey: #90a4ae;
  --i247-grey-bg: #2a3441;
  --i247-surface: #0f1419;
  --i247-card: #1a2332;
  --i247-text: #e8eef3;
  --i247-muted: #90a4ae;
  --i247-border: #2d3a47;
  --i247-border-soft: #263140;
  --i247-topbar: #0a1628;
  --i247-on-topbar: #ffffff;
  --i247-input-bg: #121a24;
  --i247-sig-stroke: #e3f2fd;
  --i247-sig-bg: #121a24;
  --i247-hub-primary-from: #16324f;
  --i247-hub-primary-to: #1e4f8c;
  --i247-hub-accent-from: #14352c;
  --i247-hub-accent-to: #1a5c4e;
  --i247-hub-on-primary: #e8eef3;
  --i247-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--i247-surface);
  margin: 0;
  color: var(--i247-text);
}

/* Planner / workshop dialogs: keep the page still and scroll the overlay. */
html:has(.plan-modal-backdrop) {
  overflow: hidden;
}

a { color: var(--i247-blue); text-decoration: none; }

/* iOS Safari zooms focused controls when computed font-size is under 16px */
input,
select,
textarea,
.rz-textbox,
.rz-textarea,
.rz-dropdown,
.rz-dropdown .rz-inputtext,
.rz-dropdown-label,
.rz-spinner input,
.rz-numeric input,
.rz-datepicker-input,
.rz-datepicker input,
.rz-lookup-search input,
.rz-autocomplete input,
.rz-form-field input,
.rz-form-field textarea {
  font-size: 16px !important;
}

/* Fluid controls that used fixed desktop widths */
.ctrl-fluid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ctrl-sm { width: 100%; max-width: 160px; min-width: 0; }
.ctrl-md { width: 100%; max-width: 200px; min-width: 0; }
.ctrl-lg { width: 100%; max-width: 280px; min-width: 0; }
.ctrl-xl { width: 100%; max-width: 320px; min-width: 0; }

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.page-header { margin-bottom: 1rem; }
.page-header-start {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 16rem;
}
.page-header-start > .rz-button { flex: 0 0 auto; margin-top: 0.15rem; }
.page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  margin-left: auto;
}
.invoice-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}
.invoice-status-pill {
  border: 1px solid var(--i247-border);
  background: transparent;
  color: var(--i247-text);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}
button.invoice-status-pill { cursor: pointer; }
button.invoice-status-pill:hover { border-color: var(--i247-navy); color: var(--i247-navy); }
.invoice-status-pill.is-current {
  background: var(--i247-navy);
  border-color: var(--i247-navy);
  color: #fff;
}
.invoice-note-list { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.6rem; }
.invoice-note {
  border-left: 3px solid var(--i247-border);
  padding: 0.35rem 0.65rem;
}
.invoice-note-meta { font-size: 0.78rem; color: var(--i247-muted); }
.page-toolbar-actions .rz-button {
  flex: 0 1 auto;
}
.muted-text { color: var(--i247-muted); }
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
}
.job-steps {
  margin-bottom: 1rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.job-steps .rz-steps > ul {
  flex-wrap: nowrap;
  min-width: min-content;
  padding-bottom: 0.25rem;
}
.job-step-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.5rem;
}
.job-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 4.4rem;
  padding: 0.2rem 0.35rem;
  border: none;
  background: transparent;
  color: var(--i247-muted);
  cursor: pointer;
}
.job-step-circle {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  border: 2px solid var(--i247-border);
  background: var(--i247-card);
  color: var(--i247-muted);
}
.job-step.is-current .job-step-label { color: var(--i247-navy); font-weight: 700; }
.job-step.is-current .job-step-circle { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.job-step--done .job-step-circle {
  border-color: var(--i247-green);
  background: var(--i247-green);
  color: #fff;
}
.job-step--action .job-step-circle {
  border-color: var(--i247-orange);
  background: var(--i247-orange);
  color: #fff;
}
.job-step--blocked .job-step-circle {
  border-color: var(--i247-red);
  background: var(--i247-red);
  color: #fff;
}
.job-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.job-step-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.inline-edit-host {
  display: block;
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 2rem;
  overflow-anchor: none;
}
.inline-edit-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  box-sizing: border-box;
  padding: 0.15rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.user-list-name .inline-edit-trigger {
  display: inline-block;
  min-width: 8rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.user-manager-grid .rz-frozen-cell-left {
  background: var(--rz-grid-cell-background, var(--i247-input-bg));
}
.inline-edit-trigger:hover {
  border-color: color-mix(in srgb, var(--i247-blue) 45%, var(--i247-border));
  color: var(--i247-blue);
}
.inline-edit-input,
.inline-edit-select,
.inline-status-select {
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  box-sizing: border-box;
  font: inherit;
  color: var(--i247-text);
  background: var(--i247-input-bg);
  border: 1px solid var(--i247-blue);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}
.inline-edit-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
  min-height: 2rem;
}
.inline-edit-row .inline-edit-select,
.inline-edit-row .inline-edit-input,
.inline-edit-row .inline-edit-suggest {
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
}
.inline-edit-host.is-filtering {
  display: block;
  min-width: 12rem;
}
.inline-edit-filter {
  align-items: flex-start;
}
.inline-edit-filter-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.inline-edit-filter-stack .inline-edit-input,
.inline-edit-filter-stack .inline-edit-select {
  padding-right: 0.4rem;
}
.inline-edit-filter-stack .inline-edit-select {
  min-height: 4.5rem;
}
.inline-edit-filter-hint {
  font-size: 0.72rem;
  color: var(--i247-muted);
}
.vehicle-search-select { width: 100%; }
.vehicle-search-select-input {
  width: 100%;
  min-height: 2.25rem;
  box-sizing: border-box;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--i247-border);
  border-radius: 6px;
  background: var(--i247-input-bg, #fff);
  color: var(--i247-text);
  font: inherit;
}
.inline-edit-cancel {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--i247-blue) 45%, var(--i247-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--i247-blue) 12%, var(--i247-input-bg, #fff));
  color: var(--i247-navy, #0f2744);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.inline-edit-cancel:hover {
  color: #fff;
  background: var(--i247-blue);
  border-color: var(--i247-blue);
}
.plan-party {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.plan-party-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.plan-party-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.inline-status-select {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.inline-status-select.badge-ok { border-color: var(--i247-green); }
.inline-status-select.badge-warn { border-color: var(--i247-orange); }
.inline-status-select.badge-info { border-color: var(--i247-blue); }
button.inline-edit-toggle {
  cursor: pointer;
}
.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.form-actions-row > * {
  min-width: 0;
}

/* Hub tiles */
.task-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--i247-blue);
}

.task-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.task-start-card {
  max-width: 720px;
}

.task-ready-hint {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: var(--i247-blue-light);
  color: var(--i247-navy);
  font-size: 0.9rem;
}

.task-more-toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--i247-blue);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.task-more-toggle:hover {
  text-decoration: underline;
}

.task-more-panel {
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--i247-surface);
  border: 1px solid var(--i247-border-soft);
}

.hub-welcome {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.hub-search-wrap {
  flex: 1 1 16rem;
  max-width: 22rem;
}
.hub-search-input {
  width: 100%;
}
.hub-engineer-link {
  font-weight: 650;
  color: var(--i247-blue, #1565c0);
  text-decoration: none;
  white-space: nowrap;
}
.hub-engineer-link:hover,
.hub-engineer-link:focus-visible {
  text-decoration: underline;
}

.hub-section {
  margin: 1.35rem 0 0.25rem;
}

.hub-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}

.hub-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--i247-navy);
}

.hub-section-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--i247-muted);
}

.hub-recent-title {
  margin: 2rem 0 0.65rem;
  font-size: 1.05rem;
  color: var(--i247-navy);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}

.hub-tile {
  background: var(--i247-card);
  border-radius: var(--i247-radius);
  box-shadow: var(--i247-shadow);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: inherit;
}

.hub-tile:hover, .hub-tile:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 31, 58, 0.14);
  border-color: var(--i247-blue-light);
}

.hub-tile .tile-icon {
  font-size: 2rem;
  line-height: 1;
}

.hub-tile .tile-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.hub-tile .tile-sub {
  font-size: 0.75rem;
  color: var(--i247-grey);
}

.hub-tile-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.65rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--i247-blue-light);
  color: var(--i247-blue);
}

.hub-tile-icon .rzi {
  font-size: 1.35rem;
}

.hub-tile.primary {
  background: linear-gradient(135deg, var(--i247-hub-primary-from), var(--i247-hub-primary-to));
  color: var(--i247-hub-on-primary);
}
.hub-tile.primary .tile-sub { color: color-mix(in srgb, var(--i247-hub-on-primary) 72%, transparent); }
.hub-tile.primary .hub-tile-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--i247-hub-on-primary);
}

.hub-tile.accent {
  background: linear-gradient(135deg, var(--i247-hub-accent-from), var(--i247-hub-accent-to));
  color: var(--i247-hub-on-primary);
}
.hub-tile.accent .tile-sub { color: color-mix(in srgb, var(--i247-hub-on-primary) 72%, transparent); }
.hub-tile.accent .hub-tile-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--i247-hub-on-primary);
}

/* Check item row */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--i247-card);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: var(--i247-shadow);
  border-left: 4px solid var(--i247-grey);
}

.check-row.status-ok { border-left-color: var(--i247-green); background: var(--i247-green-bg); }
.check-row.status-fail { border-left-color: var(--i247-red); background: var(--i247-red-bg); }
.check-row.status-na { border-left-color: var(--i247-grey); background: var(--i247-grey-bg); }
.check-row.status-pending {
  border-left-color: var(--i247-orange);
  background: var(--i247-orange-bg);
  box-shadow: var(--i247-shadow), inset 0 0 0 1px color-mix(in srgb, var(--i247-orange) 28%, transparent);
}

.check-row .ref {
  font-weight: 700;
  color: var(--i247-blue);
  min-width: 2.5rem;
  font-size: 0.85rem;
}

.check-row .desc { flex: 1; font-size: 0.95rem; }

.status-btns {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.status-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--i247-border);
  background: var(--i247-input-bg);
  color: var(--i247-text);
  cursor: pointer;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.status-btn.active-ok { background: var(--i247-green); border-color: var(--i247-green); color: #fff; }
.status-btn.active-fail { background: var(--i247-red); border-color: var(--i247-red); color: #fff; }
.status-btn.active-na { background: var(--i247-grey); border-color: var(--i247-grey); color: #fff; }
.check-row .note-btn,
.check-row .note-btn-slot {
  flex-shrink: 0;
  align-self: flex-start;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.1rem;
}
.check-row .note-btn {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--i247-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.check-row .note-btn.on { color: var(--i247-blue); background: var(--i247-grey-bg); }
.check-row .note-btn svg { display: block; }
.check-row .attach-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  margin-left: 0.3rem;
  color: var(--i247-blue);
  vertical-align: -0.1em;
}
.check-row .attach-mark svg { display: block; }
.check-row .attach-count { font-size: 0.7rem; font-weight: 700; line-height: 1; }
.check-todo {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--i247-orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.check-defect-edit { margin-top: 0.15rem; }
.status-btn:disabled { opacity: 0.55; cursor: wait; }
.check-row.saving { opacity: 0.92; }
.open-job-link {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
}
.page-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--i247-muted);
}
.page-loading p { margin-top: 0.75rem; }

/* Layout */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.app-topbar {
  background: var(--i247-topbar);
  color: var(--i247-on-topbar);
  padding: 0.75rem 1.25rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}
.app-topbar-name {
  font-size: 0.85rem;
  opacity: 0.9;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-topbar-link {
  color: var(--i247-on-topbar);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
  opacity: 0.92;
  white-space: nowrap;
}
.app-topbar-link:hover,
.app-topbar-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.task-pop { position: relative; z-index: 210; }
.task-pop.is-open { z-index: 5100; }
.task-pop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.task-pop-btn:hover { background: rgba(255, 255, 255, 0.18); }
.task-pop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}
.task-pop-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}
.task-pop-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 2;
  box-sizing: border-box;
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(36rem, calc(100dvh - 5.5rem));
  display: flex;
  flex-direction: column;
  background: var(--i247-card);
  color: var(--i247-text);
  border: 1px solid var(--i247-border-soft);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(16, 38, 61, 0.24);
  overflow: hidden;
}
.task-pop-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: var(--i247-topbar);
  color: var(--i247-on-topbar, #fff);
}
.task-pop-head strong { flex: 1; }
.task-pop-all {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.88;
}
.task-pop-all:hover { text-decoration: underline; }
.task-pop-x {
  border: 0;
  background: transparent;
  color: inherit;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.task-pop-x:hover { background: color-mix(in srgb, #fff 16%, transparent); }
.task-pop-new {
  display: grid;
  gap: 0.4rem;
  padding: 0.7rem 0.75rem 0.55rem;
  border-bottom: 1px solid var(--i247-border-soft);
}
.task-pop-new input,
.task-pop-new select,
.task-pop-new textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  background: var(--i247-grey-bg);
  color: var(--i247-text);
  font: inherit;
}
.task-pop-new button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  background: var(--i247-blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.task-pop-new button[type="submit"]:disabled { opacity: 0.6; cursor: default; }
.task-pop-error { margin: 0; color: #c62828; font-size: 0.82rem; font-weight: 650; }
.task-pop-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.45rem 0.65rem 0;
}
.task-pop-tabs button {
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: transparent;
  color: var(--i247-muted, #5c6b7a);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.task-pop-tabs button.on { background: var(--i247-blue-light, #e8f1fb); color: var(--i247-text); }
.task-pop-tabs span {
  display: inline-flex;
  margin-left: 0.3rem;
  min-width: 1rem;
  justify-content: center;
  font-size: 0.72rem;
}
.task-pop-include {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem 0.15rem;
  color: var(--i247-muted, #5c6b7a);
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.task-pop-include input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--i247-blue);
}
.task-pop-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.45rem 0.65rem 0.75rem;
}
.task-pop-empty { margin: 0.8rem 0.2rem; color: var(--i247-muted, #5c6b7a); }
.task-pop-card {
  background: var(--i247-grey-bg, #f4f6f8);
  border: 1px solid var(--i247-border-soft);
  border-left: 4px solid #90a4ae;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.5rem;
}
.task-pop-card.doing { border-left-color: #1565c0; }
.task-pop-card.done { border-left-color: #2e7d32; opacity: 0.78; }
.task-pop-card.is-complete {
  padding: 0.5rem 0.6rem;
  background: color-mix(in srgb, #2e7d32 6%, var(--i247-grey-bg, #f4f6f8));
  opacity: 0.72;
  color: var(--i247-muted, #5c6b7a);
}
.task-pop-card.is-complete .task-pop-card-top strong {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--i247-muted, #5c6b7a);
}
.task-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-right: 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, #2e7d32 18%, #fff);
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: 0.05em;
}
.task-done-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.task-done-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.task-not-done {
  border: 0;
  padding: 0;
  background: none;
  color: var(--i247-blue);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.task-not-done:disabled { opacity: 0.5; cursor: default; }
.task-comments { margin-top: 0.5rem; display: grid; gap: 0.35rem; }
.task-comment {
  margin: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: color-mix(in srgb, #fff 70%, var(--i247-grey-bg, #f4f6f8));
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.task-comment-who { font-weight: 700; margin-right: 0.35rem; }
.task-comment-when { color: var(--i247-muted, #5c6b7a); font-size: 0.72rem; }
.task-comment-body { display: block; margin-top: 0.12rem; }
.task-comment-more { margin: 0; color: var(--i247-muted, #5c6b7a); font-size: 0.74rem; }
.task-comment-form { display: flex; gap: 0.3rem; }
.task-comment-form input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  background: var(--i247-input-bg, #fff);
  font: inherit;
  font-size: 0.8rem;
}
.task-comment-form button {
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  background: var(--i247-card);
  color: var(--i247-text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
}
.task-page-new {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0.85rem;
  border: 1px solid var(--i247-border-soft);
  border-radius: 12px;
  background: var(--i247-card, #fff);
}
.task-page-new input,
.task-page-new select,
.task-page-new textarea {
  width: 100%;
  box-sizing: border-box;
}
.task-page-section { margin: 1.1rem 0 1.4rem; }
.task-page-section h2 { margin: 0 0 0.55rem; font-size: 1.05rem; }
.task-pop-card-top { display: flex; flex-direction: column; gap: 0.15rem; }
.task-pop-card-top strong { font-size: 0.92rem; overflow-wrap: anywhere; }
.task-pop-meta { color: var(--i247-muted, #5c6b7a); font-size: 0.78rem; }
.task-pop-notes { margin: 0.35rem 0 0; font-size: 0.84rem; overflow-wrap: anywhere; }
.task-pop-job {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--i247-text);
  font-size: 0.82rem;
  font-weight: 650;
}
.task-pop-job input { width: auto; margin: 0; accent-color: var(--i247-blue); }
.task-pop-job-link {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--i247-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.task-pop-job-link:hover { text-decoration: underline; }
.task-pop-status {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.55rem;
}
.task-pop-status button {
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  padding: 0.32rem 0.2rem;
  background: var(--i247-card);
  color: var(--i247-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.task-pop-status button.on { background: var(--i247-blue); color: #fff; border-color: var(--i247-blue); }
.task-pop-status button:disabled { cursor: default; }

html:has(.task-pop.is-open) {
  overflow: hidden;
}
html:has(.task-pop.is-open) .app-topbar {
  z-index: 5100;
}

@media (max-width: 900px) {
  .task-pop-scrim {
    background: rgba(11, 31, 58, 0.5);
  }
  .task-pop-panel {
    position: fixed;
    top: max(0.55rem, env(safe-area-inset-top, 0px));
    right: 0.55rem;
    left: auto;
    width: min(22.5rem, calc(100vw - 1.1rem));
    max-width: none;
    max-height: calc(100dvh - 1.1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 600px) {
  .task-pop-label { display: none; }
  .task-pop-panel {
    top: max(0.4rem, env(safe-area-inset-top, 0px));
    left: 0.4rem;
    right: 0.4rem;
    width: auto;
    max-height: calc(100dvh - 0.8rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
  }
  .task-pop-new input,
  .task-pop-new select,
  .task-pop-new textarea,
  .task-pop-new button[type="submit"],
  .task-pop-tabs button,
  .task-pop-status button,
  .task-pop-include {
    min-height: 2.75rem;
  }
  .task-pop-status button { font-size: 0.84rem; }
}

.app-topbar .brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--i247-on-topbar);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.app-topbar .brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.app-topbar .brand-logo {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

html[data-theme="dark"] .app-topbar .brand-logo {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .app-topbar .brand-logo {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* keep light-theme white chip when OS is dark but forced light */
html[data-theme="light"] .app-topbar .brand-logo {
  background: #fff;
  box-shadow: none;
}

.app-topbar .brand-text {
  white-space: nowrap;
}

.office-nav {
  display: flex;
  gap: 0.15rem;
  padding: 0 1.25rem;
  overflow-x: auto;
  background: color-mix(in srgb, var(--i247-topbar) 88%, #000);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.office-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.office-nav a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}
.office-nav a.on {
  color: #fff;
  border-bottom-color: #fff;
}
.pipeline-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: -0.35rem 0 1rem;
}
.lone-ack-btn {
  background: #fff;
  color: #8e0018;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

@media (max-width: 520px) {
  .app-topbar .brand-text { display: none; }
  .app-topbar .brand-logo { max-width: 140px; height: 32px; }
}

.lone-office-alert {
  background: #8e0018;
  color: #fff;
  padding: 0.85rem 1.1rem;
  position: sticky;
  top: 0;
  z-index: 140;
  box-shadow: 0 6px 18px rgba(80, 0, 16, 0.35);
}
.lone-office-alert-inner { max-width: 1100px; margin: 0 auto; }
.lone-office-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.lone-office-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0.2rem 0;
}
.lone-office-row a { color: #fff; text-decoration: underline; }
.lone-office-call {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  opacity: 0.92;
}

.app-content {
  flex: 1;
  padding: 1.25rem;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  max-width: 1100px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: clip;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--i247-navy);
  margin: 0 0 0.25rem 0;
}

.page-sub {
  color: var(--i247-grey);
  margin: 0 0 1.25rem 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.page-header .page-sub { margin-bottom: 0; }

.card-panel {
  background: var(--i247-card);
  border-radius: var(--i247-radius);
  box-shadow: var(--i247-shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.list-search {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--i247-border-soft);
}
.list-search-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 16px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--i247-border, #c5ced6);
  border-radius: 10px;
  background: var(--i247-card);
  color: var(--i247-text);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-ok { background: var(--i247-green-bg); color: var(--i247-green); }
.badge-fail, .badge-danger { background: var(--i247-red-bg); color: var(--i247-red); }
.badge-warn { background: var(--i247-orange-bg); color: var(--i247-orange); }
.badge-info { background: var(--i247-blue-light); color: var(--i247-blue); }
.badge-muted { background: var(--i247-grey-bg); color: var(--i247-grey); }

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.report-table th,
.report-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--i247-border-soft);
  vertical-align: top;
}
.report-table th {
  color: var(--i247-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.report-table tbody tr:hover {
  background: var(--i247-surface);
}
.report-table .num { text-align: right; white-space: nowrap; }
.report-table .wages-name a,
.report-table .num a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.report-table .wages-name a:hover,
.report-table .num a:hover {
  text-decoration: underline;
  color: var(--i247-navy);
}
.report-table tfoot td {
  font-weight: 600;
  border-bottom: none;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--i247-topbar) 0%, #1565c0 60%, #42a5f5 100%);
  padding: 1.5rem;
}

.login-card {
  background: var(--i247-card);
  color: var(--i247-text);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.login-logo {
  width: min(100%, 280px);
  height: auto;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  color: var(--i247-navy);
  font-size: 1.75rem;
  text-align: center;
}

.login-split {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--i247-muted);
  font-size: 0.8rem;
  text-transform: lowercase;
}
.login-split::before,
.login-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--i247-border);
}

.licence-invite-wrap {
  align-items: flex-start;
  padding-top: 2rem;
  padding-bottom: 3rem;
}
.licence-invite-card {
  max-width: 520px;
}
.licence-invite-card h1 {
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
}
.licence-invite-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.licence-invite-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.licence-invite-eyesight {
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--i247-grey-bg);
}
.licence-list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.85rem 0;
}
.licence-list-toolbar .list-search,
.licence-list-toolbar > div {
  flex: 1;
  min-width: 180px;
}
.licence-driver-config {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.35rem 1rem;
  margin-top: 0.85rem;
}
.licence-driver-config-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
}
.licence-invite-links {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}
.licence-invite-links li {
  margin: 0.35rem 0;
}
.licence-invite-links a {
  margin-left: 0.5rem;
}
.hours-form-wrap {
  align-items: flex-start;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
.hours-form-card {
  max-width: 720px;
}
.hours-form-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.hours-form-lead {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}
.hours-week-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.hours-week-meta {
  margin: 0;
  font-size: 0.95rem;
}
.hours-days {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.hours-day,
.hours-callouts {
  border: 1px solid var(--i247-border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: var(--i247-grey-bg);
}
.hours-day.is-today {
  border-color: var(--i247-navy);
}
.hours-day.is-off {
  background: color-mix(in srgb, var(--i247-grey-bg) 70%, var(--i247-card));
}
.hours-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.hours-day-total {
  font-weight: 600;
  color: var(--i247-navy);
  font-size: 0.9rem;
}
.hours-absence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}
.hours-absence label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.hours-absence select {
  width: 100%;
  max-width: 18rem;
  font: inherit;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--i247-border);
  background: var(--i247-card);
  color: inherit;
}
.hours-day.is-half {
  background: color-mix(in srgb, var(--i247-navy) 7%, var(--i247-grey-bg));
}
.hours-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.hours-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--i247-muted);
}
.hours-field input[type="time"],
.hours-field input[type="text"],
.hours-callout-row input {
  width: 100%;
  min-height: 2.5rem;
  font-size: 1rem;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  background: var(--i247-card);
  color: var(--i247-text);
}
.hours-callouts {
  margin-top: 0.85rem;
}
.hours-callout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
  align-items: center;
}
.hours-callout-row input[type="date"],
.hours-callout-row input[type="text"]:not(.hours-callout-time),
.hours-callout-row button {
  grid-column: 1 / -1;
}
.hours-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.hours-actions-row {
  display: flex;
  gap: 0.5rem;
}
.hours-actions-row .rz-button {
  flex: 1;
}
@media (min-width: 640px) {
  .hours-callout-row {
    grid-template-columns: 8.5rem 6rem 6rem 1fr auto auto;
  }
  .hours-callout-row input[type="date"],
  .hours-callout-row input[type="text"],
  .hours-callout-row button {
    grid-column: auto;
  }
}
@media print {
  .no-print,
  .hours-week-nav,
  .hours-actions {
    display: none !important;
  }
  .login-wrap.hours-form-wrap {
    background: #fff;
    padding: 0;
    min-height: 0;
  }
  .hours-form-card {
    box-shadow: none;
    max-width: none;
    padding: 0;
  }
}
.licence-report h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--i247-navy);
}
.licence-report h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.88rem;
  color: var(--i247-navy);
}
.licence-report-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.licence-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.55rem;
  font-size: 0.88rem;
}
.licence-report-warn {
  color: var(--i247-warn, #9a3412);
  font-weight: 600;
}
.licence-report-table-wrap {
  overflow-x: auto;
}
.licence-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 36rem;
}
.licence-report-table th,
.licence-report-table td {
  text-align: left;
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 1px solid var(--i247-border);
  vertical-align: top;
}
.licence-report-table th {
  font-weight: 600;
  color: var(--i247-navy);
}
.licence-report-table tr.is-expired td {
  color: var(--i247-muted, #667085);
}

.sig-pad-wrap {
  border: 2px dashed var(--i247-border);
  border-radius: 10px;
  background: var(--i247-sig-bg);
  overflow: hidden;
}

.group-card {
  background: var(--i247-card);
  border-radius: var(--i247-radius);
  box-shadow: var(--i247-shadow);
  margin: 0.85rem 0 1.1rem;
  overflow: hidden;
  border: 1px solid var(--i247-border-soft);
}
.group-card.group-complete {
  border-color: var(--i247-green);
}
.group-card.group-open {
  border-color: var(--i247-blue);
}

.group-header {
  background: var(--i247-topbar);
  color: var(--i247-on-topbar);
  padding: 0.7rem 0.9rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.group-header-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.group-title { font-size: 0.95rem; }
.group-count {
  font-size: 0.78rem;
  opacity: 0.9;
  background: rgba(255,255,255,0.14);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.group-count.ok { background: rgba(76, 175, 80, 0.35); }
.group-count.open { background: color-mix(in srgb, var(--i247-orange) 55%, transparent); }
.group-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.group-done-pill {
  font-size: 0.78rem;
  background: rgba(76, 175, 80, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.progress-bar-wrap {
  height: 8px;
  background: var(--i247-grey-bg);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--i247-blue), var(--i247-green));
  transition: width 0.3s ease;
}
.progress-bar-fill.wear-fill {
  background: linear-gradient(90deg, #00838f, var(--i247-green));
}

/* Wear sheet — front-to-back axle strips */
.wear-intro { margin-bottom: 0.85rem; }
.wear-progress-chip {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}
.wear-progress-chip.ok { background: var(--i247-green-bg); color: var(--i247-green); }
.wear-progress-chip.warn { background: var(--i247-orange-bg); color: var(--i247-orange); }

.wear-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  margin: 0.35rem 0 0.85rem;
  font-size: 0.82rem;
  color: var(--i247-muted);
}
.wear-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--i247-surface);
  border: 1px solid var(--i247-border);
}
.wear-legend-item.tyre::before,
.wear-legend-item.brake::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 3px;
  display: inline-block;
}
.wear-legend-item.tyre::before {
  background: linear-gradient(135deg, #263238, #546e7a);
  border: 2px solid #90a4ae;
}
.wear-legend-item.brake::before {
  background: #ffcc80;
  border: 2px solid #fb8c00;
}
.wear-legend-flow {
  margin-left: auto;
  font-weight: 600;
  color: var(--i247-navy);
  opacity: 0.85;
}

.wear-axle-card {
  background: var(--i247-card);
  border: 1px solid var(--i247-border);
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--i247-shadow);
}
.wear-axle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}
.wear-axle-title {
  font-weight: 800;
  color: var(--i247-navy);
  font-size: 1rem;
}
.wear-axle-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--i247-muted);
  letter-spacing: 0.02em;
}

.wear-axle-strip,
.wear-extra-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}
.wear-extra-row {
  margin-top: 0.55rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.wear-slot {
  border: 2px solid var(--i247-border);
  border-radius: 12px;
  padding: 0.55rem 0.5rem 0.6rem;
  background: var(--i247-input-bg);
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.wear-slot.tyre {
  background:
    linear-gradient(180deg, rgba(38, 50, 56, 0.08) 0%, transparent 42%),
    var(--i247-input-bg);
}
.wear-slot.tyre::before {
  content: "";
  display: block;
  height: 8px;
  border-radius: 999px;
  margin: 0 auto 0.45rem;
  width: 72%;
  background: repeating-linear-gradient(
    90deg,
    #37474f 0 6px,
    #78909c 6px 10px
  );
  opacity: 0.85;
}
.wear-slot.brake {
  background: linear-gradient(180deg, var(--i247-orange-bg) 0%, var(--i247-input-bg) 60%);
  border-style: dashed;
}
.wear-slot.missing {
  border-color: #ffb74d;
  box-shadow: inset 0 0 0 1px rgba(255, 183, 77, 0.25);
}
.wear-slot.captured {
  border-color: #81c784;
  box-shadow: inset 0 0 0 1px rgba(129, 199, 132, 0.2);
}
.wear-slot.na {
  border-color: var(--i247-grey);
  background: var(--i247-grey-bg);
  opacity: 0.92;
}
.wear-slot.na::before { opacity: 0.35; }

.wear-slot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}
.wear-slot-code {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--i247-navy);
  letter-spacing: 0.02em;
}
.wear-slot.brake .wear-slot-code {
  color: #e65100;
}
.wear-slot-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--i247-muted);
  width: 100%;
  line-height: 1.2;
}
.wear-optional {
  font-weight: 500;
  color: var(--i247-muted);
}
.wear-tick {
  margin-left: auto;
  color: var(--i247-green);
  font-weight: 800;
}
.wear-na-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--i247-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wear-needed {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--i247-orange);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wear-na-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--i247-muted);
  font-weight: 600;
}
.wear-na-action {
  margin-top: 0.4rem;
}
.wear-fields {
  display: flex;
  gap: 0.4rem;
}
.wear-fields-stack {
  flex-direction: column;
  gap: 0.35rem;
}
.wear-field {
  flex: 1;
  min-width: 0;
}
.wear-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--i247-grey);
  margin-bottom: 0.12rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wear-hint {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #e65100;
  font-weight: 600;
}
.axle-controls {
  margin-bottom: 0.75rem;
}

/* legacy grid kept for equipment history chips */
.wear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
}
.wear-section-title {
  margin: 1rem 0 0.55rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.wear-section-title span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--i247-grey);
}
.company-logo-block {
  border: 1px dashed #cfd8dc;
  border-radius: 10px;
  padding: 1rem;
  background: #fafbfc;
}
.company-logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 220px;
  max-height: 100px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}
.company-logo-preview img {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
}
.company-logo-placeholder {
  display: inline-block;
  padding: 1.25rem 1.5rem;
  color: #90a4ae;
  font-size: 0.9rem;
  background: #eceff1;
  border-radius: 8px;
}

.check-row .ref {
  min-width: 3.4rem;
}

@media (max-width: 1100px) {
  .wear-axle-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .ctrl-sm,
  .ctrl-md,
  .ctrl-lg,
  .ctrl-xl {
    max-width: 100%;
  }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .page-header-start {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .page-header-start > .rz-button {
    align-self: flex-start;
    margin-top: 0;
  }
  .page-toolbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }
  .page-toolbar-actions .rz-button {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 0;
    justify-content: center;
    box-sizing: border-box;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    font-size: 0.78rem;
  }
  .assignee-chip .rz-dropdown {
    width: 100% !important;
  }
  .form-field-pair {
    flex-direction: column !important;
  }
  .form-field-pair > * {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
}
@media (max-width: 600px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .app-content {
    padding: 0.85rem;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  .app-topbar-name { display: none; }
  .check-row { flex-wrap: wrap; }
  .status-btns { width: 100%; justify-content: flex-end; }
  .wear-grid { grid-template-columns: 1fr; }
  .wear-axle-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wear-legend-flow { margin-left: 0; width: 100%; }
  .page-title { font-size: 1.25rem; }
  .card-panel { padding: 1rem; }
  .app-topbar {
    padding: 0.65rem 0.85rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  }
  .app-topbar-user { gap: 0.4rem; }
  .field-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .wear-axle-strip {
    grid-template-columns: 1fr;
  }
  .hub-grid { grid-template-columns: 1fr; }
  .app-topbar .brand-logo { max-width: 118px; height: 28px; }
}

/* Collaboration / live job card */
.live-banner {
  background: var(--i247-blue-light);
  color: var(--i247-blue);
  border: 1px solid var(--i247-blue);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}
.live-dot { color: var(--i247-green); font-weight: 600; }
.collab-panel { margin: 0.75rem 0; }
.assignee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--i247-surface);
  border: 1px solid var(--i247-border);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  max-width: 100%;
  flex-wrap: wrap;
}
.assignee-chip .rz-dropdown {
  width: min(140px, 100%) !important;
  max-width: 100%;
}
.assignee-name { font-weight: 600; color: var(--i247-navy); }
.assignee-active { color: var(--i247-muted); font-size: 0.75rem; }
.presence-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.presence-chip {
  background: var(--i247-green-bg);
  color: var(--i247-green);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
}

/* Equipment history */
.equip-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.equip-stat {
  background: var(--i247-surface);
  border-radius: 10px;
  padding: 0.75rem;
}
.equip-stat-label { font-size: 0.75rem; color: var(--i247-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.equip-stat-value { font-size: 1.15rem; font-weight: 700; color: var(--i247-navy); margin-top: 0.2rem; }
.equip-stat-value.warn { color: var(--i247-red); }
.wear-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}
.wear-history-chip {
  background: var(--i247-card);
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  padding: 0.65rem;
}
.wear-history-pos { font-weight: 600; font-size: 0.85rem; color: var(--i247-navy); }
.wear-history-val { font-size: 1.05rem; margin-top: 0.2rem; }
.wear-history-dc { display: block; font-size: 0.75rem; color: var(--i247-muted); }
.wear-history-type { font-size: 0.75rem; color: var(--i247-muted); margin-top: 0.25rem; }

/* Admin forms */
.menu-action-hours {
  margin-bottom: 0.25rem;
}
.form-grid {  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}
.form-grid label {
  display: block;
  font-size: 0.8rem;
  color: var(--i247-muted);
  margin-bottom: 0.25rem;
}

/* Nested panels / rows that must track light+dark tokens */
.nested-panel {
  background: var(--i247-surface);
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  padding: 0.85rem;
  color: var(--i247-text);
}
.nested-panel-success {
  background: var(--i247-green-bg);
  border-color: color-mix(in srgb, var(--i247-green) 35%, var(--i247-border-soft));
}
.nested-row {
  background: var(--i247-card);
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  color: var(--i247-text);
}

/* Invoices */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--i247-text);
}
.invoice-table th, .invoice-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--i247-border-soft);
  text-align: left;
  vertical-align: top;
}
.invoice-table th { vertical-align: bottom; }
.invoice-line-actions {
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.invoice-charge-toggle {
  border: 0;
  background: transparent;
  color: var(--i247-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0;
  cursor: pointer;
}
.invoice-charge-toggle.on { color: var(--i247-green); }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-table tfoot td { font-weight: 600; }
.invoice-table tfoot .grand td { font-size: 1.05rem; color: var(--i247-navy); border-top: 2px solid var(--i247-border); }
.invoice-table tr.muted { opacity: 0.55; }
.invoice-table tr.invoice-line-clickable { cursor: pointer; }
.invoice-table tr.invoice-line-clickable:hover td { background: color-mix(in srgb, var(--i247-navy) 6%, transparent); }
.invoice-table tr.invoice-line-editing td { background: color-mix(in srgb, var(--i247-navy) 10%, transparent); }

/* Template editor: higher-contrast action controls in light mode */
html[data-theme="light"] .group-actions .rz-button.rz-secondary,
html[data-theme="light"] .group-actions .rz-button.rz-danger {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(255, 255, 255, 0.16) !important;
}
html[data-theme="light"] .group-actions .rz-button.rz-secondary:hover:not(.rz-state-disabled),
html[data-theme="light"] .group-actions .rz-button.rz-danger:hover:not(.rz-state-disabled) {
  background: rgba(255, 255, 255, 0.28) !important;
}
html[data-theme="light"] .group-actions .rz-button.rz-danger {
  background: rgba(198, 40, 40, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
}
html[data-theme="light"] .template-item-actions .rz-button.rz-secondary,
html[data-theme="light"] .template-editor .rz-button.rz-secondary.rz-variant-outlined {
  color: var(--i247-navy) !important;
  border-color: var(--i247-border) !important;
  background: var(--i247-card) !important;
}
html[data-theme="light"] .template-item-actions .rz-button.rz-secondary:hover:not(.rz-state-disabled) {
  background: var(--i247-blue-light) !important;
  border-color: var(--i247-blue) !important;
}
html[data-theme="light"] .template-item-actions .rz-button.rz-danger {
  color: var(--i247-red) !important;
  border-color: color-mix(in srgb, var(--i247-red) 45%, var(--i247-border)) !important;
  background: var(--i247-red-bg) !important;
}
html[data-theme="light"] .rz-button.rz-light:not(.rz-state-disabled) {
  color: var(--i247-navy) !important;
  background: var(--i247-grey-bg) !important;
  border: 1px solid var(--i247-border) !important;
}
html[data-theme="light"] .rz-button.rz-light:hover:not(.rz-state-disabled) {
  background: var(--i247-blue-light) !important;
  border-color: var(--i247-blue) !important;
}

/* Section header actions stay legible on dark navy in both themes */
html[data-theme="dark"] .group-actions .rz-button.rz-secondary,
html[data-theme="dark"] .group-actions .rz-button.rz-danger {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .group-actions .rz-button.rz-danger {
  background: rgba(198, 40, 40, 0.75) !important;
}

/* ── Customer job view (wow factor, no costs) ───────────── */
.cjv-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(33, 150, 243, 0.18), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(0, 77, 64, 0.14), transparent 55%),
    linear-gradient(180deg, #0b1b2b 0%, #102a43 28%, #f4f7fb 28%, #f4f7fb 100%);
  color: #1a237e;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.cjv-loading, .cjv-empty {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  gap: 0.75rem;
}
.cjv-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 1.75rem 1.25rem 1.25rem;
}
.cjv-hero-glow {
  position: absolute;
  inset: -40% auto auto 40%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(129, 212, 250, 0.35), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}
.cjv-hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.cjv-brand { display: flex; gap: 0.85rem; align-items: center; }
.cjv-logo {
  width: 56px; height: 56px; object-fit: contain;
  background: rgba(255,255,255,0.95); border-radius: 14px; padding: 0.35rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.cjv-company { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em; }
.cjv-tagline { opacity: 0.78; font-size: 0.85rem; margin-top: 0.15rem; }
.cjv-jobno { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.02em; }
.cjv-status-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; justify-content: flex-end; }
.cjv-pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 0.2rem 0.65rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(255,255,255,0.16); color: inherit; border: 1px solid rgba(255,255,255,0.22);
}
.cjv-pill.ok { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.cjv-pill.warn { background: #fff8e1; color: #e65100; border-color: #ffe082; }
.cjv-pill.fail { background: #ffebee; color: #b71c1c; border-color: #ef9a9a; }
.cjv-pill.info { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.cjv-main {
  max-width: 1100px;
  margin: -0.5rem auto 0;
  padding: 0 1.25rem 2.5rem;
  display: grid;
  gap: 1rem;
}
.cjv-grid-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}
@media (max-width: 860px) {
  .cjv-grid-top { grid-template-columns: 1fr; }
  .cjv-status-row { justify-content: flex-start; }
}
.cjv-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(207, 216, 220, 0.85);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 18px 40px rgba(16, 42, 67, 0.08);
}
.cjv-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #607d8b;
  margin-bottom: 0.35rem;
}
.cjv-card h2 { margin: 0; font-size: 1.7rem; color: #0d2137; }
.cjv-card h3 { margin: 0; font-size: 1.05rem; color: #0d2137; }
.cjv-sub { color: #607d8b; font-size: 0.9rem; margin: 0.35rem 0 0; }
.cjv-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.cjv-stat-row span { display: block; font-size: 0.75rem; color: #78909c; }
.cjv-stat-row strong { display: block; margin-top: 0.15rem; color: #102a43; font-size: 0.95rem; }
.cjv-rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.cjv-ring {
  text-align: center;
  border-radius: 14px;
  padding: 0.7rem 0.35rem;
  background: linear-gradient(180deg, #e8f5e9, #f1f8e9);
  border: 1px solid #c8e6c9;
}
.cjv-ring.warn { background: linear-gradient(180deg, #fff3e0, #fff8e1); border-color: #ffe0b2; }
.cjv-ring.muted { background: #f5f7fa; border-color: #e0e6ed; }
.cjv-ring strong { display: block; font-size: 1.25rem; color: #0d2137; }
.cjv-ring span { font-size: 0.7rem; color: #607d8b; }
.cjv-bar {
  margin-top: 0.9rem;
  height: 10px;
  border-radius: 999px;
  background: #eceff1;
  overflow: hidden;
}
.cjv-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #1565c0, #26a69a);
  border-radius: inherit;
}
.cjv-bar-label { margin-top: 0.35rem; font-size: 0.8rem; color: #607d8b; }
.cjv-section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem;
}
.cjv-count {
  font-size: 0.8rem; font-weight: 700; color: #455a64;
  background: #eceff1; border-radius: 999px; padding: 0.2rem 0.6rem;
}
.cjv-notes {
  display: grid; gap: 0.75rem; margin-top: 0.85rem;
}
.cjv-notes span { font-size: 0.75rem; color: #78909c; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.cjv-notes p { margin: 0.25rem 0 0; color: #37474f; white-space: pre-wrap; }
.cjv-defect-list { display: grid; gap: 0.85rem; }
.cjv-defect {
  border-radius: 14px;
  border: 1px solid #e0e6ed;
  padding: 0.85rem 0.95rem;
  background: #fff;
  border-left-width: 5px;
}
.cjv-defect.sev-danger { border-left-color: #c62828; }
.cjv-defect.sev-major { border-left-color: #ef6c00; }
.cjv-defect.sev-minor { border-left-color: #f9a825; }
.cjv-defect.sev-adv { border-left-color: #546e7a; }
.cjv-defect-top { display: flex; justify-content: space-between; gap: 0.75rem; }
.cjv-defect-top p { margin: 0.35rem 0 0; color: #37474f; }
.cjv-ref {
  display: inline-block; margin-left: 0.4rem; font-size: 0.75rem; color: #546e7a;
  background: #eceff1; border-radius: 6px; padding: 0.05rem 0.4rem;
}
.cjv-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.cjv-photo-grid figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e6ed;
  background: #fafbfc;
}
.cjv-photo-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.cjv-photo-grid figcaption {
  font-size: 0.72rem;
  color: #607d8b;
  padding: 0.35rem 0.45rem 0.45rem;
}
.cjv-rect-list { margin-top: 0.65rem; display: grid; gap: 0.45rem; }
.cjv-rect {
  background: #f7fafc;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e8eef3;
}
.cjv-rect span { float: right; font-size: 0.75rem; color: #90a4ae; }
.cjv-rect p { margin: 0.25rem 0 0; color: #455a64; font-size: 0.9rem; }
.cjv-parts { font-size: 0.8rem; color: #607d8b; margin-top: 0.2rem; }
.cjv-check-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}
.cjv-check-list li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 0.86rem;
}
.cjv-check-list li.ok { background: #f1f8e9; }
.cjv-check-list li.fail { background: #ffebee; }
.cjv-check-list li.na { opacity: 0.7; }
.cjv-check-list li.pending { background: #fffde7; }
.cjv-im { font-weight: 700; color: #455a64; }
.cjv-check-comment { display: block; margin-top: 0.2rem; font-size: 0.8rem; color: #546e7a; font-style: italic; }
.cjv-check-status { font-size: 0.75rem; font-weight: 700; color: #546e7a; white-space: nowrap; }
.office-job-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 960px) {
  .office-job-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}
.office-job-section h3 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.estimate-job-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.55rem 1rem;
  margin: 0.55rem 0 0;
}
.estimate-job-summary dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--i247-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.estimate-job-summary dd { margin: 0.15rem 0 0; font-weight: 600; }
.estimate-pdf-row, .estimate-template-apply {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.estimate-pdf-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.estimate-pdf-list li { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; }
.estimate-desk { padding-bottom: 5.25rem; }
.estimate-desk-header { margin-bottom: 0.75rem; }
.estimate-job-card { padding: 0.95rem 1.1rem; }
.estimate-job-bar { display: grid; gap: 0.3rem; }
.estimate-job-bar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}
.estimate-job-bar-main a { font-weight: 700; }
.estimate-job-bar-meta {
  margin: 0;
  color: var(--i247-muted);
  font-size: 0.88rem;
}
.estimate-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--i247-card);
  border-top: 1px solid var(--i247-border);
  box-shadow: 0 -8px 24px color-mix(in srgb, #000 16%, transparent);
  padding: 0.55rem 1.25rem;
  padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  padding-right: max(5.5rem, calc(1.25rem + env(safe-area-inset-right, 0px)));
}
.estimate-sticky-bar-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}
.estimate-sticky-bar strong {
  font-size: 1.15rem;
  margin-left: auto;
}
.estimate-sticky-bar em {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--i247-muted);
}
.estimate-sticky-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.estimate-invoice-sheet { padding: 0.75rem 0.9rem 1rem; }
.estimate-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  padding: 0 0 0.65rem;
  margin: 0 0 0.65rem;
  border-bottom: 1px solid var(--i247-border);
  font-size: 0.9rem;
}
.estimate-summary-job { font-weight: 700; color: var(--i247-navy); text-decoration: none; }
.estimate-summary-line .estimate-profit { margin-left: auto; }
.estimate-assign {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.estimate-assign .cost-line-input { min-width: 14rem; }
.estimate-charge-flags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  font-size: 0.82rem;
}
.estimate-charge-flags .additional-cost-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
}
.estimate-charge-flags .additional-cost-miles {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.estimate-charge-flags .additional-cost-miles input {
  width: 4.5rem;
}
.estimate-add-row {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.estimate-add-row .invoice-add-line { margin: 0; }
.estimate-add-row .invoice-add-line > strong { display: none; }
.sage-invoice-table .sage-net-row td { font-weight: 700; }
.sage-invoice-table .sage-net-row .sage-net-label { border-top: 2px solid var(--i247-border); }
.sage-invoice-table .sage-net-row .sage-net-amount { border-top: 2px solid var(--i247-border); }
.sage-invoice-table th,
.sage-invoice-table td { white-space: nowrap; }
.sage-invoice-table .cost-line-desc { white-space: normal; min-width: 0; }
.sage-invoice-table .cost-line-input,
.sage-invoice-table .cost-line-input-num {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.present-sheet-wrap:has(.sage-invoice-table) { overflow-x: hidden; }
.estimate-desk .present-sheet-wrap { overflow-x: hidden; max-width: 100%; }
.estimate-desk .sage-invoice-table .present-col-sku,
.estimate-desk .sage-invoice-table .cost-line-sku { width: 5.5rem; }
.estimate-desk .sage-invoice-table .num { width: 4.85rem; }
.estimate-desk .sage-invoice-table .cost-line-actions-head,
.estimate-desk .sage-invoice-table .cost-line-actions { width: 6.75rem; }
.estimate-desk .sage-invoice-table .cost-line-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  white-space: normal;
}
.estimate-profit {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.estimate-profit-danger {
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 0 0 1px #450a0a;
}
.estimate-profit-red {
  background: var(--i247-red-bg);
  color: var(--i247-red);
}
.estimate-profit-amber {
  background: var(--i247-orange-bg);
  color: var(--i247-orange);
}
.estimate-profit-green {
  background: var(--i247-green-bg);
  color: var(--i247-green);
}
.estimate-profit-neutral {
  background: color-mix(in srgb, var(--i247-muted) 16%, transparent);
  color: var(--i247-muted);
  font-weight: 600;
}
.jobs-register-wrap {
  padding: 0;
  overflow-x: auto;
}
.jobs-register {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.jobs-register th,
.jobs-register td {
  padding: 0.32rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--i247-border) 85%, transparent);
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
}
.jobs-register thead th {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
  background: color-mix(in srgb, var(--i247-navy) 5%, var(--i247-card));
  position: sticky;
  top: 0;
  z-index: 1;
}
.jobs-register-row { cursor: pointer; }
.jobs-register-row:hover td {
  background: color-mix(in srgb, var(--i247-navy) 6%, transparent);
}
.jobs-register-row:hover .jobs-register-job {
  background: color-mix(in srgb, var(--i247-navy) 6%, var(--i247-card));
}
.jobs-register-job { font-weight: 700; position: sticky; left: 0; z-index: 2; background: var(--i247-card); }
.jobs-register thead th.jobs-register-job { z-index: 3; }
.jobs-register-job a { color: var(--i247-navy); text-decoration: none; }
.jobs-register-num { font-variant-numeric: tabular-nums; }
.jobs-register-open { text-align: right; width: 4.5rem; }
.jobs-register-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--i247-border);
  font-size: 0.85rem;
  color: var(--i247-muted);
}
.job-defect-present-costs .present-sheet-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}
.job-defect-present-costs .present-cost-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}
.job-defect-present-costs .present-cost-table .cost-line-desc { width: auto; }
.job-defect-present-costs .present-cost-table .cost-line-qty,
.job-defect-present-costs .present-cost-table .cost-line-rate,
.job-defect-present-costs .present-cost-table .cost-line-total { width: 4.6rem; }
.job-defect-present-costs .present-cost-table .cost-line-actions,
.job-defect-present-costs .present-cost-table .cost-line-actions-head { width: 6.5rem; }
.job-defect-present-costs .present-cost-table .cost-line-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  white-space: normal;
}
.job-defect-present-costs .cost-lines-table.plan-table thead { display: none; }
.job-defect-present-costs .cost-lines-table.plan-table,
.job-defect-present-costs .cost-lines-table.plan-table tbody {
  display: block;
  width: 100%;
  max-width: 100%;
}
.job-defect-present-costs .cost-lines-table.plan-table tbody tr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem 0.55rem;
  width: auto;
  max-width: 100%;
  margin: 0.35rem 0;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
}
.job-defect-present-costs .cost-lines-table.plan-table tbody tr.cost-line-empty {
  display: block;
  margin: 0.15rem 0;
  padding: 0.2rem 0;
}
.job-defect-present-costs .cost-lines-table.plan-table td,
.job-defect-present-costs .cost-lines-table.plan-table .num {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 0;
  border: none;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.job-defect-present-costs .cost-lines-table.plan-table td::before { content: none; }
.job-defect-present-costs .cost-lines-table .cost-line-sku {
  grid-column: 1;
}
.job-defect-present-costs .cost-lines-table .cost-line-desc {
  grid-column: 1 / -1;
  min-width: 0;
}
.job-defect-present-costs .cost-lines-table .cost-line-qty,
.job-defect-present-costs .cost-lines-table .cost-line-rate,
.job-defect-present-costs .cost-lines-table .cost-line-total {
  min-width: 0;
}
.job-defect-present-costs .cost-lines-table.plan-table td.cost-line-sku::before,
.job-defect-present-costs .cost-lines-table.plan-table td.cost-line-qty::before,
.job-defect-present-costs .cost-lines-table.plan-table td.cost-line-rate::before,
.job-defect-present-costs .cost-lines-table.plan-table td.cost-line-total::before {
  content: attr(data-label);
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
  margin-bottom: 0.12rem;
}
.job-defect-present-costs .cost-lines-table .cost-line-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
@media (max-width: 720px) {
  .estimate-sticky-bar {
    padding-right: 1rem;
    padding-left: 1rem;
  }
  .estimate-sticky-bar strong { margin-left: 0; }
  .estimate-summary-line .estimate-profit { margin-left: 0; }
  .estimate-desk .present-sheet-wrap { overflow-x: hidden; }
}
.job-sheets-list { list-style: none; margin: 0 0 0.85rem; padding: 0; display: grid; gap: 0.65rem; }
.job-sheet-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rz-base-300);
  border-radius: 10px;
  background: var(--rz-base-50);
}
.job-sheet-copy { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: baseline; }
.job-sheet-actions, .job-sheet-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.job-sheet-select { min-width: min(18rem, 100%); flex: 1 1 12rem; }
.office-job-meta { margin: 0 0 0.75rem; font-size: 0.88rem; }
.office-hs-actions {
  display: grid;
  gap: 0.55rem;
}
@media (min-width: 720px) {
  .office-hs-actions { grid-template-columns: 1fr 1fr; }
}
.office-hs-open {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--i247-border, #c5ced6);
  border-radius: var(--i247-radius, 12px);
  background: var(--i247-card, #fff);
  color: inherit;
  font: inherit;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  box-shadow: none;
}
.office-hs-open:hover { border-color: var(--i247-accent, #1e6fe3); }
.office-hs-open strong { font-size: 0.95rem; }
.office-hs-open span { font-size: 0.82rem; color: var(--i247-muted); }
.office-hs-modal {
  width: min(52rem, 100%);
}
.office-config-modal {
  width: min(60rem, 100%);
  max-height: min(92vh, 64rem);
  overflow: auto;
}
.office-config-dra h3 {
  margin: 1rem 0 0.25rem;
  font-size: 1rem;
  color: var(--i247-navy);
}
.office-brake-test .brake-test-panel { margin-top: 0.35rem; }
.job-defect-present-costs {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  max-width: 100%;
}
.job-defect-line-table {
  min-width: 0;
  max-width: 100%;
}
.job-defect-line-table h4,
.job-additional-heading {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.present-cost-table .cost-line-input { width: 100%; max-width: 100%; box-sizing: border-box; }
.present-cost-table th.present-col-sku,
.present-cost-table td.cost-line-sku { width: 6.25rem; }
.present-cost-table .cost-line-actions { white-space: normal; }
.office-config-modal .additional-cost-flags {
  margin: 0.15rem 0 0;
}
.office-hs-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.office-hs-modal-head h3 { margin: 0; }
.office-hs-modal .card-panel {
  box-shadow: none;
  border: 1px solid var(--i247-border, #c5ced6);
  border-radius: var(--i247-radius, 12px);
  margin-bottom: 0.75rem;
  padding: 1rem;
}
.office-hs-modal .card-panel:last-child { margin-bottom: 0; }
.office-defect { border: 1px solid var(--i247-border); border-radius: 12px; padding: 0.75rem 0.85rem; margin-bottom: 0.55rem; }
.office-defect-head { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.job-defect-cost-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}
.job-defect-cost-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--i247-border);
  border-left-width: 5px;
  border-radius: 10px;
  padding: 0.75rem 2.6rem 0.85rem 0.85rem;
  background: var(--i247-panel-bg, var(--i247-card, #fff));
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.job-defect-cost-card.sev-dangerous { border-left-color: #c62828; }
.job-defect-cost-card.sev-major { border-left-color: #ef6c00; }
.job-defect-cost-card.sev-minor { border-left-color: #f9a825; }
.job-defect-cost-card.sev-advisory { border-left-color: #1565c0; }
.job-defect-line-num {
  position: absolute;
  right: 0.35rem;
  top: -0.15rem;
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--i247-text);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.job-defect-cost-card + .job-defect-cost-card { margin-top: 0; }
.job-defect-cost-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 0.1rem;
}
.job-defect-cost-fields { display: grid; gap: 0.35rem; }
.job-defect-cost-fields input,
.job-defect-fact input,
.job-defect-row input,
.job-defect-row textarea {
  font: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--i247-border);
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
  resize: vertical;
}
.job-defect-row {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  gap: 0.2rem 0.65rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}
.job-defect-fact { display: grid; gap: 0.25rem; margin-top: 0.45rem; }
.job-defect-fact-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--i247-muted);
  padding-top: 0.28rem;
}
.job-defect-parts {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.job-defect-parts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}
.job-defect-cost-copy { margin: 0; line-height: 1.35; }
.job-defect-cost-work { margin: 0.35rem 0 0; }
.job-defect-cost-body {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--i247-border-soft);
  display: grid;
  gap: 0.5rem;
}
.job-defect-cost-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}
.job-defect-cost-sum {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}
.job-defect-cost-job-charges {
  margin: 0.85rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--i247-border-soft);
}
.job-defect-cost-job-charges h3,
.job-additional-costs h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}
.job-defect-cost-job-charges h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}
.job-defect-section { margin: 0.85rem 0 0.35rem; }
.job-defect-section-head h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.job-defect-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px dashed var(--i247-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--i247-navy) 4%, var(--i247-card, #fff));
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.job-defect-add-desc {
  flex: 1 1 14rem;
  min-width: 10rem;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.job-defect-im {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.job-defect-im-select {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
  width: 100%;
  box-sizing: border-box;
}
.job-defect-row .job-defect-im input {
  flex: 0 1 7.5rem;
  width: 7.5rem;
  max-width: 100%;
}
.job-defect-work-cell {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.job-defect-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
.job-defect-quick-btn {
  margin: 0;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--i247-navy) 6%, var(--i247-card, #fff));
  color: var(--i247-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  white-space: nowrap;
}
.job-defect-quick-btn:hover {
  background: color-mix(in srgb, var(--i247-navy) 12%, var(--i247-card, #fff));
}
.job-defect-add-im {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
  box-sizing: border-box;
}
.job-defect-add-im-num {
  flex: 0 1 7.5rem;
  width: 7.5rem;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.additional-cost-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  margin: 0 0 0.75rem;
}
.additional-cost-check {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--i247-text);
}
.additional-cost-check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--i247-accent, #1e6fe3);
}
.additional-cost-check span {
  display: inline;
  font-size: 0.9rem;
  font-weight: 650;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
  padding: 0;
  white-space: nowrap;
}
.additional-cost-miles {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.additional-cost-miles span {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--i247-muted);
}
.additional-cost-miles input {
  width: 5.5rem;
  min-width: 5.5rem;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 6px;
  padding: 0.28rem 0.4rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.job-defect-parts-cell,
.job-defect-cost-cell { min-width: 0; }
.job-defect-parts-cell {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--i247-navy) 3.5%, transparent);
}
.job-defect-cost-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.25rem;
}
.job-defect-cost-add-empty {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--i247-border-soft);
}
.job-defect-cost-add-empty .parts-picker-add,
.job-defect-cost-add-empty .parts-hits {
  min-width: 0;
}
.job-defect-cost-add .cost-line-input { flex: 1 1 10rem; min-width: 8rem; }
.job-defect-menu-add {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.4rem;
  min-width: 0;
}
.job-defect-menu-add .parts-picker-add {
  grid-template-columns: minmax(0, 1fr) auto;
}
.menu-hits li {
  grid-template-areas:
    "name price"
    "sku sku"
    "actions actions";
  cursor: default;
}
.menu-hit-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.15rem;
}
.menu-hit-empty {
  cursor: default;
  color: var(--i247-muted);
}
.menu-price-swaps {
  margin: 0.75rem 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--i247-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--i247-blue-light) 35%, var(--i247-card));
}
.menu-price-swaps-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.menu-price-swaps ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.menu-price-swaps li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}
.menu-price-swap-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.4rem;
  min-width: 0;
}
.menu-price-swap-work { color: var(--i247-muted); }
.menu-price-swap-arrow { color: var(--i247-muted); }
.inline-cost-lines { display: grid; gap: 0.12rem; }
.inline-cost-line {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) 4.1rem 5.4rem 4.4rem auto;
  gap: 0.25rem 0.4rem;
  align-items: center;
  padding: 0.12rem 0;
  font-size: 0.86rem;
}
.inline-cost-line.muted { opacity: 0.6; }
.inline-cost-line.invoice-line-clickable { cursor: pointer; }
.inline-cost-line.invoice-line-editing {
  background: color-mix(in srgb, var(--i247-navy) 8%, transparent);
  border-radius: 6px;
  padding: 0.18rem 0.25rem;
}
.inline-cost-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.inline-cost-desc { min-width: 0; overflow-wrap: anywhere; }
.inline-cost-desc .badge { margin-left: 0.3rem; }
.inline-cost-qty,
.inline-cost-rate { color: var(--i247-muted); white-space: nowrap; }
.inline-cost-total { font-weight: 650; text-align: right; white-space: nowrap; }
.inline-cost-actions {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  justify-content: flex-end;
}
.inline-cost-actions-slot { min-width: 0; }
.inline-cost-remove {
  border: 0;
  background: transparent;
  color: var(--i247-muted);
  font-size: 1.15rem;
  width: 1.4rem;
  height: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.inline-cost-empty { margin: 0; }
.parts-picker.is-compact { gap: 0.45rem; }
.job-defect-cost-job-charges .invoice-add-line {
  padding: 0.4rem 0 0;
  border: 0;
  background: transparent;
}
.job-defect-cost-job-charges .invoice-add-line > strong { display: none; }
.job-defect-cost-job-charges .invoice-add-row { margin-top: 0.25rem; }
@media (max-width: 1100px) {
  .job-defect-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .job-defect-add-desc,
  .job-defect-add-im {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .job-defect-row {
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }
  .job-defect-fact-label { padding-top: 0; }
  .job-defect-cost-card { padding: 0.75rem 2.2rem 0.85rem 0.7rem; gap: 0.7rem; }
  .job-defect-quick { grid-template-columns: 1fr 1fr; }
  .job-defect-quick-btn { min-height: 2.5rem; }
  .job-defect-add-form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .job-defect-add-desc,
  .job-defect-add-sev,
  .job-defect-add-im,
  .job-defect-add-im-num,
  .job-defect-add-form .rz-button {
    width: 100%;
    flex: 1 1 auto;
    min-height: 2.75rem;
    box-sizing: border-box;
  }
  .additional-cost-flags {
    gap: 0.7rem 1rem;
  }
  .additional-cost-check,
  .additional-cost-miles {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
  }
  .job-defect-cost-add {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .job-defect-cost-add .rz-button,
  .job-defect-cost-add .cost-line-input {
    width: 100%;
    min-height: 2.75rem;
    box-sizing: border-box;
  }
  .job-defect-parts li span {
    overflow-wrap: anywhere;
    min-width: 0;
    flex: 1 1 8rem;
  }
  .job-defect-parts li .rz-button {
    min-height: 2.5rem;
  }
  .inline-cost-line {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "type desc actions"
      "qty rate total";
  }
  .inline-cost-type { grid-area: type; }
  .inline-cost-desc { grid-area: desc; }
  .inline-cost-actions,
  .inline-cost-actions-slot { grid-area: actions; }
  .inline-cost-qty { grid-area: qty; }
  .inline-cost-rate { grid-area: rate; }
  .inline-cost-total { grid-area: total; }
}
.office-cost-line { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid var(--i247-border-soft); font-size: 0.9rem; }
.office-cost-line:last-child { border-bottom: 0; }
.office-cost-total { display: flex; justify-content: space-between; margin-top: 0.65rem; font-weight: 700; }
.office-job-signoff {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  justify-content: space-between;
}
.cjv-ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.cjv-ins {
  border: 1px solid #e0e6ed;
  border-radius: 12px;
  padding: 0.75rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.cjv-ins.soon { border-color: #ffcc80; background: #fff8e1; }
.cjv-ins.expired { border-color: #ef9a9a; background: #ffebee; }
.cjv-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #455a64;
  padding: 0.5rem 0.25rem 0;
}
.cjv-footer-note { max-width: 360px; font-size: 0.82rem; color: #78909c; text-align: right; }

/* Defect photo thumbs (internal) */
.defect-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.defect-photo-thumb {
  width: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--i247-border);
  background: var(--i247-surface);
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.defect-photo-thumb img,
.defect-photo-thumb video {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #263238;
}
.defect-photo-thumb .cap {
  font-size: 0.68rem;
  color: var(--i247-muted);
  padding: 0.2rem 0.3rem 0.3rem;
}
.job-card-photo-row .defect-photo-thumb {
  width: 132px;
}
.job-card-photo-row .defect-photo-thumb img,
.job-card-photo-row .defect-photo-thumb video {
  height: 96px;
}
.defect-photo-thumb .media-video-label {
  font-weight: 700;
  color: var(--i247-text);
}
.defect-photo-stage {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--i247-muted);
  margin-top: 0.45rem;
}
.defect-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: rgba(33, 33, 33, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.defect-priority-head {
  margin: 0 0 0.75rem;
}

.defect-priority-head h3 {
  margin: 0 0 0.2rem;
  color: var(--i247-navy);
  font-size: 1.1rem;
}

.defect-priority-head p {
  margin: 0;
  color: var(--i247-muted);
  font-size: 0.9rem;
}

.defect-rectify-hint {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--i247-navy);
}

.defect-add-panel {
  border: 1px dashed var(--i247-border);
  background: var(--i247-surface);
}

.defect-done-heading {
  margin: 1.5rem 0 0.65rem;
  font-size: 1rem;
  color: var(--i247-muted);
}

/* Cleaner defect cards */
.defect-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.defect-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.defect-card-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: baseline;
  font-weight: 600;
  color: var(--i247-text);
  line-height: 1.35;
}
.defect-sev {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--i247-grey-bg);
  color: var(--i247-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.defect-card-meta {
  font-size: 0.82rem;
  color: var(--i247-muted);
  margin-top: 0.25rem;
}
.defect-card-body {
  display: grid;
  gap: 0.45rem;
}
.defect-card-media {
  margin-top: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--i247-border);
}
.media-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 0.55rem;
}
.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  margin: 0.45rem 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--i247-grey-bg, #eef2f6);
  color: var(--i247-text);
}
.upload-progress-track {
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--i247-navy, #0b1f3a) 12%, #fff);
  overflow: hidden;
}
.upload-progress-fill {
  display: block;
  height: 100%;
  background: var(--i247-blue, #1e6fe3);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.upload-progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--i247-muted, #5c6b7a);
}
.media-upload-label {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--i247-muted);
  min-width: 0;
  max-width: 100%;
}
.media-upload-label input[type="file"] {
  font-size: 16px;
  font-weight: 500;
  max-width: min(220px, 100%);
}
.media-error {
  color: var(--i247-red);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.check-pre-media {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(96, 125, 139, 0.35);
}
.check-pre-upload {
  margin-top: 0.4rem;
}
.cjv-photo-grid video {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #102a43;
}

/* Delete confirmation dialog */
.confirm-delete-dialog {
  outline: none;
}
.timesheet-hours-dialog {
  color: var(--i247-text);
  max-height: min(70vh, 36rem);
  overflow: auto;
}
.timesheet-hours-day {
  background: var(--i247-surface);
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.65rem;
  color: var(--i247-text);
}
.timesheet-hours-day h4 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.timesheet-hours-block {
  margin-top: 0.4rem;
}
.timesheet-hours-block strong {
  margin-right: 0.35rem;
}
.timesheet-hours-block ul {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}
.timesheet-hours-block li {
  margin: 0.15rem 0;
}

/* ========== Public marketing site ========== */
.public-shell {
  --public-navy: #071526;
  --public-navy-soft: #0b1f3a;
  --public-heading: #0b1f3a;
  --public-blue: #1e6fe3;
  --public-blue-bright: #3d8bfd;
  --public-gold: #f0b429;
  --public-ink: #10233f;
  --public-muted: #5b6b7c;
  --public-line: rgba(16, 35, 63, 0.1);
  --public-card: #ffffff;
  --public-surface: #f4f7fb;
  --public-field-bg: #ffffff;
  --public-field-border: rgba(16, 35, 63, 0.14);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--public-surface);
  color: var(--public-ink);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

.public-shell h1,
.public-shell h2,
.public-shell h3,
.public-shell h4,
.public-shell .public-btn,
.public-shell .public-nav-cta,
.public-shell .public-stats strong,
.public-shell .public-timeline-item > span {
  font-family: "Outfit", "DM Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* Default heading colour for body sections (overridden on hero/cta bands) */
.public-shell h1,
.public-shell h2,
.public-shell h3,
.public-shell h4 {
  color: var(--public-heading);
}

/* Theme-aware logos: keep brand detail in light, luminous version in dark */
.theme-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.theme-logo .logo-dark {
  display: none;
}

html[data-theme="dark"] .theme-logo .logo-light {
  display: none;
}

html[data-theme="dark"] .theme-logo .logo-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-logo .logo-light {
    display: none;
  }
  html:not([data-theme="light"]) .theme-logo .logo-dark {
    display: block;
  }
}

/* Nav + footer sit on dark bands — always prefer the luminous logo there */
.public-nav .theme-logo .logo-light,
.public-footer .theme-logo .logo-light {
  display: none;
}
.public-nav .theme-logo .logo-dark,
.public-footer .theme-logo .logo-dark {
  display: block;
}

.public-main {
  flex: 1;
}

.public-auth-check {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  color: var(--public-muted);
}

/* Nav */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
  background: linear-gradient(180deg, rgba(7, 21, 38, 0.88), rgba(7, 21, 38, 0.55) 70%, transparent);
  color: #fff;
}

.public-nav.is-solid {
  background: rgba(7, 21, 38, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(7, 21, 38, 0.18);
}

.public-nav-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.public-brand-logo {
  height: 42px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.public-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.public-brand-text strong {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.public-brand-text small {
  font-size: 0.72rem;
  opacity: 0.78;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
}

.public-nav-links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.public-nav-links a:hover,
.public-nav-links a.active {
  color: #fff;
  border-bottom-color: var(--public-gold);
}

.public-nav-cta {
  margin-left: 0.35rem;
  padding: 0.55rem 1rem !important;
  border-radius: 999px !important;
  border-bottom: none !important;
  background: linear-gradient(135deg, var(--public-blue), var(--public-blue-bright));
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(30, 111, 227, 0.35);
}

.public-nav-cta:hover {
  filter: brightness(1.05);
  border-bottom-color: transparent !important;
}

.public-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.public-nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Hero */
.public-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.public-hero-home {
  min-height: clamp(620px, 94vh, 920px);
  padding: 7.5rem 1.25rem 5.5rem;
}

.public-hero-home-content {
  max-width: 760px;
  margin: 0;
}

.public-hero-home h1 {
  max-width: 14ch;
}

.public-proof-row {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.public-proof-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 4;
  width: 28px;
  height: 44px;
  margin-left: -14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.public-scroll-cue span {
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  animation: public-scroll-dot 1.6s ease-in-out infinite;
}

@keyframes public-scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(10px); opacity: 1; }
}

.public-marquee {
  overflow: hidden;
  border-top: 1px solid var(--public-line);
  border-bottom: 1px solid var(--public-line);
  background: #fff;
  padding: 1.1rem 0;
  margin-top: 2.5rem;
}

.public-marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: public-marquee 36s linear infinite;
}

.public-marquee-track span {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--public-heading);
  opacity: 0.55;
  white-space: nowrap;
}

@keyframes public-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.public-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.public-how-step {
  background: #fff;
  border: 1px solid var(--public-line);
  border-radius: 24px;
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 12px 30px rgba(16, 35, 63, 0.05);
}

.public-how-step span {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--public-gold);
  margin-bottom: 0.7rem;
}

.public-how-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.public-how-step p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.55;
}

.public-service-num {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0b1f3a, #1e6fe3);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.public-media-kenburns {
  animation: public-media-drift 22s ease-in-out infinite alternate;
}

@keyframes public-media-drift {
  from { transform: scale(1.02); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

.public-hero-page {
  min-height: 420px;
  padding: 7.5rem 1.25rem 3.5rem;
}

.public-hero-media,
.public-hero-overlay {
  position: absolute;
  inset: 0;
}

.public-hero-media {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.public-hero-overlay {
  background:
    linear-gradient(120deg, rgba(7, 21, 38, 0.92) 0%, rgba(7, 21, 38, 0.72) 48%, rgba(11, 31, 58, 0.45) 100%),
    linear-gradient(0deg, rgba(7, 21, 38, 0.75), transparent 42%);
  z-index: 2;
}

/* Cinematic service-van hero slideshow */
.public-hero-vans {
  min-height: clamp(520px, 74vh, 780px);
}

.public-hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #071526;
}

.public-hero-slide {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  animation-name: public-van-hero-kenburns;
  animation-duration: 56s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform: scale(1.12);
}

.public-hero-slide-cinematic-wide {
  background-position: 46% 36%;
}

.public-hero-slide-cinematic-close {
  background-position: 38% 48%;
}

.public-hero-slide-1 {
  animation-delay: 0s;
  animation-name: public-van-hero-kenburns-first;
  opacity: 1;
}
.public-hero-slide-2 { animation-delay: 7s; }
.public-hero-slide-3 { animation-delay: 14s; }
.public-hero-slide-4 { animation-delay: 21s; }
.public-hero-slide-5 { animation-delay: 28s; }
.public-hero-slide-6 { animation-delay: 35s; }
.public-hero-slide-7 { animation-delay: 42s; }
.public-hero-slide-8 { animation-delay: 49s; }

/* Soft crossfade + slow cinematic drift. Eight-shot cycle (~7s each of 56s). */
@keyframes public-van-hero-kenburns {
  0% {
    opacity: 0;
    transform: scale(1.14) translate3d(2.2%, 0, 0);
  }
  4% {
    opacity: 1;
  }
  12.5% {
    opacity: 1;
    transform: scale(1.02) translate3d(-1.6%, -1.2%, 0);
  }
  16% {
    opacity: 0;
    transform: scale(1.01) translate3d(-2%, -1.4%, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.01) translate3d(-2%, -1.4%, 0);
  }
}

/* First slide starts fully visible (no black flash on load). */
@keyframes public-van-hero-kenburns-first {
  0% {
    opacity: 1;
    transform: scale(1.12) translate3d(1.5%, 0, 0);
  }
  12.5% {
    opacity: 1;
    transform: scale(1.02) translate3d(-1.6%, -1.2%, 0);
  }
  16% {
    opacity: 0;
    transform: scale(1.01) translate3d(-2%, -1.4%, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.01) translate3d(-2%, -1.4%, 0);
  }
}

.public-hero-slide-2,
.public-hero-slide-4,
.public-hero-slide-6,
.public-hero-slide-8 {
  animation-name: public-van-hero-kenburns-alt;
}

@keyframes public-van-hero-kenburns-alt {
  0% {
    opacity: 0;
    transform: scale(1.12) translate3d(-2%, 1%, 0);
  }
  4% {
    opacity: 1;
  }
  12.5% {
    opacity: 1;
    transform: scale(1.03) translate3d(1.8%, -0.8%, 0);
  }
  16% {
    opacity: 0;
    transform: scale(1.02) translate3d(2.2%, -1%, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.02) translate3d(2.2%, -1%, 0);
  }
}

.public-hero-overlay-vans {
  background:
    linear-gradient(115deg, rgba(5, 16, 30, 0.9) 0%, rgba(7, 21, 38, 0.68) 46%, rgba(11, 31, 58, 0.38) 100%),
    linear-gradient(0deg, rgba(5, 16, 30, 0.78) 0%, transparent 48%);
}

.public-hero-overlay-cinematic {
  background:
    radial-gradient(120% 90% at 72% 58%, transparent 8%, rgba(4, 10, 18, 0.22) 58%, rgba(4, 10, 18, 0.7) 100%),
    linear-gradient(112deg, rgba(4, 10, 18, 0.88) 0%, rgba(7, 21, 38, 0.52) 44%, rgba(11, 31, 58, 0.16) 100%),
    linear-gradient(0deg, rgba(4, 10, 18, 0.82) 0%, transparent 50%);
}

.public-hero-overlay-cinematic::after {
  opacity: 0.16;
}

.public-feature-media-van {
  background-position: center 40%;
  transition: transform 0.7s ease;
}

.public-feature-row:hover .public-feature-media-van {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .public-hero-video,
  .public-media-clip video,
  .public-split-media video {
    display: none;
  }

  .public-hero-slide {
    animation: none !important;
    opacity: 0;
    transform: none;
  }

  .public-hero-slide-1 {
    opacity: 1;
  }

  .public-feature-row:hover .public-feature-media-van {
    transform: none;
  }

  .public-marquee-track,
  .public-media-kenburns,
  .public-scroll-cue span,
  .news-gallery.is-animated .news-gallery-slide.is-active img,
  .public-news-card-media {
    animation: none !important;
  }

  .public-news-card:hover {
    transform: none;
  }
}

.public-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.public-hero h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  max-width: 16ch;
  text-wrap: balance;
}

.public-hero-page h1 {
  max-width: 18ch;
}

.public-hero-content h1 {
  color: #fff;
}

.public-hero-lead {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.public-eyebrow {
  margin: 0 0 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--public-gold);
}

.public-eyebrow.light {
  color: #ffe08a;
}

.public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.public-hero-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.public-hero-meta a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.public-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

/* Buttons */
.public-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.public-btn:hover {
  transform: translateY(-1px);
}

.public-btn-primary {
  background: linear-gradient(135deg, var(--public-blue), #4ea0ff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(30, 111, 227, 0.32);
}

.public-btn-secondary {
  background: #fff;
  color: var(--public-navy-soft);
  border-color: rgba(16, 35, 63, 0.08);
  box-shadow: 0 8px 20px rgba(16, 35, 63, 0.08);
}

.public-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.public-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Sections */
.public-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.public-section-muted {
  max-width: none;
  background: linear-gradient(180deg, #eef3f9 0%, #f7f9fc 100%);
  border-top: 1px solid rgba(16, 35, 63, 0.05);
  border-bottom: 1px solid rgba(16, 35, 63, 0.05);
}

.public-section-muted > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.public-section-muted .public-section-head,
.public-section-muted .public-pill-grid,
.public-section-muted .public-quote-grid,
.public-section-muted .public-value-grid,
.public-section-muted .public-role-grid,
.public-section-muted .public-news-grid,
.public-section-muted .public-timeline,
.public-section-muted .public-hero-actions {
  padding-left: 0;
  padding-right: 0;
}

.public-section-head {
  max-width: 44rem;
  margin-bottom: 2.25rem;
}

.public-section-head h2,
.public-split-copy h2,
.public-feature-copy h2,
.public-about-intro h2,
.public-contact-panel h2,
.public-contact-form-shell h2,
.public-contact-success h2,
.public-coverage-card h2,
.public-coverage-card h3,
.public-about-intro h3,
.public-about-panel h3,
.public-timeline-item h3,
.public-value-card h3,
.public-role-card h3,
.public-news-card h3,
.public-prose-card h2,
.public-contact-aside h3,
.public-cta-band h2 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--public-heading);
}

.public-coverage-card h3,
.public-about-intro h3,
.public-about-panel h3,
.public-service-card h3,
.public-timeline-item h3,
.public-value-card h3,
.public-role-card h3,
.public-news-card h3,
.public-contact-aside h3 {

  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 0 0 0.55rem;
}

.public-section-head p,
.public-split-copy p,
.public-feature-copy p,
.public-about-intro p,
.public-contact-panel p,
.public-coverage-card p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.65;
  font-size: 1.05rem;
}

/* Stats */
.public-stats {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
  padding: 0 1.25rem;
}

.public-stats-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.35rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(7, 21, 38, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.public-stats-grid div {
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.public-stats-grid strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--public-heading);
  font-weight: 800;
  line-height: 1.1;
}

.public-stats-grid span {
  display: block;
  margin-top: 0.35rem;
  color: var(--public-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

/* Service cards */
.public-service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.public-service-card {
  background: var(--public-card);
  border: 1px solid var(--public-line);
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(16, 35, 63, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.public-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(16, 35, 63, 0.1);
}

.public-service-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f1ff, #f4f8ff);
  font-size: 1.45rem;
}

.public-service-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--public-navy-soft);
}

.public-service-card p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.55;
  flex: 1;
}

.public-service-card a {
  color: var(--public-blue);
  font-weight: 700;
  text-decoration: none;
}

/* Split / feature */
.public-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 520px;
  background: #fff;
}

.public-split-media,
.public-feature-media {
  background-size: cover;
  background-position: center;
  min-height: 280px;
}

.public-split-copy,
.public-feature-copy {
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.public-checklist {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.public-checklist li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--public-ink);
  font-weight: 600;
  line-height: 1.45;
}

.public-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--public-blue), var(--public-gold)) border-box;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 2px #fff;
}

.public-feature-stack {
  display: grid;
  gap: 1.25rem;
}

.public-feature-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--public-line);
  box-shadow: 0 14px 36px rgba(16, 35, 63, 0.06);
}

.public-feature-row.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.public-feature-row.reverse .public-feature-copy {
  order: 2;
}

.public-feature-row.reverse .public-feature-media {
  order: 1;
}

/* Quotes / pills / timeline */
.public-quote-grid,
.public-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.public-quote,
.public-pill-card,
.public-about-panel,
.public-coverage-card,
.public-contact-card,
.public-contact-panel {
  background: #fff;
  border: 1px solid var(--public-line);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(16, 35, 63, 0.05);
}

.public-quote {
  margin: 0;
  padding: 1.5rem;
}

.public-quote p {
  margin: 0 0 1.1rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--public-ink);
}

.public-quote footer {
  display: grid;
  gap: 0.15rem;
}

.public-quote strong {
  color: var(--public-navy-soft);
}

.public-quote span {
  color: var(--public-muted);
  font-size: 0.92rem;
}

.public-pill-card {
  padding: 1.25rem 1.35rem;
  display: grid;
  gap: 0.35rem;
}

.public-pill-card strong {
  font-size: 1.05rem;
}

.public-pill-card span {
  color: var(--public-muted);
  line-height: 1.5;
}

.public-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.public-timeline-item {
  background: #fff;
  border-radius: 22px;
  padding: 1.25rem;
  border: 1px solid var(--public-line);
  box-shadow: 0 10px 24px rgba(16, 35, 63, 0.04);
}

.public-timeline-item > span {
  display: inline-flex;
  margin-bottom: 0.7rem;
  color: var(--public-blue);
  font-weight: 800;
  font-size: 0.95rem;
}

.public-timeline-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  color: var(--public-navy-soft);
}

.public-timeline-item p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.55;
}

/* About / coverage / contact */
.public-about-intro,
.public-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 1.35rem;
  align-items: start;
}

.public-contact-form-shell {
  position: relative;
  padding: 1.65rem 1.7rem 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--public-line);
  background:
    radial-gradient(circle at top right, rgba(61, 139, 253, 0.12), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--public-card) 92%, #fff), var(--public-card));
  box-shadow: 0 22px 48px rgba(7, 21, 38, 0.08);
  overflow: hidden;
}

.public-contact-form-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--public-blue), #4ea0ff 55%, #f0b429);
}

.public-contact-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.public-contact-form-head h2 {
  margin: 0.15rem 0 0.55rem;
}

.public-contact-form-badge {
  flex: 0 0 auto;
  display: grid;
  gap: 0.15rem;
  min-width: 8.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--public-blue) 10%, var(--public-card));
  border: 1px solid color-mix(in srgb, var(--public-blue) 22%, transparent);
  text-align: center;
}

.public-contact-form-badge strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--public-blue);
}

.public-contact-form-badge span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--public-heading);
}

.public-contact-aside {
  display: grid;
  gap: 0.95rem;
}

.public-contact-aside-intro h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  color: var(--public-heading);
}

.public-contact-aside-intro p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.55;
}

.public-contact-aside-note {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--public-line);
  background:
    radial-gradient(circle at top left, rgba(61, 139, 253, 0.14), transparent 50%),
    var(--public-card);
}

.public-contact-aside-note strong {
  color: var(--public-heading);
  font-size: 0.98rem;
}

.public-contact-aside-note span {
  color: var(--public-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.public-text-link {
  color: var(--public-blue);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.public-text-link:hover {
  text-decoration: underline;
}

/* Team vCard / business card strip on contact page */
.public-vcard-grid {
  display: grid;
  gap: 1.25rem;
}

.public-vcard-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.7fr) minmax(240px, 0.95fr);
  gap: 1.15rem;
  align-items: stretch;
  padding: 1.35rem;
  border-radius: 28px;
  border: 1px solid var(--public-line);
  background:
    radial-gradient(circle at top right, rgba(61, 139, 253, 0.12), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--public-card) 92%, #fff), var(--public-card));
  box-shadow: 0 18px 42px rgba(7, 21, 38, 0.07);
}

.public-vcard-copy {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-width: 0;
}

.public-vcard-copy h3 {
  margin: 0.1rem 0 0.15rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  color: var(--public-heading);
}

.public-vcard-title {
  margin: 0 0 0.55rem;
  color: var(--public-blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.public-vcard-meta {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.public-vcard-meta li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.public-vcard-meta li > span:first-child {
  color: var(--public-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-vcard-meta a,
.public-vcard-meta li > span:last-child {
  color: var(--public-ink);
  text-decoration: none;
  word-break: break-word;
}

.public-vcard-meta a:hover {
  color: var(--public-blue);
  text-decoration: underline;
}

.public-vcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.public-vcard-qr-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 1rem 0.85rem;
  border-radius: 22px;
  border: 1px solid var(--public-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 251, 0.95));
  text-align: center;
}

.public-vcard-qr-link {
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(16, 35, 63, 0.08);
  box-shadow: 0 10px 24px rgba(7, 21, 38, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.public-vcard-qr-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 35, 63, 0.12);
}

.public-vcard-qr-link img {
  width: min(220px, 100%);
  height: auto;
  display: block;
  border-radius: 8px;
}

.public-vcard-qr-caption {
  font-weight: 700;
  color: var(--public-heading);
  font-size: 0.95rem;
}

.public-vcard-qr-note {
  color: var(--public-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 14rem;
}

.public-vcard-preview {
  margin: 0;
  display: grid;
  align-content: center;
  gap: 0.55rem;
  min-width: 0;
}

.public-vcard-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(16, 35, 63, 0.08);
  box-shadow: 0 16px 34px rgba(7, 21, 38, 0.12);
  background: #fff;
}

.public-vcard-preview figcaption {
  color: var(--public-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.public-vcard-previews {
  display: grid;
  gap: 0.85rem;
  align-content: center;
  min-width: 0;
}

.public-contact-success {
  text-align: center;
  padding: 1.25rem 0.5rem 0.35rem;
}

.public-contact-success-icon {
  display: inline-flex;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 10px 18px rgba(30, 111, 227, 0.28));
}

.public-contact-success .public-hero-actions {
  justify-content: center;
}

.public-about-panel,
.public-contact-panel {
  padding: 1.5rem;
}

.public-about-panel h3,
.public-coverage-card h3 {
  margin: 0 0 0.85rem;
  color: var(--public-navy-soft);
}

.public-coverage-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.public-coverage-card {
  padding: 1.5rem;
}

.public-coverage-card.featured {
  grid-row: span 3;
  background:
    radial-gradient(circle at top right, rgba(61, 139, 253, 0.16), transparent 40%),
    linear-gradient(160deg, #0b1f3a, #102b4d 55%, #0a1930);
  color: #fff;
  border: none;
}

.public-coverage-card.featured h2,
.public-coverage-card.featured .public-eyebrow {
  color: #fff;
}

.public-coverage-card.featured .public-eyebrow {
  color: #ffe08a;
}

.public-coverage-card.featured p {
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 1.25rem;
}

.public-contact-cards {
  display: grid;
  gap: 0.75rem;
}

.public-contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  border: 1px solid var(--public-line);
  background: var(--public-card);
  box-shadow: 0 10px 24px rgba(7, 21, 38, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.public-contact-card:not(.static):hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--public-blue) 35%, var(--public-line));
  box-shadow: 0 16px 34px rgba(16, 35, 63, 0.1);
}

.public-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 14px;
  color: var(--public-blue);
  background: color-mix(in srgb, var(--public-blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--public-blue) 18%, transparent);
  flex: 0 0 auto;
}

.public-contact-card-body {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.public-contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--public-blue);
}

.public-contact-card strong {
  font-size: 1.02rem;
  color: var(--public-navy-soft);
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.public-contact-card-body > span:last-child {
  color: var(--public-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.public-contact-note {
  margin: 0.85rem 0 0 !important;
  font-size: 0.9rem !important;
  color: var(--public-muted) !important;
  line-height: 1.5 !important;
}

/* CTA band */
.public-cta-band {
  background:
    radial-gradient(circle at 15% 20%, rgba(61, 139, 253, 0.28), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(240, 180, 41, 0.18), transparent 26%),
    linear-gradient(135deg, #071526, #0b1f3a 55%, #12315a);
  color: #fff;
  padding: 4rem 1.25rem;
}

.public-cta-band-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.public-cta-band h2 {
  color: #fff !important;
  max-width: 16ch;
}

.public-cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  max-width: 36rem;
  line-height: 1.6;
}

/* Footer */
.public-footer {
  background: #06111f;
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 1.25rem 1.25rem;
  margin-top: auto;
}

.public-footer-grid {
  max-width: 1180px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1.1fr;
  gap: 1.5rem;
}

.public-footer h4 {
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: 0.95rem;
}

.public-footer a,
.public-footer p {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
  line-height: 1.55;
  margin: 0 0 0.35rem;
}

.public-footer a:hover {
  color: #fff;
}

.public-footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.public-footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.05);
}

.public-footer-brand strong {
  display: block;
  color: #fff;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.public-footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Dark theme polish for public pages */
html[data-theme="dark"] .public-shell {
  --public-card: #152233;
  --public-surface: #0c121a;
  --public-ink: #e8eef3;
  --public-heading: #f3f7fb;
  --public-muted: #9aafc0;
  --public-line: rgba(232, 238, 243, 0.1);
  --public-field-bg: #101822;
  --public-field-border: rgba(232, 238, 243, 0.16);
}

html[data-theme="dark"] .public-how-step,
html[data-theme="dark"] .public-marquee,
html[data-theme="dark"] .public-service-card,
html[data-theme="dark"] .public-feature-row,
html[data-theme="dark"] .public-quote,
html[data-theme="dark"] .public-pill-card,
html[data-theme="dark"] .public-about-panel,
html[data-theme="dark"] .public-coverage-card,
html[data-theme="dark"] .public-contact-card,
html[data-theme="dark"] .public-contact-panel,
html[data-theme="dark"] .public-contact-form-shell,
html[data-theme="dark"] .public-contact-aside-note,
html[data-theme="dark"] .public-timeline-item,
html[data-theme="dark"] .public-stats-grid,
html[data-theme="dark"] .public-split {
  background: var(--public-card);
}

html[data-theme="dark"] .public-section-muted {
  background: linear-gradient(180deg, #101822 0%, #0d141d 100%);
}

html[data-theme="dark"] .public-btn-secondary {
  background: #1a2736;
  color: #e8eef3;
}

html[data-theme="dark"] .public-service-icon {
  background: linear-gradient(145deg, #1a334d, #152233);
}

html[data-theme="dark"] .public-contact-card strong,
html[data-theme="dark"] .public-stats-grid strong,
html[data-theme="dark"] .public-shell h1,
html[data-theme="dark"] .public-shell h2,
html[data-theme="dark"] .public-shell h3,
html[data-theme="dark"] .public-shell h4 {
  color: var(--public-heading);
}

/* Keep light text on photo heroes / navy CTA bands even in dark mode */
html[data-theme="dark"] .public-hero-content h1,
html[data-theme="dark"] .public-cta-band h2,
html[data-theme="dark"] .public-cta-band h3 {
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .public-shell {
    --public-card: #152233;
    --public-surface: #0c121a;
    --public-ink: #e8eef3;
    --public-heading: #f3f7fb;
    --public-muted: #9aafc0;
    --public-line: rgba(232, 238, 243, 0.1);
    --public-field-bg: #101822;
    --public-field-border: rgba(232, 238, 243, 0.16);
  }

  html:not([data-theme="light"]) .public-how-step,
  html:not([data-theme="light"]) .public-marquee,
  html:not([data-theme="light"]) .public-service-card,
  html:not([data-theme="light"]) .public-feature-row,
  html:not([data-theme="light"]) .public-quote,
  html:not([data-theme="light"]) .public-pill-card,
  html:not([data-theme="light"]) .public-about-panel,
  html:not([data-theme="light"]) .public-coverage-card,
  html:not([data-theme="light"]) .public-contact-card,
  html:not([data-theme="light"]) .public-contact-panel,
  html:not([data-theme="light"]) .public-contact-form-shell,
  html:not([data-theme="light"]) .public-contact-aside-note,
  html:not([data-theme="light"]) .public-timeline-item,
  html:not([data-theme="light"]) .public-stats-grid,
  html:not([data-theme="light"]) .public-split {
    background: var(--public-card);
  }

  html:not([data-theme="light"]) .public-section-muted {
    background: linear-gradient(180deg, #101822 0%, #0d141d 100%);
  }

  html:not([data-theme="light"]) .public-btn-secondary {
    background: #1a2736;
    color: #e8eef3;
  }

  html:not([data-theme="light"]) .public-service-icon {
    background: linear-gradient(145deg, #1a334d, #152233);
  }

  html:not([data-theme="light"]) .public-contact-card strong,
  html:not([data-theme="light"]) .public-stats-grid strong,
  html:not([data-theme="light"]) .public-shell h1,
  html:not([data-theme="light"]) .public-shell h2,
  html:not([data-theme="light"]) .public-shell h3,
  html:not([data-theme="light"]) .public-shell h4 {
    color: var(--public-heading);
  }

  html:not([data-theme="light"]) .public-hero-content h1,
  html:not([data-theme="light"]) .public-cta-band h2,
  html:not([data-theme="light"]) .public-cta-band h3 {
    color: #fff;
  }
}

/* Contact form */
.public-contact-form-lead {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.6;
  max-width: 38rem;
}

.public-contact-form {
  margin-top: 1.15rem;
}

.public-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1rem;
}

.public-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.public-field-full {
  grid-column: 1 / -1;
}

.public-field > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--public-heading);
  letter-spacing: 0.01em;
}

.public-field > span em {
  color: var(--public-blue);
  font-style: normal;
  font-weight: 800;
}

.public-field input,
.public-field textarea {
  border: 1px solid var(--public-field-border);
  background: var(--public-field-bg);
  color: var(--public-ink);
  border-radius: 16px;
  padding: 0.88rem 1rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.public-field input::placeholder,
.public-field textarea::placeholder {
  color: color-mix(in srgb, var(--public-muted) 82%, transparent);
}

.public-field textarea {
  resize: vertical;
  min-height: 9rem;
}

.public-field input:hover,
.public-field textarea:hover {
  border-color: color-mix(in srgb, var(--public-blue) 35%, var(--public-field-border));
}

.public-field input:focus,
.public-field textarea:focus {
  border-color: color-mix(in srgb, var(--public-blue) 75%, var(--public-field-border));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--public-blue) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.public-form-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: color-mix(in srgb, #c62828 12%, var(--public-card));
  color: #c62828;
  border: 1px solid color-mix(in srgb, #c62828 28%, transparent);
  font-size: 0.92rem;
}

.public-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.public-field-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
}

.public-field-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--public-blue);
  box-shadow: none;
  border-radius: 4px;
  padding: 0;
}

.public-field-check > span {
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--public-ink);
}

.public-form-footer {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--public-line);
}

.public-form-actions {
  margin-top: 0;
}

.public-contact-form .public-btn,
.public-contact-success .public-btn {
  border: none;
  cursor: pointer;
}

.public-btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 11.5rem;
}

.public-btn-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: public-spin 0.7s linear infinite;
}

@keyframes public-spin {
  to { transform: rotate(360deg); }
}

.public-contact-form .public-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* Van map pin (Leaflet DivIcon) */
.public-van-pin-marker {
  background: transparent !important;
  border: none !important;
}

.public-van-pin {
  width: 48px;
  height: 60px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 10px rgba(7, 21, 38, 0.28));
  transform-origin: 50% 90%;
  transition: transform 0.15s ease;
}

.public-van-pin-marker:hover .public-van-pin,
.leaflet-marker-icon:hover .public-van-pin {
  transform: translateY(-2px) scale(1.04);
}

.public-van-pin svg {
  display: block;
  width: 48px;
  height: 60px;
  overflow: visible;
}

/* Clustered van-pin badge (Leaflet.markercluster) — matches the pin gradient. */
.coverage-cluster-icon {
  background: transparent !important;
  border: none !important;
}

.coverage-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-family: "Outfit", "DM Sans", system-ui, sans-serif;
  background: linear-gradient(135deg, #4EA0FF 0%, #1E6FE3 45%, #1250B4 100%);
  border: 2px solid #fff;
  box-shadow: 0 6px 12px rgba(7, 21, 38, 0.32);
  transition: transform 0.15s ease;
}

.coverage-cluster span {
  font-size: 0.9rem;
  line-height: 1;
}

.coverage-cluster-icon:hover .coverage-cluster {
  transform: scale(1.06);
}

/* Contact form dark refinements */
html[data-theme="dark"] .public-contact-form-shell {
  background:
    radial-gradient(circle at top right, rgba(61, 139, 253, 0.16), transparent 36%),
    linear-gradient(180deg, #121c28, #0f1720);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .public-contact-form-badge {
  background: rgba(61, 139, 253, 0.12);
  border-color: rgba(61, 139, 253, 0.28);
}

html[data-theme="dark"] .public-contact-icon {
  background: rgba(61, 139, 253, 0.14);
  border-color: rgba(61, 139, 253, 0.24);
}

html[data-theme="dark"] .public-field input,
html[data-theme="dark"] .public-field textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}



/* Coverage map */
.public-map-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--public-line);
  box-shadow: 0 18px 40px rgba(7, 21, 38, 0.1);
  background: var(--public-card);
}

.public-map {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 320px;
  z-index: 1;
}

.public-map-fallback {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--public-card) 92%, transparent);
  border: 1px solid var(--public-line);
  color: var(--public-muted);
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
}

.public-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.public-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  background: var(--public-card);
  border: 1px solid var(--public-line);
  min-width: 12rem;
}

.public-map-legend-item strong {
  display: block;
  color: var(--public-heading);
  font-size: 0.92rem;
}

.public-map-legend-item span {
  display: block;
  color: var(--public-muted);
  font-size: 0.82rem;
}

.public-map-popup {
  font-family: "DM Sans", system-ui, sans-serif;
  min-width: 9rem;
}

.public-map-popup strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #0b1f3a;
}

.public-map-popup-pc {
  font-weight: 600;
  color: #1e6fe3;
  font-size: 0.86rem;
}

.public-map-popup-notes {
  margin-top: 0.25rem;
  color: #5b6b7c;
  font-size: 0.84rem;
  line-height: 1.4;
}

.admin-map-shell {
  border: 1px solid var(--rz-base-300, #e0e6ed);
  border-radius: 16px;
  padding: 0.85rem;
  background: var(--rz-base-50, #f8fafc);
}

.admin-coverage-map {
  min-height: 320px;
  height: 360px;
  border-radius: 12px;
}

html[data-theme="dark"] .admin-map-shell,
html.dark .admin-map-shell {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}


.leaflet-container {
  font: inherit;
  background: #d9e2ec;
  isolation: isolate;
  position: relative;
  z-index: 0;
}

html[data-theme="dark"] .leaflet-container,
html:not([data-theme="light"]) .leaflet-container {
  background: #0f1720;
}

.leaflet-control-attribution {
  font-size: 10px !important;
  background: color-mix(in srgb, var(--public-card) 88%, transparent) !important;
  color: var(--public-muted) !important;
}


/* Value / role / news / prose cards */
.public-value-grid,
.public-role-grid,
.public-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.public-role-grid {
  grid-template-columns: repeat(2, 1fr);
}

.public-news-grid {
  grid-template-columns: repeat(2, 1fr);
}

.public-value-card,
.public-role-card,
.public-news-card,
.public-prose-card {
  background: var(--public-card);
  border: 1px solid var(--public-line);
  border-radius: 22px;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 10px 30px rgba(16, 35, 63, 0.05);
}

.public-value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.55rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  font-family: "Outfit", "DM Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1e6fe3;
  background: rgba(30, 111, 227, 0.12);
  border: 1px solid rgba(30, 111, 227, 0.18);
}

.public-value-card p,
.public-role-card p,
.public-news-card p {
  margin: 0;
  color: var(--public-muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.public-role-card .public-checklist {
  margin-top: 1rem;
}

.public-quote-grid-wide {
  grid-template-columns: repeat(2, 1fr);
}

.public-aside-points {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.public-aside-points div {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: var(--public-card);
  border: 1px solid var(--public-line);
}

.public-aside-points strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--public-heading);
  font-size: 0.98rem;
}

.public-aside-points span {
  color: var(--public-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.public-news-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
}

.public-news-card time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e6fe3;
}

.public-news-tag {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--public-heading);
  background: rgba(7, 21, 38, 0.05);
  border: 1px solid var(--public-line);
}

.public-news-empty {
  margin: 0;
  color: var(--public-muted);
  text-align: center;
}

.public-news-featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding: 0.85rem;
  border-radius: 28px;
  background: var(--public-card);
  border: 1px solid var(--public-line);
  box-shadow: 0 16px 40px rgba(16, 35, 63, 0.06);
}

.public-news-featured-media {
  display: block;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
}

.public-news-featured-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0.75rem 0.75rem 0;
}

.public-news-featured-copy h3,
.public-news-card h3 {
  margin: 0;
}

.public-news-featured-copy h3 a,
.public-news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.public-news-featured-copy h3 a:hover,
.public-news-card h3 a:hover {
  color: #1e6fe3;
}

.public-news-featured-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.public-news-read {
  font-weight: 700;
  color: #1e6fe3;
  text-decoration: none;
}

.public-news-read:hover {
  text-decoration: underline;
}

.public-news-card-media {
  padding: 0.85rem 0.85rem 1.2rem;
  animation: news-card-rise 0.7s ease both;
  animation-delay: var(--news-stagger, 0ms);
}

.public-news-card-media-link {
  display: block;
  margin: 0 0 0.9rem;
  border-radius: 18px;
  overflow: hidden;
}

.public-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(16, 35, 63, 0.1);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-gallery {
  position: relative;
  overflow: hidden;
  background: #0b1f3a;
}

.news-gallery-card {
  aspect-ratio: 16 / 10;
}

.news-gallery-featured,
.news-gallery-article {
  min-height: 100%;
  height: 100%;
}

.public-hero-news-article .news-gallery-article {
  position: absolute;
  inset: 0;
}

.news-gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: #9ec4ff;
  letter-spacing: 0.08em;
  font-weight: 700;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 111, 227, 0.35), transparent 42%),
    linear-gradient(135deg, #0b1f3a, #16325a);
}

.news-gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.15s ease;
}

.news-gallery-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.news-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

.news-gallery.is-animated .news-gallery-slide.is-active img {
  animation: news-kenburns 6.4s ease-out forwards;
}

.news-gallery.is-animated .news-gallery-slide.is-active.is-alt img {
  animation-name: news-kenburns-alt;
}

.news-gallery-caption {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #fff;
  background: rgba(7, 21, 38, 0.55);
  backdrop-filter: blur(8px);
}

.news-gallery-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0.55rem;
  display: flex;
  gap: 0.35rem;
  transform: translateX(-50%);
}

.news-gallery-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.news-gallery-dots span.is-active {
  background: #fff;
  transform: scale(1.15);
}

.news-gallery-featured .news-gallery-dots,
.news-gallery-article .news-gallery-dots {
  bottom: 1rem;
}

@keyframes news-kenburns {
  from { transform: scale(1.12) translate3d(1.4%, 0, 0); }
  to { transform: scale(1.02) translate3d(-1.2%, -1%, 0); }
}

@keyframes news-kenburns-alt {
  from { transform: scale(1.1) translate3d(-1.6%, 1%, 0); }
  to { transform: scale(1.03) translate3d(1.4%, -0.8%, 0); }
}

@keyframes news-card-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.news-admin-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.news-admin-media-item {
  display: grid;
  gap: 0.4rem;
}

.news-admin-media-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: #0b1f3a;
}

.public-news-article-body p {
  line-height: 1.7;
}

.public-prose {
  max-width: 860px;
  margin: 0 auto;
}

.public-prose-lead {
  margin: 0 0 1.5rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--public-muted);
}

.public-prose-card {
  margin-bottom: 1rem;
}

.public-prose-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem) !important;
  margin: 0 0 0.75rem !important;
}

.public-prose-card p,
.public-prose-card li {
  color: var(--public-muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.public-prose-card ul,
.public-prose-card ol {
  margin: 0.65rem 0 0.85rem;
  padding-left: 1.2rem;
}

.public-prose-card li + li {
  margin-top: 0.35rem;
}

.public-prose-alpha {
  list-style: upper-alpha;
}

.public-prose-note {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  background: rgba(30, 111, 227, 0.08);
  border: 1px solid rgba(30, 111, 227, 0.14);
  color: var(--public-muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.public-footer-address {
  margin: 0.85rem 0 0;
  color: var(--public-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.public-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--public-line);
  background-color: var(--public-card);
  background-image:
    linear-gradient(45deg, transparent 50%, #1e6fe3 50%),
    linear-gradient(135deg, #1e6fe3 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--public-heading);
  border-radius: 14px;
  padding: 0.8rem 2.2rem 0.8rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.public-field select:focus {
  border-color: rgba(30, 111, 227, 0.55);
  box-shadow: 0 0 0 4px rgba(30, 111, 227, 0.14);
}

html[data-theme="dark"] .public-news-tag,
html.dark .public-news-tag {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .public-value-icon,
html.dark .public-value-icon {
  color: #7eb6ff;
  background: rgba(126, 182, 255, 0.12);
  border-color: rgba(126, 182, 255, 0.22);
}


/* Responsive */
@media (max-width: 980px) {
  .public-service-grid,
  .public-stats-grid,
  .public-how-grid,
  .public-timeline,
  .public-quote-grid,
  .public-quote-grid-wide,
  .public-pill-grid,
  .public-value-grid,
  .public-role-grid,
  .public-news-grid,
  .public-news-featured,
  .public-footer-grid,
  .public-coverage-grid,
  .public-about-intro,
  .public-split,
  .public-feature-row,
  .public-feature-row.reverse {
    grid-template-columns: 1fr 1fr;
  }

  .public-coverage-card.featured {
    grid-row: auto;
  }

  .public-feature-row.reverse .public-feature-copy,
  .public-feature-row.reverse .public-feature-media {
    order: initial;
  }

  .public-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .public-contact-layout {
    grid-template-columns: 1fr;
  }

  .public-contact-form-head {
    flex-direction: column;
  }

  .public-contact-form-badge {
    align-self: flex-start;
  }

  .public-vcard-card {
    grid-template-columns: 1fr 220px;
  }

  .public-vcard-previews {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .public-form-grid {
    grid-template-columns: 1fr;
  }

  .public-contact-form-shell {
    padding: 1.25rem 1.1rem 1.2rem;
    border-radius: 22px;
  }

  .public-vcard-card {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .public-vcard-meta li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .public-vcard-actions .public-btn {
    width: 100%;
    justify-content: center;
  }

  .public-btn-send {
    width: 100%;
  }

  .public-nav-toggle {
    display: inline-flex;
  }

  .public-nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem;
    border-radius: 18px;
    background: rgba(7, 21, 38, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .public-nav-links.is-open {
    display: flex;
  }

  .public-nav-links a {
    padding: 0.8rem 0.85rem;
    border-bottom: none;
    border-radius: 12px;
  }

  .public-nav-links a:hover,
  .public-nav-links a.active {
    background: rgba(255, 255, 255, 0.06);
  }

  .public-nav-cta {
    margin-left: 0;
    text-align: center;
    justify-content: center;
  }

  .public-brand-text {
    display: none;
  }

  .public-hero-home {
    min-height: 92vh;
    padding-top: 6.5rem;
  }

  .public-service-grid,
  .public-stats-grid,
  .public-how-grid,
  .public-timeline,
  .public-quote-grid,
  .public-quote-grid-wide,
  .public-pill-grid,
  .public-value-grid,
  .public-role-grid,
  .public-news-grid,
  .public-news-featured,
  .public-footer-grid,
  .public-coverage-grid,
  .public-about-intro,
  .public-contact-layout,
  .public-split,
  .public-feature-row,
  .public-feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .public-stats {
    margin-top: -1.5rem;
  }

  .public-cta-band-inner {
    align-items: flex-start;
  }
}


/* === theme-aware utility classes (induction + global) === */
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.stack-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.panel-heading {
  margin-top: 0;
  color: var(--i247-text);
}
.section-heading {
  margin: 1.1rem 0 0.5rem;
  color: var(--i247-navy);
  font-size: 1rem;
  font-weight: 650;
}
.form-label-strong {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
  color: var(--i247-text);
}
.form-field-block { margin-bottom: 0.65rem; }
.field-help { font-size: 0.8rem; margin-bottom: 0.25rem; }
.required-mark { color: var(--i247-red); font-weight: 700; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.8rem; }
.soft-surface {
  background: var(--i247-surface);
  border: 1px solid var(--i247-border-soft);
  border-radius: 8px;
  color: var(--i247-text);
}
.step-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.step-chip {
  border: 1px solid var(--i247-border);
  background: transparent;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  color: var(--i247-text);
}
.step-chip.is-active {
  border-color: var(--i247-navy);
  background: var(--i247-blue-light);
}
.step-chip.is-done {
  border-color: var(--i247-green);
  background: var(--i247-green-bg);
}
.step-chip-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.quiz-question {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--i247-border);
}
.induction-doc-card {
  border-left: 4px solid var(--i247-navy);
}
.induction-doc-card.induction-doc-done {
  border-left-color: var(--i247-green);
}
.induction-doc-meta { flex: 1; min-width: 200px; }
.induction-doc-ack-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--i247-border-soft);
}
.doc-reader-title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--i247-navy);
}
.doc-body {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--i247-surface);
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  color: var(--i247-text);
  line-height: 1.55;
}
.doc-body-scroll {
  max-height: 32rem;
  overflow: auto;
}
.doc-body-library { max-height: none; }
.doc-body-h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  color: var(--i247-navy);
}
.doc-body-h3 {
  margin: 1rem 0 0.45rem;
  font-size: 1.02rem;
  color: var(--i247-navy);
}
.doc-body-h4 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--i247-text);
  font-weight: 650;
}
.doc-body-p {
  margin: 0 0 0.65rem;
  color: var(--i247-text);
}
.doc-body-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--i247-text);
}
.doc-body-list li { margin: 0.2rem 0; }
.doc-body-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--i247-grey-bg);
  color: var(--i247-text);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

/* Induction HR summary */
.induction-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--i247-border);
  margin-bottom: 0.85rem;
}
.induction-summary-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
  font-weight: 650;
}
.induction-summary-title {
  margin: 0.2rem 0 0.25rem;
  color: var(--i247-navy);
  font-size: 1.35rem;
}
.induction-summary-sub { margin: 0; font-size: 0.88rem; }
.induction-summary-section { margin: 1.1rem 0; }
.summary-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem 1rem;
  margin: 0;
}
.summary-dl div { min-width: 0; }
.summary-dl dt {
  font-size: 0.75rem;
  color: var(--i247-muted);
  font-weight: 600;
  margin: 0;
}
.summary-dl dd {
  margin: 0.1rem 0 0;
  color: var(--i247-text);
  font-weight: 550;
  word-break: break-word;
}
.summary-dl-dense { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.summary-dl-section {
  grid-column: 1 / -1;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--i247-border);
  font-weight: 700;
  color: var(--i247-navy);
  font-size: 0.9rem;
}
.summary-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.summary-check-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--i247-text);
}
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--i247-text);
}
.summary-table th,
.summary-table td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--i247-border-soft);
  vertical-align: top;
}
.summary-table th {
  color: var(--i247-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.summary-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.summary-sign-box {
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--i247-surface);
  color: var(--i247-text);
}
.summary-sign-line {
  min-height: 1.4rem;
  margin: 0.2rem 0 0.65rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--i247-border);
  font-weight: 600;
}
.summary-sign-blank {
  min-height: 2.4rem;
  margin: 0.2rem 0 0.65rem;
  border-bottom: 1px solid var(--i247-border);
}

@media print {
  .no-print,
  .app-topbar,
  .public-nav,
  .rz-notification,
  nav,
  footer {
    display: none !important;
  }
  html, body {
    background: #fff !important;
    color: #111 !important;
  }
  .app-content {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .induction-summary.card-panel,
  .card-panel.induction-summary {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: #fff !important;
    color: #111 !important;
  }
  .summary-sign-box,
  .doc-body,
  .nested-panel {
    break-inside: avoid;
    background: #fff !important;
    color: #111 !important;
    border-color: #ccc !important;
  }
  .badge { border: 1px solid #999; }
  a { color: inherit !important; text-decoration: none !important; }
  details.timesheet-events {
    border: none !important;
    padding: 0 !important;
    margin-top: 1rem;
  }
  details.timesheet-events > summary {
    font-size: 0.95rem;
    font-weight: 700;
    list-style: none;
    cursor: default;
  }
  details.timesheet-events > summary::-webkit-details-marker,
  details.timesheet-events > summary::marker {
    display: none;
  }
  details.timesheet-events > *:not(summary) {
    display: block !important;
  }
  details.timesheet-events table {
    display: table !important;
  }
  details.timesheet-events .timesheet-events-body {
    overflow: visible !important;
  }
}

.office-chat-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: var(--i247-text);
    border-bottom: 1px solid var(--i247-border-soft);
}
.office-chat-row:last-child { border-bottom: 0; }
.office-chat-row:hover { background: var(--i247-blue-light); }
.office-chat-jobs { display: flex; gap: 0.55rem; overflow-x: auto; padding-bottom: 0.15rem; }
.office-chat-job {
    flex: 0 0 auto; min-width: 9rem; max-width: 13rem;
    display: flex; flex-direction: column; gap: 0.15rem;
    background: var(--i247-grey-bg); border-radius: 12px; padding: 0.55rem 0.7rem;
    text-decoration: none; color: var(--i247-text); border-left: 6px solid var(--i247-yellow, #f9a825);
}
.office-chat-job.red { border-left-color: var(--i247-red, #c62828); }
.office-chat-job.orange { border-left-color: var(--i247-orange, #ef6c00); }
.office-chat-job.yellow { border-left-color: var(--i247-yellow, #f9a825); }
.office-chat-job.blue { border-left-color: var(--i247-blue); }
.office-chat-job.green { border-left-color: var(--i247-green, #2e7d32); }
.office-chat-job.purple { border-left-color: var(--i247-purple, #6a1b9a); }
.office-chat-job.auth { border-left-color: var(--i247-teal, #00897b); }
.office-chat-job span { font-size: 0.78rem; color: var(--i247-muted, #5c6b7a); }
.chat-job-head { display: flex; align-items: center; gap: 0.35rem; }
.chat-job-icon { font-size: 0.95rem; line-height: 1; flex-shrink: 0; }
.office-chat-thread { display: flex; flex-direction: column; min-height: 28rem; max-height: calc(100vh - 14rem); }
.office-chat-bubbles { display: flex; flex-direction: column; gap: 0.55rem; flex: 1; min-height: 12rem; overflow-y: auto; margin-bottom: 0.85rem; }
.office-chat-history { align-self: center; border: 0; background: transparent; color: var(--i247-muted); font-size: 0.85rem; padding: 0.35rem; cursor: pointer; }
.office-chat-bubble {
    max-width: 72%;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: var(--i247-grey-bg);
    color: var(--i247-text);
}
.office-chat-bubble.me { margin-left: auto; background: var(--i247-blue-light); color: var(--i247-text); }
.office-chat-bubble.sys { margin: 0 auto; background: var(--i247-orange-bg); color: var(--i247-text); font-size: 0.9rem; }
.office-chat-bubble a { color: var(--i247-blue); }
.office-chat-media { display: block; max-width: 100%; max-height: 16rem; border-radius: 10px; margin-top: 0.35rem; }
.office-chat-composer { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.office-chat-upload {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: var(--i247-grey-bg);
    color: var(--i247-text);
    font-weight: 600;
    cursor: pointer;
}
.office-chat-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.office-chat-meta { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.78rem; margin-bottom: 0.2rem; }
.office-chat-quote, .office-reply-banner {
    background: color-mix(in srgb, var(--i247-text) 8%, transparent);
    border-left: 3px solid var(--i247-blue);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.office-reply-banner { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; width: 100%; }
.office-chat-react { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.4rem; }
.office-react-btn {
    border: 0;
    border-radius: 8px;
    padding: 0.2rem 0.4rem;
    background: var(--i247-grey-bg);
    color: var(--i247-text);
    font-size: 0.8rem;
    cursor: pointer;
}
.office-react-btn.on { background: var(--i247-blue-light); color: var(--i247-blue); font-weight: 700; }
.chat-deleted { font-style: italic; opacity: 0.72; }
.chat-atts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.chat-att {
    display: flex; align-items: center; gap: 0.4rem;
    max-width: 100%; padding: 0; background: var(--i247-grey-bg); color: var(--i247-text);
    border: 0; border-radius: 10px; overflow: hidden; text-align: left; font-weight: 600; cursor: pointer;
}
.chat-att span { padding: 0.45rem 0.6rem 0.45rem 0; font-size: 0.82rem; }
.chat-att-icon { padding-left: 0.6rem; }
.chat-gallery {
    display: grid; gap: 2px; margin-top: 0.4rem;
    width: min(100%, 20rem); border-radius: 12px; overflow: hidden;
    background: #0b1118;
}
.chat-gallery-1 { width: min(100%, 22rem); }
.chat-gallery-1 .chat-gallery-tile { aspect-ratio: 4 / 3; max-height: 18rem; }
.chat-gallery-2 { grid-template-columns: 1fr 1fr; }
.chat-gallery-2 .chat-gallery-tile { aspect-ratio: 1; }
.chat-gallery-3 { grid-template-columns: 1fr 1fr; }
.chat-gallery-3 .chat-gallery-tile:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.chat-gallery-3 .chat-gallery-tile { aspect-ratio: 1; }
.chat-gallery-4, .chat-gallery-more { grid-template-columns: 1fr 1fr; }
.chat-gallery-4 .chat-gallery-tile, .chat-gallery-more .chat-gallery-tile { aspect-ratio: 1; }
.chat-gallery-tile {
    position: relative; min-height: 0; padding: 0; border: 0;
    background: #1a2332; overflow: hidden; cursor: pointer;
}
.chat-gallery-tile img, .chat-gallery-tile video {
    display: block; width: 100%; height: 100%; object-fit: cover;
}
.chat-gallery-play, .chat-gallery-more-count {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; pointer-events: none;
}
.chat-gallery-play { font-size: 1.35rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
.chat-gallery-more-count {
    background: rgba(10, 16, 24, 0.55);
    font-size: 1.55rem; font-weight: 700;
}
.media-viewer {
    position: fixed; inset: 0; z-index: 5200;
    display: flex; align-items: stretch; justify-content: stretch;
    outline: none;
}
.media-viewer-scrim {
    position: absolute; inset: 0; background: rgba(8, 12, 18, 0.72);
    border: 0; padding: 0; margin: 0; cursor: pointer;
}
.media-viewer-panel {
    position: relative; z-index: 201; margin: auto;
    width: min(96vw, 72rem); height: min(92vh, 52rem);
    display: flex; flex-direction: column;
    background: var(--i247-surface); border-radius: 14px; overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.media-viewer-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
    padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--i247-border); flex-shrink: 0;
}
.media-viewer-title { display: flex; flex-direction: column; min-width: 0; }
.media-viewer-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-viewer-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.media-viewer-actions .btn, .media-viewer-actions button {
    text-decoration: none; border: 0; border-radius: 8px; padding: 0.45rem 0.7rem;
    background: var(--i247-grey-bg); color: var(--i247-text); font-weight: 600; cursor: pointer;
}
.media-viewer-stage {
    flex: 1; min-height: 0; display: flex; align-items: stretch; gap: 0.35rem; padding: 0.5rem;
}
.media-viewer-body {
    flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
    background: #0b1118;
}
.media-viewer-body img, .media-viewer-body video, .media-viewer-body iframe {
    max-width: 100%; max-height: 100%; width: auto; height: auto; border: 0; background: #fff;
}
.media-viewer-body iframe { width: 100%; height: 100%; }
.media-viewer-file { color: #fff; text-align: center; padding: 1.5rem; }
.media-viewer-nav {
    flex: 0 0 auto; width: 2.4rem; background: var(--i247-grey-bg); color: var(--i247-text);
    font-size: 1.6rem; border: 0; border-radius: 10px; cursor: pointer;
}

.chat-dock {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 5000;
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 0.65rem;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}
.chat-dock > * { pointer-events: auto; }
.chat-dock-rail {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.45rem;
}
.chat-dock-bubble {
    width: 3.4rem;
    height: 3.4rem;
    border: 0;
    border-radius: 50%;
    background: var(--i247-topbar);
    color: #fff;
    box-shadow: 0 6px 20px rgba(11, 31, 58, 0.35);
    cursor: pointer;
    position: relative;
    display: grid;
    place-items: center;
}
.chat-dock-bubble:hover { filter: brightness(1.12); }
.chat-dock-list, .chat-dock-pane {
    width: 20.5rem;
    height: 28rem;
    max-height: calc(100vh - 6rem);
    background: var(--i247-card);
    color: var(--i247-text);
    border: 1px solid var(--i247-border-soft);
    border-radius: 14px 14px 6px 6px;
    box-shadow: 0 10px 32px rgba(16, 38, 61, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-dock-pane-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
    background: var(--i247-topbar);
    color: var(--i247-on-topbar, #fff);
}
.chat-dock-pane-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.chat-dock-pane-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-dock-icon {
    border: 0;
    background: transparent;
    color: inherit;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    line-height: 1;
}
.chat-dock-icon:hover { background: color-mix(in srgb, #fff 16%, transparent); }
.chat-dock-search {
    margin: 0.5rem 0.65rem 0;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--i247-border-soft);
    border-radius: 8px;
    background: var(--i247-grey-bg);
    color: var(--i247-text);
}
.chat-dock-rows { flex: 1; overflow-y: auto; }
.chat-dock-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.7rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--i247-border-soft);
    background: transparent;
    color: var(--i247-text);
    text-align: left;
    cursor: pointer;
}
.chat-dock-row:hover, .chat-dock-row.on { background: var(--i247-blue-light); }
.chat-dock-jobs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.4rem 0.55rem 0;
}
.chat-dock-jobs .office-chat-job { min-width: auto; padding: 0.3rem 0.5rem; font-size: 0.78rem; font-weight: 700; flex-direction: row; align-items: center; gap: 0.3rem; }
.chat-dock-bubbles { flex: 1; min-height: 0; margin: 0.45rem 0.55rem; }
.chat-dock-composer { padding: 0.45rem 0.55rem 0.6rem; }
.chat-dock-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--i247-border-soft);
    border-radius: 10px;
    background: var(--i247-grey-bg);
    color: var(--i247-text);
}
.chat-dock-send {
    border: 0;
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    background: var(--i247-blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.chat-dock-minitab {
    width: 2.55rem;
    height: 2.55rem;
    border: 0;
    border-radius: 50%;
    background: var(--i247-card);
    color: var(--i247-text);
    box-shadow: 0 3px 12px rgba(16, 38, 61, 0.2);
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    position: relative;
}
.chat-dock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}
.chat-dock-bubble-badge, .chat-dock-badge-dot {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
}
@media (max-width: 900px) {
    .chat-dock-list, .chat-dock-pane { width: min(20.5rem, calc(100vw - 5.5rem)); }
}

.timesheet-shell {
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) 1fr;
  gap: 1rem;
  align-items: start;
}
.timesheet-roster {
  padding: 0.4rem;
  max-height: calc(100vh - 11rem);
  overflow: auto;
}
.timesheet-engineer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 4px solid #1E6FE3;
  background: transparent;
  color: inherit;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.timesheet-engineer.is-active,
.timesheet-engineer:hover {
  background: color-mix(in srgb, var(--i247-navy) 12%, transparent);
}
.timesheet-engineer-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.timesheet-engineer-main strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timesheet-engineer-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.timesheet-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.timesheet-callout {
  font-size: 1.05rem;
  color: #c2410c;
  line-height: 1;
}
.timesheet-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #0b1f3a;
  color: #fff;
}
/* Score pill. Matched height/line-height centres the line box; a tiny top pad
   nudges digits for optical centre without overshooting. */
.timesheet-score {
  display: inline-block;
  box-sizing: border-box;
  min-width: 2rem;
  height: 1.7rem;
  padding: 1px 0.5rem 0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: calc(1.7rem - 1px);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  text-align: center;
}
.timesheet-score-excellent { background: #dcfce7; color: #166534; }
.timesheet-score-good { background: #dbeafe; color: #1d4ed8; }
.timesheet-score-fair { background: #fef3c7; color: #92400e; }
.timesheet-score-poor { background: #fee2e2; color: #b91c1c; }
.timesheet-score-empty { background: var(--i247-grey-bg, #e8eef3); color: var(--i247-muted, #5b6773); }
.timesheet-score-lg {
  min-width: 2.85rem;
  height: 2.5rem;
  padding: 1px 0.65rem 0;
  border-radius: 10px;
  font-size: 1.15rem;
  line-height: calc(2.5rem - 1px);
}
.speed-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  border: 3px solid #c8102e;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 0 0 1px #fff;
}
.speed-done { font-weight: 700; vertical-align: middle; }
.timesheet-scorecard { display: flex; gap: 0.65rem; align-items: center; }
.timesheet-score-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--i247-muted, #5b6773);
}
.timesheet-map {
  height: 26rem;
  border-radius: 8px;
  margin-top: 0.75rem;
  background: var(--rz-base-100, #eef2f6);
  isolation: isolate;
  position: relative;
  z-index: 0;
}
.timesheet-week-map {
  height: 18rem;
  margin-top: 1rem;
}
.timesheet-week-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.4rem;
  color: var(--i247-text);
  font-size: 0.95rem;
}
.timesheet-week-totals strong {
  font-size: 1.15rem;
}
.timesheet-week-total-row td {
  border-top: 2px solid var(--i247-border);
  background: color-mix(in srgb, var(--i247-navy) 8%, transparent);
}
.timesheet-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--i247-blue);
  cursor: pointer;
  vertical-align: middle;
}
.timesheet-home-icon:hover {
  background: var(--i247-blue-light);
  color: var(--i247-navy);
}
.timesheet-home-icon .rzi {
  font-size: 1.2rem;
  line-height: 1;
}
.timesheet-home-visit-list {
  margin: 0;
  padding-left: 1.15rem;
}
.timesheet-home-visit-list li {
  margin: 0.3rem 0;
}
.timesheet-home-note {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.35rem;
  padding: 0.12rem 0.45rem;
  border: 0;
  border-radius: 4px;
  background: var(--i247-grey-bg);
  color: var(--i247-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.timesheet-home-note:hover {
  color: var(--i247-text);
}
.timesheet-hours-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--i247-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
}
.timesheet-hours-summary:hover {
  color: var(--i247-text);
}
.timesheet-hours-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--i247-grey-bg);
  color: var(--i247-text);
  font-size: 0.78rem;
  font-weight: 600;
}
.timesheet-events {
  margin-top: 1rem;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem 0.55rem;
  background: transparent;
  color: inherit;
}
.timesheet-events > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.timesheet-events > summary::-webkit-details-marker {
  color: var(--i247-muted, #5b6773);
}
.timesheet-overlay-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.timesheet-overlay-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.timesheet-day-score {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}
.timesheet-score-chip {
  min-width: 5.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: var(--i247-surface, #f4f7fa);
  border: 1px solid var(--i247-border-soft, #d5dde4);
}
.timesheet-score-chip span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.timesheet-score-chip strong {
  font-size: 1.05rem;
}
.timesheet-driver-score {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--i247-muted);
}
.invoice-status-select { width: min(260px, 100%); }
.timesheet-day-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timesheet-pill {
  border: 1px solid var(--i247-border, #c5ced6);
  background: var(--i247-card);
  color: inherit;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.timesheet-pill.is-on {
  background: var(--i247-navy, #0b1f3a);
  color: #fff;
  border-color: transparent;
}
.timesheet-stop {
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid #a16207;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
}
.timesheet-lost-gps {
  border-left: 3px solid var(--i247-orange, #c2410c);
  background: color-mix(in srgb, var(--i247-orange, #c2410c) 10%, transparent);
}
.timesheet-site {
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--i247-teal, #0f766e);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
}
@media (max-width: 900px) {
  .timesheet-shell { grid-template-columns: 1fr; }
  .timesheet-roster { max-height: none; }
}
.hours-review-tally {
  margin: 0.35rem 0.5rem 0.65rem;
  font-size: 0.85rem;
}
.hours-review-label {
  margin: 0.65rem 0.5rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted, #5c6b7a);
}
.hours-review-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.hours-office-card {
  margin-top: 0;
}
.hours-office-banner {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--i247-navy) 10%, transparent);
  color: var(--i247-navy);
  font-size: 0.85rem;
}
.hours-week-form.is-compact .hours-day,
.hours-week-form.is-compact .hours-callouts {
  background: color-mix(in srgb, var(--i247-card) 80%, transparent);
}
.hours-week-form.is-compact .hours-day.is-off {
  background: color-mix(in srgb, var(--i247-muted) 12%, var(--i247-card));
}
.hours-week-form.is-compact .hours-day.is-half {
  background: color-mix(in srgb, var(--i247-navy) 8%, var(--i247-card));
}

/* Spreadsheet-style day planner */
.plan-add {
  margin-bottom: 0.85rem;
  padding: 0;
}
.plan-add > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
}
.plan-add > summary::-webkit-details-marker { display: none; }
.plan-add[open] > summary {
  border-bottom: 1px solid var(--i247-border);
}
.plan-add-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}
.plan-add-hint {
  font-size: 0.82rem;
  font-weight: 400;
}
.plan-add-form {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.plan-add-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.plan-add-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.plan-add-grid {
  display: grid;
  gap: 1rem 1.15rem;
  align-items: end;
}
.plan-add-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.plan-add-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-add-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.plan-add-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
  align-items: end;
}
.plan-add-row-core {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.85fr) minmax(0, 0.9fr);
}
.plan-add-row + .plan-add-row { margin-top: 0.7rem; }
.plan-add-row-detail {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(11rem, 0.95fr) minmax(8.5rem, 0.85fr) auto;
}
.plan-add-row-detail.has-sheet {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(11rem, 0.85fr) minmax(8.5rem, 0.8fr) minmax(10rem, 1.1fr) auto;
}
.plan-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.plan-field span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--i247-muted);
}
.plan-field input,
.plan-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  color: var(--i247-text);
  background: var(--i247-input-bg);
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.plan-field-desc { min-width: 0; }
.plan-field.is-required span::after {
  content: " *";
  color: #e11d48;
}
html.dark .plan-field.is-required span::after,
html[data-theme="dark"] .plan-field.is-required span::after {
  color: #fb7185;
}
.plan-suggest { position: relative; }
.plan-suggest-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--i247-card, #fff);
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  box-shadow: 0 10px 24px color-mix(in srgb, #000 16%, transparent);
  max-height: 16rem;
  overflow: auto;
}
.plan-suggest-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.plan-suggest-list li:hover { background: color-mix(in srgb, var(--i247-navy) 8%, transparent); }
.plan-suggest-list li span {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}
.plan-suggest-add { color: var(--i247-navy); font-weight: 600; }
.plan-suggest-empty {
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: var(--i247-muted);
  cursor: default;
}
.plan-suggest-empty:hover { background: transparent; }
.plan-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 400;
  background: color-mix(in srgb, #000 45%, transparent);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 1rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}
.plan-modal {
  width: min(26rem, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: max(1rem, 4vh) auto;
  background: var(--i247-card, #fff);
  border-radius: 12px;
  padding: 1.1rem 1.15rem 1rem;
  box-shadow: 0 18px 40px color-mix(in srgb, #000 28%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.plan-modal h3 { margin: 0; font-size: 1.05rem; }
.plan-modal p { margin: 0; color: var(--i247-muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.plan-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.plan-add-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}
.plan-add-actions .rz-button { min-width: 9rem; }
.plan-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0 0 0.75rem;
}
.plan-toolbar .list-search {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0;
  border: 0;
}
.plan-toolbar .list-search-input {
  width: 100%;
}
.plan-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  margin-left: auto;
}
.plan-filter {
  min-width: 10rem;
  font: inherit;
  color: var(--i247-text);
  background: var(--i247-input-bg);
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}
.plan-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--i247-muted);
  white-space: nowrap;
}
.plan-toolbar-meta .plan-count { margin-left: 0; }
.plan-action-short { display: none; }
.plan-table-wrap {
  padding: 0;
  overflow-x: auto;
  max-width: 100%;
}
.plan-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.plan-col-asset { width: 8%; }
.plan-col-party { width: 16%; }
.plan-col-location { width: 12%; }
.plan-col-type { width: 9%; }
.plan-col-order { width: 7%; }
.plan-col-desc { width: 14%; }
.plan-col-tech { width: 11%; }
.plan-col-attend { width: 13%; }
.plan-col-open { width: 10%; }
.plan-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--i247-muted);
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid var(--i247-border);
  white-space: normal;
  overflow-wrap: anywhere;
}
.plan-table td {
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid color-mix(in srgb, var(--i247-border) 70%, transparent);
  vertical-align: top;
  min-width: 0;
  overflow-wrap: anywhere;
}
.plan-asset { font-weight: 700; white-space: normal; }
.plan-desc { min-width: 0; }
.plan-table .inline-edit-trigger {
  display: inline-block;
  min-height: 2rem;
  padding: 0.2rem 0;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.plan-table .inline-edit-row {
  max-width: 100%;
}
.plan-revenue { font-weight: 700; }
.plan-open {
  text-align: right;
  white-space: normal;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: stretch;
  justify-content: flex-start;
}
.plan-open .rz-button,
.plan-open .open-job-link {
  width: 100%;
  min-width: 0;
  justify-content: center;
  box-sizing: border-box;
}
.plan-row-click { cursor: pointer; }
.plan-row-click:hover td { filter: brightness(0.98); }
.plan-hold-badge {
  margin-left: 0.35rem;
  background: color-mix(in srgb, #7c3aed 22%, transparent);
  color: #5b21b6;
}
.plan-sheet-badge {
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 600;
  background: color-mix(in srgb, #0369a1 18%, transparent);
  color: #075985;
}
.plan-hold-select {
  display: block;
  margin-top: 0.25rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--i247-muted);
  background: transparent;
  border: none;
  padding: 0;
  max-width: 100%;
}
.plan-due-input,
.plan-due-date,
.plan-due-time {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.uk-date {
  position: relative;
  width: 100%;
  min-width: 0;
}
.uk-date-row {
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  min-width: 0;
}
.uk-date-row input {
  flex: 1;
  min-width: 0;
}
.uk-date-toggle {
  flex: 0 0 2rem;
  width: 2rem;
  padding: 0;
  border: 1px solid var(--i247-border, #c5ced6);
  border-radius: 6px;
  background: var(--i247-input-bg, #fff);
  color: var(--i247-navy, #0f2744);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.uk-date-toggle:hover { border-color: var(--i247-blue); color: var(--i247-blue); }
.uk-date.is-disabled .uk-date-toggle { opacity: 0.5; cursor: default; }
.uk-date-cal {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.25rem);
  left: 0;
  width: min(17.5rem, 92vw);
  padding: 0.55rem 0.55rem 0.45rem;
  border: 1px solid var(--i247-border, #c5ced6);
  border-radius: 10px;
  background: var(--i247-card, #fff);
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.16);
}
.uk-date-cal-nav {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1.2fr) minmax(0, 0.9fr) 1.7rem;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.uk-date-cal-shift,
.uk-date-cal-quick button {
  border: 1px solid var(--i247-border-soft, #d8dee6);
  border-radius: 6px;
  background: var(--i247-input-bg, #fff);
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.uk-date-cal-shift { height: 1.85rem; padding: 0; }
.uk-date-cal-month,
.uk-date-cal-year {
  min-width: 0;
  height: 1.85rem;
  padding: 0 0.2rem;
  font: inherit;
  font-size: 0.82rem;
}
.uk-date-cal-dows,
.uk-date-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.12rem;
}
.uk-date-cal-dows {
  margin-bottom: 0.15rem;
  color: var(--i247-muted, #5c6b7a);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.uk-date-cal-day {
  min-height: 1.7rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.uk-date-cal-day.is-out { color: var(--i247-muted, #5c6b7a); opacity: 0.55; }
.uk-date-cal-day.is-today { border-color: color-mix(in srgb, var(--i247-blue) 55%, var(--i247-border)); }
.uk-date-cal-day.is-on,
.uk-date-cal-day.is-on:hover {
  background: var(--i247-blue);
  border-color: var(--i247-blue);
  color: #fff;
}
.uk-date-cal-day:hover { background: color-mix(in srgb, var(--i247-blue) 12%, transparent); }
.uk-date-cal-day:disabled { opacity: 0.35; cursor: default; }
.uk-date-cal-quick {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.uk-date-cal-quick button {
  flex: 1;
  padding: 0.28rem 0.4rem;
  font-size: 0.78rem;
}
.plan-attend { min-width: 0; }
.plan-attend-fields {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.plan-row.tone-overdue {
  background: color-mix(in srgb, #b42318 13%, var(--i247-card, #fff));
  box-shadow: inset 4px 0 0 #b42318;
}
.plan-row.tone-due-today {
  background: color-mix(in srgb, #c2410c 14%, var(--i247-card, #fff));
  box-shadow: inset 4px 0 0 #c2410c;
}
.plan-row.tone-working {
  background: color-mix(in srgb, #ca8a04 16%, var(--i247-card, #fff));
  box-shadow: inset 4px 0 0 #ca8a04;
}
.plan-row.tone-hold {
  background: color-mix(in srgb, #7c3aed 14%, var(--i247-card, #fff));
  box-shadow: inset 4px 0 0 #7c3aed;
}
.plan-row.tone-scheduled {
  background: var(--i247-card, #fff);
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--i247-muted) 50%, transparent);
}

html.dark .plan-row.tone-overdue,
html[data-theme="dark"] .plan-row.tone-overdue {
  background: color-mix(in srgb, #f97066 18%, var(--i247-card, #161b22));
  box-shadow: inset 4px 0 0 #f97066;
}
html.dark .plan-row.tone-due-today,
html[data-theme="dark"] .plan-row.tone-due-today {
  background: color-mix(in srgb, #fb923c 18%, var(--i247-card, #161b22));
  box-shadow: inset 4px 0 0 #fb923c;
}
html.dark .plan-row.tone-working,
html[data-theme="dark"] .plan-row.tone-working {
  background: color-mix(in srgb, #facc15 16%, var(--i247-card, #161b22));
  box-shadow: inset 4px 0 0 #facc15;
}
html.dark .plan-row.tone-hold,
html[data-theme="dark"] .plan-row.tone-hold {
  background: color-mix(in srgb, #c4b5fd 16%, var(--i247-card, #161b22));
  box-shadow: inset 4px 0 0 #c4b5fd;
}
html.dark .plan-hold-badge,
html[data-theme="dark"] .plan-hold-badge {
  color: #ddd6fe;
}
html.dark .plan-sheet-badge,
html[data-theme="dark"] .plan-sheet-badge {
  background: color-mix(in srgb, #38bdf8 22%, transparent);
  color: #bae6fd;
}

.invoice-job-strip {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--i247-navy) 6%, var(--i247-card, #fff));
  border: 1px solid var(--i247-border);
}
.invoice-job-strip p { margin: 0.35rem 0 0; }
.invoice-job-strip strong { margin-right: 0.4rem; }
.invoice-sticky-totals {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: var(--i247-card, #fff);
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  box-shadow: 0 -8px 18px color-mix(in srgb, #000 8%, transparent);
}
.invoice-sticky-totals strong {
  font-size: 1.15rem;
  margin-left: auto;
}
.invoice-sticky-totals em {
  font-style: normal;
  color: var(--i247-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .plan-add { position: static; }
  .plan-add > summary {
    min-height: 2.75rem;
    padding: 0.85rem 0.95rem;
  }
  .plan-add-hint { width: 100%; }
  .plan-add-form { padding: 0.9rem 0.95rem 1.05rem; }
  .plan-add-grid-3,
  .plan-add-grid-2,
  .plan-add-row,
  .plan-add-row-detail {
    grid-template-columns: 1fr;
  }
  .plan-field-desc,
  .plan-field-sheet {
    grid-column: 1 / -1;
  }
  .plan-field input,
  .plan-field select,
  .plan-filter,
  .inline-edit-input,
  .inline-edit-select {
    font-size: 16px;
  }
  .plan-add-actions {
    justify-content: stretch;
    min-width: 0;
  }
  .plan-add-actions .rz-button { width: 100%; min-width: 0; }
  .plan-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    align-items: stretch;
  }
  .plan-toolbar .list-search,
  .plan-toolbar .plan-filter {
    width: 100%;
    min-width: 0;
  }
  .plan-toolbar-meta {
    margin-left: 0;
    justify-content: space-between;
  }
  .plan-view-toggle .plan-chip,
  .plan-attention .plan-chip {
    min-height: 2.25rem;
    padding: 0.4rem 0.75rem;
  }
  .plan-attention {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    margin-bottom: 0.85rem;
    scrollbar-width: thin;
  }
  .plan-attention .plan-chip { flex: 0 0 auto; }
  .plan-page {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
    overflow-x: hidden;
  }
  .plan-table-wrap.card-panel {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
  .plan-table thead { display: none; }
  .plan-table,
  .plan-table tbody,
  .plan-table tr,
  .plan-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .plan-group-row {
    margin: 1rem 0 0.45rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .plan-group-row td,
  .plan-group-row td:first-child {
    display: block;
    padding: 0.15rem 0.1rem 0.35rem;
    background: transparent;
    box-shadow: none;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .plan-group-row td::before { content: none; }
  .plan-row {
    margin: 0 0 0.7rem;
    padding: 0.85rem 0.9rem 0.75rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--i247-card);
    border: 1px solid var(--i247-border-soft);
    box-sizing: border-box;
    max-width: 100%;
  }
  .plan-table input,
  .plan-table select,
  .plan-table .inline-edit-input,
  .plan-table .inline-edit-select,
  .plan-table .plan-due-input,
  .plan-table .plan-hold-select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .plan-row.needs-attention td:first-child { box-shadow: none; }
  .plan-table td {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: 0.3rem 0.55rem;
    align-items: start;
    border-bottom: none;
    padding: 0.32rem 0;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .plan-table td::before {
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--i247-muted);
    padding-top: 0.25rem;
  }
  .plan-table td.plan-asset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.05rem;
    padding: 0 0 0.55rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--i247-border-soft);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .plan-table td.plan-asset::before { content: none; }
  .plan-asset { white-space: normal; }
  .plan-desc { min-width: 0; }
  .plan-due-input {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .plan-attend {
    align-items: start;
  }
  .plan-hold-select {
    margin-top: 0.35rem;
    min-height: 2rem;
    font-size: 0.85rem;
    max-width: 100%;
  }
  .plan-table .inline-edit-trigger {
    min-height: 2.15rem;
    display: inline-flex;
    align-items: center;
    width: 100%;
    overflow-wrap: anywhere;
  }
  .plan-table td.plan-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    justify-content: stretch;
    padding: 0.75rem 0 0.15rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--i247-border-soft);
  }
  .plan-table td.plan-open::before { content: none; }
  .plan-open > .open-job-link {
    grid-column: 1 / -1;
  }
  .plan-open > .plan-void-btn:nth-child(2):last-child {
    grid-column: 1 / -1;
  }
  .plan-open > .badge {
    justify-self: start;
    align-self: center;
  }
  .plan-open .rz-button,
  .plan-open .open-job-link {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
  .plan-action-full { display: none; }
  .plan-action-short { display: inline; }
  .plan-modal-actions {
    flex-wrap: wrap;
  }
  .invoice-sticky-totals { position: sticky; bottom: 0.4rem; }
  .invoice-add-line .rz-stack { flex-direction: column !important; align-items: stretch !important; }
  .invoice-add-line .rz-textbox,
  .invoice-add-line .rz-dropdown { width: 100% !important; }
}

@media (max-width: 480px) {
  .plan-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .plan-modal-actions .rz-button {
    width: 100%;
    justify-content: center;
  }
}

.workshop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}
.workshop-toolbar label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 600;
}
.workshop-toolbar select { min-width: 12rem; }
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.workshop-grid h2,
.card-panel > h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.workshop-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.workshop-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-top: 1px solid var(--i247-border-soft);
}
.workshop-list li:first-child { border-top: 0; padding-top: 0; }
.workshop-jobs { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.workshop-jobs th,
.workshop-jobs td { text-align: left; padding: 0.45rem 0.4rem; vertical-align: top; }
.workshop-jobs th { color: var(--i247-muted); font-weight: 600; border-bottom: 1px solid var(--i247-border); }
.workshop-jobs td { border-bottom: 1px solid var(--i247-border-soft); }
.workshop-jobs-actions { white-space: nowrap; display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.workshop-dl { display: grid; gap: 0.4rem; margin: 0; }
.workshop-dl > div { display: grid; grid-template-columns: 6rem 1fr; gap: 0.5rem; }
.workshop-dl dt { color: var(--i247-muted); font-weight: 600; }
.workshop-dl dd { margin: 0; }
.workshop-work { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.workshop-work li { padding: 0.65rem 0; border-top: 1px solid var(--i247-border-soft); }
.workshop-work li:first-child { border-top: 0; padding-top: 0; }
.workshop-booking-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}
.workshop-booking-bar-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.plan-chip {
  font: inherit;
  font-size: 0.8rem;
  border: 1px solid var(--i247-border);
  background: var(--i247-card);
  color: var(--i247-text);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.plan-chip.is-on {
  background: var(--i247-navy);
  color: #fff;
  border-color: var(--i247-navy);
}
.plan-view-toggle, .plan-attention { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.plan-tracker { display: grid; gap: 0.85rem; }
.plan-tracker-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
}
.plan-tracker-search .plan-field { flex: 1 1 16rem; min-width: 0; margin: 0; }
.plan-tracker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 22rem);
  gap: 0.85rem;
  align-items: stretch;
}
.plan-tracker-map-shell { padding: 0.65rem; min-width: 0; }
.plan-tracker-map {
  height: 28rem;
  border-radius: 8px;
  background: var(--rz-base-100, #eef2f6);
  isolation: isolate;
  position: relative;
  z-index: 0;
}
.plan-tracker-origin-label {
  margin: 0.45rem 0.15rem 0;
  font-size: 0.82rem;
  color: var(--i247-muted);
}
.plan-tracker-list { padding: 0.85rem 0.9rem; min-width: 0; }
.plan-tracker-list-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.plan-tracker-list-head h3 { margin: 0; font-size: 1rem; }
.plan-tracker-list-head span { font-size: 0.8rem; color: var(--i247-muted); }
.plan-tracker-sub-head {
  margin: 1rem 0 0.4rem;
  font-size: 0.92rem;
  color: var(--i247-navy);
}
.plan-tracker-ranks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 26.5rem;
  overflow: auto;
}
.plan-tracker-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
}
.plan-tracker-item.is-selected .plan-tracker-row,
.plan-tracker-row:hover {
  border-color: var(--i247-navy);
  background: color-mix(in srgb, var(--i247-navy) 6%, var(--i247-card));
}
.plan-tracker-item.is-none .plan-tracker-row { opacity: 0.72; }
.plan-tracker-badge,
.plan-tracker-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--pin, #1E6FE3);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.plan-tracker-pin { box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(7, 21, 38, 0.35); }
.plan-tracker-marker.is-selected .plan-tracker-pin {
  box-shadow: 0 0 0 3px #F0B429, 0 1px 6px rgba(7, 21, 38, 0.4);
}
.plan-tracker-origin {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #F0B429;
  border: 2px solid #0B1F3A;
  box-shadow: 0 0 0 2px #fff;
  color: transparent;
  overflow: hidden;
}
.plan-tracker-row-main { display: grid; gap: 0.12rem; min-width: 0; }
.plan-tracker-row-main strong { font-size: 0.95rem; }
.plan-tracker-meta,
.plan-tracker-job,
.plan-tracker-addr,
.plan-tracker-ago {
  font-size: 0.78rem;
  color: var(--i247-muted);
}
.plan-tracker-job.is-free { font-style: italic; }
.plan-tracker-popup { display: grid; gap: 0.2rem; min-width: 10rem; }
@media (max-width: 960px) {
  .plan-tracker-layout { grid-template-columns: 1fr; }
  .plan-tracker-map { height: 16rem; }
  .plan-tracker-ranks { max-height: none; }
}
@media (max-width: 900px) {
  .plan-attention {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }
  .plan-attention .plan-chip { flex: 0 0 auto; }
}
.plan-group-row td {
  font-weight: 700;
  background: color-mix(in srgb, var(--i247-navy) 6%, var(--i247-card));
  padding: 0.5rem 0.7rem;
}
.plan-row.needs-attention td:first-child { box-shadow: inset 3px 0 0 #d97706; }
.desk-heading { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
.compliance-card { margin-bottom: 0.75rem; display: grid; gap: 0.65rem; min-width: 0; max-width: 100%; }
.compliance-head, .compliance-actions, .present-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.compliance-sign {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--i247-border-soft);
}
.compliance-sign h3 { margin: 0; font-size: 1rem; }
.compliance-sign-flags,
.compliance-sign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.compliance-sign .sig-pad-wrap { width: 100%; }
.compliance-needed { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.compliance-costing { margin-top: 0.35rem; display: grid; gap: 0.55rem; }
.compliance-costing-head {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; justify-content: space-between;
}
.compliance-costing-head h3 { margin: 0; font-size: 1rem; }
.invoice-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.45rem;
}
.invoice-add-row .cost-line-input { flex: 1; min-width: 7rem; }
.invoice-add-row .cost-line-input-num { flex: 0 0 5.5rem; min-width: 4.5rem; }
.invoice-add-line .parts-hits { margin-top: 0.45rem; }
.compliance-defect { display: grid; gap: 0.3rem; padding: 0.5rem 0; border-top: 1px solid var(--i247-border-soft); }
.compliance-card textarea, .compliance-defect input, .plan-field textarea {
  font: inherit;
  width: 100%;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.cost-sheet { padding-bottom: 1rem; }
.cost-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: end;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--i247-border-soft);
}
.cost-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.cost-field span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--i247-muted);
}
.cost-field input,
.cost-field select {
  font: inherit;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.cost-field-menu { flex: 1 1 10rem; min-width: 10rem; }
.cost-field-part { flex: 1 1 10rem; min-width: 10rem; }
.cost-field-repair { flex: 1 1 12rem; min-width: 12rem; }
.plan-field { display: grid; gap: 0.25rem; }
.plan-field span { font-size: 0.75rem; color: var(--i247-muted); }
.cost-repair { margin-bottom: 0.85rem; }
.cost-repair h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.present-card { margin-bottom: 0.85rem; }
.job-cost-sheet {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--i247-border);
  min-width: 0;
  max-width: 100%;
}
.job-cost-sheet .present-head {
  margin-bottom: 0.65rem;
}
.job-cost-sheet-flags {
  margin: 0 0 0.75rem;
}
.job-cost-sheet-flags .additional-cost-flags {
  margin: 0;
}
.job-cost-sheet-flags .invoice-add-line > strong { display: none; }
.present-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.present-total { text-align: right; }
.present-total strong { display: block; font-size: 1.15rem; }
.present-sheet-wrap { overflow-x: auto; margin-bottom: 0.85rem; }
.present-sheet-wrap:has(.sage-invoice-table) { overflow-x: hidden; }
.present-sheet { width: 100%; }
.present-col-flag { width: 3.25rem; text-align: center; }
.present-group-row td {
  font-weight: 700;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--i247-navy) 5%, var(--i247-card));
}
.cost-group-title { display: inline; }
.cost-group-sub {
  display: inline;
  font-weight: 400;
  margin-left: 0.5rem;
}
.present-total-row td { border-top: 2px solid var(--i247-border); }
.present-notes {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.present-notes textarea {
  width: 100%;
  min-height: 4.5rem;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.present-note-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.present-note-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}
.plan-row-link {
  color: inherit;
  text-decoration: none;
}
.plan-row-link:hover { text-decoration: underline; }
.cost-sheet-summary {
  margin-bottom: 0.75rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .cost-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.55rem 0.6rem;
  }
  .cost-field-repair {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .cost-field-menu,
  .cost-field-part,
  .cost-field {
    flex: none;
    min-width: 0;
  }
  .cost-add > .rz-button {
    min-height: 2.55rem;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .cost-add {
    grid-template-columns: 1fr;
  }
  .cost-field-hours {
    grid-column: 1;
  }
  .cost-add > .rz-button {
    width: 100%;
    justify-content: center;
  }
}
.cost-lines-table { margin-bottom: 0; }
.cost-line-input {
  font: inherit;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.cost-line-input-num { max-width: 6.5rem; }
.cost-line-actions { white-space: nowrap; }
.cost-line-actions-head { width: 5.5rem; }
.cost-lines-hint { margin: 0.35rem 0 0; font-size: 0.78rem; }
.cost-rate-card {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--i247-text);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .cost-sheet .present-sheet-wrap {
    overflow: visible;
    margin-bottom: 0.5rem;
  }
  .cost-lines-table.plan-table thead { display: none; }
  .cost-lines-table.plan-table,
  .cost-lines-table.plan-table tbody {
    display: block;
    width: 100%;
  }
  .cost-lines-table.plan-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem 0.55rem;
    width: auto;
    margin: 0.5rem 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--i247-border-soft);
    border-radius: 12px;
    background: var(--i247-card);
  }
  .cost-lines-table.plan-table tbody tr.present-group-row {
    display: block;
    margin: 0.85rem 0 0.2rem;
    padding: 0.4rem 0.15rem 0.5rem;
    border: 0;
    border-bottom: 1px solid var(--i247-border);
    border-radius: 0;
    background: transparent;
  }
  .cost-lines-table.plan-table tbody tr.cost-line-empty {
    display: block;
    margin: 0.35rem 0;
    padding: 0.55rem 0.15rem;
    border: 0;
    background: transparent;
  }
  .cost-lines-table.plan-table td,
  .cost-lines-table.plan-table .num {
    display: block;
    width: auto;
    padding: 0;
    border: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .cost-lines-table.plan-table td::before { content: none; }
  .cost-lines-table .cost-line-type {
    grid-column: 1 / 3;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--i247-muted);
  }
  .cost-lines-table .cost-line-desc {
    grid-column: 1 / -1;
    font-weight: 500;
    line-height: 1.35;
  }
  .cost-lines-table .cost-line-qty,
  .cost-lines-table .cost-line-rate,
  .cost-lines-table .cost-line-total {
    min-width: 0;
  }
  .cost-lines-table.plan-table td.cost-line-qty::before,
  .cost-lines-table.plan-table td.cost-line-rate::before,
  .cost-lines-table.plan-table td.cost-line-total::before {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--i247-muted);
    margin-bottom: 0.12rem;
  }
  .cost-lines-table .cost-line-total {
    font-weight: 700;
  }
  .cost-lines-table .cost-line-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    white-space: normal;
  }
  .cost-lines-table .cost-line-actions-slot,
  .cost-lines-table .cost-line-actions-head {
    display: none;
  }
  .cost-lines-table .cost-line-input-num { max-width: none; }
  .cost-lines-table .cost-rate-card { white-space: normal; }
  .cost-lines-table tbody tr.present-group-row td,
  .cost-lines-table tbody tr.cost-line-empty td {
    display: block;
    background: transparent;
  }
  .cost-lines-table.plan-table tbody tr.invoice-line-clickable:hover,
  .cost-lines-table.plan-table tbody tr.invoice-line-editing {
    background: color-mix(in srgb, var(--i247-navy) 10%, var(--i247-card));
  }
  .cost-lines-table.plan-table tbody tr.invoice-line-clickable:hover td,
  .cost-lines-table.plan-table tbody tr.invoice-line-editing td {
    background: transparent;
  }
  .cost-lines-table.plan-table tfoot {
    display: block;
    width: 100%;
  }
  .cost-lines-table.plan-table tfoot tr.sage-net-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0.15rem 0 0.35rem;
    padding: 0.45rem 0.8rem 0.15rem;
    border: 0;
    background: transparent;
  }
  .cost-lines-table.plan-table tfoot td {
    display: block;
    width: auto;
    padding: 0;
    border: none;
    text-align: left;
  }
  .cost-lines-table.plan-table tfoot td:empty {
    display: none;
  }
  .cost-lines-table.plan-table tfoot .sage-net-label,
  .cost-lines-table.plan-table tfoot .sage-net-amount {
    font-weight: 700;
  }
  .cost-group-title,
  .cost-group-sub {
    display: block;
    margin-left: 0;
  }
  .cost-group-sub { margin-top: 0.2rem; }
  .cost-lines-hint { margin-top: 0.55rem; }
  .cost-sheet {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }
  .cost-lines-hint { overflow-wrap: anywhere; }
}

.parts-picker { display: grid; gap: 0.55rem; min-width: 0; }
.parts-picker-empty { margin: 0; }
.parts-picker-search { display: grid; gap: 0.4rem; min-width: 0; }
.parts-picker-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
}
.parts-picker-add input {
  width: 100%;
  min-width: 0;
  height: 2.55rem;
  min-height: 2.55rem;
  box-sizing: border-box;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
}
.parts-picker-add .rz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  height: 2.55rem;
  min-height: 2.55rem;
  box-sizing: border-box;
  margin: 0;
  padding: 0 0.85rem;
  text-transform: none;
}
.parts-hits {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  display: grid;
  gap: 0.15rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  background: var(--i247-card, #fff);
  box-shadow: 0 8px 20px color-mix(in srgb, #000 10%, transparent);
}
.parts-hits li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name price"
    "sku sku";
  column-gap: 0.75rem;
  row-gap: 0.12rem;
  align-items: baseline;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}
.parts-hits li:hover,
.parts-hits li:focus-visible {
  background: color-mix(in srgb, var(--i247-navy) 8%, transparent);
  outline: none;
}
.parts-hit-name {
  grid-area: name;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
  min-width: 0;
}
.parts-hit-price {
  grid-area: price;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
  color: var(--i247-muted);
}
.parts-hit-sku {
  grid-area: sku;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
  color: var(--i247-muted);
  overflow-wrap: anywhere;
}
.parts-picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.parts-picker-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.45rem 0.6rem;
  align-items: end;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--i247-border-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--i247-navy) 3.5%, var(--i247-card, #fff));
}
.parts-picker-name {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  align-self: center;
}
.parts-picker-name strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 650;
  line-height: 1.3;
}
.parts-picker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.parts-picker-sku {
  display: inline-block;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--i247-muted);
  letter-spacing: 0.01em;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--i247-navy) 8%, transparent);
}
.parts-picker-qty, .parts-picker-price { display: grid; gap: 0.12rem; width: 5.2rem; min-width: 0; }
.parts-picker-qty span, .parts-picker-price span {
  font-size: 0.68rem;
  color: var(--i247-muted);
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.parts-picker-qty input, .parts-picker-price input {
  width: 100%;
  font: inherit;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  padding: 0.35rem 0.4rem;
  background: var(--i247-input-bg);
  color: var(--i247-text);
  font-variant-numeric: tabular-nums;
}
.parts-picker-remove {
  border: 0;
  background: transparent;
  color: var(--i247-muted);
  font-size: 1.35rem;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 8px;
  justify-self: end;
}
.parts-picker-remove:hover {
  background: color-mix(in srgb, #c62828 12%, transparent);
  color: #c62828;
}
@media (max-width: 720px) {
  .parts-picker-add {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .parts-picker-add input {
    grid-column: 1 / -1;
    height: 2.75rem;
    min-height: 2.75rem;
    box-sizing: border-box;
  }
  .parts-picker-add .rz-button {
    height: 2.75rem;
    min-height: 2.75rem;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .parts-picker-list li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "name name name"
      "qty price remove";
  }
  .parts-picker-name { grid-area: name; }
  .parts-picker-qty { grid-area: qty; width: auto; }
  .parts-picker-price { grid-area: price; width: auto; }
  .parts-picker-qty input,
  .parts-picker-price input { min-height: 2.5rem; }
  .parts-picker-remove {
    grid-area: remove;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.5rem;
  }
  .invoice-add-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    align-items: stretch;
  }
  .invoice-add-row .cost-line-input:not(.cost-line-input-num) {
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 2.75rem;
    box-sizing: border-box;
  }
  .invoice-add-row select.cost-line-input {
    grid-column: 1 / -1;
    min-height: 2.75rem;
  }
  .invoice-add-row .cost-line-input-num {
    flex: none;
    min-width: 0;
    width: 100%;
    min-height: 2.75rem;
    box-sizing: border-box;
  }
  .invoice-add-row .rz-button {
    grid-column: 1 / -1;
    min-height: 2.75rem;
    width: 100%;
    justify-content: center;
  }
}

.compass-error-url { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; }
.compass-error-detail {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--i247-border-soft);
}
.compass-error-label {
  display: block;
  margin: 0.7rem 0 0.25rem;
  color: var(--i247-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.compass-error-pre {
  margin: 0;
  padding: 0.65rem 0.75rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--i247-border);
  border-radius: 8px;
  background: var(--i247-input-bg);
  color: var(--i247-text);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.compass-error-dump {
  display: block;
  width: 100%;
  min-height: 12rem;
  max-height: 28rem;
  resize: vertical;
  box-sizing: border-box;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0 1rem;
}
.training-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--i247-card);
  border-radius: var(--i247-radius);
  box-shadow: var(--i247-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border: 1px solid var(--i247-border-soft);
}
.training-card:hover,
.training-card:focus-visible {
  outline: 2px solid var(--i247-blue);
  outline-offset: 2px;
}
.training-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--i247-grey-bg);
  overflow: hidden;
}
.training-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.training-card-media.is-empty {
  min-height: 4.5rem;
  aspect-ratio: auto;
  background:
    linear-gradient(135deg, var(--i247-blue-light), var(--i247-grey-bg));
}
.training-card-media.is-empty img {
  display: none;
}
.training-card-play {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(11, 31, 58, 0.82);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.training-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem 1rem;
}
.training-card-topic {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--i247-muted);
}
.training-card-body strong {
  font-size: 1.02rem;
  color: var(--i247-text);
}
.training-lesson {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 52rem;
}
.training-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  counter-reset: train-step;
}
.training-step {
  padding: 1rem 1.1rem 1.1rem;
}
.training-step h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--i247-navy);
}
.training-step h2::before {
  counter-increment: train-step;
  content: counter(train-step) ". ";
}
.training-step p {
  margin: 0;
  line-height: 1.5;
}
.training-media {
  margin: 0.85rem 0 0;
  padding: 0;
}
.training-media img,
.training-media video {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--i247-border);
  background: #0b1118;
}
.training-media figcaption {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--i247-muted);
}
.training-media.is-empty {
  display: none;
}
.training-tips h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}
.training-tips ul {
  margin: 0;
  padding-left: 1.15rem;
}
.training-tips li + li {
  margin-top: 0.35rem;
}
.training-pager {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.25rem 0 1.5rem;
}
.training-pager a {
  font-weight: 650;
  text-decoration: none;
}
.training-pager a:hover {
  text-decoration: underline;
}

.wages-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}
.wages-card {
  padding: 0.85rem 0.75rem 0.5rem;
  overflow: hidden;
}
.wages-group-title {
  margin: 0 0.35rem 0.55rem;
  font-size: 1.02rem;
}
.wages-table-wrap {
  overflow: auto;
  max-width: 100%;
}
.wages-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.wages-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--i247-card, #fff);
  text-align: left;
  font-weight: 650;
  padding: 0.35rem 0.3rem;
  border-bottom: 1px solid var(--i247-border, #d0d7e2);
  white-space: nowrap;
}
.wages-table td {
  padding: 0.15rem 0.2rem;
  border-bottom: 1px solid var(--i247-border-soft, #e7edf3);
  vertical-align: middle;
}
.wages-table .wages-name {
  font-weight: 600;
  white-space: nowrap;
  padding-right: 0.45rem;
}
.wages-table .wages-name a {
  color: inherit;
  text-decoration: none;
}
.wages-table .wages-name a:hover {
  text-decoration: underline;
  color: var(--i247-blue, #1e6fe3);
}
.wages-input {
  width: 5.4rem;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.22rem 0.28rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}
.wages-input:hover,
.wages-input:focus {
  border-color: var(--i247-border, #c5ced6);
  background: var(--i247-card, #fff);
  outline: none;
}
.wages-input-wide { width: 7.2rem; }
.wages-input-notes { width: 12rem; }
.wages-num { width: 3.6rem; text-align: right; }
.wages-ot {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  padding-right: 0.45rem;
  min-width: 3.2rem;
}

.sig-enroll-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(11, 31, 58, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.sig-enroll-card {
  width: min(36rem, 100%);
  max-height: 90vh;
  overflow: auto;
}
.sig-enroll-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.sig-enroll-head h2 {
  margin: 0;
  flex: 1;
}
.plan-job-modal {
  width: min(52rem, 100%);
  max-width: 100%;
}
.plan-job-modal .plan-add-form {
  padding: 0;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 901px) {
  .plan-row-single td {
    white-space: nowrap;
    vertical-align: middle;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .plan-row-single .plan-desc {
    white-space: nowrap;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
.plan-asset-line {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.plan-fleet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--i247-muted, #5b6b7c);
  cursor: pointer;
  padding: 0;
}
.plan-fleet-btn:hover { background: var(--i247-soft, #ecf2f9); color: var(--i247-navy, #0b1f3a); }
.plan-fleet-btn .material-icons { font-size: 1rem; }
.plan-tech-name { font-size: 0.9rem; }
.pin-confirm-dialog input { width: 100%; }
.pin-confirm-input {
  width: 100%;
  font-size: 16px;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  -webkit-text-security: disc;
  box-sizing: border-box;
}

.tool-agree-card h2 { margin: 0 0 0.75rem; font-size: 1rem; color: var(--i247-navy); }
.tool-agree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.tool-agree-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
}
.tool-agree-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tool-agree-lines th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--i247-navy);
  border-bottom: 1px solid var(--i247-navy);
  padding: 0.35rem 0.4rem;
}
.tool-agree-lines td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--i247-border-soft);
  vertical-align: middle;
}
.tool-agree-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.tool-agree-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
  color: var(--i247-muted);
}
.tool-agree-grand { font-weight: 700; color: var(--i247-navy); }

.hs-pack-toolbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0.75rem;
}
.hs-pack-toolbar .list-search-input { flex: 1; max-width: 32rem; }
.hs-site-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.hs-chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--i247-border-soft);
  background: var(--i247-card);
  color: var(--i247-text);
  cursor: pointer;
}
.hs-chip.on {
  background: var(--i247-navy);
  border-color: var(--i247-navy);
  color: #fff;
}
.hs-site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}
.hs-site-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.hs-file-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}
.hs-file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--i247-border-soft);
}
.hs-file-list li:first-child { border-top: 0; }
.hs-file-list span { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.hs-file-list-flat { margin: 0; }
.hs-file-list-flat li { padding: 0.7rem 1rem; }
.hs-pack-section { margin-top: 1.25rem; }

.audit-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.85rem;
}
.audit-subject-card {
  display: block;
  background: var(--i247-card);
  border: 1px solid var(--i247-border-soft);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: inherit;
}
.audit-subject-card:hover { border-color: var(--i247-navy); }
.audit-subject-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}
.audit-subject-card h3 { margin: 0; font-size: 1.05rem; color: var(--i247-navy); }
.audit-subject-card .muted-text { margin: 0.35rem 0 0; }
.audit-subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}
.audit-topic-card {
  background: var(--i247-card);
  border: 1px solid var(--i247-border-soft);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}
.audit-topic-card h2 { margin: 0 0 0.2rem; font-size: 1.1rem; color: var(--i247-navy); }
.audit-topic-head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.audit-topic-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.audit-current-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.55rem 0 0;
}
.audit-topic-actions { margin-top: 0.75rem; }
.audit-topic-form {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--i247-border-soft);
}
.audit-form-heading { margin: 1rem 0 0.5rem; font-size: 0.95rem; color: var(--i247-navy); }
.audit-prompt-list { display: flex; flex-direction: column; gap: 0.55rem; margin: 0.35rem 0 0.75rem; }
.audit-prompt {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--i247-border-soft);
}
.audit-prompt-answers { display: flex; gap: 0.3rem; }
.audit-prompt-answers button {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--i247-border-soft);
  background: var(--i247-card);
  color: var(--i247-text);
  cursor: pointer;
}
.audit-prompt-answers button.on {
  background: var(--i247-navy);
  border-color: var(--i247-navy);
  color: #fff;
}
.audit-photo-pending {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.audit-history { margin-top: 0.85rem; }
.audit-history summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--i247-navy);
}

.rate-period-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rate-period-card {
  border: 1px solid var(--i247-border);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  background: var(--i247-card);
}

.rate-period-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
}

.rate-period-card-spacer { flex: 1; }

.rate-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
}

.rate-period-fees {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--i247-border-soft);
}

.rate-period-fees .rate-period-grid {
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  max-width: 36rem;
}

.rate-period-fees summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--i247-navy);
  font-size: 0.92rem;
}

.training-matrix-summary {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.training-matrix-legend {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.training-actions-wrap,
.training-matrix-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.training-actions-table { min-width: 36rem; }
.training-provider-list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
}
.training-matrix-table {
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 48rem;
}
.training-matrix-table th,
.training-matrix-table td {
  border-bottom: 1px solid var(--i247-border-soft);
  padding: 0.35rem 0.4rem;
  vertical-align: top;
  text-align: center;
}
.training-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--i247-card);
  font-weight: 600;
  color: var(--i247-navy);
}
.training-matrix-table .training-matrix-course {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  min-width: 13rem;
  max-width: 16rem;
  background: var(--i247-card);
}
.training-matrix-table thead .training-matrix-course { z-index: 4; }
.training-matrix-group th {
  background: var(--i247-surface);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--i247-muted);
  text-align: left;
  padding-top: 0.7rem;
}
.training-matrix-eng { font-weight: 700; }
.training-matrix-counts {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--i247-muted);
  white-space: nowrap;
}
.training-matrix-counts .is-due { color: var(--i247-orange); font-weight: 700; }
.training-matrix-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  width: 100%;
  min-width: 4.6rem;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.4rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--i247-grey-bg);
  color: var(--i247-grey);
}
.training-matrix-cell.is-current { background: var(--i247-green-bg); color: var(--i247-green); }
.training-matrix-cell.is-done { background: var(--i247-blue-light); color: var(--i247-blue); }
.training-matrix-cell.is-due { background: var(--i247-orange-bg); color: var(--i247-orange); }
.training-matrix-cell.is-empty { background: var(--i247-grey-bg); color: var(--i247-grey); font-weight: 600; }
.training-matrix-date { font-size: 0.65rem; font-weight: 600; opacity: 0.85; }






