:root {
  color-scheme: light;
  --ink: #172d3a;
  --muted: #647783;
  --line: #e0e8e9;
  --paper: #ffffff;
  --canvas: #f3f7f6;
  --navy: #122a3a;
  --teal: #087e78;
  --teal-light: #e4f4f1;
  --orange: #a35b13;
  --orange-light: #fff3e4;
  --red: #b63a3a;
  --red-light: #fff0ef;
  --shadow: 0 14px 40px rgba(20, 45, 56, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.5 "DM Sans", "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.loading { padding: 48px; text-align: center; color: var(--muted); }
.shell { min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(24px, calc((100% - 1180px) / 2));
  background: var(--navy);
  color: white;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  font-size: 19px;
}
.brand-title { font: 700 16px/1.2 Manrope, sans-serif; letter-spacing: -.3px; }
.brand-subtitle { margin-top: 3px; color: #b9c9cf; font-size: 12px; }
.topbar-user { display: flex; align-items: center; gap: 14px; color: #e2ecee; font-size: 13px; }
.topbar-user strong { color: white; }
.page { width: min(1180px, calc(100% - 40px)); margin: 36px auto 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, "Segoe UI", sans-serif; letter-spacing: -.45px; }
h1 { margin-bottom: 5px; font-size: clamp(25px, 3vw, 34px); line-height: 1.18; }
h2 { margin-bottom: 5px; font-size: 20px; }
h3 { margin-bottom: 8px; font-size: 16px; }
.subtitle, .muted { color: var(--muted); }
.subtitle { margin-bottom: 0; }
.date-control { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.date-control input { width: 160px; }
.period-control { display: flex; flex-wrap: wrap; gap: 10px; }
.period-control label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.period-control input { width: 155px; }
.date-filter { position: relative; display: flex; min-width: 0; }
.date-range-trigger { display: inline-flex; min-width: 250px; min-height: 46px; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #d5e0e1; border-radius: 11px; background: white; color: var(--ink); text-align: left; }
.date-range-trigger:hover, .date-range-trigger[aria-expanded="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,120,.08); }
.date-range-trigger svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: var(--teal); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.date-range-trigger span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 700; }
.date-range-trigger-chevron { color: var(--muted); font-size: 13px; }
.date-calendar-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: min(328px, calc(100vw - 32px)); padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 16px 38px rgba(20,45,56,.18); }
.date-calendar-header { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 8px; margin-bottom: 12px; text-align: center; }
.date-calendar-header strong { text-transform: capitalize; }
.date-calendar-nav { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 24px; line-height: 1; }
.date-calendar-nav:hover:not(:disabled) { background: var(--teal-light); color: var(--teal); }
.date-calendar-nav:disabled { cursor: default; opacity: .4; }
.date-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.date-calendar-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.date-calendar-weekdays span { padding: 5px 0; }
.date-calendar-day, .date-calendar-empty { display: grid; width: 100%; aspect-ratio: 1; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 13px; }
.date-calendar-day:hover:not(:disabled) { background: var(--teal-light); color: var(--teal); }
.date-calendar-day.in-range { border-radius: 4px; background: #eaf5f3; color: var(--teal); }
.date-calendar-day.range-start, .date-calendar-day.range-end { border-radius: 9px; background: var(--teal); color: white; font-weight: 700; }
.date-calendar-day.today:not(.range-start):not(.range-end) { box-shadow: inset 0 0 0 1px var(--teal); }
.date-calendar-day:disabled { cursor: default; color: #b7c1c4; }
.date-calendar-hint { min-height: 34px; padding: 8px 0; color: var(--muted); font-size: 11px; }
.date-range-presets { display: flex; gap: 7px; padding-top: 10px; border-top: 1px solid #edf1f1; }
.audit-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.audit-filter-row > label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.audit-filter-row > label select { min-width: 170px; }
.tabs { display: flex; gap: 5px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 11px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.tab.active { border-bottom-color: var(--teal); color: var(--teal); }
.panel, .card, .stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.card { padding: 19px; }
.card + .card { margin-top: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.stat-card { padding: 17px 19px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { margin-top: 4px; font: 800 29px/1.2 Manrope, sans-serif; }
.stat-card.pending .stat-value { color: var(--orange); }
.stat-card.complete .stat-value { color: var(--teal); }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card.missed .stat-value { color: var(--red); }
.attendance-panel { padding: 20px; }
.attendance-people { display: grid; gap: 8px; }
.attendance-person { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.attendance-person-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 15px 17px; border: 0; background: white; color: var(--ink); font-weight: 700; text-align: left; }
.attendance-person-toggle:hover, .attendance-person.expanded .attendance-person-toggle { background: #f7f9f9; }
.attendance-chevron { color: var(--teal); font-size: 20px; }
.attendance-person-details { padding: 4px 16px 16px; }
.attendance-days { display: flex; flex-wrap: wrap; gap: 8px; }
.attendance-days .day-status { min-height: 34px; }
.attendance-selected-day { margin-top: 20px; }
.attendance-selected-day h3 { margin-bottom: 12px; }
.attendance-selected-day .tech-report { margin-top: 0; }
.attendance-selected-day .tech-head { display: none; }
.attendance-days .day-status { white-space: nowrap; }
.technician-photo-option input { width: 16px; }
.attendance-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.attendance-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.attendance-table th, .attendance-table td { min-width: 74px; padding: 9px 7px; border-right: 1px solid #edf1f1; border-bottom: 1px solid #edf1f1; text-align: center; }
.attendance-table th:last-child, .attendance-table td:last-child { border-right: 0; }
.attendance-table tbody tr:last-child th, .attendance-table tbody tr:last-child td { border-bottom: 0; }
.attendance-table thead th { background: #f7f9f9; color: var(--muted); font-size: 11px; font-weight: 700; }
.attendance-table thead th:first-child, .attendance-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 175px; text-align: left; }
.attendance-table thead th:first-child { z-index: 2; background: #f7f9f9; }
.attendance-table tbody th { background: white; }
.attendance-name, .attendance-username { display: block; }
.attendance-name { color: var(--ink); font-size: 13px; font-weight: 700; }
.attendance-username { color: var(--muted); font-size: 11px; font-weight: 400; }
.day-heading { padding: 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; }
.day-heading:hover, .day-heading.selected { background: var(--teal-light); color: var(--teal); }
.day-status { display: inline-flex; min-width: 52px; min-height: 28px; justify-content: center; align-items: center; padding: 3px 7px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 700; }
button.day-status { cursor: pointer; }
button.day-status:hover, button.day-status.selected { outline: 2px solid currentColor; outline-offset: 1px; }
.day-complete { background: var(--teal-light); color: var(--teal); }
.day-partial { background: var(--orange-light); color: var(--orange); }
.day-missed { background: var(--red-light); color: var(--red); }
.day-status.no-assets { background: #f0f3f4; color: var(--muted); }
.day-status.day-off { background: #f0f3f4; color: var(--muted); }
.missed-count { color: var(--red); }
.clean-count { color: var(--teal); }
.attendance-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.attendance-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.complete { background: var(--teal); }
.legend-dot.partial { background: var(--orange); }
.legend-dot.missed { background: var(--red); }
.legend-dot.no-assets { background: #9aa8ad; }
.legend-dot.day-off { background: #647783; }
.daily-details { margin-top: 28px; }
.tech-report { overflow: hidden; margin-top: 14px; padding: 0; }
.tech-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.tech-head h3 { margin: 0; }
.tech-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.asset-row { padding: 16px 20px; border-bottom: 1px solid #edf1f1; }
.asset-row:last-child { border-bottom: 0; }
.asset-main { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.asset-main > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.asset-admin-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.asset-row .badge { max-width: 100%; white-space: normal; }
.asset-name { font-weight: 700; }
.asset-type { margin-right: 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.item-results { display: grid; gap: 7px; margin-top: 12px; }
.inspection-mileage { margin-top: 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.inspection-mileage-field { max-width: 260px; margin-top: 16px; }
.item-result { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; gap: 9px; color: var(--muted); font-size: 13px; }
.item-result strong { color: var(--ink); font-weight: 600; }
.item-note { color: var(--red); }
.inspection-photo-link { display: inline-flex; }
.inspection-photo-thumb { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 7px; object-fit: cover; }
.technician-photo-option { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 500; }
.technician-photo-option input { width: 16px; min-height: 16px; margin: 0; }
.inspection-photo-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.inspection-photo-select { position: relative; overflow: hidden; }
.inspection-photo-select input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.inspection-photo-preview { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--teal); font-size: 12px; }
.inspection-photo-preview img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; }
.inspection-history { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.inspection-history summary { color: var(--teal); cursor: pointer; font-size: 13px; font-weight: 700; }
.inspection-history-entry { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid #edf1f1; }
.inspection-history-entry .item-results { margin-top: 0; }
.inspection-revision-note { margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.badge.ok { color: var(--teal); background: var(--teal-light); }
.badge.pending { color: var(--orange); background: var(--orange-light); }
.badge.issue { color: var(--red); background: var(--red-light); }
.badge.neutral { color: var(--muted); background: #edf1f2; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; min-width: 0; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #435965; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d5e0e1;
  border-radius: 9px;
  outline: none;
  background: white;
  color: var(--ink);
}
textarea { min-height: 98px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #57aaa3; box-shadow: 0 0 0 3px rgba(8,126,120,.1); }
.help { color: var(--muted); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 15px; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--teal);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: #066e69; }
.btn:disabled { cursor: wait; opacity: .65; }
.btn.secondary { border-color: #d7e1e2; background: white; color: var(--ink); }
.btn.secondary:hover { background: #f4f7f7; }
.btn.danger { border-color: #f0d4d2; background: white; color: var(--red); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.icon-button { min-height: 35px; padding: 6px 10px; }
.stack { display: grid; gap: 14px; }
.split { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.item-check { display: grid; min-width: 0; grid-template-columns: minmax(120px, 1fr) 180px minmax(150px, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #edf1f1; }
.item-check:first-of-type { margin-top: 10px; }
.item-check-name { display: flex; min-width: 0; align-items: center; gap: 9px; font-weight: 600; }
.item-check-name span { min-width: 0; overflow-wrap: anywhere; }
.item-photo { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 8px; object-fit: cover; }
.item-check select, .item-check input { min-height: 38px; font-size: 13px; }
.inspection-note-field { padding: 11px; border: 1px solid #f0d4d2; border-radius: 11px; background: #fff9f8; }
.inspection-note-field[hidden] { display: none; }
.inspection-note-field label { color: #9c4540; }
.inspection-note-field textarea { min-height: 70px; resize: vertical; border-color: #ead7d5; background: white; }
.inspection-note-field textarea:focus { border-color: #d78a84; box-shadow: 0 0 0 3px rgba(182,58,58,.1); }
.inspection-photo-field { grid-column: 2 / -1; }
.empty { padding: 34px 20px; border: 1px dashed #cbd9db; border-radius: 13px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 5px; color: var(--ink); }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: var(--teal-light); color: #14645e; font-size: 13px; }
.day-off-notice { background: #edf1f2; color: var(--muted); }
.alert { margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--red-light); color: #9c2929; font-size: 13px; }
.auth-wrap { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 75% 4%, #d7efea, transparent 38%), var(--canvas); }
.auth-card { width: min(440px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 24px 70px rgba(20,45,56,.12); }
.auth-brand { margin-bottom: 26px; }
.auth-card h1 { font-size: 27px; }
.auth-card .field { margin-top: 15px; }
.auth-card .btn { width: 100%; margin-top: 20px; }
.separator { height: 1px; margin: 18px 0; background: var(--line); }
.asset-option { margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.asset-option.selected { border-color: #9accc7; }
.asset-option-select { display: flex; width: 100%; min-width: 0; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: white; color: var(--ink); text-align: left; }
.asset-option-select:hover, .asset-option.selected .asset-option-select { background: #f3f9f8; }
.asset-option-select > span:first-child { display: grid; min-width: 0; gap: 2px; }
.asset-option-select strong { overflow-wrap: anywhere; }
.asset-option-meta { color: var(--muted); font-size: 12px; }
.asset-option-action { flex: 0 0 auto; color: var(--teal); font-size: 12px; font-weight: 700; }
.asset-editor { margin-top: 13px; }
.asset-editor-heading { margin-bottom: 12px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.tool-editor-list { display: grid; }
.tool-editor-row { position: relative; display: grid; grid-template-columns: 30px 64px minmax(100px, 1fr) auto; gap: 9px; align-items: center; padding: 11px 0; border-top: 1px solid #edf1f1; }
.tool-editor-row.drop-before { border-top: 2px solid var(--teal); }
.tool-editor-row.drop-after::after { position: absolute; right: 0; bottom: -1px; left: 0; border-bottom: 2px solid var(--teal); content: ""; }
.tool-editor-row.is-dragging { opacity: .45; }
.tool-drag-handle { display: grid; width: 30px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f9; color: var(--muted); font-size: 19px; cursor: grab; touch-action: none; }
.tool-drag-handle:active { cursor: grabbing; }
.tool-photo-preview { display: grid; width: 64px; height: 64px; place-items: center; overflow: hidden; border: 1px dashed #cbd9db; border-radius: 9px; background: #f7f9f9; color: var(--muted); font-size: 10px; text-align: center; }
.tool-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.tool-name-field input { min-height: 38px; }
.tool-actions { display: flex; align-items: center; gap: 4px; }
.tool-icon-button { position: relative; display: inline-grid; width: 32px; height: 34px; flex: 0 0 32px; place-items: center; padding: 0; border: 1px solid #d7e1e2; border-radius: 8px; background: white; color: var(--ink); cursor: pointer; }
.tool-icon-button:hover:not(:disabled) { background: #f4f7f7; }
.tool-icon-button.danger { border-color: #f0d4d2; color: var(--red); }
.tool-icon-button.danger:hover:not(:disabled) { background: var(--red-light); }
.tool-icon-button:disabled { cursor: not-allowed; opacity: .4; }
.tool-icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.photo-select { position: relative; overflow: hidden; }
.photo-select input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.add-tool-button { margin-top: 10px; }
.photo-message { grid-column: 3 / -1; color: var(--teal); font-size: 12px; }
.photo-message.photo-error { color: var(--red); }
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; max-height: 300px; overflow: auto; margin-top: 8px; padding: 2px 4px 2px 0; }
.check-option { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.4; }
.check-option input { width: 16px; height: 16px; min-height: 16px; flex: 0 0 16px; margin: 1px 0 0; padding: 0; }
.check-option span { min-width: 0; overflow-wrap: anywhere; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #edf1f1; }
.user-main { min-width: 130px; overflow-wrap: anywhere; }
.user-name-display strong { display: block; }
.user-name-display > span { display: block; color: var(--muted); font-size: 12px; }
.user-name-display > .btn { margin-top: 7px; }
.user-name-editor { display: grid; min-width: 0; gap: 6px; }
.user-name-editor[hidden] { display: none; }
.user-name-editor label { color: #435965; font-size: 12px; font-weight: 700; }
.user-name-editor input { min-width: 0; }
.user-name-editor-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.user-controls { display: grid; min-width: 0; flex: 1; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: center; }
.user-controls > :first-child, .user-controls > .user-actions, .user-controls > .form-message { grid-column: 1; }
.user-actions { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; }
.user-actions .btn { min-height: 30px; padding: 4px 7px; font-size: 11px; white-space: nowrap; }
.user-actions .field-label { display: flex; align-items: center; gap: 4px; font-size: 11px; white-space: nowrap; }
.user-actions select { width: auto; min-width: 94px; min-height: 30px; padding: 4px 5px; font-size: 11px; }
.user-assignments { min-width: 0; }
.user-assigned-assets { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.assigned-asset { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: 5px; padding: 4px 5px 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f9; font-size: 12px; overflow-wrap: anywhere; }
.assigned-asset-remove { display: inline-grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--red); font-size: 17px; line-height: 1; }
.assigned-asset-remove:hover:not(:disabled) { background: var(--red-light); }
.assigned-asset-remove:disabled { cursor: not-allowed; opacity: .5; }
.user-asset-add { display: flex; min-width: 0; align-items: center; gap: 7px; margin-top: 8px; }
.user-asset-add select { width: auto; min-width: 0; flex: 1; min-height: 34px; padding: 5px 8px; }
.user-asset-add .btn { flex: 0 0 auto; }
.audit-list { margin-top: 20px; }
.audit-entry { padding: 14px 0; border-top: 1px solid #edf1f1; }
.audit-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-entry-meta time { margin-left: auto; color: var(--muted); font-size: 12px; }
.audit-entry p { margin: 8px 0 0; }
.footer-note { margin-top: 28px; color: #74858b; font-size: 12px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.margin-top-12 { margin-top: 12px; }
.margin-top-20 { margin-top: 20px; }
.margin-top-24 { margin-top: 24px; }
.inline-heading { display: inline; }
.inspection-section { margin-top: 22px; }
.report-controls { display: grid; gap: 12px; }
.report-controls .actions { margin-top: 0; }
.report-preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 22px 0 10px; }
.report-preview-toolbar p { margin: 0; }
.report-preview { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.report-cover { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.report-brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--navy); color: white; font-size: 22px; }
.report-cover h1 { margin: 0 0 4px; font-size: 25px; }
.report-cover p { margin: 0; color: var(--muted); }
.report-date-section { padding-top: 20px; }
.report-date-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.report-date-heading h2 { margin: 0; }
.report-kicker { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.report-technician { margin-top: 18px; }
.report-technician h3 { margin-bottom: 8px; }
.report-asset { margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.report-asset-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding-bottom: 10px; }
.report-asset-heading strong { font-size: 15px; }
.report-completed { color: var(--muted); font-size: 12px; text-align: right; }
.report-items { display: grid; gap: 9px; }
.report-item { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: center; padding-top: 9px; border-top: 1px solid #edf1f1; }
.report-item-info { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.report-item-info strong { flex-basis: 100%; }
.report-item-info p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; }
.report-photo { display: block; width: 150px; height: 112px; border: 1px solid var(--line); border-radius: 7px; object-fit: contain; background: #f7f9f9; }
.report-no-photo { display: grid; width: 150px; height: 70px; place-items: center; border: 1px dashed #cbd9db; border-radius: 7px; color: var(--muted); font-size: 11px; }
.report-no-responses { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.report-empty { margin-top: 16px; }
.report-footer { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@media (max-width: 720px) {
  .topbar { padding: 14px 18px; }
  .topbar-user { gap: 8px; }
  .topbar-user .user-label { display: none; }
  .page { width: min(100% - 28px, 560px); margin-top: 25px; }
  .page-heading { display: grid; align-items: start; }
  .stat-grid { gap: 8px; }
  .stat-card { padding: 13px; }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 10px; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading .date-filter { width: 100%; }
  .date-range-trigger { width: 100%; min-width: 0; }
  .date-calendar-popover { right: auto; left: 50%; max-width: calc(100vw - 32px); transform: translateX(-50%); }
  .date-range-presets { width: 100%; }
  .audit-filter-row, .audit-filter-row .date-filter { width: 100%; }
  .split { grid-template-columns: 1fr; }
  .item-check { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .item-check .inspection-note-field, .item-check .inspection-photo-field { grid-column: 1 / -1; }
  .tool-editor-row { grid-template-columns: 28px 56px minmax(0, 1fr); }
  .tool-drag-handle { width: 28px; }
  .tool-photo-preview { width: 56px; height: 56px; }
  .tool-actions, .photo-message { grid-column: 3 / -1; }
  .user-row { align-items: start; flex-direction: column; }
  .user-main, .user-controls { width: 100%; }
  .user-controls > .help { grid-column: 1; }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .report-preview-toolbar { align-items: stretch; flex-direction: column; }
  .report-asset-heading { flex-direction: column; }
  .report-completed { text-align: left; }
  .report-item { grid-template-columns: minmax(0, 1fr) 110px; }
  .report-photo, .report-no-photo { width: 110px; }
}
@media (max-width: 460px) {
  .brand-title { font-size: 14px; }
  .brand-subtitle { font-size: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar { padding: 12px 14px; }
  .topbar-user .btn { min-height: 34px; padding: 6px 9px; }
  .form-grid, .editor-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: 1 / -1; }
  .dashboard-stats .stat-card:last-child { grid-column: auto; }
  .tech-head { align-items: flex-start; flex-direction: column; }
  .tech-meta { flex-wrap: wrap; }
  .asset-main { align-items: flex-start; flex-direction: column; }
  .asset-row { padding: 14px; }
  .panel, .card { min-width: 0; }
  .panel, .auth-card { padding: 20px; }
  .tabs { overflow-x: auto; }
  .tab { flex: 0 0 auto; padding: 10px 12px; font-size: 13px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  html, body, #app { width: 100%; min-width: 0; background: white; }
  body * { visibility: hidden !important; }
  #report-print-area, #report-print-area * { visibility: visible !important; }
  #report-print-area { position: absolute; top: 0; left: 0; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: white; color: #172d3a; }
  #report-print-area .report-page-break { break-before: page; page-break-before: always; }
  #report-print-area .report-technician, #report-print-area .report-asset, #report-print-area .report-item { break-inside: avoid; page-break-inside: avoid; }
  #report-print-area .report-photo { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #report-print-area .report-cover { break-after: avoid; }
}
