/* Layout: barra lateral fija con la franja de colores de la marca + área de trabajo; en móvil la barra pasa arriba y la navegación abajo. */
:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #efedf8;
  --ink: #1e1b34;
  --muted: #615d78;
  --line: #e2dff0;
  --accent: #635cc7;          /* violeta SpectrumPro */
  --accent-ink: #ffffff;
  --accent-soft: #ebe9fb;
  --marca-fondo: #4f48b8;
  --marca-tinta: #ffffff;

  /* colores de las letras del logo */
  --sp-violeta: #635cc7;
  --sp-azul: #31b4e7;
  --sp-verde: #00bc70;
  --sp-amarillo: #fadd41;
  --sp-rojo: #f8384b;
  --sp-rosa: #e65ebe;

  /* estados de asistencia */
  --ok: #0a8f57;   --ok-soft: #dcf5e9;
  --warn: #a86b00; --warn-soft: #fdf0cf;
  --bad: #d42438;  --bad-soft: #fde1e4;
  --info: #1878a8; --info-soft: #dbf0fa;

  --av-sat: 70%; --av-bg: 90%; --av-fg: 32%;
  --shadow: 0 1px 2px rgb(30 27 52 / .06), 0 4px 16px rgb(30 27 52 / .06);

  --f-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --f-marca: "Lexend Zetta", "Lexend", system-ui, sans-serif;
  --f-texto: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --radio: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121f; --surface: #1d1a2c; --surface-2: #262338; --ink: #ecebf5; --muted: #a7a3bf; --line: #34304a;
    --accent: #8b85e6; --accent-ink: #14121f; --accent-soft: #2b2850; --marca-fondo: #2b2850; --marca-tinta: #ecebf5;
    --ok: #4fd39a; --ok-soft: #133a2a; --warn: #f2c14e; --warn-soft: #3a2f10; --bad: #ff7a88; --bad-soft: #43171f; --info: #6cc8f0; --info-soft: #12324a;
    --av-sat: 35%; --av-bg: 26%; --av-fg: 84%;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14121f; --surface: #1d1a2c; --surface-2: #262338; --ink: #ecebf5; --muted: #a7a3bf; --line: #34304a;
  --accent: #8b85e6; --accent-ink: #14121f; --accent-soft: #2b2850; --marca-fondo: #2b2850; --marca-tinta: #ecebf5;
  --ok: #4fd39a; --ok-soft: #133a2a; --warn: #f2c14e; --warn-soft: #3a2f10; --bad: #ff7a88; --bad-soft: #43171f; --info: #6cc8f0; --info-soft: #12324a;
  --av-sat: 35%; --av-bg: 26%; --av-fg: 84%;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-texto); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 24px;
  padding: 0 16px 20px; background: var(--surface); border-right: 1px solid var(--line);
}
.espectro {
  display: block; height: 6px; margin: 0 -16px;
  background: linear-gradient(90deg, var(--sp-violeta) 0 16.6%, var(--sp-azul) 0 33.3%, var(--sp-verde) 0 50%, var(--sp-amarillo) 0 66.6%, var(--sp-rojo) 0 83.3%, var(--sp-rosa) 0);
}
.lateral::-webkit-scrollbar { display: none; }
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--ink); padding: 4px 8px; }
.marca img { flex: none; }
.marca-texto { display: flex; flex-direction: column; min-width: 0; }
.marca-nombre { font-family: var(--f-marca); font-size: .78rem; letter-spacing: -.02em; }
.marca-sub { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-family: var(--f-display); font-weight: 500;
}
.nav a svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

.lateral-cab { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.icono-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px;
  border: 0; background: none; color: var(--muted); cursor: pointer;
}
.icono-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icono-btn:hover { background: var(--surface-2); color: var(--ink); }
.plegar svg { transition: transform .2s; }

.usuario { margin-top: auto; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 4px 0; min-width: 0; }
.usuario-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px; margin: -4px; border-radius: 10px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.usuario-btn:hover { background: var(--surface-2); }
.mi-cumple { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mi-cumple .txt { flex: 1; min-width: 200px; }
.usuario-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.usuario-txt b { font-family: var(--f-display); font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-txt small { color: var(--muted); font-size: .78rem; }

/* menú plegado (solo escritorio) */
@media (min-width: 861px) {
  body.menu-plegado .app { grid-template-columns: 76px minmax(0, 1fr); }
  body.menu-plegado .lateral { padding-left: 10px; padding-right: 10px; }
  body.menu-plegado .espectro { margin: 0 -10px; }
  body.menu-plegado .lateral-cab { flex-direction: column; }
  body.menu-plegado .marca { padding: 4px; }
  body.menu-plegado .marca-texto,
  body.menu-plegado .nav a span,
  body.menu-plegado .usuario-txt { display: none; }
  body.menu-plegado .nav a { justify-content: center; padding: 12px 0; }
  body.menu-plegado .usuario { flex-direction: column; padding-inline: 0; }
  body.menu-plegado .usuario-btn { flex: 0 0 auto; }
  body.menu-plegado .plegar svg { transform: rotate(180deg); }
}

.principal {
  min-width: 0;
  padding-block: 28px 64px;
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
}
#vista { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.aviso {
  max-width: 1120px; margin: 0 auto 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: var(--radio); background: var(--accent-soft); color: var(--ink); font-size: .88rem;
}

/* ---------- piezas comunes ---------- */
.cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cabecera p { color: var(--muted); margin-top: 4px; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }

.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.tarjeta > h2 { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tarjeta > h2 small { font-family: var(--f-texto); font-weight: 500; font-size: .8rem; color: var(--muted); }

.rejilla { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-valor { font-family: var(--f-display); font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-etq { color: var(--muted); font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 500;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:hover { filter: brightness(1.06); }
.btn-sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-sec:hover { background: var(--surface-2); filter: none; }
.btn-peligro { background: var(--bad); color: #fff; }
.btn-peq { padding: 5px 12px; font-size: .85rem; }

.controles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.campo-inline { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 500; }
input[type="text"], input[type="search"], input[type="date"], input[type="month"], input[type="tel"], input[type="email"], input[type="number"], input:not([type]), select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; width: 100%;
}
.controles input, .controles select { width: auto; }
textarea { resize: vertical; }

.pestanas { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.pestanas button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-family: var(--f-display); font-weight: 500; }
.pestanas button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-neutro { background: var(--surface-2); color: var(--muted); }
.punto { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--accent)); display: inline-block; }

.avatar {
  --h: 250;
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: .9rem;
  background: hsl(var(--h) var(--av-sat) var(--av-bg)); color: hsl(var(--h) 45% var(--av-fg));
}
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }

.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lista > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.lista > li:first-child { border-top: 0; }
.lista .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lista .txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista .txt small { color: var(--muted); font-size: .8rem; }
.fila-click { cursor: pointer; border-radius: 8px; }
.fila-click:hover { background: var(--surface-2); }
.vacio { color: var(--muted); padding: 12px 0; font-size: .9rem; }

/* ---------- panel ---------- */
.sesion { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sesion:first-child { border-top: 0; }
.sesion .txt { flex: 1; min-width: 0; }
.sesion .txt b { display: block; font-weight: 600; }
.sesion .txt small { color: var(--muted); font-size: .8rem; }
.barra { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.barra > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.grafico { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.grafico .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.grafico .col span.val { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.grafico .col i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 0 0; background: var(--accent); opacity: .85; }
.grafico .col:last-child i { opacity: 1; }
.grafico-ejes { display: flex; gap: 8px; margin-top: 6px; }
.grafico-ejes span { flex: 1; text-align: center; font-size: .7rem; color: var(--muted); min-width: 0; }

/* ---------- asistencia ---------- */
.tallerdia { display: flex; flex-wrap: wrap; gap: 8px; }
.tallerdia button {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; font-family: var(--f-display); font-weight: 500; font-size: .9rem;
}
.tallerdia button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tallerdia button small { color: var(--muted); font-family: var(--f-texto); font-weight: 500; }

.pase > li { flex-wrap: wrap; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  min-width: 44px; height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; font-size: .82rem;
}
.seg button:hover { border-color: var(--muted); }
.seg button[aria-pressed="true"][data-e="P"] { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.seg button[aria-pressed="true"][data-e="R"] { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.seg button[aria-pressed="true"][data-e="A"] { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.seg button[aria-pressed="true"][data-e="J"] { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.seg .lbl-largo { display: inline; }
.seg .lbl-corto { display: none; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px; }

.tabla-scroll { overflow-x: auto; }
table.matriz { border-collapse: separate; border-spacing: 3px; font-size: .82rem; }
.matriz th { font-weight: 500; color: var(--muted); padding: 4px; text-align: center; white-space: nowrap; }
.matriz th.nom, .matriz td.nom { text-align: left; white-space: nowrap; padding-right: 12px; color: var(--ink); font-weight: 500; position: sticky; left: 0; background: var(--surface); }
.matriz td.c { width: 30px; height: 30px; text-align: center; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface-2); color: var(--muted); }
.matriz td.c-P { background: var(--ok-soft); color: var(--ok); }
.matriz td.c-R { background: var(--warn-soft); color: var(--warn); }
.matriz td.c-A { background: var(--bad-soft); color: var(--bad); }
.matriz td.c-J { background: var(--info-soft); color: var(--info); }
.matriz td.pct { padding-left: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- cumpleaños ---------- */
.hoy-cumple {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radio);
  background: linear-gradient(120deg, color-mix(in srgb, var(--sp-amarillo) 30%, var(--surface)), color-mix(in srgb, var(--sp-rosa) 22%, var(--surface)));
  border: 1px solid var(--line);
}
.hoy-cumple b { font-family: var(--f-display); font-size: 1.15rem; }
.subtitulo-lista { margin: 14px 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.subtitulo-lista:first-of-type { margin-top: 4px; }
.pestanas button small { margin-left: 4px; font-size: .75em; opacity: .7; }
.dias { min-width: 58px; text-align: center; font-family: var(--f-display); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dias small { display: block; font-family: var(--f-texto); font-weight: 500; font-size: .7rem; color: var(--muted); }
.meses { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 14px 16px; min-width: 0; }
.mes h3 { text-transform: capitalize; display: flex; justify-content: space-between; margin-bottom: 6px; }
.mes h3 small { color: var(--muted); font-family: var(--f-texto); font-weight: 500; }
.mes.actual { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mes li { display: flex; gap: 10px; align-items: baseline; font-size: .88rem; cursor: pointer; border-radius: 6px; }
.mes li:hover { color: var(--accent); }
.mes li .d { width: 22px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.mes li .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mes li .e { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }

/* ---------- fichas ---------- */
.fichas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ficha-card {
  display: flex; flex-direction: column; gap: 12px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 16px; min-width: 0;
}
.ficha-card:hover { border-color: var(--accent); }
.ficha-card .top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ficha-card .top div { min-width: 0; display: flex; flex-direction: column; }
.ficha-card .top b { font-family: var(--f-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-card .top small { color: var(--muted); font-size: .8rem; }
.ficha-card .pie { display: flex; flex-wrap: wrap; gap: 6px; }
.talleres-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }

/* ---------- talleres ---------- */
.talleres { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.taller { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio); padding: 18px; display: flex; flex-direction: column; gap: 10px; border-top: 5px solid var(--c); min-width: 0; }
.taller dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .88rem; }
.taller dt { color: var(--muted); }
.taller dd { margin: 0; }

/* ---------- diálogos ---------- */
.dialogo {
  border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgb(0 0 0 / .25);
}
.dialogo-ancho { width: min(820px, calc(100vw - 32px)); }
.dialogo-peq { width: min(420px, calc(100vw - 32px)); }
.dialogo::backdrop { background: rgb(20 18 31 / .45); }
.dialogo form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dlg-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dlg-cuerpo { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.dlg-pie { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cerrar { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 8px; }
.cerrar:hover { background: var(--surface-2); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-family: var(--f-display); font-weight: 600; padding: 0; margin-bottom: 10px; }
.campos { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campos label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.campos label.ancho { grid-column: 1 / -1; }
.campo-titulo { font-size: .8rem; color: var(--muted); font-weight: 500; margin: 14px 0 6px; }
.checks { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.checks label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .88rem; }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.checks input { accent-color: var(--accent); }
.edad-viva { display: block; min-height: 1.2em; margin-top: 4px; font-size: .82rem; font-weight: 600; color: var(--accent); }
.edad-viva.error { color: var(--bad); }
.nota-campo { margin-top: 8px; font-size: .82rem; color: var(--warn); }
.error { color: var(--bad); font-weight: 500; }

.ficha-cab { display: flex; gap: 16px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); position: relative; }
.ficha-cab .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ficha-cab h2 { font-size: 1.4rem; }
.ficha-cab .cerrar { position: absolute; top: 12px; right: 12px; }
.ficha-cuerpo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; padding: 22px; }
.ficha-cuerpo section { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ficha-cuerpo section.ancho { grid-column: 1 / -1; }
.ficha-cuerpo h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--f-texto); font-weight: 600; }
.dato { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; font-size: .9rem; }
.dato dt { color: var(--muted); }
.dato dd { margin: 0; overflow-wrap: anywhere; }
.copiable { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.copiar { border: 0; background: var(--surface-2); color: var(--muted); border-radius: 6px; font-size: .72rem; padding: 2px 8px; cursor: pointer; }
.historial { display: flex; flex-wrap: wrap; gap: 4px; }
.historial span { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.confirmacion { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bad-soft); color: var(--ink); padding: 10px 14px; border-radius: 10px; margin-right: auto; font-size: .88rem; }

/* ---------- avisos flotantes, carga y conexión ---------- */
.toasts {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(480px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 500;
  box-shadow: var(--shadow); border-left: 5px solid var(--ok); max-width: 100%; animation: entrar .2s ease-out;
}
.toast-error { border-left-color: var(--bad); }
.toast-warn { border-left-color: var(--warn); }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }
.cargando { position: fixed; z-index: 70; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px; box-shadow: var(--shadow); }
.giro { display: block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sin-conexion {
  position: fixed; z-index: 65; left: 0; right: 0; top: 0; text-align: center; font-weight: 600; font-size: .85rem;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn);
  padding: calc(6px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px));
}
.saltar { position: absolute; left: 16px; top: -60px; z-index: 80; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.saltar:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- pantalla de carga ---------- */
body.resolviendo .app, body.resolviendo .acceso { display: none !important; }
.arranque { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 90; padding: 16px; }
.arranque-card { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 340px; }
.arranque-card p { color: var(--muted); }
.arranque-barra { display: block; width: 180px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.arranque-barra span {
  display: block; height: 100%; width: 40%; border-radius: inherit;
  background: linear-gradient(90deg, var(--sp-violeta), var(--sp-azul), var(--sp-verde), var(--sp-amarillo), var(--sp-rojo), var(--sp-rosa));
  animation: barrido 1.2s ease-in-out infinite;
}
@keyframes barrido { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ---------- acceso ---------- */
.acceso {
  min-height: 100vh; display: grid; place-items: center;
  padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.acceso-card {
  width: min(920px, 100%); display: grid; grid-template-columns: 1fr 1.1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.acceso-marca {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 48px 40px;
  background: var(--marca-fondo); color: var(--marca-tinta);
}
.acceso-marca .espectro { position: absolute; top: 0; left: 0; right: 0; margin: 0; height: 8px; }
.acceso-marca img { background: #fff; border-radius: 18px; padding: 10px; width: 88px; height: auto; }
.acceso-nombre { font-family: var(--f-marca); font-size: 1.35rem; letter-spacing: -.03em; margin-top: 8px; }
.acceso-lema { font-family: var(--f-display); font-size: 1.1rem; font-weight: 500; opacity: .95; }
.acceso-desc { font-size: .9rem; opacity: .8; max-width: 34ch; }
.acceso-contacto { font-style: normal; font-size: .82rem; opacity: .85; display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.acceso-contacto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.acceso-form { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.acceso-form form, #acceso-demo { display: flex; flex-direction: column; gap: 14px; }
.acceso-form h1 { font-size: 1.5rem; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--muted); }
.clave { display: flex; gap: 6px; }
.clave input { flex: 1; }
.ver-clave { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 12px; cursor: pointer; font-size: .8rem; color: var(--muted); }
.btn-grande { padding: 12px 18px; font-size: 1rem; }
.enlace-texto { background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 500; padding: 4px; align-self: center; text-decoration: underline; text-underline-offset: 3px; }
.aviso-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: .88rem; }
.aviso-ok { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: .88rem; }
.roles-demo { display: flex; flex-direction: column; gap: 10px; }
.rol-demo {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px;
}
.rol-demo b { font-family: var(--f-display); font-weight: 600; }
.rol-demo span { color: var(--muted); font-size: .85rem; }
.rol-demo:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- piezas añadidas ---------- */
.pila { display: flex; flex-direction: column; gap: 16px; }
.vacio-grande { border: 1.5px dashed var(--line); border-radius: var(--radio); padding: 32px 20px; text-align: center; color: var(--muted); }
.nota-suave { color: var(--muted); font-size: .85rem; }
.pequeno { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.txt-alerta { color: var(--bad); font-weight: 600; }
.sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--f-texto); font-weight: 600; margin: 16px 0 4px; }
.check-suelto { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check-suelto input { accent-color: var(--accent); width: 18px; height: 18px; }
.checks-dias { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.taller.inactivo { opacity: .7; }
.chip-rol-admin { background: var(--accent-soft); color: var(--accent); }
.chip-rol-terapeuta { background: var(--info-soft); color: var(--info); }
.chip-rol-tallerista { background: var(--ok-soft); color: var(--ok); }
.chip-rol-equipo { background: var(--warn-soft); color: var(--warn); }
.mes li.clic { cursor: pointer; }
.mes li:not(.clic):hover { color: inherit; }
.ficha-cuerpo section.privado { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.ficha-cuerpo h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dlg-cuerpo.sin-relleno { padding: 0; }
.dlg-cuerpo h2 + p { margin-top: 8px; color: var(--muted); }
legend small { font-family: var(--f-texto); font-weight: 500; font-size: .78rem; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tabla th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tabla td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.kpi-valor small { font-size: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); gap: 12px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 12px;
  }
  .espectro { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; flex-direction: row; justify-content: space-around;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .66rem; flex: 1; text-align: center; min-width: 0; }
  .nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .lateral { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .lateral .espectro { flex-basis: calc(100% + 2 * max(16px, env(safe-area-inset-left, 0px))); }
  .plegar { display: none; }
  .usuario { margin-top: 0; border-top: 0; padding: 0; flex: 0 1 auto; }
  .usuario-txt { display: none; }
  .marca-sub { display: none; }
  .principal { padding-block: 20px 110px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .acceso-card { grid-template-columns: minmax(0, 1fr); }
  .acceso-marca { padding: 36px 24px 24px; }
  .acceso-desc { display: none; }
  .acceso-form { padding: 28px 24px 32px; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.45rem; }
  .campos, .ficha-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .dato { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .seg .lbl-largo { display: none; }
  .seg .lbl-corto { display: inline; }
  .pase .seg { width: 100%; padding-left: 52px; }
  .pase .seg button { flex: 1; }
  .rejilla { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- animaciones ---------- */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* microinteracciones */
.btn, .icono-btn, .ver-clave, .copiar, .cerrar, .enlace-texto, .pestanas button, .seg button {
  transition: transform .15s var(--ease-out), background-color .15s, border-color .15s, color .15s, filter .15s, box-shadow .2s;
}
.btn:not(:disabled):active, .icono-btn:active, .ver-clave:active, .copiar:active, .pestanas button:active, .seg button:active { transform: scale(.96); }
.btn:not(:disabled):hover { box-shadow: 0 4px 14px rgb(99 92 199 / .25); }
.btn-sec:not(:disabled):hover { box-shadow: var(--shadow); }
.nav a { transition: background-color .2s, color .2s, transform .2s var(--ease-out); }
.nav a svg { transition: transform .25s var(--ease-spring); }
.nav a:hover svg { transform: scale(1.12); }
.nav a[aria-current="page"] svg { animation: rebote .45s var(--ease-spring); }
@keyframes rebote { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.fila-click { transition: background-color .15s; }
.cerrar:hover { transform: rotate(90deg); }

/* tarjetas que se elevan al pasar el ratón */
.ficha-card, .taller, .rol-demo, .kpi, .mes {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .2s, background-color .2s;
}
@media (hover: hover) {
  .ficha-card:hover, .taller:hover, .rol-demo:hover, .kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgb(30 27 52 / .12); }
}

/* entrada de cada sección: los bloques aparecen escalonados */
#vista.entrando > * { animation: subir .5s var(--ease-out) both; }
#vista.entrando > :nth-child(2) { animation-delay: .06s; }
#vista.entrando > :nth-child(3) { animation-delay: .12s; }
#vista.entrando > :nth-child(4) { animation-delay: .18s; }
#vista.entrando > :nth-child(n+5) { animation-delay: .24s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > * { animation: subir .5s var(--ease-out) both; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(2) { animation-delay: .1s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(3) { animation-delay: .15s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(4) { animation-delay: .2s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(5) { animation-delay: .25s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(6) { animation-delay: .3s; }
#vista.entrando :is(.kpis, .fichas, .talleres, .meses, .rejilla) > :nth-child(n+7) { animation-delay: .35s; }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }

/* barras y gráfico crecen al entrar */
#vista.entrando .barra > span { animation: crecer-x .9s var(--ease-out) .25s both; transform-origin: left; }
#vista.entrando .grafico .col i { animation: crecer-y .8s var(--ease-out) both; transform-origin: bottom; }
#vista.entrando .grafico .col:nth-child(2) i { animation-delay: .25s; }
#vista.entrando .grafico .col:nth-child(3) i { animation-delay: .3s; }
#vista.entrando .grafico .col:nth-child(4) i { animation-delay: .35s; }
#vista.entrando .grafico .col:nth-child(5) i { animation-delay: .4s; }
#vista.entrando .grafico .col:nth-child(n+6) i { animation-delay: .45s; }
#vista.entrando .grafico .col:first-child i { animation-delay: .2s; }
@keyframes crecer-x { from { transform: scaleX(0); } }
@keyframes crecer-y { from { transform: scaleY(0); } }

/* diálogos: aparecen con un ligero zoom y el fondo se funde */
.dialogo[open] { animation: dlg-abrir .3s var(--ease-out); }
.dialogo[open]::backdrop { animation: fundir .3s ease-out; }
.dialogo.cerrando { animation: dlg-cerrar .18s ease-in forwards; }
.dialogo.cerrando::backdrop { animation: fundir .18s ease-in reverse forwards; }
@keyframes dlg-abrir { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes dlg-cerrar { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fundir { from { opacity: 0; } }

/* avisos flotantes */
.toast { animation: toast-entrar .4s var(--ease-spring); }
.toast.saliendo { animation: toast-salir .25s ease-in forwards; }
@keyframes toast-entrar { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toast-salir { to { opacity: 0; transform: translateY(8px) scale(.96); } }

/* pantalla de acceso y arranque */
.acceso:not([hidden]) .acceso-card { animation: subir .6s var(--ease-out) both; }
.acceso:not([hidden]) .acceso-marca img { animation: logo-entrar .7s var(--ease-spring) .15s both; }
.acceso:not([hidden]) .acceso-form > * { animation: subir .5s var(--ease-out) .2s both; }
@keyframes logo-entrar { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }
.arranque-card { animation: fundir .4s ease-out both; }
.arranque-card img { animation: latir 1.6s ease-in-out infinite; }
@keyframes latir { 50% { transform: scale(1.06); } }
#app:not([hidden]) .lateral { animation: fundir .4s ease-out; }

/* avisos de error en formularios */
.aviso-error:not([hidden]), .error:not([hidden]) { animation: sacudir .4s ease-in-out; }
@keyframes sacudir { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after, ::backdrop { transition: none !important; animation: none !important; } }

/* ---------- Estudio de posts (solo dirección) ---------- */
.estudio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.estudio-vista { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ep-lienzo-caja { width: 100%; max-width: 460px; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 30px rgb(30 27 52 / .18); background: #000; line-height: 0; }
.ep-lienzo-caja.ep-historia { max-width: 340px; }
.ep-lienzo-caja canvas { width: 100%; height: auto; display: block; }
.ep-acciones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.estudio-vista .nota-suave { text-align: center; }
.ep-laminas { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.ep-mini { position: relative; flex: none; width: 72px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; overflow: hidden; line-height: 0; }
.ep-mini canvas { width: 100%; height: auto; display: block; }
.ep-mini > span { position: absolute; left: 4px; bottom: 4px; line-height: 1; font-size: .7rem; font-weight: 600; background: rgb(0 0 0 / .65); color: #fff; padding: 2px 5px; border-radius: 4px; }
.ep-mini[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ep-mas { display: grid; place-items: center; min-height: 90px; border-style: dashed; color: var(--muted); }
.ep-mas > span { position: static; background: none; color: inherit; font-size: 1.6rem; font-weight: 400; }
.ep-lamina-acc { margin-top: 4px; }
.ep-plantillas { border: 1px solid var(--line); border-radius: var(--radio); padding: 10px 14px; }
.ep-plantillas summary { cursor: pointer; font-size: .9rem; }
.ep-plantillas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.ep-plantilla { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: 500 .74rem/1.25 var(--f-texto); color: var(--ink); text-align: center; }
.ep-plantilla canvas { width: 100%; height: auto; border-radius: 6px; display: block; }
.ep-plantilla[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ep-lbl { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.ep-lbl b { color: var(--ink); font-weight: 600; }
.ep-muestras { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-muestra { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; padding: 0; }
.ep-muestra.ep-arcoiris { background: conic-gradient(#e55dbe, #30b4e7, #11b351, #f8dd40, #f6364b, #8d5dc5, #e55dbe); }
.ep-muestra[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.ep-foto { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ep-foto-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-foto-mini { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--surface-2); display: block; }
.ep-foto-vacia { background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--line) 6px 12px); display: block; }
.ep-subir { cursor: pointer; }
.ep-ajustes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ep-ajustes label { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--muted); }
.ep-ajustes input { width: 100%; accent-color: var(--accent); }
.ep-pie { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.ep-guardados { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ep-guardado { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.ep-guardado-abrir { padding: 0; border: 0; background: var(--surface-2); border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 4 / 5; }
.ep-guardado-abrir img, .ep-guardado-abrir .ep-foto-vacia { width: 100%; height: 100%; object-fit: cover; }
.ep-guardado-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-guardado-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-guardado-txt small { color: var(--muted); font-size: .78rem; }
@media (max-width: 980px) {
  .estudio { grid-template-columns: minmax(0, 1fr); }
  .estudio-vista { position: static; }
}
@media (max-width: 600px) {
  .ep-lienzo-caja { max-width: 100%; }
  .ep-lienzo-caja.ep-historia { max-width: 80%; }
  .ep-ajustes { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- tienda ---------- */
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.foto-producto { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.foto-marco { flex: none; width: 112px; height: 112px; border-radius: 12px; border: 1px solid var(--line); background: #ffffff; overflow: hidden; display: grid; place-items: center; color: #615d78; font-size: .8rem; }
.foto-marco img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.foto-acciones { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.productos > li { align-items: center; }
.productos .miniatura { flex: none; width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line); background: #ffffff; object-fit: cover; object-position: 50% 52%; }
.productos .miniatura.vacia { display: grid; place-items: center; color: #615d78; font-size: .7rem; }
.productos li.oculto .txt, .productos li.oculto .miniatura { opacity: .55; }
.productos .mover { display: flex; gap: 4px; flex: none; }
.productos .mover button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .9rem; line-height: 1; }
.productos .mover button:disabled { opacity: .35; cursor: default; }
.productos .mover button:not(:disabled):hover { background: var(--surface-2); }
.productos .chips { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.form-tienda .dlg-pie { padding: 14px 0 0; border: 0; }
@media (max-width: 600px) {
  .productos .chips { display: none; }
  .foto-producto { align-items: flex-start; }
}
