*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f6f8fb;color:#222}.topbar{height:60px;background:#fff;border-bottom:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:3}.brand{font-weight:700;font-size:20px}.topbar a{color:#2563eb}.layout{display:flex;min-height:calc(100vh - 60px)}.sidebar{width:220px;background:#fff;border-right:1px solid #ddd;padding:16px}.sidebar a{display:block;padding:11px 12px;color:#333;text-decoration:none;border-radius:7px;margin-bottom:5px}.sidebar a:hover,.sidebar a.active{background:#eaf1ff;color:#1456d8}.content{flex:1;padding:24px;max-width:1300px}.content h1{margin-top:0}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.card,.panel{background:#fff;border:1px solid #dfe3ea;border-radius:10px;padding:18px;margin-bottom:18px}.card .num{font-size:32px;font-weight:700}.quick,.actions{display:flex;gap:10px;margin:18px 0}.btn{display:inline-block;border:1px solid #1d4ed8;background:#fff;color:#1d4ed8;padding:10px 16px;border-radius:6px;text-decoration:none;cursor:pointer;font-weight:600}.btn.primary{background:#1d4ed8;color:#fff}.btn.small{padding:6px 10px}.form-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.form-grid .full{grid-column:1/-1}label{display:block;font-size:14px;margin-bottom:6px;font-weight:600}input,select{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}.test-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.dept-title{grid-column:1/-1;font-weight:700;background:#eef2f7;padding:8px}.test-item{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid #e2e8f0;border-radius:6px}.test-item input{width:auto}.test-item span{flex:1}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:10px;border-bottom:1px solid #ddd;text-align:left}th{background:#eef2f7}.section-row td{font-weight:700;background:#f8fafc}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.flag{color:#c00;margin-left:6px}.alert,.success{padding:12px;border-radius:6px;margin-bottom:15px}.alert{background:#fee2e2;color:#991b1b}.success{background:#dcfce7;color:#166534}.inline{display:flex;gap:10px}.inline input{max-width:400px}.login-body{display:grid;place-items:center;min-height:100vh;background:#eef3fb}.login-card{width:min(380px,92vw);background:#fff;border:1px solid #dfe3ea;border-radius:12px;padding:28px}.login-card input{margin-bottom:14px}.hint{margin-top:15px;font-size:12px;color:#666}@media(max-width:900px){.sidebar{width:170px}.cards,.form-grid,.summary{grid-template-columns:1fr 1fr}.test-grid{grid-template-columns:1fr}}@media(max-width:640px){.layout{display:block}.sidebar{width:100%;display:flex;overflow:auto;gap:4px}.sidebar a{white-space:nowrap}.content{padding:14px}.cards,.form-grid,.summary{grid-template-columns:1fr}}.search-box{margin-bottom:14px;max-width:520px}.lookup-list{position:absolute;background:#fff;border:1px solid #cbd5e1;border-radius:7px;z-index:20;max-height:260px;overflow:auto;min-width:340px;box-shadow:0 10px 25px rgba(0,0,0,.12)}.lookup-list:empty{display:none}.lookup-list button{display:block;width:100%;text-align:left;padding:10px;border:0;border-bottom:1px solid #eee;background:#fff;cursor:pointer}.lookup-list button:hover{background:#eef4ff}.form-grid>div{position:relative}

.result-toolbar{position:sticky;top:60px;z-index:2;background:#fff;border:1px solid #dfe3ea;border-radius:10px;padding:10px 14px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 3px 10px rgba(0,0,0,.05)}
.status-pill{display:inline-block;background:#dcfce7;color:#166534;padding:4px 9px;border-radius:999px;font-size:12px;margin-left:8px}
.sticky-save{position:sticky;bottom:0;background:rgba(255,255,255,.96);border-top:1px solid #ddd;padding:12px;display:flex;gap:10px;justify-content:flex-start;z-index:4}
.content .panel h2{font-size:17px;border-bottom:1px solid #e5e7eb;padding-bottom:9px}
.content table input,.content table select{max-width:210px;padding:7px}

.top-centre{font-size:12px;font-weight:600;background:#eaf1ff;color:#1d4ed8;padding:5px 9px;border-radius:999px;margin-left:8px}
.centre-filter{display:flex;align-items:end;gap:12px;max-width:420px}
.centre-filter label{min-width:120px}
.centre-filter select{min-width:210px}
.test-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:14px}
.selected-total{min-width:150px;text-align:right;background:#eef4ff;border-radius:8px;padding:10px 14px}
.selected-total small,.selected-total b{display:block}.selected-total b{font-size:22px;color:#1d4ed8}
@media(max-width:640px){.test-head{display:block}.selected-total{text-align:left;margin-top:10px}.top-centre{display:none}}

.btn.danger{border-color:#b91c1c;color:#b91c1c}
.status-pill.locked{background:#dbeafe;color:#1e40af}
.result-test-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.auto-tag{background:#e0f2fe;color:#075985;padding:2px 5px;border-radius:4px;font-size:10px}
.input-abnormal td{font-weight:700}
.live-flag{display:inline-block;margin-left:6px;color:#b91c1c;min-width:18px}
.lookup-list{position:absolute;background:white;z-index:12;max-width:420px;border:1px solid #cbd5e1;border-radius:6px;box-shadow:0 8px 18px rgba(0,0,0,.12)}
.lookup-list button{display:block;width:100%;border:0;border-bottom:1px solid #e5e7eb;background:#fff;text-align:left;padding:9px;cursor:pointer}
.lookup-list button:hover{background:#eff6ff}
.result-test input[readonly]{background:#eef2f7;font-weight:700}

.print-settings-form{max-width:980px}.settings-section h2{margin-top:0}.checkline{display:flex;align-items:center;gap:9px;padding:7px 0;font-weight:500}.checkline input{width:auto}.settings-section textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:6px;resize:vertical}.disabled-option{opacity:.65}.sticky-settings-save{position:sticky;bottom:12px;z-index:5;box-shadow:0 5px 18px rgba(0,0,0,.18);margin-bottom:30px}
