:root{font-family:'IBM Plex Sans Arabic',system-ui,-apple-system,sans-serif;font-size:14px;color:#233852;background:#f5f8fc;--bg:#f5f8fc;--panel:#fff;--ink:#203651;--muted:#8797aa;--line:#e6edf5;--blue:#2469ce;--blue-2:#e7f1ff;--teal:#0eaa9b;--shadow:0 10px 36px rgba(37,77,123,.045)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}svg{max-width:100%}.app-shell{display:grid;grid-template-columns:247px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-left:1px solid var(--line);padding:30px 18px 22px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;z-index:7}.brand{display:flex;gap:11px;align-items:center;padding:0 13px 35px}.brand-mark{width:44px;height:44px;border-radius:15px;background:linear-gradient(135deg,#2f82dd,#1861cc);display:grid;place-items:center;color:#fff;box-shadow:0 8px 18px rgba(29,109,213,.22)}.brand-mark svg{width:29px}.brand-name{font-size:23px;font-weight:700;letter-spacing:-.9px}.brand-sub{color:#94a3b7;font-size:10px;margin-top:-5px}.nav-label{color:#acb8c7;font-size:10px;font-weight:700;padding:12px 19px 9px}.nav-btn{width:100%;border:0;background:none;color:#718197;border-radius:12px;padding:12px 15px;display:flex;align-items:center;gap:12px;font-weight:600;text-align:right;margin:3px 0;transition:.16s}.nav-btn svg{width:19px;height:19px;stroke-width:1.8}.nav-btn:hover{background:#f4f8fd;color:#1f5caa}.nav-btn.active{background:#e9f2ff;color:#1e68ce;box-shadow:inset -3px 0 #2469ce}.nav-btn small{margin-right:auto;background:#fff2ee;color:#d36c44;border-radius:6px;padding:1px 7px;font-size:10px}.sidebar-bottom{margin-top:auto}.device-mini{background:#f3f8ff;border:1px solid #e5efff;border-radius:16px;padding:15px;margin:0 5px 16px}.device-mini b{font-size:12px}.device-mini p{font-size:11px;color:#8797aa;margin:8px 0 0;line-height:1.8}.device-mini .pulse-dot{display:inline-block;width:8px;height:8px;margin-left:6px;background:#13b69a;border-radius:50%}.sidebar-credit{font-size:10px;color:#aab6c5;text-align:center}.app-main{min-width:0}.topbar{height:85px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;background:rgba(255,255,255,.86);border-bottom:1px solid var(--line);gap:18px}.crumb{color:#8696a9;font-size:12px}.crumb strong{color:#253d5b;font-weight:700}.top-right{display:flex;align-items:center;gap:14px}.search-box{border:1px solid var(--line);background:#f8fafd;color:#8192a7;border-radius:10px;display:flex;align-items:center;gap:9px;padding:0 13px;height:39px;min-width:227px}.search-box input{background:none;border:0;outline:none;width:100%;min-width:40px;color:#324761}.search-box svg{width:16px}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:11px;width:40px;height:40px;display:grid;place-items:center;color:#657b96;position:relative}.icon-btn svg{width:19px}.notification-badge{position:absolute;top:7px;right:6px;width:7px;height:7px;background:#f18170;border:2px solid white;border-radius:50%}.avatar{height:40px;width:40px;background:#dceaff;border:2px solid #fff;box-shadow:0 0 0 1px #e5ebf5;display:grid;place-items:center;color:#256bd1;border-radius:12px;font-size:14px;font-weight:700}.content{padding:30px 36px 55px;max-width:1660px;margin:0 auto}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin:0 0 26px}.eyebrow{color:#2b80c9;font-size:10px;font-weight:700;letter-spacing:.8px}.page-title h1{margin:4px 0 3px;font-size:28px;line-height:1.4;font-weight:700;letter-spacing:-.8px;color:#183554}.muted{color:var(--muted)}.page-title p{color:#8999ab;margin:0;font-size:12px}.page-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.btn{border:1px solid #e2eaf4;color:#5a6f8a;background:#fff;padding:10px 15px;border-radius:10px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;transition:.15s;white-space:nowrap}.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.btn.primary{background:#226bd4;color:white;border-color:#226bd4;box-shadow:0 7px 16px rgba(34,107,212,.15)}.btn.primary:hover{background:#1459bd}.btn svg{width:15px;height:15px}.btn.danger{color:#c95a63}.test-banner,.error-banner{display:flex;gap:13px;align-items:center;padding:13px 16px;margin-bottom:20px;border:1px solid #f4e7c7;border-radius:12px;background:#fffaf0;color:#a58140;font-size:12px}.error-banner{border-color:#f5d7d7;background:#fff5f5;color:#a95959}.test-banner b,.error-banner b{font-weight:700}.test-banner p{margin:2px 0 0;font-size:11px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:22px}.stat-card{background:var(--panel);border:1px solid #edf1f7;border-radius:17px;padding:20px 21px;box-shadow:var(--shadow);position:relative;overflow:hidden}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#8596aa;font-weight:500;font-size:12px}.stat-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#eef5ff;color:#2e73d5}.stat-icon svg{height:20px;width:20px}.stat-icon.teal{color:#0caa99;background:#e8f9f5}.stat-icon.orange{color:#d99c42;background:#fff5e8}.stat-icon.pink{color:#e48189;background:#fff0f1}.stat-num{font:700 31px/1.1 system-ui,sans-serif;letter-spacing:-1px;margin:18px 0 8px;color:#1e3857;font-variant-numeric:tabular-nums}.stat-caption{color:#97a5b6;font-size:11px}.stat-caption strong{color:#169a88}.board-grid{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(270px,.85fr);gap:20px}.section-card{border:1px solid #eaf0f7;background:#fff;border-radius:18px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:20px}.section-head{padding:20px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1f6}.section-head h2{font-size:16px;color:#29405d;margin:0;font-weight:700}.section-head p{font-size:11px;color:#99a8b9;margin:4px 0 0}.section-head a,.text-action{color:#2777ce;font-size:11px;font-weight:700;cursor:pointer;background:transparent;border:0}.bed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:20px}.patient-card{background:#fbfdff;border:1px solid #eaf0f7;border-radius:14px;overflow:hidden;transition:.2s;text-align:right;padding:0;display:flex;flex-direction:column;min-width:0;color:inherit}.patient-card:hover{border-color:#acd2fa;box-shadow:0 12px 24px rgba(35,102,172,.09);transform:translateY(-2px)}.patient-top{padding:14px 15px 0;display:flex;align-items:center;gap:9px;justify-content:space-between}.patient-name{font-weight:700;color:#34485f;font-size:12px}.patient-meta{font-size:10px;color:#9baab9;margin-top:3px}.status-dot{width:8px;height:8px;border-radius:50%;background:#10ae98;display:inline-block;margin-left:5px}.status-dot.off{background:#e18989}.status-dot.delayed{background:#edb154}.patient-art{height:154px;display:flex;justify-content:center;align-items:center;background:radial-gradient(ellipse at 50% 50%,#f5faff 0%,#fbfdff 70%)}.posture-art{width:100%;max-height:170px}.patient-footer{border-top:1px solid #edf1f6;padding:12px 15px;display:flex;justify-content:space-between;align-items:center}.pose-label{font-weight:700;color:#3f5876;font-size:11px}.duration{color:#9ba9b8;font-size:10px}.tiny-pill{border-radius:30px;padding:4px 9px;background:#edf6fc;color:#3178ab;font-size:10px;font-weight:700;display:inline-flex;align-items:center;gap:5px}.tiny-pill.warn{background:#fff2e6;color:#b87928}.tiny-pill.off{background:#f3f4f8;color:#8896a8}.side-list{padding:9px 19px}.alert-row{display:flex;gap:11px;padding:14px 2px;border-bottom:1px solid #edf1f5}.alert-row:last-child{border-bottom:0}.alert-dot{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;background:#fff0e8;color:#dc9357;flex-shrink:0}.alert-dot svg{width:17px}.alert-row h4{font-size:12px;margin:0;color:#415672}.alert-row p{font-size:11px;color:#99a5b6;margin:5px 0 0;line-height:1.9}.alert-row time{font-size:10px;color:#aeb8c3}.empty{color:#94a3b7;text-align:center;padding:35px 15px;font-size:13px;line-height:2}.overview-bottom{display:grid;grid-template-columns:1fr 1fr;gap:20px}.distribution{padding:26px;display:flex;gap:22px;align-items:center}.donut{width:116px;height:116px;border-radius:50%;background:conic-gradient(#2d74d7 0 28%,#3fbcb0 28% 50%,#8e80e5 50% 69%,#ebbe76 69% 81%,#c9d7e6 81% 100%);display:grid;place-items:center;flex-shrink:0}.donut:after{content:'';width:78px;height:78px;background:#fff;border-radius:50%;grid-area:1/1;z-index:0}.donut-inner{grid-area:1/1;z-index:1;text-align:center}.donut-inner strong{font:700 22px system-ui}.donut-inner small{display:block;color:#98a5b5;font-size:9px}.legend{flex:1;display:grid;gap:11px}.legend-item{display:flex;gap:7px;justify-content:space-between;font-size:11px;color:#7c8da3}.legend-item b{font:600 11px system-ui;color:#354f6e}.legend-label{display:flex;align-items:center;gap:8px}.legend-dot{height:9px;width:9px;border-radius:3px;background:#2d74d7}.device-summary{padding:22px}.device-meter{height:9px;background:#eaf1f7;border-radius:20px;overflow:hidden;margin:16px 0}.device-meter span{height:100%;display:block;background:#18b39c;border-radius:20px}.device-info{display:flex;justify-content:space-between;gap:10px;color:#7f91a5;font-size:11px}.device-info strong{color:#365775}.page-panel{display:grid;gap:20px}.patients-list-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.patient-card.full .patient-art{height:172px}.detail-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.8fr);gap:20px}.hero-bed{background:linear-gradient(145deg,#f0f8ff,#fcfeff);padding:7px 25px 14px;text-align:center}.hero-bed .posture-art{max-height:335px;height:300px}.detail-pose-title{font-size:22px;color:#1c476e;margin:0}.detail-pose-sub{color:#8294aa;font-size:11px}.detail-kpis{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #edf2f7}.detail-kpis div{text-align:center;padding:16px 8px;border-left:1px solid #edf2f7}.detail-kpis div:last-child{border-left:0}.detail-kpis strong{display:block;font:700 19px system-ui;color:#2a4a70}.detail-kpis small{display:block;color:#91a3b6;margin-top:6px;font-size:10px}.detail-side{padding:23px}.detail-side h3{font-size:15px;margin:0 0 18px}.info-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #edf2f6;color:#899bad;font-size:12px}.info-row strong{font-size:12px;color:#39516e}.chart-box{padding:20px 24px}.chart-labels{display:flex;gap:15px;margin-bottom:8px;font-size:10px;color:#7d8fa7}.chart-labels span:before{content:'●';margin-left:5px;color:var(--c,#236fd0)}.sensor-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.chart-empty{height:76px;display:flex;align-items:center;justify-content:center;color:#a6b4c4;font-size:12px}.mini-chart{width:100%;height:92px;display:block}.timeline{padding:20px}.timeline-strip{display:flex;gap:3px;height:37px;overflow:hidden;border-radius:9px;direction:ltr}.timeline-block{height:100%;min-width:8px;flex:1;transition:.2s;cursor:help}.timeline-times{display:flex;justify-content:space-between;color:#a0afbd;font:11px system-ui;margin-top:10px;direction:ltr}.event-list{padding:5px 22px 20px}.event{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #edf1f5}.event:last-child{border:none}.event-ico{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#edf5ff;color:#4b78ae}.event-title{font-size:12px;font-weight:600;color:#344c66}.event-time{font-size:10px;color:#a1afbf;margin-top:4px}.event-duration{margin-right:auto;font-size:11px;color:#8094a8;direction:ltr}.table-wrap{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;text-align:right}.data-table th{color:#9aa8ba;background:#fafcfe;font-size:11px;font-weight:600;padding:15px 20px;white-space:nowrap}.data-table td{padding:16px 20px;border-top:1px solid #edf1f6;font-size:12px;color:#50657e;white-space:nowrap}.data-table tbody tr:hover{background:#fafcff}.table-avatar{height:31px;width:31px;display:inline-grid;place-items:center;background:#eaf2ff;color:#2e70c9;border-radius:10px;margin-left:9px;font-weight:700}.tag{display:inline-flex;gap:6px;align-items:center;border-radius:25px;padding:5px 10px;background:#e8f8f2;color:#12a389;font-size:10px;font-weight:700}.tag.orange{background:#fff3e7;color:#c99045}.tag.gray{background:#f1f4f8;color:#8d9aab}.tag.red{background:#fff0f1;color:#d76a71}.progress{background:#e9eff7;height:8px;border-radius:10px;width:120px;overflow:hidden}.progress span{display:block;height:100%;background:#28a7ac}.calibration-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;padding:20px}.cal-card{border:1px solid #e9eff6;border-radius:13px;padding:15px;text-align:center}.cal-card .posture-art{max-height:107px}.cal-card h3{font-size:12px;margin:2px 0}.cal-card p{font-size:10px;color:#a0b1c2;margin:5px 0 12px}.cal-card button{width:100%}.setup-steps{padding:0 22px 25px}.setup-steps li{color:#7d91aa;font-size:12px;line-height:2.6}.notice{background:#eff7ff;color:#54759b;border-radius:10px;padding:12px 15px;line-height:1.8;font-size:11px;margin:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field label{display:block;color:#637992;font-size:11px;font-weight:700;margin-bottom:7px}.field input,.field select{width:100%;height:43px;padding:0 12px;color:#2a4767;background:#fcfdff;border:1px solid #e1e9f2;border-radius:10px;outline:none}.field input:focus,.field select:focus{border-color:#9fc9f9;box-shadow:0 0 0 3px #e7f1fc}.modal-backdrop{position:fixed;inset:0;background:rgba(12,29,55,.45);display:grid;place-items:center;z-index:30;padding:20px;backdrop-filter:blur(3px)}.modal{background:#fff;width:100%;max-width:505px;border-radius:22px;box-shadow:0 25px 80px rgba(17,40,72,.2);overflow:hidden}.modal-head{padding:21px 25px;border-bottom:1px solid #edf1f6;display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0;color:#284460}.modal-body{padding:22px 25px}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:23px}.toast{position:fixed;bottom:24px;left:24px;background:#163754;color:white;padding:13px 19px;border-radius:12px;box-shadow:0 18px 35px #14365344;z-index:90;opacity:0;pointer-events:none;transition:opacity .2s;max-width:360px}.toast.show{opacity:1}.status-rail{display:flex;gap:8px;align-items:center}.select{height:39px;background:#fff;border:1px solid var(--line);padding:0 12px;border-radius:10px;color:#5a7090}.tall-notice{display:grid;place-items:center;text-align:center;min-height:230px;gap:9px;color:#8b9db2}.tall-notice svg{height:45px;width:45px;color:#b6c8dd}.tall-notice strong{font-size:15px;color:#45617f}.tall-notice p{font-size:12px;margin:0;line-height:1.8}.mode-toggle{background:#f1f5fa;display:flex;gap:2px;border-radius:11px;padding:3px}.mode-toggle button{border:0;border-radius:8px;background:transparent;padding:8px 13px;color:#8a9bb0;font-size:11px;font-weight:700}.mode-toggle button.active{color:#2569c6;background:#fff;box-shadow:0 2px 8px #17345b0e}.mobile-menu{display:none}.collapsing-detail{display:none}.small-text{font-size:11px}.graph-placeholder{border:1px dashed #d9e6f4;border-radius:10px;padding:24px;color:#90a2b7;text-align:center}.kbd{background:#f1f4f9;padding:4px 7px;border-radius:5px;font:11px system-ui}.footer{color:#a4b2c1;text-align:center;font-size:10px;margin-top:10px}.dark{--bg:#0e1724;--panel:#172335;--ink:#ecf4fe;--muted:#99acc2;--line:#2b3a4e;color:#d8e6f5;background:#0e1724}.dark .sidebar,.dark .topbar,.dark .section-card,.dark .stat-card,.dark .modal{background:#172335;border-color:#2a3d54}.dark .page-title h1,.dark .section-head h2,.dark .brand-name,.dark .stat-num,.dark .detail-pose-title{color:#edf5ff}.dark .patient-card,.dark .search-box,.dark .field input,.dark .field select,.dark .select{background:#1b2b40;border-color:#2e425a;color:#cad8ec}.dark .patient-art,.dark .hero-bed{background:#22354c}.dark .patient-name,.dark .patient-footer .pose-label,.dark .info-row strong{color:#d8e7f8}.dark .nav-btn.active,.dark .device-mini{background:#213a58}.dark .btn,.dark .icon-btn{background:#1e314a;color:#dde9f9;border-color:#314961}.dark .btn.primary{background:#236fd3}.dark .data-table th{background:#1c2c40}.dark .data-table td,.dark .event{border-color:#2a3a51}.dark .donut:after{background:#172335}.dark .detail-kpis,.dark .detail-kpis div,.dark .section-head,.dark .patient-footer,.dark .alert-row,.dark .info-row{border-color:#2a3c53}
@media(max-width:1300px){.app-shell{grid-template-columns:215px 1fr}.content{padding:25px}.topbar{padding:0 25px}.board-grid{grid-template-columns:minmax(0,1.5fr) minmax(250px,.85fr)}.patients-list-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1030px){.stats-grid{grid-template-columns:repeat(2,1fr)}.board-grid,.overview-bottom,.detail-layout{grid-template-columns:1fr}.patients-list-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.patient-art{height:155px}}
@media(max-width:730px){.app-shell{display:block}.sidebar{position:fixed;top:0;right:0;height:100vh;width:255px;transform:translateX(105%);transition:.25s;box-shadow:-12px 0 30px #17385a18}.sidebar.open{transform:translateX(0)}.mobile-menu{display:grid}.topbar{height:70px;padding:0 16px}.topbar .search-box{min-width:100px;width:170px}.topbar .avatar,.topbar .desktop-crumb{display:none}.content{padding:23px 15px 30px}.page-title h1{font-size:23px}.page-title{flex-direction:column;gap:12px}.page-actions{justify-content:flex-start}.stats-grid{gap:10px}.stat-card{padding:15px}.stat-num{font-size:25px}.bed-grid,.patients-list-grid,.sensor-grid{grid-template-columns:1fr}.patient-art{height:155px}.calibration-grid{grid-template-columns:repeat(2,1fr)}.detail-kpis strong{font-size:16px}.search-box input{font-size:11px}.form-grid{grid-template-columns:1fr}.distribution{flex-wrap:wrap}.mode-toggle button{padding:7px}.top-right{gap:7px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
