/* ReSiRai - Study form + graphical teeth chart */
#newStudySection,#editStudySection{max-width:1180px;margin-inline:auto;background:linear-gradient(180deg,#fff,#fbfdff)}
#newStudySection .section-header,#editStudySection .section-header{padding:14px 18px;margin:-4px -4px 20px;border:1px solid #dbe7f5;border-radius:12px;background:#f7fbff}
#newStudySection form,#editStudySection form{padding:18px;border:1px solid #dce6f1;border-radius:12px;background:#fff}
#newStudySection .form-grid,#editStudySection .form-grid{padding:16px;border:1px solid #e2e8f0;border-radius:10px;background:#fbfdff}
#newStudySection .form-actions,#editStudySection .form-actions{padding-top:16px;border-top:1px solid #e2e8f0;justify-content:flex-start}
.study-teeth-panel{grid-column:1/-1;margin-top:6px;padding:16px;border:1px solid #d7e4f2;border-radius:12px;background:#fff;animation:studyTeethPanelIn .18s ease}
.teeth-chart{direction:rtl;margin-top:4px;color:#1f2937}
.teeth-chart-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;margin-bottom:14px;border-radius:10px;background:#f1f7ff;border:1px solid #d9e9fb}
.teeth-chart-toolbar strong{margin-left:auto;font-size:16px;color:#174a86}.teeth-chart-view-label{font-size:13px;color:#64748b}
.teeth-view-button{padding:6px 12px;background:#fff;color:#31506f;border:1px solid #cbd9e8}.teeth-view-button.active{background:#2563eb;color:#fff;border-color:#2563eb}
.teeth-chart-body{display:grid;gap:14px}.teeth-chart-group{padding:14px;overflow:auto;border:1px solid #e2e8f0;border-radius:12px;background:linear-gradient(180deg,#fbfdff,#f6faff)}.teeth-chart-group:nth-child(2){background:linear-gradient(180deg,#fbfff9,#f4fbf0)}
.teeth-chart-group-title{font-weight:bold;color:#17579a;margin-bottom:10px}.teeth-chart-row{direction:ltr;display:flex;justify-content:center;align-items:flex-end;gap:3px;min-width:700px;padding:5px 0}
.tooth-button{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;width:40px;min-width:40px;padding:3px 2px;background:transparent!important;color:#334155;border:1px solid transparent;border-radius:8px;box-shadow:none!important;transform:none!important}.tooth-shape{display:block;width:32px;height:38px}.tooth-shape svg{width:100%;height:100%;overflow:visible}.tooth-shape path{fill:#fffdf7;stroke:#9a8d7d;stroke-width:1.5;filter:drop-shadow(0 2px 1px rgba(15,23,42,.12));transition:.15s}.tooth-number{font-size:11px;font-weight:bold;direction:ltr}.tooth-button:hover .tooth-shape path{stroke:#2563eb;fill:#eff6ff}.tooth-button.selected .tooth-shape path{fill:#bfdbfe;stroke:#1671e8;stroke-width:2.3}.tooth-button.selected .tooth-number{color:#0b62c4}.teeth-chart-selected{margin-top:12px;padding:9px 12px;border-radius:8px;background:#f8fafc;color:#475569;font-size:13px}
.teeth-view-linear .tooth-shape{display:none}.teeth-view-linear .tooth-button{width:35px;min-width:35px;padding:7px 3px;border:1px solid #d9e2ec;background:#fff!important}.teeth-view-linear .tooth-button.selected{background:#2563eb!important;color:#fff}.teeth-view-linear .tooth-button.selected .tooth-number{color:#fff}.teeth-view-anatomical .teeth-chart-row{gap:5px}.teeth-view-anatomical .tooth-button{width:43px;min-width:43px}
.teeth-view-arch .teeth-chart-group{padding-top:18px;padding-bottom:18px}.teeth-view-arch .teeth-chart-row{gap:1px;min-height:92px;align-items:center}.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(1),.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(16){transform:translateY(24px)!important}.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(2),.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(15){transform:translateY(16px)!important}.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(3),.teeth-view-arch .teeth-chart-row-upper .tooth-button:nth-child(14){transform:translateY(10px)!important}.teeth-view-arch .teeth-chart-row-lower .tooth-button:nth-child(1),.teeth-view-arch .teeth-chart-row-lower .tooth-button:nth-child(16){transform:translateY(-22px)!important}.teeth-view-arch .teeth-chart-row-lower .tooth-button:nth-child(2),.teeth-view-arch .teeth-chart-row-lower .tooth-button:nth-child(15){transform:translateY(-15px)!important}
/* Patient page: collapsible Study rows. The accordion itself is styled in
   study-status.css, which the patient page loads; the rules that lived here targeted
   an older ".study-card" markup that app.js no longer builds. */
@keyframes studyTeethPanelIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){#newStudySection form,#editStudySection form{padding:10px}.study-teeth-panel{padding:9px}.teeth-chart-toolbar strong{width:100%;margin:0}.teeth-chart-group{padding:9px}.teeth-chart-row{justify-content:flex-start}.tooth-button{min-width:38px}}
