:root {
  --blue: #4b9eff;
  --deep-blue: #2478ed;
  --sky: #eaf5ff;
  --bg: #f4f8ff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #7c8798;
  --line: #edf1f7;
  --green: #20bf6b;
  --orange: #ff9f43;
  --red: #ee5253;
  --purple: #7868e6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; background: #dfe8f5; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif; color: var(--text); display: flex; justify-content: center; }
.phone-shell { width: min(430px, 100vw); min-height: 100vh; background: linear-gradient(180deg, #dcecff 0%, #f7fbff 34%, #fff 100%); position: relative; overflow: hidden; padding-bottom: 78px; box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.status-bar { height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 13px; color: #0f172a; }
.app-header { height: 54px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 16px; }
.app-header h1 { margin: 0; font-size: 20px; font-weight: 800; }
.back-btn { position: absolute; left: 14px; border: 0; background: transparent; font-size: 34px; line-height: 1; color: #111827; }
.hidden { display: none !important; }
.role-pill { position: absolute; right: 12px; border: 0; border-radius: 999px; padding: 6px 9px; background: rgba(255,255,255,.75); color: var(--deep-blue); font-size: 12px; }
.page { height: calc(100vh - 82px - 78px); overflow-y: auto; padding: 14px 16px 22px; }
.scan-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.mini-scan { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 3px 7px; font-size: 12px; color: var(--text); }
.banner { height: 184px; border-radius: 12px; background: linear-gradient(135deg, #68b7ff, #2f83f7); color: white; padding: 24px; position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(36,120,237,.22); }
.banner::before { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.18); right: -30px; top: -42px; }
.banner::after { content: "🔬"; position: absolute; left: 24px; bottom: 22px; font-size: 74px; transform: rotate(-8deg); opacity: .9; }
.banner h2 { margin: 42px 0 0 152px; font-size: 26px; line-height: 1.3; letter-spacing: 1px; }
.card { background: var(--card); border-radius: 22px; padding: 18px; margin-top: 16px; box-shadow: 0 8px 26px rgba(15,23,42,.06); }
.summary-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 14px; }
.summary-card { border: 0; border-radius: 18px; background: #fff; padding: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.06); text-align: left; }
.summary-card strong { display: block; font-size: 30px; color: var(--deep-blue); line-height: 1; margin-bottom: 8px; }
.summary-card span { color: var(--muted); font-weight: 800; }
.flow { display: grid; gap: 8px; margin-top: 10px; }
.flow-step { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.flow-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.flow-step.active .flow-dot { background: var(--deep-blue); }
.flow-step.done .flow-dot { background: var(--green); }
.mobile-special-source-list { display: grid; gap: 10px; margin-top: 12px; max-height: 44vh; overflow-y: auto; }
.mobile-special-source { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.mobile-special-source.used { text-decoration: line-through; color: var(--muted); opacity: .6; background: #f7f8fa; }
.mobile-special-source p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; }
.mobile-special-transfer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (min-width: 700px) {
  .mobile-special-source-list { max-height: 52vh; }
}
.rectify-timeline { margin-top: 12px; position: relative; padding-left: 12px; }
.timeline-item { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 1px; background: #d8dee9; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; background: #e8f1ff; flex: 0 0 32px; }
.timeline-content strong { display: block; font-size: 15px; margin-bottom: 6px; }
.timeline-content p { margin: 4px 0; color: var(--text); line-height: 1.45; }
.status-link { border: 0; border-radius: 999px; padding: 4px 8px; font-weight: 800; }
.status-link.ok { background: #e8fbf1; color: #11935c; }
.status-link.bad { background: #ffeded; color: #d63031; }
.select-all-line { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 12px; margin: 12px 0; font-weight: 800; box-shadow: 0 6px 18px rgba(15,23,42,.05); }
.select-all-line input, .card-title input { width: auto; min-width: auto; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 17px; font-weight: 800; }
.section-title::before { content: ""; width: 4px; height: 20px; border-radius: 8px; background: var(--deep-blue); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.module { border: 0; background: transparent; display: grid; justify-items: center; gap: 8px; font-size: 14px; color: #111827; font-weight: 700; }
.icon-box { width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; font-size: 30px; background: #eef7ff; }
.icon-green { background: #e9fff6; color: #10ac84; }
.icon-red { background: #fff0f0; color: var(--red); }
.icon-orange { background: #fff4e7; color: var(--orange); }
.icon-purple { background: #f0efff; color: var(--purple); }
.icon-blue { background: #eaf4ff; color: var(--deep-blue); }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
.tab { border: 0; background: transparent; color: #9aa4b2; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 12px; }
.tab span { font-size: 24px; }
.tab.active { color: var(--deep-blue); font-weight: 800; }
.segment { display: grid; grid-template-columns: repeat(2, 1fr); background: #eaf1fb; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.segment button { border: 0; border-radius: 10px; padding: 10px; background: transparent; color: var(--muted); font-weight: 700; }
.segment button.active { background: white; color: var(--deep-blue); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.task-card, .hazard-card { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(15,23,42,.05); border: 1px solid #f0f3f8; }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.card-title { font-weight: 800; font-size: 16px; line-height: 1.35; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.8; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; background: #eaf4ff; color: var(--deep-blue); white-space: nowrap; }
.badge.green { background: #e8fbf1; color: #11935c; }
.badge.orange { background: #fff3df; color: #c56a00; }
.badge.red { background: #ffeded; color: #d63031; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn { border: 0; border-radius: 11px; padding: 10px 13px; background: #eef4fb; color: #334155; font-weight: 800; }
.btn.primary { background: var(--deep-blue); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.orange { background: var(--orange); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.info-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; font-size: 12px; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: 9px 8px; text-align: left; }
.info-table th { background: #fbfdff; color: var(--muted); font-weight: 700; width: 76px; }
.task-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
.task-table th, .task-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.task-table th { color: var(--muted); font-weight: 700; background: #fbfdff; }
.form-block { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; border: 1px solid #eef2f7; }
.form-line { display: grid; gap: 7px; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #dfe6f2; border-radius: 10px; padding: 11px; font: inherit; background: #fff; }
textarea { min-height: 88px; resize: vertical; }
.radio-row { display: flex; gap: 16px; color: #334155; font-weight: 700; }
.issue-fields { display: none; padding-top: 10px; }
.issue-fields.show { display: block; }
.pass-all { width: 100%; margin: 8px 0 14px; }
.sheet-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet-mask.show { display: flex; }
.sheet { width: min(430px, 100vw); max-height: 88vh; background: #fff; border-radius: 24px 24px 0 0; overflow: hidden; display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-head button { border: 0; background: transparent; font-size: 24px; }
.sheet-body { padding: 16px; overflow: auto; }
.sheet-footer { display: flex; gap: 10px; padding: 12px 16px 18px; border-top: 1px solid var(--line); }
.sheet-footer .btn { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }
.scan-box { height: 220px; border-radius: 20px; background: linear-gradient(135deg, #12233f, #284b84); color: #fff; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; }
.scan-box::after { content: ""; width: 170px; height: 170px; border: 2px solid rgba(255,255,255,.7); border-radius: 16px; position: absolute; }
.scan-line { width: 190px; height: 3px; background: #33e1ff; box-shadow: 0 0 14px #33e1ff; animation: scan 1.8s infinite alternate; }
@keyframes scan { from { transform: translateY(-70px); } to { transform: translateY(70px); } }
