[data-clinical-pane="odontogram"].active{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
[data-clinical-pane="odontogram"].active:has(#odontogramForm:not([hidden])){grid-template-columns:minmax(0,1fr) 330px}
[data-clinical-pane="odontogram"] .odontogram-heading,[data-clinical-pane="odontogram"] .chart-history{grid-column:1/-1}
[data-clinical-pane="odontogram"] .odontogram-shell{grid-column:1;grid-row:2;margin:0}
[data-clinical-pane="odontogram"] .odontogram-editor{grid-column:2;grid-row:2;margin:0;position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto;border-radius:20px}
[data-clinical-pane="odontogram"] .odontogram-editor .form-grid{grid-template-columns:1fr}
[data-clinical-pane="odontogram"] .odontogram-editor .field{grid-column:auto}
.arch-title{min-width:920px;margin:0 0 8px;color:#294768;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.tooth-arch{grid-template-columns:repeat(16,minmax(48px,1fr));gap:5px;align-items:stretch}
.tooth-cell{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:3px;border-radius:13px;animation:tooth-in .35s ease both;animation-delay:var(--tooth-delay)}
.tooth-arch.lower .tooth-cell{flex-direction:column-reverse}
.tooth-cell:has(.tooth-button.selected){background:#edf6ff;box-shadow:inset 0 0 0 1px #b7d7ff}
.tooth-cell .tooth-button{width:100%;height:73px;animation:none}
.tooth-cell .tooth-button.selected{background:transparent;box-shadow:none}
.tooth-cell .tooth-shape{width:34px;height:52px}
.tooth-surface-map{display:block;width:34px;height:34px;overflow:visible;filter:drop-shadow(0 2px 2px rgba(23,65,108,.07))}
.tooth-surface-map path{fill:#fff;stroke:#aebfd2;stroke-width:1;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .15s ease,stroke .15s ease,transform .15s ease;transform-box:fill-box;transform-origin:center}
.tooth-surface-map path:hover{fill:#e9f4ff;stroke:#1769e0;transform:scale(.94)}
.tooth-surface-map path.finding{fill:#ff7183;stroke:#df3f56}
.tooth-surface-map path.planned{fill:#ffc85d;stroke:#d9950c}
.tooth-surface-map path.completed{fill:#3cb6ff;stroke:#167ed1}
.tooth-surface-map path.active{stroke:#075fc9;stroke-width:2.5;filter:drop-shadow(0 0 2px rgba(22,113,232,.35))}
.odontogram-bite-line{margin:8px 0;height:25px}
.odontogram-hint{margin-top:12px}
@media(max-width:1150px){[data-clinical-pane="odontogram"].active:has(#odontogramForm:not([hidden])){grid-template-columns:1fr}[data-clinical-pane="odontogram"] .odontogram-editor{grid-column:1;grid-row:auto;position:static;max-height:none}[data-clinical-pane="odontogram"] .odontogram-editor .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}[data-clinical-pane="odontogram"] .odontogram-editor .field.full-field{grid-column:1/-1}}
@media(max-width:600px){[data-clinical-pane="odontogram"] .odontogram-editor .form-grid{grid-template-columns:1fr}.arch-title{min-width:820px}}

/* ===================== v15.17.4 · Odontograma visual ===================== */
.odontogram-chart{padding:20px 22px 12px}
.odo-summary{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;min-width:0}
.odo-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;border:1px solid #e1e9f2;background:#fff;color:#4c5f78;font-size:12px;font-weight:700}
.odo-chip b{font-size:15px;color:#0b2a55}
.odo-chip::before{content:"";width:10px;height:10px;border-radius:50%;background:#b8c6d6}
.odo-chip.finding::before{background:#e5384f}.odo-chip.planned::before{background:#f59e0b}.odo-chip.completed::before{background:#1677e5}
.odo-chip.neutral::before{display:none}
.odontogram-orientation{font-size:10px;color:#7d8da3}
.odo-arch,.odontogram-bite-line,.odontogram-orientation,.odontogram-hint{min-width:900px}
.arch-title{min-width:0;margin:6px 0;font-size:11px;color:#1f3b5e}
.odo-row{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);align-items:stretch}
.odo-midline{position:relative}
.odo-midline::before{content:"";position:absolute;left:50%;top:-4px;bottom:-4px;border-left:2px dashed #c9d6e5}
.odo-quadrant{display:flex;flex-direction:column;gap:4px}
.odo-lower .odo-quadrant{flex-direction:column-reverse}
.odo-quadrant-label{font-size:9.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#93a3b8;text-align:center}
.odo-quadrant .tooth-arch{min-width:0;gap:3px}
.tooth-cell{gap:4px;padding:4px 2px;border-radius:14px}
.tooth-cell:hover{background:#f3f8fe}
.tooth-cell:has(.tooth-button.selected){background:#e8f2ff;box-shadow:inset 0 0 0 2px #1671e8}
.tooth-cell .tooth-button{height:auto;min-height:92px;padding:2px 0;gap:4px}
.tooth-cell .tooth-button:hover{transform:none;background:transparent}
.tooth-cell .tooth-shape{width:36px;height:60px}
.tooth-svg.is-lower{transform:none}
.tooth-number{font-size:11px;font-weight:800;color:#2b4566;padding:2px 6px;border-radius:7px}
.tooth-button.selected .tooth-number{background:#1671e8;color:#fff}
.tooth-root{fill:#f4ecdc;stroke:#bba98a;stroke-width:1.4;stroke-linejoin:round}
.tooth-silhouette{fill:url(#dhEnamel) #fff;stroke:#9db1c7;stroke-width:1.6}
.tooth-svg .tooth-crown{fill:url(#dhEnamel) #fbfdff}
.tooth-detail{stroke:#b9c7d6;opacity:.9}
.tooth-button.finding{--tooth-color:#ffe4e8;--tooth-stroke:#e5384f}
.tooth-button.planned{--tooth-color:#fff1d3;--tooth-stroke:#e08e00}
.tooth-button.completed{--tooth-color:#e2efff;--tooth-stroke:#1677e5}
.tooth-button.finding .tooth-crown,.tooth-button.planned .tooth-crown,.tooth-button.completed .tooth-crown{fill:var(--tooth-color);stroke:var(--tooth-stroke)}
.tooth-button.finding .tooth-detail,.tooth-button.planned .tooth-detail,.tooth-button.completed .tooth-detail{stroke:var(--tooth-stroke);opacity:.45}
.tooth-roots.is-replaced{opacity:.18}
.tooth-svg.is-missing .tooth-root,.tooth-svg.is-missing .tooth-crown,.tooth-svg.is-missing .tooth-detail{opacity:.28;stroke-dasharray:3 3}
.tooth-cell small.tooth-count,.tooth-button small{width:18px;height:18px;font-size:9px;top:16px;right:0}
.tooth-arch.lower .tooth-button small{top:auto;bottom:16px}
.tooth-surface-map{width:36px;height:36px;filter:none}
.tooth-surface-map path{fill:#fff;stroke:#a9bbcf;stroke-width:1.2}
.tooth-surface-map path:hover{fill:#e3f0ff;stroke:#1671e8;transform:none}
.tooth-surface-map path.finding{fill:#e5384f;stroke:#c22a3f}
.tooth-surface-map path.planned{fill:#f59e0b;stroke:#c97d00}
.tooth-surface-map path.completed{fill:#1677e5;stroke:#0f5cb6}
.tooth-surface-map path.active{stroke:#0b2a55;stroke-width:2.6;filter:none}
.odontogram-bite-line{height:26px;margin:6px 0;color:#7d8da3;font-size:9.5px}
.odontogram-bite-line i{height:2px;background:linear-gradient(90deg,transparent,#cfdbea 15%,#cfdbea 85%,transparent)}
.odontogram-hint{font-size:12px;color:#5f7088;margin-top:14px}
/* Leyenda */
[data-clinical-pane="odontogram"] .chart-legend{display:grid;grid-template-columns:1fr;gap:12px;justify-content:stretch;padding:16px 20px}
.odo-legend-group{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.odo-legend-group strong{font-size:11px;font-weight:800;color:#1f3b5e;margin-right:4px;white-space:nowrap}
[data-clinical-pane="odontogram"] .chart-legend span{gap:6px;padding:5px 10px;font-size:11px;color:#41546d}
[data-clinical-pane="odontogram"] .chart-legend i{width:12px;height:12px;border-radius:50%}
[data-clinical-pane="odontogram"] .chart-legend .legend-finding i{background:#e5384f}
[data-clinical-pane="odontogram"] .chart-legend .legend-planned i{background:#f59e0b}
[data-clinical-pane="odontogram"] .chart-legend .legend-completed i{background:#1677e5}
.legend-tooth{width:16px!important;height:26px!important;flex:none}
@media(max-width:900px){[data-clinical-pane="odontogram"] .chart-legend{grid-template-columns:1fr}}
/* Editor visual */
.odo-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.odo-picker-field{position:relative}
.odo-condition-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:6px}
.odo-condition-picker button{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:74px;padding:8px 4px;border:1px solid #dbe5f0;border-radius:12px;background:#fff;color:#33475f;font:inherit;font-size:11px;font-weight:700;line-height:1.2;text-align:center;cursor:pointer}
.odo-condition-picker button:hover{border-color:#1671e8;background:#f3f8ff}
.odo-condition-picker button.is-active{border-color:#1671e8;background:#e8f2ff;box-shadow:inset 0 0 0 1.5px #1671e8;color:#0b2a55}
.odo-condition-picker .legend-tooth{width:22px!important;height:34px!important}
.odo-status-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.odo-status-picker button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:6px;border:1px solid #dbe5f0;border-radius:12px;background:#fff;font:inherit;font-size:12px;font-weight:700;color:#33475f;cursor:pointer}
.odo-status-picker button i{width:11px;height:11px;border-radius:50%;flex:none}
.odo-status-picker .finding i{background:#e5384f}.odo-status-picker .planned i{background:#f59e0b}.odo-status-picker .completed i{background:#1677e5}
.odo-status-picker button.is-active.finding{background:#fff0f2;border-color:#e5384f;color:#9b1c2e}
.odo-status-picker button.is-active.planned{background:#fff6e2;border-color:#f59e0b;color:#7a4b00}
.odo-status-picker button.is-active.completed{background:#e8f2ff;border-color:#1677e5;color:#0b4a99}
/* Historial con icono */
.chart-history-row{grid-template-columns:28px 1fr 1fr;align-items:center}
.chart-history-row .legend-tooth{grid-row:span 2;width:20px!important;height:32px!important}
.chart-history-row small{grid-column:2/-1}
