.dental-editor,.dental-history{--dental-teal:#087f82;--dental-line:var(--border-strong,#d8e6e7);--dental-bg:var(--surface-1,#fff);color:var(--text-primary,#193747);font:14px/1.5 Inter,'Segoe UI',sans-serif;min-width:0}
.dental-branch-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}.dental-branch-metrics>div{padding:20px;border:1px solid var(--dental-line);border-radius:12px;background:var(--surface-2,#f4f9fa)}.dental-branch-metrics strong,.dental-branch-metrics span{display:block}.dental-branch-metrics strong{font-size:28px;color:var(--dental-teal)}.dental-branch-metrics span{font-size:12px;color:var(--text-secondary,#657b82);margin-top:4px}.dental-branch-search{display:block;font-size:13px;margin-bottom:20px}.dental-branch-search input{display:block;width:min(100%,460px);padding:12px;border:1px solid var(--dental-line);border-radius:9px;margin-top:7px;background:var(--dental-bg);color:inherit}
@media(max-width:600px){.dental-branch-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dental-editor [hidden],.dental-history [hidden]{display:none!important}
.dental-editor{grid-column:1/-1;margin:18px 0;border:1px solid var(--dental-line);border-radius:20px;background:linear-gradient(145deg,#fff 0%,#fff 64%,#eefafa 100%);overflow:hidden;box-shadow:0 18px 50px rgba(4,73,91,.08);position:relative}
.dental-editor:after{content:"";position:absolute;right:-70px;top:100px;width:280px;height:340px;border:24px solid rgba(15,181,176,.035);border-radius:48% 48% 42% 42%;transform:rotate(-12deg);pointer-events:none}
.dental-enable{display:flex!important;align-items:center;gap:12px;padding:20px;background:var(--surface-2,#f0f8f7);cursor:pointer}
.dental-enable input{width:20px!important;height:20px;accent-color:var(--dental-teal)}
.dental-enable strong,.dental-enable small{display:block}.dental-enable strong{font-size:17px}.dental-enable small{color:var(--text-secondary,#657b82);margin-top:3px;font-weight:400}
[data-dental-body]{padding:22px;position:relative;z-index:1}.dental-heading{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:22px}.dental-heading span{font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--dental-teal);display:flex;align-items:center;gap:7px}.dental-heading h3,.dental-heading h2{margin:5px 0;font-size:24px;line-height:1.25}.dental-heading p{margin:7px 0;color:var(--text-secondary,#657b82);font-size:12px}.dental-heading>label{min-width:160px}.dental-brand-icon{width:28px;height:28px;fill:#14b8b1;stroke:#07868a;stroke-width:1}.dental-heading .dental-brand-icon{width:18px;height:18px}.dental-enable>.dental-brand-icon{width:38px;height:38px;flex:0 0 auto}
.dental-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:24px}.dental-layout>section{min-width:0}.dental-editor label{display:block;font-size:12px;font-weight:600;margin-bottom:12px}.dental-editor input:not([type=checkbox]),.dental-editor textarea,.dental-editor select,.dental-history select{display:block;width:100%;padding:10px 11px;margin-top:5px;border:1px solid var(--dental-line);border-radius:8px;background:var(--dental-bg);color:inherit;font:inherit;box-sizing:border-box;min-width:0}.dental-editor textarea{resize:vertical}.dental-editor label small{display:block;font-weight:400;margin-top:5px;color:var(--text-secondary,#657b82)}
.dental-chart-block{border:1px solid var(--dental-line);border-radius:14px;padding:14px 8px;background:var(--surface-2,#f7fbfc);margin-bottom:14px}.dental-chart-block h4{margin:0 0 10px;text-align:center;font-size:13px}.dental-orientation{display:flex;justify-content:space-between;direction:ltr;padding:0 12px;font-size:10px;color:var(--text-secondary,#657b82)}
.dental-arch{position:relative;width:100%;aspect-ratio:620/560;min-height:0}.dental-gums{position:absolute;inset:0;width:100%;height:100%;fill:#f5c4c9;opacity:.8}.dental-jaw-label{position:absolute;left:0;right:0;text-align:center;color:#a2606c;font-size:11px;pointer-events:none}.dental-jaw-label.upper{top:38%}.dental-jaw-label.lower{top:59%}
.dental-tooth{position:absolute!important;transform:translate(-50%,-50%);width:6.2%;height:10.5%;padding:0!important;min-width:0!important;min-height:0!important;border:0!important;background:none!important;box-shadow:none!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:#566d7e!important;border-radius:8px!important}
.dental-tooth svg{width:100%;height:78%;overflow:visible;fill:#fff;stroke:#a6b6bf;stroke-width:1.7}.dental-tooth .tooth-fissure{fill:none;stroke:#c3cdd3;stroke-width:1}.dental-tooth span{font:bold clamp(8px,1vw,11px)/1.1 'Segoe UI',sans-serif}.dental-tooth:hover svg{fill:#e2f6f2}.dental-tooth.selected svg{fill:#a1e9da;stroke:#007d70;stroke-width:3}.dental-tooth.selected span{color:#007d70}.dental-tooth:focus-visible{outline:3px solid #006bbb!important;outline-offset:3px}
.dental-tooth.mark-caries svg,.dental-tooth.mark-fracture svg{fill:#ffe1d8;stroke:#c36045}.dental-tooth.mark-restored svg,.dental-tooth.mark-crowned svg,.dental-tooth.mark-root_treated svg,.dental-tooth.mark-implant svg{fill:#d8eaff;stroke:#3f7eae}.dental-tooth.mark-missing svg{fill:none;stroke:#8b9599;stroke-dasharray:3 2}.dental-tooth.mark-impacted svg,.dental-tooth.mark-mobility svg{fill:#f6e7ff;stroke:#916caa}.dental-tooth.mark-sound svg,.dental-tooth.mark-completed svg{fill:#d9f5e3;stroke:#509b6d}.dental-tooth.mark-planned svg{fill:#fff2cb;stroke:#b19745}.dental-tooth.selected svg{stroke:#007d70;stroke-width:3}
.dental-selected{font-size:12px;min-height:24px;color:var(--dental-teal);font-weight:700}.dental-chart-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.dental-editor button:not(.dental-tooth),.dental-history button:not(.dental-tooth){border:1px solid var(--dental-line);border-radius:8px;padding:9px 12px;background:var(--dental-bg);color:inherit;font-size:12px;cursor:pointer;min-height:36px}.dental-editor .dental-primary,.dental-history .dental-primary{background:var(--dental-teal)!important;color:#fff!important;border-color:var(--dental-teal)!important}
.dental-treatment-form{background:var(--surface-2,#f5f9fa);border:1px solid var(--dental-line);border-radius:14px;padding:18px;align-self:start}.dental-treatment-form h4,.dental-recorded h4{margin:0 0 16px;font-size:16px}.dental-field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dental-surfaces{border:0;padding:0;margin:8px 0 14px;display:flex;flex-wrap:wrap;gap:7px}.dental-surfaces legend{font-size:12px;margin-bottom:9px}.dental-surfaces label{display:flex;align-items:center;gap:4px;border:1px solid var(--dental-line);padding:6px;border-radius:6px;font-size:10px;margin:0;background:var(--dental-bg)}.dental-surfaces input,.dental-periodontal input[type=checkbox]{width:auto!important;accent-color:var(--dental-teal)}
.dental-message{color:var(--text-danger,#ab342e);margin-top:12px;font-size:12px}.dental-help{font-size:12px;color:var(--text-secondary,#657b82);line-height:1.7}.dental-recorded{margin-top:24px}.dental-treatment-row{display:flex;align-items:start;gap:14px;border:1px solid var(--dental-line);padding:14px;border-radius:10px;margin:10px 0;background:var(--dental-bg)}.dental-treatment-row>div:first-child{flex:1;min-width:0}.dental-treatment-row strong,.dental-treatment-row small{display:block}.dental-treatment-row strong{font-size:13px}.dental-treatment-row small{font-size:11px;color:var(--text-secondary,#657b82);margin:4px 0}.dental-treatment-row p{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0}.dental-treatment-row>div:last-child button{padding:5px 8px;margin:0 3px 4px 0}.dental-status{border-radius:20px;padding:5px 9px;font-size:10px;white-space:nowrap;background:#fff1ce;color:#846924}.dental-status.status-completed{background:#dbf4e5;color:#237347}.dental-status.status-in_progress{background:#e0eefb;color:#2a6b96}.dental-status.status-cancelled{background:#f1eeee;color:#746b6b}
.dental-clinical-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}.dental-periodontal{border:1px solid var(--dental-line);padding:16px;border-radius:10px;margin-top:20px}.dental-periodontal summary{font-weight:700;cursor:pointer}.dental-periodontal p{font-size:12px;color:var(--text-secondary,#657b82)}.dental-pocket-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.dental-history{padding:24px;margin:20px 0;border:1px solid var(--dental-line);border-radius:16px;background:var(--dental-bg)}.dental-history-layout{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr);gap:24px}.dental-history [data-history-entries]{max-height:620px;overflow:auto}.dental-history select{width:auto}.authClinicChoices{flex-wrap:wrap}
@media(max-width:900px){.dental-layout,.dental-history-layout{grid-template-columns:1fr}.dental-chart-block{max-width:550px;margin-inline:auto}.dental-history{padding:18px}.dental-tooth span{font-size:10px}}
@media(max-width:500px){[data-dental-body]{padding:14px}.dental-heading{display:block}.dental-heading h3,.dental-heading h2{font-size:21px}.dental-clinical-fields,.dental-field-pair{grid-template-columns:1fr}.dental-treatment-row{flex-wrap:wrap}.dental-pocket-grid{grid-template-columns:repeat(3,1fr)}.dental-tooth span{font-size:8px}.dental-arch{min-width:260px}.dental-chart-block{overflow:auto}}

.dental-visit-notes details{border-top:1px solid var(--dental-line);padding:16px 0}.dental-visit-notes summary{cursor:pointer;font-weight:600}.dental-visit-notes p{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}

/* Visual surface chart and Ayada Dental identity */
.dental-surface-selector{margin:18px 0;padding:18px;border:1px solid #cfe7e8;border-radius:16px;background:linear-gradient(145deg,#f8ffff,#edf9f9)}
.dental-surface-copy span{display:block;color:#07868a;font-size:10px;font-weight:800;letter-spacing:.12em}.dental-surface-copy strong,.dental-surface-copy small{display:block}.dental-surface-copy strong{font-size:15px;margin-top:3px}.dental-surface-copy small{color:var(--text-secondary,#657b82);font-size:11px;margin-top:3px}
.dental-surface-workspace{display:grid;grid-template-columns:150px 1fr;gap:18px;align-items:center;margin-top:16px}.dental-surface-map{position:relative;width:146px;height:146px;border-radius:45%;background:#fff;box-shadow:0 8px 24px rgba(8,127,130,.1);overflow:hidden;border:1px solid #cbdfe1}.dental-surface-map button{position:absolute!important;margin:0!important;padding:0!important;min-height:0!important;border:1px solid #bad0d3!important;background:#f7fbfb!important;color:#315467!important;font-weight:800!important}.dental-surface-map .surface-b{left:29px;top:8px;width:88px;height:44px;border-radius:50% 50% 12px 12px}.dental-surface-map .surface-l{left:29px;bottom:8px;width:88px;height:44px;border-radius:12px 12px 50% 50%}.dental-surface-map .surface-m{left:8px;top:29px;width:44px;height:88px;border-radius:50% 12px 12px 50%}.dental-surface-map .surface-d{right:8px;top:29px;width:44px;height:88px;border-radius:12px 50% 50% 12px}.dental-surface-map .surface-o{left:48px;top:48px;width:50px;height:50px;border-radius:16px;z-index:2}.dental-surface-map button.is-selected{background:#16b9b1!important;border-color:#087f82!important;color:#fff!important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.45)}
.dental-surface-list{display:grid;gap:6px}.dental-surface-list button{display:flex!important;align-items:center;gap:9px;text-align:start;background:#fff!important;padding:7px 9px!important;min-height:34px!important}.dental-surface-list button b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#eef8f8;color:#087f82}.dental-surface-list button.is-selected{border-color:#10aaa7!important;background:#e9fbfa!important;color:#056e72}.dental-surface-list button.is-selected b{background:#10aaa7;color:#fff}
.dental-legend{display:flex;flex-wrap:wrap;gap:12px;padding:12px;margin:14px 0;border:1px solid var(--dental-line);border-radius:12px;background:#fff}.dental-legend span{display:flex;align-items:center;gap:6px;font-size:10px}.dental-legend span:before{content:"";width:12px;height:12px;border-radius:50%;border:1px solid rgba(0,0,0,.08)}.legend-sound:before{background:#d9f5e3}.legend-caries:before{background:#ef756d}.legend-restored:before{background:#24b8ba}.legend-planned:before{background:#8cc8ff}.legend-completed:before{background:#48bf70}
.dental-recorded{padding:18px;border:1px solid var(--dental-line);border-radius:14px;background:#fff}.dental-recorded-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.dental-recorded-heading>strong{color:#087f82;font-size:13px}.dental-row-price{white-space:nowrap;color:#274e61;font-size:12px}
#navDental:before{content:"🦷";color:#12aaa7;margin-inline-end:7px;font-size:16px;filter:saturate(.85)}
@media(max-width:500px){.dental-surface-workspace{grid-template-columns:1fr}.dental-surface-map{margin-inline:auto}.dental-recorded-heading{align-items:flex-start;flex-direction:column}}
