*{box-sizing:border-box}html,body{margin:0;padding:0;background:#f3f5f8;color:#111827;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}body{min-height:100vh}.app-shell{max-width:620px;margin:0 auto;min-height:100vh;background:#f7f8fa}.mobile-header{position:sticky;top:0;z-index:30;background:rgba(17,24,39,.96);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;padding-top:calc(14px + env(safe-area-inset-top));box-shadow:0 1px 8px rgba(0,0,0,.1)}.brand{color:#fff;text-decoration:none;font-weight:700}.header-actions{display:flex;gap:12px;align-items:center;font-size:12px;color:#cbd5e1}.header-actions a{color:#fff;text-decoration:none}.page{padding:18px 14px calc(28px + env(safe-area-inset-bottom))}.login-wrap{padding:8vh 6px 0}.logo-block{text-align:center;margin-bottom:26px}.logo-block h1{font-size:26px;margin:0 0 8px}.logo-block p{margin:0;color:#64748b}.stack-card,.section-card,.add-device,.admin-device{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:16px;box-shadow:0 4px 16px rgba(15,23,42,.04);margin-bottom:14px}.stack-card label,.sn-card label,.inner-form label{display:block;font-weight:600;margin-bottom:14px}input,textarea,select{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:13px 12px;font:inherit;font-size:16px;background:#fff;color:#111827;margin-top:7px}textarea{min-height:90px;resize:vertical}.primary-btn,.secondary-btn,.create-big{appearance:none;border:0;border-radius:12px;padding:13px 16px;font:inherit;font-weight:700;text-align:center;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.primary-btn{background:#111827;color:#fff;width:100%}.secondary-btn{background:#fff;border:1px solid #cbd5e1;color:#111827}.create-big{background:#111827;color:#fff;width:100%;font-size:18px;padding:17px}.tabs{display:grid;grid-template-columns:1fr 1fr;background:#e5e7eb;border-radius:12px;padding:4px;margin-bottom:12px}.tab{border:0;background:transparent;padding:11px;border-radius:9px;font-weight:700}.tab.active{background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.08)}.tab-panel{display:none}.tab-panel.active{display:block}.sms-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.sms-row label{margin:0}.sms-send{white-space:nowrap;height:48px}.hint,.section-desc,.meta-line,.empty-small{font-size:13px;color:#64748b;line-height:1.5}.demo-box{margin-top:16px;padding:12px;border-radius:12px;background:#eef2ff;color:#475569;font-size:13px}.alert{padding:12px 14px;border-radius:12px;margin:12px 0;font-size:14px}.alert.error{background:#fef2f2;color:#b91c1c}.alert.success{background:#ecfdf5;color:#047857}.home-hero{padding:16px 0 20px}.eyebrow{font-size:12px;color:#64748b;margin-bottom:5px}.home-hero h1,.order-head h1,.page-title{margin:0 0 8px;font-size:28px}.home-hero p{color:#64748b;margin:0 0 22px}.simple-actions details{background:#fff;border-radius:14px;padding:14px;border:1px solid #e5e7eb}.simple-actions summary,.add-device summary,.admin-device summary{font-weight:700;cursor:pointer}.record-list,.device-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}.record-row,.device-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;text-decoration:none;color:#111827}.record-row div,.device-row div{min-width:0}.record-row b,.device-row b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-row span,.device-row span{display:block;font-size:12px;color:#64748b;margin-top:4px}.status-chip{flex:none;padding:5px 8px!important;border-radius:999px;background:#f1f5f9;color:#475569!important;margin:0!important}.status-chip.submitted,.status-chip.completed{background:#dcfce7;color:#166534!important}.back-link{display:inline-block;color:#475569;text-decoration:none;margin-bottom:12px}.field-title{font-weight:700;margin:8px 0}.segmented{display:grid;gap:8px}.segmented.two{grid-template-columns:1fr 1fr}.segmented.three{grid-template-columns:repeat(3,1fr)}.segmented label{margin:0}.segmented input{display:none}.segmented span{display:block;text-align:center;padding:11px 8px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:14px}.segmented input:checked+span{border-color:#111827;background:#111827;color:#fff}.or-line{text-align:center;color:#94a3b8;margin:-2px 0 10px}.sticky-submit{position:sticky;bottom:calc(10px + env(safe-area-inset-bottom));z-index:10;box-shadow:0 8px 24px rgba(15,23,42,.18)}.order-head{margin:6px 0 18px}.add-device{margin-top:14px}.inner-form{margin-top:14px}.section-card{padding:14px;margin-bottom:16px}.section-title{font-size:20px;font-weight:800;display:flex;align-items:center;gap:9px;margin-bottom:4px}.section-title span{display:inline-flex;width:28px;height:28px;border-radius:50%;background:#111827;color:#fff;align-items:center;justify-content:center;font-size:14px}.pre-photo-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.photo-item{border:1px solid #e5e7eb;border-radius:13px;padding:10px;background:#fafafa}.photo-top{display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-bottom:8px}.req{font-size:11px;color:#dc2626}.photo-preview{aspect-ratio:4/3;background:#eef2f7;border-radius:10px;overflow:hidden;margin-bottom:8px}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-placeholder{height:100%;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px}.file-btn{width:100%;font-size:13px;padding:9px}.upload-note{font-size:11px;color:#047857;margin-top:6px;min-height:16px}.sn-card{margin-top:14px;padding-top:14px;border-top:1px dashed #dbe2ea}.inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.group-title{font-size:17px;font-weight:800;margin:20px 0 10px}.inspect-card{border:1px solid #e5e7eb;border-radius:14px;padding:13px;margin-bottom:11px;background:#fff}.inspect-name{font-weight:700;margin-bottom:10px}.status-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.status-btn{border:1px solid #cbd5e1;background:#fff;border-radius:10px;padding:11px 4px;font-weight:700}.status-btn.selected.normal{background:#ecfdf5;color:#047857;border-color:#86efac}.status-btn.selected.abnormal{background:#fef2f2;color:#b91c1c;border-color:#fca5a5}.status-btn.selected.unchecked{background:#fff7ed;color:#c2410c;border-color:#fdba74}.inspect-detail{margin-top:11px;padding-top:11px;border-top:1px dashed #e5e7eb}.hidden{display:none!important}.desc-label{font-weight:600}.resolution-wrap{margin-top:12px}.issue-media-block{margin-top:12px}.issue-media-gallery,.mini-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:8px}.issue-media-gallery img,.mini-gallery img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;border:1px solid #e5e7eb}.video-chip{display:flex;align-items:center;justify-content:center;min-height:60px;border:1px solid #cbd5e1;border-radius:8px;text-decoration:none;color:#334155;font-size:12px;padding:6px;background:#f8fafc}.save-line{display:flex;align-items:center;gap:10px;margin-top:10px}.save-item{padding:9px 12px;font-size:13px}.save-state{font-size:12px;color:#047857}.checklist-box{background:#fff7ed;color:#9a3412;padding:12px;border-radius:12px;font-size:13px;line-height:1.6;margin-bottom:12px}.admin-head{display:flex;align-items:center;justify-content:space-between}.search-bar{display:grid;grid-template-columns:1fr auto;gap:8px;margin:14px 0}.search-bar input{margin:0}.admin-actions{display:flex;justify-content:flex-end;margin-bottom:10px}.admin-list{margin-top:0}.arrow{font-size:24px!important;color:#94a3b8!important}.admin-device{padding:0;overflow:hidden}.admin-device summary{display:flex;justify-content:space-between;gap:10px;padding:15px}.admin-device summary span{font-size:12px;color:#64748b;font-weight:400}.admin-device-body{padding:0 14px 14px}.mini-gallery a{position:relative}.mini-gallery a span{position:absolute;left:4px;bottom:4px;background:rgba(0,0,0,.6);color:#fff;font-size:10px;padding:2px 5px;border-radius:5px}.result-row{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #f1f5f9}.result-row b{display:block;font-size:14px}.result-row span{display:block;font-size:12px;color:#64748b;margin-top:4px}.result-badges{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.result-chip,.resolution-chip{padding:4px 7px;border-radius:999px;font-size:11px!important;margin:0!important}.result-chip.normal{background:#dcfce7;color:#166534}.result-chip.abnormal{background:#fee2e2;color:#991b1b}.result-chip.not_checked{background:#ffedd5;color:#9a3412}.resolution-chip{background:#e2e8f0;color:#475569!important}.issue-gallery{margin-bottom:8px}
@media(max-width:390px){.pre-photo-list{grid-template-columns:1fr}.segmented.three{grid-template-columns:1fr 1fr 1fr}.status-btn{font-size:14px}.page{padding-left:10px;padding-right:10px}.stack-card,.section-card{padding:12px}.issue-media-gallery,.mini-gallery{grid-template-columns:repeat(2,1fr)}}

.resolution-options .resolution-btn{appearance:none;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#111827;padding:11px 8px;font:inherit;font-size:14px;cursor:pointer;text-align:center}.resolution-options .resolution-btn.selected{border-color:#111827;background:#111827;color:#fff}.resolution-hint{margin-top:7px;color:#64748b;font-size:12px;line-height:1.4}

.handling-label{display:block;margin-top:12px;font-weight:600}.handling-label textarea{min-height:86px}.media-help{margin-top:7px;color:#64748b;font-size:12px;line-height:1.45}.issue-media-pending{margin-top:8px}.pending-media-title{font-size:12px;color:#475569;margin-bottom:7px}.pending-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.pending-media-item{border:1px dashed #cbd5e1;border-radius:9px;padding:6px;background:#f8fafc;min-width:0}.pending-media-item img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:7px;display:block}.pending-video-chip{min-height:72px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:11px;color:#334155;word-break:break-all}.pending-media-remove{width:100%;margin-top:6px;border:1px solid #cbd5e1;background:#fff;border-radius:7px;padding:5px 4px;font-size:11px;color:#475569}.save-state.error-state{color:#b91c1c}.save-item:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:390px){.pending-media-grid{grid-template-columns:repeat(2,1fr)}}

.report-card{margin-top:14px}.report-title{font-size:17px;font-weight:800;margin-bottom:5px}.report-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.report-btn{width:100%;min-height:46px}.report-note{margin-top:9px;color:#64748b;font-size:11px;line-height:1.5}@media(max-width:360px){.report-actions{grid-template-columns:1fr}}

.optional-tag{font-size:12px;font-weight:600;color:#64748b;background:#f1f5f9;border-radius:999px;padding:2px 7px;margin-left:6px;white-space:nowrap}
.install-tip{margin-top:14px;text-align:center;color:#64748b;font-size:12px;line-height:1.5}.account-summary{font-weight:800;cursor:pointer}.account-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}.account-title b{display:block}.account-title span{font-size:12px;color:#64748b}.reset-password{margin-top:12px;padding-top:10px;border-top:1px dashed #e5e7eb}.reset-password summary{font-size:13px;font-weight:700;cursor:pointer}.inline-reset{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:8px}.inline-reset input{margin:0}.admin-actions{gap:8px;flex-wrap:wrap}

/* V1.2.0: remember only the previous device building/classroom in a batch job */
.remember-field{position:relative}.remember-suggestions{display:none;flex-wrap:wrap;gap:7px;margin-top:7px;padding:9px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc}.remember-field.suggestions-open .remember-suggestions{display:flex}.remember-suggestions:empty{display:none!important}.remember-option{appearance:none;border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:7px 10px;font:inherit;font-size:13px;line-height:1;cursor:pointer}.remember-option:active{background:#e2e8f0}.needs-attention{outline:3px solid #f59e0b!important;outline-offset:3px;box-shadow:0 0 0 6px rgba(245,158,11,.12)!important}.inspect-card.needs-attention{border-color:#f59e0b}.first-missing-note{color:#b45309;font-size:12px;margin-top:7px}
