:root{color:#1f2933;background:#f4f7fb;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f4f7fb}button,input,select{font:inherit}button{border:0}.page-shell{min-height:100vh;max-width:540px;margin:0 auto;background:#fff;box-shadow:0 0 24px #1f293314}.nav-bar{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:48px 1fr 64px;align-items:center;height:calc(56px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);background:#fff;border-bottom:1px solid #eef1f5}.nav-bar h1{margin:0;text-align:center;font-size:20px;font-weight:600;letter-spacing:0}.icon-button,.more-button,.close-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:transparent;color:#111827}.more-button{justify-self:center;width:58px;min-height:34px;gap:4px;border:1px solid #e6ebf1;border-radius:18px}.more-button span{width:5px;height:5px;border-radius:50%;background:#111827}.chevron-left,.chevron-right,.arrow{width:13px;height:13px;border:solid currentColor;border-width:0 0 2px 2px}.chevron-left{transform:rotate(45deg)}.chevron-right{transform:rotate(225deg)}.arrow{width:10px;height:10px;transform:rotate(-45deg);border-color:#2f98d4}.arrow.up{transform:rotate(135deg)}.patient-panel{position:relative;background:#eef7ff;border-bottom:1px solid #e2edf8}.patient-trigger{display:flex;align-items:center;justify-content:center;width:100%;min-height:58px;gap:10px;background:transparent;color:#2d95d2;font-size:22px;font-weight:600}.patient-trigger strong{color:#5b7187;font-size:14px;font-weight:500}.patient-sheet{position:absolute;top:100%;left:0;right:0;z-index:8;background:#fff;box-shadow:0 18px 40px #1f293338}.patient-option{display:flex;align-items:center;justify-content:space-between;min-height:72px;padding:12px 20px;border-bottom:1px solid #edf1f5}.patient-option.selected{background:#f3fbff}.patient-option div{display:grid;gap:5px}.patient-option strong{font-size:18px;font-weight:600}.patient-option span{color:#4b5563}.patient-actions{display:flex;flex-shrink:0;gap:8px}.text-button{min-width:54px;min-height:34px;border-radius:6px;background:#e7f4ff;color:#1c83bf}.danger-button{min-width:54px;min-height:34px;border-radius:6px;background:#fff1f1;color:#b32322}.add-patient-button{width:calc(100% - 40px);min-height:44px;margin:12px 20px 16px;border-radius:6px;background:#1d92d2;color:#fff;font-weight:600}.add-patient-button:disabled{background:#dbe4ed;color:#7a8794}.search-panel{padding:18px 18px 14px;border-bottom:10px solid #f4f7fb}.search-panel.compact{padding-top:14px}.field-row{display:grid;grid-template-columns:76px 1fr;align-items:center;min-height:48px;border-bottom:1px solid #eef1f5}.field-row label{color:#52616f}.field-row input{width:100%;height:40px;border:0;outline:0;text-align:right;color:#111827;background:transparent}.primary-button{width:100%;min-height:46px;margin-top:16px;border-radius:6px;background:#1d92d2;color:#fff;font-weight:600}.primary-button:disabled{opacity:.68}.hint{margin:14px 0 0;color:#b32322;font-size:14px;line-height:1.6}.error-text{margin:8px 0 0;color:#b32322;font-size:14px;line-height:1.5}.report-section{padding:16px 18px 28px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.section-title h2{margin:0;font-size:18px;font-weight:600}.section-title span{color:#697586;font-size:14px}.empty-state{display:grid;place-items:center;min-height:148px;color:#81909f;border:1px dashed #d7e0ea;border-radius:8px;background:#fbfdff}.report-list{display:grid;gap:10px}.report-item{display:grid;grid-template-columns:1fr auto;align-items:center;width:100%;min-height:92px;padding:14px;border:1px solid #e8eef5;border-radius:8px;background:#fff;text-align:left}.report-main{display:grid;gap:6px}.report-main strong{color:#111827;font-size:15px}.report-main span,.report-main small{color:#6b7785}.report-meta{display:flex;align-items:center;gap:10px;color:#1d92d2;font-size:14px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.5)}.editor-modal{width:min(100%,540px);padding:18px;padding-bottom:calc(18px + env(safe-area-inset-bottom));border-radius:12px 12px 0 0;background:#fff}.editor-modal header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.editor-modal h2{margin:0;font-size:18px}.editor-modal label{display:grid;gap:8px;margin-top:12px;color:#52616f}.editor-modal input,.editor-modal select{width:100%;height:42px;padding:0 12px;border:1px solid #dbe4ed;border-radius:6px;outline:0;background:#fff}.viewer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;grid-template-rows:auto 1fr;background:#fff}.viewer-header{display:grid;grid-template-columns:48px 1fr;align-items:center;min-height:calc(58px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);border-bottom:1px solid #e8eef5}.viewer-header div{display:grid;gap:3px;min-width:0}.viewer-header strong,.viewer-header span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.viewer-header span{color:#6b7785;font-size:13px}.viewer iframe{width:100%;height:100%;border:0;background:#eef1f5}.safe-bottom{height:env(safe-area-inset-bottom)}@media (max-width: 360px){.patient-trigger{font-size:20px}.report-item{grid-template-columns:1fr;gap:10px}.report-meta{justify-content:space-between}}.global-loading{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:9999;visibility:hidden}.loading-spinner{width:50px;height:50px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
