/* =========================================================
   Estilos de los componentes de la guía (demos reales)
   ========================================================= */

/* ---------- Slider de valor ---------- */
.vs-field { width: 100%; max-width: 380px; }
.vs-field > label, .vs-label { display: block; font: 400 .85rem "Roboto", sans-serif; color: #4b5563; margin-bottom: 14px; }
.vs-row { display: flex; align-items: center; gap: 10px; }
.rg-ic { color: #6b7280; display: grid; } .rg-ic .ic { width: 22px; height: 22px; }
.vs { --p: 50%; position: relative; flex: 1; height: 48px; display: flex; align-items: center; }
.vs input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 48px; margin: 0; background: transparent; cursor: pointer; position: relative; z-index: 2; }
.vs::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) var(--p), color-mix(in srgb, var(--primary) 26%, #fff) var(--p)); }
.vs input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.vs input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.vs input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; border: 0; background: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: box-shadow .15s; }
.vs input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.vs input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 12%, transparent); }
.vs input[type=range]:focus-visible { outline: none; }
.vs input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 24%, transparent); }
.vs input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 24%, transparent); }
.vs output { position: absolute; left: var(--p); top: -26px; transform: translateX(-50%) scale(.85); padding: 3px 9px; border-radius: 4px; background: #1f2937; color: #fff; font: 500 .8rem "Roboto", sans-serif; opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none; white-space: nowrap; }
.vs.discrete output { opacity: 1; transform: translateX(-50%); }
.vs:not(.discrete).active output { opacity: 1; transform: translateX(-50%); }
.vs-ticks { position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; margin-top: -1px; display: flex; justify-content: space-between; pointer-events: none; z-index: 1; }
.vs-ticks i { width: 2px; height: 2px; border-radius: 50%; background: rgba(255,255,255,.9); }
.vs-ticks i:nth-child(n) { box-shadow: 0 0 0 .5px color-mix(in srgb, var(--primary) 40%, #fff); }
/* rango doble */
.vs.range-two { --a: 20%; --b: 80%; flex: none; width: 100%; margin-top: 18px; }
.vs.range-two::before { background: color-mix(in srgb, var(--primary) 26%, #fff); }
.vs.range-two .rt-fill { position: absolute; top: 50%; height: 4px; margin-top: -2px; left: var(--a); right: calc(100% - var(--b)); background: var(--primary); border-radius: 2px; z-index: 1; }
.vs.range-two input { position: absolute; left: 0; top: 0; pointer-events: none; }
.vs.range-two input::-webkit-slider-thumb { pointer-events: auto; }
.vs.range-two input::-moz-range-thumb { pointer-events: auto; }
.vs.range-two output { opacity: 1; transform: translateX(-50%); top: -22px; }
.vs.range-two .o-min { left: var(--a); } .vs.range-two .o-max { left: var(--b); }
.vs-hero .vs-field { max-width: 420px; }
/* tarjetas de tipos */
.vs-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.vs-card { border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.vs-stage { min-height: 150px; display: flex; align-items: center; justify-content: center; padding: 34px 28px 22px; background: #f8fafc; border-bottom: 1px solid var(--borde);
  background-image: radial-gradient(#dbe3ef 1px, transparent 1px); background-size: 16px 16px; }
.vs-anat .anat-stage { height: auto; padding: 20px; }
.vs-svg { width: 100%; max-width: 520px; height: auto; }
.v-inactive { stroke: #c7d2fe; stroke-width: 6; stroke-linecap: round; }
.v-active { stroke: #1d4ed8; stroke-width: 6; stroke-linecap: round; }
.v-ticks circle { fill: #fff; }
.v-thumb { fill: #1d4ed8; }
.v-label { fill: #1f2937; } .v-label-t { fill: #fff; font: 500 14px Roboto, sans-serif; text-anchor: middle; }
.v-pins circle { fill: #f97316; } .v-pins text { fill: #fff; font: 700 12px Inter, sans-serif; text-anchor: middle; }
.vs-anat { max-width: 620px; }

@media (max-width: 900px) { .vs-types { grid-template-columns: 1fr; } }

/* ---------- FAB: comportamiento al desplazar ---------- */
.fab-demo { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; }
.fab-phone { position: relative; width: 240px; height: 440px; border: 8px solid #1f2937; border-radius: 30px; overflow: hidden; background: #fff; }
.fp-bar { height: 52px; background: var(--primary); display: flex; align-items: center; padding: 0 16px; }
.fp-bar b { width: 90px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.85); }
.fp-list { height: calc(100% - 52px); overflow-y: auto; }
.fp-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.fp-item img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.fp-item > div { flex: 1; }
.fp-item .ln { display: block; height: 6px; border-radius: 3px; background: #e2e8f0; margin: 5px 0; width: 90%; }
.fp-item .ln.short { width: 55%; }
.fp-fab { position: absolute; right: 16px; bottom: 16px; transition: padding .25s, gap .25s; }
.fp-fab span { display: inline-block; max-width: 120px; overflow: hidden; transition: max-width .25s, opacity .2s; }
.fp-fab.shrink { padding: 0 12px; gap: 0; }
.fp-fab.shrink span { max-width: 0; opacity: 0; }
@media (max-width: 680px) { .fab-demo { grid-template-columns: 1fr; justify-items: center; } }

/* =========================================================
   Piezas comunes de las páginas de componentes
   ========================================================= */
.comp-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; padding: 32px 24px; min-height: 220px;
  border: 1px solid var(--borde); border-radius: 12px; background: #f3f6fb; background-image: radial-gradient(#dbe3ef 1px, transparent 1px); background-size: 16px 16px; }
.do-dont figcaption ul { margin: 6px 0 0; padding-left: 18px; }
.do-dont figcaption li { margin-bottom: 4px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ct-card { display: flex; flex-direction: column; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; background: #fff; }
.ct-stage { min-height: 190px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 22px 16px; background: #f8fafc; border-bottom: 1px solid var(--borde); }
.ct-card .bt-info p { margin-bottom: 0; }
.anat-c { margin: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; }
.anat-c-stage { display: flex; align-items: center; justify-content: center; padding: 40px 30px; background: #f3f6fb; min-height: 260px; }
.anat-c figcaption { padding: 24px; }
.anat-c ol { margin: 0; padding-left: 0; list-style: none; counter-reset: p; }
.anat-c li { counter-increment: p; position: relative; padding-left: 34px; margin-bottom: 12px; }
.anat-c li::before { content: counter(p); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: #f97316; color: #fff; font: 700 12px/22px var(--sans); text-align: center; }
.rel { position: relative; }
body.docs .pin { background: #f97316; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ln { display: block; height: 6px; border-radius: 3px; background: #e2e8f0; margin: 5px 0; width: 90%; }
.ln.short { width: 55%; }
.panel-t { font: 400 1.4rem "Roboto", sans-serif; color: #1f2937; margin: 0; }
.mb.light { color: #fff; }
.field { display: block; height: 40px; border: 1px solid #cbd5e1; border-radius: 4px; margin-bottom: 10px; }
.pad { padding: 16px; }

/* ---------- Video: demostración automática ---------- */
.vd { position: relative; margin: 0 0 18px; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; background: #0f172a; }
.vd-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 340px; padding: 28px; background: #f3f6fb; }
.vd-cursor { position: absolute; left: 0; top: 0; z-index: 50; width: 22px; height: 22px; border-radius: 50%; background: rgba(15,23,42,.35); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); opacity: 0;
  transition: transform .7s cubic-bezier(.4,0,.2,1), opacity .3s; pointer-events: none; }
.vd.playing .vd-cursor { opacity: 1; }
.vd-cursor.tap::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(29,78,216,.7); animation: vdTap .45s ease-out; }
@keyframes vdTap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.vd-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #0f172a; color: #cbd5e1; font-size: .85rem; }
.vd-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #fff; white-space: nowrap; }
.vd-badge i { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.vd.playing .vd-badge i { background: #ef4444; animation: vdBlink 1s infinite; }
@keyframes vdBlink { 50% { opacity: .3; } }
.vd-cap { flex: 1; min-width: 0; }
.vd-replay { border: 1px solid #475569; background: none; color: #fff; border-radius: 4px; padding: 5px 10px; font: 500 .8rem "Roboto", sans-serif; cursor: pointer; white-space: nowrap; }
.vd-replay:hover { background: #1e293b; }
.vd.user .vd-badge::after { content: " · tu turno: pruébalo"; font-weight: 400; color: #93c5fd; }

/* ---------- Teléfono ---------- */
.ph { position: relative; width: 250px; height: 440px; flex: none; border: 8px solid #1f2937; border-radius: 30px; background: #fff; overflow: hidden; box-shadow: 0 16px 30px -18px rgba(15,23,42,.6); }
.ph-screen { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.ph.mini { width: 200px; height: 170px; border-width: 6px; border-radius: 18px; }
.ph.mini.top .ph-screen { justify-content: flex-start; }
.ph.mini .ph-screen { justify-content: flex-end; }
.ph-content { flex: 1; overflow-y: auto; background: #fff; }
.ph-content.short { flex: 1; }
.ph-content.center { display: grid; place-items: center; }
.feed-item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; }
.feed-item img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.feed-item > div { flex: 1; }
.anat-ph { overflow: visible; }
.anat-ph .ph-screen { overflow: visible; }

/* ---------- Barras de app ---------- */
.ab-top { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px; background: var(--primary); color: #fff; flex: none; transition: box-shadow .2s; position: relative; z-index: 2; }
.ab-top.scrolled { box-shadow: 0 4px 8px rgba(0,0,0,.25); }
.ab-title { flex: 1; font: 500 1.05rem "Roboto", sans-serif; padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-ic { width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; }
.ab-ic .ic { width: 22px; height: 22px; }
.ab-ic:hover { background: rgba(255,255,255,.15); }
.ab-ic:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.ab-top.tall { height: 120px; align-items: flex-start; padding-top: 6px; background-size: cover; background-position: center; }
.ab-title.big { white-space: normal; align-self: flex-end; padding-bottom: 12px; font-size: .95rem; line-height: 1.25; }
.ab-top.dense { height: 46px; background: #334155; }
.ab-top.ctx { background: #1f2937; }
.ab-bottom { position: relative; display: flex; align-items: center; justify-content: space-around; height: 56px; flex: none; background: var(--primary); color: #fff; transition: transform .3s; }
.ab-bottom.end { justify-content: flex-start; gap: 4px; padding-left: 6px; }
.ab-cradle { position: relative; width: 64px; display: flex; justify-content: center; }
.ab-cradle .fab { position: absolute; top: -50px; width: 50px; height: 50px; background: #f97316; box-shadow: 0 0 0 5px #fff, 0 4px 10px rgba(0,0,0,.3); }
.ab-cradle.end { margin-left: auto; margin-right: 8px; }
.ab-bottom.gone { transform: translateY(100%); }
.ph.mini .ab-cradle .fab { width: 40px; height: 40px; top: -38px; }
.ph.mini .ab-top { height: 48px; }
.ph.mini .ab-top.tall { height: 100px; }

/* ---------- Backdrop ---------- */
.bd { position: relative; width: 320px; height: 380px; border-radius: 14px; overflow: hidden; background: var(--primary); color: #fff; }
.bd-back { padding: 6px 10px 12px; }
.bd-head { display: flex; align-items: center; gap: 6px; font: 500 1rem "Roboto", sans-serif; }
.bd-filters, .bd-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 6px; }
.bd-filters .mc { background: rgba(255,255,255,.18); color: #fff; }
.bd-filters .mc.on-chip { background: #fff; color: var(--primary); }
.bd-nav { flex-direction: column; } .bd-nav b { font: 500 .95rem "Roboto", sans-serif; }
.bd-front { position: absolute; left: 0; right: 0; top: 56px; bottom: 0; background: #fff; color: #1f2937; border-radius: 16px 16px 0 0; transition: top .35s cubic-bezier(.4,0,.2,1); box-shadow: 0 -2px 8px rgba(0,0,0,.12); }
.bd.on .bd-front { top: 150px; }
.bd-sub { margin: 0; padding: 14px 16px; font: 500 .9rem "Roboto", sans-serif; border-bottom: 1px solid #e5e7eb; }
.mini-bd { width: 220px; height: 180px; }
.mini-bd.on .bd-front { top: 74px; }
.anat-bd { overflow: visible; }

/* ---------- Banners ---------- */
.bn-wrap, .bn-scene { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.bn { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; width: 100%; padding: 16px 16px 8px; background: #fff; border-bottom: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12); max-height: 200px; transition: max-height .3s, opacity .25s, padding .3s, margin .3s; }
.bn p { margin: 0; grid-column: 2; font-size: .95rem; color: #1f2937; }
.bn > p:first-child { grid-column: 1 / -1; }
.bn-ic { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); display: grid; place-items: center; }
.bn-ic .ic { width: 22px; height: 22px; }
.bn-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.bn.gone { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.bn.small { max-width: 320px; }
.restore { display: none; }
.demo-scope:has(.gone) .restore, .bn-scene:has(.gone) .restore { display: inline-flex; }
.bn-content { width: 100%; }

/* ---------- Navegación inferior ---------- */
.bnav { display: flex; height: 56px; flex: none; background: #fff; border-top: 1px solid #e5e7eb; }
.bnav button { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; background: none; color: #6b7280; font: 400 .7rem "Roboto", sans-serif; cursor: pointer; }
.bnav .ic { width: 22px; height: 22px; }
.bnav button[aria-current="true"] { color: var(--primary); font-weight: 500; font-size: .76rem; }
.bnav.only-active button[aria-current="false"] span { display: none; }
.bnav .badge { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #dc2626; color: #fff; font: 600 .62rem/16px "Roboto", sans-serif; font-style: normal; }
.bnav button:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; }

/* ---------- Tarjetas ---------- */
.cards-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.card-m { width: 260px; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.12); transition: box-shadow .2s; }
.card-m:hover { box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); }
.card-m.rel { overflow: visible; }
.card-m img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card-b { padding: 14px 16px 6px; }
.card-b h4 { margin: 0 0 4px; font: 500 1.1rem "Roboto", sans-serif; }
.card-b p { margin: 0; font-size: .9rem; color: #6b7280; }
.card-a { display: flex; align-items: center; gap: 4px; padding: 6px 8px; }
.card-a .exp-btn { margin-left: auto; }
.card-m.sm { width: 200px; }
.card-m.outlined { box-shadow: none; border: 1px solid #d1d5db; }
.card-more { max-height: 0; overflow: hidden; transition: max-height .3s; padding: 0 16px; }
.card-more p { margin: 0 0 10px; font-size: .9rem; }
[data-expandable].on .card-more { max-height: 120px; }
.exp-btn .ic { transition: transform .25s; }
[data-expandable].on .exp-btn .ic { transform: rotate(180deg); }

/* ---------- Casillas, opciones, interruptores ---------- */
.cb, .rb { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font: 400 .95rem "Roboto", sans-serif; color: #1f2937; position: relative; }
.cb input, .rb input { position: absolute; opacity: 0; width: 40px; height: 40px; margin: 0; left: -11px; cursor: pointer; }
.cb > span:first-of-type { width: 18px; height: 18px; flex: none; border: 2px solid #6b7280; border-radius: 2px; display: grid; place-items: center; transition: background .15s, border-color .15s; position: relative; }
.cb input:checked + span, .cb input:indeterminate + span { background: var(--primary); border-color: var(--primary); }
.cb input:checked + span::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cb input:indeterminate + span::after { content: ""; width: 10px; height: 2px; background: #fff; }
.cb input:focus-visible + span, .rb input:focus-visible + span { box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 20%, transparent); }
.cb:hover > span:first-of-type, .rb:hover > span:first-of-type { box-shadow: 0 0 0 8px rgba(15,23,42,.06); }
.cb input:disabled + span, .rb input:disabled + span { opacity: .38; }
.cb:has(input:disabled), .rb:has(input:disabled) { color: #9ca3af; cursor: default; }
.cb-group, .cb-tree, .rb-group { display: flex; flex-direction: column; align-items: flex-start; }
.rb-group.row { flex-direction: row; gap: 18px; }
.rb-group legend { font: 500 .9rem "Roboto", sans-serif; color: #4b5563; margin-bottom: 4px; }
fieldset.rb-group { border: 0; padding: 0; margin: 0; }
.cb-kids { padding-left: 32px; display: flex; flex-direction: column; }
.rb > span:first-of-type { width: 20px; height: 20px; flex: none; border: 2px solid #6b7280; border-radius: 50%; display: grid; place-items: center; transition: border-color .15s; }
.rb > span:first-of-type::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); transform: scale(0); transition: transform .15s; }
.rb input:checked + span { border-color: var(--primary); }
.rb input:checked + span::after { transform: scale(1); }
.cb.big, .rb.big { font-size: 1.3rem; gap: 18px; }
.cb.big > span:first-of-type { width: 30px; height: 30px; }
.cb.big input:checked + span::after { width: 9px; height: 17px; border-width: 0 3px 3px 0; }
.rb.big > span:first-of-type { width: 32px; height: 32px; } .rb.big > span:first-of-type::after { width: 16px; height: 16px; }
.sw { position: relative; display: inline-flex; align-items: center; width: 36px; height: 14px; flex: none; }
.sw input { position: absolute; inset: -14px -6px; opacity: 0; margin: 0; cursor: pointer; z-index: 2; width: auto; height: auto; }
.sw i { position: absolute; inset: 0; border-radius: 7px; background: #9ca3af; transition: background .2s; }
.sw i::after { content: ""; position: absolute; top: 50%; left: -2px; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: #fafafa; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s, background .2s; }
.sw input:checked + i { background: color-mix(in srgb, var(--primary) 50%, #fff); }
.sw input:checked + i::after { transform: translateX(20px); background: var(--primary); }
.sw input:focus-visible + i::after { box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 20%, transparent); }
.sw input:disabled + i { opacity: .4; }
.lst-ctl { display: flex; align-items: center; gap: 16px; width: 100%; cursor: pointer; font: 400 .95rem "Roboto", sans-serif; }
.lst-ctl .li-t { flex: 1; }
.lst-ctl.inline { width: auto; padding: 8px 4px; }
.lst-ctl.big { font-size: 1.3rem; }
.lst-ctl.big .sw { transform: scale(1.5); margin: 0 14px; }
.sw-list { width: 100%; max-width: 380px; }

/* ---------- Listas ---------- */
.lst { list-style: none; margin: 0; padding: 6px 0; width: 100%; max-width: 380px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.lst li > button, .lst li > span, .lst li > label { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 16px; border: 0; background: none; text-align: left; font: inherit; color: #1f2937; cursor: pointer; }
.lst.static li > span { cursor: default; }
.lst li > button:hover { background: #f3f4f6; }
.lst li > button[aria-current="true"] { background: color-mix(in srgb, var(--primary) 12%, #fff); }
.lst li > button[aria-current="true"] .li-t b { color: var(--primary); }
.li-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 18%, #fff); color: var(--primary); font: 500 1rem "Roboto", sans-serif; }
.li-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-t b { font: 400 .98rem "Roboto", sans-serif; }
.li-t small { color: #6b7280; font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li-end { color: #9ca3af; }
.li { display: flex; align-items: center; gap: 14px; padding: 10px 16px; font-family: "Roboto", sans-serif; }
.li b { font-weight: 400; display: block; } .li small { color: #6b7280; }

/* ---------- Divisores ---------- */
.dv { border: 0; border-top: 1px solid rgba(15,23,42,.12); margin: 0; }
.dv.inset { margin-left: 72px; } .dv.middle { margin: 0 16px; }
.dv-demo, .dv-box { width: 100%; max-width: 380px; background: #fff; border-radius: 6px; padding: 6px 0; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.dv-box { padding: 14px 0; } .dv-box .ln { margin: 10px 16px; width: 70%; }
.dv-box .dv.inset { margin-left: 40px; }
.dv-row { display: flex; align-items: center; gap: 4px; background: #fff; padding: 4px 8px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.dv-v { width: 1px; height: 24px; background: rgba(15,23,42,.12); }
.vdv.on .dv { border-color: transparent; }
.vdv .dv-tg { margin: 10px 16px; }

/* ---------- Listas de imágenes ---------- */
.il { display: grid; gap: 4px; width: 100%; max-width: 520px; }
.il figure { position: relative; margin: 0; overflow: hidden; }
.il img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; color: #fff; font: 500 .85rem "Roboto", sans-serif; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.il.std { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 120px; }
.il.quilt { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 80px; }
.il.quilt figure:nth-child(1) { grid-column: span 2; grid-row: span 2; } .il.quilt figure:nth-child(4) { grid-column: span 2; }
.il.woven { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 70px; gap: 8px; }
.il.woven figure:nth-child(odd) { grid-row: span 3; } .il.woven figure:nth-child(even) { grid-row: span 2; }
.il.masonry { display: block; columns: 3; column-gap: 4px; }
.il.masonry figure { margin-bottom: 4px; break-inside: avoid; }
.il.masonry .h0 { height: 140px; } .il.masonry .h1 { height: 90px; } .il.masonry .h2 { height: 120px; } .il.masonry .h3 { height: 160px; } .il.masonry .h4 { height: 100px; } .il.masonry .h5 { height: 130px; }
.il.sm.std { grid-auto-rows: 52px; } .il.sm.quilt { grid-auto-rows: 36px; } .il.sm.woven { grid-auto-rows: 22px; }
.il.sm.masonry .h0 { height: 70px; } .il.sm.masonry .h1 { height: 44px; } .il.sm.masonry .h2 { height: 60px; } .il.sm.masonry .h3 { height: 80px; } .il.sm.masonry .h4 { height: 50px; } .il.sm.masonry .h5 { height: 64px; }
.il-switch { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 20px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font: 500 .82rem "Roboto", sans-serif; color: #374151; cursor: pointer; }
.seg button + button { border-left: 1px solid #cbd5e1; }
.seg button[aria-current="true"] { background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); }

/* ---------- Menús ---------- */
.mn-scene { position: relative; display: inline-block; min-height: 220px; }
.mn { position: absolute; top: 44px; left: 0; z-index: 20; min-width: 180px; padding: 8px 0; background: #fff; border-radius: 4px; box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
  opacity: 0; transform: scale(.9); transform-origin: top left; pointer-events: none; transition: opacity .15s, transform .15s; }
.mn.on, .mn.static { opacity: 1; transform: none; pointer-events: auto; }
.mn.static { position: relative; top: 0; }
.mn button { display: flex; align-items: center; gap: 14px; width: 100%; height: 44px; padding: 0 16px; border: 0; background: none; font: 400 .92rem "Roboto", sans-serif; color: #1f2937; cursor: pointer; text-align: left; }
.mn button .ic { width: 20px; height: 20px; color: #6b7280; }
.mn button:hover, .mn button:focus-visible { background: #f3f4f6; outline: none; }
.mn kbd { margin-left: auto; border: 0; background: none; color: #9ca3af; font: 400 .78rem "Roboto", sans-serif; }
.mn .dv { margin: 6px 0; }
.ctxm { border: 1px dashed #cbd5e1; }

/* ---------- Cajón de navegación y riel ---------- */
.nd-wrap { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.nd-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .25s; }
.nd { position: absolute; top: 0; bottom: 0; left: 0; width: 78%; background: #fff; padding: 12px 8px; transform: translateX(-102%); transition: transform .28s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; gap: 2px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.nd-wrap.on { pointer-events: auto; } .nd-wrap.on .nd-scrim { opacity: 1; } .nd-wrap.on .nd { transform: none; }
.nd button { display: flex; align-items: center; gap: 18px; height: 44px; padding: 0 12px; border: 0; border-radius: 4px; background: none; font: 500 .88rem "Roboto", sans-serif; color: #374151; cursor: pointer; text-align: left; }
.nd button .ic { width: 20px; height: 20px; color: #6b7280; }
.nd button[aria-current="true"] { background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.nd button[aria-current="true"] .ic { color: var(--primary); }
.nd-head { margin: 4px 12px 10px; font: 500 1.05rem "Roboto", sans-serif; color: #111827; }
.nd-sub { margin: 10px 12px 4px; font: 500 .75rem "Roboto", sans-serif; color: #6b7280; }
.nd .dv { margin: 6px 0; }
.nd.static { position: relative; transform: none; width: 150px; box-shadow: none; border-right: 1px solid #e5e7eb; }
.nd-std { display: flex; width: 100%; max-width: 280px; height: 140px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.nd-std .nd button { height: 36px; font-size: .8rem; gap: 10px; }
.nd-std-c { flex: 1; padding: 10px; }
.ph.mini .nd button { height: 30px; font-size: .7rem; gap: 8px; }
.nd-bottom { flex: none; background: #fff; border-radius: 12px 12px 0 0; box-shadow: 0 -3px 10px rgba(0,0,0,.15); padding: 8px; display: flex; flex-direction: column; }
.nd-bottom button { display: flex; gap: 10px; align-items: center; height: 30px; border: 0; background: none; font: 500 .72rem "Roboto", sans-serif; border-radius: 4px; padding: 0 8px; }
.nd-bottom button[aria-current="true"] { background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.nd-bottom .ic { width: 16px; height: 16px; }
.rail-scene { display: flex; width: 100%; max-width: 520px; height: 320px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rail { width: 72px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-right: 1px solid #e5e7eb; background: #fff; }
.rail button:not(.fab) { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: none; font: 500 .7rem "Roboto", sans-serif; color: #4b5563; cursor: pointer; }
.rail button:not(.fab) .ic { width: 56px; height: 30px; padding: 4px 16px; border-radius: 16px; transition: background .2s; }
.rail button[aria-current="true"] { color: var(--primary); }
.rail button[aria-current="true"] .ic { background: color-mix(in srgb, var(--primary) 16%, #fff); }
.rail-fab { margin-bottom: 10px; }
.rail.static { height: auto; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rail.icons button span { display: none; }
.rail-c { flex: 1; padding: 22px; }

/* ---------- Progreso ---------- */
.pg-scene { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 420px; align-items: stretch; }
.cp-row { display: flex; align-items: center; gap: 20px; }
.lp { position: relative; width: 100%; max-width: 280px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--primary) 22%, #fff); overflow: hidden; }
.pg-scene .lp { max-width: none; }
.lp i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); background: var(--primary); border-radius: 2px; transition: width .4s; }
.lp.indet i { width: 40%; animation: lpIndet 1.5s infinite cubic-bezier(.65,0,.35,1); }
@keyframes lpIndet { from { left: -40%; } to { left: 100%; } }
.lp.big { height: 10px; border-radius: 5px; max-width: none; }
.cp { width: 48px; height: 48px; display: inline-block; flex: none; }
.cp svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cp circle { fill: none; stroke: color-mix(in srgb, var(--primary) 18%, #fff); stroke-width: 4; }
.cp .cp-bar { stroke: var(--primary); stroke-dasharray: 125.7; stroke-dashoffset: calc(125.7 - 125.7 * var(--v, 0) / 100); stroke-linecap: round; transition: stroke-dashoffset .4s; }
.cp.indet svg { animation: cpRot 1.4s linear infinite; }
.cp.indet .cp-bar { stroke-dashoffset: 90; }
.cp.indet circle:first-child { stroke: transparent; }
@keyframes cpRot { to { transform: rotate(270deg); } }
.upload { display: flex; gap: 14px; align-items: center; background: #fff; padding: 14px 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.up-ic { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); }
.up-b { flex: 1; display: flex; flex-direction: column; gap: 8px; font-family: "Roboto", sans-serif; }
.up-b b { font-weight: 500; } .up-b small { color: #6b7280; }
.up-b .lp { max-width: none; }
.vpg { align-items: center; } .vpg .upload { width: 100%; }

/* ---------- Hojas inferiores y laterales ---------- */
.bs-btn { position: absolute; right: 14px; bottom: 16px; z-index: 3; }
.bs-wrap { position: absolute; inset: 0; z-index: 10; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-end; }
.bs-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .25s; }
.bs { position: relative; background: #fff; border-radius: 14px 14px 0 0; padding: 8px 16px 18px; transform: translateY(102%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 -4px 14px rgba(0,0,0,.15); }
.bs-wrap.on { pointer-events: auto; } .bs-wrap.on .bs-scrim { opacity: 1; } .bs-wrap.on .bs { transform: none; }
.bs.static { transform: none; flex: none; }
.bs.tall { min-height: 90px; }
.bs-grip { display: block; width: 32px; height: 4px; border-radius: 2px; background: #cbd5e1; margin: 2px auto 10px; }
.bs-t { margin: 0 0 12px; font: 500 .95rem "Roboto", sans-serif; }
.ph.mini .bs-t { font-size: .72rem; margin-bottom: 4px; }
.bs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bs-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; font: 400 .72rem "Roboto", sans-serif; color: #374151; cursor: pointer; padding: 6px 0; border-radius: 8px; }
.bs-grid button .ic { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.ss-scene { position: relative; display: flex; width: 100%; max-width: 600px; height: 320px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ss-main { flex: 1; min-width: 0; padding: 14px; transition: margin .3s; }
.ss-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-family: "Roboto", sans-serif; }
.ss-top .mb .ic { width: 16px; height: 16px; }
.ss { position: absolute; top: 0; right: 0; bottom: 0; width: 210px; background: #fff; border-left: 1px solid #e5e7eb; padding: 12px 16px; transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.ss-scene.on .ss { transform: none; }
.ss-scene.on .ss-main { margin-right: 210px; }
.ss-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-family: "Roboto", sans-serif; }
.ss-mini { display: flex; width: 240px; height: 140px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); position: relative; }
.ss-mini .ss-c { flex: 1; background: repeating-linear-gradient(#fff 0 18px, #f1f5f9 18px 22px); }
.ss-mini .ss-p { width: 38%; border-left: 1px solid #e5e7eb; background: #fff; padding: 8px; }
.ss-mini.modal .ss-c { background: repeating-linear-gradient(#fff 0 18px, #f1f5f9 18px 22px); filter: brightness(.68); }
.ss-mini.modal .ss-p { position: absolute; right: 0; top: 0; bottom: 0; box-shadow: -6px 0 16px rgba(0,0,0,.2); }
.ss-mini.big { width: 340px; height: 200px; overflow: visible; }

/* ---------- Snackbars ---------- */
.sb-btn { position: absolute; right: 14px; bottom: 14px; z-index: 3; }
.sb { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px 6px 16px; border-radius: 4px; background: #333; color: #f3f4f6; font: 400 .88rem "Roboto", sans-serif;
  box-shadow: 0 3px 5px -1px rgba(0,0,0,.2), 0 6px 10px rgba(0,0,0,.14); transform: translateY(150%); opacity: 0; transition: transform .25s, opacity .25s; }
.sb.on { transform: none; opacity: 1; }
.sb span { flex: 1; }
.sb.static { position: relative; left: auto; right: auto; bottom: auto; transform: none; opacity: 1; width: 100%; max-width: 344px; }
.sb.two { flex-wrap: wrap; } .sb.two span { flex-basis: 100%; padding: 8px 0 0; } .sb.two .sb-a { margin-left: auto; }
.sb .sb-a { --primary: #93c5fd; height: 36px; }

/* ---------- Pestañas ---------- */
.tabs { width: 100%; max-width: 480px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tab-bar { display: flex; border-bottom: 1px solid #e5e7eb; background: #fff; }
.tab-bar button { flex: 1; min-width: 90px; position: relative; height: 48px; border: 0; background: none; font: 500 .82rem "Roboto", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tab-bar button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); transform: scaleX(0); transition: transform .25s; }
.tab-bar button[aria-selected="true"] { color: var(--primary); }
.tab-bar button[aria-selected="true"]::after { transform: scaleX(1); }
.tab-bar button:hover { background: #f8fafc; }
.tab-bar button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.tab-bar.static { width: 100%; max-width: 360px; border-radius: 6px 6px 0 0; }
.tab-bar.scroll { overflow-x: auto; max-width: 240px; }
.tab-bar.scroll button { flex: none; padding: 0 14px; }
.tab-bar.icons button { height: 64px; font-size: .7rem; }
.tab-bar.icons .ic { width: 22px; height: 22px; }
.tab-panels { padding: 18px 20px; min-height: 110px; font-family: "Roboto", sans-serif; }
.tab-p b { display: block; font: 500 1.05rem "Roboto", sans-serif; margin-bottom: 6px; }
.tab-p p { margin: 0; color: #4b5563; font-size: .92rem; }

/* ---------- Campos de texto ---------- */
.tf-form { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 380px; }
.tf { position: relative; width: 100%; max-width: 380px; font-family: "Roboto", sans-serif; }
.tf input, .tf textarea, .tf select { width: 100%; height: 56px; padding: 22px 16px 6px; border: 0; font: 400 1rem "Roboto", sans-serif; color: #111827; background: transparent; outline: none; border-radius: 4px 4px 0 0; }
.tf textarea { height: auto; resize: vertical; padding-top: 26px; }
.tf select { -webkit-appearance: none; appearance: none; cursor: pointer; }
.tf label { position: absolute; left: 16px; top: 18px; font-size: 1rem; color: #6b7280; pointer-events: none; transform-origin: left top; transition: transform .15s, color .15s, top .15s; background: transparent; }
.tf input:focus + label, .tf input:not(:placeholder-shown) + label, .tf textarea:focus + label, .tf textarea:not(:placeholder-shown) + label, .tf select + label { transform: translateY(-11px) scale(.75); color: var(--primary); }
.tf input:not(:focus):not(:placeholder-shown) + label, .tf textarea:not(:focus):not(:placeholder-shown) + label, .tf select:not(:focus) + label { color: #6b7280; }
.tf.filled { background: #f1f3f6; border-radius: 4px 4px 0 0; box-shadow: inset 0 -1px #6b7280; }
.tf.filled:focus-within { box-shadow: inset 0 -2px var(--primary); }
.tf.outlined input, .tf.outlined textarea, .tf.outlined select { border: 1px solid #9ca3af; border-radius: 4px; padding-top: 16px; padding-bottom: 16px; }
.tf.outlined textarea { padding-top: 18px; }
.tf.outlined input:focus, .tf.outlined textarea:focus, .tf.outlined select:focus { border: 2px solid var(--primary); padding-left: 15px; }
.tf.outlined label { padding: 0 4px; margin-left: -4px; background: #fff; }
.tf.outlined input:focus + label, .tf.outlined input:not(:placeholder-shown) + label, .tf.outlined textarea:focus + label, .tf.outlined textarea:not(:placeholder-shown) + label, .tf.outlined select + label { transform: translateY(-27px) scale(.75); }
.ct-stage .tf.outlined label, .comp-hero .tf.outlined label, .vd-stage .tf.outlined label { background: #f8fafc; }
.comp-hero .tf.outlined label, .vd-stage .tf.outlined label { background: #f3f6fb; }
.tf.select::after { content: ""; position: absolute; right: 16px; top: 25px; border: 5px solid transparent; border-top-color: #6b7280; pointer-events: none; }
.tf-help, .tf-count { display: block; padding: 4px 16px 0; font-size: .75rem; color: #6b7280; }
.tf-count { position: absolute; right: 0; bottom: -18px; }
.tf.area .tf-count { bottom: -18px; }
.tf.error input, .tf.error textarea { border-color: #b91c1c !important; }
.tf.error label, .tf.error .tf-help { color: #b91c1c !important; }
.tf.filled.error { box-shadow: inset 0 -2px #b91c1c; }
.tf-ic { position: absolute; right: 14px; top: 16px; color: #6b7280; }
.tf.big { transform: scale(1.1); transform-origin: left center; }

/* ---------- Diálogos ---------- */
.dlg-scene { position: relative; width: 100%; max-width: 460px; height: 280px; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dlg-wrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.dlg-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .2s; }
.dlg { position: relative; width: 82%; max-width: 340px; background: #fff; border-radius: 4px; padding: 22px 22px 8px; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);
  opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; font-family: "Roboto", sans-serif; }
.dlg-wrap.on { pointer-events: auto; } .dlg-wrap.on .dlg-scrim { opacity: 1; } .dlg-wrap.on .dlg { opacity: 1; transform: none; }
.dlg.static { opacity: 1; transform: none; width: 100%; max-width: 260px; }
.dlg h4 { margin: 0 0 10px; font: 500 1.15rem "Roboto", sans-serif; }
.dlg p { margin: 0 0 14px; color: #4b5563; font-size: .92rem; }
.dlg-a { display: flex; justify-content: flex-end; gap: 6px; padding: 6px 0 4px; margin-right: -12px; }
.dlg-list { list-style: none; margin: 0 -22px 8px; padding: 0; }
.dlg-list li { padding: 12px 22px; font-size: .95rem; cursor: pointer; }
.dlg-list li:hover { background: #f3f4f6; }
.dlg .rb { display: flex; }
.dlg-anat { position: relative; padding: 30px; background: rgba(0,0,0,.32); border-radius: 8px; }

/* ---------- Tablas ---------- */
.dt-wrap { width: 100%; max-width: 640px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12); overflow-x: auto; position: relative; }
.dt { width: 100%; border-collapse: collapse; font: 400 .88rem "Roboto", sans-serif; color: #1f2937; }
.dt th, .dt td { height: 52px; padding: 0 16px; text-align: left; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.dt th { height: 56px; font-weight: 500; color: #374151; }
.dt th[data-sort] { cursor: pointer; user-select: none; }
.dt th[data-sort]:hover { color: #111827; }
.dt th[data-sort]::after { content: "↑"; margin-left: 6px; opacity: 0; transition: opacity .15s, transform .2s; display: inline-block; }
.dt th[data-sort]:hover::after { opacity: .4; }
.dt th.asc::after, .dt th.desc::after { opacity: 1; }
.dt th.desc::after { transform: rotate(180deg); }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .sel { width: 48px; padding-right: 0; }
.dt tr.on td { background: color-mix(in srgb, var(--primary) 8%, #fff); }
.dt tbody tr:hover td { background: #f8fafc; }
.dt tbody tr.on:hover td { background: color-mix(in srgb, var(--primary) 12%, #fff); }
.dt-selbar { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 64px; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); font: 500 .9rem "Roboto", sans-serif; z-index: 2; transform: translateY(-100%); transition: transform .2s; pointer-events: none; }
.dt-wrap.has-sel .dt-selbar { transform: none; pointer-events: auto; }
.dt-wrap.has-sel .dt thead th:not(.sel) { visibility: hidden; }
.dt-foot { display: flex; justify-content: flex-end; gap: 24px; padding: 14px 16px; font: 400 .8rem "Roboto", sans-serif; color: #6b7280; }

/* ---------- Selector de fecha y hora ---------- */
.dp, .tp { width: 300px; background: #fff; border-radius: 4px; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14); font-family: "Roboto", sans-serif; overflow: hidden; position: relative; }
.dp.rel, .tp.rel { overflow: visible; }
.dp.sm, .tp.sm { transform: scale(.82); margin: -30px -20px; }
.dp-head, .tp-head { background: var(--primary); color: #fff; padding: 14px 20px; border-radius: 4px 4px 0 0; }
.dp-head small, .tp-head small { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.dp-head b { display: block; font: 400 1.7rem "Roboto", sans-serif; margin-top: 4px; }
.dp-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 20px; font-weight: 500; font-size: .9rem; }
.dp-nav button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; color: #374151; }
.dp-nav button:hover { background: #f3f4f6; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 12px 8px; text-align: center; }
.dp-grid > span { font-size: .72rem; color: #6b7280; height: 32px; line-height: 32px; }
.dp-day { width: 36px; height: 36px; margin: 1px auto; border: 1px solid transparent; border-radius: 50%; background: none; font: 400 .82rem "Roboto", sans-serif; color: #1f2937; cursor: pointer; }
.dp-day:hover { background: #f3f4f6; }
.dp-day.today { border-color: var(--primary); color: var(--primary); }
.dp-day[aria-selected="true"] { background: var(--primary); color: #fff; }
.dp-actions { display: flex; justify-content: flex-end; gap: 4px; padding: 0 8px 8px; }
.tp-head { display: flex; align-items: center; justify-content: center; gap: 4px; }
.tp-head .tp-v { font: 300 2.6rem "Roboto", sans-serif; opacity: .6; cursor: pointer; background: none; border: 0; color: #fff; padding: 0 4px; }
.tp-head .tp-v.on { opacity: 1; }
.tp-ampm { display: flex; flex-direction: column; margin-left: 10px; }
.tp-ampm button { border: 0; background: none; color: #fff; opacity: .6; font: 500 .82rem "Roboto", sans-serif; cursor: pointer; padding: 3px 6px; }
.tp-ampm button[aria-pressed="true"] { opacity: 1; }
.tp-dial { position: relative; width: 236px; height: 236px; margin: 18px auto 8px; border-radius: 50%; background: #eef1f5; }
.tp-hand { position: absolute; left: 50%; top: 50%; width: 2px; height: 90px; margin-left: -1px; background: var(--primary); transform-origin: 50% 0; transition: transform .35s cubic-bezier(.4,0,.2,1); }
.tp-hand::before { content: ""; position: absolute; left: -3px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.tp-n { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 0; border-radius: 50%; background: none; font: 400 .9rem "Roboto", sans-serif; color: #1f2937; cursor: pointer; z-index: 2; }
.tp-n.on { background: var(--primary); color: #fff; }
.tp-input { display: flex; align-items: center; gap: 8px; font-family: "Roboto", sans-serif; }
.tp-input .tf { width: 90px; } .tp-input b { font-size: 1.6rem; }
.tp-input .seg { flex-direction: column; border-radius: 8px; }
.tp-input .seg button + button { border-left: 0; border-top: 1px solid #cbd5e1; }

/* ---------- Tooltips ---------- */
.tt-row { display: flex; gap: 14px; padding: 40px 10px 10px; }
.tt-wrap { position: relative; display: inline-flex; }
.tt { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%) scale(.85); padding: 4px 10px; border-radius: 4px; background: rgba(55,65,81,.95); color: #fff; font: 400 .78rem "Roboto", sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 30; }
.tt-wrap:hover .tt, .tt-wrap:focus-within .tt, .tt-wrap.show .tt, .tt-wrap .vd-hover + .tt { opacity: 1; transform: translateX(-50%); transition-delay: .3s; }
.tt-wrap.show .tt, .tt-wrap .vd-hover + .tt { transition-delay: 0s; }
.tt.rich { white-space: normal; width: 210px; padding: 12px 14px; background: #fff; color: #4b5563; box-shadow: 0 4px 14px rgba(0,0,0,.2); text-align: left; line-height: 1.4; }
.tt.rich b { display: block; color: #111827; margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .anat-c { grid-template-columns: 1fr; }
  .vd-stage { min-height: 300px; padding: 20px 12px; }
  .ss-scene.on .ss-main { margin-right: 0; }
  .ss { width: 80%; box-shadow: -6px 0 16px rgba(0,0,0,.2); }
  .il.std { grid-auto-rows: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp.indet i, .cp.indet svg { animation-duration: 3s; }
}

/* Ajustes tras la revisión visual */
.ph.mini { width: 232px; height: 180px; }
.ph.mini .ab-ic { width: 34px; height: 34px; }
.ph.mini .ab-ic .ic { width: 19px; height: 19px; }
.ph.mini .ab-title { font-size: .85rem; padding-left: 4px; }
.ph.mini .ab-title.big { font-size: .8rem; }
.anat-c-stage .ph.mini { width: 300px; height: 250px; }
.mini-bd { height: 200px; }
.mini-bd.on .bd-front { top: 98px; }
.dp-nav > div { display: flex; }
.anat-ph .pin, .anat-c-stage .pin { z-index: 40; }

/* =========================================================
   Componentes de Material 3
   ========================================================= */
.m3tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: #ede9fe; color: #6d28d9; font: 600 .62rem var(--sans); vertical-align: middle; letter-spacing: .04em; }
.sidenav a .m3tag { margin-left: 4px; }
.appbar-sub { text-decoration: none; }

/* Insignias */
.bdg-row { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; justify-content: center; }
.bdg-wrap { position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; color: #374151; }
.bdg-wrap .ic { width: 26px; height: 26px; }
.bdg { position: absolute; left: 26px; top: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #b3261e; color: #fff; font: 500 11px/16px "Roboto", sans-serif; font-style: normal; text-align: center; animation: bdgIn .2s ease-out; }
.bdg.dot { min-width: 6px; width: 6px; height: 6px; padding: 0; left: 30px; top: 10px; }
.bdg[hidden] { display: none; }
@keyframes bdgIn { from { transform: scale(0); } }
.bdg-row.big .bdg-wrap { transform: scale(1.6); margin: 0 16px; }
.bnav .bdg { left: calc(50% + 2px); top: 4px; }

/* Botones de ícono M3 */
.ibm-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.ibm { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; display: inline-grid; place-items: center; cursor: pointer; background: transparent; color: #45464f; position: relative; transition: background .2s, color .2s; }
.ibm::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.ibm .ic { width: 24px; height: 24px; }
.ibm path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.ibm[aria-pressed="true"] path, .ibm:not([aria-pressed]) path { fill: currentColor; stroke: none; }
.ibm.std[aria-pressed="true"] { color: var(--primary); }
.ibm.filled { background: #e3e2ea; color: var(--primary); }
.ibm.filled[aria-pressed="true"], .ibm.filled:not([aria-pressed]) { background: var(--primary); color: #fff; }
.ibm.tonal { background: #e3e2ea; color: #45464f; }
.ibm.tonal[aria-pressed="true"], .ibm.tonal:not([aria-pressed]) { background: #dbe1ff; color: #001257; }
.ibm.outlined { box-shadow: inset 0 0 0 1px #767680; }
.ibm.outlined[aria-pressed="true"] { background: #2f3036; color: #f2f0f7; box-shadow: none; }
.ibm:hover { filter: brightness(.94); }
.ibm:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ibm.big { transform: scale(1.8); }
.ib-touch { position: absolute; left: 4px; top: 4px; width: 88px; height: 88px; border: 2px dashed #f97316; border-radius: 50%; pointer-events: none; }

/* Botones segmentados */
.segm { display: inline-flex; border: 1px solid #767680; border-radius: 20px; overflow: hidden; }
.segm button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 70px; padding: 0 14px; border: 0; background: transparent; font: 500 .88rem "Roboto", sans-serif; color: #1a1b21; cursor: pointer; transition: background .2s; }
.segm button + button { border-left: 1px solid #767680; }
.segm .ck { width: 0; transition: width .2s; }
.segm button[aria-checked="true"], .segm button[aria-pressed="true"] { background: #dce2f9; color: #141b2c; }
.segm button[aria-checked="true"] .ck, .segm button[aria-pressed="true"] .ck { width: 18px; }
.segm button:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.segm button .ic:not(.ck) { width: 20px; height: 20px; }
.segm.big { transform: scale(1.25); }

/* Grupos de botones */
.bgroup { display: inline-flex; gap: 8px; align-items: center; }
.bg-btn { height: 48px; min-width: 56px; padding: 0 14px; border: 0; border-radius: 24px; background: #dbe1ff; color: #001257; display: inline-grid; place-items: center; cursor: pointer; font: 500 .88rem "Roboto", sans-serif;
  transition: min-width .2s cubic-bezier(.2,0,0,1), border-radius .2s, padding .2s; }
.bg-btn .ic { width: 24px; height: 24px; }
.bg-btn.pressed, .bg-btn:active { min-width: 80px; border-radius: 12px; }
.bgroup:has(.pressed) .bg-btn:not(.pressed), .bgroup:has(:active) .bg-btn:not(:active) { min-width: 46px; padding: 0 10px; }
.bgroup.conn { gap: 2px; }
.bgroup.conn .bg-btn { border-radius: 8px; background: #e3e2ea; color: #1a1b21; }
.bgroup.conn .bg-btn:first-child { border-radius: 24px 8px 8px 24px; } .bgroup.conn .bg-btn:last-child { border-radius: 8px 24px 24px 8px; }
.bgroup.conn .bg-btn.on { background: var(--primary); color: #fff; border-radius: 24px; }
.bgroup.big { transform: scale(1.2); }

/* Botón dividido */
.spb-scene { position: relative; display: inline-block; min-height: 160px; }
.spb { display: inline-flex; gap: 2px; }
.spb button { height: 40px; border: 0; background: var(--primary); color: #fff; font: 500 .88rem "Roboto", sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.spb .ic { width: 20px; height: 20px; }
.spb-main { padding: 0 16px; border-radius: 20px 4px 4px 20px; }
.spb-arrow { width: 44px; justify-content: center; border-radius: 4px 20px 20px 4px; }
.spb-arrow .ic { transition: transform .2s; }
.spb-scene.on .spb-arrow { border-radius: 20px; }
.spb-scene.on .spb-arrow .ic { transform: rotate(180deg); }
.spb.tonal button { background: #dce2f9; color: #141b2c; }
.spb.outlined button { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1px #767680; }
.spb-scene .mn { top: 48px; left: auto; right: 0; }
.spb-scene.on .mn { opacity: 1; transform: none; pointer-events: auto; }
.spb.big { transform: scale(1.3); }

/* Menú del FAB */
.fabm { position: absolute; right: 14px; bottom: 14px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fabm.static { position: relative; right: auto; bottom: auto; }
.fabm-items { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fabm-items button { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 24px; background: var(--primary); color: #fff; font: 500 .85rem "Roboto", sans-serif; cursor: pointer;
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2,0,0,1); }
.fabm-items .ic { width: 20px; height: 20px; }
.fabm.on .fabm-items button { opacity: 1; transform: none; pointer-events: auto; }
.fabm.on .fabm-items button:nth-last-child(2) { transition-delay: .04s; } .fabm.on .fabm-items button:nth-last-child(3) { transition-delay: .08s; }
.fabm-main { width: 56px; height: 56px; border: 0; border-radius: 16px; background: #dbe1ff; color: #001257; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.3); transition: border-radius .25s, background .25s; }
.fabm-main .ic { width: 24px; height: 24px; transition: transform .25s; }
.fabm.on .fabm-main { border-radius: 28px; background: var(--primary); color: #fff; }
.fabm.on .fabm-main .ic { transform: rotate(45deg); }

/* Carrusel M3 */
.m3c { display: flex; gap: 8px; width: 100%; max-width: 640px; height: 240px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 2px; scroll-behavior: smooth; }
.m3c::-webkit-scrollbar { display: none; }
.m3c figure { position: relative; flex: 0 0 var(--w, 120px); margin: 0; border-radius: 28px; overflow: hidden; scroll-snap-align: start; transition: flex-basis .25s; }
.m3c img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m3c figcaption { position: absolute; left: 16px; bottom: 14px; color: #fff; font: 500 1rem "Roboto", sans-serif; text-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; opacity: var(--cap, 1); transition: opacity .2s; }
.m3c-mini { display: flex; gap: 6px; width: 100%; max-width: 280px; height: 120px; }
.m3c-mini img { height: 100%; object-fit: cover; border-radius: 18px; min-width: 0; }
.m3c-mini.multi img:nth-child(1) { flex: 6; } .m3c-mini.multi img:nth-child(2) { flex: 3; } .m3c-mini.multi img:nth-child(3) { flex: 1; }
.m3c-mini.unc { overflow: hidden; } .m3c-mini.unc img { flex: 0 0 38%; }
.m3c-mini.hero img:nth-child(1) { flex: 8; } .m3c-mini.hero img:nth-child(2) { flex: 1; }
.m3c-mini.big { max-width: 420px; height: 180px; }
.full-img { width: 100%; height: 100%; object-fit: cover; }

/* Búsqueda */
.srch { width: 100%; max-width: 420px; position: relative; }
.srch-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 8px 0 16px; border-radius: 28px; background: #eceef4; color: #45464f; font: 400 1rem "Roboto", sans-serif; transition: border-radius .2s; }
.srch-bar .ic { width: 24px; height: 24px; flex: none; }
.srch-bar input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 1rem "Roboto", sans-serif; color: #1a1b21; outline: none; }
.srch-bar .li-av { width: 32px; height: 32px; font-size: .85rem; }
.srch-bar.static span:not(.li-av) { flex: 1; }
.srch-bar.big { transform: scale(1.1); max-width: 360px; }
.srch-list { list-style: none; margin: 0; padding: 4px 0 8px; background: #eceef4; border-radius: 0 0 28px 28px; max-height: 0; overflow: hidden; transition: max-height .25s; }
.srch.open .srch-bar { border-radius: 28px 28px 0 0; }
.srch.open .srch-list, .srch-list.on { max-height: 340px; }
.srch-list button { display: flex; align-items: center; gap: 14px; width: 100%; height: 48px; padding: 0 18px; border: 0; background: none; font: 400 .95rem "Roboto", sans-serif; color: #1a1b21; cursor: pointer; text-align: left; }
.srch-list button:hover { background: rgba(0,0,0,.05); }
.srch-list .ic { width: 20px; height: 20px; color: #6b7280; }
.srch-list li[hidden] { display: none; }
.srch-list.mini { border-radius: 0; } .srch-list.mini button { height: 30px; font-size: .72rem; }
.srch-view { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 10px; background: #eceef4; font: 400 .8rem "Roboto", sans-serif; }
.srch-view .ic { width: 18px; height: 18px; }

/* Indicador de carga (forma que cambia) */
.ldi-row { display: flex; gap: 40px; align-items: center; }
.ldi { width: 48px; height: 48px; display: inline-grid; place-items: center; flex: none; }
.ldi i { width: 38px; height: 38px; background: var(--primary); animation: ldiMorph 2.4s infinite cubic-bezier(.2,0,0,1), ldiSpin 1.6s infinite linear; }
.ldi.contained { border-radius: 50%; background: #dbe1ff; }
.ldi.contained i { width: 28px; height: 28px; }
.ldi.big { transform: scale(2); margin: 20px; }
@keyframes ldiSpin { to { rotate: 360deg; } }
@keyframes ldiMorph {
  0%, 100% { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
  33% { clip-path: polygon(50% 0%, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0% 50%, 15% 15%, 50% 0%, 50% 0%); }
  66% { clip-path: polygon(50% 8%, 75% 2%, 98% 25%, 92% 50%, 98% 75%, 75% 98%, 50% 92%, 25% 98%, 2% 75%, 8% 50%); }
}
.refresh { position: relative; }
.rf-ind { height: 0; overflow: hidden; display: grid; place-items: center; transition: height .3s; }
.refresh.loading .rf-ind { height: 64px; }
.rf-btn { position: absolute; right: 14px; bottom: 14px; z-index: 3; }

/* Barras de herramientas */
.tb-float { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 8px; border-radius: 32px; background: #e3e2ea; color: #1a1b21; box-shadow: 0 4px 8px 3px rgba(0,0,0,.15); transition: transform .3s cubic-bezier(.2,0,0,1); }
.tb-float .ab-ic { width: 40px; height: 40px; } .tb-float .ab-ic:hover { background: rgba(0,0,0,.06); }
.tb-fab { width: 48px; height: 48px; margin-left: 6px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.tb-fab .ic { width: 22px; height: 22px; }
.tb-float.gone { transform: translate(-50%, 140%); }
.tb-float.static { position: relative; left: auto; bottom: auto; transform: none; }
.tb-float.vert { flex-direction: column; padding: 8px 4px; }
.tb-float.big { transform: scale(1.3); }
.tb-dock { flex: none; display: flex; justify-content: space-around; align-items: center; height: 52px; background: #e3e2ea; }
.ph.mini .tb-float { transform: translateX(-50%) scale(.8); bottom: 6px; }
