/* N2-B · Catálogo y editor de listas (láminas 05 y 06). Portado de tools/nomina_ref/proto/nomina.css con el
   prefijo ce-: mismas medidas, radios, tintas y sombras. Únicos cambios: los controles suben a 44 px (AGENTS §6.4)
   y el acento sale de la skin activa (--power-accent). Solo se animan transform y opacity, con las curvas oficiales. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;700;800;900&display=swap');

.ce-capa, .ce-hoja-capa, .ce-velo-modal, .ce-fab, .ce-fantasma {
  --acc: var(--power-accent, #ff2a4a);
  --acc2: color-mix(in srgb, var(--acc) 45%, #fff);
  --bg0: #0b0608;
  --surf: rgba(20, 12, 15, .88);
  --surf2: rgba(34, 19, 23, .92);
  --surf3: rgba(48, 26, 31, .95);
  --line: color-mix(in srgb, var(--acc) 26%, transparent);
  --txt: #f6f2f2;
  --mut: #a8989b;
  --grid: rgba(255, 255, 255, .025);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --info: #7cc4ff;
  --co: #e8263a;
  --ce-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ce-deriva: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--txt);
  box-sizing: border-box;
}
.ce-capa *, .ce-hoja-capa *, .ce-velo-modal *, .ce-fantasma * { box-sizing: border-box; min-width: 0; }
.ce-capa[hidden], .ce-hoja-capa[hidden], .ce-velo-modal[hidden], .ce-capa [hidden], .ce-hoja-capa [hidden] { display: none !important; }
.ce-capa button, .ce-hoja-capa button, .ce-velo-modal button, .ce-velo-modal select, .ce-velo-modal input { font: inherit; color: inherit; }
.ce-capa svg, .ce-hoja-capa svg, .ce-velo-modal svg, .ce-fab svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Entrada (botón flotante, solo Dirección y staff) ───────────────────────────────────────────── */
.ce-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 8800;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; min-width: 44px; padding: 0 18px; border: 1px solid var(--acc);
  border-radius: 16px; cursor: pointer; font: 800 12px/1 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--txt);
  background: linear-gradient(180deg, var(--surf3), var(--surf)); backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px -14px #000, 0 0 24px -10px var(--acc), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform 220ms var(--ce-pop); -webkit-tap-highlight-color: transparent;
}
.ce-fab svg { width: 18px; height: 18px; color: var(--acc); }
.ce-fab:active { transform: scale(.96); }
html[data-ce-abierta] .ce-fab { opacity: 0; pointer-events: none; }

/* ── Capa de la vista (cubre la página; el fondo es el de la lámina) ────────────────────────────── */
.ce-capa {
  position: fixed; inset: 0; z-index: 9400; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background-color: var(--bg0);
  background-image: radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--acc) 15%, transparent), transparent 60%),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}
.ce-capa[data-entra="a"] .ce-cuerpo { animation: ceEntraA 380ms var(--ce-deriva) both; }
.ce-capa[data-entra="b"] .ce-cuerpo { animation: ceEntraB 380ms var(--ce-deriva) both; }
@keyframes ceEntraA {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes ceEntraB {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.ce-cuerpo { max-width: 1240px; margin: 0 auto; padding: 0 24px 28px; }
.ce-sp { flex: 1 1 auto; }
.ce-topbar { display: flex; align-items: center; gap: 10px; height: 64px; }
.ce-marca { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; font: 800 12px/1 'Inter', sans-serif; letter-spacing: .24em; }
.ce-marca i { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px; background: var(--acc); display: inline-grid; place-items: center; box-shadow: 0 0 12px color-mix(in srgb, var(--acc) 60%, transparent); }
.ce-marca i svg { width: 11px; height: 11px; fill: #0b0608; stroke: none; }
.ce-modo { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font: 800 9.5px/1 'Inter', sans-serif; letter-spacing: .14em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fde68a; background: color-mix(in srgb, var(--warn) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.ce-ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surf); display: inline-grid; place-items: center; cursor: pointer; }
.ce-ico svg { width: 17px; height: 17px; }

.ce-card { position: relative; border-radius: 20px; background: var(--surf); border: 1px solid var(--line); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 32px -20px rgba(0, 0, 0, .85); }
.ce-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 800 10px/1.2 'Inter', sans-serif; letter-spacing: .22em; color: var(--mut); text-transform: uppercase; }
.ce-kicker b { color: var(--acc); }
.ce-nota { margin: 0; font: 600 11.5px/1.45 'Inter', sans-serif; color: var(--mut); }
.ce-vacio { text-align: center; padding: 28px 14px; }
.ce-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font: 800 9.5px/1 'Inter', sans-serif; letter-spacing: .12em; white-space: nowrap; flex: 0 0 auto;
  --c: var(--acc); background: color-mix(in srgb, var(--c) 15%, transparent); color: color-mix(in srgb, var(--c) 80%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); }
.ce-chip.ok { --c: var(--ok); } .ce-chip.warn { --c: var(--warn); } .ce-chip.bad { --c: var(--bad); } .ce-chip.info { --c: var(--info); } .ce-chip.co { --c: var(--co); } .ce-chip.gris { --c: #9ca3af; }
.ce-chip.mini { height: 18px; padding: 0 5px; font-size: 8.5px; }
.ce-chip.sube { box-shadow: 0 0 14px -2px var(--warn), inset 0 0 0 1px var(--warn); }
.ce-punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; --c: var(--ok); background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
.ce-punto[data-pago="tarde"] { --c: var(--warn); }
.ce-punto[data-pago="pend"] { --c: var(--bad); }
.ce-chip .ce-punto { font-style: normal; }
.ce-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; min-width: 44px; padding: 0 16px; border-radius: 13px; border: 0; cursor: pointer;
  font: 800 12px/1 'Inter', sans-serif !important; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: transform 200ms var(--ce-pop), opacity 200ms var(--ce-deriva); }
.ce-btn:active { transform: scale(.97); }
.ce-btn:disabled { opacity: .45; cursor: not-allowed; }
.ce-btn.pri { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 92%, #fff), var(--acc)); color: #0b0608 !important; box-shadow: 0 8px 22px -10px var(--acc), inset 0 1px 0 rgba(255, 255, 255, .5); }
.ce-btn.fant { background: transparent; color: var(--mut) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ce-btn svg { width: 15px; height: 15px; }
.ce-av { position: relative; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font: 800 9px/1 'Inter', sans-serif; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--hc, var(--acc)) 60%, #1a1420), #120e18 75%); box-shadow: 0 0 0 2px var(--hc, var(--acc)), 0 0 10px -2px var(--hc, var(--acc)); }
.ce-av.g { width: 44px; height: 44px; font-size: 14px; }
.ce-av.fant { background: var(--surf2); border: 1.5px dashed rgba(255, 255, 255, .3); box-shadow: none; color: var(--mut); }
.ce-av.fant.mas { color: var(--txt); }
.ce-dia { flex: 0 0 auto; width: 44px; text-align: center; }
.ce-dia b { display: block; font: 800 11px/1 'Inter', sans-serif; letter-spacing: .1em; color: var(--acc); }
.ce-dia span { display: block; margin-top: 3px; font: 700 10px/1 'Inter', sans-serif; color: var(--mut); }
.ce-anillo { position: relative; width: 42px; height: 42px; flex: 0 0 auto; }
.ce-anillo svg { width: 42px; height: 42px; transform: rotate(-90deg); }
.ce-anillo b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 12px/1 'Inter', sans-serif; }

/* Cabecera y pestañas */
.ce-cab-pag { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.ce-cab-t { flex: 0 1 auto; }
.ce-cab-pag h1 { margin: 8px 0 0; font: 800 26px/1 'Inter', sans-serif; letter-spacing: .02em; }
.ce-sub { font: 700 11px/1 'Inter', sans-serif; letter-spacing: .18em; color: var(--mut); text-transform: uppercase; }
.ce-pestanas { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.ce-pestanas::-webkit-scrollbar { display: none; }
.ce-pest { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; flex: 0 0 auto;
  font: 800 11px/1 'Inter', sans-serif !important; letter-spacing: .12em; color: var(--mut) !important; text-transform: uppercase; white-space: nowrap; }
.ce-pest[aria-selected="true"] { color: var(--txt) !important; background: var(--surf2); box-shadow: inset 0 0 0 1px var(--line); }
.ce-pest em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--warn); color: #1a1205; font-size: 10px; letter-spacing: 0; }
.ce-link { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 -12px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 800 10px/1 'Inter', sans-serif !important; letter-spacing: .14em; color: var(--acc2) !important; text-transform: uppercase; }

/* Catálogo (lámina 05, izquierda) */
.ce-alertas { display: flex; gap: 12px; }
.ce-alerta { flex: 1; display: flex; gap: 10px; padding: 12px 14px; border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.ce-alerta .ic { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); font: 900 14px/1 'Inter', sans-serif; }
.ce-alerta .t { flex: 1; }
.ce-alerta .t b { display: block; font: 800 12px/1.3 'Inter', sans-serif; }
.ce-alerta .t span { display: block; margin-top: 3px; font: 600 10.5px/1.4 'Inter', sans-serif; color: var(--mut); }
.ce-cat-dia { margin-top: 18px; }
.ce-cat-dia > .ce-kicker { margin-bottom: 10px; }
.ce-cat-rej { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ce-cat-card .arriba { display: flex; gap: 10px; align-items: flex-start; }
.ce-cat-card .arriba .t { flex: 1; }
.ce-cat-card .arriba .t b { display: block; font: 800 14px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cat-card .arriba .t span { display: block; margin-top: 4px; font: 600 11px/1.2 'Inter', sans-serif; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-cat-card.dos { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.ce-cat-card.dos .ce-nota { margin-top: 10px; }
.ce-cifras, .ce-col-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ce-avs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; margin-top: 12px; padding-left: 2px; }
.ce-avs .ce-av { width: 27px; height: 27px; font-size: 8px; margin-right: -4px; box-shadow: 0 0 0 2px var(--surf2), 0 0 0 3.5px var(--hc); }
.ce-avs .ce-av.fant { box-shadow: none; }

/* Editor de listas (lámina 05, derecha) */
.ce-fila-dias { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ce-dias { display: flex; gap: 6px; margin: 14px 0; }
.ce-dia-tab { width: 56px; height: 44px; border: 0; border-radius: 11px; display: grid; place-items: center; cursor: pointer; font: 800 11px/1 'Inter', sans-serif !important; letter-spacing: .14em;
  color: var(--mut) !important; background: var(--surf); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ce-dia-tab[aria-selected="true"] { color: #0b0608 !important; background: var(--acc); box-shadow: 0 6px 18px -8px var(--acc); }
.ce-leyenda { display: flex; gap: 8px; }
.ce-leyenda .ce-chip { height: 26px; }
.ce-tablero { display: grid; grid-template-columns: 250px repeat(var(--ncol, 3), minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.ce-columna { border-radius: 18px; background: var(--surf); border: 1px solid var(--line); padding: 12px; min-height: 300px; transition: transform 220ms var(--ce-pop); }
.ce-columna.sinu { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 8%, transparent), transparent 40%), var(--surf); }
.ce-columna[data-ce-sobre] { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 25%, transparent), 0 0 40px -10px var(--acc); transform: translateY(-2px); }
.ce-col-cab { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ce-col-cab .t { flex: 1; }
.ce-col-cab .t b { display: block; font: 800 14px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-col-cab .t span { display: block; margin-top: 3px; font: 600 10.5px/1.25 'Inter', sans-serif; color: var(--mut); }
.ce-col-cab .t b.ce-sinu-t { color: var(--warn); white-space: normal; }
.ce-col-meta { margin: 10px 0 8px; }
.ce-al { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 9px; border-radius: 12px; background: var(--surf2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); margin-top: 6px;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: opacity 200ms var(--ce-deriva), transform 220ms var(--ce-pop); }
.ce-al .ce-n { flex: 1; font: 700 12px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-agarre { width: 10px; height: 16px; flex: 0 0 auto; opacity: .35; background: radial-gradient(circle, #fff 1.2px, transparent 1.6px) 0 0 / 5px 5px; }
.ce-al.movida { background: color-mix(in srgb, var(--acc) 14%, var(--surf2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 50%, transparent); }
.ce-al[data-ce-sale] { opacity: .32; }
.ce-al.ce-hueco { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--acc) 60%, transparent); box-shadow: none; animation: ceHueco 260ms var(--ce-pop) both; }
@keyframes ceHueco {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: none; }
}
.ce-fantasma { position: fixed; z-index: 100300; margin: 0; pointer-events: none; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 9px; border-radius: 12px;
  background: var(--surf3) !important; box-shadow: 0 24px 50px -12px #000, 0 0 0 1.5px var(--acc), 0 0 30px -6px var(--acc) !important; }
.ce-fantasma .ce-n { flex: 1; font: 700 12px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-ce-arrastre], html[data-ce-arrastre] * { cursor: grabbing !important; }
.ce-sinu-card { padding: 10px; border-radius: 13px; background: var(--surf2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); margin-top: 8px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: opacity 200ms var(--ce-deriva); }
.ce-sinu-card[data-ce-sale] { opacity: .32; }
.ce-sinu-card .arriba { display: flex; align-items: center; gap: 9px; }
.ce-sinu-card .arriba b { flex: 1; font: 800 12px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-sinu-card code { display: block; margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .35); font: 600 10.5px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #fcd34d; word-break: break-word; }
.ce-sug { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 0 10px; min-height: 44px; border: 0; border-radius: 10px; cursor: pointer; text-align: left;
  font: 800 10.5px/1.1 'Inter', sans-serif !important; color: var(--acc2) !important; background: color-mix(in srgb, var(--acc) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 35%, transparent);
  transition: transform 200ms var(--ce-pop); }
.ce-sug:active { transform: scale(.97); }
.ce-sug svg { width: 14px; height: 14px; flex: 0 0 auto; }
.ce-sug b { font-size: 9.5px; letter-spacing: .14em; flex: 0 0 auto; }
.ce-sinu-rej { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 12px; }
.ce-intro { margin: -4px 0 6px; }
.ce-bita b { display: block; font: 800 13px/1.3 'Inter', sans-serif; }
.ce-bita .ce-nota { margin-top: 6px; }
.ce-bita-lista { margin: 10px 0 0; padding: 0; list-style: none; }
.ce-bita-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .06); font: 600 11.5px/1.3 'Inter', sans-serif; color: var(--mut); }
.ce-bita-lista li .t { flex: 1; }
.ce-bita-lista li .t b { display: block; color: var(--txt); font-size: 12px; }
.ce-bita-lista li .t span { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.ce-bita-lista li .t span.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; color: #fcd34d; }
.ce-bita-lista li .ce-btn { flex: 0 0 auto; }
.ce-pasos { margin-top: 6px; }

/* Bandeja de cambios */
.ce-bandeja::after { content: ''; position: absolute; left: -25px; right: -25px; top: 100%; height: 40px; margin-top: 1px; background: var(--bg0); }
.ce-bandeja { position: sticky; bottom: 14px; display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px 16px; border-radius: 20px; z-index: 20;
  background: linear-gradient(var(--surf3), var(--surf3)), var(--bg0); border: 1px solid var(--acc); box-shadow: 0 20px 50px -18px #000, 0 0 40px -18px var(--acc); }
.ce-cuenta { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--acc); color: #0b0608; font: 800 24px/1 'Inter', sans-serif; }
.ce-cuenta[data-pop="a"] { animation: cePopA 420ms var(--ce-pop) both; }
.ce-cuenta[data-pop="b"] { animation: cePopB 420ms var(--ce-pop) both; }
@keyframes cePopA {
  from { transform: scale(.82); }
  to { transform: none; }
}
@keyframes cePopB {
  from { transform: scale(.82); }
  to { transform: none; }
}
.ce-cambios { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.ce-cambios > div { display: flex; align-items: center; gap: 8px; font: 700 11.5px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; }
.ce-cambios > div > * { overflow: hidden; text-overflow: ellipsis; }
.ce-cambios > div > span { color: var(--mut); }
.ce-cambios > div > span.amb { color: #fcd34d; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ce-cambios > div > i { font-style: normal; color: var(--acc); flex: 0 0 auto; }
.ce-cambios .ce-kicker { margin-bottom: 2px; }
.ce-efecto { flex: 0 1 360px; padding: 10px 12px; border-radius: 13px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ce-efecto .ce-kicker { margin-bottom: 7px; }
.ce-efecto > div:not(.ce-kicker) { display: flex; justify-content: space-between; gap: 14px; font: 700 11.5px/1.5 'Inter', sans-serif; }
.ce-efecto > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-efecto b { flex: 0 0 auto; white-space: nowrap; }
.ce-efecto b.pos { color: var(--ok); }
.ce-efecto b.neg { color: var(--bad); }
.ce-acc { display: flex; gap: 10px; flex: 0 0 auto; }

/* Revisar y guardar (lámina 06, izquierda) */
.ce-velo-modal { position: fixed; inset: 0; z-index: 100200; background: rgba(4, 2, 6, .72); backdrop-filter: blur(6px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; overflow-y: auto; }
.ce-velo-modal[data-entra="a"] .ce-modal { animation: ceModalA 360ms var(--ce-pop) both; }
.ce-velo-modal[data-entra="b"] .ce-modal { animation: ceModalB 360ms var(--ce-pop) both; }
@keyframes ceModalA {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes ceModalB {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.ce-modal { width: min(680px, 100%); max-width: 100%; border-radius: 24px; background: linear-gradient(var(--surf), var(--surf)), var(--bg0); border: 1px solid var(--line);
  box-shadow: 0 30px 80px -20px #000, inset 0 1px 0 rgba(255, 255, 255, .06); padding: 20px 22px 22px; }
.ce-modal h2 { margin: 6px 0 4px; font: 800 22px/1.15 'Inter', sans-serif; }
.ce-diff { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surf2); }
.ce-diff .q { display: flex; align-items: center; gap: 9px; font: 800 12.5px/1.2 'Inter', sans-serif; }
.ce-diff .lin { margin-top: 8px; padding: 7px 9px; border-radius: 8px; font: 600 11px/1.45 ui-monospace, Menlo, Consolas, monospace; word-break: break-word; overflow-wrap: anywhere; }
.ce-diff .lin.antes { background: rgba(251, 113, 133, .08); color: #fda4af; }
.ce-diff .lin.antes del { color: #fb7185; text-decoration: line-through; }
.ce-diff .lin.despues { background: rgba(52, 211, 153, .08); color: #a7f3d0; }
.ce-diff .lin.despues ins { color: #34d399; text-decoration: none; font-weight: 800; }
.ce-diff .lin small { display: block; font: 800 8.5px/1 'Inter', sans-serif; letter-spacing: .18em; opacity: .7; margin-bottom: 4px; }
.ce-diff-msg:empty, .ce-rev-msg:empty { display: none; }
.ce-diff-msg { margin: 6px 0 0; font: 700 11px/1.3 'Inter', sans-serif; color: var(--warn); }
.ce-campos { display: flex; gap: 12px; }
.ce-campo { display: block; margin-top: 14px; }
.ce-campo.m { flex: 1.4; } .ce-campo.p { flex: 1; }
.ce-campo > span { display: block; margin-bottom: 7px; font: 800 9.5px/1 'Inter', sans-serif; letter-spacing: .18em; color: var(--mut); text-transform: uppercase; }
.ce-campo select, .ce-campo input { display: block; width: 100%; height: 46px; padding: 0 14px; border: 0 !important; border-radius: 13px !important; background: var(--surf2) !important; color: var(--txt) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); font: 700 13px/1 'Inter', sans-serif; }
/* La skin global (power-alfa) pinta todo input con un filo de acento a la izquierda y anima box-shadow: guarda de 3 ids (V-40). */
html:not(#ce-a):not(#ce-b):not(#ce-c) .ce-campo select, html:not(#ce-a):not(#ce-b):not(#ce-c) .ce-campo input {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) !important; transition: none !important;
}
html:not(#ce-a):not(#ce-b):not(#ce-c) .ce-campo select:focus, html:not(#ce-a):not(#ce-b):not(#ce-c) .ce-campo input:focus { box-shadow: inset 0 0 0 1.5px var(--acc) !important; }
.ce-campo select option { background: #1a1014; color: var(--txt); }
.ce-campo input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .4em; }
.ce-campo select:focus, .ce-campo input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--acc); }
.ce-aviso-seguro { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 12px; border-radius: 13px; background: color-mix(in srgb, var(--ok) 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 28%, transparent); font: 600 11.5px/1.45 'Inter', sans-serif; color: #c9f5e3; }
.ce-aviso-seguro svg { width: 18px; height: 18px; flex: 0 0 auto; stroke: var(--ok); margin-top: 1px; }
.ce-aviso-seguro b { color: #fff; }
.ce-rev-borrador { margin: 12px 0 0; padding: 9px 12px; border-radius: 11px; font: 800 10.5px/1.4 'Inter', sans-serif; letter-spacing: .06em; color: #fde68a;
  background: color-mix(in srgb, var(--warn) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.ce-rev-msg { margin: 10px 0 0; font: 700 12px/1.4 'Inter', sans-serif; color: var(--acc2); }
.ce-pie-modal { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Hoja «Mover a…» (lámina 06, centro) */
.ce-hoja-capa { position: fixed; inset: 0; z-index: 100100; }
.ce-velo { position: absolute; inset: 0; background: rgba(4, 2, 6, .6); }
.ce-hoja { position: absolute; left: 0; right: 0; bottom: 0; max-width: 460px; margin: 0 auto; max-height: min(78%, 680px); display: flex; flex-direction: column; overflow: hidden;
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: linear-gradient(var(--surf2), var(--surf)), var(--bg0); border-top: 1px solid var(--line);
  box-shadow: 0 -24px 60px -10px #000; }
.ce-hoja-capa[data-entra="a"] .ce-velo { animation: ceVelo 260ms var(--ce-deriva) both; }
.ce-hoja-capa[data-entra="b"] .ce-velo { animation: ceVelo2 260ms var(--ce-deriva) both; }
.ce-hoja-capa[data-entra="a"] .ce-hoja { animation: ceHojaA 380ms var(--ce-deriva) both; }
.ce-hoja-capa[data-entra="b"] .ce-hoja { animation: ceHojaB 380ms var(--ce-deriva) both; }
@keyframes ceVelo {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ceVelo2 {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ceHojaA {
  from { transform: translateY(100%); }
  to { transform: none; }
}
@keyframes ceHojaB {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.ce-asa { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 0 auto 12px; }
.ce-hoja-quien { display: flex; align-items: center; gap: 10px; }
.ce-hoja-quien .t { flex: 1; }
.ce-hoja-quien .t b { display: block; font: 800 16px/1.2 'Inter', sans-serif; }
.ce-seg { display: flex; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ce-seg button { flex: 1; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font: 800 11px/1.2 'Inter', sans-serif !important; letter-spacing: .06em; color: var(--mut) !important; }
.ce-seg button[aria-selected="true"] { background: var(--surf3); color: var(--txt) !important; box-shadow: inset 0 0 0 1px var(--line), 0 6px 16px -10px var(--acc); }
.ce-seg button:disabled { opacity: .4; cursor: not-allowed; }
.ce-hoja-k { margin: 14px 0 2px; }
.ce-hoja-q { margin-top: 14px; }
.ce-capsula { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--surf2); cursor: pointer; text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); margin-top: 7px; transition: transform 200ms var(--ce-pop); }
.ce-capsula:active { transform: scale(.98); }
.ce-capsula .t { flex: 1; }
.ce-capsula .t b { display: block; font: 800 12.5px/1.2 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-capsula .t span { display: block; margin-top: 2px; font: 600 10.5px/1.2 'Inter', sans-serif; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-capsula[aria-pressed="true"] { background: color-mix(in srgb, var(--acc) 14%, var(--surf2)); box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 20px -10px var(--acc); }
.ce-check { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2); }
.ce-capsula[aria-pressed="true"] .ce-check { background: var(--acc); box-shadow: none; }
.ce-check svg { width: 13px; height: 13px; stroke: #0b0608; stroke-width: 3; }
.ce-hoja-in { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ce-capsulas { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 2px; }
.ce-hoja-ok { width: 100%; margin-top: 12px; flex: 0 0 auto; }
.ce-hoja-in > .ce-aviso-seguro { flex: 0 0 auto; }

/* Teléfono: una columna, días a lo ancho y bandeja compacta (sin scroll horizontal de la página). */
@media (max-width: 900px) {
  .ce-cat-rej { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-bandeja { flex-wrap: wrap; }
  .ce-efecto { flex: 1 1 100%; order: 3; }
  .ce-acc { order: 4; flex: 1 1 100%; }
  .ce-acc .ce-btn { flex: 1; }
}
@media (max-width: 760px) {
  .ce-cuerpo { padding: 0 16px 24px; }
  .ce-topbar { height: 60px; }
  .ce-cab-pag { flex-wrap: wrap; margin-bottom: 10px; }
  .ce-cab-pag h1 { font-size: 22px; }
  .ce-pestanas { margin-left: 0; width: 100%; }
  .ce-alertas { flex-direction: column; }
  .ce-cat-rej { grid-template-columns: minmax(0, 1fr); }
  .ce-dias { width: 100%; margin: 4px 0 8px; }
  .ce-dia-tab { width: auto; flex: 1 1 0; }
  .ce-instr, .ce-leyenda { display: none; }
  .ce-tablero { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .ce-columna { min-height: 0; }
  .ce-campos { flex-direction: column; gap: 0; }
  .ce-modal { padding: 16px 14px 18px; }
  .ce-bandeja { gap: 10px; padding: 12px; bottom: 10px; }
  .ce-bandeja::after { left: -17px; right: -17px; }
  .ce-cuenta { width: 44px; height: 44px; font-size: 20px; border-radius: 13px; }
  .ce-fab { right: 12px; padding: 0 14px; }
  .ce-cambios > div { flex-wrap: wrap; white-space: normal; row-gap: 1px; column-gap: 6px; }
  .ce-cambios > div > b:first-child { flex: 1 1 100%; }
  .ce-modo { height: auto; min-height: 28px; padding: 5px 9px; white-space: normal; line-height: 1.3; font-size: 9px; letter-spacing: .1em; }
}
@media (max-width: 380px) {
  .ce-dias { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .ce-capa .ce-cuerpo, .ce-velo-modal .ce-modal, .ce-hoja-capa .ce-hoja, .ce-hoja-capa .ce-velo, .ce-cuenta, .ce-hueco { animation: none !important; }
}
