.history-page{--history-ink:#203e41;--history-muted:#6d8183;--history-teal:#176c63;--history-line:#dce7e5;display:none;width:100%;max-width:none;min-height:100vh;margin:0;padding:0;background:#f3f6f5;color:var(--history-ink);font:14px/1.65 "Microsoft YaHei",system-ui,sans-serif;text-align:left}
.history-page.on{display:block}
body:has(#patBg.on)>.top,body:has(#patBg.on)>.wrap,body:has(#patBg.on)>footer{display:none}
.history-page *{box-sizing:border-box}
.history-page #patBox{width:100%;max-width:none;margin:0;padding:0;background:transparent;border-radius:0;box-shadow:none}
.history-page button,.history-page input{font:inherit}
.history-page button,.history-page summary{cursor:pointer}
.history-page button:focus-visible,.history-page input:focus-visible,.history-page summary:focus-visible{outline:3px solid #79b8b1;outline-offset:3px}
.history-page .history-page-top{min-height:72px;padding:14px max(28px,calc((100vw - 1164px)/2));display:flex;justify-content:space-between;align-items:center;gap:16px;background:#214c53;color:#fff}
.history-page .history-page-top strong{font-size:19px;letter-spacing:1px}
.history-page .history-page-top button{border:1px solid #7d9e9c;border-radius:7px;background:transparent;color:#e3efeb;padding:7px 13px;white-space:nowrap;font-size:12px}
.history-page .history-page-heading{max-width:1220px;margin:auto;padding:25px 28px 20px;display:flex;justify-content:space-between;align-items:center;gap:20px}
.history-page .history-page-heading h1{margin:5px 0 7px;font-size:30px;line-height:1.5;letter-spacing:.5px;color:var(--history-ink)}
.history-page .history-page-heading p{margin:0;color:var(--history-muted);font-size:13px}
.history-page .history-page-heading .eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#4c7b72}
.history-page .history-member-name{display:block;background:#fff;padding:13px 20px;border:1px solid var(--history-line);border-radius:10px;font-weight:700;font-size:16px;overflow-wrap:anywhere;max-width:40%}
#patBg .doctor-history-refresh{max-width:1164px;margin:0 auto 20px;padding:0;border-radius:7px;background:transparent;color:#5c716a;font-size:12px;overflow-wrap:anywhere}
.history-page .doctor-history-refresh button{border:1px solid #b2cbc3;border-radius:6px;background:#fff;color:var(--history-teal);padding:6px 11px}
.history-page .doctor-history-refresh p{margin:6px 0 0}
#patBg .doctor-history-refresh-warning,#patBg .doctor-history-refresh-status{max-width:1164px;margin:0 auto 20px;padding:12px 16px;border-radius:7px;font-size:13px}
#patBg .doctor-history-refresh-warning{background:#fff5df;border:1px solid #e5cf9b;color:#7c602c}
#patBg .doctor-history-refresh-status{background:#e9f0ed;color:#5c716a}
.history-page .history-overview{max-width:1220px;margin:auto;padding:0 28px 36px}
.history-page .section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.history-page .section-title h2{margin:0;font-size:18px;color:var(--history-ink)}
.history-page .section-title>span,.history-page .section-title p{font-size:12px;color:var(--history-muted);margin:5px 0 0}
.history-page .alert-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.history-page .alert-tile{border:1px solid var(--history-line);border-radius:10px;background:#fff;padding:13px 16px 15px;min-width:0;border-top:3px solid #c69f61}
.history-page .alert-tile:nth-child(2){border-top-color:#76a69a}
.history-page .alert-tile:nth-child(3){border-top-color:#879bae}
.history-page .alert-tile:nth-child(4){border-top-color:#a199b1}
.history-page .alert-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:11px;color:#71847d}
.history-page .alert-icon{font-size:14px;color:#788e87}
.history-page .alert-tile strong{font-size:16px;display:block}
.history-page .alert-tile small{display:block;font-size:11px;color:var(--history-muted);margin-top:6px}
.history-page .history-section{margin-top:30px}
.history-page .search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--history-line);padding:6px 13px;border-radius:8px;width:282px;flex-shrink:0}
.history-page .search-box>span{font-size:23px;line-height:1;color:#74938c}
.history-page .search-box input{background:transparent;border:0;width:100%;min-width:0;padding:5px 0;font-size:12px;color:var(--history-ink);border-radius:0}
.history-page .toolbar{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d7e3e0;margin:19px 0 0;gap:10px}
.history-page .filters{display:flex;gap:24px}
.history-page .filters button{border:0;border-radius:0;border-bottom:3px solid transparent;padding:9px 3px 11px;background:none;color:#71847d;font-size:13px;white-space:nowrap}
.history-page .filters button.active{border-bottom-color:var(--history-teal);color:var(--history-teal);font-weight:700}
.history-page .sort-note{font-size:11px;color:#81908b}
.history-page .result-status{font-size:11px;color:#788b83;min-height:36px;padding:10px 0 8px}
.history-page .visit-card{background:#fff;border:1px solid var(--history-line);border-radius:12px;margin-bottom:16px;overflow:hidden}
.history-page .visit-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;padding:20px 23px 17px;background:transparent;color:var(--history-ink)}
.history-page .visit-head-main{display:flex;gap:13px;align-items:flex-start;min-width:0}
.history-page .visit-type{font-size:12px;font-weight:600;padding:4px 10px;border-radius:5px;background:#e3f1ec;color:#296f59;white-space:nowrap;margin-top:2px}
.history-page .visit-type.outpatient{background:#eaf0f6;color:#536f8b}
.history-page .visit-card h3{font-size:17px;line-height:1.5;margin:0 0 5px}
.history-page .visit-dates{font-size:12px;color:#708078;display:flex;flex-wrap:wrap;gap:6px 14px}
.history-page .visit-body{padding:0 23px 19px}
.history-page .facts-row{display:grid;grid-template-columns:1.5fr 1fr;gap:30px;padding-top:16px;border-top:1px solid #edf1ef}
.history-page .fact-label{font-size:11px;color:#7b8e87;margin:0 0 7px}
.history-page .diagnoses{display:flex;flex-direction:column;gap:7px;list-style:none;padding:0;margin:0}
.history-page .diagnosis{background:#f3f6f4;border-radius:5px;padding:7px 10px;color:#37534a;font-size:13px;min-width:0;overflow-wrap:anywhere}
.history-page .diagnosis strong{font-weight:500}
.history-page .diagnosis small{display:block;font-size:11px;color:#7b8e87;margin-top:5px}
.history-page .doctors{display:flex;flex-wrap:wrap;gap:12px 22px;font-size:13px;overflow-wrap:anywhere}
.history-page .doctors small{color:#7b8e87;font-size:11px;display:block;margin-bottom:4px}
.history-page .muted{color:#86958e}
.history-page .history-missing{margin:0}
.history-page .surgery-section{margin-top:21px}
.history-page .surgery-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px}
.history-page .surgery-heading h4{font-size:13px;margin:0}
.history-page .surgery-heading>span{font-size:11px;color:#83928a}
.history-page .operation{padding:14px 16px;border:1px solid #e0e8e4;border-radius:8px;margin-top:9px;background:#fbfdfb}
.history-page .op-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:5px}
.history-page .op-name{font-size:14px;font-weight:600;overflow-wrap:anywhere}
.history-page .record-state{font-size:10px;color:#83672e;background:#f4eedf;padding:3px 8px;border-radius:4px;white-space:nowrap}
.history-page .op-meta{font-size:11px;color:#7b8c83;margin:0 0 11px}
.history-page .operation-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;font-size:12px;margin:0}
.history-page .operation-dates dt{font-size:10px;color:#849289;margin-bottom:3px}
.history-page .operation-dates dd{margin:0;overflow-wrap:anywhere;color:#4d6458}
.history-page .source-detail{margin-top:13px;font-size:11px;color:#6b8176}
.history-page .source-detail summary{width:max-content;max-width:100%;color:#377761}
.history-page .source-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;padding:10px 12px;margin:8px 0 0;background:#f0f5f1;border-radius:4px;overflow-wrap:anywhere}
.history-page .source-fields dt{color:#7b8e87}
.history-page .source-fields dd{margin:3px 0 0}
.history-page .cancelled-note{font-size:11px;color:#7c8580;margin:9px 0 0}
.history-page .visit-source{border-top:1px solid #edf1ef;padding:10px 23px;margin:0;background:#fdfefd}
.history-page .no-surgery{padding:12px 0 0;margin:0;font-size:12px;color:#839389}
.history-page .bottom-note{font-size:11px;color:#85938b;margin:17px 0 0}
.history-page .empty-state{text-align:center;background:#fff;border:1px dashed #cbded3;padding:38px 20px;border-radius:10px;color:#7a8d81}
.history-page .empty-state strong{display:block;font-size:17px;color:#496854;margin-bottom:6px}
.history-page .empty-state p{margin:0}
.history-page .empty-state button{border:1px solid #b8d0c2;border-radius:6px;color:#286746;background:#f5faf7;margin-top:16px;padding:7px 18px}
.history-page .history-error{max-width:1164px;margin:16px auto;border:1px solid #e6c5af;background:#fff8f2;color:#935b36;border-radius:8px;padding:22px}
#patBg .doctor-history-refresh,#patBg .doctor-history-refresh-warning,#patBg .doctor-history-refresh-status{width:calc(100% - 56px)}
@media(max-width:550px){#patBg .doctor-history-refresh,#patBg .doctor-history-refresh-warning,#patBg .doctor-history-refresh-status{width:calc(100% - 32px)}}
@media(max-width:850px){.history-page .history-page-heading{align-items:flex-start}.history-page .history-member-name{padding:10px 12px}.history-page .alert-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.history-page .facts-row{grid-template-columns:1fr;gap:15px}.history-page .visit-head,.history-page .visit-body{padding-left:18px;padding-right:18px}.history-page .doctor-history-refresh{margin-left:28px;margin-right:28px}}
@media(max-width:550px){.history-page .history-overview{padding:0 16px 28px}.history-page .history-page-top{padding:12px 16px;min-height:62px}.history-page .history-page-top strong{font-size:16px}.history-page .history-page-top button{padding:6px 8px;font-size:11px}.history-page .history-page-heading{display:block;padding:20px 16px}.history-page .history-page-heading h1{font-size:25px}.history-page .history-member-name{margin-top:16px;width:max-content;max-width:100%}.history-page .doctor-history-refresh{margin-left:16px;margin-right:16px}.history-page .section-title{align-items:flex-start;flex-wrap:wrap}.history-page .search-box{width:100%}.history-page .alert-tile{padding:12px}.history-page .alert-tile strong{font-size:14px}.history-page .filters{gap:20px}.history-page .sort-note{display:none}.history-page .visit-head{gap:8px}.history-page .visit-head-main{gap:8px}.history-page .visit-card h3{font-size:15px}.history-page .op-heading{align-items:flex-start}.history-page .op-name{font-size:13px}.history-page .operation{padding:12px}.history-page .visit-type{padding:3px 7px}.history-page .operation-dates{gap:12px}.history-page .source-fields{grid-template-columns:1fr}.history-page .surgery-heading>span{font-size:10px}.history-page .history-error{margin:16px}}
