.oral-workspace{background:#fff;border:1px solid #dbe5e7;border-radius:8px;overflow:hidden;font-size:13px}.oral-workspace button,.oral-workspace select{font-size:12px;padding:7px 10px;border-radius:4px}.oral-header{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px;border-bottom:1px solid #dbe5e7;background:#fbfcfd}.oral-history{display:flex;align-items:center;gap:6px;min-width:0}.oral-history label{margin:0;white-space:nowrap}.oral-history select{width:230px;margin:0}.oral-header .actions{flex-wrap:nowrap}.oral-columns{display:grid;grid-template-columns:minmax(420px,1fr) minmax(380px,1fr);min-height:490px}.oral-chart-pane{border-right:1px solid #80b9bd;padding:14px;min-width:0;background:#fcfefe}.oral-chart-controls,.oral-scope-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px}.oral-chart-controls label{margin:0}.oral-chart-controls select{width:115px;margin:0}.oral-chart-controls .subtle{margin-left:auto;font-size:11px}.oral-scope-bar button{border:0;background:#edf6f6;color:#276a71;padding:5px 7px}.oral-chart-scroll{overflow-x:auto;border-top:1px solid #e9eff0;border-bottom:1px solid #e9eff0;padding:14px 0;background:white}.oral-arches{min-width:410px;max-width:750px;margin:auto}.oral-arches.is-empty{opacity:.35}.oral-arch{display:grid;grid-template-columns:repeat(16,minmax(0,1fr));gap:2px}.oral-arch.baby{grid-template-columns:repeat(10,minmax(0,1fr));width:62.5%;margin:4px auto}.oral-workspace button.oral-tooth{position:relative;display:flex;align-items:center;flex-direction:column;gap:3px;background:white;border:1px solid transparent;padding:2px 0;border-radius:4px;min-width:0;color:#63777c}.oral-tooth img{width:100%;height:61px;object-fit:contain;mix-blend-mode:multiply;pointer-events:none}.oral-arch.upper .oral-tooth img{transform:rotate(180deg)}.oral-arch.lower .oral-tooth{flex-direction:column-reverse}.oral-arch.baby .oral-tooth img{height:32px}.oral-tooth span{font-size:10px;line-height:17px;font-variant-numeric:tabular-nums}.oral-workspace .oral-tooth.recorded{background:#e7f4fb;border-color:#b9dae8;color:#175777}.oral-workspace .oral-tooth.selected{background:#c3ebe7;border-color:#237d79;color:#075d58;box-shadow:inset 0 0 0 1px #237d79}.oral-workspace .oral-tooth:focus-visible{outline:2px solid #157b77;outline-offset:1px}.oral-tooth small{position:absolute;right:0;top:0;font-size:9px;color:#0e6677;font-weight:700}.oral-midline{display:flex;justify-content:space-between;border-top:1px solid #d8e6e7;margin:6px 0;font-size:10px;color:#7b9097}.oral-selection{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0;min-height:35px}.oral-selection span{max-width:75%;overflow-wrap:anywhere;font-size:12px;color:#476970}.oral-selection button{white-space:nowrap}.oral-notes{font-size:12px;margin:10px 0}.oral-notes textarea{min-height:72px;max-height:220px;font-size:13px;background:#fff}.oral-notes textarea[readonly]{background:#f8fafb}.oral-chart-caption{font-size:11px;color:#73898d;margin-bottom:0}.oral-empty-chart{text-align:center;padding:12px 0;color:#59777e}.oral-empty-chart p{font-size:12px;color:#81969a}.oral-diagnosis-pane{padding:14px;min-width:0}.oral-diagnosis-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}.oral-diagnosis-title h2{font-size:15px;margin:0 auto 0 0;white-space:nowrap}.oral-diagnosis-title h2 small{font-size:11px;font-weight:400;color:#71878b}.oral-diagnosis-title select{width:120px;margin:0}.oral-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.oral-filters select{width:100px;margin:0}.oral-filters label{display:flex;align-items:center;gap:5px;margin:0;font-size:12px;white-space:nowrap}.oral-filters input,.oral-surfaces input{width:auto;margin:0}.oral-filters button{margin-left:auto}.oral-empty-list{text-align:center;padding:85px 12px;color:#688289}.oral-empty-list strong{font-size:15px}.oral-empty-list p{font-size:12px}.oral-diagnosis-group{border:1px solid #e1e9eb;margin-bottom:9px;border-radius:5px;overflow:hidden}.oral-diagnosis-group>summary{padding:10px;background:#f4f8f9;color:#31555e}.oral-diagnosis-group>summary small{font-size:11px;margin-left:6px;color:#71868a}.oral-diagnosis-group table{font-size:12px;min-width:500px}.oral-diagnosis-group td,.oral-diagnosis-group th{padding:8px 6px}.oral-diagnosis-group td strong{font-weight:600}.oral-diagnosis-group td small{display:block;color:#688187;font-size:10px;margin-top:3px}.oral-diagnosis-group td p{margin:4px 0;color:#71868a}.oral-diagnosis-group td:first-child input{width:14px}.oral-diagnosis-group td button{padding:4px 6px;font-size:11px;margin:2px}.oral-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;background:#f8fbfb;border-top:1px solid #dbe5e7}.oral-footer small{display:block;color:#7b8e92;font-size:11px;margin-top:4px}.oral-footer .actions{flex-wrap:wrap}.oral-save-state{font-size:12px;color:#32776e}.oral-save-state.warning{padding:3px 6px;background:#fff1d7;color:#976015;border:0}.oral-surfaces{border:1px solid #dbe5e7;border-radius:6px;display:flex;flex-wrap:wrap;gap:14px;padding:12px}.oral-surfaces label{display:flex;gap:4px;align-items:center;margin:0}.oral-diagnosis-location{background:#eff7f7;padding:12px;overflow-wrap:anywhere}.oral-diagnosis-location p{font-size:12px;color:#71868a;margin:6px 0 0}#oral-error{margin:0;padding:0 14px}#oral-error:not(:empty){padding:10px 14px}.oral-expanded{position:fixed;inset:12px;z-index:20;background:#fff;overflow:auto;box-shadow:0 6px 35px #173c4933}.oral-expanded .oral-columns{min-height:calc(100vh - 155px)}
@media(max-width:1180px){.oral-columns{grid-template-columns:1fr}.oral-chart-pane{border-right:0;border-bottom:1px solid #80b9bd}.oral-arches{max-width:700px}.oral-empty-list{padding:35px 10px}.oral-header{flex-wrap:wrap}.oral-diagnosis-group table{min-width:500px}}@media(max-width:650px){.oral-history{flex-wrap:wrap;width:100%}.oral-history select{flex:1;width:auto;min-width:170px}.oral-header .actions{width:100%;justify-content:flex-end}.oral-chart-pane,.oral-diagnosis-pane{padding:10px}.oral-footer{align-items:flex-start;flex-direction:column}.oral-footer .actions{justify-content:flex-start}.oral-chart-scroll{margin:0 -5px}.oral-diagnosis-title{flex-wrap:wrap}.oral-expanded{inset:0}.oral-selection span{max-width:65%}}

/* Keep the clinic name legible in the existing desktop and mobile brand bar. */
.brand{font-size:23px;letter-spacing:0;line-height:1.45}.brand small{font-size:11px;letter-spacing:2px}

.oral-chart-wrap{position:relative}.oral-chart-wrap .oral-empty-chart{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px;pointer-events:none;color:#38555d}.oral-empty-chart strong{font-size:16px}.oral-empty-chart p{margin:8px 0;color:#5e7880}.oral-selection[hidden]{display:none}.oral-empty-table table{min-width:500px;font-size:11px}.oral-empty-table th{padding:8px 6px}

.oral-diagnosis-group table{min-width:600px}.oral-diagnosis-group th{white-space:nowrap}.oral-diagnosis-group th:first-child{min-width:32px}.oral-diagnosis-group th:last-child{min-width:64px}

.oral-header .actions{flex-wrap:wrap;justify-content:flex-end}
.oral-search{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:4px}
.oral-search>label:first-child{margin:0;font-size:12px}
.oral-search input[type=search]{flex:1;min-width:155px;width:auto;padding:7px 9px;font-size:12px}
.oral-search .oral-selected-filter{display:flex;align-items:center;gap:5px;margin:0;font-size:12px;white-space:nowrap}
.oral-search input[type=checkbox]{width:auto;margin:0}
.oral-filter-status{font-size:11px;color:#607f84;line-height:1.6;margin:8px 0}
.oral-filter-status:empty{display:none}
dialog.oral-dialog{width:min(880px,96vw)}
.oral-edit-location{margin-top:10px}
.oral-edit-location summary{color:#176e69;font-weight:600}
.oral-edit-location .quadrant-teeth{flex-wrap:wrap}
.oral-edit-location .quadrant-teeth button{min-width:31px;min-height:34px;padding:4px}
.oral-edit-location .dentition h3{font-size:13px;margin:12px 0 4px}
.oral-edit-location #oral-modal-clear{margin-top:10px;font-size:12px}
.oral-diagnosis-location{overflow-wrap:anywhere}
dialog.oral-dialog #modal-form>.actions,dialog.oral-compare-dialog #modal-form>.actions{position:sticky;bottom:-26px;z-index:2;padding:14px 0 5px;background:#fff;border-top:1px solid #dbe5e7}
dialog.oral-compare-dialog{width:min(1120px,96vw)}
.oral-compare-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.oral-compare-card{min-width:0;border:1px solid #dbe5e7;border-radius:7px;padding:16px;overflow-wrap:anywhere}
.oral-compare-card header{border-bottom:1px solid #dbe5e7;margin-bottom:12px;padding-bottom:8px}
.oral-compare-card h3{margin:0;font-size:18px}
.oral-compare-card h4{font-size:13px;margin:16px 0 8px}
.oral-compare-card p{font-size:12px;line-height:1.7;margin:5px 0}
.oral-compare-card header p,.oral-compare-meta{color:#688187}
.oral-compare-notes{background:#f5f9f9;padding:10px;border-radius:5px}
.oral-compare-diagnosis{padding:12px 0;border-bottom:1px solid #edf1f2}
.oral-compare-diagnosis>strong{font-size:14px}
.oral-compare-diagnosis dl{display:grid;grid-template-columns:65px minmax(0,1fr);gap:7px;margin:8px 0;font-size:12px}
.oral-compare-diagnosis dt{color:#688187}.oral-compare-diagnosis dd{margin:0}
@media(max-width:650px){.oral-search>input[type=search]{min-width:180px}.oral-compare-grid{grid-template-columns:1fr}.oral-compare-card{padding:12px}.oral-edit-location .quadrants{grid-template-columns:1fr}.oral-edit-location .quadrant-teeth{gap:4px}dialog.oral-dialog #modal-form>.actions,dialog.oral-compare-dialog #modal-form>.actions{bottom:-18px}}

/* Keep the first usable action visible within the empty tooth chart. */
.oral-start-card{background:rgba(255,255,255,.96);border:1px solid #bededb;border-radius:8px;padding:17px 20px;max-width:100%;box-shadow:0 3px 16px #214e4a14}
.oral-start-card button{pointer-events:auto;min-height:42px;font-size:14px;padding:10px 22px;margin:4px 0}
.oral-start-card small{display:block;margin-top:6px;font-size:11px;color:#587c78}
.oral-arches.is-empty{opacity:.6}
.oral-arches.is-empty .oral-tooth:not(:disabled){cursor:pointer}
.oral-arches.is-empty .oral-tooth:not(:disabled):hover{background:#d9f1ec;border-color:#237d79}
@media(max-width:650px){.oral-start-card{padding:12px}.oral-start-card strong{font-size:15px}}

/* Selection and save actions remain within reach while editing. */
.oral-workspace{overflow:visible}
.oral-header{border-radius:8px 8px 0 0}
.oral-footer{position:sticky;bottom:0;z-index:8;box-shadow:0 -4px 16px #23495112;border-radius:0 0 8px 8px;flex-wrap:wrap}
.oral-expanded{isolation:isolate}
.oral-selection{margin:8px 0 5px}
.oral-selection button{min-height:38px}
.oral-selected-teeth{display:flex;flex-wrap:wrap;gap:5px;max-height:85px;overflow:auto;margin:0 0 9px}
.oral-selected-teeth:empty{display:none}
.oral-selected-teeth button{background:#e6f5f1;border-color:#9ccdc5;color:#195e55;min-width:42px;min-height:32px;padding:4px 8px}
.oral-quick-teeth{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:12px}
.oral-quick-teeth label{font-size:12px;margin:0}
.oral-quick-teeth input{flex:1;min-width:100px;width:auto;padding:7px 9px;margin:0;font-size:13px}
.oral-quick-teeth button{min-height:35px}
.oral-quick-teeth small{flex-basis:100%;font-size:11px;color:#58747a}
#oral-tooth-error{flex-basis:100%;margin:0;font-size:12px}
#oral-tooth-error:empty{display:none}
.oral-extra-fields{border:1px solid #dce6e7;padding:10px 12px;border-radius:6px}
.oral-extra-fields summary{cursor:pointer;color:#376269;font-size:13px}
.oral-extra-fields>.grid{padding-top:12px}
.oral-form-tip{margin:0;font-size:11px}
.oral-diagnosis-group table,.oral-empty-table table{min-width:0;width:100%;table-layout:fixed}
.oral-diagnosis-group th,.oral-diagnosis-group td,.oral-empty-table th{overflow-wrap:anywhere;white-space:normal}
.oral-diagnosis-group th:first-child,.oral-empty-table th:first-child{width:30px;min-width:0}
.oral-diagnosis-group th:nth-child(2),.oral-empty-table th:nth-child(2){width:76px}
.oral-diagnosis-group th:nth-child(4),.oral-empty-table th:nth-child(4){width:47px}
.oral-diagnosis-group th:nth-child(5),.oral-empty-table th:nth-child(5){width:58px}
.oral-diagnosis-group th:last-child,.oral-empty-table th:last-child{width:60px;min-width:0}
.oral-diagnosis-group td button{min-height:30px;margin:3px 0}
.oral-diagnosis-group .badge{white-space:normal}
@media(max-width:650px){.oral-footer{bottom:0;padding:9px;gap:7px}.oral-footer .actions{gap:5px}.oral-footer button{padding:7px;min-height:36px}.oral-quick-teeth input{min-width:120px}.oral-diagnosis-group th:nth-child(2),.oral-empty-table th:nth-child(2){width:57px}.oral-diagnosis-group th:nth-child(5),.oral-empty-table th:nth-child(5){width:48px}.oral-diagnosis-group th:last-child,.oral-empty-table th:last-child{width:44px}.oral-diagnosis-group td,.oral-diagnosis-group th,.oral-empty-table th{padding:7px 3px}}

#toast.oral-toast{top:16px;bottom:auto}
.oral-diagnosis-group th:nth-child(4),.oral-empty-table th:nth-child(4){width:54px}
.oral-diagnosis-group td:nth-child(4) .badge{padding:3px 4px;white-space:nowrap;font-size:11px}

@media(max-width:720px){.oral-footer{bottom:calc(54px + env(safe-area-inset-bottom))}.oral-expanded .oral-footer{bottom:0}}

.oral-expanded{z-index:40}
