/* Shared flat card design for every management screen. */
:root{--blue:#2864e9;--text:#24344c;--muted:#61718a;--line:#e5ebf3;--bg:#f7f9fc;--green:#087f75;--orange:#ab650d;--red:#cc3548}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
button[aria-busy=true],form[aria-busy=true] button[type=submit]{cursor:progress}
.device-picker{grid-template-columns:minmax(0,1fr)}.device-picker>*{min-width:0}
.device-picker{display:grid;gap:12px;min-width:0}.option-search,.option-pages{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.option-search input{flex:1;min-width:100px;width:0}.option-pages>span{flex:1;min-width:100px;font-size:12px;color:var(--muted)}.selected-devices{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.selected-devices>strong{font-size:12px;font-weight:500;color:var(--muted)}.selected-device{display:inline-flex;align-items:center;gap:6px;max-width:100%;overflow-wrap:anywhere;font-size:12px;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:5px 8px}.selected-device button{background:none;border:0;color:var(--muted);min-width:24px;min-height:24px}.option-error:empty,.option-warning:empty{display:none}.option-warning{font-size:12px;color:var(--orange);margin:0}.option-tools summary{font-size:12px;color:var(--blue);cursor:pointer}.option-tools[open]{display:grid;gap:8px}.department-picker .option-pages{margin-top:8px}.department-picker .option-pages>span{flex-basis:100%}.department-picker .option-pages .btn{font-size:11px;min-height:30px;padding:5px 8px}.filters>.department-picker{min-width:180px;max-width:240px;align-self:flex-start;gap:7px}.department-tree .pagination,.department-tree .pages{flex-wrap:wrap}.device-picker .table-wrap{max-width:100%}
.report-picker{display:grid;gap:12px;margin-bottom:18px;min-width:0}.picker-search{display:flex;gap:10px;align-items:flex-end}.picker-search label{display:grid;gap:6px;flex:1;min-width:0;font-size:12px;color:var(--muted)}.picker-search input{width:100%;min-width:0}.picker-pages{display:flex;gap:8px;justify-content:flex-end}.picker-status{font-size:12px;color:var(--muted)}.report-picker .error-inline:empty{display:none}.report-picker select{max-width:100%;width:100%;text-overflow:ellipsis}.picker-error{overflow-wrap:anywhere}.picker-search>.btn{flex-shrink:0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
body{background:var(--bg);-webkit-font-smoothing:antialiased}
.topbar{padding:0 26px;gap:14px;background:#fff;border-bottom-color:var(--line)}
.topbar>button{min-width:36px;min-height:36px;border-radius:9px;color:#61718a;transition:background-color 150ms}
.topbar>button:hover{background:#f2f5fb}.topbar .icon{width:19px;height:19px;stroke-width:1.7}
.topbar .user{border:0;background:#f7f9fc;padding:8px 12px;font-size:13px;gap:9px}
.notification b{right:0;top:-2px;font-size:10px;min-width:16px;height:16px;border:2px solid white}
.breadcrumb{background:transparent;padding:0 28px;gap:10px;font-size:12px;color:#61718a}
.breadcrumb a{color:#74839b}.breadcrumb .icon{width:15px;height:15px}
.content{padding:16px 26px 36px;max-width:1800px}
.page-heading{margin:0 0 24px;align-items:center;gap:16px}
.heading-title{gap:12px}.page-heading h1{font-size:25px;letter-spacing:-.5px;line-height:1.4;font-weight:650;margin-bottom:6px;color:#1e2e46}
.page-heading p{font-size:13px;line-height:1.7;color:var(--muted);max-width:850px}
.heading-actions{gap:8px}.heading-title .badge{margin-bottom:6px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:18px;box-shadow:none}
.card-head{margin-bottom:18px;gap:10px}.card-head h2,.card-head h3{font-size:15px;font-weight:600;letter-spacing:0}
.card-head>a{font-size:12px}.card-head .badge{margin-left:0}
.grid{gap:18px}.dashboard-grid>.card{margin-bottom:0}.dashboard-grid{margin-bottom:18px}
.badge{font-size:11px;line-height:1.6;padding:2px 8px;border-radius:5px;background:#edf3ff;color:#285cc7;font-weight:500}
.badge.green{background:#e9f6f1;color:#08786a}.badge.orange{background:#fff4e5;color:#9b5a08}.badge.red{background:#fff0f2;color:#ba3044}.badge.gray{background:#f0f3f7;color:#5e6d83}.badge.demo{background:#f3f6fb;border:1px solid #e6ebf3;color:#61718a;font-size:10px}
.stats{gap:16px;margin-bottom:20px}.stats .stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;min-height:108px;gap:14px}
.stat .stat-icon{width:42px;height:42px;border-radius:12px;background:#edf3ff;color:#2864e9}
.stat .stat-icon .icon{width:24px;height:24px;stroke-width:1.7}
.stat.green .stat-icon{background:#eaf6f2;color:#118b7a}.stat.orange .stat-icon{background:#fff4e5;color:#b47820}.stat.red .stat-icon{background:#fff0f2;color:#cf5264}
.stat .label{font-size:12px;font-weight:500;color:var(--muted)}
.stat .value,.stat.green .value,.stat.orange .value,.stat.red .value{font-size:29px;font-weight:650;color:#26364e;letter-spacing:-.5px;margin-top:6px}
.stat .unit{font-size:12px;color:#61718a;margin-left:6px}
.btn{min-height:38px;padding:8px 14px;border:1px solid #dce4f0;border-radius:8px;background:#fff;color:#445671;font-size:13px;font-weight:500;gap:7px;transition:background-color 150ms,border-color 150ms}
.btn .icon{width:17px;height:17px}.btn:hover{background:#f6f8fc;border-color:#bfd0ed}
.btn.primary{background:#2864e9;border-color:#2864e9;color:white}.btn.primary:hover{background:#2058d2}
.btn.outline{border-color:#d8e3f8;color:#2864e9;background:#f8faff}.btn.success{background:#087f75;border-color:#087f75;color:white}
.btn.danger{background:#cc3548;border-color:#cc3548;color:white}.btn.danger-outline{color:#bd3247;border-color:#f1d0d7;background:#fffafb}
.btn.small{min-height:32px;padding:6px 10px;font-size:12px}
.link-btn{font-size:12px;padding:5px 6px;border-radius:5px}.link-btn:hover{text-decoration:none;background:#edf3ff}.cell-actions{gap:3px}
.filters{padding:18px;background:#fff;border:1px solid var(--line);border-radius:14px;gap:14px;align-items:flex-end;flex-wrap:wrap;margin-bottom:20px}
.filters label{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:120px;font-size:12px;color:#61718a}
.filters input,.filters select,.filters label:nth-child(2)>input{width:160px;max-width:200px;min-width:0}
.filters input[type=date]{width:142px}.filters select{min-width:120px}.filters .btn{padding:8px 14px}
input:not([type=checkbox]):not([type=radio]),select,textarea{border-color:#dfe6f0;border-radius:8px;background:#fafbfd;color:#32445e;min-height:38px;padding:9px 11px;font-size:13px;transition:border-color 150ms,background-color 150ms}
input:not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{outline:2px solid #e1ebff;border-color:#749aef;background:white}
input::placeholder,textarea::placeholder{color:#7b899e}input[type=checkbox],input[type=radio]{width:16px;height:16px}
.table-wrap{border-radius:9px}table{font-size:13px}
th,.compact th{padding:12px;background:#f6f8fc;color:#61718a;font-size:12px;font-weight:500;line-height:1.5}
td,.compact td{padding:11px 12px;border-bottom-color:#edf1f6;font-size:13px;color:#34465f;line-height:1.6}
tbody tr:hover{background:#fafcff}tbody tr.selected{background:#f0f5ff}.table-toolbar{gap:10px;margin-bottom:18px;font-size:12px;color:var(--muted)}
.pagination{margin:18px 0 0;font-size:12px}.pagination .pages{gap:6px}.page-btn{border-radius:7px;border-color:var(--line);font-size:12px}.page-btn.active{background:#edf3ff;color:#2459d3;border-color:#dce7fd;font-weight:600}
.notice{background:#eef4ff;color:#4a658d;border:1px solid #e0eafe;border-radius:9px;padding:12px 14px;font-size:12px}
.notice.orange{background:#fffaef;border-color:#f4e6ca;color:#94631d}.notice.red{background:#fff5f6;border-color:#f3dde2;color:#a9374b}
.tabs{gap:5px;padding:5px;border:1px solid var(--line);border-radius:11px;background:#fff;margin-bottom:20px;width:fit-content;max-width:100%}
.tabs a,.tabs button,.tabs.boxed a{padding:9px 16px;min-height:38px;border:0;border-radius:7px;background:transparent;color:#61718a;font-size:13px}
.tabs .active,.tabs.boxed .active{background:#edf3ff;color:#2459d3;border:0;font-weight:600}
.segments{gap:4px;align-items:center}.segments>a,.segments>button{border:0;border-radius:7px!important;margin:0;padding:9px 12px;background:#f5f7fb;color:#61718a;font-size:12px;min-height:36px}
.segments>.active{background:#eaf1ff;color:#2459d3;font-weight:600}
.bar-chart{border-bottom-color:#e1e7f0;background:repeating-linear-gradient(to top,transparent 0,transparent 44px,#eff3f8 45px,#eff3f8 46px)}
.bar-chart .bar{background:#5684ed;border-radius:4px 4px 0 0}.bar span{color:#61718a}.chart-legend{font-size:12px}
.health-row{gap:12px;font-size:13px;border-bottom-color:#edf1f6;padding:13px 0}.health-row .icon{width:19px;height:19px;color:#8292aa}
.donut-layout{gap:18px}.donut-legend{font-size:12px;gap:16px}.progress-track{height:6px;width:85px;background:#edf1f6}.progress small{font-size:11px}
.form-grid{gap:18px}.form-field>label{font-size:12px;color:#61718a;font-weight:500}.form-field small{font-size:11px}
.form-footer{border-radius:12px;padding:14px 18px;gap:10px}.form-footer.sticky{box-shadow:none}
.check-list,.check-options{gap:14px}.check-list label,.check-options label{font-size:13px;line-height:1.7}
.kv{grid-template-columns:108px minmax(0,1fr);font-size:13px}.kv>div{padding:10px 12px;border-bottom-color:#edf1f6}.kv>div:nth-child(odd){background:#f7f9fc;color:#61718a}
.hospital-banner{background:#fff;gap:18px;padding:24px}.hospital-banner h2{font-size:21px;font-weight:600}.hospital-banner>.icon{width:38px;height:38px;padding:7px;background:#edf3ff;border-radius:11px}.hospital-banner .contact-info{font-size:12px;gap:9px;border-left-color:var(--line);padding-left:24px}
.tree-item{border-radius:8px;font-size:13px;padding:12px 10px;gap:9px}.tree-item .icon{width:18px;height:18px;color:#7a8da9}.tree-item.active{background:#edf3ff;color:#2459d3}
.report-grid .card{padding:18px;border-radius:14px;margin-bottom:18px}.report-grid .card-head h2{font-size:15px}.report-grid .kv>div{padding:9px 10px;font-size:12px}
.report-grid>*{min-width:0}.report-grid>.card,.template-editor>.card{align-self:start}
.report-grid .paper,.template-editor .paper{padding:24px;background:white;border:1px solid #e0e6ef;box-shadow:0 2px 12px #24344c08}
.paper table td,.paper table th{font-size:11px;padding:6px}.paper{border-radius:4px}.paper h2{color:#24344c}
.versions{border-left-color:#e1e8f3}.version-item{background:#f6f9ff;border:1px solid #e7eefb;border-radius:9px;padding:12px;font-size:11px}.version-item strong{font-size:13px}.version-item:before{width:9px;height:9px;left:-20px}
.template-card{padding:20px}.template-info h2{font-size:18px}.template-info p{font-size:12px}.template-cover{border-color:#e1e7ef;box-shadow:none;border-radius:7px}
.template-editor .card{padding:18px;border-radius:14px}.template-editor .settings-logo{background:#f8faff;border-style:solid;border-radius:10px;color:#4a658d}
.page-tree button{border-radius:10px;padding:14px 12px;gap:10px;font-size:13px}.page-tree button.active{background:#f0f5ff;border-color:#d1dffd}.page-tree .icon{width:23px;height:23px}
.role-item{padding:17px 14px;gap:12px;border-radius:11px}.role-item strong{font-size:14px}.role-item small{font-size:11px}.role-item .icon{width:24px;height:24px}.role-item.active{background:#f0f5ff;border-color:#d1dffd}
.scope-options label{border-radius:10px;padding:15px;font-size:13px}.scope-options small{font-size:11px}.scope-options label:has(input:checked){background:#f0f5ff;border-color:#d1dffd}
.service-title{gap:12px}.service-title h2{font-size:15px}.service-title p{font-size:12px}.settings-form{min-height:0;padding:20px}.settings-form .stat-icon{width:42px;height:42px}.settings-form .stat-icon .icon{width:24px;height:24px}
.settings-form .form-grid{gap:14px}.settings-form .form-field{grid-template-columns:98px minmax(0,1fr)}.settings-form .form-field>label{font-size:12px}.settings-form input{min-height:38px;padding:9px 11px}
.file-thumb{border-radius:10px;padding:5px}.file-thumb.active{border-color:#8aacf3;background:#f0f5ff}.file-preview,.photo-row img{border-radius:9px}
.error-screen{min-height:650px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px 20px}.error-screen h1,.error-screen h2{font-size:27px;font-weight:600}.error-screen p{font-size:14px;max-width:520px;line-height:1.8}.error-screen .btn{font-size:13px;padding:10px 20px;margin-top:10px}.error-illustration{transform:scale(.8);margin-bottom:0;height:270px}
.dialog{border-color:#e2e8f1;border-radius:16px;box-shadow:0 18px 64px #17294424}.dialog::backdrop,.drawer::backdrop{background:#1c2e492e}
.dialog-header{padding:20px 24px;background:#fff}.dialog-header h2{font-size:18px;font-weight:600}.dialog-header button{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#f5f7fb}
.dialog-body{padding:24px}.dialog-footer{padding:16px 24px;background:#fbfcfe}.drawer{top:16px;right:16px;bottom:16px;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);border:1px solid var(--line);border-radius:16px;width:460px}
.drawer .dialog-body{padding:24px}.drawer .form-field{display:flex;gap:8px;align-items:stretch}.drawer .form-field>label{text-align:left;font-size:12px}.drawer .form-grid{gap:18px}
.confirm-detail{border-radius:10px;background:#f8fafd;font-size:13px}.help-grid a{border-radius:9px;background:#fafcff;font-size:13px}.help-grid a:hover{background:#f0f5ff;text-decoration:none}.error-inline{font-size:12px;border-radius:8px}
#toast{border-radius:10px;font-size:13px;box-shadow:0 8px 30px #24344c12}
.login-page{grid-template-columns:38% 62%;background:#f7f9fc;min-height:700px}
.login-brand{background:#edf3ff;color:#253e6b;padding:32px}.login-brand:before,.login-brand:after{display:none}.login-brand>.icon{width:70px;height:76px;stroke-width:1.5;color:#2864e9}.login-brand h1{font-size:32px;color:#233d6b;margin:24px 0 20px;letter-spacing:0}.login-brand .rule{width:44px;height:3px;background:#a6bff1;border-radius:4px}
.login-form-wrap{padding:40px}.login-form{width:100%;max-width:440px;background:white;border:1px solid var(--line);border-radius:20px;padding:36px}
.login-form h1{font-size:25px;letter-spacing:0;text-align:left;margin-bottom:30px;color:#24344c}.login-input{height:50px;padding:0 14px;gap:12px;margin-bottom:18px;border-color:#dfe6f0;border-radius:9px;background:#fafbfd}.login-input .icon{width:19px;height:19px;color:#7c8ca4}.login-input input{font-size:14px!important;background:transparent!important;border:0!important;padding:0!important;height:100%}.login-input:focus-within{outline:2px solid #e1ebff;border-color:#749aef}.login-input input:focus{outline:none!important}
.login-captcha{grid-template-columns:minmax(0,1fr) 100px;gap:12px}.captcha-button{border-color:var(--line);background:#f7f9fc}.captcha-button img{height:42px}.login-form>.btn{height:46px;font-size:14px;letter-spacing:1px;margin-top:26px;border-radius:9px}.login-hint{color:#61718a;font-size:11px;margin-top:22px;margin-bottom:0}
@media(min-width:1400px){.content:has([data-screen=A08]) .kv>div{padding:9px 10px}.content:has([data-screen=A08]) .stat:first-child .value{font-size:22px}.template-editor{grid-template-columns:180px minmax(0,1fr) 320px}}
@media(max-width:1350px){.content{padding:16px 20px 32px}.stats .stat{padding:16px 14px;gap:10px}.stat .value{font-size:26px}.stat .stat-icon{width:36px;height:36px}.stat .label{font-size:11px}.page-heading h1{font-size:23px}.template-editor{grid-template-columns:150px minmax(0,1fr) 280px}}
@media(max-width:1020px){.template-editor{grid-template-columns:140px minmax(0,1fr)}.report-grid{grid-template-columns:minmax(0,1fr)}.report-grid>.card:last-child{grid-column:1}.report-grid>div:first-child>.card:first-child .kv{grid-template-columns:90px minmax(0,1fr)}.filters label{flex:1;min-width:140px}.filters input,.filters select,.filters input[type=date],.filters label:nth-child(2)>input{width:100%;max-width:none}.hospital-banner{flex-wrap:wrap}.hospital-banner .contact-info{margin-left:0}.content .card{padding:16px}.login-page{grid-template-columns:32% 68%}.login-brand h1{font-size:24px}.login-form-wrap{padding:28px}}
@media(max-width:760px){.topbar{padding:0 12px;gap:6px}.topbar .user{font-size:12px;padding:8px;gap:6px}.topbar>.mobile-toggle{min-width:38px;min-height:40px}.breadcrumb{padding:0 16px;font-size:11px}.content{padding:12px 14px 28px}.page-heading{gap:12px;margin-bottom:20px;align-items:flex-start}.page-heading h1{font-size:22px}.page-heading p{font-size:12px}.heading-actions{flex-wrap:wrap}.heading-actions .btn{font-size:12px;padding:8px 12px;min-height:38px}.grid,.stats{gap:12px}.stats .stat{min-height:98px;padding:14px 12px;gap:9px}.stat .label{font-size:11px}.stat .value{font-size:25px}.stat .unit{font-size:10px;margin-left:4px}.stat .stat-icon{width:32px;height:32px;border-radius:9px}.stat .stat-icon .icon{width:20px;height:20px}.card,.content .card,.report-grid .card{padding:16px;border-radius:12px;margin-bottom:14px}.card-head{margin-bottom:14px}.card-head h2{font-size:14px}.filters{padding:14px;gap:12px;border-radius:12px;flex-wrap:wrap}.filters label{min-width:125px;font-size:11px}.filters input,.filters select,.filters input[type=date],.filters label:nth-child(2)>input{max-width:none;width:100%}.filters .btn{min-height:40px}td,.compact td{padding:11px 10px;font-size:12px}th,.compact th{padding:11px 10px;font-size:11px}.pagination{gap:12px;flex-wrap:wrap}.pagination .pages{flex-wrap:wrap;gap:5px}.tabs{width:100%;gap:3px}.tabs a,.tabs.boxed a{padding:9px 12px;font-size:12px}.segments{gap:4px}.segments>a{padding:9px 10px;font-size:11px}.hospital-banner h2{font-size:19px}.hospital-banner .contact-info{width:100%;border:0;padding:0;font-size:12px}.template-editor{grid-template-columns:minmax(0,1fr)}.template-editor>div:last-child{display:block}.template-editor .page-tree{flex-wrap:wrap}.page-tree button{width:auto;flex:1;font-size:12px;padding:12px 8px}.template-card{grid-template-columns:110px minmax(0,1fr);gap:12px}.template-info h2{font-size:15px}.template-card .template-actions{gap:8px}.template-actions .btn{padding:8px 10px;font-size:12px}.scope-options{grid-template-columns:minmax(0,1fr)}.report-grid .paper{padding:16px}.report-grid .kv>div{font-size:12px}.versions{flex-wrap:wrap}.version-item{flex:1;min-width:110px}.dialog,.dialog.wide{width:calc(100vw - 24px);max-width:calc(100vw - 24px);border-radius:14px}.dialog-body,.drawer .dialog-body{padding:18px}.dialog-header{padding:16px 18px}.dialog-footer{padding:14px 18px;gap:8px}.drawer{top:8px;right:8px;bottom:8px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:14px}.form-footer{padding:12px;gap:8px;flex-wrap:wrap}.error-screen{min-height:550px;padding:24px 16px}.error-screen h1,.error-screen h2{font-size:23px}.error-screen p{font-size:13px}.error-illustration{width:280px;height:240px}.login-page{display:flex;flex-direction:column;height:auto;min-height:100dvh}.login-brand{height:190px;min-height:190px;padding:20px}.login-brand>.icon{width:40px;height:44px}.login-brand h1{font-size:22px;margin:14px 0}.login-brand .rule{display:none}.login-form-wrap{padding:24px 18px 36px}.login-form{padding:26px 22px;max-width:440px}.login-form h1{font-size:23px;margin-bottom:24px}.login-input{height:48px;margin-bottom:16px}.login-captcha{gap:10px;grid-template-columns:minmax(0,1fr) 94px}}

/* Keep equipment columns readable inside narrow forms. */
.device-picker table{min-width:760px;table-layout:fixed}.device-picker th:nth-child(1){width:50px}.device-picker th:nth-child(2){width:150px}.device-picker th:nth-child(3){width:160px}.device-picker th:nth-child(4){width:90px}.device-picker th:nth-child(5){width:220px}.device-picker th:nth-child(6){width:90px}.device-picker td{overflow-wrap:anywhere}.option-error{color:var(--red);font-size:12px;overflow-wrap:anywhere;margin:0}

/* Keep populated business tables readable; scroll within their cards on narrow screens. */
.table-wrap{container-type:inline-size}
.table-wrap td:has(>.empty){padding:0}
.table-wrap .empty{position:sticky;left:0;width:100cqw}
.table-wrap>table:not(.paper table):has(>tbody>tr[data-row-id]):has(>thead>tr>th:nth-child(4)){min-width:560px}
.table-wrap>table:not(.paper table):has(>tbody>tr[data-row-id]):has(>thead>tr>th:nth-child(5)){min-width:760px}
.table-wrap>table:not(.paper table):has(>tbody>tr[data-row-id]):has(>thead>tr>th:nth-child(7)){min-width:960px}
.table-wrap>table:not(.paper table):has(>tbody>tr[data-row-id]):has(>thead>tr>th:nth-child(9)){min-width:1120px}
@media(max-width:760px){.card-head{flex-wrap:wrap}.matrix-card{min-height:0}}

.task-fields{border:0;margin:0;padding:0;min-width:0}
.measurement-table table{min-width:38rem}
#inspection-form .error-inline{scroll-margin-block-end:5rem}
