
:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#142033;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:#eef2f8}button,input,textarea{font:inherit}button{cursor:pointer;border:0}#app{max-width:480px;min-height:100dvh;margin:auto;background:#f7f9fc;display:flex;flex-direction:column}.head{background:white;border-bottom:1px solid #e3e9f1;padding:18px;display:flex;align-items:center;justify-content:space-between}.brand{font-size:21px;font-weight:850}.brand:before{content:'▰';color:#1749df;margin-right:7px}.body{flex:1;padding:18px 16px 95px}.nav{position:sticky;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);background:white;border-top:1px solid #dfe6f0}.nav button{padding:13px 4px;background:white;color:#54647b;font-size:12px}.nav button.active{color:#1749df;font-weight:800}.card{background:white;border:1px solid #e1e7f0;border-radius:14px;padding:16px;margin:12px 0}.title{font-size:25px;font-weight:850;margin:5px 0 9px}.muted{color:#56677d;font-size:12px;line-height:1.5}.label{font-size:11px;font-weight:800;color:#4d6077;display:block;margin:15px 0 7px}.field{width:100%;border:1px solid #b9c6d6;border-radius:10px;padding:12px;background:white;color:#122039;-webkit-text-fill-color:#122039;font-weight:600;outline:none}.field::placeholder{color:#8996a7;-webkit-text-fill-color:#8996a7;font-weight:400}.field:focus{border-color:#1749df}.btn{background:#1749df;color:white;font-weight:800;padding:13px 15px;border-radius:10px}.btn2{background:#e9f0ff;color:#1749df;font-weight:750;padding:12px;border-radius:10px}.wide{width:100%}.row{display:flex;justify-content:space-between;align-items:center;gap:10px}.item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;background:white;border-bottom:1px solid #e7edf4;padding:13px 0;color:#17253a}.item:last-child{border-bottom:0}.price,.metric{font-weight:900;color:#101c30}.price{white-space:nowrap}.metric{font-size:33px}.pills{display:flex;gap:7px;overflow:auto;padding:10px 0}.pill{background:#e8eef6;color:#253b56;border-radius:22px;padding:9px 12px;font-size:11px;font-weight:750;white-space:nowrap}.pill.active{background:#dbe8ff;color:#1749df}.check{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:2px solid #9eafc2;background:white;border-radius:5px;flex-shrink:0;color:transparent;font-weight:900}.check.on{background:#1749df;border-color:#1749df;color:white}.overlay{position:fixed;inset:0;background:#13213c99;display:flex;align-items:flex-end;justify-content:center;z-index:5}.sheet{width:min(480px,100%);max-height:85dvh;overflow:auto;background:white;border-radius:20px 20px 0 0;padding:20px 16px 28px}.hidden{display:none!important}.detail{display:grid;grid-template-columns:105px 1fr;gap:10px;border-bottom:1px solid #e9edf4;padding:10px 0;font-size:12px}.detail b{overflow-wrap:anywhere}.detail span{color:#53657a}.swatch{display:inline-block;width:24px;height:24px;border-radius:6px;border:1px solid #b4c0ce;flex-shrink:0}.colorbtn{display:flex;align-items:center;gap:12px;background:white;width:100%;padding:11px;border:1px solid #e1e7f0;border-radius:10px;margin:6px 0;text-align:left;font-weight:750;color:#16243a}.colorbtn.active{background:#edf3ff;border-color:#1749df}.tooth{cursor:pointer}.tooth rect{fill:white;stroke:#a6b3c3;stroke-width:2}.tooth text{fill:#233750;font-size:10px;text-anchor:middle;font-weight:750;pointer-events:none}.tooth.ring rect{fill:#dce9ff;stroke:#1749df}.tooth.support rect{fill:#d8f4e6;stroke:#1a9b69}.tooth.both rect{fill:#e8dfff;stroke:#8754cb}.tooth.pending rect{fill:#fff0d9;stroke:#ef8a30}.beam{stroke:#ef8a30;stroke-width:5;stroke-linecap:round}.tag{background:#e6eeff;color:#1743bd;padding:5px 9px;border-radius:15px;font-size:11px;font-weight:800}.error{color:#ae3030;font-size:12px}h3{font-size:14px;margin:17px 0 7px}@media(min-width:500px){#app{box-shadow:0 5px 30px #10204012}}

/* Responsive doctor web layout: original mobile visual retained below 850 px */
#app{width:100%}#app .body{min-width:0}#app button:focus-visible,#app input:focus-visible,#app textarea:focus-visible,#app svg g:focus-visible{outline:3px solid #86a7ff;outline-offset:3px}
.notice{border:1px solid #cfdef5;background:#eff5ff;border-radius:11px;padding:12px;color:#435e86;font-size:12px;line-height:1.6;margin:12px 0}
.extra-line{display:flex;align-items:center;gap:8px;border-bottom:1px solid #e6edf5}.extra-line .item{border:0}.extra-count{width:65px;flex:0 0 65px;text-align:center;padding:9px 4px}.extra-select .price{margin:0 6px;font-size:12px}
#modal .sheet{box-shadow:0 12px 42px #0b23502b}#modal .sheet>div.row:first-child{margin-bottom:6px}
.btn:disabled,.btn2:disabled{opacity:.5;cursor:not-allowed}
@media(min-width:850px){body{background:#eff3f9}#app{display:grid;max-width:1480px;min-height:100vh;margin:auto;grid-template-columns:235px minmax(0,1fr);grid-template-rows:76px minmax(0,1fr);grid-template-areas:'head head' 'nav body';background:#f6f8fc;box-shadow:0 12px 60px #11223b10}.head{grid-area:head;padding:20px 34px}.brand{font-size:26px}.body{grid-area:body;max-width:100%;padding:32px 42px 70px;min-width:0;overflow:auto}.nav{grid-area:nav;position:sticky;top:0;bottom:auto;align-self:stretch;height:calc(100vh - 76px);display:flex;flex-direction:column;gap:6px;padding:18px 12px;background:white;border-right:1px solid #e3e9f1;border-top:0}.nav button{flex:none;border-radius:9px;padding:15px 16px;font-size:14px;text-align:left}.nav button.active{background:#eaf0ff}.title{font-size:32px}.body>.card{max-width:900px}.body>.notice{max-width:920px}.body>.row{max-width:920px}.body>.btn.wide{max-width:440px}.sheet{border-radius:16px;width:min(680px,94vw);padding:28px}.overlay{align-items:center}.body #stage{max-width:820px}.body #stage>.card{max-width:900px}.body .pills{max-width:930px}.body .label{font-size:12px}.body .muted{font-size:13px}.body #stage .row{max-width:800px}.body #next{max-width:800px}.body #preview{max-width:400px}.body .detail{grid-template-columns:180px 1fr}.metric{font-size:38px}}
@media(min-width:1150px){.body{padding-left:62px;padding-right:62px}.body>.card{max-width:970px}.statsrow{max-width:780px}.body #stage{max-width:970px}}
@media(min-width:850px){#app:has(.nav.hidden){grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'body'}#app:has(.nav.hidden) .body{width:100%;max-width:1080px;margin:0 auto}}
@media(max-width:380px){.body{padding:14px 12px 90px}.item{gap:6px}.price{font-size:12px}.sheet{padding:18px 12px}.extra-count{width:56px;flex-basis:56px}}

/* Unior Lab 0.7.4 — compact post-submit materials and cancellation flow */
.doctor-order-status{margin:12px 0;align-items:center}
.doctor-cancel-card{margin:15px 0;padding:16px;border:1px solid #f0d8d9;border-radius:13px;background:#fffafa}
.doctor-cancel-card p{margin:5px 0 12px;font-size:12px;line-height:1.5}
.doctor-cancel-card #cancel-form{margin-top:13px}
.doctor-cancel-card .row{display:flex;gap:9px;margin-top:10px}
.doctor-cancel-card .row button{flex:1}
.danger-outline{background:#fff;border:1px solid #e7b9bd;color:#a43e49;border-radius:10px;padding:9px 13px;font-weight:750}
.doctor-cancelled-note{border-color:#f0d1d4;background:#fff5f5;color:#9e4650}
.doctor-material-intro{margin:12px 0}
.doctor-material-card{margin:12px 0}
.doctor-material-card h3{font-size:14px}
.doctor-material-card .row{align-items:center;gap:10px}
.doctor-material-card .ul-material-box{margin-top:12px}
.doctor-material-card .field{margin-top:9px}
.doctor-mail-compact{margin:12px 0;border:1px solid #e4eaf2;border-radius:12px;background:#fff;overflow:hidden}
.doctor-mail-compact summary{list-style:none;cursor:pointer;padding:14px 15px;font-size:12px;font-weight:750;color:#425774;display:flex;align-items:center;justify-content:space-between}
.doctor-mail-compact summary::-webkit-details-marker{display:none}
.doctor-mail-compact summary:after{content:'＋';font-size:16px;color:#3563e9}
.doctor-mail-compact[open] summary:after{content:'−'}
.doctor-mail-compact[open] summary{background:#f8faff;border-bottom:1px solid #e4eaf2}
.doctor-mail-body{padding:13px 15px}
.doctor-mail-body .field{margin-top:9px}
.doctor-material-finish{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:15px 0 28px}
.doctor-material-finish .btn,.doctor-material-finish .btn2{width:100%;margin:0}
@media(max-width:480px){.doctor-material-finish{grid-template-columns:1fr}.doctor-cancel-card{padding:13px}.doctor-cancel-card .row{flex-direction:column}.doctor-cancel-card .row button{width:100%}}

/* Unior Lab 0.7.5 — consistent doctor form grid and compact digital materials */
#app{width:100%;max-width:1480px}
#app .body{width:100%;min-width:0}
#stage{width:100%;max-width:980px;margin:0 auto;min-width:0}
#stage>.card,#stage .card{width:100%;min-width:0}
#stage .field{display:block;width:100%;min-width:0;max-width:100%;min-height:46px}
#stage textarea.field{min-height:96px;resize:vertical}
#stage .row{min-width:0;flex-wrap:wrap}
#stage .row>*{min-width:0}
.patient-card{max-width:100%;margin-top:14px}
.date-picker-card{margin-top:20px;padding:13px;border:1px solid #e1e8f2;border-radius:12px;background:#f9fbff;cursor:pointer}
.date-picker-card .label{margin-top:0}
.date-input-wrap{position:relative}
.date-input-wrap .field{padding-right:48px;cursor:pointer;background:#fff}
.date-input-wrap>span{position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:20px;color:#1749df;pointer-events:none}
.date-picker-card>.muted{margin:7px 0 0}
.construction-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;width:100%;min-width:0}
.construction-layout>.card{margin:0;max-width:none}
.section-kicker{font-size:11px;font-weight:850;letter-spacing:.045em;color:#536781;margin:0 0 10px}
.construction-product-block{padding:18px}
.product-select-card{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:72px;padding:15px 17px;border:1.5px solid #cbd8ea;border-radius:13px;background:#f7faff;color:#14233a;text-align:left}
.product-select-card span{display:flex;flex-direction:column;gap:5px;min-width:0}
.product-select-card small{font-size:11px;color:#687b94;font-weight:600}
.product-select-card b{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
.product-select-card strong{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#e7efff;color:#1749df;font-size:21px}
.construction-extras-block{padding:15px 17px;border:1px solid #e1e7f0;border-radius:14px;background:#fff}
.construction-section-heading{align-items:center;gap:14px}
.construction-section-heading>div{min-width:0}
.construction-section-heading .muted{margin:4px 0 0}
.extras-summary{margin-top:11px;padding:10px 12px;border-radius:9px;background:#f6f8fc;color:#53657d;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.construction-teeth-block{min-width:0}
.tooth-chart-card{padding:17px 14px;margin:10px 0}
.tooth-chart-card svg{display:block;width:100%;height:auto;min-height:95px;overflow:visible}
.tooth-chart-card hr{border:0;border-top:1px solid #e4eaf2;margin:15px 0}
.tooth-marks{min-height:20px;overflow-wrap:anywhere}
.construction-notes-block{padding:17px}
.construction-notes-block .label{margin-top:0}
.construction-total{padding-top:14px;margin-top:13px;border-top:1px solid #e8edf4}
.construction-total .price{font-size:21px}
.design-card{padding:18px;display:grid;gap:17px}
.design-section{min-width:0}
.design-section .label{margin-top:0}
.color-select{display:flex;align-items:center;gap:11px;text-align:left;min-height:52px;background:#fff}
.color-select b{flex:1}
.color-chevron{font-size:18px;color:#1749df}
.custom-color-toggle{display:inline-flex;align-items:center;justify-content:center;margin-top:9px;padding:9px 12px;border:1px solid #d8e3f5;border-radius:9px;background:#edf3ff;color:#1749df;font-size:12px;font-weight:750}
.custom-color-input{margin-top:9px}
.sparkles-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid #e8edf4;border-bottom:1px solid #e8edf4;cursor:pointer}
.sparkles-option span{display:flex;flex-direction:column;gap:3px}
.sparkles-option small{font-size:11px;color:#718098}
.sparkles-option input{width:21px;height:21px;accent-color:#1749df;flex:0 0 auto}
.upload-design-button{display:inline-flex;width:auto;max-width:100%;min-height:42px;align-items:center;justify-content:center;padding:10px 15px}
.design-preview{display:block;max-width:100%;max-height:180px;object-fit:contain;border-radius:10px;margin-top:8px}
.sync-banner{padding:10px 12px;border-radius:10px;margin:12px 0;font-size:12px;line-height:1.5}
.sync-ok{background:#edf8f1;border:1px solid #cce8d5;color:#276541}
.sync-error{background:#fff3f2;border:1px solid #f0d1ce;color:#963d38}
.sync-pending{padding:14px 15px;margin:14px 0;border:1px solid #efd8b0;border-radius:12px;background:#fff9ed;color:#654b21}
.sync-pending p{font-size:12px;line-height:1.5;margin:6px 0 11px}
.sync-pending .btn2{min-height:40px}
.stat-card{flex:1;margin:0;min-width:0}
.doctor-recent{margin-top:18px}
.doctor-recent>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:14px 15px;border:1px solid #e1e7f0;border-radius:12px;background:#fff;font-weight:800;font-size:13px}
.doctor-recent>summary::-webkit-details-marker{display:none}
.doctor-recent>summary span{font-size:12px;color:#1749df;font-weight:750}
.doctor-recent[open]>summary{border-radius:12px 12px 0 0}
.doctor-recent>.card{margin:0;border-radius:0 0 12px 12px;border-top:0}
.doctor-order-row{min-width:0;overflow-wrap:anywhere}
.doctor-order-row>span:first-child{min-width:0;overflow-wrap:anywhere}
.tag-warning{background:#fff0d8;color:#8c5a14}
.material-upload-card,.material-link-card,.material-list-card{padding:17px;margin:12px 0}
.materials-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.materials-card-heading h3{margin:0}
.materials-card-heading>div{min-width:0}
.materials-card-heading p{margin:5px 0 0}
.material-category-select{margin:0 0 10px}
.material-choose-button{min-height:46px;margin:0 0 10px}
.file-queue{display:grid;gap:7px;margin:8px 0 12px}
.queued-file{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 11px;border:1px solid #e4eaf2;border-radius:10px;background:#fafcff}
.queued-file-icon{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:8px;background:#eaf0ff;color:#1749df}
.queued-file-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.queued-file-info b{font-size:12px;overflow-wrap:anywhere}
.queued-file-info small{font-size:10px;color:#718098}
.queued-file-remove{width:30px;height:30px;flex:0 0 30px;border-radius:8px;background:#fff0f0;color:#a33d45;font-size:20px}
.material-link-card .muted{margin:6px 0 10px}
.material-link-card .field{margin-top:9px}
.material-link-card .btn2{margin-top:9px;min-height:44px}
.material-list-card #material-items{min-width:0}
.doctor-material-finish{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:15px 0 30px}
.doctor-material-finish button{width:100%;min-width:0;min-height:48px;margin:0}
.doctor-material-card .ul-material{overflow-wrap:anywhere}
.doctor-material-card .ul-material-actions{flex-wrap:wrap}
#stage>.label{margin-top:0}
@media(min-width:850px){
 #app{grid-template-columns:235px minmax(0,1fr);grid-template-rows:76px minmax(0,1fr);grid-template-areas:'head head' 'nav body'}
 #app .body{max-width:1120px;margin:0 auto;padding:32px clamp(28px,4vw,62px) 70px;overflow:auto}
 #stage{max-width:980px}
 #stage>.card,#stage .card{max-width:none}
 #stage .row{max-width:none}
 #stage>.btn.wide{max-width:100%}
 .construction-layout{gap:16px}
 .tooth-chart-card{padding:22px 25px}
 .design-card{padding:22px;gap:20px}
 .material-upload-card,.material-link-card,.material-list-card{padding:20px}
}
@media(max-width:560px){
 #stage .row{align-items:stretch}
 .construction-section-heading{align-items:flex-start}
 .construction-section-heading .btn2{flex:0 0 auto}
 .doctor-material-finish{grid-template-columns:1fr}
 .doctor-material-finish button{min-height:46px}
 .materials-card-heading{align-items:flex-start}
 .materials-card-heading .tag{flex:0 0 auto}
 .product-select-card b{font-size:14px}
 .date-picker-card{padding:11px}
}
@media(max-width:849px){
 #app .body{padding-bottom:125px}
 #app .nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,480px);z-index:20;box-shadow:0 -5px 22px #172d4a12}
}
.sync-warning{background:#fff8e8;border:1px solid #f0dfb7;color:#805b20}


/* Unior Lab 0.7.7 — stable doctor dashboard and transparent order synchronization */
#app{min-width:0;overflow-x:clip}
#app .body{min-width:0;overflow-x:clip}
.statsrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;max-width:920px;margin:14px 0}
.statsrow>.stat-card{width:100%;min-width:0;margin:0}
.sync-banner,.sync-pending,.sync-report,.doctor-recent{width:100%;max-width:920px;min-width:0}
.sync-item-error{display:block;margin:6px 0;color:#9a463d;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.sync-report{margin-top:10px}
.doctor-order-row{gap:12px;align-items:flex-start}
.doctor-order-row>span:first-child{flex:1;min-width:0}
.doctor-order-row>.tag{flex:0 0 auto}
@media(max-width:560px){
 .statsrow{grid-template-columns:1fr;gap:8px}
 .statsrow .metric{font-size:29px}
 .sync-pending{padding:12px}
 .doctor-order-row{align-items:center}
}
@media(min-width:850px){
 #app .body{max-width:1120px;width:100%;margin:0 auto;padding-left:clamp(24px,4vw,62px);padding-right:clamp(24px,4vw,62px)}
 #app .body>.title,#app .body>.label,#app .body>.muted{max-width:920px}
 #app .body>.btn.wide{max-width:440px}
}


/* Unior Lab 0.7.8 — compact one-screen construction step and full-field date picker */
.date-picker-card{cursor:pointer;user-select:none}
.date-input-wrap{cursor:pointer}
.date-input-wrap .field{cursor:pointer;min-height:48px}
.date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.9}
.product-select-card{min-height:56px;padding:10px 12px}
.product-select-card b{font-size:14px}
.product-select-card strong{width:auto;min-width:72px;flex:0 0 auto;height:32px;padding:0 10px;font-size:11px;white-space:nowrap}
.extras-summary{margin-top:8px;padding:7px 10px;min-height:30px}
.extras-summary.is-empty{background:transparent;padding:3px 0;color:#8290a3}
.tooth-mode-pills{gap:6px;padding:4px 0 7px;flex-wrap:wrap;overflow:visible}
.tooth-mode-pills .pill{padding:7px 10px;font-size:10px}
.dentition-pills{padding:4px 0 5px}
.tooth-chart-card{padding:10px 14px;margin:6px 0;display:flex;flex-direction:column;justify-content:space-around;gap:3px}
.tooth-chart-card .jaw-label{margin:0 0 2px;text-align:center;font-size:9px;line-height:1.2}
.tooth-chart-card svg{display:block;width:100%;height:auto;min-height:0;max-height:122px;overflow:visible}
.tooth-chart-card hr{margin:5px 0}
.tooth-chart-card .tooth rect{stroke-width:2.2}
.tooth-chart-card .tooth text{font-size:10px}
.tooth-marks{min-height:0;margin:3px 0 0;font-size:10px;line-height:1.35}
.tooth-hint{min-height:0;margin:2px 0 0;font-size:10px;line-height:1.3}
.construction-notes-block textarea.field{height:68px;min-height:68px;max-height:110px;padding:9px 11px;font-size:12px}
.construction-notes-block .construction-total{padding-top:8px;margin-top:8px}
.construction-notes-block .construction-total .price{font-size:18px}
@media(min-width:1100px) and (min-height:700px){
 #app.construction-active .body{max-width:none;width:100%;margin:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:12px clamp(22px,3vw,48px) 12px}
 #app.construction-active .body>.row:first-child{flex:0 0 auto;margin:0!important}
 #app.construction-active .body>.row:nth-child(2){flex:0 0 auto;margin:7px 0 8px!important}
 #app.construction-active #stage{width:100%;max-width:1500px;flex:1;min-height:0;margin:0 auto;display:grid;grid-template-rows:auto auto auto minmax(0,1fr)}
 #app.construction-active #stage>.label{font-size:9px;margin:0 0 2px}
 #app.construction-active #stage>.title{font-size:25px;line-height:1.1;margin:0 0 3px}
 #app.construction-active #stage>p.muted{font-size:11px;margin:0 0 7px}
 #app.construction-active .construction-layout{grid-template-columns:minmax(285px,.82fr) minmax(0,1.58fr);grid-template-rows:auto auto minmax(0,1fr);grid-template-areas:"product teeth" "extras teeth" "notes teeth";gap:9px 14px;min-height:0;align-items:stretch}
 #app.construction-active .construction-product-block{grid-area:product;padding:11px 13px;margin:0;min-width:0}
 #app.construction-active .construction-extras-block{grid-area:extras;padding:10px 13px;min-width:0}
 #app.construction-active .construction-teeth-block{grid-area:teeth;min-width:0;min-height:0;display:flex;flex-direction:column}
 #app.construction-active .construction-notes-block{grid-area:notes;padding:11px 13px;margin:0;min-width:0;min-height:0;display:flex;flex-direction:column}
 #app.construction-active .section-kicker{font-size:9px;margin:0 0 5px}
 #app.construction-active .construction-section-heading{gap:8px}
 #app.construction-active .construction-section-heading b{font-size:12px}
 #app.construction-active .construction-section-heading .muted{font-size:10px;margin:2px 0 0}
 #app.construction-active .construction-section-heading .btn2{padding:8px 10px;font-size:11px;white-space:nowrap}
 #app.construction-active .extras-summary{font-size:10px;line-height:1.3;margin-top:5px;min-height:0}
 #app.construction-active .tooth-chart-card{flex:1;min-height:0;padding:8px 14px;margin:3px 0;gap:2px}
 #app.construction-active .tooth-chart-card svg{max-height:calc((100% - 40px)/2);min-height:54px}
 #app.construction-active .tooth-chart-card hr{margin:3px 0}
 #app.construction-active .tooth-mode-pills .pill{font-size:10px;padding:6px 9px}
 #app.construction-active .dentition-pills .pill{font-size:10px;padding:6px 9px}
 #app.construction-active .construction-notes-block .label{font-size:9px;margin:0 0 5px}
 #app.construction-active .construction-notes-block textarea.field{height:58px;min-height:58px;max-height:80px;flex:0 0 auto}
 #app.construction-active .construction-notes-block .construction-total{margin-top:auto;padding-top:7px}
 #app.construction-active .construction-notes-block .notice{font-size:10px;padding:6px 8px;margin:5px 0 0}
 #app.construction-active .body #wizardError{flex:0 0 auto;margin:2px 0 0;min-height:0;font-size:10px}
 #app.construction-active .body>#next{flex:0 0 auto;max-width:100%;min-height:40px;padding:9px 14px;margin-top:6px!important}
}
@media(min-width:1100px) and (max-height:699px){#app.construction-active .body{overflow:auto}}
@media(max-width:1099px){.construction-layout{grid-template-columns:minmax(0,1fr)}.construction-teeth-block{order:3}.construction-notes-block{order:4}}
@media(max-width:560px){.tooth-mode-pills .pill{font-size:10px;padding:7px 9px}.tooth-chart-card svg{max-height:none}}
@media(min-width:1100px) and (min-height:700px){
 #app.construction-active .construction-layout{grid-template-rows:auto auto auto;align-content:start}
 #app.construction-active .construction-teeth-block{align-self:start;height:auto}
 #app.construction-active .tooth-chart-card{flex:0 0 auto;display:grid;grid-template-rows:auto auto auto auto;justify-content:initial}
 #app.construction-active .construction-section-heading{flex-wrap:nowrap;align-items:center}
 #app.construction-active .construction-section-heading>div{flex:1 1 auto}
}
@media(min-width:1100px) and (min-height:700px){#app.construction-active .tooth-chart-card svg{max-height:122px}}

/* v0.8.9 compact support and current clinic price list */
.doctor-price-row{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:10px 0;border-bottom:1px solid #e6eaf0;font-size:14px}
.doctor-price-row span{min-width:0;flex:1}
.doctor-price-row b{text-align:right;white-space:nowrap}
.doctor-support-ticket{border-bottom:1px solid #dde4ee;padding:14px 0}
.support-msg{padding:8px 12px;margin:7px 0;background:#f5f8ff;border-radius:9px;white-space:pre-wrap;font-size:13px}
#nav{overflow-x:auto;justify-content:flex-start;gap:4px}
#nav button{flex:0 0 auto;white-space:nowrap;font-size:11px}

/* v0.8.11 doctor cabinet — approved calm, minimal six-step visual system. */
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#101c36}
body{background:#f4f7fc;color:#101c36}
#app{background:#fff;max-width:1540px;box-shadow:0 16px 70px #152f5b0d}
.head{background:white;border-bottom:1px solid #e9eef7;padding:10px clamp(18px,2.5vw,35px);min-height:76px}
.brand:before{display:none}
.brand{display:flex;align-items:center;flex:0 0 auto}
.brand img{display:block;width:174px;height:60px;object-fit:contain;object-position:left center}
#headlabel{font-size:14px;color:#526787}
#app .body{padding-top:30px;padding-bottom:55px;color:#101c36}
#app .title{font-size:30px;letter-spacing:-.035em}
#app .muted{color:#61718e}
#app .card{border:1px solid #dce6f5;border-radius:15px;box-shadow:none;background:#fff}
#app .btn{background:#1248f2;border-radius:9px;font-size:14px;padding:13px 20px;box-shadow:0 4px 12px #1248f212}
#app .btn:hover:not(:disabled){background:#073cda}
#app .btn2{background:#eef3ff;color:#1749df;border:1px solid #d4e0fb;border-radius:9px;font-size:13px}
#app .btn2:hover:not(:disabled){background:#e2ecff}
#app .field{border-color:#cbd6e9;border-radius:9px;font-size:14px;background:#fff;min-height:49px;padding:12px 14px;color:#16243d}
#app .field:focus{outline:2px solid #dce9ff;outline-offset:0;border-color:#1248f2}
#app textarea.field{line-height:1.6}
#app .label{font-weight:750;color:#203250;letter-spacing:0;text-transform:none;font-size:13px;margin:15px 0 9px}
#app .pill{border-radius:9px;background:#f1f4fa;border:1px solid transparent;padding:9px 14px;color:#253652;font-size:12px}
#app .pill.active{background:#e5edff;color:#1647e8;border-color:#cad9ff}
#app .nav{background:#fff;border-right:1px solid #e9eef7;gap:4px}
#app .nav button{color:#4f6381;border-radius:9px}
#app .nav button.active{background:#e8f0ff;color:#1348e9}
#app .nav button:hover{background:#f3f6fd}
#app .stat-card{border:1px solid #dce6f5;background:white;border-radius:14px}
#app .doctor-recent>summary{border-color:#dce6f5;background:#fff}
#app.wizard-active{grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'body'}
#app.wizard-active .body{display:block;overflow:auto;max-width:none;width:100%;min-height:0;margin:0;padding:22px clamp(16px,3.5vw,62px) 48px}
#app.wizard-active #stage{display:block;width:100%;max-width:1300px;margin:0 auto}
#app.wizard-active .body>.wizard-footer,#app.wizard-active .body>.doctor-progress,#app.wizard-active .body>.review-panel,#app.wizard-active .body>.wizard-intro{max-width:1300px;margin-left:auto;margin-right:auto}
#app.wizard-active .body>#wizardError{width:100%;max-width:1300px;margin:12px auto}
#app.wizard-active .body>button#back-mat{max-width:1300px;margin:10px auto 10px;display:block}
#app.wizard-active .body .doctor-material-card{max-width:1300px;margin:15px auto;padding:20px}
#app.wizard-active .body .doctor-material-finish{max-width:1300px;margin:18px auto}
#app.wizard-active .body>.notice{max-width:1300px;margin-left:auto;margin-right:auto}
.doctor-progress{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;max-width:1300px;margin:2px auto 34px}
.doctor-progress-step{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;font-size:12px;text-align:center;color:#5a6b88;line-height:1.35}
.doctor-progress-step:before{content:'';position:absolute;z-index:0;top:18px;left:calc(-50% + 25px);width:calc(100% - 50px);border-top:2px solid #dce4f0}
.doctor-progress-step:first-child:before{display:none}
.doctor-progress-step.current,.doctor-progress-step.complete{color:#1348e9;font-weight:700}
.doctor-progress-step.current:before,.doctor-progress-step.complete:before{border-color:#2257f0}
.progress-bubble{display:flex;align-items:center;justify-content:center;position:relative;z-index:1;background:white;border:1.5px solid #ccd6e7;border-radius:50%;width:37px;height:37px;font-size:14px;font-weight:700;color:#65738c}
.current .progress-bubble{background:#1248ef;color:white;border-color:#1248ef;box-shadow:0 3px 9px #1248ef22}
.complete .progress-bubble{border-color:#1b54ef;background:#f7faff;color:#1346e7}
.wizard-intro{margin:0 0 31px}
.wizard-intro h1,#app .wizard-intro h1{margin:0 0 8px;font-size:31px;letter-spacing:-.035em;color:#101c36}
.wizard-intro p{font-size:14px;color:#61718e;line-height:1.55;margin:0}
.wizard-cols{display:grid;grid-template-columns:1fr 1fr;gap:20px}
#app .modern-panel{margin:0;padding:24px 26px;border-radius:15px;min-height:240px}
.modern-panel h2{font-size:21px;margin:0 0 25px;font-weight:800;letter-spacing:-.02em}
.clinic-add{display:block;width:100%;margin-top:20px;min-height:48px}
.quiet-note{padding:11px 13px;background:#f1f5ff;color:#4b6086;border-radius:9px;margin:3px 0 16px;font-size:13px;line-height:1.5}
.clinic-address{padding:17px 16px;border-radius:10px;min-height:54px;background:#f6f8fc;color:#263855;line-height:1.6;font-size:14px}
#app .patient-panel{padding:30px 38px;min-height:290px}
.patient-panel>.label:first-child{margin-top:0}
.patient-panel>.field{margin-bottom:25px}
.required{color:#bc3443}
.wizard-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #e3eaf5;padding-top:21px;margin-top:38px}
.wizard-total{display:flex;gap:18px;align-items:center;min-height:45px}
.wizard-total span{font-weight:650;color:#536682}
.wizard-total b{font-size:25px;color:#14203c;white-space:nowrap}
.wizard-actions{display:flex;gap:11px;align-items:center}
.wizard-actions .btn,.wizard-actions .btn2{min-width:165px;min-height:47px}
#app .design-cols .modern-panel{min-height:440px}
.design-cols .modern-panel h2{margin:0 0 19px}
.small-swatches{display:flex;gap:12px;flex-wrap:wrap;align-items:center;min-height:42px}
.mini-swatch{position:relative;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:2px solid transparent;border-radius:8px;background:#fff;padding:3px}
.mini-swatch>span{display:block;width:100%;height:100%;border-radius:5px;background:var(--sample);border:1px solid #cbd6e6}
.mini-swatch.active{border-color:#1248ed;box-shadow:0 0 0 2px #e8efff}
.mini-swatch.active:after{content:'✓';position:absolute;right:-6px;top:-8px;background:#1248ed;color:#fff;border-radius:50%;font-size:10px;line-height:16px;width:16px;height:16px;text-align:center;font-weight:700}
.mini-swatch:hover{transform:translateY(-1px)}
.glitter-shine{background-image:radial-gradient(circle at 20% 35%,#fff 0 1px,transparent 2px),radial-gradient(circle at 70% 65%,#fff 0 1px,transparent 2px)!important}
.panel-separator{border-top:1px solid #e8edf5;margin:28px 0 23px}
.glitter-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;margin:13px 0 18px}
.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch-rail{position:relative;width:42px;height:24px;border-radius:16px;background:#b6c4d8;transition:background .15s}
.switch-rail:before{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;background:#fff;border-radius:50%;transition:transform .15s}
.switch input:checked+.switch-rail{background:#1248ef}
.switch input:checked+.switch-rail:before{transform:translateX(18px)}
.switch input:focus-visible+.switch-rail{outline:3px solid #89a7ef;outline-offset:3px}
#glitter-options[hidden]{display:none!important}
.design-upload-zone{border:1px dashed #b7c9e7;border-radius:10px;min-height:170px;padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px}
.design-upload-zone .muted{margin:0}.design-upload-zone .file-selection{font-size:12px;color:#1248ef;margin:2px 0}
#app .review-panel{width:100%}
#app .review-panel .card{max-width:1300px;padding:20px 25px;margin:0;border:1px solid #dce6f5}
#app .review-panel .detail{font-size:14px;grid-template-columns:minmax(120px,220px) 1fr;padding:12px 0;border-color:#edf1f7}
#app .review-panel .card h3{font-size:16px;padding-top:12px;margin:18px 0 6px}
#app .review-panel .card h3:first-child{margin-top:0}
#app .review-panel .card>.row:last-child{display:none}
#app .review-panel .card .notice{font-size:13px}
#app.wizard-active .body .material-upload-card{margin-top:18px}
#app.wizard-active .body .material-link-card{margin-top:18px}
#app .doctor-material-intro{max-width:1300px}
/* Approved apparatus layout, keep its four original controls and tooth-map behavior. */
#app.construction-active .body{overflow:auto!important;display:block!important;padding:22px clamp(16px,3.5vw,62px) 48px!important}
#app.construction-active .body>#stage{display:block!important;max-width:1300px;width:100%!important;margin:0 auto!important}
#app.construction-active .construction-layout{display:grid!important;grid-template-columns:minmax(280px,.84fr) minmax(0,1.48fr)!important;grid-template-rows:auto auto minmax(0,1fr)!important;grid-template-areas:"product teeth" "extras teeth" "notes teeth"!important;gap:14px 18px!important;align-items:start!important}
#app.construction-active .construction-product-block{grid-area:product!important}
#app.construction-active .construction-extras-block{grid-area:extras!important}
#app.construction-active .construction-notes-block{grid-area:notes!important}
#app.construction-active .construction-teeth-block{grid-area:teeth!important;border:1px solid #dce6f5;background:#fff;border-radius:15px;padding:20px!important;align-self:stretch!important;display:block!important}
#app.construction-active .construction-teeth-block .tooth-chart-card{border-color:#e0e9f8;background:#fff;margin-top:11px;padding:20px 17px}
#app.construction-active .tooth-chart-card svg{max-height:none!important;min-height:0!important}
#app.construction-active .construction-notes-block{min-height:160px!important}
#app.construction-active .construction-notes-block textarea.field{height:auto!important;min-height:100px!important;max-height:190px!important}
#app.construction-active .body .construction-total{margin-top:14px}
#app.construction-active #stage>.label{display:none!important}
#app.construction-active #stage>.title{font-size:31px!important;line-height:1.15;margin:0 0 7px!important}
#app.construction-active #stage>p.muted{font-size:14px!important;margin:0 0 24px!important}
#app.construction-active #stage .section-kicker{font-size:13px}
#app.construction-active #stage .product-select-card b{font-size:14px}
#app.construction-active #stage .tooth-mode-pills .pill,#app.construction-active #stage .dentition-pills .pill{font-size:12px;padding:9px 14px}
.tooth .tooth-outline{fill:#fff;stroke:#899dbb;stroke-width:1.8;transition:fill .12s,stroke .12s}
.tooth .tooth-groove{fill:none;stroke:#b4c1d4;stroke-width:1.25;pointer-events:none}
.tooth.ring .tooth-outline{fill:#dce9ff;stroke:#1749df}
.tooth.support .tooth-outline{fill:#d8f4e6;stroke:#179969}
.tooth.both .tooth-outline{fill:#e8dfff;stroke:#8754cb}
.tooth.pending .tooth-outline{fill:#fff0d9;stroke:#ef8a30}
.tooth text{font-size:10px;fill:#142542}
.tooth-arc{fill:none;stroke:#dae7fc;stroke-width:1.2;pointer-events:none}
#app.wizard-active #next{margin-top:0!important;max-width:none!important;min-height:47px!important}
@media(max-width:1099px){#app.construction-active .construction-layout{grid-template-columns:1fr!important;grid-template-areas:"product" "extras" "notes" "teeth"!important}}
@media(max-width:830px){.doctor-progress{gap:2px}.doctor-progress-step{font-size:10px}.doctor-progress-step:before{top:14px;left:calc(-50% + 21px);width:calc(100% - 42px)}.progress-bubble{width:30px;height:30px;font-size:12px}.wizard-cols{grid-template-columns:1fr;gap:13px}#app .modern-panel{min-height:0;padding:19px}#app .design-cols .modern-panel{min-height:0}.wizard-intro h1,#app .wizard-intro h1{font-size:26px}.wizard-footer{align-items:stretch;gap:12px;flex-wrap:wrap}.wizard-actions{width:100%}.wizard-actions button{flex:1;min-width:0!important}}
@media(max-width:520px){.doctor-progress{gap:1px}.doctor-progress-step{font-size:8px;letter-spacing:-.02em}.doctor-progress-step:before{top:12px;left:calc(-50% + 17px);width:calc(100% - 34px)}.progress-bubble{width:25px;height:25px;font-size:10px}.doctor-progress-step{gap:5px}.wizard-total b{font-size:19px}.wizard-actions .btn{font-size:12px}#app .patient-panel{padding:18px}.small-swatches{gap:7px}.mini-swatch{width:32px;height:32px}.wizard-intro{margin-bottom:18px}#app.wizard-active .body{padding-top:15px}}
/* Make the visible glitter switch fully operable with pointer and keyboard. */
.switch{width:42px;height:24px}
.switch input{top:0;left:0;width:42px;height:24px;margin:0;opacity:0;z-index:2;cursor:pointer}
.switch-rail{pointer-events:none}
.tooth .tooth-hit{fill:transparent!important;stroke:none!important}
#app .nav button{font-size:14px!important;padding:13px 16px!important;font-weight:550}
#app .nav button.active{font-weight:760}
#app.wizard-active:has(.nav.hidden) .body{width:100%;max-width:none;margin:0}
.review-design-preview{max-width:240px;max-height:170px;border:1px solid #e3ebf7;border-radius:10px;display:block;object-fit:contain;margin:12px 0}
/* Scan and link submission are peers on wide screens. */
#app .materials-two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:18px;width:100%;max-width:1300px;margin:16px auto}
#app .materials-two-col .card{margin:0!important;min-width:0}
#app .materials-two-col .material-upload-card,#app .materials-two-col .material-link-card{min-height:350px}
@media(max-width:820px){#app .materials-two-col{grid-template-columns:1fr}}

/* 0.8.12: doctor-only UI refinements. */
.brand-home{display:inline-flex;align-items:center;justify-content:center;padding:0;background:transparent;border:0;cursor:pointer;border-radius:7px}
.brand-home:focus-visible{outline:2px solid #1749df;outline-offset:4px}
#app .doctor-recent-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 15px;border:1px solid #dce6f5;border-radius:12px 12px 0 0;background:#fff;font-size:14px}
#app .doctor-recent-heading .btn2{font-size:12px;padding:8px 12px;white-space:nowrap}
#app .doctor-recent>.card{margin:0;border-radius:0 0 12px 12px;border-top:none}
#app #date{cursor:pointer;min-height:51px}
#app .color-selected{font-size:13px;color:#3e5682;min-height:20px;margin:8px 0 14px;font-weight:650}
#app .mini-swatch:hover{box-shadow:0 0 0 2px #d9e5ff}
#app .mini-swatch:focus-visible{outline:2px solid #1749df;outline-offset:2px}
#app .tooth-chart-card svg{overflow:visible}
#app.construction-active .tooth-chart-card svg{min-height:100px!important;max-height:150px!important}
#app .tooth .tooth-outline{stroke:#7c8caa;stroke-width:1.7;fill:#fbfdff;stroke-linejoin:round}
#app .tooth .tooth-groove{stroke:#9baec9;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
#app .tooth .tooth-shine{stroke:#d5e1f1;fill:none;stroke-width:1.6;stroke-linecap:round;pointer-events:none}
#app .tooth.ring .tooth-outline{fill:#dce9ff;stroke:#1749df;stroke-width:2.1}
#app .tooth.support .tooth-outline{fill:#d8f4e6;stroke:#179969;stroke-width:2.1}
#app .tooth.both .tooth-outline{fill:#e8dfff;stroke:#8754cb;stroke-width:2.1}
#app .tooth.pending .tooth-outline{fill:#fff0d9;stroke:#ef8a30;stroke-width:2.1}
#app .tooth:focus-visible .tooth-outline{stroke:#1749df;stroke-width:2.5}
#app .tooth-number{font-size:14px;fill:#152640;font-weight:750}
#app .tooth-arc{stroke:#d4e4fb;stroke-width:1.5}
#app .tooth-hit{fill:transparent!important;stroke:none!important}
@media(max-width:520px){#app.construction-active .tooth-chart-card svg{min-height:75px!important;max-height:125px!important}#app .doctor-recent-heading{flex-wrap:wrap}}

/* Soft enamel on unselected crowns; selected tooth indicators retain their color. */
#app #upper .tooth:not(.ring):not(.support):not(.both):not(.pending) .tooth-outline{fill:url(#enamel-upper)}
#app #lower .tooth:not(.ring):not(.support):not(.both):not(.pending) .tooth-outline{fill:url(#enamel-lower)}

/* 0.8.13 — exact approved apparatus screen composition only.
   All production flows and other doctor screens are unchanged. */
#app.construction-active .head{min-height:60px!important;padding-top:5px;padding-bottom:5px}
#app.construction-active .body{padding:20px clamp(20px,2.35vw,38px) 34px!important}
#app.construction-active .body>.doctor-progress{max-width:1220px;margin-top:0;margin-bottom:29px}
#app.construction-active .body>#stage{max-width:1220px!important}
#app.construction-active #stage>.title{font-size:32px!important;font-weight:850;margin:0 0 6px!important}
#app.construction-active #stage>p.muted{font-size:15px!important;margin:0 0 26px!important}
#app.construction-active .construction-layout{
 display:grid!important;grid-template-columns:minmax(290px,.525fr) minmax(0,1fr)!important;
 grid-template-rows:auto!important;grid-template-areas:none!important;
 align-items:stretch!important;gap:16px!important;
}
#app.construction-active .construction-layout>.card{margin:0;min-width:0;border:1px solid #dae4f6;border-radius:13px;background:white;box-shadow:none}
#app.construction-active .apparatus-config{padding:20px!important;display:flex;flex-direction:column;gap:0;min-width:0}
#app.construction-active .apparatus-config-section{padding:0 0 23px;min-width:0}
#app.construction-active .apparatus-config-section+.apparatus-config-section{padding-top:23px;border-top:1px solid #e4eaf5}
#app.construction-active .apparatus-config-section:last-child{padding-bottom:0}
#app.construction-active .apparatus-config h2,
#app.construction-active .construction-teeth-block h2,
#app.construction-active .apparatus-heading{
 display:block;font-size:20px;line-height:1.2;letter-spacing:-.02em;
 font-weight:830;color:#101c36;margin:0 0 5px;
}
#app.construction-active .apparatus-config .muted,
#app.construction-active .construction-teeth-block .muted{font-size:13px;line-height:1.43;margin:0;color:#64738e}
#app.construction-active .product-select-card{min-height:65px;margin-top:19px;padding:12px 14px;border:1px solid #cadbff;border-radius:10px;background:#f7f9ff;gap:10px}
#app.construction-active .product-select-card span{gap:4px}
#app.construction-active .product-select-card small{font-size:12px;font-weight:500;color:#52688a}
#app.construction-active .product-select-card b{font-size:15px;line-height:1.25;color:#13213e}
#app.construction-active .product-select-card strong{width:auto;flex:0 0 auto;height:auto;min-height:34px;padding:8px 12px;font-size:13px;font-weight:700;border-radius:9px;background:linear-gradient(180deg,#edf3ff,#dbe7ff);color:#1449e9}
#app.construction-active .construction-section-heading{flex-wrap:nowrap!important;align-items:center;gap:6px}
#app.construction-active .construction-section-heading>div{min-width:0;flex:1}
#app.construction-active #pickextra{flex-shrink:0;white-space:nowrap;font-size:12px;padding:9px 12px;border:none;background:linear-gradient(180deg,#f1f5ff,#dfebff)}
#app.construction-active .extras-summary{margin-top:18px;background:#f3f5fa;padding:10px 13px;border-radius:9px;line-height:1.3;font-size:13px;color:#667590;min-height:35px}
#app.construction-active .extras-summary.is-empty{min-height:35px}
#app.construction-active .apparatus-notes-section>.apparatus-heading{margin:0 0 5px}
#app.construction-active .apparatus-notes-section textarea.field{margin-top:13px;min-height:83px!important;height:83px!important;max-height:160px!important;resize:vertical;font-size:13px;padding:12px;border-color:#d5dfef}
#app.construction-active .construction-teeth-block{padding:19px 20px!important;align-self:stretch!important;min-height:0;display:block!important}
#app.construction-active .apparatus-teeth-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:17px}
#app.construction-active .apparatus-teeth-top>div:first-child{min-width:0}
#app.construction-active .dental-tip{display:flex;align-items:center;gap:12px;flex:0 0 auto;max-width:300px;background:#f1f5ff;border-radius:10px;padding:11px 14px}
#app.construction-active .dental-tip span{font-size:24px;line-height:1;color:#1554f0}
#app.construction-active .dental-tip p{color:#566b90;font-size:12px;line-height:1.45;margin:0}
#app.construction-active .dentition-pills{padding:0;margin-bottom:14px;gap:9px}
#app.construction-active #stage .dentition-pills .pill{font-size:13px;padding:9px 22px;min-width:105px;line-height:1.2;border:0!important;border-radius:10px;background:linear-gradient(180deg,#f3f5f9,#e9edf3);color:#283954;font-weight:570}
#app.construction-active #stage .dentition-pills .pill.active{background:linear-gradient(180deg,#e8f0ff,#cfdeff);color:#1048e8;font-weight:750}
#app.construction-active .apparatus-mode-title{font-size:12px;font-weight:760;line-height:1.3;color:#56698a;margin:9px 0 7px}
#app.construction-active .tooth-mode-pills{padding:0;margin:0 0 15px;gap:9px}
#app.construction-active #stage .tooth-mode-pills .pill{font-size:12px;padding:7px 17px;border:0!important;border-radius:18px;background:linear-gradient(180deg,#f4f6fa,#e9edf2);color:#27374d;font-weight:550}
#app.construction-active #stage .tooth-mode-pills .pill.active{background:linear-gradient(180deg,#eaf1ff,#d1dfff);color:#0e4be9;font-weight:720}
#app.construction-active .construction-teeth-block .tooth-chart-card{
 margin:0!important;padding:13px 13px 11px!important;
 border:1px solid #dfe7f5;border-radius:13px;background:white;
 display:flex!important;flex-direction:column;align-items:stretch;gap:0;
}
#app.construction-active .tooth-chart-card .jaw-label{font-size:12px!important;line-height:1.2;font-weight:800;color:#586b8c;margin:0 auto 0!important;text-align:center}
#app.construction-active .tooth-chart-card svg{display:block!important;min-height:0!important;max-height:none!important;width:100%;height:auto;overflow:visible}
#app.construction-active .tooth-chart-card hr{display:none!important}
#app.construction-active .tooth-chart-card .jaw-label:nth-of-type(2){margin-top:1px!important}
#app.construction-active .tooth-marks{font-size:11px;line-height:1.3;min-height:0;margin:7px 0 0;overflow-wrap:anywhere}
#app.construction-active .tooth-marks:empty{display:none}
#app.construction-active .tooth-hint{font-size:11px;min-height:0;margin:5px 0 0}
#app.construction-active .tooth-hint:empty{display:none}
#app.construction-active .tooth .tooth-outline{fill:white;stroke:#8295b3;stroke-width:1.75;stroke-linejoin:round;transition:fill .12s,stroke .12s}
#app.construction-active .tooth .tooth-groove{fill:none;stroke:#a9b8cb;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#app.construction-active .tooth .tooth-shine{stroke:#dae4f2;fill:none;stroke-width:1.5;pointer-events:none}
#app.construction-active .tooth.ring .tooth-outline{fill:#e2f7e9;stroke:#08a356;stroke-width:2.3}
#app.construction-active .tooth.support .tooth-outline{fill:#d8f4e6;stroke:#179969;stroke-width:2.3}
#app.construction-active .tooth.both .tooth-outline{fill:#d9f2fb;stroke:#0a7ead;stroke-width:2.3}
#app.construction-active .tooth.pending .tooth-outline{fill:#fff0d9;stroke:#ef8a30;stroke-width:2.3}
#app.construction-active .tooth .tooth-number{fill:#1b2943;font-size:15px;font-weight:730}
#app.construction-active .tooth-arc{stroke:#d7e9ff;stroke-width:1.45;fill:none;pointer-events:none}
#app.construction-active .body>.wizard-footer{max-width:1220px;margin-top:48px;padding-top:19px}
#app.construction-active .wizard-actions button{min-width:150px}
@media(max-width:1060px){
 #app.construction-active .construction-layout{grid-template-columns:1fr!important}
 #app.construction-active .construction-teeth-block{min-width:0}
 #app.construction-active .apparatus-config-section{padding-bottom:17px}
}
@media(max-width:650px){
 #app.construction-active .body{padding:12px 13px 26px!important}
 #app.construction-active .construction-layout{gap:12px!important}
 #app.construction-active .apparatus-teeth-top{flex-wrap:wrap}
 #app.construction-active .dental-tip{max-width:100%}
 #app.construction-active .construction-teeth-block{padding:14px 11px!important}
 #app.construction-active .apparatus-config{padding:16px!important}
 #app.construction-active #stage .dentition-pills .pill{min-width:auto;padding:8px 13px;font-size:11px}
 #app.construction-active .tooth-mode-pills{gap:4px}
 #app.construction-active #stage .tooth-mode-pills .pill{padding:7px 9px;font-size:10px}
 #app.construction-active .body>.wizard-footer{margin-top:25px}
}
/* Keep both approved apparatus panels side-by-side: cancel legacy named grid areas. */
#app.construction-active .apparatus-config{grid-area:1 / 1 / 2 / 2!important}
#app.construction-active .construction-teeth-block{grid-area:1 / 2 / 2 / 3!important}
@media(max-width:1060px){
 #app.construction-active .apparatus-config{grid-area:1 / 1 / 2 / 2!important}
 #app.construction-active .construction-teeth-block{grid-area:2 / 1 / 3 / 2!important}
}
/* Fine alignment with the 1260×905 approved reference. */
#app.construction-active .head{height:60px!important;min-height:60px!important;padding:0 25px!important}
#app.construction-active .brand img{height:52px;width:174px}
#app.construction-active .body{padding-top:12px!important}
#app.construction-active .apparatus-extras-section h2{font-size:18px;letter-spacing:-.025em;white-space:nowrap}
#app.construction-active #pickextra{padding:9px 9px;font-size:11px}
#app.construction-active .body>.wizard-footer{margin-top:30px}
@media(max-width:650px){#app.construction-active .apparatus-extras-section h2{font-size:16px;white-space:normal}}
#app.construction-active .body>.doctor-progress{margin-bottom:16px}
#app.construction-active .body>.wizard-footer{margin-top:54px}
@media(max-width:1060px){#app.construction-active .body>.wizard-footer{margin-top:30px}}
/* On phones, preserve readable tooth sizes with horizontal scrolling. */
@media(max-width:650px){
 #app.construction-active .construction-teeth-block .tooth-chart-card{overflow-x:auto;overflow-y:hidden;align-items:stretch}
 #app.construction-active .tooth-chart-card svg{min-width:660px!important;width:660px!important;max-width:none!important;max-height:none!important;height:auto!important}
 #app.construction-active .tooth-chart-card .jaw-label{align-self:stretch;position:sticky;left:0;text-align:center;background:white;z-index:1}
}
/* 0.8.14: ring and support must be different, even when overlaid on one tooth. */
#app.construction-active .tooth.ring .tooth-outline{fill:#dff6e7;stroke:#089f55}
#app.construction-active .tooth.support .tooth-outline{fill:#dceaff;stroke:#1d66d7}
#app.construction-active .tooth.both .tooth-outline{fill:url(#tooth-both-colors);stroke:#4865b9}
#app.construction-active .tooth .tooth-hit{fill:transparent!important;stroke:none!important;pointer-events:all}
.doctor-material-choices{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.doctor-material-choices .btn2{background:#fff;border:1px solid #c9d8f2;color:#1752ce;padding:14px 16px}
.doctor-material-choices .btn2:focus-visible,.doctor-material-choices .btn2.active{outline:2px solid #2458ec;outline-offset:1px}
.doctor-courier-item{padding:12px 0;border-top:1px solid #e6edf6}
.doctor-courier-item:first-of-type{border-top:0}
.doctor-courier-item p{margin:8px 0;overflow-wrap:anywhere}


/* 0.8.15 — concise, lab-aligned doctor dashboard and readable courier statuses. */
:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
#app .nav button{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;letter-spacing:-.01em}
#app .nav .doctor-nav-icon{flex:0 0 18px;width:18px;height:18px;opacity:.78}
#app .nav button.active .doctor-nav-icon{opacity:1}
#app .nav button span{min-width:0}
#app .doctor-home-wrap{max-width:1280px;margin:0 auto;width:100%;min-width:0}
#app.doctor-home-active{background:#f4f7fc}
#app.doctor-home-active .body{max-width:none!important;width:100%;padding:28px clamp(18px,3.2vw,48px) 55px;background:#f4f7fc}
#app.doctor-home-active .nav{background:#fff;border-color:#e6ecf5}
#app.doctor-home-active .nav button{font-size:13px!important;font-weight:600!important;padding:12px 13px!important}
#app.doctor-home-active .nav button.active{font-weight:750!important}
#app .doctor-home-title{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 20px}
#app .doctor-home-title h1{font-size:clamp(25px,2.25vw,32px);line-height:1.2;letter-spacing:-.03em;margin:2px 0 9px;color:#172b47;font-weight:830}
#app .doctor-home-title .muted{font-size:13px;color:#8090a8;margin:0}
#app .doctor-home-eyebrow{font-size:11px;color:#8294ad;font-weight:750;letter-spacing:.03em;margin:0 0 5px}
#app .doctor-home-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
#app .doctor-home-actions button{white-space:nowrap;width:auto!important;min-height:43px;padding:11px 17px!important;font-size:13px!important}
#app .doctor-home-actions .btn2{border:1px solid #dae5f6;background:#fff}
#app .doctor-home-draft{display:flex;justify-content:flex-start;margin:-7px 0 18px}
#app .doctor-resume-link{border:0;background:transparent;font-size:12px;color:#3563e9;font-weight:700;padding:7px 0}
#app .doctor-resume-link:hover{text-decoration:underline}
#app .doctor-home-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:0 0 25px}
#app .doctor-home-stats .doctor-kpi{margin:0;max-width:none!important;min-width:0;display:flex;gap:16px;align-items:center;min-height:116px;padding:19px 22px;box-shadow:0 9px 24px #27436f09;border:1px solid #e4ebf5;border-radius:15px}
#app .doctor-kpi-icon{width:42px;height:42px;flex:0 0 42px;border-radius:12px;background:#eaf0ff;display:grid;place-items:center;color:#3563e9;font-weight:800;font-size:20px}
#app .doctor-kpi:nth-child(2) .doctor-kpi-icon{background:#e9f7f0;color:#218657}
#app .doctor-kpi p{font-size:12px;color:#8797ad;margin:0 0 5px}
#app .doctor-kpi strong{font-size:27px;line-height:1.1;color:#1a2a42;font-weight:850}
#app .doctor-recent{margin:0;max-width:none;width:100%}
#app .doctor-recent-heading{padding:15px 19px;border:1px solid #e4ebf5;border-bottom:none;background:#fff;border-radius:15px 15px 0 0}
#app .doctor-recent-heading b{font-size:16px;color:#1b2d49}
#app .doctor-recent-heading .btn2{border:0;background:#edf3ff;padding:8px 11px;font-size:11px}
#app .doctor-recent>.card{max-width:none!important;width:100%;padding:5px 20px 8px;margin:0;box-shadow:0 9px 24px #27436f09;border-color:#e4ebf5;border-radius:0 0 15px 15px}
#app .doctor-recent .item{min-height:66px;padding:12px 3px;border-color:#edf1f7}
#app .doctor-recent .item b{font-size:13px}
#app .doctor-recent .item .muted{font-size:11px}
#app .doctor-recent .tag{font-size:10px}
#app .doctor-home-courier{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:17px 0;padding:17px 20px;background:#fff;border:1px solid #e4ebf5;border-radius:15px}
#app .doctor-home-courier b{font-size:13px}
#app .doctor-home-courier .muted{margin:5px 0 0;font-size:11px}
#app .doctor-home-courier .btn2{font-size:11px;padding:8px 12px;white-space:nowrap}
#app .doctor-courier-list{margin-top:20px;background:#fff;border:1px solid #e3eaf6;border-radius:14px;overflow:hidden}
#app .doctor-courier-heading{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #e9eff8;gap:12px}
#app .doctor-courier-heading h3{font-size:14px;margin:0;display:flex;align-items:center;gap:8px}
#app .courier-count{display:inline-flex;align-items:center;justify-content:center;background:#edf3ff;border-radius:7px;color:#3761bb;font-size:11px;padding:3px 7px}
#app .doctor-courier-heading .btn2{font-size:11px;padding:7px 11px}
#app .doctor-courier-rows{padding:0 16px}
#app .doctor-courier-rows>.muted{margin:13px 0}
#app .doctor-courier-item{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #edf1f8;padding:11px 0;min-width:0}
#app .doctor-courier-item:last-child{border:0}
#app .doctor-courier-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
#app .doctor-courier-main strong{font-size:12px;color:#26364e}
#app .doctor-courier-main .muted{font-size:10px}
#app .doctor-courier-description{font-size:11px;color:#405470;overflow-wrap:anywhere}
#app .courier-tag{border-radius:16px;flex:0 0 auto;font-size:10px;padding:5px 9px;white-space:nowrap}
#app .courier-tag.courier-processing{color:#98631d;background:#fff2df}
#app .courier-tag.courier-work{color:#2455bf;background:#eaf0ff}
#app .courier-tag.courier-done{color:#177747;background:#e7f7ef}
#app .doctor-courier-more>summary{font-size:11px;font-weight:700;color:#2b5ac7;cursor:pointer;padding:13px 0}
#app .doctor-courier-more .doctor-courier-item{padding-left:6px}
#app .sync-error,#app .sync-warning{max-width:none;margin:12px 0;background:#fff3ef;border:1px solid #f3d9c9;color:#8b4835}
@media(min-width:850px){
 #app.doctor-home-active .body{max-width:none!important}
 #app .nav button{font-size:13px!important}
}
@media(max-width:900px){
 #app .doctor-home-title{flex-direction:column;align-items:flex-start}
 #app .doctor-home-actions{justify-content:flex-start}
}
@media(max-width:640px){
 #app.doctor-home-active .body{padding:19px 14px 96px}
 #app .doctor-home-stats{gap:9px}
 #app .doctor-home-stats .doctor-kpi{min-height:94px;padding:13px 10px;gap:9px}
 #app .doctor-kpi-icon{width:32px;height:32px;flex-basis:32px;font-size:16px}
 #app .doctor-kpi p{font-size:10px}
 #app .doctor-kpi strong{font-size:23px}
 #app .doctor-home-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
 #app .doctor-home-actions button{white-space:normal;font-size:11px!important;padding:9px 7px!important}
 #app .doctor-courier-item{align-items:flex-start}
 #app .doctor-courier-main{max-width:75%}
 #app .nav button{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:8px!important;font-size:10px!important}
 #app .nav .doctor-nav-icon{width:17px;height:17px;flex-basis:17px}
}

@media(max-width:640px){
 #app .nav{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;align-items:stretch;gap:2px;min-height:64px;height:auto;padding:2px 4px max(2px,env(safe-area-inset-bottom));scrollbar-width:thin}
 #app .nav button{min-width:69px;flex:0 0 69px;min-height:59px}
}

/* 0.8.16 — stable doctor shell: the same canvas on every navigation tab. */
html{overflow-y:scroll;scrollbar-gutter:stable}
#app{background:#f4f7fc!important;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
#app .body{background:#f4f7fc!important;scrollbar-gutter:stable;min-width:0}
#app .nav{background:#fff!important}
#app .nav button{font-family:inherit;font-size:13px!important;font-weight:600!important;line-height:1.35;padding:12px 13px!important}
#app .nav button.active{font-weight:750!important}
#app .body>.card,#app .body>.doctor-courier-list{border-color:#e4ebf5}
@media(min-width:850px){
 #app{width:100%;max-width:none!important;grid-template-columns:235px minmax(0,1fr)!important;grid-template-rows:76px minmax(0,1fr)!important}
 #app:not(.wizard-active) .body{max-width:none!important;width:100%;padding:28px clamp(18px,3.2vw,48px) 55px!important}
 #app:not(.wizard-active) .body>.card,#app:not(.wizard-active) .body>.notice,#app:not(.wizard-active) .body>.row{max-width:none!important}
}
/* Mobile tooth map: show the entire jaw without horizontal scroll. */
@media(max-width:650px){
 #app.construction-active .construction-teeth-block .tooth-chart-card{overflow:visible!important;max-width:100%;padding:10px 4px!important}
 #app.construction-active .tooth-chart-card svg{display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;aspect-ratio:auto}
 #app.construction-active .tooth-chart-card .jaw-label{position:static!important}
 #app.construction-active .body>.wizard-footer{position:fixed;bottom:0;left:0;right:0;z-index:4;background:#f4f7fc;margin:12px -10px 0!important;padding:11px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px #12284811}
 #app.construction-active .wizard-actions{display:flex;width:100%;gap:8px}
 #app.construction-active .wizard-actions button{min-width:0!important;display:inline-flex!important;flex:1;justify-content:center;align-items:center;visibility:visible!important;min-height:43px}
 #app.construction-active .wizard-total{width:100%;display:flex;justify-content:space-between;align-items:center}
}

@media(max-width:650px){#app.construction-active .body{padding-bottom:155px!important}#app.construction-active .tooth-chart-card svg{aspect-ratio:auto!important}}
@media(min-width:850px){
 #app.wizard-active:has(.nav.hidden){grid-template-columns:minmax(0,1fr)!important;grid-template-areas:'head' 'body'!important}
 #app.wizard-active:has(.nav.hidden) .body{width:100%;max-width:none!important}
}
/* Wizard is a full-screen flow. Mobile navigation must not cover Continue. */
#app .nav.hidden{display:none!important}
@media(max-width:650px){
 #app.construction-active .body>.wizard-footer{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important;min-height:105px}
 #app.construction-active .body>.wizard-footer .wizard-total{min-height:20px}
 #app.construction-active .body>.wizard-footer .wizard-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)!important;gap:8px!important}
 #app.construction-active .body>.wizard-footer .wizard-actions button{position:static!important;display:flex!important;height:43px!important;min-height:43px!important;max-height:none!important;opacity:1!important}
}


/* 0.8.17: single, invariant shell for all seven doctor cabinet sections.
   Do not apply to the full-screen order wizard or registration page. */
#app.doctor-cabinet-active{
  width:100%;
  background:#f4f7fc!important;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:#172b47;
}
#app.doctor-cabinet-active .head,
#app.doctor-cabinet-active .nav,
#app.doctor-cabinet-active .body{
  font-family:inherit;
}
#app.doctor-cabinet-active .body{
  min-width:0;
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box;
  background:#f4f7fc!important;
}
#app.doctor-cabinet-active .nav button,
#app.doctor-home-active .nav button{
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.35!important;
  padding:12px 13px!important;
}
#app.doctor-cabinet-active .nav button.active{font-weight:750!important}
/* All pages use the same content canvas, not older 900/920/970px limits. */
#app.doctor-cabinet-active .body > :is(.doctor-home-wrap,.title,.label,.muted,.card,.notice,.row,.pills,.doctor-recent,.doctor-courier-list,.doctor-home-courier,.doctor-home-stats,.doctor-home-title,.sync-pending,.sync-report,.statsrow){
  width:100%!important;
  max-width:1280px!important;
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}
#app.doctor-cabinet-active .body > .title,
#app.doctor-cabinet-active .doctor-home-title h1{
  font-family:inherit;
  font-size:clamp(25px,2.25vw,32px)!important;
  line-height:1.2;
  font-weight:830;
  letter-spacing:-.03em;
  color:#172b47;
}
#app.doctor-cabinet-active .doctor-price-row{min-width:0;gap:16px}
#app.doctor-cabinet-active .doctor-price-row span{flex:1;min-width:0;overflow-wrap:anywhere}
#app.doctor-cabinet-active .doctor-price-row b{flex:0 1 auto;max-width:55%;min-width:0;white-space:normal;overflow-wrap:anywhere}
@media(min-width:850px){
  #app.doctor-cabinet-active{
    height:100dvh;
    min-height:100dvh;
    overflow:hidden;
    grid-template-columns:235px minmax(0,1fr)!important;
    grid-template-rows:76px minmax(0,1fr)!important;
    grid-template-areas:'head head' 'nav body'!important;
  }
  #app.doctor-cabinet-active .head{grid-area:head}
  #app.doctor-cabinet-active .nav{
    grid-area:nav;
    position:static;
    height:auto;
    min-height:0;
    align-self:stretch;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-gutter:stable;
  }
  #app.doctor-cabinet-active .body{
    grid-area:body;
    min-height:0;
    overflow-y:scroll!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable;
    padding:28px clamp(18px,3.2vw,48px) 55px!important;
  }
}
@media(max-width:849px){
  #app.doctor-cabinet-active .body{
    padding:19px 14px 105px!important;
    overflow-x:hidden!important;
  }
  #app.doctor-cabinet-active .nav{background:#fff!important}
}

/* 0.8.18 — a stable cabinet shell throughout the six order steps.
   The desktop sidebar remains visible while the wizard/review/scans are open. */
@media (min-width:850px){
 #app.wizard-active.doctor-cabinet-active{
  display:grid!important;
  grid-template-columns:235px minmax(0,1fr)!important;
  grid-template-rows:76px minmax(0,1fr)!important;
  grid-template-areas:'head head' 'nav body'!important;
  height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;
 }
 #app.wizard-active.doctor-cabinet-active .nav{grid-area:nav;position:static!important;align-self:stretch;height:auto!important;min-height:0;overflow-y:auto;overflow-x:hidden;background:#fff}
 #app.wizard-active.doctor-cabinet-active .head{grid-area:head}
 #app.wizard-active.doctor-cabinet-active .body{
  grid-area:body;display:block;overflow-y:auto!important;overflow-x:hidden!important;
  box-sizing:border-box;max-width:none!important;width:100%!important;min-height:0;
  margin:0!important;padding:25px clamp(18px,3.1vw,48px) 60px!important;
  scrollbar-gutter:stable;
 }
 #app.wizard-active.doctor-cabinet-active .body>.doctor-progress,
 #app.wizard-active.doctor-cabinet-active .body>.wizard-footer,
 #app.wizard-active.doctor-cabinet-active .body>#stage,
 #app.wizard-active.doctor-cabinet-active .body>.review-panel{
  width:100%;max-width:1300px;margin-left:auto;margin-right:auto;
 }
}
/* Step six: one coherent canvas for choices, file upload, and final actions. */
#app .scan-page{width:100%;max-width:1300px;margin:0 auto;min-width:0}
#app .scan-page .doctor-progress{max-width:none;margin:2px 0 32px}
#app .scan-page .scan-intro{margin:0 0 25px}
#app .scan-page .scan-choice-panel,
#app .scan-page .scan-files-panel,
#app .scan-page .scan-attachments{
 width:100%;max-width:none!important;margin:0 0 15px!important;
 background:#fff;border:1px solid #dce6f5;border-radius:15px;
 padding:20px 22px!important;box-shadow:0 4px 14px #173f7310;
}
#app .scan-page h2{font-size:18px;font-weight:800;line-height:1.3;color:#16253e;margin:0 0 17px;letter-spacing:-.02em}
#app .scan-page .scan-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#app .scan-page .scan-choice{
 display:flex;justify-content:center;align-items:center;text-align:center;gap:12px;
 min-width:0;min-height:66px;padding:14px 12px;color:#13284e;background:#fff;
 border:1px solid #cfdbed;border-radius:12px;
 font-size:13px;font-weight:750;line-height:1.35;transition:background .12s,border-color .12s;
}
#app .scan-page .scan-choice:hover{background:#f4f8ff;border-color:#9fbcfa}
#app .scan-page .scan-choice.active{background:#eaf1ff;border:2px solid #1b50ed;color:#1746c8}
#app .scan-page .scan-choice-icon{font-size:24px;line-height:1;color:#1d58ef;flex:0 0 auto}
#app .scan-page .scan-input-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.96fr);gap:24px;align-items:stretch}
#app .scan-page .scan-file-column,#app .scan-page .scan-link-column{min-width:0}
#app .scan-page .scan-link-column{padding:8px 0 6px 24px;border-left:1px solid #e6edf7;display:flex;flex-direction:column;align-items:stretch;gap:12px}
#app .scan-page .scan-link-column>.label{margin:0 0 1px;font-size:14px}
#app .scan-page .scan-link-column .field{margin:0;min-height:46px;font-size:13px}
#app .scan-page .scan-add-link{align-self:flex-start;min-height:40px;padding:9px 14px;font-size:12px}
#app .scan-page .scan-drop-zone{
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 min-width:0;min-height:218px;padding:22px 14px;text-align:center;background:#f7faff;
 border:2px dashed #a7c5ff;border-radius:12px;transition:background .12s,border-color .12s;
}
#app .scan-page .scan-drop-zone.drag-over{background:#e6efff;border-color:#2354e7}
#app .scan-page .scan-upload-icon{color:#1750e9;font-size:34px;line-height:1.1;margin-bottom:8px}
#app .scan-page .scan-drop-zone b{font-size:14px}
#app .scan-page .scan-drop-zone p{font-size:12px;margin:5px 0}
#app .scan-page .scan-drop-zone .scan-select-files{margin:10px auto 6px;min-height:38px;padding:9px 18px;font-size:12px}
#app .scan-page .scan-drop-zone .scan-supported{margin:4px 0 0;max-width:370px;font-size:11px}
#app .scan-page .scan-file-queue{margin:11px 0 8px}
#app .scan-page .scan-file-queue>.muted{font-size:11px;margin:0}
#app .scan-page .scan-upload-submit{margin-top:7px;max-width:100%;padding:9px 14px;font-size:12px;min-height:39px}
#app .scan-page .scan-info{display:flex;gap:12px;align-items:flex-start;margin-top:8px;padding:12px 13px;border-radius:10px;background:#eff5ff;color:#536988;font-size:12px;line-height:1.45}
#app .scan-page .scan-info>span:first-child{font-size:18px;color:#1750e9}
#app .scan-page .scan-attachments{margin-top:15px!important}
#app .scan-page .materials-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#app .scan-page .materials-card-heading h2{margin:0}
#app .scan-page #material-items{margin-top:12px}
#app .scan-page #material-items>.muted{font-size:13px}
#app .scan-page .scan-footer{display:flex;align-items:center;justify-content:flex-end;gap:13px;margin:17px 0 35px;min-height:47px}
#app .scan-page .scan-footer button{min-height:45px;min-width:132px;padding:10px 19px;font-size:13px}
#app .scan-page .scan-footer .btn{min-width:210px}
#app .scan-page [hidden]{display:none!important}
#app .scan-page .scan-choice:focus-visible,#app .scan-page #scan-drop-zone:focus-within{outline:3px solid #9ab9ff;outline-offset:2px}
@media (max-width:1100px){
 #app .scan-page .scan-choice{flex-direction:column;gap:7px;min-height:83px;font-size:12px}
 #app .scan-page .scan-input-grid{gap:18px}
 #app .scan-page .scan-link-column{padding-left:18px}
}
@media (max-width:849px){
 #app.wizard-active.doctor-cabinet-active{display:flex!important;flex-direction:column!important;min-height:100dvh;background:#f4f7fc}
 #app.wizard-active.doctor-cabinet-active .body{width:100%!important;max-width:none!important;margin:0!important;padding:16px 14px 135px!important;overflow-x:hidden}
 #app.wizard-active.doctor-cabinet-active .nav{display:flex;flex-direction:row;gap:4px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:thin}
 #app.wizard-active.doctor-cabinet-active .nav button{min-width:86px;max-width:none;flex:0 0 auto;display:flex;flex-direction:column;gap:3px;padding:7px 10px!important;text-align:center;font-size:10px!important}
 #app.wizard-active.doctor-cabinet-active .nav .doctor-nav-icon{width:17px;height:17px}
 #app .scan-page .scan-input-grid{grid-template-columns:1fr;gap:17px}
 #app .scan-page .scan-link-column{border-left:0;border-top:1px solid #e6edf7;padding:18px 0 0}
 #app .scan-page .scan-choice-grid{grid-template-columns:1fr}
 #app .scan-page .scan-choice{flex-direction:row;justify-content:flex-start;text-align:left;min-height:54px;padding:11px 14px}
 #app .scan-page .scan-choice-panel,#app .scan-page .scan-files-panel,#app .scan-page .scan-attachments{padding:16px!important}
 #app .scan-page .scan-footer{padding-bottom:25px}
}
@media (max-width:470px){
 #app .scan-page .scan-intro h1{font-size:24px}
 #app .scan-page .scan-choice-icon{font-size:20px}
 #app .scan-page .scan-footer{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr);gap:9px}
 #app .scan-page .scan-footer button,#app .scan-page .scan-footer .btn{min-width:0;width:100%;padding:10px 8px;font-size:11px}
 #app .scan-page .doctor-progress-step{font-size:8px}
}
/* Keep the end-of-order actions visible while reviewing uploaded materials. */
#app.scan-stage-active .scan-page .scan-footer{
 position:sticky;bottom:0;z-index:4;background:rgba(244,247,252,.97);
 border-top:1px solid #dce6f5;padding:12px 0;
 box-shadow:0 -8px 20px #1c3a6708;
}
@media(max-width:849px){
 #app.scan-stage-active .scan-page .scan-footer{bottom:0;padding:10px 0 14px;margin-bottom:0}
}
#app .scan-page svg.scan-choice-icon{display:block;width:25px;height:25px;flex:0 0 25px;color:#1d58ef}
#app .scan-page .scan-upload-icon svg{display:block;width:38px;height:38px}

/* Unior Lab 0.8.19: separate support links, compact independent scan URL rows. */
#app .scan-page .scan-link-rows{display:flex;flex-direction:column;gap:12px;width:100%}
#app .scan-page .scan-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:10px;row-gap:4px}
#app .scan-page .scan-link-row .field{min-width:0;width:100%}
#app .scan-page .scan-link-row .scan-add-link{align-self:stretch;white-space:nowrap;min-height:46px}
#app .scan-page .scan-link-feedback{grid-column:1/-1;color:#476181;min-height:0}
#app .scan-page .scan-add-more-link{align-self:flex-start;background:#f3f7ff;border:1px solid #c9d9fa;min-height:38px;padding:8px 13px;font-size:12px}
@media(min-width:850px){#app .nav button.doctor-nav-secondary{margin-top:24px!important;position:relative}#app .nav button.doctor-nav-secondary::before{content:'';position:absolute;top:-13px;left:0;right:0;border-top:1px solid #dae4f3;pointer-events:none}}
@media(max-width:480px){#app .scan-page .scan-link-row{grid-template-columns:1fr}#app .scan-page .scan-link-row .scan-add-link{justify-self:start;min-height:38px}}


/* 0.8.23 registration layout hotfix.
   0.8.16 applied a !important two-column desktop grid to every page, including
   registration/login where the sidebar is hidden. The content then landed in the
   235px sidebar column. Scope the one-column shell to partner auth only. */
#app.partner-auth-active{min-width:0;overflow-x:clip}
#app.partner-auth-active .nav{display:none!important}
#app.partner-auth-active .body{min-width:0;box-sizing:border-box}
#app.partner-auth-active .body>.title{line-height:1.2;overflow-wrap:break-word}
#app.partner-auth-active .body>.card{width:100%;max-width:740px!important;min-width:0;margin:20px auto 0;padding:clamp(20px,3vw,30px)}
#app.partner-auth-active .body>.label,
#app.partner-auth-active .body>.title,
#app.partner-auth-active .body>.muted{width:100%;max-width:740px;margin-left:auto;margin-right:auto}
#app.partner-auth-active .body>.muted{font-size:14px;line-height:1.55}
#app.partner-auth-active .card .field{display:block;width:100%;min-width:0;max-width:100%;min-height:46px;font-size:14px}
#app.partner-auth-active .card .label{font-size:12px;line-height:1.35;margin:13px 0 7px;overflow-wrap:break-word}
#app.partner-auth-active .card .notice{line-height:1.55}
#app.partner-auth-active #reg-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;width:100%;min-width:0}
#app.partner-auth-active .partner-field{min-width:0}
#app.partner-auth-active .partner-field-wide{grid-column:1/-1}
#app.partner-auth-active #reg-doctor,
#app.partner-auth-active #reg-clinic{flex:1 1 230px;min-width:0;min-height:50px;line-height:1.35;white-space:normal;text-align:center;border:1px solid #d5e2fc}
#app.partner-auth-active #reg-doctor.selected,
#app.partner-auth-active #reg-clinic.selected{background:#1749df;color:#fff;border-color:#1749df}
#app.partner-auth-active #register-submit{min-height:47px}
@media (min-width:850px){
 #app.partner-auth-active{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:76px minmax(0,1fr)!important;
  grid-template-areas:'head' 'body'!important;
 }
 #app.partner-auth-active .head{grid-area:head;width:100%;min-width:0}
 #app.partner-auth-active .body{
  grid-area:body;width:100%;max-width:800px!important;min-width:0;
  margin:0 auto!important;padding:36px 24px 70px!important;
  overflow:visible!important;scrollbar-gutter:auto;
 }
}
@media (max-width:849px){
 #app.partner-auth-active{display:flex!important;flex-direction:column;min-height:100dvh}
 #app.partner-auth-active .body{width:100%;max-width:740px;margin:0 auto;padding:22px 18px 48px!important;overflow:visible}
}
@media (max-width:540px){
 #app.partner-auth-active .body{padding:18px 14px 42px!important}
 #app.partner-auth-active .body>.card{padding:18px 16px;margin-top:16px}
 #app.partner-auth-active #reg-fields{grid-template-columns:minmax(0,1fr)}
 #app.partner-auth-active #reg-doctor,
 #app.partner-auth-active #reg-clinic{flex-basis:100%;min-height:44px}
 #app.partner-auth-active .body>.title{font-size:26px}
}

/* 0.8.24 – deliberately minimal customer-facing payment visibility */
#app .doctor-home-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
#app .doctor-home-stats button.doctor-kpi{cursor:pointer;width:100%;font-family:inherit;text-align:left;background:#fff}
#app .doctor-home-stats button.doctor-kpi:hover{border-color:#3b6df0;background:#f6f9ff}
.doctor-order-tags{display:flex;flex-direction:column;gap:7px;align-items:flex-end;flex:0 0 auto}
.tag-paid{background:#e8f8ed!important;color:#167044!important}.tag-unpaid{background:#fff0db!important;color:#95561a!important}
.doctor-payment-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.doctor-payment-summary p{width:100%;margin:2px 0 0}
@media(max-width:740px){#app .doctor-home-stats{grid-template-columns:1fr}.doctor-order-tags{max-width:44%}.doctor-order-tags .tag{white-space:normal;text-align:center}}

/* 0.8.25: detail actions share the same central column as the order summary. */
#app.doctor-cabinet-active .body>.doctor-detail-actions,
#app.doctor-cabinet-active .body>.doctor-detail-footer{
  width:100%;max-width:1280px;margin:14px auto 0;box-sizing:border-box;min-width:0;
}
#app.doctor-cabinet-active .doctor-detail-actions #doctor-materials{
  display:block;width:min(100%,440px);max-width:100%;min-height:44px;text-align:center;
}
#app.doctor-cabinet-active .doctor-detail-footer>.doctor-cancel-card,
#app.doctor-cabinet-active .doctor-detail-footer>.notice{width:100%;max-width:none;margin:0;box-sizing:border-box;}
#app .doctor-home-stats #doctor-guest-finance small{display:block;font-size:11px;color:#697b98;margin-top:5px;line-height:1.4}
/* Keep dialogs above the mobile fixed navigation bar (z-index:20). */
#modal.overlay{z-index:60}

/* v0.8.26 – stronger action affordance and statuses that match production progress. */
#app .doctor-recent-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#app .doctor-recent-heading .doctor-all-orders-btn{
 display:inline-flex;align-items:center;justify-content:center;gap:12px;
 padding:11px 16px;min-height:40px;width:auto;white-space:nowrap;
 background:#ef6a28;color:#fff;border:1px solid #c95520;border-radius:10px;
 font-size:12px;font-weight:800;box-shadow:0 2px 5px #a6401b1f;
 transition:background .15s ease,box-shadow .15s ease,transform .15s ease;
}
#app .doctor-recent-heading .doctor-all-orders-btn:hover{background:#d9571c;box-shadow:0 5px 15px #a6401b29;transform:translateY(-1px)}
#app .doctor-recent-heading .doctor-all-orders-btn:focus-visible{outline:3px solid #2051dc;outline-offset:3px}
#app .doctor-recent-heading .doctor-all-orders-btn span{font-size:17px;line-height:1}
#app .tag.doctor-status{border-radius:8px;border:1px solid transparent;font-weight:800;letter-spacing:.005em;display:inline-flex;align-items:center;text-align:center;justify-content:center;line-height:1.35}
#app .doctor-status-new{background:#eaf0ff;color:#1d4fc4;border-color:#ccdcfa!important}
#app .doctor-status-accepted{background:#eaf6fb;color:#126182;border-color:#b8dfeb!important}
#app .doctor-status-production{background:#eee9ff;color:#5835a8;border-color:#d4c7fa!important}
#app .doctor-status-quality{background:#fff1d8;color:#83500b;border-color:#f0d4a1!important}
#app .doctor-status-ready{background:#e7f8f5;color:#176b64;border-color:#b2e7dc!important}
#app .doctor-status-delivered{background:#e0f6e8;color:#156a3b;border-color:#aee3c2!important}
#app .doctor-status-cancelled{background:#fce8e9;color:#a12c3d;border-color:#f1bcc4!important}
#app .doctor-status-local{background:#fff0dc;color:#8b5511;border-color:#ebca92!important}
#app .doctor-status-quote{background:#fff0dc;color:#845313;border-color:#ebca92!important}
#app .doctor-order-row{gap:14px}
#app .doctor-order-row>span:first-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:640px){#app .doctor-recent-heading{padding:14px 13px}#app .doctor-recent-heading .doctor-all-orders-btn{padding:10px 12px}}


/* 0.8.27 – shared, centered canvas for every non-wizard doctor/admin page.
   Older styles constrained only cards/headings, leaving top-level buttons at x=0.
   Layout grid aligns ALL sections (including actions and empty states) to one lane. */
#app.doctor-cabinet-active:not(.doctor-home-active):not(.wizard-active) .body{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1040px) minmax(0,1fr);
  align-content:start;
  align-items:start;
  row-gap:0;
}
#app.doctor-cabinet-active:not(.doctor-home-active):not(.wizard-active) .body > *{
  grid-column:2;
  min-width:0;
  max-width:100%!important;
  box-sizing:border-box;
}
#app.doctor-cabinet-active:not(.doctor-home-active):not(.wizard-active) .body > :is(button,.btn,.btn2){
  justify-self:start;
  width:auto!important;
  max-width:100%!important;
  white-space:normal;
  text-align:center;
}
#app .doctor-page-toolbar{
  width:100%;min-width:0;display:flex;align-items:center;
  justify-content:flex-start;flex-wrap:wrap;gap:10px;margin:12px 0 16px;
}
#app .doctor-page-toolbar .doctor-add-button{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 1 auto;width:auto!important;max-width:100%;min-height:42px;
  padding:11px 16px;white-space:normal;text-align:center;
  font-size:13px;border-radius:10px;
}
#app .doctor-clinic-card{width:100%;min-width:0;margin:0 0 12px;padding:17px 20px;overflow-wrap:anywhere}
#app .doctor-clinic-card>p.muted{margin:8px 0 0}
#app .doctor-clinic-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;min-width:0}
#app .doctor-clinic-row>b{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
#app .doctor-clinic-controls{display:flex;align-items:center;gap:8px;flex:0 1 auto;flex-wrap:wrap}
#app .doctor-clinic-controls>.btn2{font-size:12px;min-height:38px;padding:9px 12px;white-space:normal}
#app .doctor-price-row{min-width:0;max-width:100%;}
#app .body :is(.card,.doctor-price-row,.doctor-order-row,.row,.notice){overflow-wrap:anywhere}
@media(max-width:600px){
 #app .doctor-page-toolbar .doctor-add-button{width:auto!important;max-width:100%}
 #app .doctor-clinic-card{padding:15px}
 #app .doctor-clinic-row{align-items:flex-start}
 #app .doctor-clinic-controls{width:100%;flex:1 1 100%}
 #app .doctor-clinic-controls>.btn2{flex:0 1 auto}
}

/* 0.8.27 mobile wizard: the fixed bottom navigation previously covered Continue.
   Reserve a separate band ABOVE the navigation for wizard navigation/actions. */
@media(max-width:849px){
 #app.wizard-active.doctor-cabinet-active .body{
  padding-bottom:calc(205px + env(safe-area-inset-bottom))!important;
 }
 #app.wizard-active.doctor-cabinet-active .body>.wizard-footer{
  position:fixed!important;
  left:0!important;right:0!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;
  width:100%!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:10px 14px 11px!important;
  background:#f4f7fc!important;border-top:1px solid #dce6f4;
  box-shadow:0 -6px 18px #12284811;
  z-index:30!important;
 }
 #app.wizard-active.doctor-cabinet-active .body>.wizard-footer .wizard-actions{
  min-width:0;width:100%;
 }
 #app.wizard-active.doctor-cabinet-active .body>.wizard-footer .wizard-actions button{
  min-width:0!important;
 }
}

/* 0.8.27: seven destinations cannot fit in a 320–390px bottom bar.
   Give each item its own non-overlapping touch target; swipe horizontally
   for the other sections rather than allowing text to spill into neighbours. */
@media(max-width:849px){
 #app.doctor-cabinet-active .nav,
 #app.doctor-home-active .nav{
  display:flex!important;flex-wrap:nowrap!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  overscroll-behavior-x:contain;scroll-snap-type:x proximity;
  scrollbar-width:none;gap:2px!important;
 }
 #app.doctor-cabinet-active .nav::-webkit-scrollbar,
 #app.doctor-home-active .nav::-webkit-scrollbar{display:none}
 #app.doctor-cabinet-active .nav button,
 #app.doctor-home-active .nav button{
  flex:0 0 82px!important;min-width:82px!important;max-width:82px!important;
  min-height:60px;padding:7px 4px!important;font-size:10px!important;
  display:flex!important;flex-direction:column!important;align-items:center;
  justify-content:center;text-align:center!important;gap:3px!important;
  scroll-snap-align:start;
 }
 #app.doctor-cabinet-active .nav button span,
 #app.doctor-home-active .nav button span{
  min-width:0;width:100%;display:block;text-align:center;
  white-space:normal;overflow-wrap:break-word;line-height:1.15;
 }
}


/* 0.8.28: mobile-first route return and five fixed navigation destinations. */
.doctor-mobile-more{display:none!important}
#app .doctor-back-toolbar{width:100%;margin:0 auto 10px!important;min-width:0}
#app .doctor-back-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;max-width:100%;padding:8px 14px;color:#1949cc;background:#e8efff;border:1px solid #cfddff;border-radius:10px;font-size:12px;font-weight:800}
#app .doctor-back-button span{font-size:18px;line-height:1}
#app .doctor-back-button:focus-visible{outline:3px solid #1f56e0;outline-offset:2px}
.doctor-more-heading{margin:0 0 12px}
.doctor-more-links{display:grid;grid-template-columns:1fr;gap:9px}
.doctor-more-links button{background:#f3f6ff;border:1px solid #dce5f7;color:#153c9c;font-weight:800;text-align:left;padding:16px;border-radius:12px;min-height:48px}
.doctor-more-links button:focus-visible{outline:3px solid #1749df}
#app.construction-active .doctor-precision-button{display:none}
.doctor-precision-jaw{margin:18px 0 0}
.doctor-precision-jaw>b{display:block;font-size:13px;margin-bottom:9px}
.doctor-precision-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.doctor-precision-tooth{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:48px;min-width:0;background:#f4f7fc;border:1px solid #cbd8ef;color:#192e54;border-radius:9px;font-weight:800}
.doctor-precision-tooth.selected{border-color:#1749df;background:#dce7ff;color:#1442a2}
.doctor-precision-tooth small{font-size:9px;margin-top:2px}
@media(max-width:849px){
 html,body{width:100%;max-width:100%;overflow-x:hidden!important;scrollbar-gutter:auto}
 #app,#app .body{max-width:100%;overflow-x:clip!important}
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  width:min(100%,480px)!important;max-width:100%;min-width:0;min-height:65px;
  overflow:visible!important;gap:1px!important;align-items:stretch;
  padding:3px 3px max(3px,env(safe-area-inset-bottom))!important;
 }
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{
  width:100%!important;min-width:0!important;max-width:none!important;flex:initial!important;
  min-height:56px!important;padding:7px 2px!important;
  font-size:10px!important;letter-spacing:-.025em;overflow:hidden;
 }
 #app .nav button[data-nav="profile"],#app .nav button[data-nav="pricelist"],#app .nav button[data-nav="contacts"]{display:none!important}
 #app .nav button.doctor-mobile-more{display:flex!important}
 #app .nav .doctor-nav-icon{width:18px;height:18px;flex:0 0 18px}
 #app .nav button span{white-space:normal!important;overflow-wrap:anywhere;line-height:1.15}
 #app .body>.pills{flex-wrap:wrap;overflow-x:visible!important;overflow-y:visible!important;gap:6px;padding:8px 0}
 #app .body>.pills .pill{font-size:11px;padding:8px 10px;white-space:normal}
 #app .body{padding-bottom:calc(101px + env(safe-area-inset-bottom))!important}
 #app.wizard-active.doctor-cabinet-active .body{padding-bottom:calc(205px + env(safe-area-inset-bottom))!important}
 #app.construction-active .construction-teeth-block .tooth-chart-card{
  overflow:hidden!important;max-width:100%;min-width:0;display:flex;flex-direction:column;
  padding:12px 7px!important;gap:7px;
 }
 #app.construction-active .construction-teeth-block .tooth-chart-card svg{
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;max-height:none!important;overflow:visible;
 }
 #app.construction-active .construction-teeth-block .tooth-chart-card .jaw-label{
  position:static!important;text-align:center;font-size:11px;font-weight:850;margin:5px 0 0;
 }
 #app.construction-active .construction-teeth-block{padding:12px 9px!important;min-width:0;overflow:hidden}
 #app.construction-active .doctor-precision-button{display:inline-flex;align-items:center;justify-content:center;width:100%;margin-top:10px;min-height:44px;white-space:normal;font-size:12px}
}
@media(max-width:360px){
 #app .nav button span{font-size:9px}
 #app.construction-active .construction-teeth-block{padding:10px 6px!important}
 .doctor-precision-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(min-width:651px) and (max-width:849px){#app.construction-active .doctor-precision-button{display:none!important}}

/* 0.8.34: keep stacked authentication actions separate at every breakpoint. */
#app.partner-auth-active .card > .wide{
 display:flex;align-items:center;justify-content:center;
 min-height:46px;white-space:normal;line-height:1.4;
}
#app.partner-auth-active .card > .wide + .wide{margin-top:12px}

/* Separate registration consent; never preselected. */
.registration-consent{display:flex;align-items:flex-start;gap:10px;margin:18px 0 8px;font-size:13px;line-height:1.6;color:#334767}
.registration-consent input{flex:0 0 18px;width:18px;height:18px;margin:2px 0 0;accent-color:#174bff}
.registration-consent span{min-width:0;overflow-wrap:anywhere}.registration-consent a,.registration-policy a{color:#174bff;text-decoration:underline}
.registration-policy{font-size:12px;line-height:1.6;margin:8px 0 16px;overflow-wrap:anywhere}

.registration-next-steps{padding-left:22px;font-size:14px;line-height:1.7}.registration-next-steps li{margin:10px 0}
.registration-mail-help{margin-top:20px;font-size:13px;line-height:1.6}.registration-mail-help summary{cursor:pointer;color:#174bff;text-decoration:underline}.registration-mail-help p{overflow-wrap:anywhere}

/* 0.8.40 — compact mobile header and readable controls without focus zoom. */
@media(max-width:849px){
 html,body{touch-action:pan-x pan-y}
 #app .head,#app.construction-active .head{height:56px!important;min-height:56px!important;flex:0 0 56px;padding:4px 14px!important;gap:12px}
 #app .head .brand{min-width:0;flex:0 0 auto}
 #app .head .brand img{width:106px!important;height:38px!important;object-fit:contain}
 #app .brand-home{min-height:44px;min-width:106px;justify-content:flex-start}
 #app #headlabel{font-size:12px;line-height:1.35;text-align:right;min-width:0;overflow-wrap:anywhere}
 #app input,#app select,#app textarea,#modal input,#modal select,#modal textarea{font-size:16px!important}
}

/* 0.8.41 — consistent patient fields, including Safari's native date control. */
#app .patient-panel>.field{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:48px;min-height:48px;margin-bottom:20px}
#app .patient-panel>.label{line-height:1.4;margin:16px 0 8px}
#app .patient-panel #date{height:48px;min-height:48px;min-inline-size:0;max-inline-size:100%;padding:11px 12px;line-height:1.4;text-align:left;-webkit-appearance:none;appearance:none}
#app #date::-webkit-date-and-time-value{text-align:left;min-height:1.4em;padding:0}
#app #date::-webkit-datetime-edit{padding:0;text-align:left}

/* 0.8.44: shared calendar and agenda in the partner's existing Orders section. */
#app .order-filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:4px 0 16px;min-width:0}
#app .order-filters label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:650;flex:1 1 220px;min-width:0}
#app .order-filters .field{width:100%;min-width:0;height:46px;margin:0;font-size:16px}
#app .order-filters>.btn2{min-height:46px;margin:0}
#app .order-payment-note{font-size:12px;margin:4px 0 14px}
#app #order-workspace{width:100%;min-width:0}
#app .order-calendar-layout{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:20px;align-items:start;min-width:0}
#app .order-calendar-layout>.card{margin:0;padding:18px;min-width:0;width:100%;box-sizing:border-box}
#app .order-month-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center}
#app .order-month-header h2{font-size:18px;line-height:1.4;text-align:center;margin:0;text-transform:capitalize}
#app .order-month-header>.btn2{width:44px;height:44px;padding:0;margin:0;font-size:25px}
#app .order-month-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:12px 0 16px}
#app .order-month-actions>.btn2{min-height:40px;padding:8px 14px;font-size:13px;margin:0}
#app .order-month-actions>.selected{background:#eaf0ff;border-color:#1749df}
#app .order-weekdays,#app .order-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
#app .order-weekdays>span{text-align:center;padding:6px 0 9px;color:#6e7f98;font-size:12px;font-weight:650}
#app .order-day{min-width:0;width:100%;min-height:86px;padding:7px 4px;background:#fff;border:1px solid #e0e8f7;border-radius:9px;color:#243a5a;text-align:left;display:flex;flex-direction:column;gap:5px;cursor:pointer;font:inherit;box-sizing:border-box}
#app .order-day:hover{background:#f3f6ff}#app .order-day:focus-visible{outline:2px solid #1749df;outline-offset:1px}
#app .order-day.today{border-color:#7b9af4}#app .order-day.selected{background:#edf2ff;border:2px solid #1749df;padding:6px 3px}
#app .order-day-top{display:flex;align-items:center;justify-content:space-between;gap:2px;font-size:12px;font-weight:700;line-height:1.4}
#app .order-day-count{background:#1749df;color:white;border-radius:5px;padding:1px 3px;font-size:10px;line-height:1.4}
#app .order-day-items{display:flex;flex-direction:column;gap:4px;min-width:0;width:100%}
#app .order-day-item{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 2px;border-radius:4px;background:#edf2ff;color:#3158a5;font-size:9px;line-height:1.3;border-left:2px solid #7c9be8}
#app .order-day-item.doctor-status-ready{background:#e6f7ef;color:#237343;border-color:#33a465}
#app .order-day-item.doctor-status-delivered{background:#edf0f4;color:#60718b;border-color:#8c9caf}
#app .order-day-more{font-size:9px;color:#617693}
#app .order-calendar-note{font-size:11px;line-height:1.6;color:#6e7f98;margin:14px 0 0}
#app .order-agenda-header{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e5ebf7;padding-bottom:14px;margin-bottom:4px}
#app .order-agenda-header h2{font-size:18px;line-height:1.4;margin:0}#app .order-agenda-header>.muted{font-size:12px}
#app .order-calendar-entry{padding:4px 0 14px;border-bottom:1px solid #e5ebf7;min-width:0}#app .order-calendar-entry:last-child{border-bottom:0;padding-bottom:0}
#app .order-calendar-entry .item{padding:14px 0 10px;border:0;background:transparent;width:100%;text-align:left;margin:0}
#app .order-calendar-entry .doctor-order-tags{max-width:38%}
#app .order-calendar-meta{display:flex;flex-direction:column;gap:6px;font-size:12px;line-height:1.5;color:#617693;overflow-wrap:anywhere}
#app .order-date-kind{color:#60718b}#app .order-date-kind.delayed{color:#1749df;font-weight:650}#app .order-date-change{color:#9a641c}
#app .order-calendar-empty{padding:18px 0;font-size:13px;color:#6e7f98}#app .order-calendar-empty>.btn2{min-height:44px;font-size:13px}
#app .order-dates-notice{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin:0 0 16px;font-size:13px}
#app .order-dates-notice p{margin:8px 0 0}#app .order-dates-notice>.btn2{min-height:44px;font-size:13px}
@media(max-width:849px){
 #app .order-calendar-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 #app .order-calendar-layout>.card{padding:16px}
 #app .order-day{min-height:52px;padding:8px 5px}#app .order-day.selected{padding:7px 4px}
 #app .order-day-items{display:none}#app .order-day-top{font-size:14px;flex-wrap:wrap;justify-content:center;gap:4px}
 #app .order-day-count{font-size:10px}#app .order-month-header h2{font-size:18px}
 #app .order-filters{gap:10px}#app .order-filters label{flex-basis:100%}
 #app .order-calendar-entry .doctor-order-tags{max-width:40%}
}
@media(max-width:360px){#app .order-calendar-layout>.card{padding:12px}#app .order-days,#app .order-weekdays{gap:3px}#app .order-day{padding:6px 2px}#app .order-day.selected{padding:5px 1px}}

#app .order-status-filters{display:flex;flex-wrap:wrap;overflow:visible;gap:7px;padding:10px 0;min-height:54px}
#app .order-status-filters>.pill{flex:0 0 auto;white-space:normal;min-height:36px}
@media(min-width:850px) and (max-width:1099px){#app .order-calendar-layout{grid-template-columns:minmax(0,1fr)}#app .order-day{min-height:64px}}
#doctor-notification-entry{margin-left:auto;flex:none}.doctor-notification-button{font:inherit;font-size:12px;border:1px solid #d5e0f4;background:#fff;color:#1749df;border-radius:10px;padding:9px 11px;cursor:pointer}.doctor-notification-button b{display:inline-block;background:#1749df;color:#fff;border-radius:12px;padding:1px 5px;min-width:12px}.doctor-notification-list{display:grid;gap:8px}.doctor-notification-list button{display:flex;justify-content:space-between;gap:12px;text-align:left;border:1px solid #e0e8f4;border-radius:10px;padding:12px;background:#fff;color:#172b4b;font:inherit;cursor:pointer}.doctor-notification-list button.unread{background:#eef3ff;border-color:#bacffa}.doctor-notification-list small{display:block;color:#657b9b;margin-top:5px}.doctor-notification-list time{font-size:11px;color:#657b9b}.doctor-push-explainer{font-size:13px;color:#627b9f}@media(max-width:600px){.head:has(#doctor-notification-entry){gap:8px;flex-wrap:wrap}.head:has(#doctor-notification-entry) #headlabel{display:none}.doctor-notification-button{font-size:11px;padding:8px}.doctor-notification-list button{flex-direction:column;gap:5px}}

/* Account controls stay together at the right, away from the logo. */
#app .doctor-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-left:auto;min-width:0}#app .head>.brand{flex:none}#app .doctor-header-actions #headlabel{display:block;text-align:right;margin:0}#app .doctor-header-actions #doctor-notification-entry{margin-left:0}#app .doctor-header-logout{flex:none;min-height:36px;padding:8px 13px;font-size:12px;white-space:nowrap}#app .doctor-header-logout[hidden]{display:none}
@media(max-width:600px){#app .head:has(#doctor-notification-entry){flex-wrap:nowrap}#app .doctor-header-actions{gap:7px;flex-wrap:wrap}#app .doctor-header-actions #headlabel{display:block;font-size:10px;line-height:1.2;flex:1 0 100%}#app .doctor-header-actions #doctor-notification-entry{order:1}#app .doctor-header-actions .doctor-header-logout{order:2;min-height:30px;padding:5px 9px;font-size:11px}#app .doctor-header-actions .doctor-notification-button{padding:5px 7px;min-height:30px}#app:has(.doctor-header-actions #doctor-notification-entry) .head{height:auto!important;min-height:70px!important;flex-basis:auto}}

.doctor-notification-icon{width:16px;height:16px;vertical-align:middle;flex:none;margin-right:5px}@media(max-width:600px){#app .doctor-header-actions .doctor-notification-label{display:none}#app .doctor-header-actions .doctor-notification-icon{margin-right:0}}

#app .doctor-order-primary-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;max-width:920px;margin:14px 0 18px}#app .doctor-order-primary-actions>button{max-width:100%;white-space:normal;min-height:42px}#app .doctor-order-primary-actions #doctor-order-approval{line-height:1.4;text-align:center}
@media(max-width:600px){#app .doctor-order-primary-actions>button{width:100%}}

#app .doctor-payments-panel{max-width:920px;margin-top:14px}#app .doctor-payments-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}#app .doctor-payments-heading h2{font-size:21px;margin:0}#app .doctor-payments-heading p{margin:6px 0 0}#app .doctor-payments-heading>strong{font-size:25px;color:#142b50;white-space:nowrap}#app .doctor-payments-count{font-size:12px;color:#637591;margin:18px 0 8px}.doctor-payment-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;background:#fff;color:#192f50;padding:15px 0;border-bottom:1px solid #e4ebf5}.doctor-payment-row:last-child{border-bottom:0}.doctor-payment-row>span{min-width:0}.doctor-payment-row b{display:block;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.doctor-payment-row small{display:block;color:#6b7d98;font-size:11px;line-height:1.5;margin-top:4px}.doctor-payment-row>strong{white-space:nowrap;font-size:14px;flex:none}@media(max-width:600px){#app .doctor-payments-heading{gap:10px}#app .doctor-payments-heading>strong{font-size:23px}.doctor-payment-row{gap:10px}}

/* Separate recent-order navigation from the order list without changing its contents. */
#app .doctor-recent{display:grid;gap:10px}#app .doctor-recent-heading{border:1px solid #e4ebf5;border-radius:15px}#app .doctor-recent>.card{margin:0;border:1px solid #e4ebf5;border-radius:15px}

/* 0.8.68 — a solid safe-area header and glass navigation on phones only. */
@media(max-width:849px){
 html,body{background:#fff}
 #app .head,#app.construction-active .head,#app:has(.doctor-header-actions #doctor-notification-entry) .head{
  position:sticky;top:0;z-index:40;isolation:isolate;box-sizing:border-box;
  height:auto!important;min-height:calc(64px + env(safe-area-inset-top,0px))!important;flex:0 0 auto!important;
  padding:calc(7px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 7px max(14px,env(safe-area-inset-left,0px))!important;
  background:#fff!important;opacity:1!important;filter:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  border-bottom:1px solid #e3e9f2;box-shadow:0 2px 8px #172d4a05;
 }
 #app .head .brand,#app .head .brand img,#app .doctor-header-actions{filter:none!important;opacity:1!important}
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{
  bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;width:min(calc(100% - 20px),480px)!important;
  min-height:68px;padding:6px!important;gap:4px!important;border:1px solid #fff;border-radius:24px;
  background:rgba(255,255,255,.94)!important;box-shadow:0 8px 28px #16335f20,inset 0 1px 0 #ffffffed;
 }
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{
  border:1px solid rgba(255,255,255,.46);border-radius:17px;background:rgba(255,255,255,.25)!important;
  color:#33445f;opacity:1;min-height:56px!important;box-shadow:inset 0 1px 0 #ffffff66;touch-action:manipulation;
 }
 #app.doctor-cabinet-active .nav button.active,#app.doctor-home-active .nav button.active{
  color:#1749df;background:rgba(220,232,255,.8)!important;border-color:rgba(135,167,234,.28);box-shadow:inset 0 1px 0 #ffffffde,0 2px 7px #1749df0d;
 }
 #app .nav .doctor-nav-icon{opacity:1}#app .nav button:focus-visible{outline:2px solid #1749df;outline-offset:-3px}
 #app .body{padding-bottom:calc(120px + env(safe-area-inset-bottom,0px))!important}
 #app.wizard-active.doctor-cabinet-active .body{padding-bottom:calc(240px + env(safe-area-inset-bottom,0px))!important}
 #app.wizard-active.doctor-cabinet-active .body>.wizard-footer{bottom:calc(92px + env(safe-area-inset-bottom,0px))!important}
 @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{background:rgba(255,255,255,.7)!important;-webkit-backdrop-filter:blur(18px) saturate(145%);backdrop-filter:blur(18px) saturate(145%)}
 }
}
@media(max-width:849px) and (prefers-reduced-transparency:reduce){
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{background:#fff!important;-webkit-backdrop-filter:none;backdrop-filter:none}
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{background:#f5f7fb!important}#app.doctor-cabinet-active .nav button.active,#app.doctor-home-active .nav button.active{background:#e2ebff!important}
}
@media(max-width:849px) and (prefers-contrast:more){
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{background:#fff!important;border-color:#a5b6d0;-webkit-backdrop-filter:none;backdrop-filter:none}
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{color:#172b47;border-color:#cad5e5}#app.doctor-cabinet-active .nav button.active,#app.doctor-home-active .nav button.active{color:#123fba;border-color:#7294dc;background:#e2ebff!important}
}

/* 0.8.69 — an interface wordmark, matching glass header buttons and a new-only inbox. */
#app .head .doctor-wordmark{width:154px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0;font-family:inherit;color:#142b4c;line-height:1}
#app .head .doctor-brand-name{font-family:inherit;font-size:26px;font-weight:800;letter-spacing:-.045em;line-height:1.1;text-transform:none;white-space:nowrap}
#app .head .doctor-brand-mark{display:block;position:relative;width:60px;height:30px;overflow:hidden;flex:none}
#app .head .brand .doctor-brand-mark img{position:absolute;left:-15px;top:-30px;width:90px!important;height:90px!important;max-width:none;object-fit:fill;object-position:center}
#app .doctor-header-actions .doctor-notification-button,#app .doctor-header-actions .doctor-header-logout{background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(226,236,255,.52));border:1px solid rgba(180,199,231,.45);border-radius:14px;box-shadow:inset 0 1px 0 #ffffffef,0 2px 8px #1537600b;-webkit-backdrop-filter:blur(12px) saturate(145%);backdrop-filter:blur(12px) saturate(145%);color:#244d96;min-height:36px;opacity:1}
#app .doctor-header-actions .doctor-notification-button:focus-visible,#app .doctor-header-actions .doctor-header-logout:focus-visible{outline:2px solid #6084d0;outline-offset:3px}
#doctor-notifications-dialog{width:min(520px,calc(100% - 28px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 28px);display:flex;flex-direction:column;overflow:hidden;border-radius:20px}
#doctor-notifications-dialog:not([open]){display:none}
#doctor-notifications-dialog>header{flex:none;align-items:center;padding:17px 20px}
#doctor-notifications-dialog h2{font:inherit;font-size:20px;line-height:1.3;font-weight:750;outline:none;margin:0}
#doctor-notifications-dialog [data-count]{display:block;color:#6b7e98;font-size:11px;margin-top:4px}
#doctor-notifications-dialog [data-count]:empty{display:none}
#doctor-notifications-dialog>header .doctor-notification-close{width:36px;height:36px;min-height:36px;display:grid;place-items:center;flex:none;padding:0;border:0;border-radius:50%;background:#f0f3f8;color:#556a85;box-shadow:none;outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}
#doctor-notifications-dialog .doctor-notification-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#doctor-notifications-dialog .doctor-notification-close:focus-visible{outline:2px solid #6084d0;outline-offset:3px}
#doctor-notifications-dialog>[data-content]{padding:15px 20px 18px;min-height:0;overflow:auto;overscroll-behavior:contain}
#doctor-notifications-dialog [data-setup]:empty,#doctor-notifications-dialog [data-status]:empty,#doctor-notifications-dialog [data-pages]:empty{display:none}
#doctor-notifications-dialog [data-status]{font-size:12px;line-height:1.5;color:#59718f;margin:0 0 12px}
#doctor-notifications-dialog .doctor-enable-push{border:0;border-radius:11px;background:#1749df;color:#fff;font:inherit;font-size:13px;font-weight:650;padding:11px 15px;margin:0 0 14px;min-height:42px;cursor:pointer}
#doctor-notifications-dialog .doctor-notification-list{max-height:50dvh;overflow:auto;overscroll-behavior:contain;gap:7px;padding:1px}
#doctor-notifications-dialog .doctor-notification-list>button{display:flex;flex-direction:column;gap:7px;border-radius:12px;padding:12px 13px;background:#f7f9fd;border:1px solid #e4ebf5;font-size:13px;line-height:1.5}
#doctor-notifications-dialog .doctor-notification-list time{font-size:10px}
#doctor-notifications-dialog .doctor-notification-empty{color:#6d7e95;font-size:13px;padding:12px 0;margin:0}
#doctor-notifications-dialog .doctor-notification-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px;color:#677b97;font-size:12px}
#doctor-notifications-dialog .doctor-notification-pages button{width:34px;height:32px;border:1px solid #dce5f3;border-radius:9px;color:#315ca7;background:#f4f7fc;cursor:pointer}
#doctor-notifications-dialog .doctor-notification-pages button:disabled{opacity:.4;cursor:default}
@media(max-width:849px){
 #app .head .doctor-wordmark{width:106px}#app .head .doctor-brand-name{font-size:19px}
 #app .head .doctor-brand-mark{width:40px;height:20px}#app .head .brand .doctor-brand-mark img{left:-10px;top:-20px;width:60px!important;height:60px!important}
}
@media(max-width:600px){#app .doctor-header-actions .doctor-notification-button,#app .doctor-header-actions .doctor-header-logout{min-height:32px}#doctor-notifications-dialog>header{padding:15px 16px}#doctor-notifications-dialog>[data-content]{padding:12px 16px 16px}#doctor-notifications-dialog h2{font-size:19px}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){#app .doctor-header-actions .doctor-notification-button,#app .doctor-header-actions .doctor-header-logout{background:#f1f5fc;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:#bfcee5;color:#153c80}}

/* 0.8.70 — label then bell; one sliding glass capsule on mobile. */
#app .doctor-header-actions{flex-wrap:nowrap;gap:10px}
#app .doctor-header-actions #headlabel{order:0;flex:0 1 auto}
#app .doctor-header-actions #doctor-notification-entry{order:1;flex:none}
@media(max-width:849px){
 #app .doctor-header-actions{flex-wrap:nowrap;gap:8px}
 #app .doctor-header-actions #headlabel{flex:0 1 auto;font-size:11px;line-height:1.25;max-width:112px;overflow-wrap:normal}
 #app .doctor-header-actions .doctor-notification-button{display:flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:7px}
 #app .doctor-header-actions .doctor-notification-label{display:none}
 #app .doctor-header-actions .doctor-notification-icon{margin-right:0}
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{
  gap:0!important;border-radius:999px;isolation:isolate;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 8px 28px #16335f20,inset 0 1px 0 #ffffffed,inset 0 -1px 0 #ffffff80;
 }
 #app.doctor-cabinet-active .nav::before,#app.doctor-home-active .nav::before{
  content:"";position:absolute;pointer-events:none;z-index:0;left:6px;top:6px;bottom:6px;
  width:calc((100% - 12px)/5);box-sizing:border-box;border-radius:999px;
  transform:translateX(calc(var(--doctor-nav-index,0)*100%));
  transition:transform .42s cubic-bezier(.22,1,.36,1);
  background:linear-gradient(140deg,rgba(255,255,255,.88),rgba(201,221,255,.72));
  border:1px solid rgba(151,181,236,.35);
  box-shadow:inset 0 1px 0 #fffffffa,inset 0 -1px 1px #a5bce033,0 2px 9px #214b9820;
 }
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{
  position:relative;z-index:1;background:transparent!important;border-color:transparent;border-radius:999px;box-shadow:none;
  transition:color .2s ease;
 }
 #app.doctor-cabinet-active .nav button.active,#app.doctor-home-active .nav button.active{
  background:transparent!important;border-color:transparent;box-shadow:none;color:#1749df;
 }
 @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{background:rgba(255,255,255,.62)!important;-webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%)}
 }
}
@media(max-width:849px) and (prefers-reduced-motion:reduce){
 #app.doctor-cabinet-active .nav::before,#app.doctor-home-active .nav::before,#app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{transition:none}
}
@media(max-width:849px) and (prefers-reduced-transparency:reduce),(max-width:849px) and (prefers-contrast:more){
 #app.doctor-cabinet-active .nav,#app.doctor-home-active .nav{background:#fff!important;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:#a5b6d0}
 #app.doctor-cabinet-active .nav::before,#app.doctor-home-active .nav::before{background:#e2ebff;border-color:#7294dc;box-shadow:none}
 #app.doctor-cabinet-active .nav button,#app.doctor-home-active .nav button{color:#172b47}
 #app.doctor-cabinet-active .nav button.active,#app.doctor-home-active .nav button.active{color:#123fba}
}

/* Long clinic names stay inside the right-hand header group. */
#app .doctor-header-actions #headlabel{max-width:320px;overflow-wrap:anywhere}
@media(max-width:849px){#app .doctor-header-actions #headlabel{max-width:112px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere}}

/* A clasp is an independent tooth assignment, retained alongside rings/supports. */
#app .tooth-clasp-mark{fill:none;stroke:#8651ba;stroke-width:2.6;stroke-linecap:round;vector-effect:non-scaling-stroke;pointer-events:none}#app .tooth.clasp:not(.ring):not(.support):not(.both):not(.pending) .tooth-outline{fill:#f1e7ff;stroke:#8651ba}

.doctor-composition-updates{margin:16px 0;padding:14px;border:1px solid #cddcfa;border-radius:14px;background:#f1f6ff}.doctor-composition-updates p{overflow-wrap:anywhere;line-height:1.55}.doctor-composition-updates small{color:#6b7f9c}

/* Product picker: categories are visible in the list at every viewport width. */
#modal .doctor-product-filters{flex-wrap:wrap;overflow:visible;gap:6px;padding:12px 0 6px}
#modal .doctor-product-filters .pill{max-width:100%;white-space:normal;text-align:left;line-height:1.35;min-height:36px;font-size:12px}
.doctor-product-catalog{min-width:0;padding-top:4px}
.doctor-product-group{margin:18px 0 0;border:1px solid #dce5f3;border-radius:12px;overflow:hidden;background:#fff}
.doctor-product-group:first-child{margin-top:6px}
.doctor-product-group-title{margin:0;padding:11px 12px;border-bottom:1px solid #dce5f3;background:#edf3ff;color:#1743bd;font-size:15px;line-height:1.4;font-weight:800;overflow-wrap:anywhere}
.doctor-product-group .item{margin:0;padding:13px 12px;min-height:48px;gap:12px;font-size:14px;line-height:1.45}
.doctor-product-group .item>b:first-child{min-width:0;overflow-wrap:anywhere}
.doctor-product-group .item>.price{flex-shrink:0;font-size:14px}

.clinic-access-summary p,.clinic-access-home p{margin:8px 0;line-height:1.55}.clinic-access-state{margin-top:6px;white-space:normal}.clinic-access-active{background:#eaf6ed;color:#247449;border-color:#d4e7dc}.clinic-invite-consent{display:block;margin:18px 0;font-size:14px;line-height:1.7}.clinic-invite-consent input{width:18px;height:18px;vertical-align:middle;margin-right:7px}.clinic-order-assignment{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.clinic-order-assignment .btn2{white-space:normal}@media(max-width:600px){.clinic-order-assignment .btn2{width:100%}}

/* Branch identity: independent text/action blocks, safe on narrow screens. */
.clinic-branch-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px}
.clinic-branch-copy{min-width:0;flex:1}.clinic-branch-label{display:block;color:#677d9b;font-size:13px;font-weight:700;letter-spacing:.04em;margin-bottom:8px}
.clinic-branch-copy h2{margin:0 0 10px;font-size:21px;line-height:1.3;overflow-wrap:anywhere}.clinic-branch-address{margin:0;font-size:15px;line-height:1.6;overflow-wrap:anywhere}.clinic-branch-billing{margin:8px 0 0;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.clinic-branch-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}.clinic-branch-actions .btn2{margin:0;white-space:normal}
#nav [data-nav="branches"][hidden]{display:none!important}
@media(max-width:640px){.clinic-branch-card{align-items:stretch;flex-direction:column;padding:18px;gap:16px}.clinic-branch-actions{justify-content:flex-start}.clinic-branch-actions .btn2{flex:1}#nav [data-nav="branches"]{display:none}}

@media(max-width:849px){#app .nav button[data-nav="branches"]{display:none!important}}

.order-product-options{display:grid;gap:12px;margin-top:16px}.order-product-options label{display:grid;gap:8px}.order-product-options select{width:100%;min-height:44px}.order-product-options .notice p{margin-bottom:0}

/* Orders starts with search; rare service action lives with the home actions. */
#app .doctor-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#app .order-filters:first-child{margin-top:0}
#app .order-filters .order-search-field{gap:0}
#app .order-payment-note[hidden]{display:none}
@media(max-width:650px){
 #app .doctor-home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #app .doctor-home-actions #new{grid-column:1/-1}
 #app .doctor-home-actions button{min-width:0;min-height:46px;white-space:normal;font-size:14px!important;padding:11px 9px!important}
}
