@font-face{font-family:system;src:local("Segoe UI")}*{box-sizing:border-box}html{font-size:16px;color-scheme:light}body{margin:0;background:#f4f7fa;color:#173543;font-family:system,Arial,sans-serif;line-height:1.5}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #b46908;outline-offset:3px}button{touch-action:manipulation}h1,h2,h3,p{margin-top:0}h1{font-size:2rem;line-height:1.2;letter-spacing:-.035em}h2{font-size:1.3rem}h3{font-size:1.1rem}.topbar{background:#fff;border-bottom:1px solid #e1e8ee;min-height:84px;padding:12px max(24px,calc((100% - 1180px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{border:0;background:none;display:flex;align-items:center;font-size:1.65rem;font-weight:750;letter-spacing:-.055em;color:#173543;padding:0}.brand>span>span{color:#287f91}.brand img{width:56px;height:56px;object-fit:contain}.header-actions{display:flex;gap:16px;align-items:center}.local-badge{font-size:.8rem;color:#466673;background:#edf5f5;padding:6px 12px;border-radius:99px}.quiet,.secondary{border:1px solid #cbd8df;border-radius:9px;background:#fff;color:#245e71;padding:10px 16px;font-weight:600}.primary{background:#287f91;color:white;border:1px solid #287f91;padding:11px 22px;border-radius:9px;font-weight:650}.page-heading{margin:32px 0 26px}.page-heading h1{font-size:clamp(2rem,4vw,3.1rem);margin:12px 0 14px;font-weight:680;line-height:1.18}.page-heading h1 span{color:#287f91}.page-heading p,.muted{color:#5c7380}.eyebrow{font-size:.75rem;letter-spacing:.15em;font-weight:700;color:#607986}main{max-width:1180px;margin:auto;padding:16px 24px 32px;min-height:calc(100dvh - 155px)}.home-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.module{position:relative;background:#fff;border:1px solid #dce5eb;border-radius:16px;text-align:left;padding:25px 22px;min-height:238px;display:flex;flex-direction:column;color:#173543;box-shadow:0 5px 12px #143b4c03;transition:transform .16s,border-color .16s}.module:hover{transform:translateY(-3px);border-color:#287f91}.module-icon{font-size:2rem;background:#e6f3f5;color:#287f91;border-radius:12px;width:56px;height:56px;display:grid;place-items:center;margin-bottom:22px}.module:nth-child(2) .module-icon{background:#eaf0fb;color:#486cab}.module:nth-child(3) .module-icon{background:#eef4e9;color:#4b773a}.module:nth-child(4) .module-icon{background:#f5effb;color:#7b579b}.module strong{font-size:1.2rem;margin-bottom:8px}.module>span:not(.module-icon){font-size:.9rem;color:#5c7380}.module small{font-size:.75rem;color:#527781;margin-top:15px}.empty-summary{margin-top:26px;padding:20px 24px;border-radius:12px;border:1px dashed #c5d7df;color:#597581;display:flex;align-items:center;gap:16px}.database-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:26px;background:#eaf1f4;border-radius:14px;padding:22px}.database-stats strong{display:block;font-size:1.6rem}.database-stats span{font-size:.85rem;color:#526d79}footer{text-align:center;color:#607984;font-size:.8rem;padding:20px 16px 28px}#bottom-nav{display:none}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0}.section-title h1{margin:0}.breadcrumb{color:#527481;background:none;border:0;padding:0 0 12px;font-size:.9rem}.panel{background:#fff;border:1px solid #dce5eb;border-radius:14px;padding:24px;margin-bottom:22px}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.span-2{grid-column:span 2}.span-3{grid-column:span 3}.span-4{grid-column:span 4}label{display:block;font-size:.875rem;font-weight:600;color:#385361}input,select{width:100%;min-height:46px;border:1px solid #cad7df;border-radius:8px;background:#fff;padding:10px 12px;color:#173543;margin-top:6px;min-width:0}input:focus,select:focus{outline:2px solid #63a8b6;outline-offset:1px}.actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:20px}.extra-filters{padding-top:20px;margin-top:20px;border-top:1px solid #e4ebf0}.table-wrap{overflow:auto;background:white;border:1px solid #dce5eb;border-radius:12px;max-height:64dvh;overscroll-behavior:contain}table{border-collapse:collapse;width:100%;font-size:.875rem;text-align:left}th{position:sticky;top:0;z-index:1;background:#edf3f6;color:#4c6775;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;padding:14px 16px;white-space:nowrap}td{border-top:1px solid #edf1f4;padding:14px 16px;min-width:80px;vertical-align:top}td.patient{min-width:230px}tr.selectable{cursor:pointer}tr.selectable:hover,tr.selectable:focus{background:#eef8fa;outline:0}tr.selectable:focus-visible{outline:2px solid #287f91;outline-offset:-2px}.result-heading{display:flex;gap:20px;align-items:center;margin:22px 0 12px}.result-heading strong{font-size:1.5rem}.result-heading span{font-size:.875rem;color:#5d7582}.empty{padding:50px 24px;text-align:center;color:#5d7582}.load-more{display:block;margin:16px auto;border:0;background:#e9f2f5;color:#245e71;padding:10px 22px;border-radius:8px}.blocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.block{background:#fff;border:1px solid #dce5eb;border-radius:12px;padding:22px;text-align:left;display:flex;align-items:center;justify-content:space-between;color:#173543;gap:20px}.block strong{display:block;font-size:1.08rem}.block small{color:#607a87}.block .count{font-size:2rem;color:#287f91;font-weight:650}.block .warning{color:#a66614}.note{font-size:.875rem;padding:16px 20px;background:#edf4f8;border-left:3px solid #287f91;border-radius:4px;margin:16px 0;color:#3e6071}.note a{color:#246780}.alert{background:#fff6e7;border-left-color:#c88c31}.chip{display:inline-block;background:#edf3f6;padding:3px 8px;border-radius:5px;font-size:.8rem;color:#385b6c}.modal-top{position:sticky;top:0;background:#fff;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #e1e9ee;gap:18px}.modal-top h2{margin:0}.icon-button{border:0;background:#edf3f6;width:40px;height:40px;border-radius:50%;flex-shrink:0;color:#456571}dialog{border:0;border-radius:18px;padding:0;width:min(1080px,calc(100vw - 32px));max-height:90dvh;color:#173543;box-shadow:0 24px 100px #0b34403b}dialog::backdrop{background:#18374380;backdrop-filter:blur(3px)}#modal-body{padding:24px}.patient-header{background:#eaf4f6;padding:20px;border-radius:12px;margin-bottom:24px}.patient-header h3{font-size:1.45rem;margin-bottom:8px}.folio{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}.folio span{background:#fff;border:1px solid #c9e0e6;padding:7px 14px;border-radius:8px;font-size:1rem}.details-section{margin:22px 0}.details-section h3{border-bottom:1px solid #dce6ec;padding-bottom:8px;color:#287f91}.details-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.details-grid dt{font-size:.8rem;color:#607885}.details-grid dd{margin:3px 0 0;overflow-wrap:anywhere}.progress-box{padding:24px 0}progress{display:block;width:100%;height:20px;accent-color:#287f91;margin:16px 0}.progress-label{font-size:.875rem;color:#5c7380}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);padding:12px 22px;background:#173f50;color:white;border-radius:10px;box-shadow:0 5px 30px #18374435;z-index:20;max-width:90vw;display:none}.bar{min-width:120px;height:7px;background:#e9eef2;border-radius:9px;overflow:hidden;margin-top:5px}.bar i{height:100%;display:block;background:#27825e}.bar.bad i{background:#c55153}.trend{display:grid;grid-template-columns:repeat(12,1fr);gap:8px;min-width:600px;align-items:end;height:190px;padding:15px 10px 0}.trend-month{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;font-size:.75rem}.trend-bars{height:130px;display:flex;align-items:flex-end;gap:3px}.trend-bars i{width:13px;background:#287f91;min-height:1px}.trend-bars i.previous{background:#b7cbd4}.trend-label{font-size:.7rem;color:#5c7380}.small{font-size:.8rem}svg{vertical-align:middle}.module-icon svg{width:28px;height:28px}.summary-strip{display:flex;flex-wrap:wrap;gap:20px;margin:16px 0}.summary-strip strong{font-size:1.6rem;color:#287f91}.summary-strip span{font-size:.85rem;margin-left:6px}.setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}[hidden]{display:none!important}@media(min-width:1100px){.home-grid{margin-top:32px}.page-heading{margin-top:48px;margin-bottom:34px}}@media(max-width:900px){.home-grid{grid-template-columns:repeat(2,1fr)}.module{min-height:212px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.span-3,.span-4{grid-column:span 2}.details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.topbar{min-height:70px;padding:8px 16px}.brand{font-size:1.5rem}.brand img{width:45px;height:45px}.local-badge{display:none}.quiet{padding:8px 12px;font-size:.85rem}main{padding:10px 16px 24px;min-height:calc(100dvh - 195px)}.page-heading{margin:28px 0 24px}.page-heading h1{font-size:2.1rem}.page-heading p{font-size:.9rem}.home-grid{gap:12px}.module{padding:18px 16px;min-height:212px;border-radius:13px}.module-icon{width:46px;height:46px;margin-bottom:16px}.module strong{font-size:1rem}.module>span:not(.module-icon){font-size:.8rem}.module small{font-size:.75rem}.panel{padding:18px 16px}.form-grid{gap:12px}.blocks{grid-template-columns:1fr}.section-title h1{font-size:1.65rem}.section-title{margin-top:14px}.database-stats{gap:10px;padding:18px 16px}.database-stats strong{font-size:1.3rem}.database-stats span{font-size:.75rem}.result-heading{gap:16px}.result-heading strong{font-size:1.3rem}.actions{justify-content:space-between}.actions button{flex:1}.details-grid{grid-template-columns:1fr 1fr}.modal-top{padding:16px}.modal-top h2{font-size:1.05rem}#modal-body{padding:16px}dialog{width:calc(100vw - 16px);max-height:94dvh}.patient-header h3{font-size:1.2rem}.table-wrap{max-height:60dvh}footer{padding-bottom:100px;font-size:.75rem}#bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #dce5eb;display:flex;justify-content:space-around;padding:8px 4px calc(8px + env(safe-area-inset-bottom));z-index:5}#bottom-nav button{background:none;border:0;color:#6a818d;font-size:.7rem;padding:4px 8px;display:flex;flex-direction:column;gap:4px;align-items:center}#bottom-nav button.active{color:#287f91;font-weight:700}#bottom-nav svg{width:22px;height:22px}#toast{bottom:95px}.setting-grid{grid-template-columns:1fr}.empty-summary{font-size:.85rem;padding:16px}.note{font-size:.8rem;padding:14px}.eyebrow{font-size:.7rem}}
.cleanup-row{display:flex;justify-content:center;margin:22px 0}.danger-outline{border:1px solid #d7b5b5;background:#fff;color:#a74646;padding:10px 18px;border-radius:8px;font-size:.875rem}.danger{background:#a74646;border:1px solid #a74646;color:#fff;padding:11px 18px;border-radius:8px;font-weight:650}.home-grid{margin-top:30px}@media(max-width:600px){.home-grid{margin-top:16px}}

@media(max-width:900px){#query-form>.form-grid{grid-template-columns:minmax(0,1fr) 90px}#query-form>.form-grid>label.span-3{grid-column:span 1}#query-form>.extra-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Table text stays on one line; horizontal scrolling preserves the full value. */
td{white-space:nowrap;overflow-wrap:normal;word-break:normal}
td.report-observations{white-space:normal;overflow-wrap:anywhere;min-width:280px;max-width:460px}
.database-periods{grid-column:1/-1;border-top:1px solid #cbdbe3;padding-top:14px}.database-periods p{margin:6px 0 0;font-size:.9rem}.database-periods b{color:#245e71}.quality-filters{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}.quality-filters button{font-size:.875rem;padding:9px 12px}

.catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.catalog-symbol{display:inline-flex;align-items:center;justify-content:center;min-width:72px;height:48px;padding:8px 12px;margin-bottom:20px;border-radius:10px;background:#e6f3f5;color:#246e80;font-weight:700;font-size:1.1rem}.catalog-grid .module:nth-child(2) .catalog-symbol{background:#eaf0fb;color:#486cab}.catalog-grid .module:nth-child(3) .catalog-symbol{background:#f5effb;color:#7b579b}.catalog-source{font-size:.875rem;color:#5c7380;margin-bottom:24px}.catalog-form{display:grid;grid-template-columns:1fr;gap:16px}.catalog-form .actions{margin-top:0}.catalog-description p{white-space:pre-wrap;overflow-wrap:anywhere}.module:nth-child(5) .module-icon{background:#e7f3ed;color:#327357}@media(min-width:1100px){.home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.catalog-grid{grid-template-columns:1fr;gap:12px}.catalog-grid .module{min-height:170px}#bottom-nav button{padding:4px 5px;font-size:.68rem}}

.patients-update{display:flex;flex-direction:column;gap:6px;text-align:left;padding:16px 20px;margin-bottom:20px;max-width:100%}.patients-update strong{font-size:1rem}.patients-update small{font-size:.875rem;font-weight:400}.module[data-nav="patients"] .module-icon{background:#e7f3ed;color:#327357}@media(max-width:600px){.patients-update{width:100%}#bottom-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}#bottom-nav button{min-width:0;padding:4px 2px;font-size:.68rem}}
body[data-access="blocked"]>#app,body[data-access="blocked"]>#bottom-nav,body[data-access="blocked"]>#modal,body[data-access="blocked"]>#toast{display:none!important}
.access-gate{min-height:75vh;display:grid;place-items:center;padding:24px 16px}.access-panel{width:min(100%,440px);text-align:center}.access-panel form{display:grid;gap:18px;text-align:left}.access-panel input{width:100%;box-sizing:border-box}.access-panel h1{margin:12px 0}.access-panel .primary{width:100%}
.install-help-body{padding:20px 24px}.install-help-actions{padding:0 24px 24px}.cloud-status{max-width:1180px;margin:8px auto;padding:0 20px;font-size:.85rem;color:#376d79}.cloud-status:empty{display:none}body[data-access="blocked"]>#cloud-status{display:none}

.update-badge{display:inline-block;padding:5px 9px;border-radius:8px;background:#fff0ba;color:#6b4d00;font-weight:700;font-size:12px}.update-badge[hidden]{display:none}.progress-box progress{width:100%;height:24px}
