*{box-sizing:border-box}body{margin:0;font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft Yahei",sans-serif;color:#222;background:#f5f6f7}button,input,select,textarea{font:inherit}button{padding:7px 12px;border:1px solid #b9c5ca;background:white;border-radius:4px;cursor:pointer}button.primary{background:#286b61;color:white;border-color:#286b61}button.danger{color:#b12626}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{border:1px solid #b9c5ca;border-radius:4px;padding:7px;width:100%;background:white}textarea{min-height:85px;resize:vertical}.login{max-width:400px;margin:12vh auto;padding:26px;background:white;border:1px solid #ddd}.login h1{font-size:22px}.layout{display:grid;grid-template-columns:190px 1fr;min-height:100vh}aside{background:#fff;border-right:1px solid #ddd;padding:14px}aside h2{font-size:17px;margin:5px 0 18px}aside button{display:block;width:100%;text-align:left;border:0;margin:2px 0}aside button.active{background:#dfeee9;color:#175b50}main{padding:20px;max-width:1400px;width:100%;margin:auto}header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}h1{font-size:21px;margin:0}h2{font-size:17px;margin:0 0 12px}h3{font-size:15px;margin:16px 0 8px}.card{background:white;border:1px solid #ddd;border-radius:5px;padding:16px;margin-bottom:14px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row>*{flex:1}.row button,.row label.small{flex:0 0 auto}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.field{display:block;margin-bottom:10px}.field span{display:block;font-weight:600;margin-bottom:4px}.field small{color:#666}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.muted{color:#666}.warn{background:#fff4da;border-left:3px solid #dc9b1b;padding:10px;margin:10px 0}.error{color:#ad2323}.ok{color:#176a3f}table{border-collapse:collapse;width:100%;background:white}th,td{border:1px solid #ddd;padding:7px;text-align:left;vertical-align:top}th{background:#f1f3f3}.table-wrap{overflow:auto}.pill{display:inline-block;padding:2px 7px;border-radius:9px;background:#eef1f1;margin:2px}.tabs{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.tabs button.active{background:#286b61;color:white}.mini{width:95px}.wide{min-width:400px}#toast{position:fixed;right:15px;bottom:15px;background:#222;color:white;padding:10px 16px;border-radius:5px;display:none;z-index:9}.day{border:1px solid #ddd;padding:10px;margin:8px 0}.meal{padding:6px;border-bottom:1px solid #eee}.result{font-size:16px;font-weight:600}.align-right{text-align:right}@media(max-width:750px){.layout{display:block}aside{display:flex;overflow:auto;gap:5px}aside h2{display:none}aside button{white-space:nowrap;width:auto}main{padding:12px}.wide{min-width:200px}}

.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}.module-grid button{text-align:left;min-height:48px}.plan-layout{display:grid;grid-template-columns:minmax(220px,290px) minmax(0,1fr);gap:14px}.plan-profile{align-self:start;position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}.plan-profile p{overflow-wrap:anywhere}.thumb-grid{display:flex;flex-wrap:wrap;gap:8px}.thumb-button{width:105px;min-height:105px;padding:5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;overflow:hidden}.thumb-button img{max-width:90px;max-height:78px;object-fit:contain}.thumb-button span{font-size:11px;max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery-overlay{position:fixed;inset:0;background:rgba(0,0,0,.88);z-index:20;display:flex;align-items:center;justify-content:space-around;gap:12px;padding:25px}.gallery-overlay figure{margin:0;text-align:center;color:white;max-width:75vw}.gallery-overlay img{max-width:75vw;max-height:82vh;object-fit:contain}.gallery-overlay figcaption{padding:8px}.gallery-close{position:absolute;right:20px;top:20px}.quick-select{display:flex;gap:8px;align-items:center;margin:0 0 10px}.quick-select select{max-width:300px}.quick-select button{white-space:nowrap}.chart{display:flex;align-items:center;gap:20px}.chart svg{width:280px;max-width:100%}@media(max-width:850px){.plan-layout{grid-template-columns:1fr}.plan-profile{position:static;max-height:none}.gallery-overlay{padding:8px}.gallery-overlay figure,.gallery-overlay img{max-width:70vw}.quick-select{flex-wrap:wrap}}

.floating-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:15;display:flex;justify-content:center;align-items:center;padding:18px}.floating-panel{width:min(1160px,100%);max-height:92vh;background:#f5f6f7;border-radius:8px;display:flex;flex-direction:column;box-shadow:0 10px 36px #0004;overflow:hidden}.floating-header{background:white;border-bottom:1px solid #ddd;padding:12px 16px;display:flex;align-items:center;gap:10px}.floating-header h2{flex:1;margin:0}.floating-body{overflow:auto;padding:16px}.floating-body>.card{margin-bottom:0}.floating-plan-editor .plan-profile{position:static;max-height:70vh}.floating-plan-editor .plan-layout{grid-template-columns:minmax(180px,250px) minmax(0,1fr)}@media(max-width:760px){.floating-backdrop{padding:5px}.floating-panel{max-height:98vh}.floating-body{padding:8px}.floating-plan-editor .plan-layout{grid-template-columns:1fr}}

.profile-table{min-width:1180px}.profile-table td{min-width:78px}.profile-table td:nth-child(2){min-width:120px}.profile-table td:nth-child(5),.profile-table td:nth-child(6){min-width:135px}.profile-table td:nth-child(7){min-width:150px}.profile-table td:last-child{min-width:195px}.profile-table small{display:block;color:#899297;font-size:11px;margin-top:4px}.age-plus{color:#2a9d38;font-weight:700}.growth-badge{display:inline-block;padding:1px 5px;border:1px solid;border-radius:3px;font-weight:700;margin-top:2px}.growth-badge.low,.growth-range.low{color:#c68400}.growth-badge.normal,.growth-range.normal{color:#2c9a34}.growth-badge.high,.growth-range.high{color:#d34b4b}.growth-range{font-weight:700}.growth-badge.normal{background:#f2fff0}.growth-badge.low{background:#fff9eb}.growth-badge.high{background:#fff1f1}.notes-preview{max-width:210px;max-height:72px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.send-status{display:inline-block;font-size:12px;padding:2px 5px;border-radius:3px;margin-top:4px}.send-status.sent{color:#26963c;background:#eeffed}.send-status.pending{color:#9b661e;background:#fff6e8}

.file-pdf{display:grid;place-items:center;width:82px;height:72px;background:#fbecec;color:#b23232;font-weight:700}.pdf-preview{width:min(70vw,900px);height:75vh;border:0;background:#fff}.export-dialog{width:min(380px,100%);margin:auto}.analysis-main{min-width:0}.analysis-main .tabs{margin-top:0}.detection-methods input[type=checkbox]{width:auto}.detection-methods .day{margin:6px 0}.report-option{display:inline-flex;align-items:center;gap:8px;margin:8px 0 12px}.report-option input{width:auto}.stat-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.stat-cards>div{border:1px solid #ddd;padding:12px;text-align:center}.stat-cards strong{display:block;font-size:24px;color:#276cbe}.stat-cards span{font-size:12px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.stat-bar{display:grid;grid-template-columns:75px 1fr 95px;align-items:center;gap:6px;margin:8px 0;font-size:12px}.stat-bar>div{height:8px;background:#eee}.stat-bar i{display:block;height:100%;background:#2a94da}.stat-bar strong{font-size:11px;text-align:right}
