:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#192e3d;background:#f2f5f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit}.desktop-shell{display:flex;min-height:100vh;max-width:1720px;margin:auto}.sidebar{background:#102436;color:#e8f2f0;width:247px;flex-shrink:0;padding:26px 16px;display:flex;flex-direction:column;position:sticky;height:100vh;top:0}.brand{display:flex;align-items:center;gap:11px;padding:0 10px 30px;letter-spacing:.9px}.brand-mark{width:35px;height:35px;background:#1d6c61;border:1px solid #488e81;color:#d4ece2;border-radius:11px;display:grid;place-items:center;font-size:24px}.brand b{font-size:15px;display:block}.brand small{font-size:9px;letter-spacing:3px;color:#b8cfc9;display:block;margin-top:4px;font-weight:750}.brand i{color:#87e1bf;font-style:normal}.workspace{display:flex;align-items:center;gap:9px;background:#20374a;border:1px solid #344c5d;border-radius:14px;padding:10px 8px;margin:0 0 30px;font-size:11px}.workspace-icon{width:36px;height:36px;background:#d5e7dc;color:#24594d;display:grid;place-items:center;border-radius:10px;font-weight:850}.workspace b{display:block;font-size:11px}.workspace small{display:block;color:#a8beca;font-size:10px;margin-top:3px}.workspace span{margin-left:auto}.nav-label{font-size:9px;letter-spacing:1.5px;color:#7996a2;margin:0 10px 12px;font-weight:800}.sidebar-nav{display:flex;flex-direction:column;gap:5px}.nav-btn{border:0;border-radius:12px;display:flex;gap:11px;align-items:center;background:transparent;color:#b7c7ce;text-align:left;padding:12px 12px;font-size:12px;font-weight:650}.nav-btn .nav-icon{font-size:18px;width:22px;text-align:center}.nav-btn.active{background:#1e7668;color:white}.nav-btn:not(.active):hover{background:#1c3447;color:white}.sidebar-bottom{margin-top:auto;border-top:1px solid #274353;padding:18px 9px 0;display:flex;flex-direction:column;gap:10px}.sidebar-bottom>small{font-size:10px;color:#99aebb;line-height:1.5}.demo-pill{font-size:11px;color:#b5f1d6}.sidebar-help{border:1px solid #385264;background:transparent;color:#c7dde0;border-radius:9px;padding:9px;font-size:11px;text-align:left}.main-area{flex:1;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:31px 39px 22px;background:#fff;border-bottom:1px solid #e5ebee}.topbar h1{font-size:27px;letter-spacing:-1px;margin:4px 0}.topbar p{font-size:12px;color:#8c9ba5;margin:5px 0 0}.eyebrow{letter-spacing:2px;font-size:9px;font-weight:850;color:#54947f}.top-right{display:flex;align-items:center;gap:16px}.today{font-size:12px;color:#718594}.role-select{display:flex;align-items:center;gap:7px;border:1px solid #e0e8ec;border-radius:10px;padding:8px 11px;font-size:11px;color:#8897a3}.role-select select{border:0;background:transparent;color:#234438;outline:none;font-weight:700}.user-avatar{width:35px;height:35px;display:grid;place-items:center;background:#e9f3ee;color:#286958;border-radius:50%;font-size:11px;font-weight:800}.mobile-banner{display:none}.app-content{max-width:1250px;margin:auto;padding:24px 39px 50px}.demo-alert{display:flex;align-items:flex-start;gap:12px;padding:13px 16px;background:#fff9e8;border:1px solid #f1e3bf;border-radius:13px;color:#795b21;margin-bottom:25px}.demo-alert>span{font-size:18px}.demo-alert b{font-size:12px}.demo-alert p{font-size:11px;line-height:1.45;margin:4px 0 0}.demo-alert button{margin-left:auto;border:0;background:transparent;font-size:18px;color:#987c44}.section-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 14px;gap:12px}.section-head h2{font-size:17px;letter-spacing:-.4px;margin:0}.section-head p{margin:5px 0 0;font-size:12px;color:#8795a0}.section-spacer{margin-top:26px}.btn{background:#187762;color:white;border:1px solid #187762;padding:11px 15px;border-radius:11px;font-weight:750;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}.btn:hover{background:#12634f}.btn.light{background:#e8f4ee;color:#176e5b;border-color:#e8f4ee}.btn.light:hover{background:#d6ece0}.btn.neutral{background:white;color:#3c5360;border-color:#dce5e9}.btn.danger{background:#fff1ef;color:#a0473d;border-color:#f4d7d2}.btn.sm{font-size:11px;padding:8px 10px;border-radius:8px}.btn.full{width:100%}.inline-actions{display:flex;flex-wrap:wrap;gap:9px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:27px}.metric{padding:21px 18px;background:#fff;border:1px solid #e4e9ed;border-radius:16px;min-height:111px;box-shadow:0 7px 27px #10263705}.metric .kicker{font-size:11px;color:#8294a0;display:flex;align-items:center;justify-content:space-between;gap:6px}.metric .value{font-size:30px;font-weight:780;letter-spacing:-1px;margin-top:13px}.metric .detail{font-size:10px;color:#8ba1a4;margin-top:5px}.metric.highlight{background:#143b39;color:white;border-color:#143b39}.metric.highlight .kicker,.metric.highlight .detail{color:#b6d0cb}.grid2{display:grid;grid-template-columns:1.36fr 1fr;gap:17px}.grid2.equal{grid-template-columns:1fr 1fr}.panel{background:#fff;border:1px solid #e4eaed;border-radius:17px;padding:19px;min-width:0;box-shadow:0 7px 27px #10263705}.panel h3{font-size:14px;letter-spacing:-.2px;margin:0 0 5px}.panel .sub{color:#92a0a7;font-size:11px;margin:0 0 17px;line-height:1.5}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.panel-header h3{margin:0}.line-item{display:flex;align-items:center;gap:11px;border-bottom:1px solid #edf1f2;padding:13px 0}.line-item:last-child{border-bottom:none}.line-item .line-main{flex:1;min-width:0}.line-item strong{font-size:12px;display:block;font-weight:730;line-height:1.45}.line-item small{color:#8a9aa5;font-size:10px;display:block;margin-top:5px}.icon-box{width:34px;height:34px;flex-shrink:0;border-radius:10px;background:#eff6f3;color:#217662;display:grid;place-items:center;font-size:17px}.icon-box.amber{background:#fff4de;color:#a76c13}.icon-box.blue{background:#ecf1fa;color:#5978aa}.badge{border-radius:100px;padding:5px 8px;background:#e9f6ef;color:#297657;font-size:10px;font-weight:700;white-space:nowrap}.badge.amber{background:#fff3db;color:#936611}.badge.grey{background:#edf1f2;color:#667e86}.badge.red{background:#fcebe8;color:#aa574e}.badge.blue{background:#e9f0fc;color:#4e70a1}.text-muted{color:#899aa4;font-size:12px}.text-mini{font-size:10px;color:#8b9ba3}.divider{height:1px;background:#edf1f2;margin:16px 0}.notice{padding:14px;border-radius:13px;background:#edf7f3;color:#285f52;font-size:12px;line-height:1.6}.notice.amber{background:#fff7e6;color:#826128}.faux-ai{background:linear-gradient(145deg,#163f3e,#102b3d);color:#fff;border:0}.faux-ai .sub{color:#b0cbd0}.faux-ai h3{font-size:17px}.faux-ai p{color:#d5e2df;font-size:12px;line-height:1.6}.ai-mark{display:inline-block;padding:7px 9px;background:#2a6964;border-radius:9px;font-size:11px;color:#c4ffdb;margin-bottom:14px}.search-row{display:flex;gap:9px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.input,.select,.textarea{background:#fff;width:100%;border:1px solid #d9e4e8;border-radius:11px;padding:11px 13px;font-size:12px;color:#243d48;outline:none}.input:focus,.select:focus,.textarea:focus{border-color:#3ca58c;box-shadow:0 0 0 3px #4fab8d24}.textarea{min-height:98px;resize:vertical;line-height:1.55}.search-row .input{flex:1;min-width:160px}.search-row .select{width:auto;min-width:145px}.people-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.person-card{border:1px solid #e3eaec;background:white;text-align:left;border-radius:15px;padding:18px;transition:box-shadow .15s,transform .15s;min-height:147px}.person-card:hover{box-shadow:0 10px 24px #25403518;transform:translateY(-2px)}.person-head{display:flex;align-items:center;gap:10px;margin-bottom:13px}.person-avatar{width:37px;height:37px;background:#eaf4ef;color:#19735e;border-radius:12px;display:grid;place-items:center;font-weight:800;font-size:12px}.person-name{font-weight:790;font-size:13px}.person-meta{font-size:10px;color:#91a0a7;margin-top:3px}.person-card p{color:#738b94;font-size:11px;line-height:1.5;min-height:32px}.task-row{display:flex;align-items:flex-start;gap:12px;border-bottom:1px solid #edf0f2;padding:15px 0}.task-row:last-child{border-bottom:0}.task-row input{accent-color:#168267;width:18px;height:18px;margin:1px 0}.task-row .task-title{font-size:12px;font-weight:710;line-height:1.4}.task-row.done .task-title{text-decoration:line-through;color:#91a2a9}.task-row .task-info{font-size:10px;color:#8b9aa4;margin-top:6px}.task-row .task-main{flex:1}.task-row .task-actions{display:flex;gap:5px}.icon-action{background:#f1f5f5;border:0;border-radius:8px;min-width:27px;height:28px;color:#607f85}.timeline{border-left:2px solid #cde6dd;margin-left:8px;padding-left:18px}.timeline-entry{position:relative;padding:4px 0 20px}.timeline-entry:before{content:"";width:10px;height:10px;position:absolute;background:#4aab88;border:3px solid #edf7f2;top:6px;left:-25px;border-radius:50%}.timeline-entry h4{font-size:12px;margin:0 0 5px}.timeline-entry p{font-size:12px;color:#5c7580;line-height:1.55;margin:4px 0}.timeline-entry small{color:#93a2aa;font-size:10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.form-field{margin-bottom:15px}.form-field label{display:block;font-size:11px;color:#506b75;font-weight:750;margin-bottom:7px}.form-field .hint{display:block;color:#97a6ad;font-size:10px;line-height:1.5;margin-top:6px}.form-actions{display:flex;gap:9px;justify-content:flex-end;padding-top:8px}.empty{text-align:center;padding:30px;color:#8b9ca4;font-size:12px}.empty-icon{font-size:31px;display:block;margin-bottom:11px}.handover-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}.handover-step{background:#f3f6f6;border-radius:10px;padding:12px;text-align:center}.handover-step b{display:block;font-size:18px;color:#2b6f62}.handover-step span{font-size:10px;color:#81949c}.quote-box{padding:14px;border-left:3px solid #4a9e84;border-radius:0 10px 10px 0;background:#f2f8f5;color:#355b54;font-size:12px;line-height:1.6;white-space:pre-wrap}.report{white-space:pre-wrap;font-size:12px;color:#36505b;line-height:1.7;background:#f6f8f8;border:1px solid #e7eeee;border-radius:12px;padding:17px;max-height:420px;overflow:auto}.progress-bar{height:9px;border-radius:99px;background:#e9efef;overflow:hidden;margin:10px 0}.progress-bar div{height:100%;background:linear-gradient(90deg,#1f826a,#55b995);transition:width .3s}.big-progress{display:flex;justify-content:space-between;font-size:12px;font-weight:750}.goal-card{border:1px solid #e3eaec;border-radius:14px;padding:16px;margin-bottom:11px;background:#fff}.goal-card h3{font-size:13px;margin:7px 0}.goal-card p{font-size:11px;line-height:1.5;color:#8395a0}.goal-meta{display:flex;justify-content:space-between;gap:9px;font-size:10px;color:#8c9ca4}.stat-line{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #edf1f2;font-size:12px}.stat-line:last-child{border:0}.stat-line strong{color:#214b42}.modal-backdrop{position:fixed;inset:0;background:#0a1829ae;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}.modal-backdrop[hidden]{display:none}.modal{width:min(620px,100%);max-height:calc(100dvh - 45px);overflow:auto;background:#fff;border-radius:20px;padding:23px;box-shadow:0 28px 80px #0003}.modal-head{display:flex;justify-content:space-between;align-items:start;gap:8px;margin-bottom:18px}.modal-head h2{font-size:19px;letter-spacing:-.5px;margin:0}.modal-head button{border:0;background:#f1f4f5;border-radius:10px;width:32px;height:32px;font-size:20px;color:#58717e}.modal .section-head{margin-top:12px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%) translateY(40px);background:#183c35;color:#fff;padding:11px 17px;font-size:12px;border-radius:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:200;box-shadow:0 8px 25px #09201833}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.bottom-nav{display:none}.mobile-banner{display:none}.tip-list{margin:0;padding-left:17px;color:#536e77;font-size:12px;line-height:1.9}.caps{letter-spacing:1.3px;text-transform:uppercase;font-size:10px;color:#829aa2;font-weight:800}.action-link{color:#147b64;background:none;border:0;font-weight:750;font-size:11px;padding:6px 0}.filter-tabs{display:flex;gap:6px}.filter-tabs button{border:1px solid #e1e8ea;background:#fff;padding:8px 11px;border-radius:9px;font-size:11px;color:#71878c}.filter-tabs button.active{background:#176e5a;color:#fff;border-color:#176e5a}.muted-note{font-size:11px;color:#8498a0;line-height:1.6}.resident-detail-head{display:flex;gap:11px;align-items:center;margin-bottom:15px}.resident-detail-head .person-avatar{width:46px;height:46px}.resident-detail-head h3{margin:0 0 4px;font-size:16px}.resident-detail-head p{margin:0;color:#8496a1;font-size:11px}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.summary-grid>div{background:#f4f7f6;border-radius:11px;padding:13px}.summary-grid b{display:block;font-size:18px;color:#176a56}.summary-grid span{font-size:10px;color:#8295a0}.footnote{color:#9aabb0;font-size:10px;line-height:1.5;margin-top:13px}.mobile-only{display:none}
@media(max-width:1100px){.sidebar{width:213px}.topbar{padding:25px}.app-content{padding:21px 25px 35px}.people-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){body{background:#f6f8f9}.desktop-shell{display:block;padding-bottom:calc(75px + env(safe-area-inset-bottom))}.sidebar,.topbar{display:none}.mobile-banner{display:flex;align-items:center;justify-content:space-between;background:#112b3b;color:white;padding:calc(12px + env(safe-area-inset-top)) 17px 14px}.mobile-brand{font-weight:850;letter-spacing:.65px;font-size:15px}.mobile-brand span{font-weight:500;font-size:10px;color:#9cdbc6;letter-spacing:1.5px;margin-left:4px}.mobile-role select{font-size:11px;background:#274b54;color:#d7eee7;border:1px solid #35646a;border-radius:9px;padding:8px;max-width:123px}.app-content{padding:15px 14px 25px}.demo-alert{padding:10px 11px;gap:8px;margin-bottom:19px}.demo-alert b{font-size:11px}.demo-alert p{font-size:10px}.demo-alert>span{font-size:13px}.section-head h2{font-size:16px}.metric-grid{grid-template-columns:repeat(2,1fr);gap:9px;margin-bottom:18px}.metric{min-height:105px;padding:15px}.metric .value{font-size:27px}.metric .kicker{font-size:10px}.grid2,.grid2.equal{grid-template-columns:1fr;gap:13px}.panel{padding:16px;border-radius:15px}.people-grid{grid-template-columns:1fr 1fr;gap:9px}.person-card{padding:12px;min-height:145px}.person-name{font-size:12px}.person-card p{font-size:10px}.person-avatar{width:31px;height:31px;font-size:10px}.search-row .select{width:100%}.bottom-nav{position:fixed;display:flex;justify-content:space-around;align-items:center;bottom:0;left:0;right:0;height:calc(65px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid #e2e9ea;box-shadow:0 -6px 25px #132e3812;z-index:20}.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;flex:1;height:57px;gap:3px;border:0;background:none;color:#91a1a9;font-size:9px;font-weight:650}.bottom-nav button span{font-size:20px;line-height:22px}.bottom-nav button.active{color:#17816b}.bottom-nav button.active span{background:#e6f4ed;border-radius:10px;min-width:39px;text-align:center}.modal-backdrop{padding:0;align-items:flex-end}.modal{width:100%;max-height:90dvh;border-radius:22px 22px 0 0;padding:21px 18px calc(24px + env(safe-area-inset-bottom))}.form-grid{grid-template-columns:1fr}.mobile-only{display:block}.section-spacer{margin-top:21px}.handover-steps{gap:6px}.handover-step{padding:9px 6px}.handover-step span{font-size:9px}.inline-actions .btn{flex:1}.filter-tabs{overflow:auto}.filter-tabs button{white-space:nowrap}.toast{bottom:calc(77px + env(safe-area-inset-bottom));width:max-content;max-width:90vw;text-align:center}}
@media(max-width:380px){.people-grid{grid-template-columns:1fr}.person-card{min-height:unset}.metric{padding:12px}.metric .value{font-size:24px}.panel{padding:13px}.bottom-nav button{font-size:8px}}

/* iPhone-first refinements: 390–430 pt layouts, safe areas, installable PWA. */
:root { --ios-green:#176f5b; --ios-ink:#122d3b; }
html { -webkit-text-size-adjust:100%; overscroll-behavior-y:none; }
button,select,input,textarea { -webkit-tap-highlight-color:transparent; }
button { touch-action: manipulation; }
.mobile-controls,.mobile-page-heading { display:none; }
@media(max-width:720px){
  body { background:#f5f8f8; -webkit-font-smoothing:antialiased; }
  .desktop-shell { padding-bottom:calc(88px + env(safe-area-inset-bottom)); }
  .main-area { min-height:100dvh; }
  .mobile-banner { background:linear-gradient(130deg,#0b2c3d,#194a48);padding:calc(11px + env(safe-area-inset-top)) 17px 12px;min-height:calc(66px + env(safe-area-inset-top)); }
  .mobile-brand { display:flex; align-items:center; gap:10px; min-width:0; }
  .mobile-brand-logo { display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;border-radius:12px;background:#23846d;color:#d9fff0;font-size:25px;box-shadow:inset 0 0 0 1px #ffffff33; }
  .mobile-brand strong { display:block;font-size:15px;letter-spacing:1px; }
  .mobile-brand span:not(.mobile-brand-logo) { display:block;margin:5px 0 0;color:#a5e2ce;letter-spacing:2px;font-size:10px;font-weight:700; }
  .mobile-brand em {font-size:9px;font-style:normal;color:#8bb8b1;letter-spacing:.7px}
  .mobile-controls { display:flex;align-items:center;gap:7px; }
  .install-button { background:#ffffff16;border:1px solid #ffffff26;color:#e6fff4;border-radius:12px;min-width:43px;height:43px;padding:5px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:19px;line-height:1; }
  .install-button span {font-size:8px;margin-top:3px;color:#bbdcd3}
  .mobile-role select { height:43px;font-size:12px;max-width:116px; }
  .mobile-page-heading {display:flex;flex-direction:column;align-items:flex-start;gap:5px;background:#123b43;color:#fff;padding:12px 18px 18px;position:relative; }
  .mobile-page-heading:after{content:'';position:absolute;bottom:-13px;left:0;right:0;height:19px;border-radius:17px 17px 0 0;background:#f5f8f8}
  .mobile-page-caption{font-size:9px;color:#99c8c3;letter-spacing:1.8px;font-weight:780}
  .mobile-page-heading h2{font-size:22px;font-weight:790;margin:2px 0 0;letter-spacing:-.4px}
  #mobileTodayDate{font-size:11px;color:#b1d9cf}
  .app-content{padding:15px 15px 28px}
  .demo-alert {border-radius:15px;line-height:1.5;margin:0 0 18px;padding:10px 11px}
  .demo-alert p {font-size:11px}
  .section-head{align-items:flex-start;flex-wrap:wrap}
  .section-head h2 {font-size:17px;line-height:1.25}
  .section-head .btn {min-height:43px;max-width:100%}
  .btn {min-height:44px;border-radius:12px;font-size:13px;white-space:normal;text-align:center}
  .btn.sm {min-height:39px;font-size:12px}
  .metric{border-radius:17px;box-shadow:0 3px 18px #113a3c07;min-height:119px;padding:15px 13px}
  .metric .value{font-size:31px}
  .metric .kicker{font-size:11px}
  .metric .detail{font-size:10px;line-height:1.35}
  .panel{border-radius:17px;padding:17px 15px}
  .panel h3{font-size:15px}
  .line-item strong,.task-row .task-title{font-size:13px}
  .line-item small,.task-row .task-info{font-size:11px;line-height:1.5}
  .task-row input[type=checkbox]{width:23px;height:23px;flex-shrink:0}
  .person-card {min-height:152px;border-radius:16px;padding:14px 12px}
  .person-name{font-size:13px}
  .person-card p{font-size:11px;line-height:1.45}
  .input,.select,.textarea,.form-field input,.form-field select,.form-field textarea {font-size:16px !important;min-height:46px}
  .textarea {min-height:120px}
  .bottom-nav {height:calc(68px + env(safe-area-inset-bottom));padding:3px 7px env(safe-area-inset-bottom);background:#fffefa;box-shadow:0 -7px 22px #071f2420;gap:2px;}
  .bottom-nav button {height:62px;font-size:10px;line-height:1.1;gap:5px;min-width:0;border-radius:11px;padding:4px 0 3px;}
  .bottom-nav button span {font-size:22px;line-height:27px}
  .bottom-nav button.active{font-weight:800;color:#136c59}
  .bottom-nav button.active span{background:#e5f4ed;border-radius:11px;min-width:44px;}
  .modal-backdrop{z-index:120;padding:0;align-items:flex-end}
  .modal{width:100%;max-height:min(92dvh,100%);border-radius:23px 23px 0 0;padding:20px 17px calc(25px + env(safe-area-inset-bottom));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  .modal:before{content:'';width:36px;height:5px;background:#cfd9db;border-radius:6px;display:block;margin:-11px auto 18px;}
  .modal-head h2{font-size:19px}
  .modal-head button{min-width:44px;min-height:44px;font-size:20px}
  .form-actions{gap:8px;flex-wrap:wrap}
  .form-actions .btn{flex:1}
  .toast{bottom:calc(83px + env(safe-area-inset-bottom));font-size:13px}
  .handover-steps{margin-bottom:13px}
  .handover-step b{font-size:22px}
  .filter-tabs button{min-height:41px;font-size:12px}
  .report{font-size:12px;overflow-wrap:anywhere}
}
@media(max-width:380px){
  .people-grid{grid-template-columns:1fr 1fr;gap:8px}
  .person-card{min-height:150px}
  .metric .value{font-size:27px}
  .mobile-role select{max-width:100px}
  .install-button{width:40px}
  .install-button span{display:none}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}

.static-info{display:flex;flex-direction:column;gap:5px;background:#ecf4fa;border:1px solid #cadfe9;border-radius:14px;padding:13px 15px;margin:0 0 16px;color:#315a70;font-size:12px;line-height:1.5}.static-info strong{color:#18485f;font-size:13px}.preview-static{display:block}@media(max-width:720px){.static-info{font-size:11px}}

.quick-check{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 20px}
.quick-check span{font-size:11px;color:#668084}
@media(max-width:720px){.quick-check .btn{width:100%}.quick-check span{display:block;width:100%;text-align:center}}

/* v1.3 — resident-specific deadlines and overdue visibility */
:root{--due-danger:#bf303e;--due-danger-bg:#fff0f1;--due-danger-border:#f2b9c0;--due-amber:#9b6415}
.badge.red{background:#ffe6e9;color:#b32036;border:1px solid #f5c4cb;font-weight:800}
.badge.green{background:#e7f6ee;color:#15724a}
.task-row.task-deadline{align-items:center;gap:11px;padding:14px 11px;margin:0 -11px;border-radius:12px;min-width:0}
.task-row.task-deadline .task-main{min-width:0}
.task-row.task-deadline.overdue{background:var(--due-danger-bg);border:1px solid var(--due-danger-border);margin:5px -11px;box-shadow:inset 4px 0 var(--due-danger)}
.task-row.task-deadline.overdue .task-title{color:#9e2535}
.task-row.task-deadline.due-today{background:#fff9eb;box-shadow:inset 3px 0 #e7b757}
.task-row.task-deadline.done{opacity:.73}
.deadline-line{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:8px;font-size:11px;font-weight:700;color:#51747b}
.deadline-line .badge{font-size:10px}
.deadline-red{color:var(--due-danger)!important;font-weight:800!important}
.deadline-amber{color:var(--due-amber)!important}
.edit-task-btn{font-size:16px;font-weight:750}
.task-row .task-actions .icon-action{height:33px;min-width:32px}
.person-card.person-overdue{background:linear-gradient(160deg,#fff8f8 0%,#fff 90%);border:2px solid var(--due-danger-border);box-shadow:0 2px 0 #f9e5e5}
.person-card.person-overdue .person-avatar{background:#ffe3e6;color:#ac2534}
.person-card.person-overdue .person-name{color:#a51d32}
.resident-deadline{margin-top:10px}
.resident-next-due{font-size:10px;line-height:1.5;color:#57727c;display:block;margin-top:8px}
.overdue-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:-6px 0 16px}
.overdue-help{font-size:11px;color:#79919a}
.resident-task-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.resident-task-heading h3{margin:0}
.resident-tasks{padding:2px 11px;border:1px solid #e8eef0;border-radius:12px}
.deadline-overview{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#fff2f2,#fffaf9);border:1px solid #f5cdd1;border-radius:16px;padding:13px 16px;margin-bottom:18px}
.deadline-overview-number{font-size:34px;font-weight:850;color:#b32338;line-height:1;min-width:32px}
.deadline-overview>div{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.deadline-overview strong{font-size:13px;color:#8d2634}
.deadline-overview small{font-size:11px;color:#9e646b;line-height:1.4}
.late-stat{color:#ac2035}.late-stat strong{color:#b32338}
.task-list-panel{padding-left:25px;padding-right:25px}
@media(max-width:720px){
 .task-list-panel{padding:12px 19px}
 .task-row.task-deadline{padding:12px 8px;margin:0 -8px;gap:9px}
 .task-row.task-deadline.overdue{margin:5px -8px}
 .task-row.task-deadline .task-main{min-width:0}
 .task-row.task-deadline .task-title{overflow-wrap:anywhere}
 .task-row.task-deadline .task-actions{flex-direction:column;gap:4px}
 .task-row.task-deadline .task-actions .icon-action{min-width:34px;min-height:32px}
 .deadline-line{font-size:11px;gap:6px}
 .person-card.person-overdue{border-width:2px}
 .resident-next-due{font-size:10px}
 .resident-task-heading .badge{max-width:52%;white-space:normal}
 .deadline-overview{padding:12px;gap:9px}
 .deadline-overview-number{font-size:30px}
 .deadline-overview strong{font-size:12px}
 .deadline-overview small{font-size:10px}
 .deadline-overview .btn{padding:9px 10px;min-height:38px}
 .overdue-toolbar .btn{min-height:42px}
}
.deadline-history{font-size:10px;margin-top:6px;color:#916d4e}
.deadline-history-log{margin-top:13px;border-top:1px solid #e5eaec;padding-top:10px;font-size:11px;color:#667c85;line-height:1.5}
.deadline-history-log strong{color:#3c5562}.deadline-history-log p{border-bottom:1px solid #f1f3f4;padding-bottom:6px}


/* v2.0 staff-only paper workflow, clear separated overdue counters */
.workflow-alert{display:flex;flex-direction:column;gap:7px;padding:15px 17px;background:#eaf4ef;border:1px solid #c2e2d3;border-radius:16px;margin:0 0 19px;color:#194e43;font-size:12px;line-height:1.55}
.workflow-alert b{font-size:14px}
.attention-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 19px}
.attention-card{background:#fff;border:1px solid #dbe7e6;border-radius:16px;min-width:0;padding:16px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;color:#193843;cursor:pointer;box-shadow:0 5px 15px #1139400d}
.attention-card.selected{outline:2px solid #1d7664;background:#f2fbf7}
.attention-card b{font-size:31px;line-height:1.1;font-weight:860;letter-spacing:-1px}
.attention-card b.red-ink{color:#b42338}
.attention-card span{font-size:13px;font-weight:750}
.attention-card small{font-size:10px;color:#71838a;line-height:1.4}
.workflow-filters{display:flex;flex-wrap:nowrap;overflow:auto;gap:7px;scrollbar-width:none;margin:0 0 15px;padding:2px 0 6px}
.workflow-filters button{flex-shrink:0}
.staff-task-card{display:block!important}
.task-type{font-size:10px;letter-spacing:.9px;color:#66848a;font-weight:800;margin-bottom:6px}
.staff-task-card .task-title{font-size:14px;line-height:1.5;font-weight:780}
.staff-task-card .task-controls{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}
.staff-task-card .task-controls .btn{min-height:38px;font-size:12px}
.staff-tick{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:650;padding:5px 7px;border-radius:9px;background:#edf6f2;min-height:37px}
.staff-tick input{width:19px;height:19px;accent-color:#197c64}
.workflow-note{font-size:11px;color:#825d20;margin-top:7px;font-weight:700}
.audit-history{margin-top:18px;border-top:1px solid #e1e9ea;padding-top:14px}
.audit-history h4{margin:0 0 12px;font-size:14px}
.audit-entry{border-left:2px solid #b5dacc;margin-left:5px;padding:0 0 13px 14px;display:flex;gap:3px;flex-direction:column}
.audit-entry span{color:#8599a0;font-size:11px}
.audit-entry strong{font-size:12px;color:#224b50}
.audit-entry small{font-size:11px;color:#72838c;line-height:1.5}
.control-line{display:flex;gap:13px;align-items:center;justify-content:space-between;border:0;border-bottom:1px solid #e8eef0;background:transparent;width:100%;min-height:54px;color:inherit;text-align:left;font-size:13px;cursor:pointer}
.control-line span:first-child{flex:1}
.control-line b{font-size:19px;color:#b42338}
.revision-fields[hidden]{display:none!important}
.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:720px){.attention-grid{gap:7px}.attention-card{padding:12px 9px;border-radius:13px}.attention-card b{font-size:26px}.attention-card span{font-size:11px;line-height:1.25}.attention-card small{font-size:9px}.workflow-filters{margin-right:-15px;padding-right:15px}.staff-task-card .task-controls .btn{flex:1 1 auto}.summary-grid b{font-size:22px}.summary-grid span{font-size:10px}}
@media(max-width:365px){.attention-card{padding:10px 7px}.attention-card b{font-size:23px}.attention-card small{display:none}}

/* RECOVERY STAFF AI v3 — shared layout modes (tablet and laptop are locally simulated until backend is configured) */
.command-header{background:linear-gradient(130deg,#102f3f,#164c4b);border-radius:20px;padding:24px 27px;color:white;display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:12px}
.command-eyebrow{font-size:10px;letter-spacing:1.6px;color:#9dd3c5;font-weight:800}
.command-header h2{font-size:25px;margin:9px 0;letter-spacing:-.7px}.command-header p{font-size:12px;color:#c0d5d3;margin:0;line-height:1.6}
.command-header-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:430px}
.command-live-status{display:flex;align-items:center;gap:9px;background:#ecf7f1;border:1px solid #cbe7d9;border-radius:12px;color:#315e53;font-size:11px;line-height:1.45;padding:11px 15px;margin:13px 0 15px}
.command-live-status>span:nth-child(3){flex:1}.command-live-status b{white-space:normal}.command-clock{font-variant-numeric:tabular-nums;font-size:14px;color:#245c4e;font-weight:850}.signal-dot{width:9px;height:9px;border-radius:50%;background:#2b987c;box-shadow:0 0 0 4px #c7e9da;flex-shrink:0}
.command-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:20px}.command-metric{background:#fff;border:1px solid #e1e9ec;padding:15px 12px;border-radius:15px;display:flex;flex-direction:column;gap:7px;min-width:0}.command-metric small{color:#75909a;font-size:10px;line-height:1.3}.command-metric strong{font-size:27px;line-height:1.1;color:#1c4050;letter-spacing:-.8px}.command-metric span{font-size:10px;color:#8197a0;line-height:1.3}.command-metric.critical{background:#fff1f2;border-color:#f2c8cc}.command-metric.critical strong{color:#b0283b}.command-metric.warn strong{color:#a97824}
.command-layout{display:grid;grid-template-columns:1.23fr 1.06fr .78fr;gap:16px;align-items:start}.command-col{min-width:0}.command-panel-head{display:flex;justify-content:space-between;gap:9px;align-items:center;margin:13px 0 9px}.command-panel-head:first-child{margin-top:0}.command-panel-head h3{font-size:15px;letter-spacing:-.2px;margin:0}.command-panel{padding:14px 19px}.command-panel .task-row.task-deadline{margin:0 -5px;padding:11px 5px}.command-panel .task-row.task-deadline.overdue{margin:5px -5px}.control-queue-head{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:11px;line-height:1.4;color:#687e87;padding:3px 0 13px}.control-queue-head span{max-width:190px}
.command-event{display:flex;gap:11px;padding:13px 0;border-bottom:1px solid #eef2f3}.command-event:last-child{border-bottom:0}.event-icon{width:30px;height:30px;border-radius:9px;background:#e8f6ee;color:#167d61;display:grid;place-items:center;flex-shrink:0;font-weight:800}.event-icon.handover{background:#e9f1fc;color:#45668d}.event-icon.schedule{background:#fff4df;color:#a97e36}.event-text{display:flex;flex-direction:column;gap:4px;min-width:0}.event-text strong{font-size:12px}.event-text small{color:#71848f;line-height:1.45;font-size:11px;overflow-wrap:anywhere}.event-text span{color:#94a5af;font-size:10px}
.control-select{background:#fff;border:1px solid #d8e6e5;border-radius:10px;padding:9px 8px;font-size:11px;max-width:145px}.command-staff{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 0;border-bottom:1px solid #e8eeee}.command-staff:last-child{border-bottom:0}.command-staff>div{display:flex;flex-direction:column;gap:5px}.command-staff strong{font-size:12px}.command-staff small{color:#8597a1;font-size:10px}.command-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.command-shortcuts .btn{white-space:normal;padding:12px 6px;min-height:48px}.control-privacy{padding:15px;background:#fff8e8;border:1px solid #f0dec1;border-radius:13px;color:#82662f;font-size:11px;line-height:1.5;margin-top:14px}.control-privacy p{margin:7px 0 0}.control-handover{border-bottom:1px solid #e3ecee;padding:8px 0 14px}.control-handover:last-child{border:0;padding-bottom:0}.control-handover strong{font-size:12px}.control-handover p{font-size:11px;line-height:1.5;color:#6f8690}
.schedule-row{display:flex;gap:12px;border-bottom:1px solid #edf1f3;padding:13px 0;align-items:center}.schedule-row:last-child{border:0}.schedule-clock{font-size:13px;font-weight:850;color:#286754;min-width:69px}.schedule-clock small{display:block;color:#8fa0a5;font-weight:450;font-size:10px;margin-top:4px}.schedule-row-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}.schedule-row-main strong{font-size:12px}.schedule-row-main small{font-size:10px;color:#8a9da5}.schedule-row-main p{font-size:11px;color:#687985}.schedule-row-actions{display:flex;flex-direction:column;align-items:end;gap:6px}.schedule-late .schedule-clock{color:#b02940}.control-disclaimer{font-size:11px;line-height:1.6;color:#7f703e;background:#fff7e5;padding:13px;border-radius:13px;margin-bottom:15px;border:1px solid #f2dfb8}.mobile-control-link{display:none}
@media(min-width:1500px){.desktop-shell{max-width:1920px}.app-content{max-width:1590px}.command-layout{grid-template-columns:1.2fr 1fr .85fr}}
@media(min-width:721px) and (max-width:1360px){.command-metrics{grid-template-columns:repeat(3,1fr)}.command-layout{grid-template-columns:1fr 1fr}.staff-col{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 15px}.staff-col .command-panel-head{margin-top:0}.staff-col .control-privacy{grid-column:1/-1}}
@media(min-width:721px) and (max-width:990px){.command-layout{grid-template-columns:1fr}.staff-col{grid-column:auto;display:block}}
@media(max-width:720px){.mobile-control-link{display:block;margin:0 0 16px}.command-header{padding:19px;display:block;border-radius:15px}.command-header h2{font-size:21px}.command-header-actions{margin-top:14px;justify-content:start;max-width:none}.command-header-actions .btn{flex:1 1 45%}.command-live-status{flex-wrap:wrap;padding:10px}.command-live-status>span:nth-child(3){flex:1 1 70%}.command-metrics{grid-template-columns:repeat(2,1fr);gap:8px}.command-metric{padding:12px}.command-metric strong{font-size:25px}.command-layout{display:block}.command-col{margin-bottom:18px}.command-panel{padding:12px}.command-shortcuts{grid-template-columns:repeat(2,1fr)}.schedule-row{gap:7px;flex-wrap:wrap}.schedule-clock{min-width:60px}.schedule-row-actions{flex-direction:row;margin-left:auto}.command-header-actions .btn{white-space:normal}}

/* v4: two types of resident assignments, issuance and acceptance on mobile/tablet */
.assignment-category-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}
.assignment-category{background:#fff;border:1px solid #deebea;border-radius:17px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;padding:17px 18px;cursor:pointer;box-shadow:0 4px 15px #122d3110;color:#24414c}
.assignment-category.selected{border-color:#23876e;background:linear-gradient(140deg,#effaf4,#f5fcf9);box-shadow:0 0 0 1px #23876e40}
.assignment-category>span{font-size:10px;font-weight:800;color:#298569;letter-spacing:1.2px}
.assignment-category strong{font-size:16px;line-height:1.25}
.assignment-category small{font-size:11px;color:#77919a}
.workflow-steps-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 17px}
.workflow-steps-tabs button{background:#e9f0f1;border:1px solid transparent;border-radius:11px;padding:11px 13px;color:#54727a;font-size:12px;font-weight:750;cursor:pointer;min-height:44px}
.workflow-steps-tabs button.active{background:#1c6d5d;color:#fff}
.workflow-steps-tabs button span{display:inline-flex;align-items:center;justify-content:center;margin-left:5px;font-size:10px;background:#ffffff38;border-radius:8px;padding:2px 5px}
.assignment-actionbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:12px 0 13px}
.assignment-actionbar h3{font-size:16px;margin:0 0 6px;color:#214750}
.assignment-actionbar p{font-size:12px;color:#718991;margin:0;line-height:1.5}
.assignment-actionbar .btn{white-space:normal;flex-shrink:0}
.assignment-quick-stats{display:flex;gap:5px;flex-wrap:wrap}
.assignment-period{font-size:11px;margin-top:9px;color:#5a7880;line-height:1.5}
.assignment-period strong{color:#234a50}
.revision-callout{margin-top:10px;padding:11px 13px;background:#fff3e5;border:1px solid #f2d6ab;border-radius:12px;font-size:12px;color:#725026;line-height:1.5}
.revision-callout p{margin:5px 0 3px;overflow-wrap:anywhere}
.revision-callout small{color:#946b38}
.resident-categories{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0 4px;color:#779198;font-size:10px}
.resident-categories span{border-radius:6px;background:#edf3f3;padding:4px 7px}
.resident-section-subtitle{margin-top:26px}
.acceptance-summary{background:#edf6f3;border:1px solid #d1e9df;border-radius:14px;padding:16px;margin-bottom:15px;line-height:1.6}
.acceptance-summary strong{display:block;color:#204c43;font-size:15px}
.acceptance-summary span{font-size:11px;color:#588377}
.acceptance-summary p{font-size:14px;margin:8px 0;overflow-wrap:anywhere;color:#244750}
.acceptance-summary small{font-size:11px;color:#647e7d}
.partial-fields[hidden]{display:none!important}
.partial-fields{background:#fff8ed;border:1px solid #f0ddbe;padding:14px;border-radius:14px;margin:12px 0}
.staff-side-link{margin-top:16px}
@media(max-width:720px){
.assignment-category-tabs{gap:7px}.assignment-category{padding:13px 12px;border-radius:13px}.assignment-category strong{font-size:14px}.assignment-category small{font-size:10px}
.workflow-steps-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.workflow-steps-tabs button{padding:11px 8px;font-size:11px}.workflow-steps-tabs button:last-child{grid-column:span 2}
.assignment-actionbar{align-items:stretch;flex-direction:column;gap:11px}.assignment-actionbar .btn{width:100%}
.assignment-quick-stats{align-items:flex-start}
}

/* v5 info board */
.board-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.board-scroll{overflow:auto;border:1px solid rgba(18,67,69,.08);border-radius:20px;background:#fff}
.info-board-table{border-collapse:collapse;width:100%;min-width:1480px;font-size:13px}
.info-board-table th,.info-board-table td{padding:10px 12px;border-bottom:1px solid #e7efec;vertical-align:top;text-align:left;white-space:normal}
.info-board-table thead th{position:sticky;top:0;background:#f7faf9;z-index:1;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#5d7779}
.info-board-table td.late{background:#fff2f1;color:#9b332b;font-weight:700}
.mobile-board{display:none;gap:14px;flex-direction:column}
.board-card{background:#fff;border:1px solid rgba(18,67,69,.08);border-radius:22px;padding:16px 16px 14px;box-shadow:0 12px 36px rgba(18,67,69,.06)}
.board-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.board-card-head h3{margin:0 0 4px;font-size:18px}
.board-grid-mobile{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.board-grid-mobile>div{background:#f8fbfa;border-radius:14px;padding:10px 12px}
.board-grid-mobile .board-wide{grid-column:1/-1}
.board-grid-mobile label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#70888a;margin-bottom:5px}
.board-cell{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.board-cell strong{font-size:14px;line-height:1.4}
.board-cell small{display:block;color:#6c8788;white-space:nowrap}
.board-cell.late strong,.board-cell.late small{color:#a0372f}
.board-cell.important strong{font-weight:800}
@media (max-width: 980px){.board-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 860px){.desktop-board{display:none}.mobile-board{display:flex}}
@media (max-width: 640px){.board-overview{grid-template-columns:1fr}.board-grid-mobile{grid-template-columns:1fr}.board-card-head{flex-direction:column}.board-card-head .inline-actions{width:100%}}

/* RECOVERY STAFF v6 — постоянно видимые уведомления и семейные встречи */
.attention-center{margin:0 0 22px;border:1px solid #dce8e5;background:#fff;border-radius:22px;padding:20px;box-shadow:0 12px 32px rgba(17,67,67,.07)}
.attention-title{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:13px}
.attention-title h2{margin:4px 0 5px;font-size:22px;letter-spacing:-.5px;color:#152e35}
.attention-title p{font-size:13px;margin:0;line-height:1.5;color:#647b7e}
.attention-kicker{font-size:10px;letter-spacing:1.35px;color:#2d806c;font-weight:800}
.attention-count{font-size:14px;background:#fbece8;color:#aa342f;padding:3px 9px;vertical-align:middle;border-radius:20px}
.attention-tools{display:flex;gap:8px;flex-wrap:wrap;flex-shrink:0}
.attention-totals{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.attention-totals span{padding:7px 10px;border-radius:20px;background:#eff5f3;color:#345e61;font-size:12px;font-weight:700}
.attention-totals .attention-total-red{background:#fff0ee;color:#b13730}
.attention-family-block{border-radius:18px;background:#f0f6fb;border:1px solid #d5e6f1;margin-bottom:13px;padding:12px}
.attention-family-block>strong{display:block;font-size:12px;letter-spacing:.02em;color:#245b83;margin-bottom:10px}
.attention-feed{display:grid;gap:9px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.attention-card{background:#f9fcfb;border:1px solid #dfebe7;border-left:4px solid #83b6a7;padding:13px 14px;border-radius:14px;min-width:0}
.attention-card.attention-critical{background:#fff5f3;border-color:#f2d1cb;border-left-color:#e25145}
.attention-card.attention-issue{background:#fff9ee;border-color:#efe0bf;border-left-color:#d8a343}
.attention-card.attention-soon{background:#f6fbf9;border-left-color:#2f9e88}
.attention-card.attention-family{background:#eaf5fc;border-color:#c4dfef;border-left-color:#2778a9}
.attention-card.attention-family.attention-critical{border-left-color:#e25145;background:#fff3f1}
.attention-head{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-bottom:8px}
.attention-pill{font-size:10px;letter-spacing:.5px;font-weight:900;color:#277d68}
.attention-critical .attention-pill{color:#b43b32}
.attention-issue .attention-pill{color:#98701d}
.attention-family .attention-pill{color:#2778a9}
.attention-time{font-size:11px;color:#667f82;text-align:right;white-space:nowrap}
.attention-card h3{font-size:14px;margin:0 0 6px;color:#18353a;font-weight:800;line-height:1.4}
.attention-card p{font-size:12px;color:#637b7d;line-height:1.45;margin:0 0 11px}
.attention-actions{display:flex;flex-wrap:wrap;gap:7px}
.attention-actions .btn{font-size:11px;min-height:34px;padding:7px 10px}
.attention-clear{padding:16px;background:#f3faf5;border-radius:12px;color:#2b7665;font-size:13px}
.attention-footnote{color:#7b9090;font-size:11px;line-height:1.5;margin:13px 0 0}
.board-cell.completed strong,.board-cell.completed small{color:#287f66}
@media(max-width:760px){.attention-center{padding:15px 12px;margin-bottom:16px;border-radius:18px}.attention-title{flex-direction:column;gap:11px}.attention-title h2{font-size:21px}.attention-tools{width:100%}.attention-tools .btn{flex:1}.attention-feed{grid-template-columns:1fr}.attention-time{white-space:normal}.attention-card{padding:13px 12px}.attention-totals span{font-size:11px}}

/* RECOVERY STAFF AI v7 — ten working operational modules */
.module-launch{margin:18px 0 22px}
.launch-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.launch-tile{appearance:none;border:1px solid #e0ebe8;border-radius:17px;background:#fff;padding:14px 12px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;box-shadow:0 5px 20px rgba(24,67,64,.035);min-width:0}
.launch-tile:hover{border-color:#9acdbd;background:#f6fcf9}
.launch-icon{background:#e9f5ee;color:#236e5c;width:35px;min-width:35px;height:35px;display:grid;place-items:center;border-radius:11px;font-size:21px}
.launch-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.launch-text strong{font-size:13px;color:#173f43}.launch-text small{font-size:11px;color:#698087;line-height:1.3}.launch-arrow{color:#9db2b1}
.quick-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 16px}.stack-cards{display:grid;gap:12px}
.brief-card{background:#fff;border:1px solid #e0eae8;border-radius:20px;padding:17px 18px;box-shadow:0 7px 26px rgba(19,58,56,.04)}
.brief-card h3{font-size:17px;color:#153f40;margin:9px 0 6px}.brief-card p{font-size:13px;color:#526f76;line-height:1.55;margin:6px 0}.brief-card small{color:#607d83;font-size:11px}.brief-card .inline-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.brief-card.brief-danger{border-left:4px solid #c6463b;background:#fffafa}.brief-top{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#3b7375;font-weight:700;font-size:12px}
.oversight-list{display:grid;gap:5px;margin:13px 0}.check-point{font-size:12px;background:#f5f8f8;border-radius:9px;padding:8px 10px;line-height:1.4;color:#557177}.check-point.critical{color:#a12c2c;background:#fff0f0}.check-point.review{background:#fff8e5;color:#865a1a}.check-point.info,.check-point.good{background:#e8f6f0;color:#1b7459}
.profile-board{display:grid;gap:7px;margin:10px 0}.profile-board>div{background:#f6faf9;padding:9px 12px;border-radius:10px;font-size:13px;line-height:1.5}
.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}.calendar-days{display:grid;gap:10px}.calendar-day{background:#fff;border:1px solid #e2ebea;border-radius:16px;padding:15px}.calendar-day.calendar-current{border-color:#83bda8;background:#f7fcf9}.calendar-day-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.calendar-day-head strong{font-size:15px}.calendar-empty{font-size:12px;color:#829899}.cal-event{width:100%;display:flex;align-items:center;gap:12px;border:0;border-left:3px solid #92c7bb;background:#f3f9f7;border-radius:9px;text-align:left;padding:10px 13px;margin:5px 0;cursor:pointer}.cal-event small{color:#518276;min-width:95px}.cal-event strong{font-size:13px;color:#174644;flex:1;line-height:1.35}.cal-event span{color:#518276}.cal-event.late{border-left-color:#cf4d44;background:#fff3f2}.cal-event.completed{opacity:.65}
.filterbar{display:flex;align-items:center;gap:9px;margin:12px 0 18px}.filterbar .select,.filterbar .input{max-width:420px}.dyn-bar-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(60px,3fr) 28px;gap:10px;align-items:center;font-size:12px;margin:12px 0}.dyn-bar-row>div{background:#eaf1ef;border-radius:100px;height:10px;overflow:hidden}.dyn-bar-row i{height:100%;display:block;background:#2a9176;border-radius:100px;min-width:2px}
.resource-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.resource-card{border:1px solid #e2ece8;border-radius:18px;background:#fff;padding:17px}.resource-tag{font-size:10px;color:#297e67;text-transform:uppercase;letter-spacing:.045em;font-weight:800}.resource-card h3{font-size:16px;color:#184447;margin:10px 0 8px}.resource-card p{font-size:12px;color:#658187;line-height:1.6;min-height:57px}.resource-card .inline-actions{margin-top:14px;display:flex;flex-wrap:wrap;gap:6px}
.report{white-space:pre-wrap;word-break:break-word;max-height:52vh;overflow:auto;background:#f3f7f6;border:1px solid #e0e9e7;border-radius:12px;padding:16px;color:#20444b;font-size:13px;line-height:1.65}
#modalBody .report{max-height:50vh}
@media(max-width:1340px){.launch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:830px){.launch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.resource-grid{grid-template-columns:1fr}}
@media(max-width:530px){.launch-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.launch-tile{padding:12px 9px;gap:7px}.launch-icon{width:29px;min-width:29px;height:29px;font-size:18px}.launch-text strong{font-size:12px}.launch-text small{font-size:10px}.brief-card{padding:14px}.filterbar{flex-direction:column;align-items:stretch}.filterbar .select,.filterbar .input{max-width:none}.cal-event{flex-wrap:wrap;gap:3px 8px}.cal-event small{width:100%;min-width:0}.cal-event span{margin-left:auto}}


/* v8 — fewer choices, shorter paths, consistently visible priorities */
.visually-hidden{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.nav-subheading{font-size:10px;letter-spacing:.11em;color:#90a1aa;padding:22px 15px 8px;font-weight:800}
.side-group{margin:3px 0;border-radius:11px;overflow:hidden}
.side-group>summary{padding:12px 14px;list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;color:#b8c9cc;font-size:12px;font-weight:720}
.side-group>summary::-webkit-details-marker{display:none}
.side-group>summary span{font-size:16px;opacity:.7;transition:transform .2s}
.side-group[open]>summary span{transform:rotate(180deg)}
.side-group-items{padding:2px 0 7px 11px}
.side-group-items .nav-btn{font-size:12px;min-height:38px;margin:1px 0}
.side-group-items .nav-icon{font-size:16px}
.simple-home-head{margin:0 0 15px}
.home-eyebrow,.hub-eyebrow{font-weight:820;letter-spacing:.12em;color:#24816c;font-size:10px;margin-bottom:6px}
.simple-home-head h2,.hub-intro h2{font-size:27px;line-height:1.15;letter-spacing:-.7px;margin:0 0 7px;color:#163c42}
.simple-home-head p,.hub-intro p{font-size:13px;line-height:1.55;color:#58747b;margin:0}
.home-search-box{margin-bottom:16px;position:relative}
.home-search-box>label{font-size:12px;font-weight:740;display:block;margin-bottom:6px;color:#314e53}
.search-line,.hub-search-wrap{display:flex;align-items:center;border:1px solid #d1e2df;gap:8px;background:#fff;border-radius:14px;padding:0 11px;box-shadow:0 3px 13px #102d3210}
.search-line>span,.hub-search-wrap>span{font-size:25px;color:#1c7965;line-height:1}
.search-line input,.hub-search-wrap input{width:100%;box-shadow:none;border:0;background:transparent;padding:12px 4px;min-width:0;min-height:48px;outline:0}
.resident-search-results{margin-top:6px;background:#fff;border:1px solid #dbe7e4;border-radius:14px;overflow:hidden;box-shadow:0 9px 24px #14393d13}
.resident-search-results[hidden]{display:none}
.resident-search-result{display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;background:#fff;color:#173a40;text-align:left;border:0;border-bottom:1px solid #eff3f2;min-height:63px}
.resident-search-result span:nth-child(2){flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.resident-search-result small{font-size:11px;color:#819598}
.resident-result-avatar{width:34px;height:34px;border-radius:10px;background:#e4f3eb;color:#19745e;display:grid;place-items:center;font-weight:850;flex-shrink:0}
.search-no-result{padding:13px;color:#6b8589;font-size:12px}
.quick-start{margin:0 0 18px}
.quick-start-title{font-size:13px;font-weight:800;color:#1b3e44;margin:0 0 9px}
.quick-start-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.quick-start-grid button{display:flex;align-items:center;gap:9px;text-align:left;background:#fff;border:1px solid #e0ece9;border-radius:14px;min-height:67px;padding:11px;color:#21444b;box-shadow:0 3px 12px #112d3210}
.quick-start-grid button span{display:grid;place-items:center;width:33px;height:33px;background:#e8f5ef;color:#177960;border-radius:10px;font-size:21px;flex-shrink:0}
.quick-start-grid button strong{font-size:12px;line-height:1.3}
.home-simple-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:17px 0}
.home-simple-links button{background:#fff;border:1px solid #e4ebe8;border-radius:14px;padding:14px;display:grid;grid-template-columns:auto 1fr auto;gap:4px 8px;text-align:left;align-items:center;color:#1f5555;font-size:18px}
.home-simple-links strong{font-size:13px;color:#21444b}
.home-simple-links small{grid-column:2;color:#71868b;font-size:11px}
.home-simple-links span{grid-column:3;grid-row:1/3;color:#7e9b98;font-size:25px}
.home-secondary{background:#fff;border-radius:15px;border:1px solid #e3eeeb;padding:15px;margin:15px 0}
.home-secondary>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:10px;font-size:13px;font-weight:800;color:#24484b}
.home-secondary>summary::-webkit-details-marker{display:none}
.home-secondary .metric-grid{margin:15px 0}
.home-secondary-buttons{display:flex;flex-wrap:wrap;gap:8px}
.home-secondary-buttons .btn{flex:1}
.hub-intro{margin-bottom:16px}
.hub-search-wrap{margin-bottom:21px}
.hub-group{margin:0 0 19px}
.hub-group-head{margin-bottom:10px}
.hub-group-head h3{color:#163c42;font-size:17px;margin:0 0 3px}
.hub-group-head small{color:#748b8e;font-size:12px}
.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hub-tile{display:flex;align-items:center;gap:10px;padding:15px;border-radius:15px;border:1px solid #e1eae8;background:#fff;text-align:left;min-width:0;min-height:76px;box-shadow:0 3px 14px #0f292e0b}
.hub-tile-icon{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;background:#edf6f2;color:#1c7965;font-size:24px}
.hub-tile-copy{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.hub-tile-copy strong{color:#163e43;font-size:13px}
.hub-tile-copy small{color:#738b8e;font-size:10px;line-height:1.35}
.hub-arrow{font-size:25px;color:#8ca7a4}
.hub-lower{margin:21px 0}
[hidden]{display:none!important}
@media(max-width:1100px){.quick-start-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
 .simple-home-head h2,.hub-intro h2{font-size:24px}
 .home-search-box,.quick-start{margin-bottom:15px}
 .quick-start-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .quick-start-grid button{padding:10px;min-height:65px}
 .hub-grid{grid-template-columns:1fr}
 .hub-tile{min-height:67px;padding:12px}
 .hub-tile-icon{width:38px;height:38px}
 .home-simple-links{gap:8px}
 .home-simple-links button{padding:11px}
 .home-simple-links small{font-size:10px}
 .home-secondary .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .attention-center{margin-top:17px}
}

/* v8.1 compact mobile header avoids duplicate page names */
@media(max-width:720px){
 .mobile-page-heading{display:none!important}
 .mobile-banner{padding:calc(8px + env(safe-area-inset-top)) 14px 8px;min-height:calc(56px + env(safe-area-inset-top))}
 .mobile-brand-logo{width:35px;height:35px}
 .mobile-controls .install-button{min-width:39px;height:39px}
 .mobile-role select{height:39px}
 .app-content{padding-top:11px}
 .demo-alert{padding:8px 10px;margin-bottom:14px;align-items:start}
 .demo-alert b{font-size:11px}
 .demo-alert p{font-size:10px;line-height:1.4;margin:4px 0 0}
 .attention-center{margin-top:12px}
}

.route-crumb{display:flex;align-items:center;gap:8px;margin:0 0 14px;color:#80989a;font-size:11px}
.route-crumb button{background:none;border:0;cursor:pointer;color:#1c7965;font-weight:800;padding:8px 0;font-size:12px}
.urgent-shortcut{display:flex;justify-content:space-between;gap:12px;align-items:center;width:100%;text-align:left;background:#fff1f1;color:#a72738;border:1px solid #f4c9ce;padding:12px 15px;border-radius:13px;margin:0 0 14px;font-size:12px;font-weight:800}
.urgent-shortcut strong{white-space:nowrap;font-size:11px}
@media(max-width:720px){.route-crumb{margin-top:2px}.urgent-shortcut{padding:12px}}

/* v9 PREMIUM WORKSPACE — mobile-first information hierarchy */
:root{--v9-ink:#173d42;--v9-muted:#678186;--v9-border:#deebe6;--v9-green:#127458;--v9-faint:#f5faf7;--v9-red:#b83440}
#page{animation:v9-appear .16s ease-out}
@keyframes v9-appear{from{opacity:.75;transform:translateY(3px)}to{opacity:1;transform:none}}
.v9-home-hero{position:relative;overflow:hidden;border-radius:24px;background:linear-gradient(128deg,#10323e 0%,#0c4948 62%,#166858 100%);box-shadow:0 12px 36px rgba(4,48,50,.16);color:white;padding:24px 24px 20px;margin-bottom:19px}
.v9-home-hero::after{content:"";position:absolute;width:195px;height:195px;right:-65px;top:-90px;border-radius:100%;border:39px solid rgba(156,239,208,.06);pointer-events:none}
.v9-home-hero::before{content:"";position:absolute;width:120px;height:120px;right:48px;bottom:-88px;border-radius:100%;border:24px solid rgba(189,247,229,.04);pointer-events:none}
.v9-hero-top{display:flex;justify-content:space-between;align-items:center;gap:12px;position:relative;z-index:1}
.v9-hero-brand{font-size:10px;letter-spacing:.16em;font-weight:800;color:#a8e2cc}
.v9-demo-marker{font-size:9px;letter-spacing:.1em;font-weight:800;color:#c1e8dc;border:1px solid #ffffff39;padding:5px 9px;border-radius:30px}
.v9-hero-caption{font-size:12px;color:#b9ded6;margin-top:22px;text-transform:capitalize;position:relative;z-index:1}
.v9-home-hero h2{color:#fff;margin:4px 0 6px;font-size:30px;letter-spacing:-.9px;line-height:1.1;font-weight:830;position:relative;z-index:1}
.v9-hero-spark{display:inline-block;color:#93dfbb;margin-left:10px;font-size:25px;font-weight:500}
.v9-home-hero p{margin:0 0 20px;color:#c6e7de;font-size:13px;line-height:1.5;max-width:350px;position:relative;z-index:1}
.v9-hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;position:relative;z-index:1}
.v9-hero-stats button{display:flex;flex-direction:column;gap:2px;text-align:left;color:#fff;background:#ffffff17;border:1px solid #ffffff23;border-radius:14px;padding:12px 13px;cursor:pointer;min-width:0;min-height:68px}
.v9-hero-stats button:active{background:#ffffff2b}
.v9-hero-stats b{font-size:24px;font-weight:830;line-height:1.05;letter-spacing:-.5px}
.v9-hero-stats span{font-size:10px;color:#c4e3dc;line-height:1.25}
.v9-home-hero button:focus-visible{outline:2px solid #b4eecf;outline-offset:2px}
.v9-main-search{margin:0 0 17px}
.v9-main-search>label{color:var(--v9-ink);font-size:12px}
.v9-main-search .search-line{border-radius:16px;box-shadow:0 5px 19px #0c40300b;min-height:57px}
.v9-main-search .search-line input{min-height:55px}
.recent-section{margin:0 0 18px}
.recent-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.recent-title h3{margin:0;color:var(--v9-ink);font-size:14px}
.recent-title span{font-size:10px;color:var(--v9-muted)}
.recent-people{display:flex;gap:9px;overflow-x:auto;padding:0 0 4px;scrollbar-width:none}
.recent-people::-webkit-scrollbar{display:none}
.recent-people button{border:1px solid var(--v9-border);background:#fff;border-radius:13px;display:flex;gap:8px;align-items:center;padding:8px 11px;white-space:nowrap;min-height:50px;box-shadow:0 4px 14px #163d3608;color:#2d5154}
.recent-people button span{width:29px;height:29px;display:grid;place-items:center;border-radius:10px;background:#e7f4ed;color:#18745c;font-size:11px;font-weight:800}
.recent-people button strong{font-size:12px}
.quick-start-title{color:var(--v9-ink);font-weight:800;font-size:14px}
.quick-start-grid button{min-height:80px;border-radius:16px;padding:13px;background:#fff;box-shadow:0 3px 14px #0738380a;transition:border-color .15s,transform .15s}
.quick-start-grid button:active{transform:scale(.98);border-color:#60a991}
.quick-start-grid button:first-child{border-color:#b7d9cb;background:linear-gradient(145deg,#f0f9f4,#ffffff)}
.quick-start-grid button strong{font-size:12px}
.attention-center{border:1px solid #e0eae5;border-radius:20px;background:#fff;padding:18px 16px 13px;box-shadow:0 6px 24px #1544350b;scroll-margin-top:16px}
.attention-title{margin-bottom:13px}
.attention-title h2{font-size:20px;letter-spacing:-.3px;margin:3px 0 4px;color:var(--v9-ink)}
.attention-title p{font-size:12px;line-height:1.5;color:#73888d;margin:0}
.attention-kicker{font-size:9px;font-weight:850;letter-spacing:.15em;color:var(--v9-green)}
.v9-attention-tabs{display:flex;align-items:center;gap:7px;overflow-x:auto;scrollbar-width:none;padding:3px 1px 13px;margin-right:-9px}
.v9-attention-tabs::-webkit-scrollbar{display:none}
.v9-attention-tabs button{white-space:nowrap;display:flex;align-items:center;gap:6px;padding:8px 11px;border-radius:30px;border:1px solid #e3eeea;background:#f7faf9;color:#567477;font-size:11px;font-weight:750;min-height:37px}
.v9-attention-tabs button.active{background:#134e4b;color:#fff;border-color:#134e4b;box-shadow:0 3px 10px #134e4b2b}
.v9-attention-tabs b{font-size:10px;border-radius:50px;min-width:17px;text-align:center;background:#ffffff22;padding:1px 4px}
.v9-attention-tabs button:not(.active) b{background:#e9f1ee;color:#507c72}
.attention-center .attention-feed{gap:9px}
.attention-center .attention-card{border-radius:13px;margin-bottom:7px}
.attention-center .attention-family-block{border-radius:15px;margin-top:4px;margin-bottom:12px}
.v9-attention-footer{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 8px;border-top:1px solid #edf1f0;padding-top:12px}
.v9-attention-footer .btn{font-size:11px}
.attention-footnote{font-size:10px;line-height:1.4;color:#8da09e}
.home-simple-links button{border-radius:17px;box-shadow:0 3px 14px #0738380b;min-height:85px}
.v9-resident-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.v9-resident-intro span{font-size:10px;font-weight:800;letter-spacing:.13em;color:#278063}
.v9-resident-intro h2{color:var(--v9-ink);font-size:26px;letter-spacing:-.5px;margin:3px 0 5px}
.v9-resident-intro p{font-size:12px;color:#72868b;margin:0}
.v9-resident-search{margin-bottom:14px}
.v9-resident-filter{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;margin-bottom:13px}
.v9-resident-filter button{border-radius:30px;padding:9px 14px;background:#fff;border:1px solid #dce9e5;color:#567479;font-weight:780;font-size:12px;white-space:nowrap;min-height:40px}
.v9-resident-filter button.active{background:#144b47;border-color:#144b47;color:white}
.v9-resident-filter b{margin-left:4px;font-size:10px}
.v9-resident-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.v9-resident-row{border:1px solid #dfebe6;background:#fff;border-radius:17px;padding:15px;display:flex;align-items:center;gap:10px;text-align:left;min-width:0;min-height:102px;box-shadow:0 3px 14px #1039340c;color:#23464b}
.v9-resident-row.is-late{border-left:4px solid #c54250;background:linear-gradient(120deg,#fff8f8,#fff 70%)}
.v9-resident-avatar{width:46px;height:46px;border-radius:14px;background:#e7f4ed;color:#1c745e;display:grid;place-items:center;font-size:13px;font-weight:850;flex-shrink:0}
.v9-resident-text{display:flex;min-width:0;flex:1;flex-direction:column;gap:5px}
.v9-resident-text strong{font-size:14px;color:#183e44;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v9-resident-text small{font-size:11px;color:#809598}
.v9-resident-flags{display:flex;gap:4px;flex-wrap:wrap}
.v9-resident-flags em{font-size:9px;font-style:normal;font-weight:800;border-radius:6px;background:#f0f5f3;color:#74918c;padding:3px 6px}
.v9-resident-flags em.red{background:#ffebed;color:#ab3041}
.v9-resident-flags em.family{background:#fff4dc;color:#95671f}
.v9-resident-arrow{font-size:24px;color:#9bb1ac}
/* Resident workspaces: tabbed cards with one focused action at a time. */
.resident-workspace{margin-top:2px}
.resident-hero{display:flex;align-items:center;gap:13px;background:linear-gradient(130deg,#113944,#176554);border-radius:17px;padding:17px;color:#fff;margin-bottom:14px}
.resident-hero-avatar{width:50px;height:50px;border-radius:15px;flex-shrink:0;display:grid;place-items:center;background:#ffffff26;border:1px solid #ffffff2b;color:#d5fce8;font-weight:850;font-size:16px}
.resident-hero-info{min-width:0;flex:1}
.resident-hero-info h3{font-size:18px;color:#fff;margin:0 0 5px}
.resident-hero-info p{font-size:11px;color:#b2dfd2;margin:0 0 9px}
.resident-hero-info .badge{font-size:10px}
.resident-tabbar{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;position:sticky;top:0;background:#fff;padding:5px 0 10px;margin-bottom:3px;z-index:5}
.resident-tabbar::-webkit-scrollbar{display:none}
.resident-tabbar button{white-space:nowrap;padding:9px 12px;min-height:41px;border-radius:11px;border:1px solid #e1ece7;background:#f5f8f7;color:#52767a;font-weight:750;font-size:12px}
.resident-tabbar button.selected{background:#145f50;border-color:#145f50;color:#fff}
.resident-profile-content{padding-top:8px;min-height:190px}
.profile-stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:5px 0 17px}
.profile-stat-row>div{background:#f3f8f5;border:1px solid #e4ede9;padding:12px 8px;border-radius:12px;display:flex;flex-direction:column;gap:5px;text-align:center}
.profile-stat-row strong{font-size:23px;color:#154b47;line-height:1}
.profile-stat-row span{font-size:10px;color:#738d88}
.profile-late{color:#b93949!important;font-weight:800!important}
.profile-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 9px}
.profile-section-head h4{font-size:14px;margin:0;color:#1c4549}
.profile-priority-list{display:flex;flex-direction:column;gap:7px}
.profile-priority{display:flex;gap:9px;background:#f6faf8;border:1px solid #e4eeeb;border-radius:11px;padding:10px 11px;color:#1b7862}
.profile-priority.critical{background:#fff4f4;border-color:#f1d8d8;color:#b83440}
.profile-priority>span{font-size:15px}
.profile-priority div{display:flex;flex-direction:column;gap:4px;min-width:0}
.profile-priority b{font-size:12px;color:#24474b;overflow-wrap:anywhere}
.profile-priority small{font-size:10px;line-height:1.4;color:#6d8387}
.profile-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:17px 0}
.profile-actions-grid .btn{min-height:48px;white-space:normal}
.profile-info-line{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #e9f1ed}
.profile-info-line>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.profile-info-line small{font-size:10px;color:#869b9a}
.profile-info-line strong{font-size:12px;font-weight:760;color:#21464d;overflow-wrap:anywhere}
.profile-info-line>span{font-size:11px;color:#71888a;white-space:nowrap;flex-shrink:0}
.profile-description,.profile-note{font-size:11px;line-height:1.55;color:#6c8583;padding:11px 12px;background:#f4f8f6;border-radius:10px;margin:7px 0 12px}
.profile-note{background:#fff7e8;color:#88631d}
.profile-empty{font-size:12px;color:#7b9290;margin:10px 0}
.profile-task-group{margin:0 0 23px}
.profile-task-group .resident-tasks{padding:3px 9px}
.profile-task-group .task-row{margin:2px 0}
.profile-family-card{display:flex;flex-direction:column;gap:6px;border-radius:12px;border:1px solid #e6ede8;padding:13px;margin:10px 0}
.profile-family-card strong{font-size:13px}
.profile-family-card>span{font-size:11px;color:#708589}
.profile-family-card .badge{align-self:start}
.profile-goal{border:1px solid #e7efec;border-radius:12px;padding:11px;margin-bottom:10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.profile-goal div{flex:1;display:flex;flex-direction:column;gap:4px;min-width:150px}
.profile-goal strong{font-size:12px;color:#1b4449}
.profile-goal small{font-size:10px;color:#74878d}
.profile-goal span{font-size:12px;font-weight:820;color:#16765e}
.profile-history-item{padding:13px 2px;border-bottom:1px solid #e7efeb;display:flex;flex-direction:column;gap:5px}
.profile-history-item small{color:#75918b;font-size:10px}
.profile-history-item strong{font-size:12px;color:#214349;line-height:1.5;font-weight:720}
.profile-history-item span{font-size:11px;color:#536c72}
.resident-profile-footer{font-size:10px;line-height:1.45;color:#8ca19d;border-top:1px solid #e9f0ed;margin-top:20px;padding-top:10px}
@media(max-width:900px){.v9-resident-list{grid-template-columns:1fr}}
@media(max-width:720px){
 .v9-home-hero{border-radius:20px;padding:20px 18px 18px;margin-bottom:15px}
 .v9-home-hero h2{font-size:27px}
 .v9-hero-caption{margin-top:17px}
 .v9-hero-stats button{padding:11px 9px;min-height:64px}
 .v9-hero-stats b{font-size:22px}
 .v9-hero-stats span{font-size:9px}
 .quick-start-grid button{min-height:78px}
 .attention-center{padding:14px 12px;margin-top:14px}
 .attention-title h2{font-size:18px}
 .v9-attention-tabs{margin-right:-12px}
 .v9-attention-footer{gap:6px}
 .v9-attention-footer .btn{flex:1;min-width:105px}
 .v9-resident-list{grid-template-columns:1fr}
 .v9-resident-row{min-height:91px;padding:12px;border-radius:14px}
 .v9-resident-intro h2{font-size:23px}
 .resident-hero{padding:14px;border-radius:15px}
 .resident-tabbar{margin-left:-2px;margin-right:-2px}
 .resident-tabbar button{padding:8px 10px;font-size:11px}
 .profile-actions-grid .btn{font-size:12px}
 .modal:has(.resident-workspace){max-height:95dvh}
 .modal:has(.resident-workspace) .modal-head{position:sticky;top:-20px;z-index:6;background:#fff;padding-bottom:11px}
}
@media(min-width:721px){.v9-home-hero{max-width:100%}}
@media(prefers-reduced-motion:reduce){#page{animation:none}}

/* Guided interactive sample, isolated demo.html */
.demo-journey{background:#fff;border:1px solid #d8e7e3;border-radius:22px;padding:19px 17px;margin:20px 0 24px;box-shadow:0 12px 40px rgba(16,48,55,.07)}
.demo-journey-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.demo-kicker{font-size:11px;letter-spacing:.1em;font-weight:800;color:#277b72}
.demo-journey h3{font-size:22px;margin:4px 0 6px;color:#18343a}.demo-journey p{max-width:600px;font-size:13px;line-height:1.6;color:#667f84;margin:0}
.demo-journey-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.demo-journey-actions button{border:1px solid #e0ebe8;background:#f7faf9;text-align:left;border-radius:14px;min-height:78px;padding:12px 12px;display:grid;grid-template-columns:34px 1fr 14px;grid-template-rows:1fr 1fr;column-gap:9px;align-items:center;cursor:pointer;color:#19343a;font-family:inherit}
.demo-journey-actions button span{grid-row:1/3;display:grid;place-items:center;border-radius:10px;background:#dbeee7;color:#1c7669;font-weight:800;width:32px;height:34px;font-size:13px}
.demo-journey-actions button strong{font-size:13px;grid-column:2;grid-row:1;line-height:1.15}.demo-journey-actions button small{font-size:11px;color:#6a8286;grid-column:2;grid-row:2;line-height:1.2}.demo-journey-actions button i{grid-column:3;grid-row:1/3;font-style:normal;font-size:24px;color:#539f91}
.demo-journey-foot{font-size:11px;color:#819297;margin-top:11px}
@media(max-width:680px){.demo-journey{padding:15px 13px;margin:16px 0 18px}.demo-journey-top{flex-direction:column;gap:10px}.demo-journey-actions{grid-template-columns:1fr}.demo-journey-actions button{min-height:66px}.demo-journey h3{font-size:19px}}

/* v10: interactive ten-situation library */
.demo-case-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 8px}
.demo-case{display:flex;text-align:left;align-items:flex-start;width:100%;border:1px solid #e0e9e8;background:#fff;border-radius:16px;padding:14px 12px;gap:11px;min-width:0;cursor:pointer;transition:background .18s,transform .18s}
.demo-case:active{transform:scale(.985)}
.demo-case-no{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;background:#edf6f1;border-radius:10px;color:#246a5e;font-weight:800;font-size:12px}
.demo-case-content{min-width:0;flex:1}
.demo-case-content strong{display:block;line-height:1.4;color:#193a3e;font-size:13px;font-weight:800}
.demo-case-content small{display:block;color:#687d7e;font-size:11px;line-height:1.5;margin-top:4px}
.demo-case.red .demo-case-no{color:#a93b38;background:#fff0ed}
.demo-case.amber .demo-case-no{color:#916113;background:#fff7e8}
.demo-case.blue .demo-case-no{color:#316f96;background:#edf5fc}
.demo-case.green .demo-case-no{color:#277958;background:#e9f7ef}
.demo-case-chevron{color:#9daeb0;font-size:22px;line-height:1.4}
@media(max-width:720px){.demo-case-grid{grid-template-columns:1fr}.demo-case{padding:13px}}


/* v11 — журнал истории и динамики конкретного резидента */
.patient-timeline{margin-top:12px}
.patient-timeline .profile-section-head{margin-bottom:7px}
.patient-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 9px}
.patient-filters label{display:flex;flex-direction:column;gap:5px;color:#667f81;font-size:12px;font-weight:700}
.patient-filters .select{width:100%;min-width:0}
.patient-timeline-count{color:#5e7778;font-size:12px;font-weight:700;margin:11px 0 8px}
.patient-timeline-items{display:flex;flex-direction:column;gap:9px}
.patient-day-heading{position:sticky;top:-1px;z-index:2;display:flex;justify-content:space-between;gap:8px;padding:9px 12px;border-radius:12px;background:#eaf3f1;color:#175e53;font-weight:800;font-size:13px;margin:9px 0 1px}
.patient-day-heading span:last-child{font-weight:500;color:#678782}
.patient-timeline-item{position:relative;border:1px solid #e1e9e8;border-radius:15px;padding:12px 13px;background:#fff;box-shadow:0 3px 12px rgba(9,47,48,.03)}
.patient-timeline-item:before{content:'';display:block;position:absolute;left:-1px;top:12px;bottom:12px;width:3px;background:#46a48e;border-radius:2px}
.patient-timeline-top{display:flex;align-items:flex-start;justify-content:space-between;gap:9px}
.patient-timeline-top strong{font-size:14px;line-height:1.45}
.patient-timeline-top .badge{flex-shrink:0;font-size:10px}
.patient-timeline-time{color:#637d80;font-size:11px;margin-top:4px;font-weight:650}
.patient-timeline-item p{font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;margin:9px 0}
.patient-timeline-item>small{display:block;color:#7a9091;font-size:11px}
.patient-export-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}
.patient-export-actions .btn{white-space:normal;min-height:44px}
@media(max-width:650px){.patient-filters,.patient-export-actions{grid-template-columns:1fr}.patient-timeline-top{flex-wrap:wrap}}

.patient-summary-counts{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.patient-summary-counts span{background:#f1f7f5;border:1px solid #e0edeb;border-radius:11px;padding:6px 9px;color:#446b68;font-size:11px}.patient-summary-counts b{color:#195b51}

/* v12: four-domain structured dynamics in a standalone bottom navigation tab */
.dyn-shell{display:grid;gap:16px;padding-bottom:14px}
.dyn-hero{background:linear-gradient(128deg,#102e39 0%,#184a4c 56%,#247860 100%);color:#fff;border-radius:23px;padding:24px 24px;display:flex;justify-content:space-between;align-items:center;gap:14px;box-shadow:0 14px 28px #12383d20}
.dyn-kicker{color:#a8dacb;font-size:10px;font-weight:800;letter-spacing:1.7px}
.dyn-hero h2{font-size:28px;letter-spacing:-.8px;margin:8px 0}
.dyn-hero p{font-size:13px;line-height:1.6;color:#d4ece5;margin:0;max-width:530px}
.dyn-hero-symbol{font-size:46px;color:#a9e4cd;opacity:.85}
.dyn-toolbar{display:grid;grid-template-columns:1.5fr 1fr;gap:10px}
.dyn-toolbar label,.dyn-filterrow label{display:grid;gap:6px;font-size:11px;color:#527379;font-weight:750}
.dyn-toolbar select,.dyn-filterrow select{width:100%}
.dyn-actions{display:flex;gap:10px;flex-wrap:wrap}
.dyn-actions .btn{min-width:160px}
.dyn-sphere-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.dyn-sphere-card{border:1px solid #dfeae5;border-radius:17px;background:#fff;text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px 14px;min-height:155px;box-shadow:0 6px 16px #163b3a0a;transition:border-color .15s,background .15s;min-width:0}
.dyn-sphere-card.active{background:#eaf6ef;border:2px solid #24876c;padding:15px 13px;box-shadow:0 0 0 2px #c8e7da}
.dyn-sphere-symbol{font-size:25px;color:#1b806b;line-height:1}
.dyn-sphere-name{font-weight:850;font-size:17px;color:#1c3941}
.dyn-sphere-count{font-weight:700;font-size:12px;color:#398572}
.dyn-sphere-card small{color:#788f90;font-size:10px}
.dyn-viewbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dyn-viewbar>span{font-size:11px;color:#7f9194}
.dyn-all{border:1px solid #d4e9e0;color:#236c5b;background:#fff;padding:9px 14px;border-radius:12px;font-weight:800;font-size:12px}
.dyn-all.active{background:#1c7360;color:#fff;border-color:#1c7360}
.dyn-all b{padding-left:6px}
.dyn-domain-caption{background:#edf7f3;border-left:3px solid #2b9477;border-radius:10px;padding:12px 15px;color:#294d52}
.dyn-domain-caption b{font-size:14px}
.dyn-domain-caption p{margin:6px 0 0;color:#4f7575;font-size:12px;line-height:1.5}
.dyn-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.dyn-stats>div{background:#fff;border:1px solid #e7efea;border-radius:15px;padding:15px 16px;display:flex;flex-direction:column;gap:4px}
.dyn-stats strong{font-size:26px;color:#174d4f;line-height:1.1}
.dyn-stats span{font-size:10px;color:#648083}
.dyn-followups,.dyn-compare,.dyn-history{background:#fff;border-radius:18px;border:1px solid #e4eae9;padding:17px}
.dyn-section-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:14px}
.dyn-section-title h3{font-size:16px;margin:0;color:#173e47}
.dyn-section-title small{font-size:11px;color:#819597}
.dyn-followup-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 0;border-top:1px solid #edf0ef}
.dyn-followup-row>div{min-width:0}
.dyn-followup-row strong{display:block;font-size:13px}
.dyn-followup-row p{font-size:12px;color:#5c7b7d;line-height:1.4;margin:5px 0}
.dyn-followup-row small{font-size:11px;color:#51786c}
.dyn-followup-row .btn{flex-shrink:0}
.dyn-past{color:#b4443d!important;font-weight:750}
.dyn-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dyn-compare-item{border-radius:13px;background:#f6faf8;padding:14px;min-width:0}
.dyn-compare-item>span{font-size:11px;color:#698984;display:block}
.dyn-compare-item strong{font-size:13px;display:block;margin:5px 0}
.dyn-compare-item p{font-size:12px;color:#526d73;line-height:1.55}
.dyn-filterrow{display:flex;gap:10px;margin-bottom:15px}
.dyn-filterrow label{min-width:250px}
.dyn-day{font-size:11px;font-weight:850;letter-spacing:.04em;color:#78949b;margin:19px 0 7px;padding:6px 0;border-bottom:1px solid #e6eeeb}
.dyn-record{background:#f9fbfa;border:1px solid #e7efec;border-radius:16px;padding:15px;margin-bottom:10px}
.dyn-record-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.dyn-record-who{display:flex;align-items:center;gap:9px;min-width:0}
.dyn-mini-icon{border-radius:11px;background:#e2f1e9;color:#217961;font-size:19px;display:grid;place-items:center;width:38px;height:38px;flex-shrink:0}
.dyn-record-who strong{font-size:13px;display:block;line-height:1.35}
.dyn-record-who small{font-size:10px;color:#628285;line-height:1.45;display:block;margin-top:2px}
.dyn-record-head time{font-size:10px;color:#809092;white-space:nowrap}
.dyn-record-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:11px 0}
.dyn-record-status small{font-size:10px;color:#87999b}
.dyn-record>p{font-size:13px;color:#2f4b54;line-height:1.65;margin:9px 0 14px;white-space:pre-wrap}
.dyn-next{border-left:3px solid #a2cab9;background:#f0f6f3;border-radius:7px;padding:10px 12px;margin:8px 0 12px;display:flex;flex-direction:column;gap:4px}
.dyn-next strong{font-size:11px;color:#266d57}.dyn-next span{font-size:12px;color:#496769;line-height:1.45}.dyn-next small{font-size:11px;color:#547f67}
.dyn-completed{font-size:11px;color:#2e7962;background:#eaf5ed;border-radius:9px;padding:9px;margin-top:10px}
.dyn-empty{padding:26px 16px;text-align:center;color:#6e8388;font-size:12px}
.dyn-warning{font-size:11px;color:#789194;line-height:1.65;margin:0}
.dyn-resident-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:14px}
.dyn-mini-card{background:#f4f9f6;border:1px solid #e3efe6;border-radius:13px;padding:12px;display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.dyn-mini-card>span{font-size:13px;font-weight:850;color:#206a56}
.dyn-mini-card>strong{font-size:13px;color:#2e4e50}
.dyn-mini-card>small{font-size:10px;color:#809397}
.dyn-mini-card .btn{width:100%}
@media(max-width:900px){.dyn-sphere-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
 .dyn-shell{gap:13px}.dyn-hero{padding:20px 17px;border-radius:19px}.dyn-hero h2{font-size:22px}.dyn-hero p{font-size:11px}.dyn-hero-symbol{font-size:30px}
 .dyn-toolbar{grid-template-columns:1fr 1fr;gap:8px}.dyn-toolbar label{font-size:10px}.dyn-actions .btn{min-width:0;flex:1}
 .dyn-sphere-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.dyn-sphere-card{min-height:135px;padding:14px 13px}.dyn-sphere-name{font-size:17px}
 .dyn-stats>div{padding:12px 10px}.dyn-stats strong{font-size:23px}.dyn-stats span{font-size:10px}
 .dyn-followups,.dyn-compare,.dyn-history{padding:13px;border-radius:15px}.dyn-section-title h3{font-size:14px}
 .dyn-compare-grid{grid-template-columns:1fr 1fr}.dyn-compare-item{padding:10px}.dyn-compare-item p{font-size:11px}
 .dyn-filterrow label{min-width:0;width:100%}
 .dyn-record{padding:12px}.dyn-followup-row{align-items:flex-start}.dyn-followup-row .btn{font-size:11px}
}
@media(max-width:360px){.dyn-toolbar{grid-template-columns:1fr}.dyn-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v13: single-text dynamics, fast mobile workflow */
.dyn-easy{max-width:1060px;margin:0 auto}
.dyn-main-entry{padding:22px;margin:15px 0 24px;border-radius:24px;background:var(--card,#fff);border:1px solid #dae8e4;box-shadow:0 14px 48px rgba(28,70,75,.07)}
.dyn-main-entry h3,.dyn-saved-toolbar h3{margin:0;font-size:18px}
.dyn-big-note{min-height:180px !important;font-size:16px !important;line-height:1.65 !important}
.dyn-analyze-btn{width:100%;min-height:52px;border-radius:14px;font-size:15px}
.dyn-saved-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:24px 0 12px}
.dyn-simple-filters{margin-bottom:16px}
.dyn-single-history{border:1px solid #e1ebe7;border-radius:18px;padding:16px;background:#fff;margin-bottom:12px}
.dyn-single-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.dyn-single-head strong{display:block;font-size:15px}
.dyn-single-head small{display:block;color:#6a8382;font-size:12px;margin-top:4px}
.dyn-original{white-space:pre-wrap;line-height:1.6;color:#193943;margin:14px 0}
.dyn-pills{display:flex;gap:6px;flex-wrap:wrap}
.dyn-pills span{background:#e9f4f0;color:#206c5e;border-radius:20px;padding:5px 9px;font-size:12px}
.dyn-pills .uncertain{background:#fff0d8;color:#795019}
.dyn-detailed{margin-top:14px;border-top:1px solid #e2ece8;padding-top:12px}
.dyn-detailed summary{cursor:pointer;color:#176b59;font-size:13px;font-weight:650}
.dyn-detailed section{padding:10px 0;border-bottom:1px solid #e8f1ee}
.dyn-detailed section b{color:#285c53;font-size:13px}
.dyn-detailed section p{white-space:pre-wrap;font-size:13px;line-height:1.55;margin:4px 0 0}
.dyn-draft-source{padding:13px 15px;background:#f1f8f5;border-radius:14px;margin:12px 0 19px;max-height:250px;overflow:auto}
.dyn-draft-source p{white-space:pre-wrap;margin:6px 0 0;font-size:14px;line-height:1.6}
.dyn-review-title{padding-top:4px}.dyn-review-title p{color:#5e7774;font-size:13px;line-height:1.55}
.dyn-review-form .form-field{margin:13px 0}.dyn-review-form textarea{min-height:84px;line-height:1.55;font-size:15px}
.dyn-review-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.dyn-review-actions .btn{min-height:48px}
.dyn-legacy-box{border:1px solid #e2eee9;border-radius:18px;background:#f7fbf9;margin:18px 0;padding:16px}
.dyn-legacy-box summary{font-weight:650;color:#355e59;cursor:pointer}
.dyn-legacy-filters{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}
@media(max-width:640px){.dyn-main-entry{padding:15px;border-radius:18px}.dyn-easy .dyn-hero{margin-bottom:9px}.dyn-review-actions{grid-template-columns:1fr}.dyn-review-actions button{width:100%}}

.dyn-suggested-pills{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
.dyn-suggested-pills span{background:#eff4f2;padding:9px 11px;border-radius:11px;color:#6b7d78;font-size:12px}
.dyn-suggested-pills span.present{color:#166957;background:#e3f3eb;font-weight:700}
.dyn-suggested-pills span.unassigned{background:#fff1db;color:#865b20}
.dyn-review-hint{color:#708581;font-size:12px;line-height:1.45;margin:10px 0 14px}
.dyn-edit-breakdown{margin-top:18px;border-top:1px solid #e6ede8;padding-top:14px}
.dyn-edit-breakdown summary{cursor:pointer;color:#176b59;font-size:13px;font-weight:650}
.dyn-edit-breakdown .form-field{margin-top:16px}


/* v14 — dynamic notes pro, mobile-first. Does not add mandatory fields. */
.dyn-draft-tools{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-top:8px}
.dyn-draft-tools .hint{max-width:70%;line-height:1.55}
#dyn-autosave-status{font-size:11px;color:#237b62;text-align:right;max-width:135px}
.dyn-writing-hints{margin:12px 0;color:#456a66;font-size:12px}
.dyn-writing-hints summary{font-size:12px;color:#267a64;cursor:pointer;font-weight:650}
.dyn-writing-hints p{line-height:1.65;background:#f3faf7;border-radius:12px;padding:12px}
.dyn-clear-row{display:flex;justify-content:flex-end;margin-top:10px}
.dyn-review-glance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.dyn-review-glance>div{border:1px solid #dcece6;border-radius:12px;background:#f6faf8;padding:12px;min-width:0}
.dyn-review-glance b{display:block;font-size:12px;color:#1b6555}
.dyn-review-glance p{font-size:12px;white-space:pre-wrap;line-height:1.55;color:#4d6967;max-height:105px;overflow:auto;margin:7px 0 0}
.dyn-review-glance .dyn-review-uncertain{background:#fff7e9;border-color:#f4e2c1}
.dyn-review-uncertain b{color:#805c27}
.dyn-history-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.dyn-history-actions .btn{font-size:11px}
.dyn-followup-inline{margin:14px 0 8px;padding:12px 14px;border-radius:12px;background:#f1f8f5;border:1px solid #dfebe4}
.dyn-followup-inline.late{background:#fff2f0;border-color:#e8c1bc}
.dyn-followup-inline strong{font-size:12px;color:#2d7464}
.dyn-followup-inline.late strong{color:#b33e36}
.dyn-followup-inline p{font-size:13px;color:#395854;white-space:pre-wrap;margin:6px 0}
.dyn-followup-inline small{display:block;font-size:11px;color:#6d8580;margin-bottom:8px}
.dyn-follow-result{font-size:12px!important}
.dyn-audit{margin-top:12px;padding-top:10px;border-top:1px dashed #d7e4df}
.dyn-audit summary{font-size:12px;color:#4c706a;cursor:pointer}
.dyn-audit p{padding:8px 3px;border-bottom:1px solid #edf3ef;font-size:12px}
.dyn-audit small{display:block;color:#708983;margin-top:3px}
.dyn-history-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#edf7f2;border-radius:14px;padding:12px;margin-bottom:13px}
.dyn-history-summary strong{font-size:13px;color:#255b4e}
.dyn-history-summary small{font-size:11px;color:#617e74;flex:1 1 190px}
.dyn-side-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.dyn-side-comparison section{background:#f3f9f6;border-radius:14px;padding:13px;min-width:0}
.dyn-side-comparison span{display:block;color:#5f8177;font-size:11px}
.dyn-side-comparison strong{display:block;color:#164f41;font-size:14px;margin:6px 0}
.dyn-side-comparison p{white-space:pre-wrap;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:680px){.dyn-review-glance,.dyn-side-comparison{grid-template-columns:1fr}.dyn-draft-tools{display:block}.dyn-draft-tools .hint{max-width:100%}#dyn-autosave-status{display:block;max-width:none;text-align:left;margin-top:6px}.dyn-history-summary .btn{width:100%}}

.dyn-last-context{background:#f7faf8;border:1px solid #e1eee6;border-radius:13px;padding:12px 14px;margin-bottom:14px;color:#56766c;line-height:1.5}
.dyn-last-context b{font-size:12px;color:#236450}
.dyn-last-context p{margin:4px 0 2px;font-size:12px;line-height:1.55;white-space:pre-wrap}
.dyn-last-context small{font-size:10px;color:#799189}

/* RECOVERY STAFF AI 15 — coherent, effortless documentation workflow */
.dyn-draft-switcher{border:1px solid #d9e9e2;background:#f5faf7;border-radius:16px;padding:14px 15px;margin:13px 0}
.dyn-draft-switcher>strong{display:block;color:#254f44;font-size:13px;margin-bottom:10px}
.dyn-draft-chips{display:flex;gap:8px;flex-wrap:wrap}
.dyn-draft-chips .btn{border-radius:100px;max-width:100%;white-space:normal;text-align:left;line-height:1.4}
.dyn-quality{border:1px solid #dae9e1;border-radius:14px;background:#f8fbf9;padding:12px 14px;margin:12px 0 14px;font-size:13px;color:#385b50;line-height:1.5}
.dyn-quality.needs-review{background:#fffaf0;border-color:#f3e7c8;color:#7b6335}
.dyn-quality-heading{display:flex;align-items:flex-start;gap:8px;margin-bottom:4px}
.dyn-quality-heading span{font-size:16px;line-height:1.1}
.dyn-quality ul{padding-left:21px;margin:8px 0}
.dyn-quality li{margin:5px 0}
.dyn-quality small{display:block;font-size:11px;color:#74867b;margin-top:5px}
.dyn-quality-intro{padding:10px 12px;color:#6a8076;font-size:12px;background:#f4f9f5;border:1px dashed #d6e5d9;border-radius:12px;margin:8px 0 13px}
.dyn-doc-monitor{border:1px solid #d9e8e1;background:#fff;border-radius:20px;padding:18px 20px;margin:12px 0 18px;box-shadow:0 7px 20px #124f3410}
.dyn-doc-monitor-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dyn-doc-monitor-title strong{display:block;color:#123f35;font-size:16px}
.dyn-doc-monitor-title small{display:block;color:#71847a;margin-top:4px;font-size:11px}
.dyn-doc-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0}
.dyn-doc-metrics>div{padding:11px 12px;background:#f4faf6;border-radius:12px}
.dyn-doc-metrics b{display:block;font-size:23px;color:#124d3c}
.dyn-doc-metrics span{display:block;font-size:11px;color:#73897e}
.dyn-doc-people{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}
.dyn-doc-monitor>small{display:block;color:#8a9e92;font-size:10px;line-height:1.5}
.dyn-doc-ok{color:#327762;font-size:12px}
.dyn-evidence{border:1px solid #dcebe5;border-radius:17px;background:#fff;margin:15px 0;padding:16px}
.dyn-evidence-title strong{display:block;color:#153f34;font-size:15px}
.dyn-evidence-title small{display:block;color:#668477;font-size:11px;margin-top:3px}
.dyn-evidence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:13px}
.dyn-evidence-grid>div{background:#f3f8f5;padding:11px;border-radius:12px}
.dyn-evidence-grid b{display:block;font-size:22px;color:#19634a}
.dyn-evidence-grid span{display:block;font-size:11px;color:#487463}
.dyn-evidence-grid small{display:block;font-size:10px;color:#86a092;margin-top:3px}
.dyn-evidence-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.dyn-evidence-compare>div{border:1px solid #e5eee8;border-radius:12px;padding:11px;min-width:0}
.dyn-evidence-compare small{display:block;font-size:10px;color:#739183}
.dyn-evidence-compare p{font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0}
@media(max-width:640px){.dyn-doc-monitor{padding:14px}.dyn-doc-monitor-title{align-items:flex-start;flex-direction:column}.dyn-doc-metrics>div{padding:10px 7px}.dyn-doc-metrics b{font-size:20px}.dyn-doc-metrics span{font-size:10px}.dyn-evidence-compare{grid-template-columns:1fr}.dyn-draft-chips .btn{font-size:12px}}

/* Staff v15 individual demo-workplace and native iOS dictation */
.staff-persona{background:#f5faf8;border:1px solid #d9eae2;border-radius:16px;padding:13px 15px;margin:12px 0 16px;display:grid;grid-template-columns:minmax(160px,1fr) minmax(190px,1.4fr);align-items:center;gap:8px 14px}
.staff-persona label{font-weight:700;font-size:13px;color:#244d41}
.staff-persona small{grid-column:1/-1;font-size:11px;color:#6b8378;line-height:1.5}
.dyn-dictation-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:2px 0 12px}
.dyn-dictation-row small{flex:1 1 210px;font-size:11px;color:#6d8678;line-height:1.5}
@media(max-width:640px){.staff-persona{grid-template-columns:1fr}.dyn-dictation-row .btn{width:100%}}

/* v16 mobile first: concise work screens and dedicated recommendation tab */
.rec-teaser{display:flex;align-items:center;text-align:left;gap:13px;width:100%;background:linear-gradient(112deg,#e8f4ee,#f8fcf9);border:1px solid #b6dcca;border-radius:17px;padding:15px 16px;margin:0 0 20px;cursor:pointer;color:#133c34;box-shadow:0 6px 17px #163f3110}
.rec-star{display:grid;place-items:center;background:#146f59;color:#fff;width:39px;height:39px;border-radius:12px;font-size:22px;flex-shrink:0}
.rec-teaser strong{font-size:15px;display:block}.rec-teaser small{font-size:11px;color:#507b6d;display:block;margin-top:3px}.rec-teaser-arrow{font-size:25px;color:#488d73;margin-left:auto}
.rec-hero{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(120deg,#133c42,#0f6453);color:white;border-radius:22px;padding:23px;gap:15px}
.rec-hero span{font-size:10px;font-weight:750;letter-spacing:1.7px;color:#98d7c3}.rec-hero h2{margin:8px 0 4px;color:white;font-size:27px;letter-spacing:-.8px}.rec-hero p{margin:0;color:#c6e7de;font-size:13px}
.rec-tally{border:1px solid #77b9a148;border-radius:16px;padding:11px 14px;text-align:center;min-width:76px;background:#ffffff15}.rec-tally b{display:block;color:#fff;font-size:27px}.rec-tally small{font-size:10px;color:#cee9e1}
.rec-short-notice{font-size:11px;color:#677f80;line-height:1.55;padding:10px 2px 6px}
.rec-filters{display:flex;gap:7px;overflow-x:auto;margin:12px 0 15px;padding:2px 0 5px;scrollbar-width:none}.rec-filters button{border:1px solid #dae9e2;background:#f5f9f6;color:#48685f;border-radius:24px;padding:10px 14px;white-space:nowrap;font-weight:750;font-size:11px}.rec-filters button.active{background:#164e47;color:white;border-color:#164e47}
.rec-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.rec-card{background:#fff;border:1px solid #e0e9e6;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:8px;box-shadow:0 4px 12px #062f2510}.rec-card.rec-urgent{border-left:4px solid #d05245}.rec-card.rec-today{border-left:4px solid #e2ab53}.rec-line{display:flex;justify-content:space-between;gap:8px;align-items:center}.rec-priority{font-size:9px;color:#376d5a;font-weight:850;letter-spacing:.7px}.rec-urgent .rec-priority{color:#b13f36}.rec-today .rec-priority{color:#9d651d}.rec-origin{font-size:10px;color:#93a3a5;text-align:right}.rec-card h3{font-size:15px;line-height:1.4;margin:0;font-weight:800;color:#1e4341}.rec-sub{font-size:12px;color:#627a7b}.rec-proof summary{font-size:11px;color:#76918e;cursor:pointer}.rec-proof p{margin:7px 0 0;color:#506f6b;font-size:12px;line-height:1.5}.rec-open{margin-top:auto;background:#e7f4ec;color:#176651;border:0;border-radius:11px;padding:11px;font-weight:800;font-size:12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.rec-open span{font-size:18px}
.rec-more,.attention-more{display:block;width:100%;background:#fff;border:1px solid #cfe2da;border-radius:12px;padding:12px;color:#2d6555;font-weight:800;margin:14px 0;cursor:pointer}.rec-footer{color:#859a9b;font-size:11px;line-height:1.5;margin:20px 0 28px}
.demo-journey-fold{background:#fff;border:1px solid #dfebe5;border-radius:15px;margin:10px 0 18px;padding:12px}.demo-journey-fold>summary{font-size:13px;font-weight:780;color:#365b53;cursor:pointer}.demo-journey-fold>summary span{float:right}.demo-journey-fold .demo-journey{margin-top:12px}
.attention-more{margin-top:8px}.attention-center .attention-footnote{display:none}
@media(max-width:720px){
 .rec-list{grid-template-columns:1fr}.rec-card{padding:14px}.rec-hero{padding:19px}.rec-hero h2{font-size:25px}
 .v9-home-hero{padding:16px 17px!important;margin-bottom:12px!important;border-radius:18px!important}.v9-home-hero h2{font-size:25px!important}.v9-home-hero p{font-size:11px!important;margin-bottom:11px!important}.v9-hero-stats{margin-top:4px!important}
 .app-content{padding:12px 12px 24px}.quick-start-grid button{min-height:62px!important;padding:9px!important}.quick-start-grid button strong{font-size:11px!important}
 .v9-attention-tabs{padding-bottom:7px}.attention-title h2{font-size:18px}.attention-card{padding:13px!important;margin-bottom:8px!important}.attention-card h3{font-size:13px!important;line-height:1.3}.attention-card p{font-size:11px!important;margin:4px 0 7px!important}.attention-time{font-size:10px}.attention-pill{font-size:9px}
 .bottom-nav{gap:0!important;padding-left:2px!important;padding-right:2px!important}
 .bottom-nav button{font-size:9px!important;letter-spacing:-.2px!important;padding:3px 0!important}
 .bottom-nav button span{font-size:20px!important;line-height:24px!important}
 .bottom-nav button.active span{min-width:34px!important}
 .bottom-nav button[data-id="recommendations"]{color:#15795c;font-weight:800}
 .bottom-nav button[data-id="recommendations"].active span{background:#d4efe1;color:#075d45}
}
@media(max-width:375px){.bottom-nav button{font-size:8px!important}.bottom-nav button span{font-size:19px!important}}
/* Yandex AI Studio demo integration — never exposes credentials in page source */
.yc-connection{margin:14px 0;padding:14px;background:linear-gradient(125deg,#f4f9fc,#fff);border:1px solid #dce8e9;border-radius:17px}
.yc-connection.is-configured{border-color:#a4d7bc;background:#f5fcf7}
.yc-connection-line{display:flex;gap:12px;align-items:center}
.yc-connection-line strong{display:block;font-size:14px;font-weight:800;letter-spacing:-.01em}
.yc-connection-line small{display:block;font-size:11px;color:#597577;line-height:1.4;margin-top:3px}
.yc-mark{width:35px;height:35px;border-radius:11px;background:#f44336;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:21px;flex:0 0 auto}
.yc-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}
.yc-buttons .btn{font-size:12px;padding:9px 12px;min-height:36px}
.yc-inline-cta{margin:12px 0}
.yc-dyn-control{margin:12px 0;padding:12px;border-radius:15px;background:#f7fbfa;border:1px solid #daeae7}
.yc-dyn-control .yc-connection{margin:0 0 9px;border:none;padding:8px;background:transparent}
.yc-dyn-control >small{display:block;font-size:11px;line-height:1.45;margin-top:7px;color:#577779}
.yc-recs{padding:14px;border:1px solid #a2d7c3;border-radius:18px;background:#f6fff9;margin:12px 0 18px}
.yc-recs h3{font-size:17px;margin:0 0 10px}
.yc-recs h3 small{font-size:11px;font-weight:500;color:#607b77}
.yc-recs article{padding:12px 0;border-top:1px solid #d8eee5}
.yc-recs article strong{display:block;font-size:14px}
.yc-recs article p{font-size:12px;color:#436664;line-height:1.55;margin:5px 0}
.yc-recs article .rec-open{padding:8px 11px;font-size:12px;max-width:230px}
.yc-recs > small{font-size:11px;line-height:1.5;color:#64817a;display:block;margin-top:8px}
@media(max-width:420px){.yc-buttons .btn{flex:1}}
/* v18 — persistent resident identities, archive and numbered rehabilitation episodes */
.archive-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 15px;padding:5px;border-radius:15px;background:#eaf2ee;border:1px solid #d8e7df}
.archive-switch button{border:0;background:transparent;border-radius:11px;padding:12px 6px;font-size:13px;font-weight:800;color:#59776b;cursor:pointer}
.archive-switch button.active{background:#fff;color:#145a45;box-shadow:0 2px 10px #16473316}
.archive-course-list{display:grid;gap:10px;margin:12px 0 14px}
.archive-course{background:#fff;border:1px solid #dae9e2;border-radius:16px;padding:16px;margin:10px 0;color:#264e46}
.archive-course.is-current{border-color:#71bd99;background:#f4fbf6}
.archive-course-title{display:flex;justify-content:space-between;align-items:center;gap:8px}
.archive-course-title strong{font-size:16px;letter-spacing:-.3px}
.archive-course>small{display:block;color:#738d83;font-size:12px;margin-top:7px}
.archive-course>p{font-size:12px;line-height:1.5;color:#57776d;margin:10px 0}
.archive-course-facts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.archive-course-facts>span{border-radius:8px;background:#eaf5ee;color:#336c57;font-size:11px;padding:7px 8px}
.archive-course-feed{display:grid;gap:8px;margin:14px 0;max-height:50vh;overflow-y:auto}
.archive-course-item{padding:12px 13px;border:1px solid #e5eee9;border-radius:13px;background:#fff}
.archive-course-item small{display:block;color:#658077;font-size:11px;font-weight:700}
.archive-course-item p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.55;color:#314f48;margin:7px 0 0}
.archive-check{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:650;line-height:1.55;color:#365a4e}
.archive-check input{width:19px;height:19px;accent-color:#146a51;flex:0 0 19px}
@media(max-width:480px){.archive-switch button{font-size:12px}.archive-course{padding:13px}}

/* v19 — non-security demo role experience */
.demo-auth-locked .desktop-shell,.demo-auth-locked .bottom-nav,.demo-auth-locked .modal-backdrop{display:none!important}
.auth-gate[hidden]{display:none!important}
.auth-gate{min-height:100dvh;background:radial-gradient(circle at 20% 0%,#1d574f 0%,transparent 42%),linear-gradient(150deg,#0b2839,#102c35 65%,#173f39);padding:clamp(16px,4vw,50px) 14px;display:grid;place-items:center;box-sizing:border-box}
.login-wrap{width:100%;max-width:600px;margin:auto}.login-panel{background:#fff;border-radius:29px;padding:clamp(22px,4vw,39px);box-shadow:0 22px 70px #00161e33}.login-logo{background:#11765d;color:#fff;font-size:29px;border-radius:16px;width:55px;height:55px;display:grid;place-items:center;margin-bottom:19px}.login-eyebrow{font-size:10px;letter-spacing:1.4px;color:#14816a;font-weight:800}.login-panel h1{font-size:clamp(22px,4vw,30px);letter-spacing:-.9px;margin:8px 0 7px;color:#102d37}.login-sub{color:#68818a;font-size:13px;margin:0 0 20px;line-height:1.55}.login-profiles{display:grid;gap:12px}.login-role-block{border:1px solid #e3eaeb;border-radius:17px;padding:13px 14px}.login-role-block h2{font-size:14px;margin:0;color:#193b43}.login-role-block>small{display:block;color:#7a939b;font-size:11px;margin:4px 0 9px}.login-role-users{display:grid;gap:6px}.login-user{border:1px solid #e6ecee;border-radius:11px;display:flex;gap:10px;align-items:center;padding:8px 10px;text-align:left;background:#fafcfc;color:#183940;cursor:pointer;min-height:45px}.login-user:hover{background:#e8f6ef;border-color:#b8dbcd}.login-user-avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e0f2e9;color:#187255;font-weight:800}.login-user strong{font-size:12px;flex:1}.login-user>span:last-child{color:#187960;font-size:11px;font-weight:800}.login-warning{margin-top:16px;padding:12px 14px;border-radius:13px;background:#fff3de;color:#806326;font-size:11px;line-height:1.6}.account-top{display:flex;gap:10px;align-items:center}.account-top>div{display:grid;gap:3px}.account-top strong{font-size:12px}.account-top small{font-size:10px;color:#8ba0a7}.account-logout{border:1px solid #cdddda;border-radius:9px;background:white;padding:9px 11px;color:#28715e;font-weight:800;font-size:11px}.mobile-account{border:1px solid #ffffff35;background:#ffffff13;color:#e8fff6;display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:116px;min-width:70px;height:43px;border-radius:11px;padding:5px 8px}.mobile-account span{font-size:10px;line-height:1.2;max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-account small{font-size:9px;color:#a6dcd0;margin-top:3px}.access-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:17px}.access-summary>div{background:#eef7f3;border-radius:12px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:5px}.access-summary strong{font-size:11px;color:#26584b}.access-summary b{font-size:19px;color:#16705c}.access-group{background:white;border:1px solid #e0eaeb;border-radius:16px;padding:14px;margin-bottom:12px}.access-group h3{font-size:14px;margin:0 0 10px}.access-user{display:flex;gap:9px;align-items:center;border-top:1px solid #edf1f2;padding:10px 0}.access-user:first-of-type{border-top:none}.access-user.inactive{opacity:.53}.access-user-icon{background:#e3f2eb;color:#1d755d;border-radius:10px;min-width:36px;height:36px;display:grid;place-items:center;font-weight:800}.access-user>div:nth-child(2){flex:1;min-width:0}.access-user strong{font-size:12px;display:block}.access-user small{font-size:10px;color:#82999e}.access-toggle{display:flex;align-items:center;gap:8px;padding:10px 0;font-size:13px}.founder-welcome{background:linear-gradient(120deg,#123c40,#176f5a);color:white;border-radius:20px;padding:25px;margin-bottom:15px}.founder-welcome span{font-size:10px;letter-spacing:1.3px;color:#a4e2ce}.founder-welcome h2{font-size:23px;margin:9px 0}.founder-welcome p{font-size:12px;color:#cbe3dc}.access-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
@media(max-width:720px){.auth-gate{align-items:start;padding:calc(15px + env(safe-area-inset-top)) 12px 25px}.login-panel{padding:22px 17px;border-radius:22px}.login-role-block{padding:10px 11px}.login-role-block>small{margin-bottom:6px}.login-role-users{gap:5px}.login-user{min-height:43px}.mobile-account{max-width:113px}.access-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.account-top{display:none}}
/* Explicitly honor denied-action hidden state even when .btn sets display:flex. */
[data-action][hidden], form[hidden], .route-crumb[hidden]{display:none!important}

.role-workspace{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:#eaf5ef;border:1px solid #cfe7da;border-radius:15px;padding:12px 14px;margin-bottom:13px}.role-workspace>div:first-child{display:grid;gap:3px}.role-workspace span{font-size:9px;letter-spacing:.8px;color:#638f7c;font-weight:800}.role-workspace strong{font-size:13px;color:#1d5b4c}.role-workspace>div:last-child{display:flex;flex-wrap:wrap;gap:7px}.role-workspace .btn{min-height:35px!important;font-size:11px;padding:8px 10px}

/* v20: one library, easy targets, clear disabled empty states */
.library-intro{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:20px 18px;background:linear-gradient(125deg,#edf7f3,#f7faf9);border:1px solid #d6e8e2;border-radius:20px}
.library-intro-icon{width:55px;height:55px;display:grid;place-items:center;flex-shrink:0;border-radius:15px;background:#d9eee5;color:#216955;font-size:30px}
.library-intro h2{font-size:23px;color:#163b3c;margin:0 0 4px}.library-intro p{font-size:13px;color:#577478;margin:0}
.library-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 16px}
.library-tabs button{min-width:0;border:1px solid #dce9e4;border-radius:13px;padding:12px 5px;display:flex;align-items:center;justify-content:center;gap:5px;background:white;color:#587176;font-weight:750;font-size:12px;cursor:pointer}
.library-tabs button.active{background:#185c50;color:white;border-color:#185c50}
.library-tabs button span{font-size:17px}.library-panel{min-height:170px}
.library-empty{background:white;border:1px dashed #c8ddd4;border-radius:20px;text-align:center;padding:28px 20px;display:flex;flex-direction:column;align-items:center;gap:10px}
.library-empty-icon{display:grid;place-items:center;width:64px;height:64px;background:#ecf6f1;border-radius:18px;font-size:32px;color:#286d58}
.library-empty h3{font-size:18px;margin:2px 0;color:#173e3a}.library-empty p{max-width:410px;font-size:14px;line-height:1.55;color:#4e696b;margin:0}
.library-empty small{font-size:11px;line-height:1.5;color:#72898a;max-width:410px}.library-methods-note{font-size:12px;margin:0 0 11px;color:#5b7777}
@media(max-width:600px){.library-tabs button{font-size:11px;flex-direction:column;min-height:58px;gap:2px}.library-intro{padding:14px}.library-intro h2{font-size:20px}.library-empty{padding:26px 15px}.resource-grid{grid-template-columns:1fr}.resource-card p{min-height:0}}

/* RECOVERY STAFF AI v21 — quiet navigation. Five bottom actions, no ambiguous "Ещё". */
.hub-intro-simple {margin-bottom:18px}
.hub-simple-section{margin:0 0 17px}
.hub-simple-section h3,.home-links-simple h3{font-size:15px;font-weight:820;color:#204943;margin:0 0 11px}
.hub-tile-simple{min-height:64px;box-shadow:none;padding:11px 14px}
.hub-tile-simple .hub-tile-icon{width:37px;height:37px;font-size:20px}
.hub-tile-simple .hub-tile-copy strong{font-size:13px}
.hub-advanced{background:#fff;border:1px solid #dce9e3;border-radius:17px;margin:12px 0 20px;overflow:hidden}
.hub-advanced>summary{padding:17px 16px;display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:14px;color:#244e48;cursor:pointer;list-style:none}
.hub-advanced>summary::-webkit-details-marker{display:none}
.hub-advanced[open]>summary{border-bottom:1px solid #e5eeea}
.hub-advanced-body{padding:17px 14px}
.hub-advanced .hub-group-head h3{font-size:14px}
.hub-advanced .hub-grid{gap:8px}
.hub-advanced .hub-tile{background:#f9fbfa;min-height:55px;box-shadow:none}
.hub-advanced .hub-tile-icon{background:#edf3f1;color:#50796b}
.home-links-simple{margin-top:22px}
.home-links-simple .home-simple-links{margin:0 0 11px}
.home-links-simple .home-simple-links button{min-height:67px;grid-template-columns:21px 1fr 12px;grid-template-rows:1fr;padding:13px 11px;gap:8px;font-size:19px;box-shadow:none}
.home-links-simple .home-simple-links strong{font-size:12px;line-height:1.25}
.home-links-simple .home-simple-links span{grid-column:3;grid-row:1;line-height:1;font-size:19px}
.home-all-tools{display:flex;width:100%;align-items:center;justify-content:flex-start;gap:10px;background:#fff;border:1px solid #dce9e4;color:#29574c;border-radius:13px;padding:14px 15px;cursor:pointer;text-align:left}
.home-all-tools strong{font-size:13px;flex:1}
.home-all-tools>span:first-child{font-size:19px}
.home-all-tools>span:last-child{font-size:19px}
@media(max-width:380px){.home-links-simple .home-simple-links button{padding:10px 8px;gap:5px}.home-links-simple .home-simple-links strong{font-size:11px}}

/* Compact home priority list; details are available on request. */
.home-focus{padding:17px 16px;background:#fff;border:1px solid #e3ebe9;border-radius:18px;margin:13px 0 18px;box-shadow:0 3px 13px #12352408}
.home-focus-top{display:flex;align-items:center;gap:9px;margin-bottom:10px}
.home-focus-top h3{font-size:16px;margin:0;color:#234a43}
.home-focus-top>span{border-radius:20px;background:#edf5f0;color:#2b7b62;font-size:12px;font-weight:750;padding:3px 9px}
.home-focus-row{display:flex;gap:10px;align-items:center;border-top:1px solid #edf2ef;padding:11px 0}
.home-focus-dot{width:8px;height:8px;border-radius:50%;background:#d7aa50;flex-shrink:0}
.home-focus-dot.danger{background:#d45f4c}
.home-focus-dot.family{background:#3889b1}
.home-focus-text{min-width:0;flex:1}
.home-focus-text strong{display:block;color:#28443d;font-size:12px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-focus-text small{display:block;color:#7a9089;font-size:10px;margin-top:3px}
.home-focus-row .btn{padding:8px 10px;font-size:10px;border-radius:8px;flex-shrink:0;max-width:100px;white-space:normal;line-height:1.2;text-align:center}
.home-focus-all{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;background:#f2f8f4;border:0;color:#28644f;border-radius:11px;padding:12px;font-size:12px;font-weight:800;cursor:pointer;margin-top:7px}
.home-focus-all>span{font-size:18px}
@media(max-width:375px){.home-focus{padding:14px 11px}.home-focus-row{gap:6px}.home-focus-row .btn{padding:7px;font-size:9px;max-width:84px}}

/* v22 · Two-day shift: simple daily checklist and traceable handover */
.shift-select-wrap{background:#fff;border:1px solid #ddebe4;border-radius:14px;padding:12px 14px;margin:12px 0}
.shift-select-wrap label{display:block;color:#506c63;font-size:12px;font-weight:750;margin-bottom:6px}
.shift-empty{padding:29px 21px;text-align:center}
.shift-empty h3{margin:0 0 9px;color:#214f41}
.shift-empty p{font-size:13px;color:#657c74;max-width:440px;margin:0 auto 16px}
.shift-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#195a48,#2e8068);color:#fff;border-radius:20px;padding:19px 20px;margin:12px 0 0;box-shadow:0 9px 27px #174c3e25}
.shift-hero>div:first-child{min-width:0}
.shift-hero>div:first-child>span{display:block;font-size:12px;opacity:.82;font-weight:700}
.shift-hero h2{font-size:clamp(17px,3vw,25px);margin:5px 0 5px;color:#fff;line-height:1.2}
.shift-hero p{margin:0;color:#e1f3e7;font-size:12px}
.shift-hero-count{text-align:center;flex-shrink:0}
.shift-hero-count strong{display:block;font-size:25px;line-height:1.15;font-weight:850}
.shift-hero-count small{font-size:11px;color:#d7efe6}
.shift-progress{height:6px;border-radius:8px;background:#ddece2;overflow:hidden;margin:0 5px 14px}
.shift-progress span{display:block;height:100%;background:#5dbd8e;transition:width .2s}
.shift-quick-actions,.shift-footer-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}
.shift-quick-actions .btn{flex:1;min-width:145px}
.shift-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:19px}
.shift-day{border-radius:17px;background:#fff;border:1px solid #ddeae5;min-width:0;padding:14px 15px;box-shadow:0 4px 15px #1c4a3a09}
.shift-day-heading{display:flex;align-items:start;justify-content:space-between;gap:9px;padding-bottom:10px;border-bottom:1px solid #ebf1ed;margin-bottom:10px}
.shift-day-heading>div>span{font-size:10px;letter-spacing:.1em;font-weight:850;color:#538574}
.shift-day-heading h3{font-size:16px;margin:2px 0;color:#254e42}
.shift-day-empty{padding:18px;text-align:center;font-size:12px;color:#789088}
.shift-task{display:flex;align-items:flex-start;gap:9px;border-bottom:1px solid #eef2ef;padding:12px 0}
.shift-task:last-child{border-bottom:0}
.shift-check{border:1.5px solid #c2d6cc;background:#f6faf7;color:#2a7861;width:32px;height:32px;border-radius:50%;flex-shrink:0;font-size:21px;cursor:pointer;display:grid;place-items:center}
.shift-check:disabled{opacity:.46;cursor:default}
.shift-task-done .shift-check{background:#e2f4e8;color:#146c4c;border-color:#afd8be}
.shift-task-detail{flex:1;min-width:0}
.shift-task-detail strong{display:block;color:#25463d;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.shift-task-done .shift-task-detail strong{color:#6c887b}
.shift-task-detail small{display:block;font-size:10px;color:#718e80;margin-top:5px;line-height:1.35;overflow-wrap:anywhere}
.shift-task-actions{display:flex;gap:3px}
.shift-task-actions button{border:0;background:#f1f7f3;color:#54766c;padding:6px 8px;min-width:27px;min-height:27px;border-radius:8px;cursor:pointer;font-size:15px}
.shift-day-note{background:#f6faf7;border-radius:11px;margin-top:10px;padding:10px 12px}
.shift-day-note span{font-weight:800;font-size:10px;color:#37765e}
.shift-day-note p{font-size:12px;line-height:1.55;margin:4px 0 0;color:#4c655b;overflow-wrap:anywhere}
.shift-manager-action{margin:8px 0 18px}
.shift-document-header{margin:20px 0 12px}
.shift-document-header h2{font-size:21px;color:#284c40;margin:0 0 5px}
.shift-document-header p{font-size:12px;color:#789184;margin:0}
.shift-handover-document{background:#fff;border:1px solid #dce9e2;border-radius:18px;overflow:hidden}
.shift-handover-caption{font-size:11px;font-weight:750;letter-spacing:.025em;color:#547466;background:#f0f8f2;padding:12px 15px}
.shift-block{padding:14px 17px;border-top:1px solid #ebf0eb}
.shift-block-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}
.shift-block-heading h3{margin:0;font-size:13px;color:#2a5445;line-height:1.35}
.shift-block-heading>b{font-size:12px;color:#487667;background:#ebf4ee;border-radius:20px;min-width:22px;padding:3px 6px;text-align:center}
.shift-block .muted-note{margin:8px 0 0;font-size:11px}
.shift-document-item{border-top:1px solid #edf2ee;padding:10px 0 4px;overflow-wrap:anywhere}
.shift-document-item b{display:block;font-size:12px;color:#2b4c3e;line-height:1.4}
.shift-document-item small{display:block;font-size:10px;color:#7b9185;margin-top:5px;line-height:1.35}
.shift-document-item p{font-size:12px;line-height:1.5;color:#49645a;margin:6px 0 3px;white-space:pre-wrap}
.shift-document-item.shift-open b{color:#956d26}
.shift-ai-disclaimer{font-size:11px;color:#7f8f89;line-height:1.5;margin:6px 0}
.shift-summary-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0}
.shift-summary-metrics span{display:flex;flex-direction:column;background:#fff;border:1px solid #e1eae5;border-radius:13px;padding:13px 10px;font-size:11px;color:#628172;text-align:center}
.shift-summary-metrics b{font-size:21px;color:#275644;margin-bottom:3px}
.shift-handover-card{background:#fff;border:1px solid #deeae3;border-radius:17px;padding:13px 14px;margin:14px 0}
.shift-handover-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.shift-handover-card-top strong{font-size:14px;color:#264939;display:block}
.shift-handover-card-top small{font-size:11px;color:#71877d}
.shift-handover-card>p{font-size:12px;color:#60776a;margin:12px 0;overflow-wrap:anywhere}
.shift-handover-card .shift-handover-document{border-radius:13px}
@media(max-width:740px){.shift-days{grid-template-columns:1fr}.shift-day{padding:12px 13px}.shift-hero{padding:17px 15px}.shift-hero-count strong{font-size:21px}.shift-block{padding:13px 12px}.shift-footer-actions .btn{flex:1;min-width:145px}.shift-handover-card{padding:10px}}

.shift-incoming{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f0f8f0;border:1px solid #cbe2d1;border-radius:14px;padding:13px 15px;margin:12px 0}
.shift-incoming b{display:block;font-size:13px;color:#226048}
.shift-incoming small{display:block;font-size:11px;color:#6a8a79;margin-top:3px}
@media(max-width:430px){.shift-incoming{align-items:stretch;flex-direction:column}.shift-incoming .btn{width:100%;justify-content:center}}

/* v23 — precise brand identity from the original Recovery Clinic emblem. */
.brand-mark,.workspace-icon,.mobile-brand-logo,.login-logo{overflow:hidden!important;background:#fff!important;box-shadow:0 0 0 1px rgba(255,255,255,.23),0 3px 9px rgba(0,30,35,.11)!important}
.brand-mark img,.workspace-icon img,.mobile-brand-logo img,.login-logo img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}
.brand-mark{width:43px!important;height:43px!important;border-radius:12px!important;flex:0 0 43px}
.workspace-icon{width:38px!important;height:38px!important;border-radius:11px!important;flex:0 0 38px}
.mobile-brand-logo{width:40px!important;height:40px!important;border-radius:11px!important;flex:0 0 40px!important}
.login-logo{width:68px!important;height:68px!important;border-radius:17px!important;margin-bottom:16px!important}
.v23-hero-seal{position:absolute;right:21px;top:48px;width:76px;height:76px;object-fit:contain;border-radius:50%;box-shadow:0 4px 18px rgba(1,24,21,.22);background:#fff;z-index:1}
.v9-home-hero>.v9-hero-caption,.v9-home-hero>h2,.v9-home-hero>p{padding-right:84px}
.command-eyebrow{display:flex;align-items:center;gap:10px}
.v23-inline-seal{flex:0 0 30px;width:30px;height:30px;object-fit:contain;background:#fff;border-radius:50%;box-shadow:0 0 0 1px #ffffff3b}
@media(max-width:720px){
 .mobile-brand-logo{width:39px!important;height:39px!important;flex-basis:39px!important}
 .mobile-brand{gap:8px!important}
 .v23-hero-seal{width:62px;height:62px;top:43px;right:13px}
 .v9-home-hero>.v9-hero-caption,.v9-home-hero>h2,.v9-home-hero>p{padding-right:68px}
 .v23-inline-seal{width:25px;height:25px;flex-basis:25px}
}
@media(max-width:375px){
 .mobile-brand-logo{width:34px!important;height:34px!important;flex-basis:34px!important}
 .v23-hero-seal{width:53px;height:53px;top:39px}
}

/* Production admission and API status */
.production-login{max-width:480px!important}
.production-login .login-sub{line-height:1.6}
.production-login form{display:grid;gap:14px;margin:22px auto 10px;text-align:left}
.production-login .form-field{margin:0}
.launch-pending{margin-top:23px;padding:20px;border:1px solid #dce9e4;border-radius:18px;background:#f4f9f7;text-align:center;color:#173f36}
.launch-pending p{margin:8px 0 0;color:#5b7570;font-size:14px;line-height:1.5}
.launch-pending-indicator{display:block;width:15px;height:15px;border-radius:50%;background:#c68c30;margin:0 auto 9px;box-shadow:0 0 0 6px #f3e7c8}
.live-statusbar{display:flex;gap:8px;align-items:center;background:#eef6f3;color:#246d55;font-size:12px;padding:8px 18px;border-radius:13px;margin:0 0 12px}
.live-status-icon{font-size:9px}
#authGate:not([hidden]){z-index:1000}
#resetDesktop{display:none!important}

/* v27: separated, nonpersistent UI-review workspace */
.review-preview-banner{display:flex;align-items:flex-start;flex-wrap:wrap;gap:6px 12px;margin:8px 0 12px;padding:12px 14px;background:#fff9e9;border:1px solid #e5cc87;border-radius:14px;color:#3d4b37;font-size:12px;line-height:1.45}
.review-preview-banner strong{font-size:13px;color:#285b4d}
.review-preview-banner span{flex:1 1 230px}
.review-preview-banner a{color:#10664e;font-weight:700;white-space:nowrap;text-decoration:underline}
.preview-entry{border-radius:14px;min-height:48px}
@media(max-width:480px){.review-preview-banner{margin:7px 0 13px;font-size:11px}.review-preview-banner a{margin-left:auto}}

/* v28: one clear workflow on mobile; test roles only in nonpersistent review mode */
.preview-role-picker{flex:1 1 100%;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:650;color:#124d3e}
.preview-role-picker select{background:#fff;color:#174a3e;border:1px solid #bcceca;border-radius:9px;padding:9px 12px;min-width:170px;font-size:14px;max-width:62%}
.resident-top-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}
.resident-top-actions .btn{min-height:46px;font-weight:760}
.resident-secondary-actions{margin-top:8px}
.resident-secondary-actions .btn{font-size:12px}
.resident-more-actions{border:1px solid #dcebe5;border-radius:14px;padding:12px;margin:13px 0;background:#f8fbf9}
.resident-more-actions summary{font-weight:700;color:#135b46;cursor:pointer}
.resident-more-links{display:flex;gap:8px;flex-wrap:wrap;padding-top:14px}
.resident-duplicate-hint{margin-top:8px}
.duplicate-match{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.duplicate-match span{font-size:13px;line-height:1.4}
.shift-carried-label{display:block;color:#146b53!important;font-weight:700;margin-top:3px}
@media(max-width:390px){.resident-top-actions{gap:7px}.preview-role-picker select{min-width:130px}.resident-more-links{flex-direction:column}}

/* Recovery STAFF 29 · management and human-reviewed proposals */
.staff-v29-digest{background:linear-gradient(125deg,#103844 0%,#1e5255 100%);color:#fff;padding:20px;border-radius:20px;margin:0 0 20px;box-shadow:0 14px 30px rgba(21,64,65,.13)}
.staff-v29-digest-head{display:flex;justify-content:space-between;align-items:start;gap:12px}.staff-v29-digest-head span{font-size:10px;letter-spacing:.15em;color:#c3e4de}.staff-v29-digest-head h3{font-size:21px;line-height:1.25;margin:6px 0}.staff-v29-digest-head p{font-size:12px;color:#d1e5e1;margin:0}.staff-v29-digest-head button{border:1px solid #7caead;background:#ffffff14;color:#fff;padding:10px;border-radius:10px;cursor:pointer;white-space:nowrap;font-weight:600}
.staff-v29-digest-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:19px}.staff-v29-digest-grid>div{background:#ffffff14;border:1px solid #ffffff22;border-radius:13px;padding:12px 9px}.staff-v29-digest-grid b{font-size:24px;display:block;font-variant-numeric:tabular-nums}.staff-v29-digest-grid small{font-size:10px;color:#e1f1ec;line-height:1.35;display:block}.staff-v29-digest-hint{padding-top:14px;margin-top:13px;border-top:1px solid #ffffff30;color:#e5f5f2;font-size:12px}
.staff-v29-cadence{padding:18px;background:#eaf4f1;border:1px solid #c9e2da;border-radius:18px;margin-bottom:18px}.staff-v29-cadence strong{color:#174448}.staff-v29-cadence p{font-size:13px;margin:5px 0 12px;color:#506e6a}.staff-v29-cadence-grid{display:flex;flex-wrap:wrap;gap:8px}.staff-v29-cadence-grid span{background:white;border-radius:10px;padding:10px 12px;color:#174448;font-size:12px;font-weight:600}
.staff-v29-task-link{border:1px solid #c8e1da;background:#f2faf7;border-radius:14px;padding:14px;margin:14px 0}.staff-v29-task-link>label{font-weight:700;font-size:13px;display:flex;align-items:center;gap:8px}.staff-v29-task-link .form-grid{margin:11px 0}.staff-v29-task-link small,.staff-v29-linked{font-size:12px;color:#336d63}.staff-v29-options{display:grid;gap:9px;margin:15px 0}.staff-v29-options>label{display:flex;gap:10px;align-items:start;border:1px solid #d9e5e1;border-radius:13px;padding:12px;cursor:pointer}.staff-v29-options input{margin-top:3px;accent-color:#237e68}.staff-v29-options span{font-size:13px;line-height:1.5}.rec-propose{border:1px solid #b5d6cd;border-radius:10px;background:#ebf8f3;color:#145d50;font-size:12px;font-weight:750;cursor:pointer;padding:10px;margin:9px 8px 0 0}.staff-v29-proposals{border:1px solid #d5e5df;background:#f7faf9;border-radius:18px;padding:17px;margin:14px 0}.staff-v29-proposals>h3{margin:0 0 5px}.staff-v29-proposals>p{color:#56716b;font-size:13px;margin-bottom:11px}.staff-v29-proposal{background:#fff;border:1px solid #e2ebe7;padding:13px;margin:9px 0;border-radius:12px}.staff-v29-proposal strong{display:block;font-size:13px}.staff-v29-proposal small{display:block;color:#627974;margin:6px 0}.staff-v29-proposal p{font-size:12px;color:#57726e}
@media(max-width:620px){.staff-v29-digest{padding:16px;border-radius:17px}.staff-v29-digest-head h3{font-size:18px}.staff-v29-digest-head button{font-size:11px;padding:8px}.staff-v29-digest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-v29-digest-grid b{font-size:21px}.staff-v29-cadence-grid{flex-direction:column}}

/* V30 · единый интеллектуальный журнал */
.smart-journal{border:1px solid #cddfe0;background:linear-gradient(145deg,#f5fbf9 0%,#ffffff 62%);border-radius:22px;padding:20px;margin:22px 0;box-shadow:0 8px 28px rgba(5,38,46,.045)}
.smart-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.smart-head h2{font-size:23px;margin:4px 0}.smart-head p{color:#546970;margin:0;font-size:14px;line-height:1.45}.smart-eyebrow{font-weight:750;color:#28645c;font-size:10px;letter-spacing:.15em}.smart-chip{display:inline-flex;white-space:nowrap;color:#22675b;background:#e5f4ef;padding:8px 10px;border-radius:20px;font-size:11px;font-weight:700}
.smart-journal label{display:block;font-weight:700;margin:0 0 8px}.smart-text{min-height:150px;line-height:1.6}.smart-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:12px 0;flex-wrap:wrap}.smart-journal form>small,.smart-review-card small{display:block;color:#71848a;font-size:12px;line-height:1.5}
.smart-review-card{border:1px solid #d8e6e3;border-radius:16px;padding:16px;margin:12px 0;background:#fff}.smart-review-name{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;font-weight:750}.smart-targets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:11px 0}.smart-targets label{display:flex;align-items:center;gap:8px;border:1px solid #e4eeeb;border-radius:12px;padding:10px;background:#f7fbfa;font-size:12px;font-weight:600}.smart-targets input{accent-color:#1e7469;width:17px;height:17px;flex:none}.smart-review-card .form-field{margin:10px 0}
.smart-history{margin-top:14px;border-top:1px solid #dbe8e5;padding-top:12px}.smart-history>div{display:flex;gap:8px;justify-content:space-between;margin-top:7px;font-size:12px;color:#586f74}.smart-history>div small{font-size:11px}.smart-assigned,.smart-family{background:#fff;border:1px solid #dfe9e8;border-radius:16px;padding:16px;margin:12px 0}.smart-assigned h3,.smart-family h3{margin:0 0 10px;font-size:17px}.smart-assigned-row,.smart-family>div{border-top:1px solid #ecf1ef;padding:11px 0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}.smart-assigned-row small,.smart-family small{color:#6d8084;font-size:12px}.smart-family p{margin:4px 0;line-height:1.55}
@media(max-width:650px){.smart-journal{padding:15px;border-radius:17px;margin:14px 0}.smart-head{align-items:flex-start}.smart-head h2{font-size:20px}.smart-actions{flex-direction:column;align-items:stretch}.smart-actions button{width:100%}.smart-targets{grid-template-columns:1fr}.smart-review-card{padding:12px}}

@media(max-width:650px){.smart-head{display:block}.smart-head .smart-chip{margin-top:12px}.smart-head h2{font-size:23px;margin-top:6px}}

/* v31 · confirm identity before writing patient history */
.smart-person-select{width:100%;border-color:#a1bbb5 !important;min-height:44px;margin:5px 0}
.smart-alias-confirm{background:#f2f8f5;border:1px solid #d7e9e2;padding:12px;border-radius:12px;margin:8px 0 14px}
.smart-alias-checkbox{display:flex !important;align-items:center;gap:9px;font-weight:700;font-size:13px;margin-bottom:8px}
.smart-alias-checkbox input{width:18px;height:18px;accent-color:#176e5c}
.smart-alias-confirm small,.smart-review-card select+small{display:block;color:#688079;margin-top:5px}
.smart-directory{max-height:52vh;overflow-y:auto;border:1px solid #ddeae5;border-radius:14px;margin-top:10px}
.smart-directory-row{padding:12px 13px;border-bottom:1px solid #e6f0eb;display:flex;flex-direction:column;gap:4px}
.smart-directory-row:last-child{border-bottom:0}.smart-directory-row b{font-size:13px}.smart-directory-row small{font-size:12px;color:#6f837c}

/* Recovery AI v32 — responsive, sober evidence-linked operational panel */
.ai-v32-panel{background:linear-gradient(125deg,#f3faf7,#fff 47%);border:1px solid #cfe4dc;border-radius:20px;padding:19px;margin:0 0 22px;box-shadow:0 8px 30px rgba(13,57,52,.035)}
.ai-v32-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ai-v32-kicker{font-size:10px;letter-spacing:.13em;color:#247b67;font-weight:800}.ai-v32-header h3{font-size:21px;letter-spacing:-.04em;margin:6px 0}.ai-v32-header p{color:#617279;font-size:13px;margin:0;line-height:1.45}.ai-v32-count{border:1px solid #cfe4dc;border-radius:14px;min-width:66px;background:#fff;text-align:center;padding:6px 9px;font-weight:700;font-size:23px;color:#183f37}.ai-v32-count small{display:block;color:#7b918b;font-size:10px;font-weight:500}.ai-v32-rows{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:10px;margin:16px 0}.ai-v32-item{background:#fff;border:1px solid #e2eee8;padding:14px;border-radius:14px;min-width:0}.ai-v32-item-head{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-bottom:7px}.ai-v32-priority{font-size:10px;font-weight:700;letter-spacing:.02em;border-radius:6px;background:#eef4f2;color:#386d5b;padding:4px 7px}.ai-v32-priority.is-urgent{color:#a14939;background:#fdf1ef}.ai-v32-origin{font-size:11px;color:#697e82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-v32-item strong{font-size:14px;color:#223e42}.ai-v32-item p{font-size:12px;line-height:1.5;color:#5d6d74;margin:7px 0}.ai-v32-item small{display:block;font-size:10px;color:#798e92;overflow-wrap:anywhere}.ai-v32-controls{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.ai-v32-controls button{font-size:11px}.ai-v32-empty{padding:15px;color:#64767a;font-size:13px;background:#fff;border-radius:12px}.ai-v32-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#5e7a74;font-size:11px}.ai-v32-disabled{padding:8px 10px;background:#e7f0ed;border-radius:9px;color:#4c766b}.ai-v32-choices{display:grid;gap:10px;margin:13px 0}.ai-v32-choices>div{display:flex;gap:12px;padding:12px;border:1px solid #e1e9e7;border-radius:10px}.ai-v32-choices>div>span{font-weight:700;color:#347563}.ai-v32-choices p{margin:0;font-size:13px;line-height:1.55}.ai-v32-choices small{font-size:11px;color:#708382}
@media(max-width:600px){.ai-v32-panel{padding:14px;border-radius:18px;margin:3px 0 16px}.ai-v32-header h3{font-size:18px}.ai-v32-header p{font-size:12px}.ai-v32-rows{grid-template-columns:1fr}.ai-v32-count{min-width:55px;font-size:20px}}

/* v34: focused single-entry workflow and transparent post-save review. */
.smart-main-submit{width:100%;min-height:50px;margin:12px 0 4px;font-weight:750;border-radius:13px}
.smart-draft-row{display:flex;justify-content:space-between;gap:10px;margin-top:7px;font-size:11px;color:#647e7a}
.smart-more{border-top:1px solid #e0ebe6;margin-top:13px;padding-top:10px}
.smart-more summary{cursor:pointer;font-size:12px;font-weight:650;color:#426c65;display:flex;justify-content:space-between;list-style:none}
.smart-more summary::-webkit-details-marker{display:none}
.smart-more-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.smart-safety-note{display:block;padding-top:9px;font-size:12px;line-height:1.5;color:#687c78}
.smart-home-action{display:flex;gap:12px;width:100%;align-items:center;text-align:left;background:linear-gradient(110deg,#163f3b,#236a5a);color:white;border:0;border-radius:18px;padding:17px;margin:9px 0 14px;cursor:pointer}
.smart-home-action-icon{background:#ffffff22;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;font-size:23px;flex-shrink:0}
.smart-home-action strong,.smart-home-action small{display:block}.smart-home-action strong{font-size:15px;color:white}.smart-home-action small{font-size:11px;color:#d0ede3;margin-top:4px}
.smart-home-arrow{margin-left:auto;font-size:25px;color:#d0ede3}
.smart-result{border:1px solid #c9e7d4;border-radius:15px;padding:15px;background:#f2faf4;margin:14px 0}
.smart-result-head{display:flex;align-items:center;gap:10px}.smart-result-head strong,.smart-result-head small{display:block}.smart-result-head small{color:#58766a;font-size:11px;margin-top:3px}
.smart-result-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#197b56;color:white;font-weight:850}
.smart-result-stats{display:flex;flex-wrap:wrap;gap:7px;margin:13px 0}.smart-result-stats span{background:white;border:1px solid #d9e9dc;border-radius:9px;padding:7px 9px;font-size:12px}.smart-result-stats b{color:#176e54}
.smart-result-links{display:flex;flex-wrap:wrap;gap:7px}.smart-result-warning{font-size:12px;color:#8b5821}
.smart-history-row{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:15px;border:0;border-bottom:1px solid #e4eeeb;padding:11px 0;background:transparent;color:#173b36;cursor:pointer}
.smart-history-row strong,.smart-history-row small{display:block;font-size:12px}.smart-history-row small{color:#68817a;margin-top:3px}.smart-history-row>span:last-child{font-size:11px;color:#42665e;white-space:nowrap}
.smart-source-original{background:#f5f9f7;border:1px solid #e1ece7;border-radius:12px;padding:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.smart-unassigned-confirm{display:flex!important;align-items:flex-start;gap:9px;margin-top:10px!important;font-size:13px;font-weight:650;line-height:1.45}
.smart-unassigned-confirm input{width:18px;height:18px;flex:none;margin-top:2px}
@media(max-width:650px){.smart-result-stats{display:grid;grid-template-columns:1fr 1fr}.smart-more-actions .btn{width:100%}.smart-home-action{padding:14px}.smart-result-links .btn{flex:1}}

.shift-document-fold{margin:18px 0;border:1px solid #dbe8e5;border-radius:16px;background:white;overflow:hidden}
.shift-document-fold>summary{display:flex;align-items:center;gap:10px;padding:15px;cursor:pointer;list-style:none}
.shift-document-fold>summary::-webkit-details-marker{display:none}
.shift-document-fold>summary b{color:#174a40;font-size:15px;white-space:nowrap}
.shift-document-fold>summary small{color:#607e76;font-size:11px;line-height:1.35;margin-left:auto}
.shift-document-fold>summary span{font-size:22px;color:#246253}.shift-document-fold[open]>summary{border-bottom:1px solid #e4efeb}
.shift-document-fold[open]>summary span{transform:rotate(180deg)}
.shift-document-fold .shift-handover-document{margin:0;border:0}
@media(max-width:650px){.shift-document-fold>summary{flex-wrap:wrap}.shift-document-fold>summary small{order:3;width:100%;margin:0}}

/* v35 · continuous 2/4 consultant rotation */
.rotation-section{background:linear-gradient(145deg,#fff,#f6fbf9);border:1px solid #dbe9e4;border-radius:20px;padding:18px;margin:14px 0 18px;box-shadow:0 8px 24px rgba(17,64,54,.05)}
.rotation-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.rotation-top h3{font-size:19px;line-height:1.3;margin:4px 0 5px;color:#143a32}.rotation-eyebrow{font-size:10px;font-weight:750;letter-spacing:.12em;color:#578a79}.rotation-top p{font-size:12px;color:#6b7e77;margin:0;max-width:450px}.rotation-active{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:8px;margin:17px 0 12px;padding:15px;border-radius:15px;background:#15493b;color:white}.rotation-active>div:not(.rotation-arrow){display:flex;flex-direction:column;min-width:0;gap:4px}.rotation-active small{color:#b7d9cc;font-size:11px}.rotation-active b{color:white;font-size:22px}.rotation-active span{color:#d8ebe3;font-size:11px;white-space:normal}.rotation-arrow{font-size:22px;color:#a6d0bd;text-align:center}.rotation-list{border:1px solid #e4ece8;border-radius:14px;overflow:hidden}.rotation-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;border-bottom:1px solid #e8eeeb;background:#fff}.rotation-row:last-child{border-bottom:0}.rotation-row.is-current{background:#edf7f2}.rotation-row>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}.rotation-row b{color:#24483d;font-size:13px}.rotation-row small{color:#70817a;font-size:11px}.rotation-row .badge{white-space:nowrap}.rotation-caption{color:#75827c;font-size:11px;margin:10px 1px 0}.rotation-handover-to{font-weight:650!important;color:#176a4c!important;font-size:12px!important;margin:7px 0!important}
@media(max-width:390px){.rotation-section{padding:13px}.rotation-top h3{font-size:17px}.rotation-active{padding:12px;gap:5px}.rotation-active b{font-size:20px}.rotation-active span{font-size:10px}.rotation-top>.badge{font-size:10px}}

.rotation-mini{width:100%;display:flex;align-items:center;gap:12px;margin:12px 0;padding:14px 15px;background:#edf6f2;border:1px solid #d4e4d9;border-radius:15px;text-align:left;color:#225543;cursor:pointer}.rotation-mini-icon{background:#d8eae0;border-radius:11px;padding:9px;font-size:17px}.rotation-mini-body{display:flex;flex-direction:column;flex:1;min-width:0;gap:4px}.rotation-mini-body strong{font-size:12px;line-height:1.35;color:#254c40}.rotation-mini-body small{font-size:11px;line-height:1.4;color:#598271}.rotation-mini>span:last-child{font-size:20px;color:#55826b}

/* Recovery STAFF v36 — two actions to hand over, no intermediate forms. */
.handover-simple-action{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 19px;border-radius:20px;background:linear-gradient(115deg,#edf8f3,#f9fcfa);border:1px solid #c2e3d5;margin:16px 0;box-shadow:0 6px 23px #143b3210}
.handover-simple-action>div{min-width:0;display:flex;flex-direction:column;gap:5px}
.handover-simple-action span{font-size:10px;font-weight:800;letter-spacing:1.2px;color:#397462}
.handover-simple-action strong{font-size:16px;color:#123b32}
.handover-simple-action small{font-size:12px;color:#51776c;line-height:1.45}
.handover-simple-action .btn{flex-shrink:0;min-width:148px;min-height:48px}
.handover-status-wait,.handover-status-done{display:inline-flex;align-items:center;padding:10px 12px;border-radius:12px;background:#fff5e1;color:#87551c;font-size:12px;font-weight:650}
.handover-status-done{background:#e7f6ed;color:#196b4c}
@media(max-width:600px){.handover-simple-action{flex-direction:column;align-items:stretch;padding:16px}.handover-simple-action .btn{width:100%}.handover-simple-action strong{font-size:15px}}


/* Recovery STAFF v37 — consultant-first shift workspace, small screens first */
.v37-dashboard{display:grid;gap:14px;margin:16px 0 22px;min-width:0}
.v37-focus-head{display:flex;gap:10px;align-items:flex-start;justify-content:space-between;padding:23px;border-radius:20px;background:linear-gradient(138deg,#183f45 0%,#1e5a58 65%,#317665 100%);color:white;box-shadow:0 13px 30px rgba(22,65,64,.12)}
.v37-focus-head h2{font-size:clamp(21px,3vw,29px);line-height:1.2;letter-spacing:-.7px;margin:6px 0}.v37-focus-head p{color:#d9ebe6;font-size:13px;margin:0}.v37-focus-head .badge{flex-shrink:0}
.v37-kicker{font-size:10px;font-weight:800;letter-spacing:1.3px;color:#658a8a}.v37-focus-head .v37-kicker{color:#b5e1d5}
.v37-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.v37-metrics>div{border:1px solid #e3eeeb;background:#fff;border-radius:15px;padding:14px 10px;display:flex;flex-direction:column;align-items:center;gap:4px}.v37-metrics b{font-size:26px;line-height:1;font-variant-numeric:tabular-nums;color:#173d41}.v37-metrics span{font-size:11px;color:#67817d}.v37-metrics .is-late b{color:#ad4d30}
.v37-todo,.v37-residents,.v37-brief,.v37-incoming-panel{background:#fff;border:1px solid #dfece8;border-radius:18px;padding:17px;min-width:0}
.v37-section-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:13px}.v37-section-heading h3{font-size:17px;margin:3px 0 0;color:#173e43;letter-spacing:-.35px}.v37-section-heading .btn{flex-shrink:0}
.v37-todo-row{display:flex;align-items:center;gap:10px;border-top:1px solid #edf3f1;padding:12px 0}.v37-check{background:#e9f5f0;border:1px solid #bddfce;color:#277e62;border-radius:11px;min-width:38px;width:38px;height:38px;font-size:18px;font-weight:bold;cursor:pointer}.v37-check:disabled{opacity:.45;cursor:not-allowed}.v37-todo-text{flex:1;min-width:0}.v37-todo-text b{display:block;font-size:13px;overflow-wrap:anywhere;color:#19414a}.v37-todo-text small{display:block;margin-top:3px;color:#6a827f;font-size:11px;line-height:1.4}.v37-empty{color:#6b8380;font-size:13px;line-height:1.5}.v37-description{color:#6b8581;font-size:12px;line-height:1.55;margin:3px 0 12px}
.v37-resident-search input{width:100%;border:1px solid #d8e8e2;border-radius:12px;background:#f6faf8;padding:13px 14px;font:inherit;font-size:14px;outline-offset:2px;box-sizing:border-box;margin-bottom:9px}.v37-resident-list{max-height:360px;overflow-y:auto}.v37-resident-row{width:100%;display:flex;align-items:center;text-align:left;gap:11px;border:0;border-bottom:1px solid #eef3f0;background:white;padding:10px 2px;cursor:pointer}.v37-resident-row[hidden]{display:none!important}.v37-avatar{flex-shrink:0;width:38px;height:38px;border-radius:13px;background:#e5f2ed;color:#296758;display:grid;place-items:center;font-weight:800}.v37-resident-name{flex:1;min-width:0}.v37-resident-name b{display:block;font-size:13px;color:#173c40}.v37-resident-name small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#6a847d;font-size:11px;margin-top:2px}.v37-resident-count{font-size:11px;white-space:nowrap;color:#427a6a}.v37-no-results{font-size:12px;color:#81918d;margin:9px}
.v37-insights,.v37-rotation-details,.v37-optional{background:#fff;border:1px solid #dfece8;border-radius:16px;min-width:0}.v37-insights>summary,.v37-rotation-details>summary,.v37-optional>summary{cursor:pointer;list-style:none;padding:15px 17px;font-weight:750;font-size:13px;color:#22564f}.v37-insights summary span{float:right;background:#e9f3ef;padding:3px 8px;border-radius:10px}.v37-insights>div{padding:0 18px 10px}.v37-insights>p{font-size:11px;color:#6d8982;padding:0 17px}.v37-insight{border-top:1px solid #edf3f0;padding:10px 0}.v37-insight b{font-size:13px}.v37-insight p{font-size:12px;line-height:1.5}.v37-insight small{font-size:11px;color:#69867b}
.v37-brief{background:#f8fbf9}.v37-priority-list{margin:7px 0 12px;padding-left:24px}.v37-priority-list li{padding:10px 0;border-bottom:1px solid #e7efeb;font-size:12px;color:#244741}.v37-priority-list b{display:block;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.v37-priority-list small{display:block;font-size:10px;color:#69817c;margin-top:4px;overflow-wrap:anywhere}.v37-priority-list .btn{margin-top:6px}.v37-outline-link{padding:9px 0;border:0;background:transparent;color:#267660;font-weight:800;cursor:pointer;font-size:12px}.v37-incoming-panel{background:#f3faf6;border-color:#b5d9c7}.v37-accept-button{width:100%;margin-top:6px}
.v37-primary-actions{display:flex;gap:10px;flex-wrap:wrap}.v37-primary-actions>.btn{flex:1}.v37-voice-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0 4px}.v37-voice-row span{font-size:11px;line-height:1.5;color:#637b74}.v37-voice-button[aria-pressed=true]{background:#b14234;color:#fff;border-color:#b14234}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.v37-rotation-details{margin:12px 0}.v37-rotation-details .rotation-section{margin:0;border:0;border-radius:0}.v37-optional{margin:12px 0}.v37-optional>div,.v37-optional>section{margin:8px}.v37-incoming-panel .v37-brief{border:0;padding:0;background:transparent}
@media(max-width:580px){.v37-focus-head{padding:17px}.v37-todo,.v37-residents,.v37-brief,.v37-incoming-panel{padding:14px}.v37-metrics>div{padding:12px 7px}.v37-focus-head h2{font-size:21px}.v37-primary-actions{flex-direction:column}.v37-voice-row .btn{min-height:44px}.v37-resident-count{max-width:74px;overflow:hidden;text-overflow:ellipsis}}

/* Recovery STAFF v38 — managerial regulation cockpit */
.mg-wrap{display:grid;gap:16px}.mg-hero{background:linear-gradient(120deg,#153747,#1b615a);padding:23px 25px;border-radius:22px;color:white}.mg-kicker{font-size:10px;letter-spacing:1.6px;color:#b5dfd4;font-weight:800}.mg-hero h2{font-size:27px;letter-spacing:-.7px;margin:9px 0}.mg-hero p{color:#cbe1df;font-size:12px;line-height:1.65;margin:0 0 17px}.mg-hero-action{display:flex;flex-wrap:wrap;gap:9px}.mg-hero .btn.primary{background:#d4f1e5;color:#1b4b44;border-color:transparent}.mg-hero .btn.neutral{color:#d7f5ed;border-color:#70a89c;background:#255753}.mg-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.mg-metrics>div{display:flex;flex-direction:column;gap:7px;background:white;border:1px solid #e1ebea;border-radius:15px;padding:16px}.mg-metrics small{font-size:10px;color:#748b92}.mg-metrics strong{font-size:24px;color:#143f43;line-height:1.1;font-variant-numeric:tabular-nums}.mg-metrics span{font-size:10px;color:#83959c;line-height:1.5}.mg-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}.mg-surface{padding:19px 21px;background:white;border:1px solid #dfe9e9;border-radius:18px;min-width:0}.mg-panel-head{display:flex;justify-content:space-between;align-items:center;gap:11px;margin-bottom:13px}.mg-eyebrow{font-size:9px;color:#418778;font-weight:800;letter-spacing:1.3px}.mg-panel-head h3{font-size:18px;letter-spacing:-.3px;margin:4px 0 0}.mg-note{font-size:11px;line-height:1.6;color:#758993;margin:5px 0 16px}.mg-check{display:flex;align-items:start;gap:11px;padding:12px 0;border-bottom:1px solid #edf2f2;cursor:pointer}.mg-check:last-of-type{border:0}.mg-check input{margin-top:3px;accent-color:#1c826e;min-width:16px;min-height:16px}.mg-check>span{display:grid;gap:3px}.mg-check strong{font-size:12px;color:#24454e}.mg-check small{font-size:10px;color:#7b9299;line-height:1.55}.mg-check em{font-style:normal;font-size:10px;color:#167a67}.mg-check:has(input:checked) strong{color:#4f796e}.mg-tool-row,.mg-buttons{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.mg-line{padding:13px 0;border-bottom:1px solid #e8eeee}.mg-line:first-of-type{padding-top:3px}.mg-line:last-child{border:0}.mg-line-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.mg-line-top strong{font-size:12px;line-height:1.35}.mg-line p{font-size:11px;color:#657c85;line-height:1.5;margin:7px 0}.mg-line-meta{font-size:10px;color:#81939b}.mg-line .mg-record{padding:8px;background:#f3f9f6;border-radius:9px}.mg-audit{color:#96a7ad;font-size:9px;line-height:1.7;display:block}.mg-empty{padding:16px;background:#f7faf9;border-radius:12px;color:#788f95;font-size:11px}.mg-areas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mg-area{border:1px solid #e3eeec;border-radius:14px;background:#fafdfe;padding:17px 13px;display:flex;flex-direction:column;align-items:start;gap:9px;cursor:pointer;text-align:left;min-height:140px}.mg-area:hover{border-color:#8cc9b8;background:#f2faf6}.mg-area-icon{font-size:22px;color:#207c69}.mg-area strong{font-size:12px;color:#284b51}.mg-area small{font-size:10px;color:#789199;line-height:1.5}.mg-area em{font-size:10px;font-style:normal;color:#228775;margin-top:auto}.mg-report{font-size:11px;line-height:1.9;white-space:pre-wrap;background:#f6faf9;padding:16px;border-radius:12px;border:1px solid #e1efeb;color:#3b555b}.mg-critical{display:grid;gap:7px;background:#fff1ef;color:#95483f;border:1px solid #f2c4bc;padding:15px;border-radius:14px;font-size:12px}.mg-critical span{font-size:11px;line-height:1.6}.mg-critical .btn{justify-self:start}.mg-privacy{background:#f4f7f6;border:1px solid #ddebe7;padding:15px 17px;border-radius:15px;display:grid;gap:5px;font-size:11px;color:#59777c;line-height:1.6}.mg-privacy b{color:#33595d}
@media(max-width:850px){.mg-layout{grid-template-columns:1fr}.mg-areas{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.mg-hero{padding:19px;border-radius:17px}.mg-hero h2{font-size:23px}.mg-hero-action .btn{flex:1 1 auto;white-space:normal}.mg-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mg-metrics>div{padding:13px}.mg-metrics strong{font-size:22px}.mg-surface{padding:16px;border-radius:15px}.mg-panel-head h3{font-size:16px}.mg-areas{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-area{min-height:136px;padding:12px}.mg-area small{font-size:10px}}

.mg-optional{margin-top:14px;padding:10px 12px;background:#f6faf8;border:1px solid #e1eeea;border-radius:12px}.mg-optional summary{font-size:11px;font-weight:750;color:#306a60;cursor:pointer;padding:3px 0}.mg-optional h4{font-size:12px;margin:17px 0 3px;color:#244c52}.mg-optional .mg-check:last-child{border-bottom:none}

/* v39 — coequal executive management plus founder oversight */
.mg-levels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.mg-levels>div{background:#eaf4ef;border:1px solid #d6e5de;border-radius:16px;padding:14px;display:grid;gap:5px;color:#1c5b4b}.mg-levels strong{font-size:14px}.mg-levels small{font-size:11px;line-height:1.45;color:#4c7568}@media(max-width:620px){.mg-levels{grid-template-columns:1fr}}

/* v40 — deliberate, compact workflow controls. */
.v40-queue,.v40-review-queue{background:#fff;border:1px solid #dde6e5;border-radius:19px;padding:18px;margin:15px 0;min-width:0}
.v40-queue-list{max-height:520px;overflow-y:auto}
.v40-queue-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid #e9efed;min-width:0}
.v40-queue-item>div{min-width:0;flex:1}.v40-queue-item b{display:block;font-size:13px;line-height:1.4;overflow-wrap:anywhere}.v40-queue-item small{display:block;color:#6d8085;font-size:11px;line-height:1.5;margin-top:3px;overflow-wrap:anywhere}.v40-queue-item .btn{flex-shrink:0}
.v40-schedule-head{display:flex;justify-content:flex-end;gap:8px;margin:8px 0}
.v40-schedule-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:14px 0}.v40-schedule-actions details{flex:1;min-width:220px}.v40-schedule-actions summary{font-size:12px;color:#1a665c;font-weight:650;cursor:pointer;padding:8px}
.v40-incident-state{border-radius:11px;background:#fff2df;padding:11px 12px;font-size:12px;color:#87511d}
.v40-quality-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.v40-quality-grid>div{background:#f1f6f4;border-radius:12px;padding:13px;min-width:0}.v40-quality-grid b{font-size:18px;display:block;overflow-wrap:anywhere}.v40-quality-grid small{color:#68817a;font-size:11px;line-height:1.5;display:block;margin-top:5px}
@media(max-width:720px){.v40-quality-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v40-queue-item .btn{font-size:11px;padding:8px 9px}.v40-review-queue,.v40-queue{padding:14px}.v40-schedule-head{justify-content:stretch}.v40-schedule-head .btn{flex:1}}

/* Recovery STAFF v41 — one role, one clear path. No content is deleted. */
.v41-side-helper{margin:22px 0;padding:16px;border:1px solid rgba(255,255,255,.18);border-radius:15px;color:#b6d2c9;font-size:12px;display:flex;flex-direction:column;gap:9px}
.v41-side-helper button{font:inherit;font-weight:700;cursor:pointer;border:1px solid #50a48b;background:rgba(38,138,106,.2);padding:9px;border-radius:11px;color:#e5f8ed;text-align:left}
.v41-home-hero{background:linear-gradient(125deg,#123a38,#1d6155);color:white;border-radius:20px;padding:27px;margin-bottom:18px}
.v41-eyebrow{font-size:10px;letter-spacing:.16em;color:#a9d6c9;font-weight:800;margin-bottom:12px}
.v41-home-title{display:flex;justify-content:space-between;align-items:start;gap:12px}
.v41-home-title h2{font-size:clamp(23px,3vw,33px);line-height:1.16;letter-spacing:-.04em;margin:0 0 10px}
.v41-home-title p{font-size:14px;max-width:530px;color:#d7e9e4;line-height:1.5;margin:0}
.v41-role-chip{font-size:11px;background:rgba(255,255,255,.14);padding:8px 11px;border-radius:99px;white-space:nowrap}
.v41-status{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:23px}
.v41-status>div{display:flex;gap:5px;flex-direction:column;padding:12px 14px;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(255,255,255,.08)}
.v41-status strong{font-size:25px;line-height:1.1;font-variant-numeric:tabular-nums}
.v41-status span{font-size:11px;color:#d2e8df;line-height:1.3}
.v41-section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 11px}
.v41-section-heading h3{margin:0;font-size:19px}
.v41-section-heading span{font-size:11px;color:#72858a}
.v41-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.v41-action-card{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid #dce6e2;background:#fff;min-height:104px;border-radius:17px;padding:15px;cursor:pointer;transition:border-color .2s,transform .2s;box-shadow:0 6px 18px rgba(8,47,39,.03);color:#1b3032}
.v41-action-card:hover,.v41-action-card:focus-visible{border-color:#5ba991;transform:translateY(-2px)}
.v41-action-icon{flex:0 0 44px;height:44px;border-radius:12px;background:#ecf6f0;color:#1b725d;display:grid;place-items:center;font-size:21px}
.v41-action-copy{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.v41-action-copy strong{font-size:14px;line-height:1.2}
.v41-action-copy small{font-size:11px;line-height:1.4;color:#667e82}
.v41-arrow{font-size:24px;color:#718b87}
.v41-main-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px;margin:18px 0;border:1px solid #bdd9cc;border-radius:16px;background:#f0f8f2}
.v41-main-cta>div{display:flex;flex-direction:column;gap:5px}
.v41-main-cta strong{font-size:14px}
.v41-main-cta small{font-size:12px;color:#657c72}
.v41-secondary-link{margin:16px 0 95px}
.v41-secondary-link button{border:none;background:none;color:#267766;font-weight:750;font-size:14px;cursor:pointer;padding:10px 0}
.v41-hub-hero{background:#fff;border-radius:18px;border:1px solid #e2ebe6;padding:22px;margin-bottom:18px}
.v41-hub-hero small{letter-spacing:.12em;font-weight:700;color:#2c8c72}
.v41-hub-hero h2{font-size:25px;margin:9px 0}
.v41-hub-hero p{color:#667c80;font-size:13px;line-height:1.5;max-width:550px;margin-bottom:18px}
.v41-hub-search{position:relative;display:flex;align-items:center;gap:8px}
.v41-hub-search span{position:absolute;left:14px;font-size:20px;color:#628b82}
.v41-hub-search input{padding-left:42px!important;width:100%}
.v41-hub-groups .hub-group{background:#fff;border-radius:15px;padding:14px;margin-bottom:14px;border:1px solid #e1eae6}
.v41-hub-groups .hub-group-head{margin:0 0 8px}
.v41-hub-groups .hub-group-head span{color:#728d86;font-size:12px}
.v41-hub-groups .hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.v41-hub-footer{color:#5c8175;font-size:13px;margin:20px 0 80px}
.rc-badger-wander{position:fixed;z-index:88;bottom:11px;left:clamp(260px,31vw,510px);width:147px;animation:rcBadgerWalk 23s ease-in-out infinite alternate;pointer-events:none;filter:drop-shadow(0 5px 9px rgba(20,49,38,.12))}
.rc-badger-button{pointer-events:auto;background:none;border:0;padding:0;cursor:pointer;display:block;width:100%;height:auto;transform-origin:50% 90%;animation:rcBadgerBob .9s ease-in-out infinite alternate}
.rc-badger-button img{display:block;width:100%;height:auto}
.rc-badger-button:focus-visible{outline:3px solid #279578;border-radius:20px}
.rc-badger-tooltip{position:absolute;bottom:75%;left:30px;background:white;box-shadow:0 5px 25px rgba(0,0,0,.15);color:#20453c;font-size:11px;font-weight:750;border-radius:16px;padding:8px 10px;white-space:nowrap;opacity:0;transition:opacity .2s;pointer-events:none}
.rc-badger-wander:hover .rc-badger-tooltip{opacity:1}
@keyframes rcBadgerWalk{0%,8%{transform:translateX(0)}44%{transform:translateX(min(23vw,300px))}53%{transform:translateX(min(23vw,300px)) scaleX(-1)}95%,100%{transform:translateX(0) scaleX(-1)}}
@keyframes rcBadgerBob{from{translate:0 0}to{translate:0 -3px}}
.rc-badger-chat-open{animation-play-state:paused;left:auto;right:400px}
.rc-badger-chat-open .rc-badger-button{animation-play-state:paused}
.rc-badger-panel[hidden]{display:none!important}
.rc-badger-panel{position:fixed;z-index:110;right:22px;bottom:18px;width:min(385px,calc(100vw - 30px));height:min(670px,calc(100dvh - 65px));display:flex;flex-direction:column;background:#fff;border:1px solid #d7e5df;box-shadow:0 20px 70px rgba(4,36,32,.27);border-radius:21px;overflow:hidden;color:#193834}
.rc-badger-head{background:linear-gradient(130deg,#11372f,#246557);padding:14px 15px;display:flex;align-items:center;gap:10px;color:#fff}
.rc-badger-avatar{height:45px;width:65px;border-radius:12px;background:#dae9dc;overflow:hidden;flex:0 0 65px}
.rc-badger-avatar img{width:65px;height:44px;object-fit:cover}
.rc-badger-head>div{display:flex;flex:1;flex-direction:column;gap:2px}
.rc-badger-head strong{font-size:16px}
.rc-badger-head small{font-size:10px;color:#cae5de}
.rc-badger-head>button{background:rgba(255,255,255,.15);color:#fff;border:0;border-radius:50%;font-size:24px;width:32px;height:32px;cursor:pointer}
.rc-badger-status{font-size:10px;text-align:center;color:#6f807a;background:#eff7f3;padding:8px 9px}
.rc-badger-messages{flex:1;overflow:auto;padding:17px 14px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:0}
.rc-chat-bubble{border-radius:15px;padding:12px 14px;max-width:94%;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;background:#edf3ef}
.rc-chat-user{align-self:flex-end;color:white;background:#246e57}
.rc-chat-link{display:block;margin-top:10px;padding:7px 10px;background:white;color:#236f5a;font-weight:750;border-radius:10px;border:1px solid #b5d7c9;text-align:left;cursor:pointer}
.rc-badger-prompts{display:flex;flex-wrap:wrap;gap:6px;padding:10px 13px;border-top:1px solid #edf2ed}
.rc-badger-prompts button{border:1px solid #cbded4;border-radius:20px;background:#fff;padding:7px 10px;color:#28534a;font-size:11px;cursor:pointer}
.rc-badger-form{display:flex;gap:6px;padding:6px 12px 12px}
.rc-badger-form input{flex:1;min-width:0;border:1px solid #d5e1da;border-radius:12px;padding:12px;font:inherit;font-size:13px}
.rc-badger-form button{width:43px;background:#247c61;color:#fff;border:none;border-radius:12px;cursor:pointer}
.rc-badger-disclaimer{font-size:10px;color:#6c8178;padding:0 13px 12px;line-height:1.35;margin:0}
body.demo-auth-locked .rc-badger-wander,body.demo-auth-locked .rc-badger-panel{display:none}
@media(max-width:700px){.v41-home-hero{border-radius:18px;padding:18px}.v41-role-chip{white-space:normal;text-align:right}.v41-status>div{padding:10px}.v41-status strong{font-size:22px}.v41-status span{font-size:10px}.v41-action-grid{grid-template-columns:1fr}.v41-action-card{min-height:73px;padding:11px}.v41-main-cta{align-items:flex-start;flex-wrap:wrap}.v41-hub-groups .hub-grid{grid-template-columns:1fr}.rc-badger-wander{left:8px;bottom:76px;width:112px;animation:rcBadgerMobile 20s ease-in-out infinite alternate}.rc-badger-chat-open{left:8px;right:auto;bottom:75px}.rc-badger-panel{right:10px;bottom:83px;width:calc(100vw - 20px);height:min(630px,calc(100dvh - 169px))}.rc-badger-tooltip{display:none}@keyframes rcBadgerMobile{0%,10%{transform:translateX(0)}47%{transform:translateX(40vw)}58%{transform:translateX(40vw) scaleX(-1)}96%,100%{transform:translateX(0) scaleX(-1)}}}
@media(prefers-reduced-motion:reduce){.rc-badger-wander,.rc-badger-button{animation:none!important}.v41-action-card{transition:none!important}}

@media(max-width:700px){.rc-badger-tooltip{display:block;opacity:1;bottom:80%;left:2px;padding:6px 9px;font-size:10px;max-width:150px;background:#fff}}

/* v41 compact demo ribbon: practical screen comes first. */
.v41-preview-banner{display:block;padding:9px 12px;background:#f3f8f5;border-color:#d7e7df;color:#335a4d;margin:6px 0 8px}
.v41-preview-role{display:flex;align-items:center;justify-content:space-between;gap:12px}
.v41-preview-status{flex:none!important;white-space:nowrap;font-weight:800;font-size:11px;color:#2d7560}
.v41-preview-banner .preview-role-picker{flex:none;display:flex;width:auto;justify-content:flex-end;gap:10px}
.v41-preview-banner .preview-role-picker select{max-width:220px;min-width:110px;font-size:12px;padding:6px 25px 6px 9px}
.v41-preview-details{margin-top:4px;font-size:11px}
.v41-preview-details summary{cursor:pointer;color:#587f6c;list-style:none;display:inline-block;text-decoration:underline dotted;text-underline-offset:3px}
.v41-preview-details p{font-size:11px;line-height:1.4;margin:8px 0}
.v41-preview-details a{font-size:11px}
@media(max-width:600px){.v41-preview-role{display:flex;flex-direction:column;align-items:stretch;gap:5px}.v41-preview-banner .preview-role-picker{justify-content:space-between;flex:1;width:100%}.v41-preview-banner .preview-role-picker select{max-width:68%;width:auto}.v41-preview-status{font-size:10px!important}}

/* v41 compact demo ribbon: practical screen comes first. */
.v41-preview-banner{display:block;padding:9px 12px;background:#f3f8f5;border-color:#d7e7df;color:#335a4d;margin:6px 0 8px}
.v41-preview-role{display:flex;align-items:center;justify-content:space-between;gap:12px}
.v41-preview-status{flex:none!important;white-space:nowrap;font-weight:800;font-size:11px;color:#2d7560}
.v41-preview-banner .preview-role-picker{flex:none;display:flex;width:auto;justify-content:flex-end;gap:10px}
.v41-preview-banner .preview-role-picker select{max-width:220px;min-width:110px;font-size:12px;padding:6px 25px 6px 9px}
.v41-preview-details{margin-top:4px;font-size:11px}
.v41-preview-details summary{cursor:pointer;color:#587f6c;list-style:none;display:inline-block;text-decoration:underline dotted;text-underline-offset:3px}
.v41-preview-details p{font-size:11px;line-height:1.4;margin:8px 0}
.v41-preview-details a{font-size:11px}
@media(max-width:600px){.v41-preview-role{display:flex;flex-direction:column;align-items:stretch;gap:5px}.v41-preview-banner .preview-role-picker{justify-content:space-between;flex:1;width:100%}.v41-preview-banner .preview-role-picker select{max-width:68%;width:auto}.v41-preview-status{font-size:10px!important}}

/* The compact preview ribbon already describes saving status; avoid repeating it. */
.review-preview-mode .live-statusbar{display:none!important}

/* Recovery STAFF v42: motionless branded honey-badger face, single natural blink. */
.rc-badger-wander,
.rc-badger-chat-open {
 position:fixed!important;right:15px!important;left:auto!important;bottom:17px!important;
 width:94px!important;height:94px!important;
 animation:none!important;transform:none!important;filter:drop-shadow(0 5px 12px rgba(4,42,31,.22));
}
.rc-badger-button {
 position:relative!important;width:94px!important;height:94px!important;
 border-radius:50%;border:2px solid rgba(36,125,90,.26);background:rgba(245,249,245,.98);
 overflow:hidden;box-shadow:0 4px 20px rgba(15,54,46,.18);
 animation:none!important;transform:none!important;
}
.rc-badger-face {position:absolute;inset:0;display:block;overflow:hidden;}
.rc-badger-face img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.rc-badger-eyes-open {opacity:1;}
.rc-badger-eyes-closed {opacity:0;animation:rcBadgerBlink 6.7s step-end infinite;}
@keyframes rcBadgerBlink{0%,34%,37%,67%,70%,100%{opacity:0}35%,36%,68%,69%{opacity:1}}
.rc-badger-tooltip{bottom:31px!important;left:auto!important;right:calc(100% + 8px)!important;white-space:nowrap;max-width:145px;z-index:2}
.rc-badger-chat-open{animation:none!important;}
.rc-badger-avatar{height:42px!important;width:42px!important;flex:0 0 42px!important;border-radius:50%!important}
.rc-badger-avatar img{width:42px!important;height:42px!important;object-fit:contain!important}
/* Don't let a floating character cover the chat or phone bottom navigation. */
@media(max-width:700px){
 .rc-badger-wander,.rc-badger-chat-open{right:12px!important;left:auto!important;bottom:79px!important;width:72px!important;height:72px!important}
 .rc-badger-button{width:72px!important;height:72px!important}
 .rc-badger-tooltip{display:none!important}
 .rc-badger-panel{bottom:158px!important;height:min(540px,calc(100dvh - 180px))!important}
 body:has(.rc-badger-panel:not([hidden])) .rc-badger-wander{opacity:0;pointer-events:none}
}
@media(prefers-reduced-motion:reduce){.rc-badger-eyes-closed{animation:none!important;opacity:0!important}}

/* v43 unified action center */
.v43-focus{padding:20px;border:1px solid #cfe0db;border-radius:20px;background:linear-gradient(130deg,#edf7f2,#fff);margin-bottom:12px}
.v43-focus h2{margin:4px 0 6px;font-size:clamp(22px,4vw,30px)}.v43-focus p{margin:0;color:#52686b;line-height:1.45}
.v43-work-metrics{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.v43-work-metrics span{background:#fff;border:1px solid #dae7e3;border-radius:10px;padding:8px 11px;font-size:12px}.v43-work-metrics b{font-size:19px;margin-right:4px;color:#07583e}
.v43-work-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.v43-work-tabs button{border:1px solid #d9e4e2;background:#fff;color:#26443b;border-radius:12px;padding:10px 12px;min-height:44px;cursor:pointer;font-weight:700}.v43-work-tabs button.active{background:#075840;color:#fff}.v43-work-tabs small{margin-left:6px;opacity:.7}
.v43-work-list{display:grid;gap:9px}.v43-work-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px;border:1px solid #dae5e2;background:#fff;border-radius:15px;min-width:0}.v43-work-item div{min-width:0}.v43-work-item h3{font-size:15px;line-height:1.35;margin:5px 0;overflow-wrap:anywhere}.v43-work-item p{font-size:12px;color:#647477;margin:0}.v43-work-type{font-size:11px;font-weight:700;color:#087d5a}.v43-work-item .btn{flex-shrink:0}.v43-help-foot{margin:14px 0;color:#576c69;font-size:12px;line-height:1.5}
@media(max-width:480px){.v43-focus{padding:16px}.v43-work-item{gap:8px;padding:12px}.v43-work-tabs button{padding:10px 9px;font-size:12px}.v43-work-item .btn{padding:9px 10px}}

/* v43.2 — six clear mobile nav actions without hidden Residents/Dynamics. */
@media(max-width:720px){
  .bottom-nav{gap:0!important;justify-content:space-between!important;padding-left:2px!important;padding-right:2px!important}
  .bottom-nav button{flex:1 1 0!important;min-width:0!important;padding:3px 0!important;font-size:clamp(7.5px,2.15vw,10px)!important;letter-spacing:-.25px!important;white-space:nowrap}
  .bottom-nav button span{font-size:20px!important;line-height:23px!important}
  .bottom-nav button.active span{min-width:31px!important}
}
@media(max-width:360px){.bottom-nav button{font-size:7px!important;letter-spacing:-.45px!important}.bottom-nav button span{font-size:18px!important}}

/* v43.3 — поручения руководителей на экране смены */
.v433-assigned{border:1px solid #c8dcd3;border-radius:17px;padding:16px;margin:12px 0 16px;background:linear-gradient(135deg,#f6fbf8,#fff);box-shadow:0 2px 12px rgba(8,60,44,.055)}
.v433-assigned .v37-section-heading{margin-bottom:10px}
.v433-assigned h3{display:flex;align-items:center;gap:8px}
.v433-order-count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:99px;background:#d5f0e2;color:#154d3b;font-size:13px}
.v433-order{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #e0eae4}
.v433-order b{font-size:14px;line-height:1.35;display:block}.v433-order small{color:#647b72;display:block;margin-top:5px}.v433-order p{font-size:13px;margin:6px 0 0}.v433-order-note{display:block;color:#647b72;margin-top:9px}
@media(max-width:480px){.v433-assigned{padding:12px;margin:10px 0}.v433-order{align-items:flex-start;flex-direction:column}.v433-order .btn{width:100%}.v433-assigned .v37-section-heading{gap:6px}}

/* v43.4 — единый маршрут задач, динамика и пересменка */
.v434-handover-orders,.v434-task-dynamics{background:#f7fbf9;border:1px solid #c5ddce;border-radius:15px;padding:14px;margin:15px 0}
.v434-handover-orders h3{font-size:16px}.v434-handover-orders p,.v434-task-dynamics p{font-size:13px;color:#526d62;margin:6px 0 13px}
.v434-task-dynamics summary{font-weight:750;cursor:pointer}.v434-task-dynamics summary span{float:right}
.v434-linked{border-top:1px solid #dae7de;padding:10px 0;display:flex;flex-direction:column;gap:3px}
.v434-linked b{font-size:13.5px}.v434-linked small{font-size:12px;color:#667b73}
.v434-archive-meta{font-size:12px;color:#557366;max-width:48%;line-height:1.35}
@media(max-width:480px){.v434-handover-orders,.v434-task-dynamics{padding:10px}.v434-archive-meta{max-width:100%;display:block}}

/* v43.5 · priority, event queue */
.v435-priority{display:inline-flex;align-items:center;font-size:11px;font-weight:800;white-space:nowrap;padding:3px 7px;border-radius:8px;border:1px solid transparent;vertical-align:middle}.v435-priority.is-high{background:#ffe9e9;border-color:#ffc2c2;color:#a82323}.v435-priority.is-plan{background:#fff4cc;border-color:#f7dea1;color:#855600}
.v435-day-review{background:#fff;border:1px solid #e0e7df;border-radius:18px;padding:18px;margin:17px 0}.v435-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}.v435-head h3{font-size:18px;margin:4px 0}.v435-head p{font-size:13px;color:#586b67;line-height:1.5}.v435-day-list{display:grid;gap:10px;margin-top:12px}.v435-day-item{border:1px solid #f6dfc5;border-left:4px solid #d59e00;border-radius:12px;padding:12px;display:flex;justify-content:space-between;align-items:center;gap:10px}.v435-day-item.is-urgent{border-color:#f3c3c2;border-left-color:#c12424;background:#fff6f5}.v435-day-item p{margin:6px 0;font-size:13px;overflow-wrap:anywhere}.v435-day-item small,.v435-done-event small{display:block;color:#63776d;font-size:12px}.v435-done-event{padding:9px 0;border-top:1px solid #e4e7e2}.v435-create-task{display:flex;justify-content:flex-start;margin:12px 0}
@media(max-width:480px){.v435-day-review{padding:12px}.v435-head{flex-direction:column}.v435-day-item{flex-direction:column;align-items:stretch}.v435-day-item .btn{width:100%}}
/* v43.6 — separate consultant, immutable automation, and locked AI dynamics */
.v436-shell,.v436-diary-section{max-width:1050px;margin:0 auto 22px;color:var(--text-primary,#20362e)}
.v436-heading{background:linear-gradient(145deg,#123f35,#0e6658);padding:27px 26px;color:white;border-radius:22px;margin-bottom:18px}
.v436-heading span{font-size:10px;font-weight:800;letter-spacing:.15em;color:#bdded2}
.v436-heading h2{font-size:clamp(25px,3vw,34px);color:#fff;margin:6px 0}
.v436-heading p{color:#e2f0e9;max-width:680px;margin:5px 0;line-height:1.6}
.v436-resident-select{display:flex;flex-direction:column;gap:6px;font-weight:750;max-width:470px;margin:14px 0 20px}
.v436-resident-select .select{min-height:44px}
.v436-tabs,.v436-periods{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 20px}
.v436-tabs .btn,.v436-periods .btn{flex:0 1 auto;min-height:41px;white-space:normal;text-align:center}
.v436-form,.v436-diary-section{border:1px solid #dbe8e1;background:#fff;border-radius:18px;padding:22px;margin:16px 0 25px;box-shadow:0 4px 18px #123a2910}
.v436-form{display:grid;gap:16px}
.v436-form h3{margin:0;color:#174a3e;font-size:20px}
.v436-form p{margin:0;color:#586b64;line-height:1.55}
.v436-form>label{display:grid;gap:7px;color:#263c36;font-weight:700}
.v436-form .textarea{min-height:115px;line-height:1.55}
.v436-form .btn{justify-self:start}
.v436-subhead{display:flex;align-items:center;gap:10px;justify-content:space-between;margin:22px 0 12px}
.v436-subhead h3{margin:0;font-size:19px}
.v436-source-card{background:#fff;border:1px solid #dce9e3;border-left:4px solid #1c8b65;padding:16px 18px;border-radius:13px;margin:11px 0;overflow-wrap:anywhere}
.v436-source-card.auto{border-left-color:#6a8d98;background:#f8fbfa}
.v436-source-card>div{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.v436-source-card p{margin:10px 0 0;line-height:1.6;white-space:pre-wrap}
.v436-source-card small{display:block;color:#67746f;margin-top:7px;font-size:12px}
.v436-empty{padding:16px;border:1px dashed #c6d8ce;background:#fbfcfb;border-radius:12px;color:#63756d;line-height:1.5}
.v436-lock{padding:27px 22px;border:1px solid #c8d6d0;background:#eff5f1;border-radius:17px;display:grid;gap:12px;line-height:1.55}
.v436-lock strong{font-size:17px;color:#204a3a}
.v436-lock p{margin:0}.v436-lock .btn{justify-self:start}
.v436-ai-report{background:#fff;border:1px solid #d8e6dd;border-radius:18px;padding:20px;max-width:100%;overflow-wrap:anywhere}
.v436-report-head{display:flex;flex-wrap:wrap;gap:7px;align-items:baseline;justify-content:space-between}
.v436-report-head strong{font-size:20px;color:#175443}.v436-report-head span{font-size:12px;color:#67746f}
.v436-report-notice{margin:14px 0 18px;padding:12px 15px;background:#fff7e9;color:#795a28;border-radius:12px;font-size:13px;line-height:1.5}
.v436-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:20px}
.v436-stats>div{background:#f0f7f3;padding:12px;border-radius:12px;display:flex;flex-direction:column;gap:5px}
.v436-stats b{font-size:22px;color:#1b6d54}.v436-stats small{font-size:11px;color:#557068;line-height:1.4}
.v436-ai-report section{border-top:1px solid #e7ebe9;padding-top:13px;margin-top:18px}
.v436-ai-report section h4{font-size:16px;color:#184d40;margin:0 0 10px}
.v436-ai-report section>p{line-height:1.55}
.v436-ai-report section>small{display:block;line-height:1.5;color:#777a76}
.v436-evidence{padding:12px 13px;background:#f7faf8;border-radius:10px;line-height:1.55;overflow-wrap:anywhere}
.v436-evidence small{display:block;color:#718077;font-size:11px;margin-top:5px}
.v436-high{border-left:4px solid #be463e!important;background:#fff3f1!important}
.v436-ai-report footer,.v436-footer{margin-top:19px;font-size:12px;line-height:1.6;color:#6c7b73}
.v436-yesno{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.v436-yesno fieldset{padding:13px;border:1px solid #dce7df;border-radius:12px;display:flex;flex-wrap:wrap;gap:12px}
.v436-yesno legend{font-weight:750;font-size:14px}.v436-yesno label{display:flex;gap:5px;align-items:center;font-weight:600;cursor:pointer}
.v436-diary-section details{border-top:1px solid #e1e9e3;margin-top:16px;padding-top:12px}
@media(max-width:590px){.v436-heading{padding:22px 18px;border-radius:17px}.v436-form,.v436-diary-section,.v436-ai-report{padding:15px;border-radius:14px}.v436-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.v436-tabs .btn{padding:9px 6px;font-size:12px;min-width:0}.v436-tabs .btn:last-child{grid-column:1/-1}.v436-periods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.v436-periods .btn{padding:8px 5px;font-size:12px;min-width:0}.v436-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.v436-yesno{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.v436-shell *{scroll-behavior:auto}}
.v436-task-alert{display:flex;flex-wrap:wrap;align-items:center;gap:9px;background:#fff;border:1px solid #e2e9e4;border-radius:13px;padding:13px;margin:0 0 14px;line-height:1.35}
.v436-task-alert strong{color:#174d40}.v436-task-alert span{font-size:12px;color:#596e64}.v436-task-alert .v436-flag{color:#af3d30;font-weight:700}.v436-task-alert .btn{margin-left:auto}

/* Recovery STAFF v44 — clearer focus, calmer surfaces, and a non-obstructive helper. */
body.review-preview-mode{background:linear-gradient(180deg,#f6f8f6 0%,#f0f5f2 100%);color:#18363c}
.sidebar{background:linear-gradient(180deg,#102638 0%,#153b3d 100%);border-right:1px solid #254a4b}
.nav-btn.active{background:linear-gradient(135deg,#25866e,#2e9a7b);box-shadow:0 7px 18px rgba(19,126,95,.22)}
.nav-btn:focus-visible,.sidebar-help:focus-visible,.btn:focus-visible,.account-logout:focus-visible,.mobile-helper:focus-visible,.install-button:focus-visible,.mobile-account:focus-visible,.bottom-nav button:focus-visible{outline:3px solid #8be0ba;outline-offset:2px}
.topbar{background:rgba(255,255,255,.9);backdrop-filter:blur(14px);border-bottom-color:#dce8e2}
.btn{transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(19,80,62,.14)}
.review-preview-mode .v41-preview-banner{background:linear-gradient(110deg,#eaf7f0,#f7fbf8);border:1px solid #cfe5d7;border-left:4px solid #39a07b;box-shadow:0 5px 16px rgba(18,75,54,.045)}
.review-preview-mode .v41-preview-status{display:inline-flex;align-items:center;background:#def2e7;border-radius:999px;padding:5px 9px;color:#256c53}
.v41-home-hero{position:relative;isolation:isolate;overflow:hidden;border:1px solid rgba(136,223,191,.2);background:radial-gradient(ellipse at 92% 0%,rgba(115,211,177,.3),transparent 34%),linear-gradient(125deg,#123942 0%,#145e51 58%,#23836a 100%);box-shadow:0 16px 36px rgba(12,63,54,.16)}
.v41-home-hero:after{content:"";position:absolute;z-index:0;right:-45px;bottom:-155px;width:320px;height:320px;border:1px solid rgba(224,248,234,.12);border-radius:50%;box-shadow:0 0 0 24px rgba(224,248,234,.035),0 0 0 48px rgba(224,248,234,.025),0 0 0 72px rgba(224,248,234,.018);pointer-events:none}
.v41-home-hero>*{position:relative;z-index:1}
.v41-eyebrow{display:inline-flex;padding:6px 9px;border:1px solid rgba(217,245,230,.18);border-radius:999px;background:rgba(255,255,255,.07)}
.v41-status>div{background:rgba(255,255,255,.11);border-color:rgba(223,248,235,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.v41-action-card{position:relative;overflow:hidden;border-color:#d9e7df;background:linear-gradient(160deg,#fff 0%,#fbfefc 100%);box-shadow:0 7px 20px rgba(15,64,48,.045)}
.v41-action-card:before{content:"";position:absolute;top:16px;bottom:16px;left:0;width:3px;border-radius:0 5px 5px 0;background:#4baa83;opacity:0;transition:opacity .16s ease}
.v41-action-card:hover:before,.v41-action-card:focus-visible:before{opacity:1}
.v41-action-icon{background:linear-gradient(140deg,#e2f4e9,#f0f8f2);box-shadow:inset 0 0 0 1px rgba(55,144,105,.06)}
.v41-main-cta{background:linear-gradient(110deg,#edf8f1,#f8fcf9);border-color:#cce2d3;box-shadow:0 8px 22px rgba(18,86,59,.055)}
.v41-secondary-link{margin-bottom:20px}
.mobile-helper{display:none;border:1px solid #ffffff35;background:#ffffff13;color:#e8fff6;width:39px;height:39px;padding:4px;border-radius:11px;place-items:center;flex:0 0 39px}
.mobile-helper img{display:block;width:29px;height:29px;object-fit:contain}
.bottom-nav{background:rgba(255,255,255,.96);border-top:1px solid #dce8e2;box-shadow:0 -8px 24px rgba(20,53,46,.08);backdrop-filter:blur(14px)}
@media(max-width:720px){
 .review-preview-mode .app-content{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 .mobile-helper{display:grid}
 .mobile-controls{gap:6px}
 .mobile-banner{background:linear-gradient(115deg,#102c3a,#17483f)}
 .rc-badger-wander,.rc-badger-chat-open{display:none!important}
 .rc-badger-panel{right:10px!important;left:10px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;width:auto!important;height:min(580px,calc(100dvh - 165px))!important}
 .v41-home-hero{padding:18px;border-radius:18px}
 .v41-home-title h2{font-size:26px}
 .v41-status{gap:7px;margin-top:17px}
 .v41-status>div{padding:10px 9px}
 .v41-status span{font-size:10px}
 .v41-action-card{min-height:78px;border-radius:15px}
 .v41-main-cta{border-radius:15px}
 .bottom-nav{padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:360px){
 .mobile-helper{width:35px;height:39px;flex-basis:35px}
 .mobile-helper img{width:26px;height:26px}
 .mobile-controls{gap:4px}
 .v41-status{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.btn,.v41-action-card:before{transition:none!important}}


/* Recovery STAFF v45 — one visible route title, clearer search states, and owner access note. */
.topbar{min-height:76px;padding:14px 30px;justify-content:flex-end}
.topbar .top-left{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.v41-hub-empty{padding:22px 16px;margin:0 0 16px;border:1px dashed #c7d9d0;border-radius:14px;background:#f8fbf9;color:#5d7369;text-align:center;font-size:14px;line-height:1.5}
.v41-hub-empty[hidden]{display:none}
.hub-group-head span{display:none}
.owner-access-note{margin:0 0 18px;line-height:1.6}
.owner-access-note strong{display:block;margin-bottom:3px;color:#245f4b}
.v436-remarks-section{max-width:1050px;margin:18px auto 0}
.v436-remarks-section>.v436-subhead small{color:#65786f;font-size:12px;line-height:1.5}
@media(max-width:720px){.topbar{display:none}.owner-access-note{font-size:13px}.v436-remarks-section>.v436-subhead{align-items:flex-start;gap:8px;flex-wrap:wrap}}

.calendar-empty-period{grid-column:1/-1;background:#fff;border:1px dashed #c7d9d0;border-radius:13px;padding:17px;text-align:center;color:#62796f;font-size:13px;line-height:1.5}
