:root {
  color-scheme: light;
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #172b41;
  background: #f1f5f9;
  --navy: #12263c;
  --blue: #175ecf;
  --blue-dark: #104ba7;
  --text: #172b41;
  --muted: #526579;
  --line: #e0e7ef;
  --white: #fff;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 310px; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
a { color: var(--blue); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.worker-location:focus-visible, .signature-box canvas:focus-visible {
  outline: 3px solid #89b5fb; outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 750; letter-spacing: -.035em; }
h2 { font-size: 17px; }
small, .muted { color: var(--muted); }
svg { display: inline-block; width: 18px; height: 18px; flex: none; }
.loading-message { margin: 5rem auto; text-align: center; color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy); color: white; padding: 24px 15px 16px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; padding: 0 7px; text-align: left; }
.brand-icon { background: #2774e6; color: white; border-radius: 11px; width: 39px; height: 39px; display: grid; place-items: center; flex: none; }
.brand-icon svg { width: 24px; height: 24px; }
.brand-title { font-size: 16px; font-weight: 750; white-space: nowrap; }
.brand-sub { display: block; font-size: 11px; color: #b9cbe2; margin-top: 4px; white-space: nowrap; }
.nav { display: grid; align-content: start; gap: 5px; }
.nav-btn { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 11px; border: 1px solid transparent; border-radius: 8px; background: none; color: #c8d7e9; padding: 11px 13px; font-size: 14px; text-align: left; white-space: nowrap; }
.nav-btn:hover { background: #203a56; color: #fff; }
.nav-btn.current { background: #22538b; border-color: #3568a0; color: #fff; font-weight: 650; }
.side-foot { margin-top: auto; padding: 13px 7px 0; border-top: 1px solid #2c415a; color: #b9cbe2; font-size: 11px; line-height: 1.6; }
.content-wrap { min-width: 0; }
.topbar { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.top-crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.top-crumb strong { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-button { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); padding: 4px 1px 4px 5px; text-align: left; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #e3edfd; color: #1955a8; font-weight: 700; border-radius: 50%; }
.demo-tag { border-radius: 5px; padding: 4px 8px; background: #e8f1ff; color: #23569a; font-size: 11px; white-space: nowrap; }
.main { padding: 25px 28px 40px; max-width: 1680px; margin-inline: auto; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin-top: 8px; line-height: 1.6; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cfdae7; border-radius: 8px; background: #fff; color: #243c55; text-decoration: none; padding: 8px 12px; min-height: 36px; line-height: 1.35; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f2f6fa; }
.btn.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.small { font-size: 12px; padding: 5px 8px; min-height: 29px; }
.btn.danger { color: #a42c26; border-color: #f1c4bf; }
.text-btn { display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; border: 0; border-radius: 5px; background: transparent; color: var(--blue); padding: 5px 1px; text-align: left; font-weight: 650; line-height: 1.4; }
.text-btn:hover { text-decoration: underline; }

.hero { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 23px 25px; border-radius: var(--radius); color: #fff; background: linear-gradient(108deg,#142d48 5%,#1c4876 100%); margin-bottom: 17px; }
.hero p { color: #d6e6f9; margin-top: 8px; font-size: 13px; line-height: 1.65; }
.hero-date { border: 1px solid #5c7ea0; border-radius: 8px; padding: 8px 11px; color: #e4effb; font-size: 12px; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-bottom: 17px; }
.reminder-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.reminder-metrics .metric { display: grid; align-content: start; }
.metric { text-align: left; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 15px 13px; min-height: 109px; }
button.metric:hover { border-color: #9fbbdf; background: #fcfdff; }
.metric-label { color: #40576c; display: flex; justify-content: space-between; align-items: center; gap: 7px; font-size: 13px; }
.metric-icon { color: #2467b9; background: #eaf2ff; border-radius: 7px; padding: 5px; display: grid; place-items: center; }
.metric-icon svg { width: 15px; height: 15px; }
.metric-icon.warn { color: #a06413; background: #fff4de; }
.metric-icon.late { color: #b33932; background: #fdebeb; }
.metric-icon.ok { color: #127654; background: #e3f5ee; }
.metric-number { font-size: 29px; font-weight: 760; letter-spacing: -.04em; line-height: 1.15; display: block; margin: 3px 0 5px; font-variant-numeric: tabular-nums; }
.metric small { font-size: 12px; line-height: 1.5; display: block; }
.metric-number small { display: inline; margin-left: 6px; font-weight: 600; }
.metric[aria-pressed=true], .filters button[aria-pressed=true] { border-color: #4b85c5; background: #f4f8ff; }
.metrics.record-todos { grid-template-columns: repeat(3,minmax(0,1fr)); }
.record-todos .metric { min-width: 0; min-height: 87px; }
.record-todos .metric-number { margin-bottom: 0; }
.team-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 12px; margin-bottom: 16px; }
.team-card { position: relative; isolation: isolate; min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px; }
.team-card:hover, .team-card:focus-within { border-color: #9fbbdf; }
.team-card h2 { margin: 0 0 10px; font-size: 15px; }
.team-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0; border: 0; border-radius: 4px; color: var(--text); background: none; text-align: left; font-weight: inherit; }
.team-open span { overflow-wrap: anywhere; }
.team-open svg { width: 16px; height: 16px; color: var(--blue); }
.team-open:hover { color: var(--blue); }
.team-open::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.team-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.team-stat { position: relative; z-index: 1; display: grid; text-align: left; gap: 4px; padding: 7px 5px; background: #f4f8ff; border: 1px solid transparent; border-radius: 7px; color: #25466a; }
.team-stat:hover { border-color: #9fbbdf; }
.team-stat span { font-size: 11px; line-height: 1.4; }
.team-stat strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.team-stat small { font-size: 11px; margin-left: 2px; }
.team-stat.done { background: #e9f6f0; color: #126048; }
.team-stat.soon { background: #fff5e3; color: #794c12; }
.team-stat.late { background: #fff0ed; color: #972c27; }
.group-detail-head > div:first-child { min-width: 0; }
.group-detail-head h1 { margin-top: 6px; overflow-wrap: anywhere; }
.group-detail-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.group-detail-metrics .metric { display: grid; align-content: start; }
.group-panel-head { flex-wrap: wrap; }
.group-panel-head small { display: block; margin-top: 4px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.panel-head h2 { display: flex; align-items: center; gap: 7px; }
.panel-head h2 svg { color: var(--blue); }
.panel-head .text-btn { font-size: 12px; white-space: nowrap; }
.reminder-items { margin: 0; padding: 0 14px; list-style: none; }
.reminder-items li + li { border-top: 1px solid #edf1f6; }
.reminder-row { display: flex; gap: 7px; width: 100%; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--text); background: none; border: 0; text-align: left; }
.reminder-row:hover strong { color: var(--blue); }
.reminder-row strong, .reminder-row small { display: block; line-height: 1.45; }
.reminder-row strong { overflow-wrap: anywhere; font-size: 13px; }
.reminder-row small { margin-top: 3px; font-size: 11px; }

.filters { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 7px; flex: 0 1 390px; min-width: 0; }
.record-search { display: flex; align-items: end; gap: 8px; flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
.record-search .field { flex: 0 1 150px; }
.search-field { flex: 1 1 220px; min-width: 0; position: relative; }
.search-field svg { position: absolute; top: 10px; left: 10px; color: #5d7288; pointer-events: none; }
.search-field input { padding-left: 34px; }
.filters select { width: auto; min-width: 120px; max-width: 100%; }
.first-plan-filters #project-filter { max-width: min(100%, 320px); }
.daily-plan-filters .field { flex: 0 1 145px; }
.table-scroll { overflow-x: auto; }
.table-scroll td { overflow-wrap: anywhere; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; line-height: 1.45; }
th { font-weight: 650; color: #435971; background: #f6f8fb; white-space: nowrap; }
th, td { padding: 10px 13px; vertical-align: middle; border-bottom: 1px solid #edf1f6; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
td strong { font-weight: 650; }
td small { display: block; margin-top: 2px; }
.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; gap: 4px; padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; align-items: center; color: #465d75; background: #edf2f7; }
.pill.red { background: #fdebeb; color: #a5312b; }
.pill.amber { background: #fff1d7; color: #8b5611; }
.pill.blue { background: #e8f1ff; color: #205bae; }
.pill.green { background: #e4f5ee; color: #116647; }
.empty { padding: 23px 15px; color: var(--muted); line-height: 1.6; text-align: center; }
.pagination { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; justify-content: end; padding: 11px 14px; color: var(--muted); }
.mobile-cards { display: none; }
.mobile-card { border-bottom: 1px solid var(--line); padding: 13px 14px; }
.mobile-card:last-child { border-bottom: 0; }
.mobile-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.mobile-card header .text-btn { min-width: 0; overflow-wrap: anywhere; }
.mobile-card p { font-size: 12px; color: var(--muted); margin-bottom: 6px; line-height: 1.55; }
.list-info { margin-bottom: 12px; display: flex; align-items: start; gap: 7px; color: #3a5470; background: #e8f1fe; border-radius: 8px; padding: 10px 12px; line-height: 1.55; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: linear-gradient(140deg, #e3edf8 0%, #f5f8fc 60%, #dce9fa 100%); }
.auth-card { width: min(100%, 438px); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: 0 12px 44px #233b5514; }
.auth-card .brand { padding: 0; margin-bottom: 23px; }
.auth-card .brand-sub { color: var(--muted); }
.auth-card h1 { font-size: 26px; }
.auth-card p { margin: 9px 0 19px; line-height: 1.65; }
.auth-card .auth-action { width: 100%; margin-top: 7px; }
.form { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.lift-settings { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.lift-settings summary { color: var(--muted); cursor: pointer; font-size: 13px; }
.lift-settings[open] summary { margin-bottom: 12px; }
.field { display: grid; align-content: start; gap: 5px; color: #28425d; font-size: 13px; font-weight: 650; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field small { line-height: 1.55; font-size: 11px; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 36px; color: var(--text); border: 1px solid #c8d5e3; border-radius: 7px; background: #fff; padding: 7px 9px; }
input[readonly] { background: #f0f4f8; color: #556a7f; }
input[type=file] { font-size: 12px; }
textarea { resize: vertical; min-height: 70px; }
input::placeholder, textarea::placeholder { color: #64788d; }
.error { color: #9c2c25; background: #fff1ef; border: 1px solid #f3cbc6; border-radius: 7px; padding: 9px 10px; line-height: 1.6; overflow-wrap: anywhere; }
.error[hidden], [hidden] { display: none !important; }
.modal-copy { color: var(--muted); margin-bottom: 13px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.staff-import-review:not(:empty) { display: grid; gap: 8px; min-width: 0; }
.staff-import-review ul { margin: 6px 0; padding-inline-start: 19px; }
dialog { width: min(595px,calc(100% - 24px)); max-height: calc(100dvh - 26px); padding: 0; border: 1px solid #d4e0ed; border-radius: 13px; color: var(--text); box-shadow: 0 16px 75px #0d233b4d; }
dialog::backdrop { background: #15294185; }
.modal-head { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 17px; z-index: 1; }
.modal-body { padding: 15px 17px 17px; }
.details { margin: 0 0 15px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 11px 14px; }
.details dt { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.details .wide { grid-column: 1 / -1; }
.location-result { line-height: 1.6; color: var(--muted); min-height: 19px; }
.record-photo { display: block; max-width: 100%; max-height: 440px; border: 1px solid var(--line); border-radius: 8px; margin: 10px auto; }
.evidence-list, .assign-lifts { min-inline-size: 0; padding: 10px; margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.evidence-list legend, .assign-lifts legend { padding-inline: 5px; font-weight: 700; }
.evidence-slot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 10px 0; }
.evidence-slot + .evidence-slot { border-top: 1px solid var(--line); }
.evidence-slot > .actions, .photo-hint { grid-column: 1 / -1; }
.evidence-slot .btn { min-height: 44px; }
.photo-status, .photo-hint { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.photo-status { text-align: right; }
.photo-example-link { min-height: 44px; padding-inline: 5px; font-size: 13px; white-space: nowrap; }
.photo-thumb { display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 3px 10px 3px 3px; border: 1px solid #cbd9e9; border-radius: 9px; background: #f7faff; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.photo-preview { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 5px; }
.photo-review { width: min(480px, calc(100% - 24px)); overflow: auto; }
.photo-review::backdrop { background: #152941a8; }
.photo-review > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; }
.photo-review > header h2 { font-size: 15px; overflow-wrap: anywhere; }
.photo-review > header button { flex: none; }
.photo-review > img { display: block; width: 100%; max-height: min(58dvh, 540px); object-fit: contain; background: #edf2f7; }
.photo-review > .actions { justify-content: center; padding: 10px 13px; }
.photo-review .btn { min-height: 44px; }
.photo-example-review { max-height: min(82dvh, 680px); }
.photo-example-review > header { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line); }
.photo-example-images { display: grid; gap: 14px; padding: 12px 13px 15px; }
.photo-example-images figure { margin: 0; }
.photo-example-images figcaption { margin-bottom: 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.photo-example-images img { display: block; width: 100%; max-height: 48dvh; object-fit: contain; border-radius: 8px; background: #edf2f7; }
.record-evidence { margin: 12px 0 0; padding-top: 9px; border-top: 1px solid var(--line); }
.record-evidence figcaption { font-weight: 700; }
.record-photo-strip { display: flex; flex-wrap: wrap; align-items: start; gap: 6px; }
.table-scroll .record-photo-strip { flex-wrap: nowrap; }
.mobile-card .record-photo-strip { margin-block: 8px; }
.record-photo-tile {
  flex: 0 0 70px; min-width: 0; padding: 3px; border: 1px solid #d6e1ee; border-radius: 7px;
  background: #fff; color: var(--blue-dark); text-align: left;
}
.record-photo-tile, .record-photo-viewer button { -webkit-tap-highlight-color: transparent; }
.record-photo-tile:hover { border-color: #7da7e5; background: #f3f7ff; }
.record-photo-tile img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 4px; background: #eef3fa;
}
.record-photo-tile span {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin: 4px 1px 1px; color: #344d69; font-size: 11px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere;
}
.record-overview { margin-bottom: 12px; padding: 12px; border: 1px solid #d7e3f1; border-radius: 12px; background: #f7faff; }
.record-overview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; overflow-wrap: anywhere; }
.record-overview-heading h3 { font-size: 16px; }
.record-overview-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.record-overview-result { flex: none; display: grid; justify-items: end; gap: 4px; }
.record-overview h4 { margin: 0 0 6px; font-size: 13px; }
.record-overview-issues, .record-detail-photos { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.record-detail-photos .muted { font-size: 13px; }
.record-device-details { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.record-device-details h3 { margin-bottom: 9px; font-size: 14px; }
.record-device-details .details { margin-bottom: 0; }
.record-correction-actions { margin-bottom: 12px; }
.record-corrections { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7faff; min-width: 0; }
.record-corrections-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.record-corrections-head .pill { flex: none; }
.record-correction { margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
.correction-actor, .record-correction .work-order-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }
.correction-note { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.correction-original { color: var(--muted); font-size: 13px; }
.correction-original summary { min-height: 36px; padding-block: 8px; color: var(--blue); cursor: pointer; }
.correction-history { margin-top: 8px; }
.record-correction .actions { margin-top: 8px; }
.record-photo-viewer { width: min(860px, calc(100% - 24px)); }
.record-photo-viewer [data-photo-record] { margin-top: 3px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.record-photo-frame {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center;
  gap: 10px; min-height: min(54dvh, 500px);
  background: #132538; color: #e9f2ff; text-align: center; touch-action: pan-y pinch-zoom;
}
.record-photo-frame img { display: block; width: 100%; max-height: min(65dvh, 660px); object-fit: contain; }
.record-photo-frame [data-photo-message] { padding-inline: 12px; }
.record-photo-footer { padding: 10px 13px 13px; }
.record-photo-footer [data-photo-caption] { font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.record-photo-footer nav { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 8px; }
.record-photo-footer [data-photo-counter] { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.record-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.record-abnormal-parts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.record-abnormal-parts li { min-width: 0; max-width: 100%; }
.record-abnormal-parts .pill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.record-abnormal-note { display: block; margin-top: 4px; color: #a5312b; font-size: 12px; overflow-wrap: anywhere; }
.record-overview .record-abnormal-parts { max-height: 132px; overflow: auto; gap: 6px; margin: 0 -3px; padding: 4px 3px; }
.record-overview .record-abnormal-note { max-height: 85px; overflow: auto; margin: 0; line-height: 1.5; white-space: pre-wrap; }
.record-check-link { min-height: 38px; border: 1px solid #ecc8c4; text-align: left; }
.record-check-link svg { width: 13px; height: 13px; flex: none; }
.record-check-link:hover { border-color: #cc847d; background: #fae0dd; }
.table-scroll :is(.record-abnormal-parts,.record-abnormal-note) { max-width: 280px; }
.mobile-card :is(.record-abnormal-parts,.record-abnormal-note) { margin: 6px 0; }
.signer-shell .main { max-width: 1180px; margin-inline: auto; }
.ops-panel { margin-bottom: 16px; }
.ops-form { padding: 14px; }
.ops-tabs { margin-bottom: 14px; }
.path-text { overflow-wrap: anywhere; }
.monthly-metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.notice-count { border-radius: 12px; min-width: 17px; padding: 0 4px; text-align: center; font-size: 10px; color: #fff; background: #ae2b24; }
.nav-btn { position: relative; }
.nav-btn .notice-count { margin-left: auto; }
.worker-tabbar button { position: relative; }
.worker-tabbar .notice-count { position: absolute; top: 4px; right: 15%; }
.signer-shell .worker-brand { color: var(--text); }
.signature-box, .record-signoff { min-width: 0; margin: 0; padding: 13px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.signature-box legend { padding-inline: 5px; font-weight: 700; }
.signature-box canvas { display: block; width: 100%; height: auto; touch-action: none; background: #fcfdff; border: 1px solid #bdcfe1; border-radius: 7px; }
.signature-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.signature-tools small { color: var(--muted); }
.record-signoff { margin-block: 14px; }
.signature-history { padding-inline-start: 21px; margin: 0; }
.signature-history li { padding-block: 9px; overflow-wrap: anywhere; }
.signature-history li + li { border-top: 1px solid var(--line); }
.signature-image { display: block; width: min(100%, 375px); height: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; }
.signature-intent { padding: 10px 12px; border-radius: 8px; background: #f0f6ff; color: #203d60; }
.site-report-review { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.site-report-review summary { color: var(--blue); cursor: pointer; }
.site-report-review ul { padding-left: 22px; }
.site-signing { padding-top: 12px; border-top: 1px solid var(--line); }
.signature-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.signature-options .btn { min-height: 44px; white-space: normal; }
.signature-options .btn[aria-pressed="true"] { background: #eaf2ff; border-color: #76a5e9; color: #1b4e89; font-weight: 700; }
.signing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.signing-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.signing-card p { margin-top: 6px; }
.signing-card small { color: var(--muted); }
.signing-page .modal-actions, .signing-page .record-signoff { margin: 0; }
.signing-page summary { cursor: pointer; }
.work-order-editor { min-height: 175px; }
.work-order-form, .record-work-order { min-width: 0; padding: 13px 14px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.work-order-form legend { padding-inline: 5px; font-weight: 700; }
.work-order-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 5px 0 6px; overflow-wrap: anywhere; }
.work-order-meta span, .work-order-meta small { font-size: 12px; color: var(--muted); }
.work-order-items { padding-inline-start: 21px; margin: 0; }
.work-order-items li { padding-block: 10px; overflow-wrap: anywhere; }
.work-order-items li + li { border-top: 1px solid var(--line); }
.record-work-order [data-record-check]:focus { outline: 2px solid #d29962; outline-offset: 2px; border-radius: 6px; background: #fff7e9; }
.work-order-items label + label { margin-top: 9px; }
.worker-modal .work-order-items :is(select,textarea) { font-size: 16px; min-height: 44px; }
.safety-check-items { padding-inline-start: 0; list-style: none; }
.safety-check-hint { margin: 4px 0 6px; color: var(--muted); font-size: 12px; }
.safety-check-items li { display: grid; grid-template-columns: minmax(0,1fr) minmax(108px, 46%); align-items: center; gap: 8px; padding-block: 6px; }
.safety-check-items [data-check-photo] { grid-column: 1 / -1; }
.safety-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.safety-choices button { min-height: 44px; padding: 2px; border-radius: 7px; border: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.safety-choices button[value="正常"][aria-pressed="true"] { border-color: #a2d6b6; background: #edf8f1; color: #205c40; }
.safety-choices button[value="异常"][aria-pressed="true"] { border-color: #e3aca7; background: #fceeee; color: #9c3028; }
.safety-choices button:focus-visible { outline: 2px solid #75a5f1; outline-offset: 1px; }
.work-order-result { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.work-order-note { margin-top: 7px; color: var(--muted); white-space: pre-wrap; }
.assign-lifts label { display: flex; gap: 8px; align-items: center; padding: 7px; }
.assign-lifts label small { display: block; color: var(--muted); }
.assign-lifts input[type=checkbox] { width: auto; min-height: 0; flex: none; }
.install-steps { padding-inline-start: 22px; line-height: 1.65; }
.install-steps li + li { margin-top: 8px; }
#toast:not(:empty) { position: fixed; bottom: 17px; right: 17px; z-index: 3; max-width: calc(100% - 34px); color: white; background: #183d64; border-radius: 8px; padding: 11px 15px; box-shadow: 0 4px 20px #172b4150; line-height: 1.5; }
[aria-busy=true] { cursor: progress; }

@media (max-width: 1130px) {
  .app-shell { grid-template-columns: 186px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .topbar { padding-inline: 19px; }
  .main { padding-inline: 19px; }
}
@media (max-width: 740px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; padding: 12px 12px 6px; gap: 9px; }
  .brand { padding-left: 2px; }
  .brand-icon { width: 34px; height: 34px; border-radius: 8px; }
  .brand-icon svg { width: 22px; height: 22px; }
  .nav { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .nav-btn { width: auto; flex: 0 0 auto; padding: 8px 10px; gap: 6px; }
  .nav-btn svg { width: 15px; height: 15px; }
  .side-foot { display: none; }
  .topbar { min-height: 47px; padding: 5px 12px; }
  .top-crumb { font-size: 12px; }
  .top-crumb svg { display: none; }
  .avatar { width: 27px; height: 27px; }
  .top-actions { gap: 5px; }
  .main { padding: 13px 11px 26px; }
  .hero { padding: 15px 13px; margin-bottom: 10px; align-items: start; }
  .hero-date { padding: 5px; font-size: 10px; }
  .hero-date svg { display: none; }
  .hero p { font-size: 12px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
  .reminder-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 95px; padding: 9px 10px; }
  .metric-number { font-size: 25px; }

  .table-scroll.with-cards { display: none; }
  .mobile-cards { display: block; }
  .filters { padding: 10px 11px; }
  .search { flex: 1 1 290px; }
  .record-search { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-search .search-field, .record-search .actions { grid-column: 1 / -1; }
  .page-head { margin-bottom: 13px; }
  .panel-head { padding: 11px 12px; }
  .auth-card { padding: 23px 19px; }
}
@media (max-width: 420px) {
  .demo-tag { display: none; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .reminder-metrics .metric { min-height: 104px; }
  .reminder-metrics .metric-icon { display: none; }
  .reminder-metrics .metric-label { font-size: 12px; }
  .reminder-metrics .metric > small { font-size: 11px; }
  .record-todos .metric { min-height: 70px; padding-inline: 8px; }
  .record-todos .metric-icon { display: none; }
  .record-todos .metric-label { font-size: 12px; }
}

.worker-shell, .worker-auth {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin-inline: auto;
  background: #f3f6fb;
}
.worker-shell { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
.worker-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.worker-brand, .worker-context { display: flex; align-items: center; min-width: 0; gap: 8px; }
.worker-brand img { display: block; border-radius: 10px; }
.worker-brand strong { font-size: 16px; white-space: nowrap; }
.worker-demo, .worker-group { border-radius: 8px; padding: 5px 7px; font-size: 12px; line-height: 1.25; white-space: nowrap; }
.worker-demo { color: #5a4a35; background: #fff0d7; }
.worker-group { color: #22569a; background: #edf4ff; overflow: hidden; text-overflow: ellipsis; }
.worker-main {
  padding: 16px max(16px, env(safe-area-inset-right)) 22px max(16px, env(safe-area-inset-left));
}
.worker-page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.worker-page-head h1 { font-size: clamp(25px, 6vw, 30px); line-height: 1.18; }
.worker-offline-status { margin-top: 5px; font-size: 12px; color: var(--muted); }
.worker-offline-status:empty { display: none; }
.worker-day { color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.worker-icon-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--blue); }
.worker-icon-button svg { width: 21px; height: 21px; }
.worker-filters { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: #e7edf6; }
.worker-filters button { display: flex; flex: 1 0 auto; min-height: 44px; align-items: center; justify-content: center; gap: 3px; padding: 3px 2px; border: 0; border-radius: 9px; color: #435971; background: none; font-size: 12px; font-weight: 650; white-space: nowrap; }
.worker-filters button[aria-pressed=true] { color: #1956ac; background: #fff; box-shadow: 0 1px 3px #132b4820; }
.worker-filters small { border-radius: 6px; background: #edf3fc; padding: 1px 4px; color: #3c587d; font-size: 10px; font-variant-numeric: tabular-nums; }
.worker-search { display: grid; gap: 8px; margin: 12px 0; }
.worker-search input, .worker-search select, .worker-auth input, .worker-modal input:not([type=file]) { min-height: 44px; font-size: 16px; }
.worker-search .search .btn { min-height: 44px; }
.worker-search .search-field svg { top: 13px; }
.worker-search input::placeholder { font-size: 13px; }
.worker-result-count { color: var(--muted); margin: 0 0 8px 2px; font-size: 12px; }
.worker-list { display: grid; gap: 10px; }
.worker-entry {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 9px;
  padding: 14px;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 2px 5px #18365b07;
}
.worker-entry:hover { border-color: #a8c3e9; }
.worker-entry:active { background: #f8fbff; }
.worker-entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.worker-entry-head strong { min-width: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.worker-entry-head .pill { flex: none; }
.worker-lift-label { min-width: 0; overflow-wrap: anywhere; }
.worker-lift-label small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; }
.worker-address, .worker-record-meta { display: flex; align-items: start; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.worker-address svg, .worker-record-meta svg { width: 15px; height: 15px; margin-top: 1px; }
.worker-entry-facts { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; padding-top: 9px; border-top: 1px solid #eef2f7; }
.worker-entry-facts small, .worker-entry-facts b { display: block; overflow-wrap: anywhere; }
.worker-entry-facts small { font-size: 11px; margin-bottom: 4px; }
.worker-entry-facts b { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.worker-plan-owner { color: #435971; font-size: 12px; overflow-wrap: anywhere; }
.worker-entry-action { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 7px; color: var(--blue); font-weight: 700; }
.worker-entry-action svg { width: 17px; height: 17px; }
.worker-entry[data-act="task-upload"] .worker-entry-action { color: #8b5611; }
.worker-correction-shortcut { margin-bottom: 10px; }
.draft-list [data-draft-lift]:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.draft-list .mobile-card header { align-items: flex-start; }
.draft-list .mobile-card .pill { flex: none; }
.worker-record-meta { flex-wrap: wrap; }
.worker-record-meta span { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.worker-empty { background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 15px; padding: 24px 14px; text-align: center; line-height: 1.55; }
.worker-main .pagination { margin-top: 12px; padding-inline: 2px; }
.worker-main .pagination .btn { min-height: 44px; }
.worker-tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 3;
  width: min(100%, 520px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 5px max(10px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -4px 18px #17395b0b;
}
.worker-tabbar button { display: grid; place-items: center; align-content: center; min-height: 55px; gap: 3px; padding: 2px; border: 0; border-radius: 10px; color: #4b637c; background: none; font-size: 12px; font-weight: 650; }
.worker-tabbar button[aria-current=page] { color: var(--blue); }
.worker-tab-icon { display: grid; place-items: center; width: 50px; height: 28px; border-radius: 10px; }
.worker-tab-icon svg { width: 20px; height: 20px; }
.worker-tabbar button[aria-current=page] .worker-tab-icon { background: #e9f1ff; }
.worker-auth { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.worker-auth .auth-card { width: min(100%, 420px); padding: 26px 22px; border-radius: 18px; }
.worker-auth .worker-brand { margin-bottom: 22px; }
.worker-auth .auth-action { min-height: 48px; }
.worker-profile-card, .worker-device, .worker-location, .worker-modal .evidence-list { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 15px; overflow-wrap: anywhere; }
.worker-profile-name { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.worker-profile-name .avatar { flex: none; width: 48px; height: 48px; border-radius: 14px; font-size: 22px; }
.worker-profile-name p { color: var(--muted); margin-top: 3px; }
.worker-profile-card .details, .worker-device .details { margin-bottom: 0; }
.worker-profile-actions { display: grid; gap: 9px; margin-top: 12px; }
.worker-profile-actions .btn { min-height: 48px; }
.worker-modal[open] { position: fixed; inset: 0; display: flex; flex-direction: column; width: min(100%, 520px); height: 100dvh; max-width: none; max-height: none; margin: auto; border: 0; border-radius: 0; background: #f3f6fb; overflow: hidden; }
.worker-modal .modal-head { position: static; display: grid; flex: none; grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr); gap: 5px; min-height: calc(54px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); }
.worker-modal .modal-head .text-btn { min-height: 44px; width: fit-content; }
.worker-modal .modal-head h2 { font-size: 16px; text-align: center; }
.worker-modal .modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 14px max(14px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.worker-device h3 { font-size: 19px; line-height: 1.3; }
.worker-device > p { color: var(--muted); margin: 5px 0 0; font-size: 13px; line-height: 1.5; }
.worker-device > .worker-device-unit { color: #435971; font-weight: 650; }
.worker-device .details { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.draft-review { padding: 13px 14px; border: 1px solid #efd6aa; border-radius: 12px; background: #fff7e8; overflow-wrap: anywhere; }
.draft-review h3 { font-size: 15px; }
.draft-review p, .draft-review .details, .draft-review-reference { margin: 5px 0 0; font-size: 13px; }
.draft-review-reference summary { min-height: 36px; display: list-item; padding-block: 8px; color: var(--blue); cursor: pointer; }
.draft-review-reference ul { padding-left: 18px; }
.draft-review-reference li { margin-bottom: 8px; }
.draft-review-reference li span { margin-left: 6px; }
.draft-review-reference img { display: block; max-width: 100%; max-height: 190px; margin-top: 5px; border-radius: 6px; }
.draft-review-reference li p { white-space: pre-wrap; }
.draft-review-confirm { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; cursor: pointer; }
.worker-modal .draft-review-confirm input { flex: none; width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--blue); }
.draft-review-label { margin-right: 6px; color: #865523; font-size: 12px; }
.worker-location-title { display: flex; align-items: center; gap: 7px; }
.worker-location-title svg { color: var(--blue); }
.worker-location .location-result { margin: 6px 0 9px; }
.worker-location .btn { min-height: 44px; }
.worker-modal .evidence-list legend { font-size: 14px; }
.worker-modal .evidence-slot .btn { min-width: 95px; }
.worker-modal .evidence-slot:has(.photo-example-link) [data-photo-pickers] .btn { min-width: 0; padding-inline: 9px; }
.worker-modal .evidence-slot [data-pick=camera] { color: var(--blue); background: #eef5ff; border-color: #d1e1f8; }
.worker-modal-footer { flex: none; padding: 8px max(14px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: #fff; border-top: 1px solid var(--line); }
.worker-modal-footer .btn { width: 100%; min-height: 48px; }
.worker-draft-status { display: block; margin: 6px 0; text-align: center; font-size: 12px; color: var(--muted); }
.worker-draft-status:empty { display: none; }
.worker-draft-status[data-error] { color: #9c3028; }
.worker-check-summary { margin: 0 0 6px; color: #304a61; text-align: center; font-size: 13px; line-height: 1.3; font-weight: 600; }
.draft-list .draft-upload-problem { margin: 8px 0 0; color: #9c3028; }
.visit-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; margin-bottom: 8px; }
.visit-progress-step { display: grid; align-content: center; gap: 2px; min-width: 0; min-height: 44px; padding: 4px; border: 1px solid #d9e4f0; border-radius: 9px; background: #f5f8fc; color: #243f58; text-align: center; line-height: 1.2; font-size: 12px; font-weight: 700; }
.visit-progress-step small { color: var(--muted); font-size: 11px; font-weight: 600; }
.visit-progress-step[data-complete] { border-color: #c7e8d6; background: #edf8f2; color: #225b40; }
.visit-progress-step[data-complete] small { color: inherit; }
body:has(.worker-shell) #toast:not(:empty) { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-end: max(17px, calc((100vw - 520px) / 2 + 17px)); }
