:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#24324a;background:#f7f9fc;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8fb4ff;outline-offset:2px}.topbar{height:66px;background:#fff;border-bottom:1px solid #e9eef5;display:flex;align-items:center;justify-content:space-between;padding:0 30px}.brand{display:flex;align-items:center;gap:12px;font-weight:700;font-size:17px;color:#152a47}.brandmark{background:#2e65be;color:white;width:32px;height:32px;border-radius:9px;display:grid;place-items:center;font-weight:800}.topright{display:flex;align-items:center;gap:17px;color:#627187}.chip{font-size:12px;background:#eef4ff;color:#3866ab;border-radius:4px;padding:4px 8px}.ghost{border:0;background:transparent;color:#5579b8;padding:7px}.page{max-width:1600px;margin:0 auto;padding:23px 28px}.headline{background:#fff;border:1px solid #e8edf4;border-radius:10px;padding:18px 23px;margin-bottom:19px;display:flex;justify-content:space-between;align-items:center;gap:12px}.eyebrow{font-size:12px;color:#8c9aad;margin-bottom:7px}.headline h1{margin:0;font-size:21px;color:#1f304a}.subline{color:#8390a3;font-size:12px;margin-top:6px}.tabs{height:47px;display:flex;align-items:flex-start;gap:30px;border-bottom:1px solid #e5eaf0;margin-bottom:18px}.tab{color:#66758d;padding:10px 2px 13px;border-bottom:2px solid transparent}.tab.active{color:#254f91;border-color:#3f72c6;font-weight:600}.grid{display:grid;grid-template-columns:294px minmax(0,1fr);gap:18px;align-items:start}.card{background:#fff;border:1px solid #e7ecf3;border-radius:10px;box-shadow:0 4px 16px rgba(26,50,84,.025)}.sidebar{min-height:620px;padding:17px}.side-title{font-size:12px;letter-spacing:.03em;color:#97a4b3;margin:3px 7px 17px}.subject-search{width:100%;margin-bottom:14px}.subject-list{border-bottom:1px solid #eef1f5;padding-bottom:12px;margin-bottom:17px;max-height:210px;overflow:auto}.subject-item,.form-nav{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:transparent;text-align:left;padding:10px 11px;border-radius:6px;color:#536175;gap:8px}.subject-item:hover,.form-nav:hover{background:#f4f7fc}.subject-item.active,.form-nav.active{background:#edf3ff;color:#3265b3;font-weight:600}.form-nav .left{display:flex;align-items:center;gap:10px}.dot{width:8px;height:8px;border-radius:50%;background:#d6dee9;flex:none}.form-nav.active .dot{background:#4d82d0}.count{color:#a5afbd;font-size:12px}.main{min-height:620px}.main-head{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:22px 26px;border-bottom:1px solid #edf0f5}.main-head h2{font-size:18px;margin:0 0 6px}.main-head p{font-size:12px;color:#9ba6b5;margin:0}.badge{background:#eef6f3;color:#4d9479;border-radius:4px;padding:5px 9px;font-size:12px}.form-content{padding:6px 26px 26px}.field{display:grid;grid-template-columns:minmax(180px,38%) minmax(0,1fr);gap:20px;align-items:start;padding:19px 0;border-bottom:1px solid #f0f2f6}.field:last-child{border-bottom:0}.field-label{font-weight:600;color:#4f5c70;line-height:35px}.required{color:#d16b62;margin-left:3px}.field-hint{font-size:12px;color:#9aa7b6;font-weight:400;line-height:1.6}.field-code{font-size:11px;color:#a9b2bf;margin-left:8px;font-weight:400}.field-control{max-width:540px}.control{width:100%;min-height:36px;padding:7px 11px;border:1px solid #dce4ed;border-radius:6px;background:#fff;color:#263950}.control::placeholder{color:#aab5c3}.control:disabled{background:#f6f8fa;color:#8090a5}.rowline{display:flex;gap:10px;align-items:center}.rowline>.control{flex:1;min-width:0}.rowline select.control{flex:0 0 130px}.choice{display:inline-flex;align-items:center;gap:6px;margin:7px 20px 6px 0;color:#44546a}.choice input{accent-color:#386fbe}.missing{display:flex;gap:9px;align-items:center;margin-top:8px;color:#8190a5;font-size:12px}.missing select{max-width:155px;min-height:31px}.issue{margin-top:7px;color:#c47733;font-size:12px}.issue.error{color:#bc5e54}.pending{display:flex;align-items:center;gap:8px;margin-top:8px;color:#aa6b3b;font-size:12px}.pending button{border:1px solid #e9c9a9;background:#fffaf3;color:#a26731;border-radius:4px;padding:5px 8px}.repeat{grid-column:1/-1}.repeat-head{display:flex;justify-content:space-between;align-items:center}.repeat-rows{margin-top:13px}.repeat-row{border:1px solid #e5ebf2;border-radius:8px;margin-bottom:12px;padding:14px 18px;background:#fbfcfe}.repeat-row-head{display:flex;justify-content:space-between;align-items:center;color:#4e6280;font-weight:600}.repeat-row .field{grid-template-columns:minmax(170px,34%) minmax(0,1fr);padding:11px 0}.actions{border-top:1px solid #edf0f5;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 26px;position:sticky;bottom:0;background:#fff;border-radius:0 0 10px 10px}.button{border:1px solid #d7e1ec;border-radius:6px;background:#fff;color:#446288;padding:8px 14px;min-height:36px}.button.primary{border-color:#3769bd;background:#3769bd;color:#fff}.button.small{min-height:30px;padding:5px 10px;font-size:12px}.button.danger{color:#b45757}.status{font-size:12px;color:#718096}.status.dirty{color:#b46b38}.status.error{color:#ba5653}.empty{padding:80px 20px;text-align:center;color:#92a0b1}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(145deg,#f2f6fd,#fff)}.login{width:min(420px,100%);padding:34px}.login h1{font-size:23px;margin:22px 0 7px}.login p{color:#8795a8;margin:0 0 25px}.login label{display:block;color:#5b6b80;margin:16px 0 7px}.login .button{width:100%;margin-top:23px}.banner{margin:0 0 16px;background:#fff7ed;color:#a45f25;border:1px solid #f2d6b4;padding:11px 14px;border-radius:7px}.banner.error{background:#fff4f3;color:#ad514e;border-color:#f1d2d0}.login .banner{margin-top:14px}.selectstudy{border:1px solid #dde4ed;border-radius:6px;padding:7px;background:#fff;color:#3c526e;max-width:220px}@media(max-width:850px){.topbar{padding:0 16px}.page{padding:14px}.headline{padding:16px;flex-wrap:wrap}.headline>.rowline{flex:1 1 100%;width:100%;max-width:100%;flex-wrap:wrap;min-width:0}.headline>.rowline .selectstudy{flex:1 1 auto;max-width:100%;min-width:0}.rowline{flex-wrap:wrap}.grid{grid-template-columns:1fr}.sidebar{min-height:0}.main{min-height:420px}.field{grid-template-columns:1fr;gap:2px}.field-label{line-height:1.6}.repeat-row .field{grid-template-columns:1fr}.tabs{gap:14px}.topright .chip{display:none}}

.admin-page{background:#fff;border:1px solid #e8edf4;border-radius:10px;padding:20px 24px}.admin-page h1{margin:0 0 16px;font-size:21px;color:#1f304a}.admin-tab h2{margin:0 0 4px;font-size:17px;color:#26415f}.admin-tab .field-hint{margin:0 0 12px}.admin-form{display:flex;flex-direction:column;gap:10px;padding:18px;margin:14px 0;max-width:760px;border:1px solid #e7ecf3;border-radius:10px;background:#fbfcfe}.admin-form h3{margin:0 0 6px;font-size:15px}.admin-form .control{max-width:520px}.domain-editor{margin:2px 0}.option-list{display:flex;flex-direction:column;gap:8px;margin:4px 0 10px}.option-row{max-width:680px}.option-row .option-code{flex:0 0 180px}.option-row .option-label{flex:1}.table{display:flex;flex-direction:column;margin-top:14px}.tr{display:flex;gap:12px;align-items:center;padding:10px 4px;border-bottom:1px solid #eef1f5}.th{flex:1;font-size:12px;color:#97a4b3;font-weight:600}.td{flex:1;font-size:13px;color:#44546a;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.td.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.td.rowline{flex:1.6}.model-picker{display:flex;flex-direction:column;gap:9px;margin:6px 0 12px}.model-picker .choice{gap:9px;margin:0}.model-picker .chip{margin-left:auto}

.rule-form{max-width:900px}.rule-editor{max-width:920px}.rule-field-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 4px;border-bottom:1px solid #eef1f5}.rule-field-row.rule-child-row{margin-left:22px;background:#f8fafc;border-left:3px solid #e7ecf3;padding-left:12px}.rule-field-info{min-width:0;flex:1}.rule-field-title{font-weight:600;color:#44546a}.rule-required{margin:2px 0}.rule-section{border:1px solid #e7ecf3;border-radius:8px;padding:11px 13px;background:#fff}.rule-section-head{margin-bottom:6px}.rule-section-title{font-weight:600;color:#4f5c70}.rule-node{display:flex;flex-direction:column;gap:8px;padding:8px 10px;border-left:3px solid #dbe4f0;background:#fbfcfe;border-radius:6px}.rule-node .rule-node{margin-top:6px;background:#fff}.rule-leaf{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.rule-leaf select.rule-field{flex:0 0 220px}.rule-leaf select.rule-fieldop{flex:0 0 150px}.rule-leaf .rule-value{flex:1;min-width:180px}.rule-values{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.rule-children{display:flex;flex-direction:column;gap:8px}.rule-child{display:flex;gap:8px;align-items:flex-start}.rule-child>.rule-node{flex:1}.rule-shape{max-width:220px}
.source-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:2px 0 16px}.source-card{border:1px solid #e7ecf3;border-radius:10px;background:#fff;padding:14px 16px}.source-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.source-card h3{margin:0 0 6px;font-size:14px;color:#26415f}.source-card-body{margin-top:12px;display:flex;flex-direction:column;gap:8px}.source-line{display:flex;justify-content:space-between;gap:12px;font-size:12px}.source-line .field-hint{margin:0}.source-line b{color:#44546a;font-weight:600;text-align:right}.tag{font-size:11px;border-radius:4px;padding:3px 8px;font-weight:600}.tag.muted{background:#f1f4f7;color:#7d8a9b}.tag.warn{background:#fff7ed;color:#a45f25}.tag.ok{background:#eef6f3;color:#4d9479}.source-chain{border:1px solid #e7ecf3;border-radius:10px;background:#fbfcfe;padding:16px 18px;margin:2px 0 16px}.source-chain h3{margin:0 0 4px;font-size:15px;color:#26415f}.source-chain-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px}.source-chain-step{flex:1;min-width:150px;background:#fff;border:1px solid #e3ebe7;border-radius:10px;padding:12px 13px}.source-chain-name{font-size:13px;font-weight:600;color:#2b3b33;margin:5px 0 2px}.source-chain-step .field-hint{margin:0}
/* 天坛肿瘤内科登录与首页视觉 */
.login-wrap{background:linear-gradient(90deg,rgba(3,24,38,.38),rgba(4,43,54,.12)),url('/assets/tiantan-oncology-login-bg.webp?v=20261115') center/cover no-repeat;position:relative;overflow:hidden}
.login-wrap::before{content:'天坛肿瘤内科';position:absolute;left:7vw;bottom:9vh;color:rgba(214,255,246,.14);font-size:clamp(44px,8vw,120px);font-weight:800;letter-spacing:.08em;pointer-events:none}
.login{width:min(430px,100%);padding:38px 40px;background:rgba(3,27,38,.58);border:1px solid rgba(213,255,247,.38);border-radius:18px;box-shadow:0 24px 70px rgba(0,18,28,.45);position:relative;z-index:1;color:#fff}
.login label{color:#f2fffc;font-weight:600}.login p{color:#d4ece8}.login .control{background:rgba(5,34,44,.6);border-color:rgba(220,255,248,.55);color:#fff}.login .control::placeholder{color:#c6dedb}.login .control:focus{background:rgba(5,34,44,.76);border-color:#9cf4df}.login .password-toggle{color:#e3f9f3}.login .password-toggle:hover{background:rgba(255,255,255,.16);color:#fff}
.login-brand{width:54px;height:54px;border-radius:16px;background:linear-gradient(145deg,#14a98e,#0b5d5a);box-shadow:0 10px 24px rgba(9,115,100,.3);position:relative}
.login-brand::before,.login-brand::after{content:'';position:absolute;border:2px solid rgba(255,255,255,.86);border-radius:50%}.login-brand::before{width:22px;height:22px;left:16px;top:7px}.login-brand::after{width:11px;height:11px;left:21px;bottom:7px}
.login h1{font-size:27px;margin:22px 0 7px;color:#fff;letter-spacing:.03em}.login .button{background:linear-gradient(135deg,#0d806c,#0c5b63);border:0;box-shadow:0 10px 20px rgba(10,111,94,.22)}
.password-control{position:relative}.password-control>.control{padding-right:44px}.password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:32px;height:30px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:#8b9aaa;padding:4px}.password-toggle:hover{background:#eef6f3;color:#0d806c}.password-toggle:focus-visible{outline:2px solid #5cbf85;outline-offset:1px}.password-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.password-toggle.is-visible{color:#0d806c}
.topbar{background:linear-gradient(100deg,#082d39,#0d4e4e);border-bottom-color:#17645f}.page{background:linear-gradient(180deg,#f1f8f6 0,#f7f9fc 220px)}
.flat-report{max-width:1050px;margin:18px auto 48px;padding:40px 54px;background:#fff;border:1px solid #e1e9e7;border-radius:12px;box-shadow:0 12px 35px rgba(12,55,58,.07);color:#263b43}.flat-report-head{border-bottom:1px solid #dce8e5;padding-bottom:22px}.flat-report-head h1{font-size:28px;margin:5px 0 8px}.flat-report-head p{color:#687b81;margin:0}.flat-toc{display:flex;flex-wrap:wrap;gap:8px 16px;padding:18px 0;border-bottom:1px solid #edf2f1}.flat-toc a{color:#127064;text-decoration:none;font-size:13px}.flat-toc a:hover{text-decoration:underline}.flat-form{padding:24px 0;border-bottom:1px solid #e4ecea;scroll-margin-top:20px}.flat-form h2{font-size:21px;color:#164b4b;margin:0 0 18px}.flat-section{margin:20px 0}.flat-section h3{font-size:16px;color:#315b5a;margin:0 0 10px}.flat-details{margin:0}.flat-entry{display:grid;grid-template-columns:minmax(140px,30%) 1fr;gap:18px;padding:10px 0;border-bottom:1px solid #f1f4f4;line-height:1.65}.flat-entry dt{color:#687b81}.flat-entry dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-weight:500}.flat-repeat-row{margin:14px 0;padding:14px 20px;border-left:3px solid #69b5a5;background:#f6faf9}.flat-repeat-row h4{margin:0 0 8px;color:#26766a}.flat-empty{color:#84949a;font-style:italic}@media(max-width:700px){.flat-report{padding:22px 18px}.flat-entry{grid-template-columns:1fr;gap:1px}}
.flat-summary{line-height:1.85;margin:8px 0 16px;white-space:pre-wrap;overflow-wrap:anywhere;color:#2c4749;font-size:15px}

.entry-grid{grid-template-columns:250px 310px minmax(0,1fr)}
.source-panel{min-height:620px;padding:14px;position:sticky;top:12px}
.source-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.source-panel-head .side-title{margin:0}
.source-upload{display:flex;gap:8px;margin-bottom:10px}
.source-file-list{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow:auto;margin-bottom:12px}
.source-file{display:flex;flex-direction:column;gap:3px;width:100%;border:1px solid transparent;background:transparent;text-align:left;padding:8px 10px;border-radius:6px;color:#536175}
.source-file:hover{background:#f4f7fc}
.source-file.active{background:#edf3ff;color:#3265b3;font-weight:600;border-color:#d4e2fb}
.source-preview{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.source-preview-img{max-width:100%;max-height:280px;object-fit:contain;border:1px solid #e7ecf3;border-radius:8px}
.source-preview iframe{width:100%;height:260px;border:1px solid #e7ecf3;border-radius:8px}
@media(max-width:850px){.entry-grid{grid-template-columns:1fr}.source-panel{position:static;min-height:0}}
.form-nav-group{font-size:11px;color:#97a4b3;margin:12px 7px 6px}.visit-create{display:flex;flex-direction:column;gap:7px;padding:9px 7px 12px;border-bottom:1px solid #eef1f5;margin-bottom:4px}.visit-nav-head{display:flex;align-items:center;gap:8px;margin:12px 7px 5px}.visit-nav-type{background:#eef6f3;color:#3f8068;border-radius:4px;padding:3px 7px;font-size:11px;font-weight:600}.visit-nav-meta{color:#98a5b4;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flat-toc-group{font-weight:700;color:#164b4b}.flat-group{padding:26px 0;border-bottom:1px solid #e4ecea}.flat-group h2{font-size:22px;color:#164b4b;margin:0 0 18px}.flat-group .flat-form{padding:16px 0;border-bottom:1px dashed #e4ecea}.flat-group .flat-form:last-child{border-bottom:0}.flat-group .flat-form h3{font-size:17px;color:#26766a;margin:0 0 14px}.flat-group .flat-section h4{font-size:14px;color:#315b5a;margin:0 0 8px}
.carry-panel{margin:14px 26px 0;padding:14px 16px}.carry-head{display:flex;justify-content:space-between;align-items:center}.carry-head h3{margin:0;font-size:15px;color:#315b5a}.carry-pending{margin-top:12px;padding:12px 14px;background:#fffaf3;border:1px solid #f2d6b4;border-radius:8px}.carry-source{margin-top:12px;padding:12px 14px;background:#f6faf9;border-radius:8px}.carry-source-head{margin:0 0 8px;font-weight:600;color:#26766a}.carry-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0;border-bottom:1px solid #eef2f1}.carry-row:last-child{border-bottom:0}.carry-field{color:#44546a;overflow-wrap:anywhere}
