:root{--navy:#09214a;--teal:#176b75;--teal-soft:#eaf3f1;--bg:#f6f7f9;--surface:#fff;--ink:#20304b;--muted:#7c879b;--line:#e8ecf1;--accent:#dbb875;--danger:#b74b4b;--danger-soft:#fff2f1;--shadow:0 12px 40px #10244909;--radius:16px;--sidebar:242px;font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:var(--teal);text-decoration:none}button{border:0}button:disabled{opacity:.55;cursor:wait}button,input,select,textarea,a{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #7ab8c2}input:focus,select:focus,textarea:focus{border-color:#71a9af!important;box-shadow:0 0 0 3px #176b7510;outline:0}input,select,textarea{width:100%;color:var(--ink);border:1px solid #dfe5ec;border-radius:9px;padding:11px 12px;background:var(--surface);line-height:1.5}textarea{resize:vertical;min-height:130px}input::placeholder,textarea::placeholder{color:#a1a9b7}input[type=checkbox]{width:16px;height:16px;accent-color:var(--teal);box-shadow:none;flex-shrink:0}input[type=date]{min-height:44px}label{display:block;font-size:12px;font-weight:600;color:#627089;margin-bottom:7px}label .optional{font-weight:400;color:var(--muted)}h1,h2,h3,p{margin:0}h1{font-size:28px;letter-spacing:-1px;line-height:1.25;font-weight:650}h2{font-size:18px;letter-spacing:-.4px;font-weight:650}h3{font-size:15px;font-weight:650}p{line-height:1.6}.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;max-width:100%;padding:10px 16px;border-radius:9px;font-size:12px;font-weight:600;white-space:normal;overflow-wrap:anywhere;line-height:1.4;transition:background .15s,transform .15s;background:var(--surface);color:var(--ink);border:1px solid var(--line)}.btn:hover{background:#f0f3f6}.btn.primary{background:var(--teal);border-color:var(--teal);color:#fff;box-shadow:0 3px 9px #176b7515}.btn.primary:hover{background:#105760}.btn.navy{background:var(--navy);color:#fff;border-color:var(--navy)}.btn.ghost{border-color:transparent;background:transparent}.btn.danger{color:var(--danger)}.btn.sm{padding:7px 11px;min-height:34px;font-size:11px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;border-radius:8px;background:transparent;color:var(--muted);flex-shrink:0}.icon-btn:hover{background:var(--bg);color:var(--ink)}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:grid;gap:18px}.field{margin-bottom:16px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid .field{margin:0}.span2{grid-column:1/-1}.check{display:flex;gap:9px;align-items:flex-start;line-height:1.6;font-weight:400;font-size:12px;margin:0;color:var(--ink)}.check input{margin:2px 0 0}.notice{padding:13px 15px;border-radius:10px;background:var(--teal-soft);color:var(--teal);font-size:12px;line-height:1.6;display:flex;align-items:flex-start;gap:10px}.notice.warn{color:#876a31;background:#faf5e9}.notice .icon{width:17px;height:17px;margin-top:2px}.badge{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:600;border-radius:5px;padding:4px 7px;white-space:nowrap;background:#edf3fa;color:#5d779b}.badge.teal{color:var(--teal);background:var(--teal-soft)}.badge.gold{color:#9a7835;background:#faf3df}.badge.gray{color:#8490a2;background:#f1f3f6}.badge.red{color:var(--danger);background:var(--danger-soft)}.dot{height:6px;width:6px;background:currentColor;border-radius:50%;display:inline-block}.avatar{width:38px;height:38px;border-radius:12px;background:#eef1f9;color:#607399;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:650;flex-shrink:0}.avatar.teal{background:var(--teal-soft);color:var(--teal)}.avatar.big{width:58px;height:58px;border-radius:17px;font-size:19px}.brand{display:block;width:100%;max-width:100%;min-width:0}.brand img{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}.brand-caption{width:100%;font-size:9px;line-height:1.5;letter-spacing:1px;text-transform:uppercase;text-align:center;margin:10px 0 0;color:#8a96aa;font-weight:500}.sidebar{position:fixed;top:0;bottom:0;left:0;width:var(--sidebar);background:var(--surface);border-right:1px solid var(--line);padding:28px 22px 15px;display:flex;flex-direction:column;z-index:40}.sidebar-brand{width:195px;max-width:100%;margin:0 auto 43px}.nav-label{font-size:9px;letter-spacing:1.6px;color:#a6aebc;font-weight:650;margin:0 13px 12px}.nav-group{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:12px;text-align:left;width:100%;background:transparent;border-radius:9px;padding:12px 14px;color:#8792a5;font-size:12px;font-weight:500;position:relative}.nav-item .icon{width:18px;height:18px}.nav-item.active{background:var(--teal-soft);color:var(--teal);font-weight:650}.nav-item.active:before{content:'';position:absolute;height:17px;width:3px;left:0;top:14px;background:var(--teal);border-radius:2px}.nav-item:hover{background:var(--bg);color:var(--ink)}.nav-item.active:hover{background:var(--teal-soft)}.sidebar-bottom{margin-top:auto}.sidebar-note{font-size:10px;color:#9aa4b3;line-height:1.7;margin:20px 12px;padding-top:18px;border-top:1px solid var(--line)}.user-mini{display:flex;align-items:center;gap:10px;padding:15px 3px 0;border-top:1px solid var(--line)}.user-mini .user-name{font-size:11px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px}.user-mini .tiny{margin-top:4px}.workspace{margin-left:var(--sidebar);min-height:100vh;display:flex;flex-direction:column}.topbar{height:86px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:20px;position:sticky;top:0;z-index:30}.topbar-section{font-size:12px;font-weight:550;color:#7b879b}.top-search{max-width:440px;min-width:0;flex:1;position:relative}.search-box{display:flex;align-items:center;gap:10px}.search-box>.icon{color:#8995a7;position:absolute;left:13px;width:17px;height:17px}.search-box input{padding:11px 48px 11px 40px;background:var(--bg);border-color:transparent;font-size:12px}.key-hint{position:absolute;right:10px;top:11px;font-size:10px;padding:3px 5px;color:#9ba4b2;background:var(--surface);border:1px solid var(--line);border-radius:4px}.search-results{position:absolute;top:49px;left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:0 15px 40px #10244918;padding:6px;z-index:60;max-height:350px;overflow:auto}.search-result{display:flex;gap:11px;align-items:center;width:100%;text-align:left;padding:10px;background:transparent;border-radius:8px;color:var(--ink)}.search-result:hover{background:var(--bg)}.search-result strong{display:block;font-size:12px;font-weight:600;margin-bottom:3px}.top-actions{display:flex;gap:9px;align-items:center;flex-shrink:0}.top-actions>.avatar{width:34px;height:34px;border-radius:50%;margin-left:9px}.mobile-menu{display:none}.main{padding:34px 38px 28px;max-width:1600px;width:100%;margin:0 auto;flex:1}.page-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:20px;margin-bottom:27px}.eyebrow{font-size:10px;color:var(--teal);letter-spacing:1.7px;text-transform:uppercase;font-weight:650;margin-bottom:9px}.page-description{font-size:12px;color:var(--muted);margin-top:9px}.today-pill{display:flex;align-items:center;gap:9px;border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:11px 14px;font-size:11px;font-weight:500;color:#74829a}.today-pill .icon{width:16px;height:16px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:27px}.stat{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:18px 21px;display:flex;align-items:center;gap:14px}.stat-icon{width:38px;height:38px;border-radius:11px;background:#eef2f9;color:#778aac;display:flex;align-items:center;justify-content:center}.stat:nth-child(2) .stat-icon{background:var(--teal-soft);color:var(--teal)}.stat:nth-child(3) .stat-icon{background:#faf4e8;color:#b6965b}.stat-label{font-size:11px;color:var(--muted);margin-bottom:7px}.stat-value{font-size:23px;font-weight:600;letter-spacing:-.7px;line-height:1}.stat-note{font-size:10px;color:#a1aaba;margin-left:auto;align-self:flex-end;white-space:nowrap}.agenda-grid{display:grid;grid-template-columns:248px minmax(0,1fr);gap:22px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 2px 7px #09214a02;overflow:hidden}.panel-pad{padding:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px;border-bottom:1px solid var(--line)}.panel-heading h2{font-size:14px}.panel-heading .small{font-size:11px;margin-top:4px}.calendar{padding:20px 17px}.calendar-title{text-transform:capitalize;font-weight:600;font-size:12px}.calendar .icon-btn{width:25px;height:28px}.calendar-week,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;gap:3px}.calendar-week{font-size:9px;color:#a7aebc;font-weight:500;margin:20px 0 9px}.calendar-day{width:100%;max-width:28px;min-width:0;height:28px;margin:auto;border-radius:7px;background:transparent;color:#7b879a;font-size:10px;padding:0}.calendar-day.today{color:var(--teal);font-weight:700;position:relative}.calendar-day.selected{background:var(--teal);color:white;font-weight:600}.calendar-day:hover{background:var(--teal-soft);color:var(--teal)}.calendar-day.blank{visibility:hidden}.calendar-rule{margin-top:20px;padding-top:18px;border-top:1px solid var(--line);font-size:10px;color:#9ba6b5;display:flex;align-items:center;gap:7px}.aside-card{margin-top:17px;padding:20px;background:#edf3f4;border-radius:13px;position:relative;overflow:hidden}.aside-card h3{font-size:12px;margin:12px 0 8px;color:var(--teal)}.aside-card p{font-size:10px;color:#7f969b;line-height:1.8}.aside-card>.icon{color:var(--teal);width:21px;height:21px}.agenda-head{padding:20px 23px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.agenda-date{font-size:16px;letter-spacing:-.4px;font-weight:600;text-transform:capitalize}.agenda-date-sub{font-size:10px;color:var(--muted);margin-top:5px}.date-controls{display:flex;align-items:center;gap:4px}.date-controls .btn{margin:0 6px}.doctor-filter{font-size:11px;padding:7px 9px;max-width:230px;min-height:33px}.agenda-toolbar{padding:13px 23px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;font-size:10px;color:var(--muted)}.agenda-body{min-height:340px}.schedule-row{display:flex;align-items:stretch;border-bottom:1px solid var(--line);min-height:94px;position:relative}.schedule-row:last-child{border-bottom:0}.schedule-time{width:83px;padding:23px 17px;color:#7e8a9e;font-size:11px;text-align:right;flex-shrink:0;display:flex;flex-direction:column;gap:5px}.schedule-time .end{font-size:9px;color:#bac1cd}.schedule-content{border-left:1px solid var(--line);flex:1;padding:15px 20px;display:flex;align-items:center;gap:12px;cursor:pointer}.schedule-content:hover{background:#fafcfc}.schedule-marker{width:3px;background:#a6c8c9;border-radius:3px;position:absolute;top:19px;bottom:19px;left:82px}.schedule-name{font-weight:600;font-size:12px;margin-bottom:7px}.schedule-info{font-size:10px;color:#9aa4b4;display:flex;gap:9px;align-items:center;flex-wrap:wrap}.schedule-info .icon{width:12px;height:12px}.schedule-actions{display:flex;align-items:center;gap:9px;padding-right:19px}.status-select{border:0;background:#edf3fa;color:#6681a2;font-size:9px;padding:6px 9px;border-radius:6px;width:114px;cursor:pointer}.status-select.waiting{background:#faf3df;color:#a18340}.status-select.completed{background:var(--teal-soft);color:var(--teal)}.status-select.cancelled{background:#f1f3f6;color:#a4a9b2}.schedule-foot{display:flex;justify-content:center;padding:17px;border-top:1px solid var(--line)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:55px 25px;min-height:300px}.empty-icon{width:66px;height:66px;border-radius:20px;background:#f1f5f7;color:#91a6b7;display:flex;align-items:center;justify-content:center;margin-bottom:21px;position:relative}.empty-icon .icon{width:29px;height:29px;stroke-width:1.3}.empty h3{font-size:14px;font-weight:600;margin-bottom:8px}.empty p{font-size:11px;color:#9aa4b5;max-width:300px;margin-bottom:23px;line-height:1.8}.empty.compact{padding:28px 15px;min-height:170px}.empty.compact .empty-icon{width:42px;height:42px;border-radius:13px;margin-bottom:14px}.empty.compact .empty-icon .icon{width:21px;height:21px}.empty.compact h3{font-size:12px}.empty.compact p{font-size:10px;margin-bottom:14px}.app-footer{font-size:9px;line-height:1.6;color:#a7afbc;padding:15px 38px 20px;display:flex;justify-content:space-between;gap:25px}.app-footer>span:first-child{max-width:790px}.table-wrap{overflow:auto}.table{border-collapse:collapse;width:100%;font-size:12px}.table th{text-align:left;padding:14px 22px;background:#fbfcfd;border-bottom:1px solid var(--line);font-size:10px;color:#9ba4b4;font-weight:500;white-space:nowrap}.table td{padding:16px 22px;border-bottom:1px solid var(--line);vertical-align:middle}.table tr:last-child td{border-bottom:0}.table tbody tr:hover{background:#fbfcfd}.patient-link{background:transparent;padding:0;text-align:left;color:var(--ink);display:flex;align-items:center;gap:11px}.patient-link strong{font-size:12px;font-weight:600;display:block}.patient-link small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:17px;padding:20px 22px;border-bottom:1px solid var(--line)}.list-search{position:relative;width:350px}.list-search .icon{position:absolute;left:12px;top:12px;width:16px;height:16px;color:var(--muted)}.list-search input{padding-left:37px;font-size:12px;background:var(--bg);border-color:transparent}.patient-hero{display:flex;align-items:center;gap:16px;margin:22px 0 25px}.patient-hero h1{font-size:23px;letter-spacing:-.7px}.patient-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px 13px;margin-top:8px;font-size:11px;color:#8d98a9}.patient-meta span{display:flex;gap:5px;align-items:center}.patient-meta .icon{width:13px;height:13px}.hero-actions{display:flex;gap:7px;margin-left:auto}.back-link{display:flex;align-items:center;gap:6px;font-size:11px;color:#8a96a8;background:transparent;padding:0}.back-link .icon{width:15px;height:15px}.allergy{display:flex;align-items:center;gap:8px;font-size:11px;color:#a06d40;background:#fbf5eb;padding:10px 14px;border-radius:8px;margin-bottom:20px}.allergy .icon{width:16px;height:16px}.tabs{display:flex;gap:26px;align-items:center;max-width:100%;border-bottom:1px solid #dfe5ed;margin-bottom:26px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.tab{flex:0 0 auto;color:#8c97a8;background:transparent;padding:14px 2px;display:flex;align-items:center;gap:8px;font-size:11px;white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:550}.tab .icon{width:16px;height:16px}.tab.active{color:var(--teal);border-bottom-color:var(--teal)}.patient-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:23px;align-items:start}.note-heading{padding:20px 22px;border-bottom:1px solid var(--line)}.note-heading h2{font-size:14px}.note-editor{padding:22px}.note-editor textarea{min-height:275px;font-size:13px;line-height:1.9;background:#fdfefe;border-color:#edf0f4;padding:16px}.note-editor .row{margin-bottom:17px}.note-editor .row select{max-width:180px;font-size:11px}.editor-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:16px 22px;border-top:1px solid var(--line);background:#fdfefe}.history-item{padding:16px 20px;border-bottom:1px solid var(--line)}.history-item:last-child{border-bottom:0}.history-top{display:flex;gap:9px;align-items:center;font-size:10px;color:#8a97a9;margin-bottom:9px}.history-top .icon{width:13px;height:13px}.history-text{font-size:11px;line-height:1.8;white-space:pre-wrap;color:#6d7b91;max-height:150px;overflow:auto}.history-doc{display:flex;gap:9px;align-items:center;width:100%;text-align:left;background:transparent;color:var(--ink);padding:0;font-size:11px}.history-doc .icon{width:16px;height:16px;color:#709aa2}.doc-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:23px;align-items:start}.template-sidebar{padding:19px 14px}.template-sidebar h3{font-size:12px;margin:0 6px 16px}.template-item{display:flex;align-items:center;gap:9px;padding:12px 10px;width:100%;text-align:left;background:transparent;border-radius:8px;font-size:11px;color:#748499;line-height:1.5}.template-item:hover{background:var(--teal-soft);color:var(--teal)}.template-item .icon{width:15px;height:15px;color:#8da3b0}.template-hint{padding:18px 7px;font-size:10px;line-height:1.8;color:#a2aab7}.doc-workspace{min-width:0}.doc-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:17px}.segmented{display:flex;flex-wrap:wrap;max-width:100%;background:#eaf0f3;border-radius:8px;padding:4px;gap:3px}.segmented button{flex:1 1 auto;min-width:0;padding:8px 12px;font-size:10px;background:transparent;border-radius:6px;color:#8894a5;white-space:normal;line-height:1.5}.segmented button.active{background:var(--surface);box-shadow:0 2px 5px #09214a08;color:var(--teal);font-weight:600}.paper{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:33px 37px;min-height:510px}.paper-brand{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:23px;border-bottom:1px solid var(--line);margin-bottom:24px}.paper-brand .brand{width:145px;max-width:48%;flex-shrink:0}.paper-meta{font-size:9px;color:#a0aabc;text-align:right;line-height:1.9}.paper-title{font-size:15px!important;text-align:center;letter-spacing:1.2px;font-weight:600;border:1px solid transparent;padding:9px;background:transparent;margin-bottom:23px;color:var(--navy)}.paper-title:hover{border-color:var(--line)}.paper-patient{font-size:11px;color:#8996a9;line-height:1.9;margin-bottom:22px}.paper-patient strong{color:var(--ink);font-weight:550}.paper textarea{font-size:13px;line-height:1.95;min-height:215px;resize:vertical;border:1px solid transparent;background:#fbfcfe;padding:14px;margin-bottom:25px}.paper textarea:focus{background:var(--surface)}.paper-footer{font-size:10px;color:#9aa4b4;text-align:center;margin-top:15px;padding-top:20px}.paper-footer strong{display:block;color:#6d7e96;font-weight:600;margin-bottom:4px}.doc-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:19px}.doc-bottom p{font-size:10px;line-height:1.7;color:#98a3b3;max-width:330px}.certificate-fields{display:grid;grid-template-columns:minmax(80px,.65fr) minmax(0,1fr) minmax(0,1fr);gap:13px;margin-bottom:20px}.certificate-fields label{font-size:10px}.certificate-preview{padding:21px;background:#fbfcfd;border:1px solid var(--line);border-radius:9px;font-size:12px;line-height:2;min-height:175px;margin:22px 0;white-space:pre-wrap}.signature-note{margin-bottom:19px;font-size:10px;line-height:1.7;color:#9f854d;display:flex;gap:7px;background:#fbf7ed;padding:11px 13px;border-radius:8px}.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:23px;align-items:start}.settings-card{padding:25px}.settings-card h2{font-size:15px;margin-bottom:8px}.settings-card>.small{margin-bottom:23px;display:block}.settings-card .form-grid{gap:18px}.settings-aside .panel{margin-bottom:20px}.signature-status{display:flex;gap:11px;align-items:center;margin:18px 0}.quota{height:5px;background:#e9eff1;border-radius:5px;margin:17px 0 10px;overflow:hidden}.quota>span{display:block;height:100%;background:var(--teal);width:0}.section-gap{margin-top:26px}.admin-tabs{margin-bottom:20px}.audit-item{padding:15px 21px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;font-size:11px}.audit-item:last-child{border:0}.audit-item strong{font-size:11px;font-weight:550}.audit-item .small{font-size:10px}.modal-backdrop{position:fixed;inset:0;background:#061a3b68;backdrop-filter:blur(4px);z-index:100;display:flex;justify-content:center;align-items:center;padding:24px;animation:fadeIn .15s ease}.modal{background:var(--surface);border:1px solid #ffffff50;border-radius:19px;box-shadow:0 25px 100px #00132d30;width:550px;max-width:100%;max-height:calc(100dvh - 48px);display:flex;flex-direction:column;animation:riseIn .18s ease}.modal.wide{width:680px}.modal-head{padding:24px 26px 18px;display:flex;align-items:flex-start;gap:15px;justify-content:space-between}.modal-head h2{font-size:20px;letter-spacing:-.7px}.modal-head p{font-size:11px;color:var(--muted);margin-top:7px}.modal-body{padding:3px 26px 24px;overflow:auto}.modal-footer{display:flex;justify-content:flex-end;gap:8px;padding:17px 26px;border-top:1px solid var(--line);margin-top:22px}.modal-body>.modal-footer{margin:24px -26px -24px}.details-toggle{display:flex;align-items:center;justify-content:space-between;padding:13px 0;width:100%;color:var(--teal);font-size:12px;background:transparent;margin-top:9px;border-top:1px solid var(--line)}details summary{cursor:pointer;list-style:none}details summary::-webkit-details-marker{display:none}.insurance-options{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.insurance-check{font-size:11px;display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;border-radius:7px;border:1px solid var(--line);font-weight:400;cursor:pointer}.insurance-check:has(input:checked){border-color:#a2c9c8;background:var(--teal-soft);color:var(--teal)}.insurance-check input{width:13px;height:13px;margin:0}.auth-screen{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:45px 20px;background:radial-gradient(ellipse at 20% 10%,#edf3f2 0,transparent 45%),radial-gradient(ellipse at 90% 90%,#edf0f7 0,transparent 45%),#f8f9fa}.auth-wrap{width:420px;max-width:100%}.auth-brand{display:flex;flex-direction:column;align-items:center;width:270px;max-width:100%;margin:0 auto 30px}.auth-brand .brand{width:100%}.auth-brand .brand-caption{font-size:10px;margin:12px 0 0;letter-spacing:1.5px}.auth-card{background:var(--surface);border:1px solid #e5ebef;box-shadow:0 15px 60px #09214a07;border-radius:20px;padding:31px 32px}.auth-card h1{font-size:23px;text-align:center;margin-bottom:9px}.auth-subtitle{text-align:center;color:#9aa4b4;font-size:11px;margin-bottom:28px}.auth-card .btn.primary{width:100%;margin-top:7px}.password-wrap{position:relative}.password-wrap input{padding-right:43px}.password-wrap .icon-btn{position:absolute;right:5px;top:5px}.input-prefix{position:relative}.input-prefix input{padding-left:78px}.input-prefix span{position:absolute;left:13px;top:13px;font-size:12px;color:#9aa6b8;border-right:1px solid var(--line);padding-right:12px}.auth-divider{margin:23px 0 19px;border-top:1px solid var(--line)}.auth-register{font-size:11px;color:#97a1b1;text-align:center}.text-btn{background:transparent;padding:0;color:var(--teal);font-weight:600;font-size:inherit}.auth-footer{text-align:center;color:#a2abba;font-size:9px;line-height:1.8;margin:23px 4px 0}.auth-error{padding:11px 13px;border-radius:8px;background:var(--danger-soft);color:var(--danger);font-size:11px;line-height:1.6;margin-bottom:17px;display:none}.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:15px;color:#93a0b3;font-size:12px}.spinner{border:2px solid #dfe9ed;border-top-color:var(--teal);width:25px;height:25px;border-radius:50%;display:inline-block;animation:spin .7s linear infinite}.loading-inline{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--muted);font-size:12px;padding:65px}.toast{position:fixed;right:27px;bottom:27px;z-index:200;max-width:440px;color:#fff;background:#183b43;box-shadow:0 8px 30px #09214a20;border-radius:12px;padding:15px 19px;display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.6;animation:riseIn .2s ease}.toast.error{background:#9d4545}.toast .icon{width:18px;height:18px}.action-card{display:flex;align-items:center;gap:15px;padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:13px;width:100%;text-align:left;color:var(--ink)}.action-card h3{font-size:12px;margin-bottom:5px}.action-card p{font-size:10px;color:var(--muted)}.model-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}.model-card{padding:23px;display:flex;flex-direction:column;min-height:190px}.model-card h3{font-size:14px;margin:15px 0 9px}.model-card p{font-size:11px;color:var(--muted);white-space:pre-wrap;line-height:1.7;max-height:80px;overflow:hidden}.model-card .row{margin-top:auto;padding-top:17px}.mobile-overlay{display:none}.view-enter{animation:fadeIn .17s ease}.link-list{display:grid;gap:9px;margin-top:15px;font-size:11px}.link-list a{display:flex;align-items:center;justify-content:space-between}.inline-links{display:flex;align-items:center;gap:10px}.download-success{display:flex;flex-direction:column;align-items:center;padding:16px 0;text-align:center}.download-success>.empty-icon{background:var(--teal-soft);color:var(--teal)}.download-success h3{font-size:17px;margin-bottom:9px}.download-success p{font-size:12px;max-width:370px;color:var(--muted);margin-bottom:20px}.download-success .row{justify-content:center;flex-wrap:wrap}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes riseIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
:root[data-theme=dark]{--bg:#111a29;--surface:#182335;--ink:#e5ebf3;--muted:#8f9db1;--line:#2a374b;--teal:#76c6c6;--teal-soft:#213e47;--navy:#dce9fc;--danger:#ee9a94;--danger-soft:#4d3037;--shadow:0 12px 40px #00000015}:root[data-theme=dark] .btn.primary{background:#287c85;color:white;border-color:#287c85}:root[data-theme=dark] .brand img{filter:brightness(0) invert(1)}:root[data-theme=dark] .table th,:root[data-theme=dark] .table tbody tr:hover,:root[data-theme=dark] .editor-actions,:root[data-theme=dark] .paper textarea,:root[data-theme=dark] .note-editor textarea,:root[data-theme=dark] .certificate-preview{background:#1b293c}:root[data-theme=dark] .schedule-content:hover,:root[data-theme=dark] .btn:hover{background:#223349}:root[data-theme=dark] .aside-card{background:#213b46}:root[data-theme=dark] .stat-icon,:root[data-theme=dark] .avatar,:root[data-theme=dark] .empty-icon{background:#26364e;color:#a6b7ce}:root[data-theme=dark] .auth-screen{background:#111a29}:root[data-theme=dark] .segmented{background:#111a29}:root[data-theme=dark] .allergy,:root[data-theme=dark] .notice.warn,:root[data-theme=dark] .signature-note{background:#403827;color:#d9bf89}
@media(min-width:1500px){.main{padding-top:42px}.agenda-grid{grid-template-columns:270px minmax(0,1fr)}.agenda-body{min-height:410px}.calendar{padding:23px}.calendar-day{height:31px;max-width:29px}.calendar-week{margin-top:23px}}
@media(max-width:1200px){:root{--sidebar:215px}.sidebar{padding-left:13px;padding-right:13px}.main{padding:29px 26px}.topbar{padding:0 26px}.topbar-section{display:none}.agenda-grid{grid-template-columns:220px minmax(0,1fr);gap:17px}.stat{padding:16px}.stat-note{display:none}.patient-grid{grid-template-columns:minmax(0,1fr) 270px;gap:17px}.settings-grid{grid-template-columns:minmax(0,1fr) 280px;gap:17px}.doc-layout{grid-template-columns:190px minmax(0,1fr);gap:17px}.paper{padding:28px}.hero-actions .btn{font-size:10px;padding:9px 11px}.model-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-footer{padding-left:26px;padding-right:26px}}
@media(max-width:980px){:root{--sidebar:190px}.sidebar-brand{margin-bottom:33px}.sidebar .brand-caption{font-size:8px}.nav-item{padding:11px 11px;font-size:11px;gap:10px}.sidebar-note{font-size:9px}.user-mini .user-name{max-width:100px}.topbar{height:75px;padding:0 22px}.main{padding:27px 22px}.topbar .btn.primary{font-size:11px;padding:10px 12px}.topbar .avatar{display:none}.top-search{max-width:350px}.agenda-grid{grid-template-columns:1fr}.agenda-aside{display:none}.patient-grid{grid-template-columns:1fr}.patient-history{display:grid;grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.settings-aside{display:grid;grid-template-columns:1fr 1fr;gap:17px}.doc-layout{grid-template-columns:1fr}.template-sidebar{display:flex;align-items:center;gap:7px;overflow:auto;padding:12px 14px}.template-sidebar h3{margin:0 8px 0 0;font-size:10px;white-space:nowrap}.template-item{padding:8px;white-space:nowrap;min-width:fit-content;font-size:10px;background:var(--bg)}.template-hint{font-size:10px;padding:2px 7px}.template-sidebar .empty{display:none}.patient-hero h1{font-size:20px}.patient-hero{gap:12px}.hero-actions{flex-wrap:wrap;justify-content:flex-end;max-width:145px}.tabs{gap:20px}.page-heading h1{font-size:25px}}
@media(max-width:720px){:root{--sidebar:242px}.sidebar{transform:translateX(-100%);transition:transform .2s;z-index:90;padding:24px 22px}.sidebar.open{transform:translateX(0)}.sidebar .brand-caption{font-size:9px}.sidebar .nav-item{font-size:12px;padding:12px 14px}.user-mini .user-name{max-width:130px}.workspace{margin:0}.mobile-menu{display:inline-flex;flex-shrink:0}.mobile-overlay.show{display:block;position:fixed;inset:0;background:#061a3b65;z-index:80}.topbar{height:69px;padding:0 17px;gap:11px}.top-search{max-width:none}.top-actions{gap:3px}.top-actions>.icon-btn{display:none}.topbar .btn.primary{width:36px;min-height:36px;padding:0;font-size:0;border-radius:9px}.topbar .btn.primary .icon{width:17px;height:17px}.search-box input{font-size:11px;padding-top:9px;padding-bottom:9px}.key-hint{display:none}.search-box input{padding-right:10px}.main{padding:25px 18px 20px}.page-heading{align-items:flex-start;margin-bottom:21px;gap:10px}.page-heading h1{font-size:25px}.page-heading .today-pill{font-size:0;padding:10px;gap:0}.page-heading .today-pill .icon{width:19px;height:19px}.page-description{font-size:11px;max-width:260px;line-height:1.7}.eyebrow{font-size:9px;letter-spacing:1.4px}.stats{gap:9px;margin-bottom:20px}.stat{padding:13px 11px;flex-direction:column;gap:10px;align-items:flex-start;border-radius:11px}.stat-icon{width:29px;height:29px;border-radius:8px}.stat-icon .icon{width:16px;height:16px}.stat-label{font-size:9px;margin-bottom:7px;white-space:normal;line-height:1.4}.stat-value{font-size:21px}.agenda-head{padding:18px 16px;flex-wrap:wrap}.agenda-date{font-size:15px}.agenda-toolbar{padding:12px 16px;gap:10px;flex-wrap:wrap}.agenda-toolbar .doctor-filter{max-width:190px}.agenda-toolbar .row{gap:7px}.schedule-time{width:56px;padding:22px 9px;font-size:10px}.schedule-marker{left:55px}.schedule-content{padding:14px 12px;gap:9px}.schedule-content .avatar{width:31px;height:31px;border-radius:10px;font-size:10px}.schedule-name{font-size:11px}.schedule-info{font-size:9px;gap:6px}.schedule-actions{padding-right:11px;gap:4px;align-items:flex-end;justify-content:center;flex-direction:column}.schedule-actions .icon-btn{display:none}.status-select{width:97px;font-size:8px;padding:6px}.agenda-body{min-height:320px}.date-controls .icon-btn{width:29px;height:29px}.date-controls .btn{min-height:29px;padding:5px 8px;margin:0 3px;font-size:9px}.app-footer{font-size:8px;padding:12px 18px 22px;gap:15px;display:block}.app-footer>span:last-child{display:block;margin-top:9px}.empty{padding:45px 22px}.empty p{font-size:10px}.list-toolbar{padding:15px;flex-wrap:wrap;gap:12px}.list-search{width:100%}.table th,.table td{padding:13px 15px}.table .hide-mobile{display:none}.patient-hero{align-items:flex-start;margin-top:20px;gap:11px;flex-wrap:wrap}.patient-hero .avatar.big{width:44px;height:44px;border-radius:13px;font-size:15px}.patient-hero h1{font-size:18px}.patient-hero>div:nth-child(2){flex:1 1 180px;min-width:0}.patient-meta{font-size:10px;gap:6px 10px;margin-top:7px}.hero-actions{max-width:none;margin-left:55px;justify-content:flex-start}.hero-actions .btn{font-size:9px;min-height:32px;padding:6px 10px}.tabs{gap:18px;margin-bottom:21px}.tab{font-size:10px;gap:6px;padding:12px 0}.tab .icon{width:14px;height:14px}.patient-grid{gap:19px}.note-heading{padding:18px}.note-editor{padding:18px}.note-editor textarea{min-height:245px;font-size:12px}.note-editor .row{align-items:flex-start;flex-wrap:wrap}.editor-actions{padding:15px 18px;gap:6px}.editor-actions .btn{font-size:10px;padding:10px 13px}.paper{padding:23px 19px;border-radius:10px;min-height:450px}.paper-brand{padding-bottom:18px;margin-bottom:18px}.paper-brand .brand{width:115px}.paper-meta{font-size:8px}.paper-title{font-size:12px!important;margin-bottom:19px}.paper textarea{font-size:12px;padding:11px;line-height:1.9}.paper-patient{font-size:10px}.doc-toolbar{gap:9px;flex-wrap:wrap}.doc-toolbar>.btn{font-size:9px;padding:8px 10px;min-height:32px}.segmented button{padding:8px 10px;font-size:9px}.doc-bottom{align-items:flex-start;flex-direction:column;gap:14px}.doc-bottom .btn{width:100%}.doc-bottom p{max-width:none}.certificate-fields{grid-template-columns:minmax(70px,.7fr) minmax(0,1fr);gap:10px}.certificate-fields .field:last-child{grid-column:1/-1}.settings-aside{grid-template-columns:1fr;gap:0}.settings-card{padding:20px}.settings-card .form-grid{gap:15px}.settings-card .form-grid .field{grid-column:1/-1}.model-grid{grid-template-columns:1fr;gap:15px}.model-card{min-height:170px}.modal-backdrop{padding:14px;align-items:flex-end}.modal{border-radius:19px 19px 12px 12px;max-height:calc(100dvh - 28px)}.modal-head{padding:22px 21px 17px}.modal-head h2{font-size:19px}.modal-body{padding:2px 21px 23px}.modal-body>.modal-footer{margin-left:-21px;margin-right:-21px;margin-bottom:-23px;padding:15px 21px}.modal .form-grid{gap:13px}.modal .form-grid>.field:first-child{grid-column:1/-1}.toast{bottom:18px;left:18px;right:18px;max-width:none;font-size:11px;padding:13px 15px}.auth-card{padding:29px 24px}.auth-brand{margin-bottom:23px}.auth-footer{font-size:8px}.auth-screen{padding-top:29px;padding-bottom:29px}.table td:has(.btn){white-space:nowrap}.insurance-check{font-size:10px;padding:7px 9px}.small-mobile{font-size:10px}.section-gap{margin-top:21px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:720px){input:not([type=checkbox]):not([type=hidden]),textarea,.modal select,.settings-card select,.note-editor select{font-size:16px}.paper .paper-title{font-size:16px!important}.search-box input{font-size:16px}.top-search .search-box input{font-size:16px}.paper textarea{font-size:16px}.certificate-fields input{font-size:16px}.list-search input{font-size:16px}.schedule-actions .status-select{font-size:11px}}

/* Keep complete labels and clinical text visible at every workspace width. */
.workspace,.main,.panel,.field,.row,.search-box,.stat,.stat>div,.agenda-grid>*,.patient-grid>*,.doc-layout>*,.settings-grid>*,.model-grid>*,.form-grid>*,.certificate-fields>*{min-width:0}
input,select,textarea{min-width:0;max-width:100%}
h1,h2,h3,.nav-item,.page-description,.patient-meta,.paper-patient,.paper-footer,.certificate-preview,.history-text,.template-item,.template-hint,.auth-footer,.app-footer,.notice{overflow-wrap:break-word}
.nav-item{line-height:1.5}
.nav-item .badge{margin-left:auto;flex-shrink:0}
.user-mini>div,.schedule-content,.schedule-content>div,.patient-hero>div:nth-child(2),.search-result>div{min-width:0}
.schedule-name,.search-result strong,.template-item span,.history-doc,.model-card h3{overflow-wrap:anywhere}
.schedule-content .avatar,.stat-icon,.date-controls,.topbar-section{flex-shrink:0}
.calendar>.row{gap:5px;align-items:flex-start}
.calendar>.row>.row{flex-shrink:0}
.calendar-title{min-width:0;line-height:1.7}
.patient-hero{flex-wrap:wrap}
.patient-hero>div:nth-child(2){flex:1 1 180px}
.patient-meta span{min-width:0}
.hero-actions,.panel-heading,.modal-footer,.list-toolbar,.signature-status,.audit-item,.inline-links{flex-wrap:wrap}
.doc-toolbar>.segmented{min-width:0}
.paper-meta{min-width:0;overflow-wrap:break-word}
.paper textarea.paper-title{min-height:0;height:auto;field-sizing:content;resize:vertical;font-size:15px;line-height:1.5;background:transparent;text-align:center;letter-spacing:.6px;padding:9px;margin-bottom:23px}
.certificate-fields input[type=date]{width:100%;padding-left:8px;padding-right:8px}
@media(max-width:720px){
  .auth-brand{width:270px;max-width:100%;margin:0 auto 23px}
  .auth-brand .brand-caption{font-size:10px;letter-spacing:1px}
  .topbar{min-height:69px;height:auto;padding-top:10px;padding-bottom:10px}
  .topbar .btn.primary{flex-shrink:0}
  .hero-actions{max-width:calc(100% - 55px)}
  .paper textarea.paper-title{font-size:16px!important;letter-spacing:.2px}
  .paper-brand{gap:10px}
  .doc-toolbar .segmented{width:100%}
  .doc-toolbar>.btn{margin-left:auto}
  .modal-footer .btn{flex:1 1 auto}
  .template-sidebar{max-width:100%}
  .template-sidebar .template-item{flex:0 0 auto;width:auto}
  .template-sidebar .template-hint{min-width:190px}
}
@media(max-width:390px){
  .main{padding-left:14px;padding-right:14px}
  .schedule-row{flex-wrap:wrap}
  .schedule-actions{flex:1 0 100%;flex-direction:row;padding:0 12px 12px 68px;justify-content:flex-end}
  .schedule-marker{bottom:45px}
  .schedule-content{min-height:80px}
  .schedule-content>div{flex:1}
  .certificate-fields{grid-template-columns:minmax(0,1fr)}
  .certificate-fields .field:last-child{grid-column:auto}
}
/* Complementary images and exams — original files remain intact. */
.attachment-section{margin-top:23px;padding-top:20px;border-top:1px solid var(--line)}.attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.attachment-heading h3{font-size:12px;font-weight:600}.attachment-heading p{font-size:10px;color:var(--muted);margin-top:5px;line-height:1.7}.attachment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.attachment-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);min-width:0}.attachment-card.selected{border-color:#7eafb2;box-shadow:0 0 0 1px #176b7510}.attachment-preview{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:110px;background:#f1f4f7;color:#8296ad;padding:0;overflow:hidden}.attachment-preview img{width:100%;height:100%;object-fit:cover;display:block}.attachment-file-icon{display:flex;align-items:center;flex-direction:column;gap:9px;font-size:9px}.attachment-file-icon>.icon{width:27px;height:27px;stroke-width:1.3}.attachment-selected-mark{position:absolute;right:7px;top:7px;background:var(--teal);color:white;border-radius:50%;display:flex;padding:3px}.attachment-selected-mark .icon{width:12px;height:12px}.attachment-description{padding:10px}.attachment-title{display:block;max-width:100%;width:100%;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;background:transparent;padding:0;font-size:10px;font-weight:550;color:var(--ink)}.attachment-meta{display:flex;align-items:center;justify-content:space-between;margin-top:8px;gap:4px}.attachment-meta .check{font-size:8px;align-items:center;gap:5px;white-space:nowrap}.attachment-meta input[type=checkbox]{width:12px;height:12px;margin:0}.attachment-meta .icon-btn{width:23px;height:23px}.attachment-meta .icon-btn>.icon,.attachment-preserved>.icon{width:12px;height:12px}.attachment-preserved{color:#a0acbd;display:flex;padding:5px}.attachment-add-row{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.attachment-add-row .btn{font-size:10px;padding:7px 10px}.attachment-add-row>.tiny{font-size:9px;line-height:1.8}.camera-button{display:none}.attachment-selection-note{display:flex;gap:6px;align-items:center;font-size:10px;color:var(--teal);margin-top:11px}.attachment-selection-note>.icon{width:13px;height:13px}.history-attachments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:12px}.history-attachment .attachment-preview{height:72px}.history-attachment .attachment-description{padding:7px}.history-attachment .attachment-title{font-size:9px}.history-attachment .attachment-file-icon{gap:5px;font-size:8px}.history-attachment .attachment-file-icon>.icon{width:21px;height:21px}.attachment-upload-list{display:grid;gap:14px}.attachment-upload-item{display:grid;grid-template-columns:68px minmax(0,1fr);gap:13px;align-items:start;padding:14px;border:1px solid var(--line);border-radius:11px}.attachment-upload-thumb{height:68px;border-radius:7px;background:var(--bg);display:flex;align-items:center;justify-content:center;color:var(--muted);overflow:hidden}.attachment-upload-thumb img{width:100%;height:100%;object-fit:cover}.attachment-upload-item strong{display:block;font-size:11px;font-weight:550;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:1px 0 5px}.attachment-upload-item .tiny{display:block;font-size:9px;margin-bottom:9px}.attachment-upload-item input{font-size:11px;padding:8px 10px}.upload-progress{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--teal);padding:17px 0 0}.upload-progress .spinner{width:17px;height:17px}.attachment-viewer{display:flex;align-items:center;justify-content:center;max-height:61dvh;min-height:180px;overflow:auto;background:#f2f4f6;border:1px solid var(--line);border-radius:10px}.attachment-viewer img{max-width:100%;max-height:60dvh;width:auto;height:auto;object-fit:contain;display:block;cursor:zoom-in}.attachment-viewer.zoomed{display:block}.attachment-viewer.zoomed img{max-width:none;max-height:none;min-width:100%;cursor:zoom-out}.attachment-document{flex-direction:column;gap:9px;padding:30px}.attachment-document .empty-icon{margin:0 0 12px}.attachment-viewer-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin-top:17px}.attachment-caption{margin-top:15px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}:root[data-theme=dark] .attachment-preview,:root[data-theme=dark] .attachment-viewer{background:#1b293c}
@media(max-width:1100px){.attachment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.camera-button{display:inline-flex}.attachment-heading{align-items:flex-start}.attachment-heading p{font-size:9px}.attachment-preview{height:125px}.attachment-meta .check{font-size:9px}.attachment-grid{gap:9px}.attachment-add-row .btn{font-size:10px;min-height:35px}.attachment-add-row>.tiny{flex:1 0 100%;font-size:9px}.attachment-upload-item{padding:11px;grid-template-columns:50px minmax(0,1fr);gap:10px}.attachment-upload-thumb{height:50px}.attachment-upload-item input{font-size:16px}.attachment-upload-item strong{font-size:10px}.attachment-viewer{max-height:58dvh}.attachment-viewer img{max-height:57dvh}.history-attachments{grid-template-columns:repeat(3,minmax(0,1fr))}.history-attachment .attachment-preview{height:85px}.attachment-heading>.tiny{white-space:nowrap;font-size:9px}}
@media(max-width:390px){.history-attachments{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Global navigation above; patient sections beside the clinical workspace. */
.workspace{margin-left:0}.global-header{position:sticky;top:0;z-index:45;min-height:92px;padding:14px 34px;display:flex;align-items:center;gap:30px;background:var(--surface);border-bottom:1px solid var(--line)}.global-brand{background:transparent;padding:0;flex:0 0 185px;color:var(--ink)}.global-brand .brand{width:185px;height:45px;margin:0 auto}.global-brand .brand img{max-height:44px;width:auto;max-width:100%;position:static;transform:none;object-fit:contain}.global-brand .brand-caption{display:block;width:100%;text-align:center;margin:6px 0 0;font-size:8px;letter-spacing:1.35px}.global-nav{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0}.global-nav-item{display:flex;align-items:center;gap:8px;justify-content:center;background:transparent;color:#8b97a8;padding:12px 11px;border-radius:8px;font-size:11px;white-space:nowrap;font-weight:500}.global-nav-item .icon{width:16px;height:16px}.global-nav-item:hover{color:var(--teal);background:var(--bg)}.global-nav-item.active{background:var(--teal-soft);color:var(--teal);font-weight:650}.global-user{display:flex;align-items:center;gap:9px;flex-shrink:0}.global-user strong{font-size:10px;display:block;max-width:130px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-weight:600}.global-user>div>span{font-size:9px;display:block;margin-top:5px;color:var(--muted)}.global-user>.avatar{width:33px;height:33px;border-radius:10px;font-size:10px}.global-user>.icon-btn{width:29px;height:29px}.topbar{top:92px;height:70px;max-width:none;gap:25px;padding:0 38px;background:var(--surface)}.workspace-context{font-size:11px;color:#8e99aa}.top-search{max-width:470px;margin-left:auto}.top-actions{gap:13px}.main{max-width:1600px}.patient-workspace{display:grid;grid-template-columns:190px minmax(0,1fr);gap:25px;align-items:start}.patient-navigation{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:20px 11px;position:sticky;top:188px}.patient-nav-label{font-size:9px;font-weight:600;letter-spacing:1.6px;color:#a0aabb;margin:1px 12px 15px}.patient-nav-links{display:grid;gap:6px}.patient-nav-item{display:flex;align-items:center;gap:10px;padding:12px 11px;border-radius:8px;background:transparent;color:#8d99aa;text-align:left;font-size:11px;line-height:1.65}.patient-nav-item .icon{width:16px;height:16px;flex-shrink:0}.patient-nav-item span{overflow-wrap:normal;word-break:normal;min-width:0}.patient-nav-item.active{background:var(--teal-soft);color:var(--teal);font-weight:650}.patient-nav-item:hover{background:var(--bg)}.patient-nav-toggle{display:none}.patient-content{min-width:0}.patient-content .patient-grid{grid-template-columns:minmax(0,1fr) 275px;gap:20px}.patient-content .doc-layout{grid-template-columns:180px minmax(0,1fr);gap:18px}.hero-actions{max-width:none}.hero-actions .btn{font-size:10px}.doc-template-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-wrap:wrap}.doc-template-actions .btn{font-size:10px;padding:8px 11px;min-height:34px}.template-picker-list{display:grid;gap:11px}.template-picker-item{display:flex;align-items:center;gap:13px;padding:16px;border:1px solid var(--line);border-radius:11px;background:var(--surface);width:100%;text-align:left;color:var(--ink)}.template-picker-item:hover{border-color:#9ec3c4;background:var(--teal-soft)}.template-picker-item>span:nth-child(2){min-width:0;flex:1}.template-picker-item strong{display:block;font-size:12px;font-weight:600;line-height:1.65}.template-picker-item small{display:block;font-size:10px;color:var(--muted);white-space:pre-wrap;max-height:48px;overflow:hidden;line-height:1.7;margin-top:5px}.template-apply-label{font-size:10px;color:var(--teal);display:flex;align-items:center;gap:5px;white-space:nowrap}.template-apply-label .icon{width:14px;height:14px}.registration-row{display:grid;grid-template-columns:minmax(0,1fr) 135px 26px;gap:11px;align-items:start;margin-bottom:15px}.registration-row .field{margin-bottom:0}.registration-row:first-child{grid-template-columns:minmax(0,1fr) 172px}.registration-remove{margin-top:27px;width:25px;height:30px}.registration-help{font-size:9px;line-height:1.8;margin:7px 0 10px}.add-registration{font-size:10px;color:var(--teal);padding-left:0;min-height:30px}.add-registration[hidden]{display:none}.budget-editor{max-width:900px}.budget-body{padding:27px}.budget-patient{display:flex;align-items:center;gap:12px;padding-bottom:22px;margin-bottom:25px;border-bottom:1px solid var(--line)}.budget-patient label{font-size:10px;font-weight:400;margin-bottom:5px}.budget-patient strong{font-size:13px;font-weight:600}.budget-main-fields{display:grid;grid-template-columns:1.2fr 1fr;gap:20px;margin-top:20px}.currency-input{position:relative}.currency-input>span{position:absolute;left:13px;top:13px;color:var(--muted);font-size:13px}.currency-input input{padding-left:40px;font-size:17px;font-weight:600}.budget-discount{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 17px;border:1px solid var(--line);border-radius:10px;margin-top:4px}.budget-discount .check{align-items:center;font-size:11px}.discount-input{position:relative;width:76px;flex-shrink:0}.discount-input input{padding:8px 23px 8px 10px;font-size:12px}.discount-input>span{position:absolute;right:9px;top:10px;color:var(--muted);font-size:11px}.budget-summary{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:19px 18px;border-radius:10px;background:var(--teal-soft);margin:18px 0 24px;font-size:11px;color:var(--teal)}.budget-summary>div{display:flex;flex-direction:column;gap:7px}.budget-summary span{font-size:10px;opacity:.8}.budget-summary strong{font-size:15px;font-weight:600;line-height:1.5}.budget-summary small{font-size:9px;opacity:.8}.budget-extra{margin-top:10px}.budget-extra .details-toggle{font-size:11px}.budget-editor .editor-actions{gap:15px}.appointment-not-found{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-top:11px;padding:12px 13px;border:1px solid #e8e2d2;background:#fbf8ee;border-radius:8px}.appointment-not-found>span{font-size:10px;color:#9a875c;line-height:1.7}.appointment-not-found .btn{font-size:10px;white-space:normal;line-height:1.6;text-align:center}.global-brand .brand img{filter:none}:root[data-theme=dark] .global-brand .brand{background:transparent}:root[data-theme=dark] .appointment-not-found{background:#403827;border-color:#665c41}
@media(max-width:1350px){.global-header{padding-left:25px;padding-right:25px;gap:20px}.global-brand{flex-basis:165px}.global-brand .brand{width:165px}.global-nav{gap:3px}.global-nav-item{font-size:10px;padding:11px 9px;gap:6px}.global-user>div{display:none}.patient-content .patient-grid{grid-template-columns:minmax(0,1fr) 250px}.patient-content .doc-layout{grid-template-columns:1fr}.patient-content .template-sidebar{display:flex;align-items:center;gap:7px;overflow:auto;padding:12px 14px;max-width:100%}.patient-content .template-sidebar h3{font-size:10px;white-space:nowrap;margin:0 8px 0 0}.patient-content .template-item{flex:0 0 auto;width:auto;white-space:nowrap;padding:8px;background:var(--bg)}.patient-content .template-hint{min-width:190px;padding:2px 7px;font-size:10px}}
@media(max-width:1100px){.global-header{gap:13px;padding-left:20px;padding-right:20px;min-height:84px}.global-brand{flex-basis:150px}.global-brand .brand{width:150px;height:38px}.global-brand .brand-caption{font-size:7px;letter-spacing:1.1px}.global-nav-item{font-size:10px;padding:10px 8px;gap:5px}.global-nav-item .icon{width:14px;height:14px}.global-user>.avatar{display:none}.topbar{top:84px}.patient-workspace{grid-template-columns:175px minmax(0,1fr);gap:20px}.patient-content .patient-grid{grid-template-columns:minmax(0,1fr)}.patient-navigation{padding:18px 9px;top:179px}.patient-nav-item{font-size:10px;gap:9px}.registration-row{grid-template-columns:minmax(0,1fr) 120px 24px}.registration-row:first-child{grid-template-columns:minmax(0,1fr) 155px}.budget-body{padding:23px}.hero-actions{flex-wrap:wrap;max-width:390px}.hero-actions .btn{white-space:normal;line-height:1.6}}
@media(max-width:860px){.global-header{flex-wrap:wrap;gap:10px;padding:11px 20px 0;min-height:113px}.global-brand{flex-basis:155px}.global-user{margin-left:auto}.global-user>.avatar{display:flex}.global-nav{order:3;flex:1 0 100%;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;gap:8px;padding:4px 0 10px}.global-nav::-webkit-scrollbar{display:none}.global-nav-item{font-size:10px;padding:9px 12px;gap:7px}.global-nav-item .icon{width:15px;height:15px}.global-user>div{display:block}.global-user strong{max-width:180px}.topbar{top:113px;height:65px;padding:0 22px}.workspace-context{display:none}.top-search{max-width:none;margin-left:0}.patient-workspace{grid-template-columns:1fr;gap:19px}.patient-navigation{padding:0;position:static;border-radius:10px;overflow:hidden}.patient-nav-label{display:none}.patient-nav-toggle{display:flex;align-items:center;gap:9px;padding:13px 15px;background:var(--surface);color:var(--teal);font-size:11px;font-weight:600;width:100%;text-align:left}.patient-nav-toggle>span{flex:1}.patient-nav-toggle>.icon{width:16px;height:16px}.patient-nav-links{display:none;grid-template-columns:repeat(2,minmax(0,1fr));padding:5px 11px 13px;gap:5px}.patient-navigation.expanded .patient-nav-links{display:grid}.patient-nav-item{font-size:11px;line-height:1.7;padding:11px 10px}.hero-actions{max-width:100%}.global-header+.workspace .main{padding-top:26px}}
@media(max-width:720px){.global-header{padding:10px 18px 0;gap:9px;min-height:113px}.global-brand{flex-basis:150px}.global-brand .brand{width:150px;height:37px}.global-brand .brand-caption{font-size:7px;margin-top:5px;letter-spacing:1.1px}.global-nav{gap:4px}.global-nav-item{font-size:10px;padding:9px 10px;gap:6px}.global-user>div{display:none}.global-user>.avatar{width:29px;height:29px;font-size:9px}.global-user>.icon-btn{width:27px}.topbar{top:113px;height:65px;min-height:65px;padding:0 18px;gap:10px}.top-actions{gap:4px}.topbar .btn.primary{width:auto;font-size:10px;padding:8px 10px;min-height:36px}.topbar .btn.primary .icon{width:14px;height:14px}.top-search .search-box input{padding-right:10px}.patient-hero .hero-actions{max-width:calc(100% - 55px);gap:7px}.hero-actions .btn{min-height:34px;font-size:9px}.hero-actions .btn.primary{width:100%;justify-content:center}.patient-nav-links{grid-template-columns:1fr 1fr;gap:5px}.patient-nav-item{font-size:10px;gap:8px}.patient-content .doc-layout{gap:15px}.doc-template-actions{width:100%;justify-content:flex-end;margin-top:2px}.doc-template-actions .btn{font-size:10px;min-height:34px;padding:8px 10px}.registration-row,.registration-row:first-child{grid-template-columns:minmax(0,1fr) 105px;gap:10px;position:relative}.registration-row:not(:first-child){padding-top:12px;border-top:1px solid var(--line);padding-right:25px}.registration-row:not(:first-child) .registration-remove{position:absolute;right:0;top:11px}.registration-row label{font-size:10px}.registration-row select,.registration-row input{font-size:16px;min-width:0}.registration-help{font-size:9px}.template-picker-item{padding:13px 11px;gap:10px;flex-wrap:wrap}.template-picker-item .avatar{width:31px;height:31px;border-radius:9px}.template-picker-item strong{font-size:11px}.template-picker-item small{font-size:9px}.template-apply-label{margin-left:41px;flex:1 0 calc(100% - 41px);font-size:10px;justify-content:flex-end}.budget-body{padding:20px}.budget-main-fields{grid-template-columns:1fr;gap:0;margin-top:17px}.budget-discount{gap:10px;padding:13px}.budget-discount .check{font-size:10px;line-height:1.8}.discount-input{width:68px}.discount-input input{font-size:16px;padding-right:20px}.discount-input>span{top:12px}.currency-input input{font-size:20px}.budget-summary{padding:16px;font-size:10px}.budget-summary strong{font-size:14px}.budget-editor .editor-actions{flex-wrap:wrap;gap:12px}.budget-editor .editor-actions>.tiny{flex:1 0 100%;font-size:9px}.budget-editor .editor-actions>.btn{width:100%;font-size:11px}.appointment-not-found{align-items:flex-start;flex-wrap:wrap}.appointment-not-found .btn{width:100%}.budget-extra .form-grid{grid-template-columns:1fr}.budget-extra .form-grid>.field{grid-column:1/-1}.budget-patient{padding-bottom:19px;margin-bottom:20px}.budget-patient strong{font-size:12px}.global-nav-item.active{box-shadow:0 1px 4px #176b7508}}
@media(max-width:390px){.global-header{padding-left:14px;padding-right:14px}.topbar{padding-left:14px;padding-right:14px}.topbar .btn.primary{font-size:9px;padding:8px}.topbar .btn.primary .icon{display:none}.global-user>.avatar{display:none}.patient-nav-links{grid-template-columns:1fr}.patient-nav-item{font-size:11px}.registration-row,.registration-row:first-child{grid-template-columns:minmax(0,1fr)}.registration-row .registration-rqe{max-width:100%}.registration-row:not(:first-child){padding-right:28px}}
/* Full clinical timeline under the editor, with specialties on the right. */
.patient-content .patient-grid.history-layout{grid-template-columns:minmax(0,1fr) 220px;gap:21px;align-items:start}.clinical-stream{min-width:0}.history-below{margin-top:24px;display:grid;gap:22px}.history-below .history-text{max-height:none;overflow:visible;font-size:12px;line-height:1.95;white-space:pre-wrap;word-break:normal;overflow-wrap:anywhere;color:#64758e}.history-below .history-item{padding:23px}.history-note-heading{display:flex;align-items:center;gap:11px}.history-author{flex:1;min-width:0}.history-author strong{display:block;font-size:12px;font-weight:600;line-height:1.7;overflow-wrap:anywhere}.history-author>span{display:block;font-size:10px;line-height:1.8;color:var(--muted);margin-top:3px}.history-note-heading>.badge{font-size:9px}.history-specialty-tags{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:15px 0}.history-specialty-tags .badge{font-size:9px;white-space:normal;line-height:1.6}.history-filter-panel{position:sticky;top:185px}.history-filter-panel .panel-heading{padding:20px 18px}.history-filter-panel .panel-heading h2{font-size:12px}.history-filter-panel .panel-heading p{font-size:9px;line-height:1.8}.history-filter-panel .panel-heading>.icon{width:16px;height:16px;color:#96a4b7}.history-filters{display:grid;gap:5px;padding:12px 10px}.history-filter{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;width:100%;padding:11px 10px;border-radius:8px;background:transparent;color:#8a98aa;font-size:10px;line-height:1.8}.history-filter>span:first-child{min-width:0;overflow-wrap:normal;word-break:normal}.history-filter>span:last-child{font-size:9px;flex-shrink:0;min-width:19px;text-align:center;border-radius:5px;background:var(--bg);color:#9aa7b9;padding:1px 5px}.history-filter.active{background:var(--teal-soft);color:var(--teal);font-weight:600}.history-filter.active>span:last-child{background:var(--surface);color:var(--teal)}.history-filter:hover{background:var(--bg)}.history-filter-note{padding:17px 19px;display:flex;gap:8px;border-top:1px solid var(--line);color:#a2adbc}.history-filter-note>.icon{width:14px;height:14px;margin-top:3px}.history-filter-note p{font-size:9px;line-height:1.9}.history-below .history-attachments{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px}.history-below .history-attachment .attachment-preview{height:112px}.history-document-panel .history-doc{font-size:12px;line-height:1.8}.clinical-stream>.panel>.note-heading{gap:12px}:root[data-theme=dark] .history-below .history-text{color:#b2bfd1}
@media(max-width:1200px){.patient-content .patient-grid.history-layout{grid-template-columns:minmax(0,1fr) 190px;gap:17px}.history-filter-panel .panel-heading{padding:18px 15px}.history-filters{padding:10px 8px}.history-filter{padding:10px 8px;font-size:9px}.history-filter-note{padding:16px 14px}}
@media(max-width:1000px){.patient-content .patient-grid.history-layout{grid-template-columns:minmax(0,1fr)}.history-filter-panel{position:static;grid-row:1}.history-filter-panel .panel-heading{padding:15px 18px}.history-filters{display:flex;overflow-x:auto;gap:7px;padding:10px 13px}.history-filter{flex:0 0 auto;width:auto;font-size:10px;gap:9px;padding:9px 11px}.history-filter>span:first-child{white-space:nowrap}.history-filter-note{display:none}.history-below{margin-top:21px}}
@media(max-width:720px){.history-below .history-item{padding:19px 17px}.history-below .history-text{font-size:12px;line-height:2}.history-author strong{font-size:11px}.history-author>span{font-size:9px}.history-note-heading{gap:10px;flex-wrap:wrap}.history-note-heading>.avatar{width:32px;height:32px;font-size:10px;border-radius:10px}.history-note-heading>.badge{font-size:8px}.history-below .history-attachments{grid-template-columns:repeat(2,minmax(0,1fr))}.history-below .history-attachment .attachment-preview{height:125px}.history-specialty-tags{margin:13px 0;gap:5px}.history-specialty-tags .badge{font-size:8px}.history-filter-panel .panel-heading h2{font-size:11px}.history-filters{padding:9px 11px}.history-filter{font-size:9px}.history-document-panel .history-doc{font-size:11px}}
/* Sharing stays explicit; integration secrets never appear again. */
.shared-offers .panel-heading h2{font-size:13px}.shared-offers .panel-heading p{font-size:10px}.shared-offer-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 22px;border-bottom:1px solid var(--line)}.shared-offer-item:last-child{border-bottom:0}.shared-offer-item strong{font-size:12px;font-weight:600}.shared-offer-item p{font-size:9px;margin-top:7px;line-height:1.8}.sharing-access-list{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}.sharing-access-list h3{font-size:13px;margin-bottom:11px}.sharing-access-item{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid var(--line)}.sharing-access-item:last-child{border-bottom:0}.sharing-access-item strong{display:block;font-size:11px;font-weight:600}.sharing-access-item span{display:block;font-size:9px;color:var(--muted);margin-top:6px;line-height:1.8}.signature-config-card{max-width:800px}.signature-config-card>.row h2{margin-bottom:7px}.signature-config-card>.row p{font-size:11px;line-height:1.8}.safeid-config-status{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px 15px;border:1px solid var(--line);border-radius:10px;padding:17px;margin-bottom:22px;font-size:11px}.safeid-config-status>span{color:var(--muted);font-size:10px;line-height:1.8}.safeid-config-status>strong{font-weight:550;overflow-wrap:anywhere;line-height:1.8}.signature-config-card #signature-config-form .field label{line-height:1.8}.hero-actions .btn[data-action=share-patient-notes]{color:var(--teal)}
@media(max-width:720px){.shared-offer-item{padding:16px 18px;align-items:flex-start;flex-wrap:wrap}.shared-offer-item>.btn{margin-left:auto;font-size:10px}.sharing-access-item strong{font-size:10px}.signature-config-card>.row{align-items:flex-start;flex-wrap:wrap}.signature-config-card>.row .badge{font-size:9px}.safeid-config-status{grid-template-columns:80px minmax(0,1fr);padding:14px;font-size:10px;gap:10px}.safeid-config-status>span{font-size:9px}.signature-config-card .notice{font-size:10px}.hero-actions .btn[data-action=share-patient-notes]{width:100%;justify-content:center}.signature-config-card #signature-config-form>.row{gap:13px}.signature-config-card #signature-config-form>.row .btn{font-size:10px}}
.history-below .history-text{font-size:14px;line-height:1.8}.history-author strong{font-size:13px}
@media(max-width:720px){.history-below .history-text{font-size:14px;line-height:1.8}.history-author strong{font-size:12px}}
/* Current practice location is a small, persistent header control. */
.workspace-location{display:flex;align-items:center;gap:8px;background:transparent;color:#7b8ba2;padding:8px 9px 8px 0;text-align:left;font-size:11px;line-height:1.7;max-width:270px;min-width:125px;border-radius:7px;flex-shrink:0}.workspace-location:hover{color:var(--teal);background:var(--teal-soft);padding-left:9px}.workspace-location>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.workspace-location>.icon{width:15px;height:15px;flex-shrink:0}.workspace-location>.icon:last-child{width:12px;height:12px}.location-list{display:grid;gap:11px}.location-card{display:flex;align-items:stretch;gap:11px;border:1px solid var(--line);border-radius:11px;padding:14px;background:var(--surface)}.location-card.active{border-color:#9fc7c8;background:#f5fafa}.location-select{display:flex;gap:12px;align-items:flex-start;background:transparent;color:var(--ink);padding:0;flex:1;min-width:0;text-align:left}.location-select>span:last-child{flex:1;min-width:0}.location-select strong{display:block;font-size:12px;line-height:1.75;font-weight:600;overflow-wrap:anywhere}.location-select small{display:block;font-size:10px;line-height:1.8;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere;margin-top:4px}.location-radio{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #cfd9e3;border-radius:50%;flex-shrink:0;margin-top:2px;color:var(--teal);background:var(--surface)}.location-radio .icon{width:13px;height:13px;stroke-width:2}.location-card.active .location-radio{border-color:#6ea6aa;background:var(--teal-soft)}.location-current{display:inline-block;font-size:9px;color:var(--teal);font-weight:600;margin-top:8px}.location-card-actions{display:flex;gap:3px;align-items:flex-start;flex-shrink:0}.location-card-actions .icon-btn{width:29px;height:29px}.location-card-actions .icon{width:15px;height:15px}.location-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:23px;border-top:1px solid var(--line);padding-top:21px;margin-top:23px}.location-modal-footer>.tiny{font-size:10px;max-width:310px;line-height:1.9}.location-modal-footer .btn{font-size:11px}.location-empty{display:flex;align-items:center;flex-direction:column;text-align:center;padding:27px 20px 23px;gap:12px}.location-empty>.icon{width:32px;height:32px;color:#8fa9b6;stroke-width:1.2}.location-empty h3{font-size:14px;margin-top:7px}.location-empty p{font-size:11px;color:var(--muted);line-height:1.9;max-width:340px}.location-form-footer{gap:8px}.location-form-footer .btn{font-size:11px}:root[data-theme=dark] .location-card.active{background:var(--teal-soft)}
@media(max-width:1100px){.workspace-location{max-width:215px;font-size:10px;min-width:110px}}
@media(max-width:720px){.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:98px;height:auto;gap:6px 11px;padding-top:7px;padding-bottom:10px}.workspace-location{grid-column:1/-1;max-width:100%;width:fit-content;font-size:10px;min-height:24px;padding:3px 7px 3px 0;gap:6px;min-width:0}.workspace-location:hover{padding-left:7px}.workspace-location>.icon{width:13px;height:13px}.workspace-location>.icon:last-child{width:10px;height:10px}.topbar .top-search{min-width:0;width:100%}.topbar .top-actions{justify-self:end}.location-card{padding:13px;gap:6px}.location-select{gap:10px}.location-select strong{font-size:11px}.location-select small{font-size:10px;line-height:1.9}.location-card-actions{flex-direction:column;gap:4px}.location-card-actions .icon-btn{width:26px;height:26px}.location-radio{width:18px;height:18px}.location-modal-footer{align-items:stretch;flex-direction:column;gap:14px;padding-top:18px;margin-top:20px}.location-modal-footer>.tiny{max-width:none;font-size:9px}.location-modal-footer .btn{width:100%;font-size:11px}.location-form-footer{flex-wrap:wrap}.location-form-footer .btn:first-child{flex:1 0 100%;order:3}.location-form-footer .btn{font-size:10px}.location-empty{padding:23px 13px 18px}.location-empty h3{font-size:13px}.location-empty p{font-size:10px}.location-current{font-size:8px}}
/* A note has one clinical specialty; encounter timing belongs to the server. */
.registration-main-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px;min-height:20px}.registration-main-header>label:first-child{margin:0}.registration-primary{display:flex;align-items:center;gap:5px;font-size:9px;color:#8997aa;cursor:pointer;font-weight:400;margin:0;white-space:nowrap}.registration-primary input[type=radio]{width:12px;height:12px;accent-color:var(--teal);margin:0;flex-shrink:0}.registration-primary:has(input:checked){color:var(--teal);font-weight:600}.note-context-fields{display:grid;grid-template-columns:145px minmax(0,1fr);gap:16px;margin-bottom:21px;align-items:start}.note-context-fields>div{min-width:0}.note-context-fields label{font-size:10px;line-height:1.8}.note-context-fields select{font-size:11px;padding:9px 10px;min-height:40px;min-width:0}.note-specialty-field{min-width:0}.encounter-patient-bar{display:flex;align-items:center;gap:15px;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:17px 20px;margin:0 0 23px}.encounter-patient-bar.running{border-color:#a9cccb;background:#f3faf8}.encounter-symbol{width:38px;height:38px;border-radius:11px;background:var(--bg);color:#91a1b7;display:flex;align-items:center;justify-content:center;flex-shrink:0}.encounter-patient-bar.running .encounter-symbol{background:var(--teal-soft);color:var(--teal)}.encounter-symbol>.icon{width:19px;height:19px}.encounter-description{flex:1;min-width:0}.encounter-description strong{font-size:12px;display:block;font-weight:600;line-height:1.8}.encounter-description>span{font-size:10px;display:block;color:var(--muted);margin-top:3px;line-height:1.8}.encounter-timer{font-variant-numeric:tabular-nums;letter-spacing:.7px;font-size:21px;font-weight:550;color:#7f91a9;white-space:nowrap;min-width:61px;text-align:right;line-height:1.6}.running .encounter-timer{color:var(--teal)}.encounter-patient-bar .btn{font-size:10px;min-height:37px;padding:8px 13px}.encounter-patient-bar .btn .icon{width:15px;height:15px}.encounter-finish{color:#5e7885;background:white;border-color:#d6e5e5}.encounter-finish>.icon{width:12px!important;height:12px!important;fill:currentColor;stroke-width:1}.encounter-global{display:flex;align-items:center;gap:13px;padding:12px 38px;background:#edf6f4;border-bottom:1px solid #d5e9e6;color:var(--teal)}.encounter-global>div{display:flex;align-items:center;gap:13px;flex:1;min-width:0;line-height:1.8}.encounter-global strong{font-size:10px;font-weight:650;white-space:nowrap}.encounter-global>div>span{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.encounter-global .encounter-timer{font-size:17px;color:var(--teal);min-width:55px;margin:0 10px}.encounter-global .btn{font-size:10px;min-height:31px;padding:6px 10px;background:var(--surface);border-color:#cee1df;color:var(--teal)}.encounter-global .btn .icon{width:13px;height:13px}.encounter-live-dot{width:7px;height:7px;border-radius:50%;background:#5da4a1;box-shadow:0 0 0 4px #5da4a111;flex-shrink:0}.status-select.in_progress{background:var(--teal-soft);color:var(--teal);cursor:default;opacity:1}:root[data-theme=dark] .encounter-patient-bar.running,:root[data-theme=dark] .encounter-global{background:#1b383f;border-color:#375e66}:root[data-theme=dark] .encounter-finish{background:var(--surface);color:#a9c5cc;border-color:#375e66}
@media(max-width:1200px){.note-context-fields{grid-template-columns:125px minmax(0,1fr);gap:12px}.encounter-patient-bar{gap:12px;padding:16px}.encounter-timer{font-size:19px}.encounter-description strong{font-size:11px}.encounter-patient-bar .btn{font-size:9px;padding:8px 11px}.encounter-global{padding-left:26px;padding-right:26px}}
@media(max-width:900px){.encounter-global>div{flex-direction:column;align-items:flex-start;gap:0}.encounter-global strong{font-size:9px}.encounter-global>div>span{font-size:10px;max-width:100%}.encounter-description strong{font-size:12px}.encounter-patient-bar .btn{font-size:10px}.note-context-fields{grid-template-columns:145px minmax(0,1fr)}}
@media(max-width:720px){.registration-main-header{gap:8px;align-items:flex-start;min-height:18px}.registration-primary{font-size:8px;gap:4px;line-height:1.7}.registration-primary input[type=radio]{width:12px;height:12px;margin-top:1px}.registration-main-header>label:first-child{font-size:10px;line-height:1.7}.note-context-fields{grid-template-columns:minmax(0,1fr);gap:13px;margin-bottom:19px}.note-context-fields select{font-size:16px;padding:10px 11px;min-height:44px}.note-context-fields label{font-size:10px;margin-bottom:6px}.encounter-patient-bar{padding:15px;gap:11px;flex-wrap:wrap;margin-bottom:20px;border-radius:11px}.encounter-symbol{width:32px;height:32px;border-radius:9px}.encounter-symbol>.icon{width:16px;height:16px}.encounter-description{min-width:150px}.encounter-description strong{font-size:11px}.encounter-description>span{font-size:9px}.encounter-patient-bar .encounter-timer{margin-left:auto;font-size:20px}.encounter-patient-bar .btn{flex:1 0 100%;width:100%;min-height:37px;font-size:10px}.encounter-patient-bar>.badge{font-size:9px;margin-left:auto}.encounter-global{padding:11px 18px;gap:9px;flex-wrap:wrap}.encounter-global>div{flex:1;min-width:155px}.encounter-global strong{font-size:9px}.encounter-global>div>span{font-size:10px}.encounter-global .encounter-timer{font-size:16px;margin:0 0 0 auto;min-width:53px}.encounter-global .btn{margin-left:auto;min-height:28px;font-size:9px;padding:5px 9px}.encounter-live-dot{width:6px;height:6px}.encounter-global .btn>.icon{width:12px;height:12px}}
@media(max-width:390px){.encounter-global{padding-left:14px;padding-right:14px}.encounter-patient-bar{padding:13px;gap:9px}.encounter-description{min-width:125px}.encounter-patient-bar .encounter-timer{font-size:18px}}
/* Each document type keeps its own full, immutable timeline below the editor. */
.document-history-below{margin-top:27px}.document-history-entry{padding:23px;border-bottom:1px solid var(--line)}.document-history-entry:last-child{border-bottom:0}.document-history-entry>.history-note-heading{flex-wrap:wrap;gap:10px}.document-history-entry>.history-note-heading>.history-author{min-width:170px}.document-history-entry>.history-note-heading>.badge{font-size:9px;white-space:normal;line-height:1.6}.document-history-entry>h3{font-size:13px;font-weight:600;margin:20px 0 13px;color:var(--ink);line-height:1.8;overflow-wrap:anywhere}.document-history-text{font-size:14px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;color:#64758e}.document-indication{padding:15px 17px;border-radius:9px;background:var(--bg);margin-top:18px}.document-indication>strong{font-size:10px;font-weight:600;line-height:1.8;color:#8998ab}.document-indication>p{font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px;color:#6c7e95}.document-history-actions{margin-top:19px;display:flex;align-items:center;gap:15px;flex-wrap:wrap}.document-history-actions .btn{font-size:10px;min-height:35px}.document-history-actions>.tiny{font-size:9px;line-height:1.8;flex:1;min-width:170px}.document-link-notice{font-size:10px;color:#9b8b67;padding:14px 23px;background:#fbf8f0;line-height:1.9;border-bottom:1px solid var(--line)}.document-sharing-note{font-size:9px;line-height:1.9;margin-top:8px}.typed-document-history .panel-heading h2{font-size:14px}.typed-document-history .panel-heading p{font-size:10px}:root[data-theme=dark] .document-history-text,:root[data-theme=dark] .document-indication>p{color:#b2bfd1}:root[data-theme=dark] .document-link-notice{background:#403827;color:#c5b48a}
@media(max-width:720px){.document-history-below{margin-top:22px}.document-history-entry{padding:20px 17px}.document-history-entry>.history-note-heading>.history-author{min-width:140px}.document-history-entry>.history-note-heading>.badge{font-size:8px}.document-history-entry>h3{font-size:12px;margin:17px 0 12px}.document-history-text{font-size:14px;line-height:1.8}.document-indication{padding:13px 14px}.document-indication>p{font-size:13px;line-height:1.85}.document-history-actions{gap:11px}.document-history-actions .btn{font-size:10px;min-height:35px}.document-history-actions>.tiny{flex:1 0 100%;font-size:9px}.document-link-notice{padding:13px 17px;font-size:9px}.typed-document-history .panel-heading h2{font-size:13px}.typed-document-history .panel-heading p{font-size:9px}}
/* Plain-text rich runs: only bold, italic and underline are persisted. */
.rich-editor-shell{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);margin-bottom:25px}.rich-editor-shell:focus-within{border-color:#83b1b5;box-shadow:0 0 0 3px #176b7510}.rich-toolbar{display:flex;align-items:center;gap:5px;padding:8px 10px;border-bottom:1px solid var(--line);background:#f8fafc}.rich-format-button{width:31px;height:29px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:transparent;color:#7b8aa2;font-family:Georgia,serif;font-size:15px;border:1px solid transparent}.rich-format-button:hover{background:var(--surface);border-color:var(--line);color:var(--ink)}.rich-format-button.active{background:var(--teal-soft);color:var(--teal);border-color:#b8d5d5}.rich-toolbar>span{font-size:9px;color:#a1acba;margin-left:9px}.rich-document-editor{padding:16px 17px;min-height:230px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;line-height:1.95;font-size:13px;color:var(--ink);outline:none;cursor:text}.rich-document-editor:empty:before{content:attr(data-placeholder);color:#a2acbb;pointer-events:none;white-space:pre-wrap}.rich-document-editor strong{font-weight:700}.rich-document-editor em{font-style:italic}.rich-document-editor u{text-decoration:underline;text-underline-offset:2px}.paper .rich-editor-shell{margin-top:2px;margin-bottom:25px}.modal .rich-editor-shell{margin-bottom:0}.modal .rich-document-editor{min-height:235px}.document-history-text strong{font-weight:700}.document-history-text em{font-style:italic}.document-history-text u{text-decoration:underline;text-underline-offset:2px}:root[data-theme=dark] .rich-toolbar{background:#1b293c}
@media(max-width:720px){.rich-toolbar{gap:6px;padding:8px 9px}.rich-format-button{width:33px;height:31px;font-size:16px}.rich-toolbar>span{font-size:8px;margin-left:6px}.rich-document-editor{font-size:16px;line-height:1.85;padding:14px;min-height:230px}.modal .rich-document-editor{font-size:16px;min-height:220px}.paper .rich-editor-shell{margin-bottom:22px}}

/* Soft elevation keeps the sticky navigation distinct while scrolling. */
.global-header{box-shadow:0 4px 16px rgba(9,33,74,.065)}
.topbar{box-shadow:0 5px 16px rgba(9,33,74,.045)}
:root[data-theme=dark] .global-header,:root[data-theme=dark] .topbar{box-shadow:0 5px 18px rgba(0,0,0,.2)}
/* Keep narrow forms comfortable and reveal the horizontal navigation affordance. */
@media(max-width:860px){.global-nav{scrollbar-width:thin;scrollbar-color:#b5c6cd transparent}.global-nav::-webkit-scrollbar{display:block;height:3px}.global-nav::-webkit-scrollbar-thumb{background:#b5c6cd;border-radius:3px}}
@media(max-width:390px){.modal .form-grid{grid-template-columns:minmax(0,1fr)}.modal .form-grid>.field{grid-column:1/-1}.modal input,.modal select,.modal textarea{min-width:0}}
@media(max-width:860px) and (max-height:500px) and (orientation:landscape){.global-header{position:relative}.topbar{position:relative;top:auto}.modal-backdrop{padding:8px}.modal{max-height:calc(100dvh - 16px)}}

/* Structured prescriptions keep the official data in a compact, familiar editor. */
.prescription-kind{display:block;flex:1 1 250px;max-width:410px;min-width:0;font-size:10px;font-weight:500;margin:0;line-height:1.8;color:var(--muted)}
.prescription-kind select{display:block;margin-top:5px;padding:9px 11px;min-height:40px;font-size:11px;font-weight:550;color:var(--ink);width:100%}
.sncr-notice{font-size:11px;line-height:1.8}
.sncr-notice>div{min-width:0;width:100%}.sncr-notice strong{font-size:11px;font-weight:650}.sncr-notice p{margin-top:5px;line-height:1.8}.sncr-notice .btn{font-size:10px}
.sncr-paper{min-height:0}.sncr-paper>h2{font-size:16px;line-height:1.55;letter-spacing:-.2px;margin-bottom:20px}.sncr-paper>.paper-patient{margin-bottom:24px;padding-bottom:18px}.sncr-paper>.paper-patient p{margin-top:5px;color:var(--muted)}
.sncr-paper>.form-grid{margin-bottom:24px}.sncr-paper label{font-size:11px;line-height:1.7;font-weight:550}.sncr-paper input,.sncr-paper select{font-size:12px;line-height:1.7;min-height:42px}.sncr-paper textarea{min-height:125px;font-size:13px;line-height:1.85;background:var(--surface)}
.sncr-field-hint{font-size:9px;line-height:1.8;margin-top:7px;font-weight:400}
.sncr-medications{display:grid;gap:17px;margin:22px 0 18px}.sncr-medication{border:1px solid var(--line);border-radius:11px;padding:19px 18px;background:var(--surface);min-width:0}.sncr-medication>.row{margin-bottom:17px;gap:10px}.sncr-medication h3{font-size:12px;font-weight:600;line-height:1.8}.sncr-medication .btn{font-size:10px;min-height:30px;padding:5px 8px;color:var(--muted)}.sncr-medication .btn:hover{color:var(--danger);background:var(--danger-soft)}
.sncr-history-number{font-size:10px;color:var(--muted);margin:-7px 0 15px;line-height:1.8;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#sncr-config-form .notice{font-size:11px;line-height:1.8}#sncr-template-form .document-history-text{padding:14px 16px;background:var(--bg);border:1px solid var(--line);border-radius:9px;font-size:12px;max-height:40dvh;overflow:auto}
:root[data-theme=dark] .sncr-paper textarea{background:var(--surface)}
@media(max-width:1100px){.prescription-kind{max-width:100%;flex-basis:100%}.sncr-paper{padding:25px}.sncr-medication{padding:17px}}
@media(max-width:720px){.prescription-kind{font-size:10px;width:100%;flex-basis:100%;max-width:none}.prescription-kind select{font-size:16px;min-height:44px;padding:10px 9px}.sncr-notice{font-size:10px;padding:13px 14px}.sncr-notice strong{font-size:10px}.sncr-notice .row{gap:8px}.sncr-notice .btn{min-height:37px;font-size:10px}.sncr-paper{padding:21px 17px}.sncr-paper>h2{font-size:14px;margin-bottom:17px}.sncr-paper>.paper-patient{margin-bottom:21px;padding-bottom:15px}.sncr-paper input,.sncr-paper select,.sncr-paper textarea{font-size:16px}.sncr-paper .form-grid{grid-template-columns:minmax(0,1fr);gap:14px}.sncr-paper .form-grid>.field{grid-column:1/-1}.sncr-paper label{font-size:10px}.sncr-paper textarea{min-height:130px;line-height:1.75}.sncr-medications{gap:14px;margin-top:19px}.sncr-medication{padding:15px 12px;border-radius:9px}.sncr-medication h3{font-size:11px}.sncr-medication>.row{margin-bottom:15px}.sncr-medication .btn{min-height:35px;font-size:10px}.sncr-paper>[data-action=add-medication]{width:100%;min-height:40px}.sncr-field-hint{font-size:9px;line-height:1.8}.sncr-history-number{font-size:9px}#sncr-template-form .document-history-text{font-size:12px;padding:12px}}

/* A prescription is edited directly on its paper, with quieter fields until focus. */
.document-brand-button{position:relative;display:block;max-width:190px;width:155px;padding:0;background:transparent;text-align:left;border-radius:6px}.document-brand-button .brand{width:100%;height:62px;display:flex;align-items:center}.document-brand-button .brand img{max-height:62px;width:100%;object-fit:contain;object-position:left center}.document-brand-edit{position:absolute;right:-10px;bottom:0;width:22px;height:22px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--muted);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s}.document-brand-edit>.icon{width:12px;height:12px}.document-brand-button:hover .document-brand-edit,.document-brand-button:focus-visible .document-brand-edit{opacity:1}.rx-paper{position:relative;box-shadow:0 5px 24px #0d284a06}.rx-document-title{text-align:center;font-size:15px!important;font-weight:600!important;letter-spacing:.3px!important;margin:6px 0 28px!important}.rx-patient{margin-bottom:24px!important}.rx-patient>span{display:block;font-size:9px;color:var(--muted);letter-spacing:.5px;margin-bottom:6px}.rx-patient>strong{display:block;font-size:13px;font-weight:600;line-height:1.7}.rx-patient>p{font-size:10px;line-height:1.8;margin-top:6px!important}.sncr-notice{margin-bottom:19px}.sncr-notice .btn{margin-top:10px}.rx-medication{padding:18px 0 21px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.rx-medication>.row{margin-bottom:9px!important}.rx-medication h3{font-size:12px;font-weight:600;color:var(--muted)}.rx-medication-fields{gap:14px 18px}.rx-medication-fields label,.rx-identification label{font-size:9px!important;color:var(--muted);font-weight:450!important;margin-bottom:3px}.rx-medication-fields input,.rx-medication-fields textarea,.rx-identification input{border:1px solid transparent;border-bottom-color:#e6ebef;border-radius:4px;padding:8px 3px;background:transparent!important;box-shadow:none!important;line-height:1.8}.rx-medication-fields input:hover,.rx-medication-fields textarea:hover,.rx-identification input:hover{background:#f8fafb!important}.rx-medication-fields input:focus,.rx-medication-fields textarea:focus,.rx-identification input:focus{border:1px solid #a4c7cb!important;background:var(--surface)!important;box-shadow:0 0 0 3px #176b7508!important;padding-left:9px}.rx-medication-fields [data-med-field=name]{font-size:14px;font-weight:550}.rx-medication-fields textarea{min-height:95px!important;margin:0!important}.sncr-medications{margin-top:21px}.rx-add-medication{font-size:10px!important;border-color:transparent!important;color:var(--teal)!important;padding-left:0!important}.rx-paper-footer{margin-top:65px;padding-top:22px;border-top:1px solid var(--line);text-align:center}.rx-paper-footer p{margin:10px 0 7px;font-size:9px;line-height:1.8;white-space:pre-line;color:var(--muted)}.rx-paper-footer>span{font-size:8px;color:#a1aab7}.rx-sex{max-width:230px;margin-bottom:10px}.rx-sex label{font-size:9px}.rx-sex select{padding:8px;font-size:11px}.rx-official-heading{display:flex;gap:20px;align-items:center;justify-content:space-between;border:1px solid #333;padding:17px;margin-bottom:25px}.rx-official-heading h2{font-size:14px!important;font-family:Arial,sans-serif;font-weight:700;letter-spacing:0!important;line-height:1.5}.rx-official-heading>span{font-size:9px;line-height:1.8;max-width:105px}.rx-controlled{color:#111;background:white}.rx-controlled .rx-patient,.rx-controlled .rx-identification{border:1px solid #333;padding:15px}.rx-controlled .rx-identification{margin-bottom:20px}.rx-controlled .rx-patient{border-bottom:1px solid #333!important}.rx-controlled .rx-medication{border:1px solid #333;padding:15px}.rx-controlled .rx-paper-footer{color:#111}.rx-controlled label,.rx-controlled .rx-patient>span,.rx-controlled .rx-patient>p{color:#555}.rx-controlled input,.rx-controlled textarea{color:#111}.rx-controlled .rx-paper-footer p{color:#555}
/* Suggestions are opt-in examples; choosing one field never replaces another. */
.med-autocomplete{position:relative}.med-suggestions{position:absolute;top:100%;left:0;right:0;z-index:30;border:1px solid #dbe4e9;border-radius:10px;background:var(--surface);box-shadow:0 12px 30px #163b5420;max-height:315px;overflow:auto;padding:5px;margin-top:4px}.med-suggestions[hidden]{display:none}.medication-option{display:block;width:100%;padding:11px 10px;text-align:left;background:transparent;color:var(--ink);border-radius:7px;border-bottom:1px solid var(--line);font-size:10px;line-height:1.8}.medication-option:last-child{border-bottom:0}.medication-option:hover,.medication-option[aria-selected=true]{background:var(--teal-soft)}.medication-option-heading{display:flex;gap:8px;align-items:flex-start;justify-content:space-between}.medication-option strong{font-size:11px;font-weight:600;overflow-wrap:anywhere}.medication-option .badge{font-size:8px;flex-shrink:0}.medication-option>span:not(.medication-option-heading){display:block;color:var(--muted);margin-top:3px}.medication-option .medication-dose{font-size:11px;color:var(--ink)!important;white-space:pre-wrap}.medication-option>small{display:block;font-size:8px;color:var(--teal);margin-top:6px}.medication-choice-actions{padding:12px 13px;border-radius:8px;margin-top:15px;background:var(--teal-soft);display:flex;gap:9px;flex-wrap:wrap;align-items:center}.medication-choice-actions[hidden]{display:none}.medication-choice-actions p{font-size:10px;line-height:1.8;flex:1 0 100%;color:var(--teal)}.medication-choice-actions>.tiny{font-size:9px;line-height:1.8}.medication-choice-actions .btn{font-size:10px;color:var(--teal);background:var(--surface);border-color:transparent}.medication-composer{border:1px solid var(--line);border-radius:9px;background:var(--surface);margin-bottom:18px;overflow:visible}.medication-composer summary{display:flex;align-items:center;gap:7px;cursor:pointer;padding:12px 13px;color:var(--teal);font-size:11px;font-weight:550;list-style:none}.medication-composer summary::-webkit-details-marker{display:none}.medication-composer summary>.icon{width:14px;height:14px}.medication-composer summary>span{font-size:9px;font-weight:400;color:var(--muted);margin-left:auto}.medication-composer-body{padding:4px 15px 16px}.medication-composer-body>.row{margin-top:18px}.medication-composer-body .tiny{font-size:9px;line-height:1.8;max-width:280px}.medication-composer .rx-medication-fields input,.medication-composer .rx-medication-fields textarea{font-size:12px;font-weight:400}.medication-composer .rx-medication-fields textarea{min-height:90px}.practice-logo-preview{height:150px;display:flex;align-items:center;justify-content:center;padding:23px;border:1px solid var(--line);border-radius:10px;margin-bottom:20px;background:repeating-conic-gradient(#f5f6f7 0 25%,white 0 50%) 50% / 15px 15px}.practice-logo-preview img{max-height:100%;max-width:100%;object-fit:contain}.practice-logo-preview+.field .tiny{font-size:10px;line-height:1.8;margin-top:9px}
:root[data-theme=dark] .rx-medication-fields input:hover,:root[data-theme=dark] .rx-medication-fields textarea:hover,:root[data-theme=dark] .rx-identification input:hover{background:#203044!important}:root[data-theme=dark] .rx-controlled{--ink:#111;--muted:#555;--surface:white;--line:#ddd;--teal:#176b75;--teal-soft:#eaf3f1}:root[data-theme=dark] .document-brand-button .brand img{filter:none}:root[data-theme=dark] .med-suggestions{border-color:var(--line)}
@media(max-width:1100px){.medication-composer summary{flex-wrap:wrap}.medication-composer summary>span{margin-left:21px}}
@media(max-width:720px){.document-brand-button{width:140px;max-width:155px}.document-brand-button .brand{height:53px}.document-brand-button .brand img{max-height:53px}.document-brand-edit{opacity:1;width:20px;height:20px;right:-7px}.rx-document-title{font-size:13px!important;margin-bottom:22px!important}.rx-patient>strong{font-size:12px}.rx-patient>p{font-size:10px}.rx-medication-fields{gap:12px}.rx-medication-fields input,.rx-medication-fields textarea,.rx-identification input{font-size:16px!important;min-height:43px}.rx-medication-fields label,.rx-identification label{font-size:9px!important}.rx-medication-fields [data-med-field=name]{font-weight:500}.rx-medication{padding:15px 0 18px}.rx-medication-fields textarea{min-height:115px!important}.rx-paper-footer{margin-top:45px}.rx-paper-footer p{font-size:9px}.rx-official-heading{padding:13px;gap:12px}.rx-official-heading h2{font-size:11px!important}.rx-official-heading>span{font-size:8px;max-width:85px}.rx-controlled .rx-medication{padding:12px}.rx-sex select{font-size:16px}.rx-sex{max-width:100%}.med-suggestions{max-height:270px;left:-2px;right:-2px}.medication-option{padding:12px 10px}.medication-option strong{font-size:11px}.medication-option .medication-dose{font-size:11px}.medication-option>small{font-size:9px}.medication-choice-actions{padding:12px}.medication-choice-actions .btn{width:100%;min-height:37px;font-size:10px}.medication-composer summary{font-size:10px;padding:11px}.medication-composer summary>span{font-size:8px}.medication-composer-body{padding:0 12px 14px}.medication-composer-body .form-grid{grid-template-columns:minmax(0,1fr)}.medication-composer-body .field{grid-column:1/-1}.medication-composer-body>.row .btn{width:100%;min-height:40px}.medication-composer .rx-medication-fields input,.medication-composer .rx-medication-fields textarea{font-size:16px}.practice-logo-preview{height:130px;padding:20px}.global-brand .brand{height:55px}.global-brand .brand img{max-height:55px}}

.medication-field-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;margin-bottom:4px}.medication-field-heading>label{margin:0!important}.medication-search-modes{display:inline-flex;gap:2px;padding:3px;border-radius:7px;background:var(--bg);max-width:100%;border:1px solid var(--line)}.medication-search-modes button{padding:4px 7px;border-radius:5px;background:transparent;color:var(--muted);font-size:8px;line-height:1.6;min-height:25px;white-space:nowrap}.medication-search-modes button[aria-pressed=true]{background:var(--surface);color:var(--teal);box-shadow:0 1px 4px #173c4d12;font-weight:600}.medication-search-modes button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}.medication-option-ingredient{color:var(--ink)!important;font-size:10px;font-weight:450;overflow-wrap:anywhere}.medication-option-presentation{font-size:9px;line-height:1.8;overflow-wrap:anywhere;white-space:normal}.medication-option-heading strong{min-width:0}.medication-search-message{padding:12px;color:var(--muted);font-size:10px;line-height:1.8}.medication-choice-actions p{overflow-wrap:anywhere}.medication-choice-actions p>a{display:inline-flex;gap:5px;align-items:center;color:var(--teal);font-weight:550;margin-top:6px}.medication-choice-actions p>a>.icon{width:11px;height:11px}.medication-active-label{font-weight:500}.medication-option .badge{max-width:110px;white-space:normal;text-align:center;line-height:1.7}.med-suggestions{max-height:365px;overscroll-behavior:contain}
@media(max-width:720px){.medication-field-heading{align-items:flex-start;gap:7px}.medication-search-modes{margin-left:auto;flex-shrink:0;padding:3px}.medication-search-modes button{font-size:9px;min-height:33px;padding:5px 8px}.medication-option-heading{gap:7px}.medication-option strong{font-size:12px}.medication-option-ingredient{font-size:11px}.medication-option-presentation{font-size:10px}.medication-option .badge{max-width:92px;font-size:8px}.med-suggestions{max-height:min(365px,50vh)}.medication-search-message{font-size:11px}.medication-choice-actions p{font-size:11px}}

/* Private budget acceptance and consultation payment follow-up. */
.billing-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--line);margin-bottom:20px;padding-bottom:10px}
.billing-tabs button{padding:10px 14px;border-radius:8px;background:transparent;color:var(--muted);font-size:12px;font-weight:500}
.billing-tabs button.active{background:var(--teal-soft);color:var(--teal)}
.billing-tabs button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.billing-panel{max-width:900px}.billing-panel .panel-heading{align-items:flex-start}.billing-panel .panel-heading p{line-height:1.7;margin-top:5px}
.billing-loading{padding:40px 24px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:12px}
.billing-counts{display:flex;gap:18px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:14px 24px;color:var(--muted);font-size:11px}
.billing-list{padding:0 24px}.billing-card{padding:23px 0;border-bottom:1px solid var(--line)}.billing-card:last-child{border-bottom:0}
.billing-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.billing-card-heading>div{min-width:0}.billing-card-heading h3{font-size:13px;font-weight:600;line-height:1.75;overflow-wrap:anywhere}.billing-card-heading .badge{white-space:nowrap;flex-shrink:0}
.billing-item-date{font-size:10px;color:var(--muted);margin-bottom:6px}.billing-item-meta{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;font-size:11px;color:var(--muted);line-height:1.8;margin-top:12px}
.billing-acceptance{display:inline-flex;align-items:center;gap:5px}.billing-acceptance .icon{width:14px;height:14px}.billing-acceptance.accepted{color:var(--teal)}.billing-acceptance.declined{color:#ad635b}
.billing-card-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}.billing-card-actions .btn{font-size:11px}
.billing-privacy{display:flex;align-items:flex-start;gap:8px;padding:16px 24px;border-top:1px solid var(--line);font-size:10px;line-height:1.8;color:var(--muted)}.billing-privacy .icon{width:14px;height:14px;flex-shrink:0;margin-top:2px}
.billing-fieldset{border:0;padding:0;margin:0;min-width:0}.billing-paid-check{padding:14px 15px;background:var(--teal-soft);border-radius:8px;margin:6px 0 22px;font-size:12px}.billing-fieldset .form-grid{margin-top:0}.billing-fieldset textarea{min-height:78px}
.billing-receipts{border-top:1px solid var(--line);margin-top:4px;padding-top:20px}.billing-receipts h3{font-size:12px;margin-bottom:12px}.billing-receipt-list{display:grid;gap:8px}.billing-receipt{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}.billing-receipt>span{display:flex;align-items:center;gap:10px;min-width:0}.billing-receipt>span>span{min-width:0}.billing-receipt .icon{flex-shrink:0;width:16px;height:16px}.billing-receipt strong{display:block;font-size:11px;font-weight:500;overflow-wrap:anywhere;line-height:1.6}.billing-receipt small{display:block;font-size:9px;color:var(--muted);line-height:1.8;margin-top:3px}.billing-receipt:hover{border-color:var(--teal)}
.billing-upload{margin:18px 0 0}.billing-upload input{font-size:11px;padding:10px;max-width:100%}.billing-upload p,#budget-scope-note{line-height:1.8;margin-top:7px}.billing-upload input::file-selector-button{border:0;border-radius:5px;padding:7px 9px;background:var(--teal-soft);color:var(--teal);margin-right:8px}
@media(max-width:720px){.billing-tabs{gap:4px;margin-bottom:16px}.billing-tabs button{font-size:10px;padding:9px 10px}.billing-list{padding:0 18px}.billing-counts{padding:13px 18px;gap:10px 15px;font-size:10px}.billing-card{padding:19px 0}.billing-card-heading{gap:12px}.billing-card-heading h3{font-size:12px}.billing-card-heading .badge{font-size:9px}.billing-item-meta{font-size:10px;gap:7px 12px}.billing-card-actions{justify-content:stretch}.billing-card-actions .btn{font-size:10px;flex:1;white-space:normal;line-height:1.6}.billing-privacy{padding:15px 18px;font-size:9px}.billing-fieldset .form-grid{grid-template-columns:minmax(0,1fr)}.billing-fieldset .form-grid>.field{grid-column:1/-1}.billing-fieldset input,.billing-fieldset select,.billing-fieldset textarea{font-size:16px}.billing-upload input{font-size:12px}.billing-paid-check{font-size:12px}.billing-receipt strong{font-size:11px}}

.billing-limit-note{padding:13px 24px;color:var(--muted);font-size:10px;line-height:1.8;background:var(--teal-soft)}

/* Choose a prescribing route once; direct NAVIA alternatives remain secondary. */
.prescription-route-picker{margin-bottom:22px}.prescription-route-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:12px}.prescription-route-heading h2{font-size:15px;font-weight:600}.prescription-route-heading p{font-size:11px;color:var(--muted)}.prescription-route-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.prescription-route-option{display:flex;text-decoration:none;flex-direction:column;text-align:left;min-width:0;padding:15px 14px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:10px;gap:9px}.prescription-route-option:hover{border-color:#8cb3ba}.prescription-route-option.selected{border-color:var(--teal);background:var(--teal-soft);box-shadow:0 0 0 1px var(--teal)}.prescription-route-option:focus-visible{outline:2px solid var(--teal);outline-offset:3px}.prescription-route-title{display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.5}.prescription-route-title .icon{width:16px;height:16px;flex-shrink:0;color:var(--teal)}.prescription-route-title strong{font-weight:600}.prescription-route-description{font-size:10px;line-height:1.6;color:var(--muted)}.prescription-route-destination{font-size:9px;font-weight:600;color:var(--teal);margin-top:auto}.prescription-editor-label{font-size:13px;font-weight:600;color:var(--ink)}
.prescription-alternative{border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:20px}.prescription-alternative>summary{display:flex;align-items:center;gap:11px;padding:17px 19px;cursor:pointer;list-style:none;color:var(--muted);font-size:12px}.prescription-alternative>summary::-webkit-details-marker{display:none}.prescription-alternative>summary>span{flex:1;min-width:0}.prescription-alternative>summary small{display:block;font-size:10px;font-weight:400;margin-top:5px;line-height:1.7}.prescription-alternative>summary>.icon{width:16px;height:16px;flex-shrink:0}.prescription-alternative[open]>summary{border-bottom:1px solid var(--line);color:var(--ink)}.prescription-alternative[open]>summary>.icon:last-child{transform:rotate(180deg)}.prescription-alternative-body{padding:21px}.prescription-alternative .doc-layout{grid-template-columns:minmax(0,1fr)}.prescription-alternative .template-sidebar{display:none}.prescription-paper-note{font-size:11px;line-height:1.8;color:var(--muted)}.prescription-paper-note{margin-bottom:17px}
@media(max-width:1100px){.prescription-route-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.prescription-route-heading{display:block}.prescription-route-heading h2{font-size:14px}.prescription-route-heading p{margin-top:6px;font-size:10px}.prescription-route-options{gap:9px}.prescription-route-option{padding:13px 11px;gap:8px}.prescription-route-title{font-size:11px;gap:6px}.prescription-route-title .icon{width:14px;height:14px}.prescription-route-description{font-size:9px}.prescription-route-destination{font-size:9px}.prescription-alternative>summary{padding:15px 14px;font-size:11px}.prescription-alternative>summary small{font-size:9px}.prescription-alternative-body{padding:15px}}

/* Direct CFM portal access; no background connection or automatic PDF return. */
.prescription-portal{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:20px;padding:22px 24px;margin-bottom:20px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.prescription-portal h3{font-size:15px;margin-bottom:8px}.prescription-portal p{font-size:12px;color:var(--muted);line-height:1.8}.prescription-portal-attachment{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-basis:100%;padding-top:14px;border-top:1px solid var(--line);font-size:10px;line-height:1.8;color:var(--muted)}.prescription-portal-attachment .btn{flex-shrink:0}.prescription-alternative-type{max-width:400px;margin-bottom:18px}
@media(max-width:720px){.prescription-portal{padding:18px;gap:16px}.prescription-portal p{font-size:11px}.prescription-portal-attachment{align-items:flex-start;flex-direction:column;gap:8px}.prescription-alternative-type{max-width:none}}

/* Readability: a modest type increase without enlarging cards or document pages. */
:root{font-size:16px}
.small{font-size:14px}.tiny{font-size:13px}label{font-size:14px}
.btn{font-size:15px}.btn.sm{font-size:13px}
input,select,textarea{font-size:16px}
.nav-item,.tab,.patient-meta,.modal-head p,.workspace-location,.user-info span{font-size:14px}
.schedule-name,.patient-link strong{font-size:16px}
.schedule-time{font-size:15px}.schedule-time .end,.schedule-info,.patient-link small{font-size:13px}
.status-select{font-size:13px;min-height:34px;max-width:150px}
.schedule-content{min-width:0}.schedule-content>div{min-width:0}.schedule-name{overflow-wrap:anywhere}
.schedule-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}
.start-appointment{color:var(--teal);background:var(--teal-soft);border-color:#d6e8e5;white-space:nowrap;min-height:34px;padding:7px 10px}
.start-appointment .icon{width:14px;height:14px}
.table th,.table td,.tabs .tab,.record-meta,.document-meta{font-size:14px}
.prescription-route-title,.prescription-alternative>summary,.prescription-editor-label{font-size:15px}
.prescription-route-description,.prescription-route-heading p,.prescription-alternative>summary small,.prescription-paper-note,.prescription-portal p{font-size:14px}
.prescription-route-destination,.prescription-portal-attachment{font-size:13px}
.billing-item-meta,.billing-card-actions .btn,.billing-privacy,.billing-limit-note{font-size:13px}
.billing-card-heading h3,.billing-receipt strong{font-size:15px}.billing-card-heading .badge{font-size:12px}
.patient-picker{position:relative;min-width:0}
.patient-picker-hint{font-size:13px;color:var(--muted);line-height:1.5;margin-top:7px}
.patient-suggestions{position:relative;margin-top:6px;border:1px solid #d6e5e7;border-radius:10px;background:var(--surface);box-shadow:0 8px 24px #10244908;max-height:260px;overflow-y:auto}
.patient-suggestions[hidden]{display:none}
.patient-suggestions button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 13px;background:transparent;color:var(--ink);text-align:left;border-bottom:1px solid var(--line)}
.patient-suggestions button:last-child{border-bottom:0}
.patient-suggestions button:hover,.patient-suggestions button[aria-selected=true]{background:var(--teal-soft)}
.patient-suggestions strong{display:block;font-size:15px;font-weight:600;overflow-wrap:anywhere}
.patient-suggestions small{display:block;font-size:13px;color:var(--muted);margin-top:4px}
.patient-picker-use{font-size:13px;color:var(--teal);white-space:nowrap}.patient-picker-use .icon{width:13px;height:13px}
@media(max-width:1100px){.schedule-actions{max-width:205px}.schedule-content{padding-right:10px}}
@media(max-width:720px){
 input,select,textarea{font-size:16px}.status-select{font-size:13px;width:auto;max-width:150px}
 .schedule-actions{flex:1 0 100%;max-width:none;flex-direction:row;align-items:center;justify-content:flex-start;padding:0 14px 12px 55px;gap:8px}
 .schedule-actions .icon-btn{display:inline-flex;margin-left:auto}.schedule-actions .start-appointment{font-size:13px}
 .schedule-name{font-size:15px}.schedule-info{font-size:13px}.schedule-time{font-size:14px}
 .patient-suggestions button{gap:8px;padding:10px}.patient-picker-use{font-size:12px}
}
.patient-nav-item,.patient-nav-toggle,.sidebar .nav-item{font-size:14px}
.patient-nav-label,.nav-label{font-size:12px}
.stat-label,.stat-note,.topbar-section,.note-context-fields label{font-size:13px}
.note-editor textarea{font-size:16px}.note-context-fields select,.note-editor .row select{font-size:15px}
@media(min-width:721px){.topbar .btn.primary{font-size:13px}}
@media(max-width:720px){.note-editor textarea,.note-context-fields select,.note-editor .row select{font-size:16px}}

/* Keep the native status menu accessible while positioning its chevron. */
.schedule-actions .status-select{-webkit-appearance:none;appearance:none;width:114px;padding:6px 30px 6px 10px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%236681a2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:12px 12px}
.schedule-actions .status-select.in_progress{width:150px}
.patient-nav-item[data-tab="notes"] span{white-space:nowrap}

/* The calendar separates today's highlight from booked-day indicators. */
.calendar-title{font-size:14px}.calendar-week{font-size:12px;color:var(--muted)}
.calendar-day{position:relative;display:flex;align-items:center;justify-content:center;height:34px;max-width:32px;padding:0 0 4px;font-size:13px;color:var(--ink);border-radius:8px}
.calendar-day.today{background:var(--teal-soft);color:var(--teal);font-weight:700;box-shadow:inset 0 0 0 1px var(--teal)}
.calendar-day.selected{background:var(--teal);color:#fff;font-weight:650;box-shadow:none}
.calendar-day:hover{background:var(--teal-soft);color:var(--teal)}
.calendar-day.selected:hover{background:var(--teal);color:#fff}
.calendar-appointment-dot{position:absolute;width:5px;height:5px;bottom:3px;left:calc(50% - 2.5px);border-radius:50%;background:var(--teal)}
.calendar-day.selected .calendar-appointment-dot{background:#fff}
.calendar-rule{font-size:12px;line-height:1.6;flex-wrap:wrap;gap:7px;margin-top:15px;padding-top:14px;color:var(--muted)}
.calendar-today-key{width:12px;height:12px;border:1px solid var(--teal);border-radius:4px;background:var(--teal-soft);flex-shrink:0}
.calendar-legend{display:flex;align-items:center;gap:7px;flex-basis:100%;padding-left:3px}
.calendar-legend-dot{width:5px;height:5px;border-radius:50%;background:var(--teal);flex-shrink:0;margin-right:4px}
.history-below .history-text{font-size:15px}
.aside-card h3,.template-sidebar h3{font-size:14px}.aside-card p,.template-hint{font-size:13px}
.schedule-actions .status-select{font-size:13px;width:124px;max-width:160px}
.schedule-actions .status-select.in_progress{width:156px}

/* The signed-in name is the administrator's direct entry to access approval. */
.global-user{gap:4px;max-width:285px}
.global-account{display:inline-flex;align-items:center;gap:9px;min-width:0;max-width:100%;padding:7px 8px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ink);text-align:left}
.global-account:hover{background:var(--teal-soft);border-color:var(--line)}
.global-account .avatar{width:33px;height:33px;border-radius:10px;font-size:12px;flex-shrink:0}
.global-account-info{display:block;min-width:0}
.global-account strong{display:block;max-width:170px;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.45}
.global-account-info>span{display:block;margin-top:3px;color:var(--teal);font-size:11px;white-space:nowrap}
.global-account>.icon{width:14px;height:14px;color:var(--teal);flex-shrink:0}
.access-panel-actions{justify-content:flex-end;gap:9px}
.table .access-user-name{font-size:15px;font-weight:600}
.access-pending{background:#dbb8750d}.access-pending>td:first-child{border-left:2px solid var(--accent)}
@media(max-width:1200px){.global-account strong{max-width:130px}}
@media(max-width:720px){.global-account{gap:7px;padding:5px 6px}.global-account strong{max-width:120px}.global-account .avatar{width:29px;height:29px;font-size:11px}.global-account-info>span{font-size:10px}.access-panel-actions{justify-content:flex-start}}
@media(max-width:480px){.global-account .avatar{display:none}.global-account strong{max-width:100px;font-size:12px}.global-account>.icon{width:12px;height:12px}.global-account{gap:5px;padding:5px}.global-user{gap:2px}}

/* Keep the primary navigation readable without compressing its labels. */
.global-nav-item{font-size:14px;line-height:1.4;flex-shrink:0}
.global-nav-item .icon{width:16px;height:16px}
@media(max-width:1280px){.global-nav{justify-content:flex-start;overflow-x:auto}}
@media(max-width:720px){.global-nav-item{font-size:13px}}

/* Let the header and workspace share one viewport instead of adding their heights. */
#app{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
#app>.global-header{flex-shrink:0}
#app>.workspace{min-height:0;flex:1}
@media(min-width:1001px){
 .global-header{min-height:76px;padding-top:10px;padding-bottom:10px}
 .topbar{height:58px;min-height:58px;padding-top:0;padding-bottom:0}
}

/* A denser agenda keeps the same type sizes and comfortable control targets. */
.workspace .main:has(>.agenda-grid){padding-top:22px;padding-bottom:20px}
.workspace .main:has(>.agenda-grid)>.page-heading{margin-bottom:18px}
.workspace .main:has(>.agenda-grid)>.page-heading .eyebrow{margin-bottom:6px}
.workspace .main:has(>.agenda-grid)>.page-heading .page-description{margin-top:6px}
.workspace .main:has(>.agenda-grid)>.stats{margin-bottom:18px}
.workspace .main:has(>.agenda-grid) .stat-label{margin-bottom:4px}
.agenda-grid>.panel{display:flex;flex-direction:column}
.agenda-head{padding-top:16px;padding-bottom:16px}
.agenda-toolbar{padding-top:10px;padding-bottom:10px}
.agenda-body{min-height:0;flex:1;display:flex;flex-direction:column}
.agenda-body>.empty{flex:1;min-height:240px;padding:28px 22px}
.agenda-body>.empty .empty-icon{width:50px;height:50px;border-radius:16px;margin-bottom:14px}
.agenda-body>.empty .empty-icon .icon{width:24px;height:24px}
.agenda-body>.empty p{margin-bottom:16px}
.agenda-aside .calendar{padding:16px 18px}
.calendar-week{margin-top:14px;margin-bottom:6px}
.calendar-day{height:31px}
.calendar-rule{margin-top:12px;padding-top:10px;gap:5px 7px}
.calendar-legend{flex-basis:auto;margin-left:auto;padding-left:0}
.agenda-aside .aside-card{margin-top:12px;padding:16px}
.agenda-aside .aside-card h3{margin-top:8px;margin-bottom:6px}
.agenda-aside .aside-card p{line-height:1.6}
@media(min-width:721px){
 .workspace .main:has(>.agenda-grid) .stat{padding:12px 18px}
 .workspace>.app-footer{padding-top:12px;padding-bottom:14px}
}

/* Independent tracks prevent action controls from squeezing patient names. */
@media(max-width:860px){
 .schedule-row{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:stretch;min-height:0}
 .schedule-time{grid-column:1;grid-row:1;width:auto;padding:15px 8px;font-size:14px;gap:5px}
 .schedule-marker{left:55px;top:14px;bottom:14px;width:3px}
 .schedule-content{grid-column:2;grid-row:1;min-width:0;width:auto;min-height:80px;padding:14px 12px;gap:10px;align-items:flex-start}
 .schedule-content .avatar{width:32px;height:32px;margin-top:2px;flex:0 0 32px}
 .schedule-content>div{flex:1 1 auto;min-width:0;width:auto}
 .schedule-name{font-size:15px;line-height:1.5;white-space:normal;word-break:normal;overflow-wrap:break-word}
 .schedule-info{font-size:12px;line-height:1.6;gap:4px 7px;margin-top:5px}
 .schedule-actions{grid-column:1/-1;grid-row:2;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;flex:none;width:auto;max-width:none;gap:6px;padding:0 12px 12px 68px}
 .schedule-actions:has(.start-appointment){padding-left:12px}
 .schedule-actions .start-appointment{flex:1 1 145px;min-width:0;min-height:36px;padding:7px 8px;gap:6px;font-size:12px;white-space:normal}
 .schedule-actions .status-select{flex:0 0 auto;width:118px;max-width:100%;min-height:36px;font-size:12px}
 .schedule-actions .status-select.in_progress{width:150px}
 .schedule-actions .icon-btn{display:inline-flex;flex:0 0 28px;width:28px;height:36px;margin-left:auto}
}
@media(max-width:720px){
 .global-header{position:relative;top:auto;min-height:0;padding:8px 12px 0;gap:6px}
 .global-brand{flex-basis:130px}.global-brand .brand{width:130px;height:44px}.global-brand .brand img{max-height:44px}
 .global-nav{padding:2px 0 8px;gap:4px}.global-nav-item{padding:8px 10px;font-size:13px}
 .global-account strong{max-width:100px}.global-account-info>span{font-size:10px}
 .topbar{position:relative;top:auto;min-height:0;height:auto;padding:8px 12px;gap:6px 10px}
 .workspace-location{min-height:22px;font-size:12px;line-height:1.4}
 .topbar .top-search{min-width:0}.top-search .search-box input{font-size:16px;padding-top:9px;padding-bottom:9px}
 .topbar .btn.primary{min-height:38px;font-size:12px;padding:8px 10px}
 .agenda-toolbar{align-items:stretch;gap:10px}.agenda-toolbar>.row{flex:1 1 100%;min-width:0}
 .agenda-toolbar .doctor-filter{width:100%;max-width:100%;font-size:14px;min-height:38px}
 .agenda-toolbar>.btn{min-height:38px;font-size:13px}
}
