:root{--ink:#193f3b;--green:#167a66;--light:#edf5f1;--muted:#758782;--line:#dde6e1}*{box-sizing:border-box}body{margin:0;background:#f6f8f5;color:var(--ink);font:14px/1.6 system-ui,-apple-system,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:0;border-radius:7px;background:var(--green);color:white;padding:11px 18px;font-weight:600}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:wait}a{color:var(--green)}[hidden]{display:none!important}aside{position:fixed;inset:0 auto 0 0;width:252px;background:#fff;border-right:1px solid var(--line);padding:32px 20px}.brand{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:700;color:var(--ink);text-decoration:none}.brand-mark{display:grid;place-items:center;width:40px;height:42px;border-radius:12px 12px 18px 18px;background:var(--green);color:#fff;font-size:24px;font-weight:700}.brand small{display:block;font-size:9px;letter-spacing:2px;font-weight:500}.nav-caption{font-size:10px;letter-spacing:1.7px;color:var(--muted);margin:44px 10px 15px}nav button{display:block;text-align:left;width:100%;margin:5px 0;background:transparent;color:#5d726b;font-weight:500;padding:13px 12px}nav button.active{background:var(--light);color:var(--green)}.sidebar-bottom{position:absolute;bottom:22px;font-size:11px;color:var(--muted)}.sidebar-bottom p{font-size:10px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:5px}main{margin-left:252px}header{height:79px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 40px;background:#fff;color:var(--muted);font-size:12px}#account{color:var(--ink)}#content{padding:34px 40px;max-width:1500px;margin:auto}h1{font-size:30px;font-weight:600;line-height:1.2;letter-spacing:-1px;margin:8px 0 12px}h2{font-size:19px;font-weight:600;margin:0 0 15px}h3{font-size:14px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--green);font-weight:700}.muted{color:var(--muted)}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.heading p{margin:0}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:24px 0}.metric,.panel{background:white;border:1px solid var(--line);border-radius:10px;padding:23px}.metric small{color:var(--muted)}.metric strong{display:block;font-size:32px;font-weight:500;margin:8px 0}.metric .caption{font-size:11px;color:var(--muted)}.metric:first-child{background:#eaf3ee}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:20px}.toolbar input{max-width:350px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}th{text-align:left;font-size:10px;letter-spacing:.8px;color:var(--muted);font-weight:600;background:#f6f8f6}td,th{padding:15px;border-bottom:1px solid #edf0ed}tbody tr:last-child td{border-bottom:0}.patient-link{border:0;background:none;padding:0;color:var(--green);font-weight:600}.badge{display:inline-block;background:#edf5f0;color:#33816a;border-radius:20px;padding:3px 10px;font-size:11px}.subtle,.secondary{background:#f0f5f1;color:var(--ink)}.subtle{padding:6px 10px;font-size:12px}.empty{text-align:center;padding:45px;color:var(--muted)}footer{padding:10px 40px 30px;font-size:11px;color:var(--muted)}label{display:block;margin:13px 0;color:#526b61;font-size:12px}input,select,textarea{display:block;width:100%;padding:10px 12px;border:1px solid #d5dfd8;border-radius:6px;background:white;color:var(--ink);margin-top:6px}input[type=checkbox]{display:inline;width:auto;margin-right:7px}textarea{min-height:95px;resize:vertical}:focus-visible{outline:3px solid #a6cebb;outline-offset:2px}.login{max-width:430px;margin:10vh auto;padding:30px}.login small{display:block;margin-top:25px;color:var(--muted);font-size:11px}.login button{width:100%;margin-top:14px}.login h1{font-size:30px}dialog{border:1px solid var(--line);border-radius:14px;padding:30px;width:min(720px,95vw);max-height:90vh;color:var(--ink)}dialog::backdrop{background:#183c3655;backdrop-filter:blur(3px)}.close{position:absolute;right:12px;top:10px;background:none;color:var(--muted);font-size:25px;padding:0 8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.actions{display:flex;gap:10px;margin-top:20px}.notice{padding:13px 17px;background:#f4f1e5;border-radius:7px;color:#807044;font-size:12px;margin:20px 0}.formula{overflow:auto;text-align:center}.formula svg{min-width:680px;width:100%;height:auto}.tooth{cursor:pointer;fill:#f3f6f3;stroke:#b1c4b8;stroke-width:1.5}.tooth.healthy{fill:#bce4d2;stroke:#55a587}.tooth.changed{fill:#f3d8af;stroke:#c18e45}.tooth.missing{fill:#e5e8e6;stroke-dasharray:3 3}.tooth:hover,.tooth:focus{stroke:#145b4e;stroke-width:3}.tooth text{fill:#456556;stroke:none;font-size:11px}.jaw{font-size:10px;letter-spacing:2px;color:var(--muted);text-align:center;margin:20px}.legend{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;color:var(--muted);font-size:11px;margin:18px}.legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;background:#c0cfc5}.legend .healthy{background:#71bc9e}.legend .changed{background:#d5a361}.legend .missing{background:#a4aaa7}.tabs{display:flex;gap:8px}.tabs button{background:#f2f5f2;color:var(--muted);font-size:12px}.tabs button.active{background:var(--ink);color:white}#toast{position:fixed;right:22px;bottom:22px;z-index:10;background:var(--ink);color:white;padding:15px 22px;border-radius:9px;max-width:90vw;display:none}.photos{display:flex;gap:10px;flex-wrap:wrap}.photos img{width:100px;height:90px;object-fit:cover;border-radius:6px}.bar-row{display:grid;grid-template-columns:220px 1fr 45px;gap:15px;align-items:center;margin:18px 0}.bar{height:12px;background:var(--light);border-radius:8px;overflow:hidden}.bar-fill{height:100%;background:var(--green)}progress{width:100%;accent-color:var(--green)}@media(max-width:1000px){aside{width:210px;padding:24px 12px}.brand{font-size:13px}main{margin-left:210px}#content{padding:25px 22px}header{padding:0 22px}}@media(max-width:700px){aside{position:static;width:auto;padding:16px}.nav-caption,.sidebar-bottom{display:none}nav{display:flex;overflow:auto;margin-top:14px}nav button{min-width:max-content;width:auto;font-size:12px}main{margin:0}header{height:50px;font-size:10px}#content{padding:22px 15px}h1{font-size:25px}.metrics{gap:8px}.metric{padding:14px}.metric strong{font-size:26px}.metric .caption{display:none}.heading{align-items:flex-start;flex-wrap:wrap}.panel{padding:16px}.form-grid{grid-template-columns:1fr}.bar-row{grid-template-columns:130px 1fr 25px}footer{padding:15px}.toolbar{flex-wrap:wrap}}
fieldset{border:0;padding:0;margin:0}.panel+.panel{margin-top:20px}details{margin-top:20px}summary{cursor:pointer}
.formula-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:24px;align-items:start}.panorama-box{background:#f5f8f5;padding:16px;border:1px solid var(--line);border-radius:8px}.panorama{display:block;width:100%;max-height:250px;object-fit:contain;background:#152320}.panorama-box small{display:block;color:var(--muted);margin:10px 0}.panorama-box input{max-width:100%}.change-row{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:25px;padding:20px 0;border-bottom:1px solid var(--line)}.change-row:last-child{border:0}.change-photos{display:flex;flex-direction:column;gap:12px}.change-photos img{width:100%;max-height:210px;object-fit:contain;background:#14271f;border-radius:6px}.tooth.changed{fill:#f2bd74;stroke:#a96615;stroke-width:2.5}@media(max-width:1050px){.formula-layout{grid-template-columns:1fr}.change-row{grid-template-columns:minmax(0,1fr) 180px}}@media(max-width:600px){.change-row{grid-template-columns:1fr}}
.patient-workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:22px;align-items:start;margin-bottom:22px}.patient-workspace .panel{margin:0}.patient-workspace .formula svg{min-width:620px}.patient-workspace .tabs{margin:24px 0 10px}.jaw-label{font-size:10px;fill:#92a2b6}.patient-panorama{width:100%;height:230px;object-fit:contain;background:#12212d;border-radius:8px}.panorama-placeholder{min-height:230px;border:1px dashed #cbd9ea;background:#f7faff;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;color:#607d9d}.panorama-placeholder span{font-size:36px;color:#3783cf}.panorama-placeholder small{color:#8c9bad}.registered-teeth .toolbar{flex-wrap:wrap}.patient-workspace .tooth text{font-size:13px;font-weight:600}.patient-workspace .tooth.healthy{fill:#d6eee7;stroke:#58aa93}.patient-workspace .tooth.changed{fill:#ffdfae;stroke:#c78f45}.patient-workspace h2,.registered-teeth h2{font-size:18px}@media(max-width:1100px){.patient-workspace{grid-template-columns:1fr}.patient-panorama{height:300px}}@media(max-width:700px){.patient-panorama{height:210px}}
.tooth-photo-section{margin:22px 0;padding:18px;background:#f5f8fb;border:1px solid #dce5ef;border-radius:10px}.tooth-photo-gallery{display:flex;gap:12px;flex-wrap:wrap}.tooth-photo-gallery img{width:140px;height:110px;object-fit:contain;background:#152531;border-radius:7px}.tooth-photo-section input[type=file]{max-width:100%}
