/* css/odontograma.css — odontograma FDI */
.odo-wrap { --odo-cara: #fff; --odo-borde: #94a3b8; container-type: inline-size; }
.oscuro .odo-wrap { --odo-cara: #1e2a26; --odo-borde: #5b6b66; }
.odo-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.odo-tit { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 0 0 2px; }
.odo-tit .ico { width: 22px; height: 22px; color: var(--primary); }
.odo-ver { display: flex; flex-direction: column; gap: 2px; }
.odo-ver .input { width: 250px; max-width: 100%; padding: 6px 10px; }
.odo-herr .card-b { display: flex; flex-direction: column; gap: 8px; }
.odo-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.odo-grupo > .small { width: 44px; }
.odo-herr .chip { font: inherit; font-size: .8rem; cursor: pointer; }
.odo-herr .chip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.odo-herr .chip b { font-size: .72rem; min-width: 16px; text-align: center; }
.odo-herr .chip .ico { width: 14px; height: 14px; }
.odo-herr .chip.activo { border-color: var(--primary); background: var(--primary-50, #e7f5ef); color: var(--primary-700, #0a5454); box-shadow: 0 0 0 2px var(--primary) inset; }
.odo-lienzo { overflow-x: auto; }
.odo-arco { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 14px 0; margin: 0 auto 18px; }
.odo-arco.infantil { gap: 10px 0; }
.odo-arco > .odo-q:nth-child(odd) { padding-right: 10px; border-right: 2px dashed var(--border-strong); }
.odo-arco > .odo-q:nth-child(even) { padding-left: 10px; }
.odo-arco > .odo-q:nth-child(-n+2) { padding-bottom: 12px; border-bottom: 2px dashed var(--border-strong); }
.odo-qn { display: none; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.odo-fila { display: flex; gap: 4px; }
.odo-fila.inf { flex-direction: row; }
.odo-p { display: flex; flex-direction: column; align-items: center; width: 46px; cursor: pointer; border-radius: 8px; padding: 2px 0; position: relative; outline: none; transition: background .15s; }
.odo-fila.inf .odo-p .odo-num { order: 3; }
.odo-fila.inf .odo-p .odo-lat { order: 2; }
.odo-lat svg { width: 40px; height: 58px; display: block; }
.dt-endo { stroke: #7c3aed; stroke-width: 2.5; stroke-linecap: round; }
.odo-p:hover, .odo-p:focus-visible { background: var(--surface-2); }
.odo-p.sel { background: var(--surface-2); box-shadow: 0 0 0 2px var(--primary); }
.odo-num { font: 600 .7rem var(--font); color: var(--muted); line-height: 1.3; }
.odo-svg svg { width: 40px; height: 40px; display: block; }
.odo-svg polygon, .odo-svg rect[data-cara] { stroke: var(--odo-borde); stroke-width: 1; transition: fill .15s; }
.odo-wrap:not(.solo-lectura) .odo-svg [data-cara]:hover { stroke: var(--primary); stroke-width: 2; }
.odo-svg svg.aus [data-cara] { opacity: .35; }
.odo-sig { font: 800 .66rem var(--font); height: 12px; line-height: 12px; }
.odo-p.pend::after { content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #ea580c; box-shadow: 0 0 0 2px var(--surface); }
.odo-p.nota .odo-num { text-decoration: underline dotted; }
.odo-ley { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--border); }
.odo-ley span { display: inline-flex; align-items: center; gap: 5px; }
.odo-ley b { font-size: .7rem; }
.odo-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.odo-dot.pend { border-radius: 50%; background: #ea580c; }
.odo-bajo { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.odo-bajo > .card { margin: 0; }
.odo-bajo .lista li { padding: 10px 4px; }
.odo-bajo .lista li.fila-link { cursor: pointer; }
.odo-bajo .lista li b { min-width: 22px; display: inline-block; }
@container (max-width: 760px) {
  .odo-arco { grid-template-columns: auto; justify-content: center; }
  .odo-arco > .odo-q:nth-child(n) { padding: 0 0 10px; border: 0; }
  .odo-arco > .odo-q:nth-child(2) { border-bottom: 2px dashed var(--border-strong); padding-bottom: 14px; }
  .odo-qn { display: block; }
}
@container (max-width: 400px) { .odo-p { width: 40px; } .odo-svg svg, .odo-lat svg { width: 34px; } .odo-svg svg { height: 34px; } .odo-lat svg { height: 49px; } .odo-fila { gap: 2px; } }
@media (max-width: 760px) {
  .odo-herr { position: sticky; top: calc(env(safe-area-inset-top) + 64px); z-index: 5; box-shadow: 0 10px 24px -18px rgba(0,0,0,.35); }
  .odo-herr .card-b { padding: 10px 12px; gap: 6px; }
  .odo-grupo { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .odo-grupo::-webkit-scrollbar { display: none; }
  .odo-grupo .chip { flex: none; }
  .odo-herr p { display: none; }
}
@media print {
  .cc-side, .cc-top, .cc-tabbar, .cc-foot, .odo-herr, #odoGuardar, .odo-cab .btn, .odo-ver, #odoAviso .btn { display: none !important; }
  .odo-wrap { --odo-cara: #fff; }
  .odo-p.sel { box-shadow: none; }
  .card { break-inside: avoid; box-shadow: none; }
}
/* Plan por fases y avance */
.odo-fase { padding: 10px 0 2px; border: 0 !important; color: var(--tinta, inherit); }
.odo-avance { display: block !important; padding-bottom: 10px; }
.odo-avance .barra { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.odo-avance .barra i { display: block; height: 100%; background: var(--ok, #059669); border-radius: 99px; }
/* Periodontograma */
.txt-ok { color: var(--ok, #059669); font-weight: 600; }
.pe-scroll { overflow-x: auto; }
.pe-tab { border-collapse: collapse; margin: 0 auto; }
.pe-tab th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; padding: 2px 6px 2px 0; white-space: nowrap; }
.pe-tab td { padding: 2px 0; text-align: center; }
.pe-tab { table-layout: fixed; }
.pe-c0 { width: 78px; } .pe-c { width: 54px; }
.pe-tab tr:not(.pe-dib) td:nth-child(9) { box-shadow: inset -2px 0 var(--border); }
.pe-tres { justify-content: center; }
.pe-dib td { padding: 0; }
.pe-dib th { vertical-align: middle; font-weight: 700; color: var(--text); }
.pe-svg { display: block; }
.pe-reg { stroke: var(--border); stroke-width: .5; opacity: .6; } .pe-reg.f { opacity: 1; }
.pe-lac { stroke: var(--muted); stroke-width: .8; stroke-dasharray: 2 2; }
.dt-corona { fill: #fdfcf7; stroke: #8a8577; stroke-width: 1; }
.dt-raiz { fill: #f3e9cf; stroke: #8a8577; stroke-width: 1; }
.dt-impl path { fill: #cbd5e1; stroke: #64748b; } .dt-impl line { stroke: #64748b; stroke-width: 1; }
.dt-aus { opacity: .18; }
.pe-bolsa { fill: rgba(37, 99, 235, .22); stroke: none; }
.pe-margen { fill: none; stroke: #dc2626; stroke-width: 1.6; stroke-linejoin: round; }
.pe-fondo { fill: none; stroke: #2563eb; stroke-width: 1.6; stroke-linejoin: round; }
.pe-ant { fill: none; stroke: #94a3b8; stroke-width: 1.2; stroke-dasharray: 3 2; }
.pe-furca circle { fill: #fff; stroke: #b45309; stroke-width: 1.4; } .pe-furca path { fill: #b45309; } .pe-furca.f3 circle { fill: #b45309; }
.pe-in.pe-g { width: 17px; font-size: 10px; color: #b91c1c; }
.pe-punto.pe-s.on { background: #eab308; border-color: #eab308; }
.pe-punto.pe-p.on { background: #2563eb; border-color: #2563eb; }
.pe-imp { font: 600 10px/1 inherit; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.pe-imp.on { background: #e2e8f0; color: #334155; border-color: #64748b; }
.pe-cab td { padding: 4px 0; }
html.oscuro .dt-corona { fill: #e7e5df; } html.oscuro .dt-raiz { fill: #cfc4a8; }
.pe-tres { display: flex; gap: 0; }
.pe-tres span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pe-in { width: 17px; height: 22px; padding: 0; text-align: center; font: 600 11px/1 var(--mono, monospace); border: 1px solid var(--border); border-radius: 3px; background: var(--surface); color: inherit; }
.pe-in.pe-4 { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.pe-in.pe-6 { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.pe-punto { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: transparent; cursor: pointer; }
.pe-punto.on { background: #dc2626; border-color: #dc2626; }
.pe-sel { font-size: 12px; padding: 1px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: inherit; }
.pe-num { font: 700 12px/1 var(--mono, monospace); padding: 4px 6px; border-radius: 6px; border: 0; background: var(--surface-2); color: inherit; cursor: pointer; }
.pe-num.aus { text-decoration: line-through; opacity: .45; }
.pe-aus { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--surface-2) 4px 6px); }
.pe-ley { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin: 0 4px 0 10px; }
.pe-ley.pe-4 { background: #fef3c7; border: 1px solid #f59e0b; }
.pe-ley.pe-6 { background: #fee2e2; border: 1px solid #ef4444; }
.pe-ley.lin { height: 0; border-radius: 0; border-top: 2px solid; width: 16px; vertical-align: 3px; }
html.oscuro .pe-in.pe-4 { background: #4a3710; color: #fcd34d; }
html.oscuro .pe-in.pe-6 { background: #4c1515; color: #fca5a5; }
@media print { .pe-in, .pe-imp { border: 0; } #peGuardar, #peVer { display: none; } .pe-scroll { overflow: visible; } .pe-tab { zoom: .78; } }
