* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; }
.view { display: none; max-width: 520px; margin: 0 auto; min-height: 100vh; }
.view.active { display: block; }

/* 官方宣传首页 */
.home-hero { max-width: 520px; margin: 8vh auto; background: #fff; border-radius: 16px; padding: 40px 28px; box-shadow: 0 6px 24px rgba(0,0,0,.08); text-align: center; }
.home-slogan { font-size: 22px; color: #1677ff; font-weight: 700; margin: 6px 0 12px; }
.home-desc { font-size: 15px; color: #666; line-height: 1.7; margin-bottom: 26px; }
.home-block { text-align: left; margin-bottom: 22px; }
.home-block h2 { font-size: 17px; color: #1677ff; border-left: 4px solid #1677ff; padding-left: 10px; margin-bottom: 10px; }
.home-block p { font-size: 14px; color: #555; line-height: 1.8; text-align: left; }
.brand-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-tags span { background: #e6f4ff; color: #1677ff; border: 1px solid #91caff; border-radius: 14px; padding: 4px 12px; font-size: 13px; }
.service-list { display: flex; flex-wrap: wrap; gap: 8px; }
.service-list span { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; border-radius: 6px; padding: 5px 10px; font-size: 13px; }
.home-block.contact p { margin: 4px 0; font-size: 14px; color: #333; }
.home-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.home-actions .btn { padding: 12px; font-size: 16px; text-decoration: none; display: block; text-align: center; }
.home-actions .btn.primary { color: #fff; background: #1677ff; }
.home-actions .btn:not(.primary) { color: #1677ff; background: #e6f4ff; border: 1px solid #91caff; }
.home-foot { font-size: 13px; color: #999; }

/* 登录 */
.login-card { max-width: 380px; margin: 12vh auto; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.logo { text-align: center; font-size: 30px; margin-bottom: 20px; line-height: 1.3; color: #1677ff; font-weight: 700; }
.logo-icons { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 10px; }
.logo-icons img { width: 46px; height: 46px; }
.tabs { display: flex; margin-bottom: 16px; }
.tab { flex: 1; padding: 10px; border: none; background: #f5f5f5; cursor: pointer; font-size: 15px; border-radius: 8px; }
.tab.active { background: #1677ff; color: #fff; }
input { width: 100%; padding: 12px 14px; margin-bottom: 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 15px; }
input:focus { outline: none; border-color: #1677ff; }
.btn { border: none; border-radius: 8px; cursor: pointer; font-size: 15px; }
.btn.primary { background: #1677ff; color: #fff; padding: 12px; }
.btn.danger { background: #ff4d4f; color: #fff; padding: 10px 14px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; color: #1677ff; }
.btn-block { width: 100%; }
.msg { margin-top: 12px; font-size: 14px; color: #ff4d4f; min-height: 18px; text-align: center; }
.qr-none-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #888; font-weight: normal; margin-top: 6px; }
.qr-none-opt input[type=checkbox] { width: auto; margin: 0; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.app-title { font-weight: 700; font-size: 17px; color: #1677ff; flex: 1; }
.user-badge { background: #1677ff; color: #fff; border-radius: 20px; padding: 3px 10px; font-size: 12px; }

.scan-bar { display: flex; gap: 8px; padding: 12px 16px; }
.scan-bar input { flex: 1; margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 16px 12px; }
.act-btn { flex: 1; min-width: 40%; padding: 16px 10px; background: #fff; border: 1px solid #eee; border-radius: 12px; font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.act-btn:active { transform: scale(.97); }

.content { padding: 8px 16px 40px; }
.welcome { text-align: center; color: #999; padding: 40px 0; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.card h3 { font-size: 16px; margin-bottom: 12px; color: #1677ff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 13px; color: #666; display: block; margin-bottom: 4px; }
label .req { color: #ff4d4f; }
select, input[type=date] { width: 100%; padding: 10px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; margin-bottom: 10px; }

.device-row { border-top: 1px solid #f0f0f0; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; }
.device-row:first-child { border-top: none; }
.device-info { font-size: 14px; }
.device-info .sub { color: #999; font-size: 12px; }
.radio-select { display: flex; align-items: center; gap: 10px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.r1 { background:#ff4d4f; color:#fff; }
.badge.r2 { background:#fa8c16; color:#fff; }
.badge.r3 { background:#1677ff; color:#fff; }
.badge.r4 { background:#999; color:#fff; }

.status-ok { color: #52c41a; }
.status-fail { color: #ff4d4f; }

/* 打印 */
.print-sheet { padding: 20px; }
@media print { body * { visibility: hidden; } .print-sheet, .print-sheet * { visibility: visible; } .print-sheet { position: absolute; left: 0; top: 0; } }
