:root{--bg:#f3f6fa;--paper:#fff;--ink:#1b2e4a;--muted:#78859a;--blue:#3478da;--blue-soft:#eaf2ff;--line:#e0e7f0;--green:#21836b;--warm:#b1895c;--red:#ba4553;--shadow:0 5px 22px #23385206;--radius:14px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.46}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #9cbff8;outline-offset:2px}input,textarea,select{border:1px solid #d9e2ed;border-radius:8px;width:100%;padding:10px 11px;background:white;color:var(--ink);min-width:0;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--blue)}input[readonly],textarea[readonly],select:disabled{background:#f6f8fb}textarea{resize:vertical;min-height:92px;line-height:1.6}label{display:block;color:#52627a;font-size:12px;font-weight:550}label>input,label>select,label>textarea{display:block;margin-top:6px;font-size:14px;font-weight:400}a{color:var(--blue);text-decoration:none}h1,h2,h3,h4,p{margin:0}h1{font-size:27px;line-height:1.25;font-weight:650;letter-spacing:-.65px}h2{font-size:18px;font-weight:650;letter-spacing:-.25px}h3{font-size:14px;font-weight:650}small{font-size:11px}table{width:100%;border-collapse:collapse}th{text-align:left;font-size:11px;line-height:1.4;color:#6f7d93;font-weight:600;background:#f7f9fc}th,td{padding:12px 13px;border-bottom:1px solid #edf1f6;vertical-align:top}td{font-size:12px}tr:last-child td{border-bottom:none}[hidden]{display:none!important}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 13px;border:1px solid #dce5f0;background:white;color:var(--ink);border-radius:8px;font-size:12px;font-weight:550;white-space:nowrap;text-decoration:none}.button:hover{background:#f1f6fe;border-color:#bfd3ef}.button.primary{background:var(--blue);color:white;border-color:var(--blue)}.button.primary:hover{background:#276aca}.button.danger{color:var(--red);border-color:#efd5da}.button.quiet{background:transparent;border-color:transparent;color:var(--muted)}.button.icon{padding:6px 11px;font-size:18px;line-height:1}.button.small{min-height:29px;padding:5px 9px;font-size:11px}.button.wide{width:100%}.muted{color:var(--muted);font-size:12px}.error{color:var(--red);font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:650;color:var(--warm);margin-bottom:9px}.pill{display:inline-flex;align-items:center;padding:4px 8px;border-radius:6px;font-size:10px;font-weight:600;background:#eef2f8;color:#6c7e96;white-space:nowrap}.pill.blue{background:var(--blue-soft);color:var(--blue)}.pill.green{background:#e8f5f0;color:var(--green)}.pill.amber{background:#fff4de;color:#9c6d28}.pill.red{background:#fcecee;color:var(--red)}.login-screen{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;background:radial-gradient(ellipse at 35% 0,#eaf2fc,transparent 65%),var(--bg)}.login-brand{display:flex;flex-direction:column;text-align:center;gap:5px;margin-bottom:30px}.login-brand strong{font-size:23px;letter-spacing:1px}.login-brand span{font-size:9px;letter-spacing:2px;color:var(--muted)}.login-card{width:100%;max-width:430px;background:white;padding:35px;border-radius:20px;border:1px solid var(--line);box-shadow:0 16px 55px #1d3a5f08}.login-card h1{margin-bottom:10px}.login-card label{margin-top:21px}.login-card .error{margin:16px 0 5px}.login-card button{margin-top:12px}.privacy-note{font-size:10px;color:var(--muted);margin-top:21px;padding-top:20px;border-top:1px solid var(--line);line-height:1.7}.login-footer{font-size:11px;color:#9da7b5;margin-top:25px}.sidebar{width:202px;position:fixed;inset:0 auto 0 0;background:#fbfcfe;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:15}.brand{padding:25px 21px 20px;display:flex;flex-direction:column;color:var(--ink)}.brand strong{font-size:18px;letter-spacing:.4px}.brand span{font-size:9px;color:var(--muted);letter-spacing:1.05px;margin-top:3px}.workspace-label{font-size:9px;letter-spacing:1px;padding:16px 20px;color:#9aa6b7}nav{padding:0 11px}.nav-button{width:100%;border:0;border-radius:9px;text-align:left;padding:12px 11px;color:#67788e;background:transparent;margin:2px 0;display:flex;gap:12px;align-items:center;font-size:12px}.nav-button:hover{background:#f0f4fa}.nav-button.active{color:var(--blue);background:#eaf2ff;font-weight:600}.nav-icon{width:20px;font-size:18px;text-align:center}.sidebar-note{margin:auto 16px 18px;padding:15px 12px;border:1px solid var(--line);border-radius:10px;background:white;font-size:11px}.sidebar-note strong{font-size:10px}.sidebar-note p{font-size:10px;color:var(--muted);margin-top:7px;line-height:1.7}.small-dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:var(--green);margin-right:7px}.sidebar-bottom{display:flex;flex-direction:column;gap:3px;padding:15px 20px;border-top:1px solid var(--line);font-size:9px;color:var(--muted)}.main-shell{margin-left:202px}.topbar{height:67px;padding:0 26px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fbfcfef0;position:sticky;top:0;z-index:12;backdrop-filter:blur(8px)}.breadcrumb{font-size:11px;color:var(--muted)}.breadcrumb span{margin:0 9px;color:#bac4d0}.top-right{display:flex;align-items:center;gap:7px;font-size:11px}.top-right #currentUser{max-width:180px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-left:12px}.save-state{font-size:10px;color:var(--muted)}.save-state.ok{color:var(--green)}.save-state.bad{color:var(--red)}#mainContent{padding:26px;max-width:1600px;margin:0 auto;min-height:calc(100vh - 120px)}.app-footer{padding:18px 26px;text-align:center;color:#98a3b3;font-size:9px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:23px}.page-heading .muted{margin-top:7px}.row{display:flex;align-items:center;gap:9px}.row.wrap{flex-wrap:wrap}.spacer{flex:1}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;margin-bottom:16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--line)}.panel-head>div>p{margin-top:3px}.panel-body{padding:18px}.searchbar{display:flex;gap:10px;padding:16px 18px;border-bottom:1px solid var(--line)}.searchbar input{max-width:400px;background:#f9fbfd}.search-count{margin-left:auto;font-size:11px;color:var(--muted);align-self:center}.patient-row{cursor:pointer}.patient-row:hover{background:#f8fbff}.patient-name{display:flex;align-items:center;gap:12px;font-weight:600;font-size:13px}.avatar{height:38px;width:38px;border-radius:11px;background:#eaf1fa;color:#6e8eaf;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0}.empty{padding:45px 20px;text-align:center;color:var(--muted);font-size:12px}.empty strong{display:block;font-size:16px;color:var(--ink);margin-bottom:7px}.empty .button{margin-top:18px}.table-wrap{overflow:auto}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.span-full{grid-column:1/-1}.section-gap{margin-bottom:19px}.note{font-size:11px;line-height:1.65;padding:12px 14px;border-radius:9px;background:#f4f7fb;color:#758298}.note.amber{background:#fff7e9;color:#946b31}.note.red{background:#fff0f1;color:#a54956}.note.blue{background:#edf4ff;color:#526f97}.note.green{background:#edf8f4;color:#408b75}.note+.panel,.note+.form-grid{margin-top:17px}.summary-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:20px}.stat{padding:20px;border:1px solid var(--line);border-radius:12px;background:white}.stat strong{font-size:28px;font-weight:600;display:block;margin:5px 0}.stat>span{font-size:11px;color:var(--muted)}.patient-banner{padding:18px 20px;display:flex;align-items:center;gap:14px}.patient-banner .avatar{width:49px;height:49px;font-size:16px;background:#e7eff9}.patient-banner h2{font-size:18px}.patient-banner .muted{font-size:11px;margin-top:5px}.patient-banner .banner-details{margin-left:auto;max-width:370px}.banner-details .pill{margin-bottom:5px}.visit-bar{padding:12px 18px;display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);background:#fafbfd}.visit-bar select{max-width:370px;font-size:12px;padding:8px 10px}.tabs{display:flex;gap:3px;overflow:auto;margin:0 0 17px;border-bottom:1px solid #d8e2ef}.tab{border:none;background:transparent;padding:13px 15px;color:#6c7b93;font-size:12px;border-bottom:2px solid transparent;white-space:nowrap}.tab.active{border-color:var(--blue);color:var(--blue);font-weight:600}.tab:hover{color:var(--blue)}.tab-section{animation:fade .14s}@keyframes fade{from{opacity:.5}to{opacity:1}}.form-section-title{font-size:10px;color:var(--warm);text-transform:uppercase;letter-spacing:1.2px;margin-bottom:17px}.procedure-header{background:linear-gradient(135deg,#fff,#f9fbff)}.total-dose{font-size:18px;font-weight:600;white-space:nowrap;color:var(--blue)}.total-dose small{font-weight:400;font-size:10px;color:var(--muted);display:block;text-align:right}.chart-layout{display:grid;grid-template-columns:135px minmax(0,1fr) 240px;gap:0;background:white;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:16px;overflow:hidden;min-height:495px}.chart-tools{padding:15px 10px;border-right:1px solid var(--line);background:#fbfcff}.tool{display:flex;align-items:center;gap:7px;width:100%;padding:9px 8px;background:transparent;border:1px solid transparent;border-radius:7px;text-align:left;color:#6d7c91;font-size:11px;margin:3px 0}.tool.active{background:var(--blue-soft);border-color:#cadaf4;color:var(--blue)}.tool-icon{font-size:17px;width:18px;text-align:center}.tools-title{font-size:10px;color:#8a98aa;margin:3px 4px 11px}.muscle-legend{border-top:1px solid var(--line);padding-top:14px;margin-top:19px;font-size:9px;line-height:1.5;color:#7d8796}.legend-item{display:flex;gap:7px;margin:10px 2px}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex-shrink:0;margin-top:3px}.chart-center{min-width:0}.chart-toolbar{min-height:50px;display:flex;align-items:center;padding:9px 12px;gap:4px;border-bottom:1px solid var(--line);flex-wrap:wrap}.view-button{border:none;background:none;padding:6px 8px;border-radius:6px;font-size:10px;color:#7b89a0}.view-button.active{color:var(--blue);background:var(--blue-soft)}.chart-canvas{padding:14px 10px 0;overflow:auto;min-height:370px;display:flex;align-items:flex-start;justify-content:center}.face-views{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px;transform-origin:top center}.face-views.single{grid-template-columns:minmax(0,1fr);max-width:290px}.face-block{min-width:0;text-align:center}.face-svg{width:100%;max-height:390px;display:block;touch-action:none;user-select:none;cursor:crosshair;overflow:visible}.face-svg.select-tool{cursor:default}.face-svg .annotation{cursor:grab}.face-label{font-size:10px;color:#67778c;margin-top:3px}.face-label span{display:block;font-size:8px;color:#9ba6b4;margin-top:3px}.chart-tip{padding:13px 15px;font-size:9px;color:#8b97a7;text-align:center}.editor{padding:15px 14px;border-left:1px solid var(--line);background:#fbfcff;min-width:0}.editor h3{margin-bottom:14px}.editor label{font-size:10px;margin:11px 0}.editor input,.editor select,.editor textarea{font-size:12px;padding:8px 9px}.editor textarea{min-height:75px}.editor .form-grid{gap:8px}.editor .note{font-size:9px;padding:10px}.editor-empty{padding:60px 0;color:#9da8b6;text-align:center;font-size:11px}.editor-empty strong{display:block;color:#657b96;margin-bottom:10px}.editor-empty .big-plus{font-size:35px;font-weight:200;color:#b4cbe9;display:block;margin-bottom:13px}.mark-number{display:inline-flex;min-width:21px;height:21px;border-radius:50%;align-items:center;justify-content:center;color:white;font-weight:600;font-size:10px}.selected-row{background:#eff5ff}.compact-table td,.compact-table th{padding:9px 11px;font-size:11px}.summary-total{font-size:13px;font-weight:650;color:var(--blue)}.diagram-warning{margin-top:12px;font-size:10px;color:#9a875f}.history-item{display:flex;gap:16px;padding:17px 18px;border-bottom:1px solid var(--line)}.history-item:last-child{border:0}.history-date{width:61px;background:#f3f6fb;border-radius:8px;padding:9px;text-align:center;font-size:10px;flex-shrink:0;color:#7a8da5}.history-date b{display:block;font-size:20px;color:#5d789b;font-weight:550}.history-content{flex:1;min-width:0}.history-content .muted{margin-top:5px}.history-actions{display:flex;gap:8px;align-self:center;flex-wrap:wrap}.photo-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px}.photo-side{min-width:0}.photo-side select{font-size:11px;margin-bottom:12px}.photo-well{height:330px;border-radius:10px;background:#f3f5f7;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;overflow:hidden;color:#9aa6b5;font-size:12px}.photo-well img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}.photo-caption{font-size:10px;color:var(--muted);margin-top:8px}.compare-slider{position:relative;max-width:650px;height:390px;margin:15px auto;background:#f2f4f7;border:1px solid var(--line);border-radius:9px;overflow:hidden}.compare-slider .compare-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.compare-slider .compare-over{position:absolute;inset:0;clip-path:inset(0 calc(100% - var(--split,50%)) 0 0);background:#f2f4f7}.compare-divider{position:absolute;top:0;bottom:0;left:var(--split,50%);border-left:2px solid white;box-shadow:0 0 2px #1b3658;pointer-events:none}.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:14px}.gallery-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}.gallery-card img{display:block;width:100%;height:165px;object-fit:contain;background:#f5f6f9}.gallery-card .gallery-info{padding:10px;font-size:10px;color:#738398}.gallery-info strong{font-size:11px;color:var(--ink)}.gallery-info p{margin:5px 0}.file-item{display:flex;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.file-item:last-child{border:0}.file-symbol{background:#f1f5fa;color:#8197b1;width:36px;height:42px;display:flex;align-items:center;justify-content:center;font-size:11px;border-radius:5px}.file-info{flex:1;min-width:0}.file-info strong{font-size:12px;overflow-wrap:anywhere}.file-info p{font-size:10px;color:var(--muted);margin-top:3px}.dialog{border:1px solid var(--line);border-radius:16px;padding:0;width:min(850px,94vw);max-height:90dvh;color:var(--ink);box-shadow:0 25px 100px #192e5740}.dialog.narrow{width:min(480px,94vw)}.dialog.wide{width:min(1100px,96vw)}.dialog::backdrop{background:#1d304250;backdrop-filter:blur(2px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:17px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:5}.dialog-head h2{font-size:17px}#dialogBody{padding:22px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:18px;margin-top:18px;border-top:1px solid var(--line)}.dialog .accordion{border:1px solid var(--line);border-radius:9px;margin-top:12px;overflow:hidden}.accordion summary{cursor:pointer;padding:14px 16px;font-size:12px;font-weight:600;background:#f8fafd}.accordion>div{padding:16px}.record-row{display:grid;grid-template-columns:140px 1fr 100px;gap:9px;border-bottom:1px solid var(--line);padding:12px 0}.record-row textarea{min-height:65px}.record-row .row-details{grid-column:1/-1}.check-label{display:flex;align-items:center;gap:9px;font-weight:400;font-size:12px;color:#67788f}.check-label input{width:auto;margin:0}.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);z-index:110;background:#20344e;color:#fff;padding:13px 20px;border-radius:11px;max-width:min(90vw,620px);font-size:12px;box-shadow:0 8px 35px #172b4240}.busy{position:fixed;inset:0;background:#f4f7fbac;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:120}.busy>div{background:white;border:1px solid var(--line);border-radius:14px;padding:27px 38px;box-shadow:var(--shadow);display:flex;align-items:center;gap:15px}.busy p{font-size:13px}.spinner{display:inline-block;border:2px solid #dce8f7;border-top-color:var(--blue);width:20px;height:20px;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.mobile-only{display:none}.page-actions{display:flex;gap:8px;flex-wrap:wrap}.review-pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 inherit;max-height:60vh;overflow:auto;background:#f6f8fb;padding:16px;border-radius:9px}.revision-item{padding:12px 0;border-bottom:1px solid var(--line)}.revision-item summary{font-size:12px;cursor:pointer}.revision-data{margin-top:12px;font-size:11px;line-height:1.8;overflow-wrap:anywhere}.revision-data dt{font-weight:600;margin-top:7px}.revision-data dd{margin-left:0;white-space:pre-wrap;color:#69778c}.system-key{font-family:monospace;font-size:11px;overflow-wrap:anywhere}.status-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.mono{font-family:monospace}.inline-date{white-space:nowrap}.table-actions{white-space:nowrap}.notice-line{font-size:10px;color:#8b96a6;line-height:1.7;margin:13px 0}.readonly-tag{padding:10px 14px;background:#f0f5fa;color:#6b829c;border:1px solid #dce7f2;border-radius:9px;margin-bottom:15px;font-size:11px}.clinical-save-bar{padding:15px 0;display:flex;align-items:center;justify-content:flex-end;gap:8px}.link-button{border:0;background:none;color:var(--blue);text-align:left;padding:0;font-size:12px}
.record-actions{display:inline-flex;flex-wrap:wrap;gap:8px;margin-left:10px;vertical-align:middle}
.record-actions .record-action{font-size:11px;padding:7px 11px;min-height:34px}
.record-actions .record-correction{border-color:#c89b4b;background:#fff8e9;color:#71501b}
.record-actions .record-correction:hover{background:#fff0cf}
@media(max-width:760px){
  .record-actions{display:flex;margin:10px 0 0;gap:8px}
  .record-actions .record-action{flex:1;min-height:42px;white-space:normal}
}
.danger-text{color:var(--red)}.scroll-canvas{overflow:auto}.draft-conflict{position:sticky;top:68px;z-index:11;margin-bottom:14px;padding:14px;background:#fff0f0;border:1px solid #f0ced3;border-radius:10px;color:#a44352;font-size:12px}.draft-conflict .row{margin-top:10px}.legend-hint{font-size:8px;color:#a3acb7;margin-top:10px;line-height:1.7}.allergy-details{font-size:10px;color:#8c6b38;overflow-wrap:anywhere}.section-divider{border:0;border-top:1px solid var(--line);margin:22px 0}
/* A4 output is separate from the responsive interface. No screen cards or toolbars enter print. */
#printHost{display:none}.print-sheet{font-family:Arial,sans-serif;color:#172238;font-size:9pt;line-height:1.25;width:190mm;box-sizing:border-box;background:white}.print-sheet h1{font-size:14pt;margin:2mm 0;line-height:1.15;letter-spacing:-.1pt}.print-sheet h2{font-size:10pt;margin:3mm 0 1.5mm}.print-sheet p{margin:1mm 0;white-space:pre-wrap;overflow-wrap:anywhere}.print-top{display:flex;justify-content:space-between;font-size:8pt;border-bottom:.35mm solid #273c56;padding-bottom:2mm}.print-subtitle{font-size:8pt;color:#586477}.print-meta{display:grid;grid-template-columns:1.6fr 1fr;gap:1mm 4mm;margin:3mm 0;padding:2mm;background:#f5f7fa;border:1px solid #dce2ea}.print-med{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:2mm;font-size:8pt;margin-bottom:2mm}.print-face-row{display:flex;justify-content:center;gap:7mm;border-bottom:1px solid #e0e5eb;padding-bottom:2mm}.print-face{width:43mm;text-align:center;font-size:7pt}.print-face svg{height:55mm;width:100%;display:block}.print-sheet table{font-size:inherit}.print-sheet th,.print-sheet td{padding:1.4mm 1.8mm;border:1px solid #dae1eb;font-size:inherit;color:#172238;line-height:1.3;overflow-wrap:anywhere}.print-sheet th{font-size:7.5pt;background:#f2f5f9}.print-sheet tr{break-inside:avoid}.print-table th:first-child{width:38mm}.print-table td:nth-child(3){font-size:7.5pt}.print-notes{margin-top:2mm;font-size:8pt}.print-photos{display:flex;gap:4mm;justify-content:center;margin:2mm 0}.print-photo{width:60mm;text-align:center;font-size:7pt}.print-photo img{width:100%;height:33mm;object-fit:contain;background:#f4f5f6}.print-signatures{display:flex;justify-content:space-between;margin-top:4mm;border-top:1px solid #dce2ea;padding-top:3mm;font-size:8pt}.print-footer{margin-top:2mm;font-size:6.8pt;color:#637184}.print-zone-list{font-size:7.5pt;margin:2mm 0}.print-sheet.full-card h2{border-bottom:1px solid #dce3ec;padding-bottom:1mm;margin-top:5mm;break-after:avoid}.print-sheet.full-card .record-block{break-inside:avoid}.print-sheet.full-card .visit-break{break-before:page}.print-preview-wrap{overflow:auto;background:#eef1f5;padding:15px;text-align:left}.print-preview-wrap .print-sheet{padding:7mm;width:204mm;margin:0 auto;box-shadow:0 3px 16px #20304415}.print-fit{visibility:hidden;position:absolute;top:0;left:-20000px;display:block!important}.print-fit .print-sheet{width:190mm!important;padding:0!important}.print-compact .print-face svg{height:46mm}.print-compact th,.print-compact td{padding:1mm 1.2mm}.print-compact .print-photos img{height:28mm}.print-compact h1{font-size:12pt}
@media(min-width:1550px){.chart-layout{grid-template-columns:145px minmax(0,1fr) 280px}.face-svg{max-height:430px}.chart-canvas{min-height:420px}.editor{padding:18px}.chart-tools{padding:17px 12px}}
@media(max-width:1200px){.sidebar{width:177px}.main-shell{margin-left:177px}.brand{padding:25px 16px}.brand strong{font-size:16px}.brand span{font-size:8px}.topbar{padding:0 18px}.breadcrumb{display:none}#mainContent{padding:20px}.top-right{margin-left:auto}.chart-layout{grid-template-columns:107px minmax(0,1fr) 218px}.tool{font-size:10px;padding:8px 5px}.chart-tools{padding:13px 6px}.form-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-well{height:290px}.editor{padding:13px 11px}.face-label{font-size:9px}}
@media(max-width:980px){.sidebar{width:165px}.main-shell{margin-left:165px}.chart-layout{grid-template-columns:100px minmax(0,1fr)}.editor{grid-column:1/-1;border-left:0;border-top:1px solid var(--line)}.editor #markForm{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.editor h3,.editor .span-full,.editor .note{grid-column:1/-1}.editor-empty{padding:15px}.chart-canvas{min-height:320px}.face-svg{max-height:340px}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.patient-banner .banner-details{max-width:210px}.history-item{gap:10px}.patient-banner h2{font-size:16px}.page-actions .button{font-size:11px;padding:8px 9px}.top-right #currentUser{max-width:140px}.save-state{max-width:155px}.gallery{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:transform .15s;width:200px;box-shadow:4px 0 30px #1e354520}.sidebar.open{transform:translateX(0)}.main-shell{margin-left:0}.mobile-only{display:inline-flex}.topbar{height:57px;padding:0 12px;gap:7px}.top-right{gap:3px}.top-right #currentUser{display:none}.top-right .button{font-size:10px;min-height:33px;padding:6px}.save-state{font-size:9px;max-width:180px}#mainContent{padding:17px 12px}.page-heading{align-items:flex-start;margin-bottom:18px;gap:12px}.page-heading h1{font-size:23px}.page-heading .muted{font-size:11px}.page-heading .page-actions{justify-content:flex-end}.page-actions{gap:6px}.panel{border-radius:11px}.panel-head,.panel-body{padding:14px}.panel-head{flex-wrap:wrap}.searchbar{padding:12px;flex-wrap:wrap}.searchbar input{max-width:none}.search-count{font-size:10px}.patient-table .phone-cell{display:none}.patient-name{font-size:12px;gap:8px}.patient-name .avatar{width:30px;height:32px;font-size:11px}.patient-table th,.patient-table td{padding:12px 9px}.patient-table .dob-cell{font-size:10px}.summary-cards{gap:8px}.stat{padding:13px 12px}.stat strong{font-size:23px}.stat>span{font-size:10px}.patient-banner{padding:14px;align-items:flex-start;flex-wrap:wrap;gap:10px}.patient-banner .avatar{height:37px;width:37px;font-size:13px}.patient-banner h2{font-size:16px}.patient-banner .banner-details{max-width:none;margin:0;flex-basis:100%;padding-top:6px;border-top:1px solid #edf1f5}.patient-banner .banner-details .pill{margin:0}.patient-banner .allergy-details{display:inline;margin-left:5px}.visit-bar{padding:10px 12px;gap:7px;flex-wrap:wrap}.visit-bar select{flex:1;max-width:none;min-width:160px;font-size:11px}.visit-bar .pill{font-size:9px}.tabs{margin-bottom:13px}.tab{padding:11px 10px;font-size:11px}.form-grid,.form-grid.three,.form-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}label{font-size:10px}label input,label textarea,label select{font-size:13px;padding:9px}.form-grid .mobile-full{grid-column:1/-1}.chart-layout{display:block;min-height:0}.chart-tools{border-right:0;border-bottom:1px solid var(--line);padding:7px 10px;display:flex;gap:3px}.tools-title,.muscle-legend{display:none}.tool{width:auto;padding:5px 8px;font-size:10px;gap:5px;margin:0}.tool-icon{font-size:14px;width:14px}.chart-toolbar{padding:8px 10px}.chart-canvas{min-height:350px;max-height:none;padding:9px 14px 0}.face-views{gap:3px}.face-views.single{max-width:265px}.face-svg{max-height:365px}.face-views:not(.single) .face-svg{max-height:250px}.face-views:not(.single){align-self:center}.chart-tip{padding:8px 12px;font-size:9px}.editor{padding:14px}.editor #markForm{gap:0 11px}.editor label{margin:7px 0}.editor h3{font-size:13px;margin-bottom:9px}.editor .note{margin-top:7px}.compact-table td,.compact-table th{font-size:10px;padding:8px}.compact-table .hide-mobile{display:none}.total-dose{font-size:17px}.form-section-title{font-size:9px}.photo-compare{gap:9px}.photo-well{height:205px}.photo-side select{font-size:10px;padding:8px 5px}.compare-slider{height:310px}.gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-card img{height:160px}.history-item{padding:13px 12px;flex-wrap:wrap}.history-actions{width:100%;padding-left:67px}.dialog{max-height:94dvh;width:96vw;border-radius:12px}.dialog-head{padding:14px 16px}.dialog-head h2{font-size:16px}#dialogBody{padding:16px}.dialog-actions{gap:7px}.dialog-actions .button{font-size:11px}.record-row{grid-template-columns:1fr 1fr;gap:8px}.record-row>label:nth-child(2){grid-column:1/-1;grid-row:2}.status-grid{grid-template-columns:1fr}.login-screen{padding:24px 18px}.login-card{padding:27px 25px}.login-card h1{font-size:25px}.login-footer{font-size:9px;text-align:center}.app-footer{padding:14px;font-size:8px}.draft-conflict{top:58px}.toast{font-size:11px;padding:11px 15px;bottom:17px;min-width:220px}.print-preview-wrap{padding:8px}.file-info strong{font-size:11px}.note{font-size:10px}.note.amber{overflow-wrap:anywhere}.check-label{font-size:11px}}
@media print{@page{size:A4 portrait;margin:10mm}html,body{margin:0!important;padding:0!important;background:white!important;min-width:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}body>*:not(#printHost){display:none!important}#printHost{display:block!important;margin:0!important;padding:0!important}.print-sheet{width:190mm!important;padding:0!important;margin:0!important;box-shadow:none!important}.print-sheet.single-page{break-inside:avoid;page-break-inside:avoid}.print-sheet .print-signatures{break-inside:avoid}.print-sheet.full-card{break-inside:auto}.print-sheet.full-card p{orphans:3;widows:3}.print-sheet.full-card th{display:table-cell}.print-sheet.full-card thead{display:table-header-group}}

.chart-canvas{overflow:auto}.zoom-value{font-size:10px;min-width:33px;text-align:center;color:var(--muted)}@media(max-width:760px){.chart-toolbar{flex-wrap:wrap}.chart-toolbar .spacer{min-width:2px}.zoom-value{font-size:9px;min-width:28px}.chart-toolbar .button.small{min-height:28px;padding:4px 6px}}

/* Appointment journal + services */
.schedule-toolbar{display:flex;align-items:center;gap:8px;padding:12px 14px;overflow:visible}.schedule-toolbar input[type=date]{width:150px;padding:7px 9px}.schedule-toolbar select{width:220px;padding:7px 9px}.schedule-panel{overflow:hidden}.schedule-scroll{overflow:auto;max-height:calc(100vh - 265px);min-height:520px}.schedule-head{display:grid;grid-template-columns:72px minmax(0,1fr);position:sticky;top:0;z-index:6;background:#fff;border-bottom:1px solid var(--line)}.schedule-time-head{display:flex;align-items:center;justify-content:center;font-size:10px;color:var(--muted);border-right:1px solid var(--line);min-height:62px}.schedule-staff-heads{display:grid;min-width:max-content}.schedule-staff-head{min-width:210px;display:flex;align-items:center;gap:9px;padding:10px 13px;border-right:1px solid var(--line);background:#fff}.schedule-staff-head .avatar{width:35px;height:35px;border-radius:50%;font-size:11px}.schedule-staff-head strong{display:block;font-size:11px}.schedule-staff-head small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.schedule-empty-head{padding:20px;color:var(--muted);font-size:11px}.schedule-body{display:grid;grid-template-columns:72px minmax(0,1fr);position:relative}.schedule-axis{position:relative;border-right:1px solid var(--line);background:#fbfcfe;z-index:2}.schedule-time{position:absolute;right:10px;transform:translateY(-50%);font-size:9px;color:#9aa6b5}.schedule-time.major{font-size:11px;color:#62728a;font-weight:600}.schedule-lanes{display:grid;min-width:max-content}.schedule-lane{position:relative;min-width:210px;border-right:1px solid var(--line);background:#fff}.schedule-lane:hover{background:#fcfdff}.lane-lines{position:absolute;inset:0;background:repeating-linear-gradient(to bottom,transparent 0,transparent 32.6px,#eef2f7 32.6px,#eef2f7 33.6px)}.appointment-card{position:absolute;left:4px;right:4px;border:0;border-left:4px solid var(--blue);border-radius:6px;background:#eaf2ff;padding:5px 7px;text-align:left;overflow:hidden;z-index:3;box-shadow:0 1px 3px #1d355510;color:#1d395d}.appointment-card:hover{filter:brightness(.98);box-shadow:0 3px 10px #1d355520}.appointment-card strong,.appointment-card span,.appointment-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.appointment-card strong{font-size:10px}.appointment-card span{font-size:10px;margin-top:2px}.appointment-card small{font-size:8px;margin-top:2px;color:#5e7190}.appointment-card.status-confirmed{background:#e9f7f2;border-left-color:#21836b}.appointment-card.status-arrived{background:#eef8e8;border-left-color:#5a963c}.appointment-card.status-completed{background:#f0f2f6;border-left-color:#7c8796}.appointment-card.status-cancelled{background:#fff1f1;border-left-color:#ba4553;opacity:.72;text-decoration:line-through}.appointment-card.status-no_show{background:#fff5e8;border-left-color:#c28738}.appointment-card.overlap{padding:4px 5px;border-left-width:3px}.appointment-card.overlap strong,.appointment-card.overlap span{font-size:9px}.appointment-card.overlap small{font-size:7px}.service-generic-badge{margin-left:7px;vertical-align:middle}.schedule-empty-lane{min-width:260px;padding:35px;color:var(--muted)}.schedule-legend{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:3px 4px 18px}.status-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-left:9px;background:#3478da}.status-dot.status-confirmed{background:#21836b}.status-dot.status-arrived{background:#5a963c}.status-dot.status-completed{background:#7c8796}.status-dot.status-cancelled{background:#ba4553}.patient-link-box{padding:12px;border:1px solid var(--line);border-radius:9px;background:#fafbfd}.patient-result{width:100%;border:0;border-top:1px solid #edf1f6;background:white;padding:9px 10px;text-align:left;color:var(--ink)}.patient-result:hover{background:#f2f7ff}.patient-result strong,.patient-result span{display:block}.patient-result strong{font-size:11px}.patient-result span{font-size:9px;color:var(--muted);margin-top:2px}.linked-patient{margin-top:8px;padding:9px 10px;border-radius:7px;background:#edf8f4;color:#408b75;font-size:10px}.service-info{font-size:10px;color:var(--muted);margin-top:7px}.service-info strong{color:var(--ink)}.service-filters{display:flex;gap:10px;padding:15px 18px;border-bottom:1px solid var(--line);align-items:center}.service-filters input{max-width:390px}.service-filters select{max-width:260px}.service-table small{display:block;color:var(--muted);margin-top:4px;max-width:520px}.service-table .inactive-row{opacity:.6;background:#fafafa}.service-table th:nth-child(2){min-width:320px}.service-table td:nth-child(4),.service-table td:nth-child(5){white-space:nowrap}
@media(max-width:760px){.schedule-toolbar{flex-wrap:wrap}.schedule-toolbar strong{order:5;width:100%}.schedule-toolbar select{width:100%}.schedule-scroll{max-height:none}.schedule-head{grid-template-columns:58px minmax(0,1fr)}.schedule-body{grid-template-columns:58px minmax(0,1fr)}.schedule-time-head{min-height:54px}.schedule-staff-head{min-width:185px;padding:8px}.schedule-lane{min-width:185px}.service-filters{flex-wrap:wrap}.service-filters input,.service-filters select{max-width:none}.service-filters .search-count{width:100%;margin-left:0}.service-table th:nth-child(2){min-width:260px}}


.appointment-procedure{margin:16px 0;padding:16px;border:1px solid var(--border,#ddd);border-radius:12px;background:var(--panel,#fff)}
.procedure-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.appointment-duration-box{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center;padding:16px 0;margin:8px 0}
.appointment-procedure select{width:100%;min-width:0;max-width:100%}
.appointment-procedure .form-grid>div{min-width:0}
@media(max-width:600px){.appointment-duration-box{grid-template-columns:1fr;gap:4px}.appointment-procedure{padding:12px}.dialog-actions{flex-wrap:wrap}}


/* Daily appointment board: calendar, shared staff columns and time grid. */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#scheduleCalendar{display:none}
body:has(.schedule-workspace){--ink:#303b37;--muted:#7c8481;--line:#e3e6e4;--blue:#258a76;--blue-soft:#e9f3ee;--bg:#f5f6f5}
body:has(.schedule-workspace) .sidebar{width:248px;background:#f5f6f5;overflow-y:auto}
body:has(.schedule-workspace) .brand{padding:23px 24px 17px}
body:has(.schedule-workspace) .workspace-label{display:none}
body:has(.schedule-workspace) #scheduleCalendar{display:block;margin:4px 16px 18px;padding:12px 0 18px;border-bottom:1px solid #d9ddda}
.calendar-month{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 6px 15px}
.calendar-month strong{font-size:14px;font-weight:550;text-transform:capitalize}
.calendar-month>div{display:flex;gap:4px}
.calendar-arrow{border:0;background:transparent;width:28px;height:30px;border-radius:7px;font-size:23px;color:#58625d;line-height:1}
.calendar-arrow:hover{background:#e5eae6}
.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.calendar-weekdays{font-size:12px;color:#8b928d;margin-bottom:10px}
.calendar-day{border:0;background:transparent;min-width:0;height:31px;padding:0;border-radius:10px;color:#46504a;font-size:13px;position:relative}
.calendar-day:hover{background:#e6ece7}
.calendar-day.outside{color:#a9afaa}
.calendar-day.selected{background:#eacb78;color:#303b37;font-weight:650}
.calendar-day.is-today:after{content:"";position:absolute;bottom:2px;left:36%;right:36%;height:2px;border-radius:2px;background:#288a76}
.calendar-day.selected.is-today:after{background:#5a532f}
body:has(.schedule-workspace) .nav-button{font-size:14px;padding:12px 14px;color:#515b55}
body:has(.schedule-workspace) .nav-button.active{background:#e8eeea;color:#246b59}
body:has(.schedule-workspace) .sidebar-note{display:none}
body:has(.schedule-workspace) .sidebar-bottom{margin-top:auto;padding-top:18px}
body:has(.schedule-workspace) .main-shell{margin-left:248px}
body:has(.schedule-workspace) .topbar{height:54px;background:#f5f6f5;padding:0 18px;border-bottom:0;backdrop-filter:none}
body:has(.schedule-workspace) #mainContent{max-width:none;padding:0 16px 6px;min-height:calc(100dvh - 70px)}
body:has(.schedule-workspace) .app-footer{display:none}
.schedule-workspace{min-width:0}
.schedule-workspace .schedule-toolbar{border:0;background:transparent;box-shadow:none;padding:6px 0 15px;margin:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.schedule-workspace .button{font-size:13px;min-height:38px;border-color:#d9dfdb;border-radius:9px;font-weight:500}
.schedule-day-arrows{display:flex;gap:0}
.schedule-day-arrows .button{font-size:23px;padding:0 13px}
.schedule-day-arrows .button:first-child{border-radius:9px 0 0 9px}
.schedule-day-arrows .button:last-child{border-radius:0 9px 9px 0;margin-left:-1px}
.schedule-date-control{position:relative;display:flex;align-items:center;min-height:38px;padding:5px 8px;font-size:15px;white-space:nowrap;color:var(--ink);cursor:pointer}
.schedule-date-control strong{font-weight:600}
.schedule-workspace .schedule-date-control input[type=date]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
.schedule-date-control:focus-within{outline:2px solid #9fc7b8;border-radius:7px}
.schedule-workspace .schedule-toolbar select{height:38px;font-size:13px;background:#fff;border-color:#d9dfdb;max-width:240px;width:190px;border-radius:9px}
.schedule-workspace .schedule-toolbar #scheduleDensity{width:108px}
.schedule-workspace .schedule-refresh{font-size:23px;width:38px;padding:0}
.schedule-calendar-toggle,#scheduleMobileCalendar{display:none}
.schedule-workspace .schedule-panel{margin:0;border:1px solid #e0e5e1;border-radius:16px;box-shadow:none}
.schedule-workspace .schedule-scroll{max-height:calc(100dvh - 173px);min-height:260px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c4cfc7 #f5f7f5}
.schedule-timetable{min-width:calc(112px + var(--staff-count)*260px);width:100%;position:relative}
.schedule-workspace .schedule-head,.schedule-workspace .schedule-body{display:grid;grid-template-columns:58px minmax(0,1fr) 54px}
.schedule-workspace .schedule-head{position:sticky;top:0;z-index:8;border-bottom:1px solid #e0e5e1;background:white}
.schedule-workspace .schedule-time-head{background:#fff;min-height:82px;border:0;position:sticky;left:0;z-index:9}
.schedule-workspace .schedule-time-head.right{left:auto;right:0}
.schedule-workspace .schedule-staff-heads,.schedule-workspace .schedule-lanes{display:grid;grid-template-columns:repeat(var(--staff-count),minmax(260px,1fr));min-width:0}
.schedule-workspace .schedule-staff-head{padding:16px 14px;min-width:0;border-right:1px solid #edf0ed;gap:10px}
.schedule-workspace .schedule-staff-head .avatar{background:#e7eee9;color:#52725f;width:32px;height:32px;min-width:32px;border-radius:8px;font-size:12px}
.schedule-workspace .schedule-staff-head strong{font-size:14px;line-height:1.4;font-weight:550}
.schedule-workspace .schedule-staff-head small{font-size:12px;margin-top:2px;color:#929a94}
.staff-booking-count{margin-left:auto;background:#f0f4f1;color:#8a968e;border-radius:7px;min-width:24px;padding:2px 5px;text-align:center;font-size:11px}
.schedule-workspace .schedule-axis{position:sticky;left:0;z-index:5;border:0;background:#fff}
.schedule-workspace .schedule-axis-right{left:auto;right:0}
.schedule-workspace .schedule-time{right:13px;transform:none;line-height:1;top:0;font-size:12px;color:#a0a6a1;padding-top:3px}
.schedule-workspace .schedule-time.major{font-size:19px;font-weight:400;color:#424c46}
.schedule-workspace .schedule-time sup{font-size:11px;margin-left:1px;top:0;vertical-align:super}
.schedule-workspace .schedule-axis-right .schedule-time{left:12px;right:auto}
.schedule-workspace .schedule-lane{min-width:0;border-right:1px solid #e8ece8;background:#fff}
.schedule-workspace .schedule-lane:hover{background:#fcfdfb}
.schedule-workspace .lane-lines{pointer-events:none;background:repeating-linear-gradient(to bottom,#dfe5e0 0,#dfe5e0 1px,transparent 1px,transparent var(--hour-height)),repeating-linear-gradient(to bottom,#f0f3f0 0,#f0f3f0 1px,transparent 1px,transparent var(--slot-height))}
.schedule-free-label{position:absolute;top:30px;left:14px;color:#a4ada6;font-size:12px;pointer-events:none}
.appointment-block{position:absolute;z-index:3}
.schedule-workspace .appointment-card{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:5px;background:#ffd0ac;padding:0;text-align:left;overflow:hidden;box-shadow:none;color:#4b473d;line-height:1.25;display:block}
.schedule-workspace .appointment-card:hover{filter:none;box-shadow:0 0 0 2px #497e68,0 4px 12px #34594320;z-index:4}
.schedule-workspace .appointment-card:focus-visible{z-index:5;outline:3px solid #366b59;outline-offset:1px}
.schedule-workspace .appointment-card .appointment-time{display:flex;align-items:center;gap:8px;background:#1caf94;color:white;height:19px;padding:2px 25px 2px 5px;font-size:11px;line-height:15px;margin:0;white-space:nowrap}
.schedule-workspace .appointment-card .appointment-status{display:block;font-size:10px;margin:0 0 0 auto;color:#fff;overflow:hidden;opacity:.94}
.schedule-workspace .appointment-card .appointment-patient{padding:2px 5px 1px;font-size:12px;font-weight:650;line-height:16px;margin:0}
.schedule-workspace .appointment-card .appointment-phone{padding:0 5px;font-size:11px;line-height:15px;margin:0;color:#675542}
.schedule-workspace .appointment-card .appointment-service{padding:1px 5px;font-size:11px;line-height:14px;margin:0;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.schedule-workspace .appointment-card .appointment-note{padding:0 5px;font-size:11px;line-height:14px;margin:0;color:#75634e}
.schedule-workspace .appointment-card.overlap .appointment-status{display:none}
.schedule-workspace .appointment-card.compact{display:flex;align-items:center;gap:4px;background:#ffdbbf;padding-right:3px}
.schedule-workspace .appointment-card.compact .appointment-time{flex:0 0 auto;height:100%;max-width:100px;padding:1px 4px;display:flex;align-items:center;font-size:10px}
.schedule-workspace .appointment-card.compact .appointment-patient{padding:0;min-width:0;font-size:11px}
.schedule-workspace .appointment-card.compact .appointment-status,.schedule-workspace .appointment-card.compact .appointment-service{display:none}
.appointment-quick-add{position:absolute;top:0;right:1px;z-index:6;width:21px;height:19px;line-height:16px;border:0;border-radius:4px;padding:0;background:transparent;color:white;font-size:16px;font-weight:700}
.appointment-quick-add:hover,.appointment-quick-add:focus-visible{background:#136b5a;outline-offset:0}
.schedule-workspace .appointment-card.status-confirmed .appointment-time{background:#178a70}
.schedule-workspace .appointment-card.status-arrived .appointment-time{background:#4e93b0}
.schedule-workspace .appointment-card.status-completed{background:#e9eeeb;color:#69766c}
.schedule-workspace .appointment-card.status-completed .appointment-time{background:#8c9b90}
.schedule-workspace .appointment-card.status-cancelled{background:#f1eeeb;color:#8d8781;opacity:.75;text-decoration:none}
.schedule-workspace .appointment-card.status-cancelled .appointment-patient{text-decoration:line-through}
.schedule-workspace .appointment-card.status-cancelled .appointment-time{background:#a79b96}
.schedule-workspace .appointment-card.status-no_show{background:#f8ded3}
.schedule-workspace .appointment-card.status-no_show .appointment-time{background:#bd7765}
.schedule-now{position:absolute;left:0;right:0;height:1px;background:#da6357;z-index:4;pointer-events:none}
.schedule-now:before{content:"";position:absolute;width:6px;height:6px;border-radius:50%;top:-2.5px;left:0;background:#da6357}
.schedule-bottom{display:flex;align-items:center;gap:14px;padding:10px 2px;color:#8a928c;font-size:11px;flex-wrap:wrap}
.schedule-workspace .schedule-legend{padding:0;gap:10px;font-size:10px}
.legend-item{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.schedule-workspace .status-dot{margin:0;width:6px;height:6px;background:#1caf94}
.schedule-workspace .status-confirmed.status-dot{background:#178a70}
.schedule-workspace .status-arrived.status-dot{background:#4e93b0}
.schedule-workspace .status-completed.status-dot{background:#8c9b90}
.schedule-workspace .status-cancelled.status-dot{background:#a79b96}
.schedule-workspace .status-no_show.status-dot{background:#bd7765}
.schedule-help{margin-left:auto}
@media(max-width:1200px) and (min-width:761px){body:has(.schedule-workspace) .sidebar{width:220px}body:has(.schedule-workspace) .main-shell{margin-left:220px}.schedule-workspace .schedule-toolbar{gap:7px}.schedule-date-control{font-size:13px}.schedule-workspace .schedule-toolbar select{width:160px}.schedule-help{display:none}.schedule-workspace .schedule-scroll{max-height:calc(100dvh - 210px)}}
@media(max-width:760px){body:has(.schedule-workspace) .main-shell{margin-left:0}body:has(.schedule-workspace) .sidebar{width:248px}body:has(.schedule-workspace) .topbar{padding:0 12px}body:has(.schedule-workspace) #mainContent{padding:0 8px 8px}.schedule-workspace .schedule-toolbar{gap:7px;padding:6px 0 10px}.schedule-workspace .schedule-toolbar .spacer{display:none}.schedule-date-control{flex:1;font-size:13px;padding:3px 2px}.schedule-workspace .schedule-toolbar strong{order:initial;width:auto}.schedule-workspace .schedule-toolbar select{width:auto;max-width:none;flex:1;min-width:125px}.schedule-workspace .schedule-toolbar #scheduleDensity{flex:0 0 100px;min-width:100px;width:100px}.schedule-workspace .schedule-toolbar #newAppointment{margin-left:auto}.schedule-calendar-toggle{display:inline-flex}#scheduleMobileCalendar:not([hidden]){display:block;max-width:340px;margin:0 auto 12px;background:white;padding:14px;border:1px solid #e2e7e3;border-radius:12px}.schedule-workspace .schedule-scroll{max-height:calc(100dvh - 232px);min-height:260px}.schedule-workspace .schedule-staff-head{padding:12px 8px}.schedule-workspace .schedule-staff-head strong{font-size:13px}.schedule-workspace .schedule-time-head{min-height:72px}.schedule-workspace .schedule-panel{border-radius:12px}.schedule-workspace .schedule-legend{gap:8px}.schedule-bottom{gap:7px;font-size:10px}.schedule-help{display:none}}

.schedule-workspace .appointment-card.brief .appointment-service{display:none}
/* Keep the time band aligned with the actual start of every appointment. */
.schedule-workspace .appointment-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}
.schedule-workspace .appointment-card>*{flex-shrink:0}
.schedule-workspace .appointment-card .appointment-time{flex:0 0 19px}
.schedule-workspace .appointment-card.compact{flex-direction:row;align-items:center;justify-content:flex-start}
.schedule-workspace .appointment-card.compact .appointment-time{flex:0 0 auto}

/* Dated staff shifts and breaks */
.calendar-day{font-weight:400}
.calendar-day.has-shift{font-weight:800;color:#253c34}
.calendar-day.selected.has-shift{color:#303b37;background:#eacb78}
.calendar-day.outside.has-shift{color:#69796f}
.schedule-unavailable{position:absolute;left:0;right:0;background:repeating-linear-gradient(135deg,#eef0f2 0,#eef0f2 5px,#f6f7f8 5px,#f6f7f8 10px);color:#747f89;overflow:hidden;pointer-events:none}
.schedule-unavailable span{display:block;padding:4px 10px;font-size:11px}
.schedule-free-label{pointer-events:none}
.schedule-off-list{padding:12px 16px;background:#fff9ed;border:1px solid #e5d7b8;border-radius:8px;margin:10px 0}
.schedule-off-list summary{font-weight:600;cursor:pointer}
.schedule-off-list .button{margin:4px}
.shift-day-bar{display:flex;gap:12px;align-items:flex-end;margin-bottom:18px}
.shift-day-bar label{flex:1;max-width:260px}
.shift-layout{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:22px}
.shift-staff-list{display:flex;flex-direction:column;gap:8px}
.shift-staff-row{padding:12px;text-align:left;background:#f8faf9;border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.shift-staff-row.selected{border-color:var(--blue);background:#edf4f1}
.shift-staff-row strong,.shift-staff-row span{display:block}
.shift-staff-row span{font-size:12px;color:var(--muted);margin-top:5px}
.shift-layout h3{font-size:15px;margin:0 0 16px}
.shift-break-heading{display:flex;align-items:center;justify-content:space-between;margin:20px 0 12px}
.shift-break-heading h3{margin:0}
.shift-break-row{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-bottom:10px}
.shift-break-row .button{height:38px}
#shiftSummary{margin-top:14px;line-height:1.6}
#staffScheduleButton{white-space:nowrap}
@media(max-width:760px){.shift-layout{grid-template-columns:1fr}.shift-staff-list{max-height:170px;overflow:auto}.shift-break-row{gap:6px}.shift-break-row label{min-width:0}.shift-break-row input{min-width:0;width:100%}#staffScheduleButton{flex:1}}

.calendar-day:not(.has-shift){font-weight:400}
/* Mobile journal: one time axis, compact controls and a persistent week strip. */
.mobile-journal-header,.mobile-journal-dock,.mobile-new-appointment,.mobile-calendar-backdrop,.mobile-calendar-actions,.mobile-off-schedule,.mobile-time-label{display:none}
.schedule-workspace .appointment-card:not(.full) .appointment-phone{display:none}
.schedule-workspace .appointment-card:not(.full) .appointment-note{display:none}
.mobile-staff-picker,.mobile-menu-list,.mobile-off-list{display:flex;flex-direction:column;gap:9px}
.mobile-staff-picker button{display:flex;align-items:center;gap:12px;width:100%;padding:13px;border:1px solid var(--line);border-radius:10px;text-align:left;background:#fafbf9;color:var(--ink)}
.mobile-staff-picker button:first-child{display:block}.mobile-staff-picker button.selected{border-color:#2b806b;background:#edf5ef}
.mobile-staff-picker strong,.mobile-staff-picker small{display:block}.mobile-staff-picker strong{font-size:15px;line-height:1.4}.mobile-staff-picker small{font-size:12px;color:#7d8b81;margin-top:4px}
.mobile-menu-user{margin:0 0 18px;font-weight:600;font-size:16px}.mobile-menu-list .button{justify-content:space-between;text-align:left;min-height:46px}
.mobile-off-list .button{display:block;text-align:left;white-space:normal}.mobile-off-list .button span{display:block;font-size:12px;margin-top:4px}
@media(max-width:760px){
  body:has(.schedule-workspace){background:#fff;overflow:hidden}
  body:has(.schedule-workspace) .topbar{display:none}
  body:has(.schedule-workspace) .main-shell{margin:0;padding:0}
  body:has(.schedule-workspace) #mainContent{padding:0;min-height:0}
  .schedule-workspace{height:100dvh;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#fff}
  .schedule-workspace .schedule-toolbar,.schedule-workspace .schedule-bottom,.schedule-workspace .schedule-off-list{display:none}
  .mobile-journal-header{display:flex;align-items:center;gap:8px;padding:5px 10px 5px 14px;min-height:54px;flex:0 0 54px;border-bottom:1px solid #e4e8e5;background:#fff;z-index:12}
  .mobile-journal-header button{display:flex;align-items:center;justify-content:center;gap:9px;border:0;background:transparent;color:#323d36;min-height:44px;min-width:44px;border-radius:10px;padding:7px}
  .mobile-journal-header #mobileScheduleDate{margin-right:auto;padding-left:0;font-size:18px;font-weight:600;white-space:nowrap}
  #mobileScheduleDate>span{font-size:22px;color:#b89c54;margin-left:2px}
  .mobile-journal-header #mobileStaffFilter{background:#eef3ef;padding:8px 12px;font-size:17px}
  #mobileStaffFilter svg{color:#85988d}
  .schedule-workspace .schedule-panel{flex:1 1 auto;min-height:0;border:0;border-radius:0;overflow:hidden}
  .schedule-workspace .schedule-scroll{height:100%;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .schedule-workspace .schedule-scroll::-webkit-scrollbar{display:none}
  .schedule-timetable{--mobile-col-width:max(108px,calc((100vw - 52px)/var(--mobile-visible-columns)));width:100%;min-width:calc(52px + var(--staff-count)*var(--mobile-col-width))}
  .schedule-workspace .schedule-head,.schedule-workspace .schedule-body{grid-template-columns:52px minmax(0,1fr)}
  .schedule-workspace .schedule-time-head.right,.schedule-workspace .schedule-axis-right{display:none}
  .schedule-workspace .schedule-head{z-index:8}
  .schedule-workspace .schedule-time-head{min-height:82px;z-index:10;align-items:flex-start;padding-top:14px;box-shadow:1px 0 0 #fff}
  .mobile-new-appointment{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;background:transparent;color:#b2923e;font-size:36px;line-height:1;padding:0}
  .schedule-workspace .schedule-staff-heads,.schedule-workspace .schedule-lanes{grid-template-columns:repeat(var(--staff-count),minmax(var(--mobile-col-width),1fr))}
  .schedule-workspace .schedule-staff-head{padding:10px 4px 9px;gap:5px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;height:82px;border-right:0;text-align:center;overflow:hidden}
  .schedule-workspace .schedule-staff-head .avatar{width:31px;height:31px;min-width:31px;border-radius:50%;font-size:11px;flex:0 0 31px;background:#edf1eb;color:#738575}
  .schedule-staff-name{min-width:0;width:100%}
  .schedule-workspace .schedule-staff-head strong{display:block;font-size:13px;font-weight:550;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .schedule-workspace .schedule-staff-head small{font-size:10px;line-height:14px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#8a958d}
  .schedule-workspace .staff-booking-count{display:none}
  .schedule-workspace .schedule-axis{z-index:5;background:#fff;box-shadow:1px 0 0 #fff}
  .schedule-workspace .schedule-time{right:7px;padding-top:1px;font-size:10px;color:#9ba59e}
  .schedule-workspace .schedule-time.major{font-size:13px;font-weight:500;color:#3f4a43}
  .desktop-time-label{display:none}.mobile-time-label{display:inline}
  .schedule-workspace .schedule-lane{border-right:1px solid #f0f2ef}
  .schedule-free-label{font-size:11px;left:7px;white-space:nowrap}
  .schedule-unavailable span{padding:4px;font-size:10px}
  .schedule-workspace .appointment-card{border-radius:4px;line-height:1.25}
  .schedule-workspace .appointment-card .appointment-time{height:21px;flex:0 0 21px;padding:3px 15px 2px 3px;gap:0;font-size:10px;line-height:16px;overflow:hidden;text-overflow:ellipsis}
  .schedule-workspace .appointment-card .appointment-status{display:none}
  .schedule-workspace .appointment-card .appointment-patient{padding:3px 4px 1px;font-size:12px;line-height:15px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:550}
  .schedule-workspace .appointment-card .appointment-phone{display:block;font-size:10px;padding:1px 4px;line-height:13px;overflow:hidden;text-overflow:ellipsis}
  .schedule-workspace .appointment-card .appointment-service{padding:1px 4px;font-size:11px;line-height:14px;-webkit-line-clamp:3}
  .schedule-workspace .appointment-card .appointment-note{font-size:11px;padding:1px 4px;line-height:14px;white-space:normal}
  .schedule-workspace .appointment-card.brief .appointment-phone,.schedule-workspace .appointment-card.brief .appointment-service{display:none}
  .schedule-workspace .appointment-card.compact{flex-direction:column;align-items:stretch;padding:0}
  .schedule-workspace .appointment-card.compact .appointment-time{flex:0 0 17px;max-width:none;height:17px;padding:1px 3px;font-size:9px}
  .schedule-workspace .appointment-card.compact .appointment-patient{font-size:10px;line-height:12px;padding:1px 3px;-webkit-line-clamp:1}
  .schedule-workspace .appointment-card.compact .appointment-phone{display:none}
  .appointment-quick-add{width:17px;height:21px;line-height:19px;font-size:13px;right:0}
  .mobile-journal-dock{display:block;flex:0 0 auto;z-index:12;background:#fff;padding:7px 10px max(3px,env(safe-area-inset-bottom));box-shadow:0 -1px 8px #364b3910}
  .mobile-week-strip{display:flex;align-items:stretch;background:#303b37;border-radius:11px;padding:4px 2px;color:#e1e6e0}
  #mobileWeekDays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));flex:1;min-width:0;touch-action:pan-y}
  .mobile-week-strip button{border:0;background:transparent;color:inherit;min-width:0;padding:4px 1px;border-radius:8px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;min-height:48px}
  .mobile-week-strip button span{font-size:11px;text-transform:uppercase;line-height:13px;font-weight:500;color:#aeb9b0}
  .mobile-week-strip button strong{font-size:18px;line-height:21px;font-weight:500}
  .mobile-week-strip button.selected{background:#eacb78;color:#28352d}.mobile-week-strip button.selected span{color:#5e572f}
  .mobile-week-strip button.is-today:not(.selected) strong{text-decoration:underline;text-underline-offset:4px;color:#efda9d}
  .mobile-week-strip .mobile-week-arrow{font-size:22px;flex:0 0 20px;padding:0;min-width:20px;color:#bac5bd}
  .mobile-journal-nav{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding-top:5px}
  .mobile-journal-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;color:#8b958e;background:transparent;border:0;border-radius:8px;padding:3px 0;font-size:12px;font-weight:500}
  .mobile-journal-nav button.active{color:#315e4c}.mobile-journal-nav svg{width:23px;height:23px}
  .mobile-calendar-backdrop:not([hidden]){display:block;position:absolute;inset:54px 0 0;width:100%;height:calc(100% - 54px);background:#23372b38;z-index:20;border:0;border-radius:0}
  #scheduleMobileCalendar:not([hidden]){display:block;position:absolute;z-index:21;top:61px;left:12px;right:12px;width:auto;max-width:400px;margin:0 auto;padding:14px;background:#fff;border:1px solid #e0e7df;border-radius:14px;box-shadow:0 10px 35px #203b2930}
  .mobile-calendar-actions{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:14px}
  .mobile-calendar-actions button{border:0;background:#f1f4ef;border-radius:8px;min-width:36px;min-height:36px;font-size:24px;color:#536858}
  #scheduleMobileCalendar .calendar-day{height:38px;font-size:14px}
  .mobile-off-schedule{display:flex;justify-content:space-between;align-items:center;flex:0 0 35px;min-height:35px;font-size:12px;background:#fcf6e8;color:#807049;border:0;border-bottom:1px solid #e7dfcb;border-radius:0;padding:7px 12px}
  .mobile-off-schedule span{font-size:11px}
  body:has(.schedule-workspace) .toast{bottom:135px;z-index:30}
}
@media(max-width:359px){.mobile-journal-header{gap:4px;padding-inline:9px}.mobile-journal-header #mobileScheduleDate{font-size:16px}.mobile-journal-header #mobileStaffFilter{padding:7px}.mobile-journal-dock{padding-inline:5px}.mobile-week-strip .mobile-week-arrow{flex-basis:16px;min-width:16px}}
@media(max-width:760px){.mobile-week-strip button.has-shift strong{font-weight:800}}
