/* BTMS Connect — sistema visual de la app de iPhone.
   Misma familia que BTMS Frigo y Vet (tema Cupertino): azul de marca #22407e,
   grises de Apple, materiales translúcidos, títulos grandes. Tokens en :root;
   el modo oscuro los redefine. Nada de colores sueltos en los componentes. */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #22407e;
  --brand-2: #3461b8;
  --brand-ink: #ffffff;
  --brand-soft: rgba(34, 64, 126, .09);
  --brand-tint: #2d56a6;             /* texto de acción sobre fondo claro */
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --raised: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #48484d;
  --ink-3: #86868b;
  --ink-4: #aeaeb2;
  --sep: rgba(60, 60, 67, .16);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --ok: #1e8a4f; --ok-dot: #30b15c; --ok-soft: #e6f5ec;
  --warn: #a15c00; --warn-dot: #f5a524; --warn-soft: #fdf1dd;
  --bad: #d1302b; --bad-soft: #fdecea;
  --info: #1f64c8; --info-soft: #e8f0fc;
  --violet: #6e4bd8; --teal: #0f8b8d; --pink: #c93a73; --orange: #d86a1c; --green: #2f9e57; --graphite: #5b5b63;
  --bar: rgba(249, 249, 251, .78);
  --bar-line: rgba(0, 0, 0, .12);
  --scrim: rgba(0, 0, 0, .32);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .05), 0 18px 40px rgba(0, 0, 0, .1);
  --shadow-card: 0 1px 1px rgba(10, 25, 60, .08), 0 10px 24px -6px rgba(10, 25, 60, .28), 0 28px 60px -18px rgba(10, 25, 60, .35);
  --r-xl: 28px; --r-l: 20px; --r-m: 14px; --r-s: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-d: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);       /* el de las hojas de iOS */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 50px;
  --nav-h: 44px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8aa9ff; --brand-2: #b3c7ff; --brand-ink: #0b1224; --brand-soft: rgba(138, 169, 255, .14); --brand-tint: #8aa9ff;
    --bg: #000000; --surface: #1c1c1e; --surface-2: #232326; --raised: #2c2c2e;
    --ink: #f5f5f7; --ink-2: #d1d1d6; --ink-3: #98989f; --ink-4: #636366;
    --sep: rgba(84, 84, 88, .55);
    --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34);
    --ok: #3fd07f; --ok-dot: #30d158; --ok-soft: rgba(48, 209, 88, .14);
    --warn: #ffb340; --warn-dot: #ffb340; --warn-soft: rgba(255, 179, 64, .14);
    --bad: #ff6961; --bad-soft: rgba(255, 105, 97, .15);
    --info: #64a8ff; --info-soft: rgba(100, 168, 255, .14);
    --violet: #a48bff; --teal: #3ec8ca; --pink: #ff7aa9; --orange: #ff9f4d; --green: #4bd27a; --graphite: #8e8e93;
    --bar: rgba(22, 22, 24, .74); --bar-line: rgba(255, 255, 255, .1);
    --scrim: rgba(0, 0, 0, .55);
    --shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06);
    --shadow-2: 0 0 0 .5px rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .5);
    --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .08), 0 14px 34px -8px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #8aa9ff; --brand-2: #b3c7ff; --brand-ink: #0b1224; --brand-soft: rgba(138, 169, 255, .14); --brand-tint: #8aa9ff;
  --bg: #000000; --surface: #1c1c1e; --surface-2: #232326; --raised: #2c2c2e;
  --ink: #f5f5f7; --ink-2: #d1d1d6; --ink-3: #98989f; --ink-4: #636366;
  --sep: rgba(84, 84, 88, .55);
  --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34);
  --ok: #3fd07f; --ok-dot: #30d158; --ok-soft: rgba(48, 209, 88, .14);
  --warn: #ffb340; --warn-dot: #ffb340; --warn-soft: rgba(255, 179, 64, .14);
  --bad: #ff6961; --bad-soft: rgba(255, 105, 97, .15);
  --info: #64a8ff; --info-soft: rgba(100, 168, 255, .14);
  --violet: #a48bff; --teal: #3ec8ca; --pink: #ff7aa9; --orange: #ff9f4d; --green: #4bd27a; --graphite: #8e8e93;
  --bar: rgba(22, 22, 24, .74); --bar-line: rgba(255, 255, 255, .1);
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 0 0 .5px rgba(255, 255, 255, .06);
  --shadow-2: 0 0 0 .5px rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .5);
  --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .08), 0 14px 34px -8px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 17px/1.294 var(--font); letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; letter-spacing: inherit; }
input, textarea, select { font: inherit; letter-spacing: inherit; color: var(--ink); }
a { color: var(--brand-tint); text-decoration: none; }
svg { display: block; }
.i { width: 22px; height: 22px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--brand-soft); }

/* ---------- el teléfono ----------
   En el iPhone la app ocupa toda la pantalla. En una computadora se muestra
   dentro de un marco de teléfono para las demos; el transform convierte al
   marco en el contenedor de todo lo que es position: fixed. */
#app { height: 100%; }
.device { position: relative; height: 100%; width: 100%; overflow: hidden; background: var(--bg); }
@media (min-width: 760px) and (min-height: 700px) {
  body:has(.device) { display: grid; place-items: center; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--brand) 10%, var(--bg)) 0%, var(--bg) 60%); }
  .device {
    width: 402px; height: min(874px, calc(100vh - 48px)); border-radius: 56px; transform: translateZ(0);
    box-shadow: 0 0 0 11px #0d0d0f, 0 0 0 12.5px #3a3a3e, 0 40px 90px -20px rgba(8, 20, 50, .45);
    --safe-t: 54px; --safe-b: 26px;
  }
  .device::before { /* la isla */
    content: ""; position: absolute; z-index: 999; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px;
    background: #000; border-radius: 20px; pointer-events: none;
  }
  .statusbar { display: flex !important; }
}
.statusbar {
  display: none; position: absolute; z-index: 998; inset: 0 0 auto; height: 54px; padding: 18px 34px 0 44px;
  justify-content: space-between; align-items: flex-start; font: 600 16.5px/1 var(--font-d); letter-spacing: -.01em; pointer-events: none; color: var(--ink);
}
.statusbar .sb-r { display: flex; gap: 6px; align-items: center; padding-top: 1px; }
.statusbar .sb-r svg { height: 12px; width: auto; }
.statusbar.claro { color: #fff; }

/* ---------- pila de pantallas ---------- */
.tabview { position: absolute; inset: 0; display: none; }
.tabview.on { display: block; }
.page {
  position: absolute; inset: 0; background: var(--bg); overflow: hidden;
  will-change: transform; contain: layout paint;
}
.page.entra { transform: translateX(100%); }
.page.anim { transition: transform .5s var(--ease); }
.page.atras { transform: translateX(-28%); }
.page::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.page.atras::after { opacity: .08; }
.page.sombra { box-shadow: -12px 0 32px rgba(0, 0, 0, .12); }
.scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-t) + var(--nav-h)) 0 calc(var(--tabbar-h) + var(--safe-b) + 28px);
  overscroll-behavior-y: contain; scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.nav.fija + .scroll { padding-top: calc(var(--safe-t) + var(--nav-h) + 10px); }
.page.sin-tabbar .scroll { padding-bottom: calc(var(--safe-b) + 32px); }

/* barra de navegación: material translúcido que aparece al desplazar */
.nav {
  position: absolute; z-index: 20; inset: 0 0 auto; height: calc(var(--safe-t) + var(--nav-h)); padding: var(--safe-t) 8px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  transition: background .25s, box-shadow .25s, -webkit-backdrop-filter .25s, backdrop-filter .25s;
}
.nav.solida { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 .5px 0 var(--bar-line); }
.nav .titulo { font: 600 17px/1 var(--font-d); letter-spacing: -.024em; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--ease-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.nav.solida .titulo, .nav.fija .titulo { opacity: 1; transform: none; }
.nav .izq { justify-self: start; display: flex; }
.nav .der { justify-self: end; display: flex; gap: 2px; }
.nbtn {
  height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: none; color: var(--brand-tint);
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; font-size: 17px; cursor: pointer; border-radius: 22px;
  transition: opacity .15s;
}
.nbtn:active { opacity: .35; transition: none; }
.nbtn .i { width: 24px; height: 24px; }
.nbtn.atras { padding-left: 2px; }
.nbtn.atras span { max-width: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbtn.atras .i { width: 13px; height: 22px; margin-right: 4px; stroke-width: 2.6; }
.nbtn.fuerte { font-weight: 600; }
.nbtn.circulo { width: 34px; height: 34px; min-width: 34px; padding: 0; margin: 5px; background: var(--fill); color: var(--brand-tint); }
.nbtn.circulo .i { width: 19px; height: 19px; }
.nbtn[disabled] { color: var(--ink-4); }

.titulo-grande { padding: 2px 20px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.titulo-grande h1 { margin: 0; font: 700 34px/1.1 var(--font-d); letter-spacing: -.026em; }
.titulo-grande .sub { font-size: 15px; color: var(--ink-3); letter-spacing: -.01em; margin-top: 3px; }

/* ---------- barra de pestañas ---------- */
.tabbar {
  position: absolute; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 4px var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 -.5px 0 var(--bar-line);
  transition: transform .45s var(--ease);
}
.tabbar.fuera { transform: translateY(110%); }
.tab {
  border: 0; background: none; padding: 7px 0 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); font: 500 10.5px/1 var(--font); letter-spacing: .005em; cursor: pointer;
}
.tab .i { width: 26px; height: 26px; transition: transform .2s var(--ease-out); }
.tab:active .i { transform: scale(.88); transition: none; }
.tab.on { color: var(--brand-tint); }
.tab .dot { position: absolute; margin: 0 0 0 22px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font: 600 11.5px/17px var(--font); text-align: center; }
.tab-escanear .aro { width: 44px; height: 32px; margin-top: -1px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--brand) 55%, transparent); }
.tab-escanear .aro .i { width: 22px; height: 22px; }
.tab-escanear.on { color: var(--ink-3); }

/* ---------- listas agrupadas (Ajustes de iOS) ---------- */
.seccion { margin: 0 16px 26px; }
.seccion > .cab { display: flex; justify-content: space-between; align-items: baseline; padding: 0 16px 7px; }
.seccion > .cab h2 { margin: 0; font: 600 20px/1.2 var(--font-d); letter-spacing: -.02em; color: var(--ink); }
.seccion > .cab.chica h2 { font: 400 13px/1.3 var(--font); letter-spacing: -.005em; color: var(--ink-3); text-transform: uppercase; }
.seccion > .cab a, .seccion > .cab button { font-size: 15px; border: 0; background: none; color: var(--brand-tint); cursor: pointer; padding: 0; }
.seccion > .pie { padding: 7px 16px 0; font-size: 13px; line-height: 1.38; color: var(--ink-3); letter-spacing: -.005em; }
.grupo { background: var(--surface); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1); }
.fila {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; width: 100%;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font-size: 17px; line-height: 1.25;
  transition: background .2s;
}
button.fila:active, a.fila:active, .fila.tocable:active { background: var(--fill); transition: none; }
.fila + .fila::before, .fila + .fila-wrap::before { content: ""; position: absolute; top: 0; right: 0; left: var(--sep-l, 16px); border-top: .5px solid var(--sep); }
.fila.con-ico { --sep-l: 60px; }
.fila.con-av { --sep-l: 72px; }
.fila .cuerpo { flex: 1; min-width: 0; }
.fila .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila .s { display: block; font-size: 15px; color: var(--ink-3); letter-spacing: -.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.fila .v { color: var(--ink-3); font-size: 17px; white-space: nowrap; }
.fila .chev { width: 8px; height: 14px; color: var(--ink-4); stroke-width: 2.6; flex: none; margin-left: 2px; }
.fila.accion { color: var(--brand-tint); }
.fila.peligro { color: var(--bad); }
.fila.centro { justify-content: center; }
.ico-cuadro { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; background: var(--graphite); }
.ico-cuadro .i { width: 19px; height: 19px; }
.ico-cuadro.azul { background: var(--brand); } .ico-cuadro.violeta { background: var(--violet); } .ico-cuadro.verde { background: var(--green); }
.ico-cuadro.naranja { background: var(--orange); } .ico-cuadro.rosa { background: var(--pink); } .ico-cuadro.teal { background: var(--teal); } .ico-cuadro.info { background: var(--info); }
:root[data-theme="dark"] .ico-cuadro.azul { background: #3461b8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico-cuadro.azul { background: #3461b8; } }

/* ---------- controles ---------- */
.btn {
  height: 50px; padding: 0 22px; border: 0; border-radius: 25px; background: var(--fill); color: var(--brand-tint);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -.022em;
  cursor: pointer; transition: transform .2s var(--ease-out), opacity .2s, background .2s; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); opacity: .85; transition: none; }
.btn.pri { background: var(--brand); color: var(--brand-ink); }
.btn.ancho { width: 100%; }
.btn.chico { height: 34px; padding: 0 14px; font-size: 15px; border-radius: 17px; }
.btn .i { width: 21px; height: 21px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.redondos { display: flex; justify-content: center; gap: 22px; }
.redondo { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 12px; letter-spacing: -.005em; min-width: 62px; }
.redondo .c { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--brand-tint); box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out); }
.redondo .c .i { width: 23px; height: 23px; }
.redondo:active .c { transform: scale(.92); transition: none; }

.segmentado { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); position: relative; }
.segmentado button {
  flex: 1; position: relative; z-index: 1; height: 28px; border: 0; background: none; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; letter-spacing: -.008em; color: var(--ink); white-space: nowrap; padding: 0 10px;
}
.segmentado button.on { font-weight: 600; }
.segmentado .bola { position: absolute; z-index: 0; top: 2px; bottom: 2px; border-radius: 7px; background: var(--raised); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 .5px 1px rgba(0, 0, 0, .1); transition: transform .35s var(--ease), width .35s var(--ease); }
:root[data-theme="dark"] .segmentado .bola { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmentado .bola { background: #636366; } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 2px; scrollbar-width: none; scroll-padding: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 14px; border-radius: 16px; border: 0; background: var(--surface); color: var(--ink);
  font-size: 15px; letter-spacing: -.012em; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-1);
  transition: background .2s, color .2s, transform .15s;
}
.chip:active { transform: scale(.96); transition: none; }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip.on .n { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.etiqueta { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--fill); color: var(--ink-2); font-size: 13px; font-weight: 500; letter-spacing: -.005em; }
.etiqueta.azul { background: var(--brand-soft); color: var(--brand-tint); }
.etiqueta.ok { background: var(--ok-soft); color: var(--ok); }
.etiqueta.warn { background: var(--warn-soft); color: var(--warn); }
.etiqueta.ia { background: linear-gradient(90deg, rgba(110, 75, 216, .12), rgba(52, 97, 184, .12)); color: var(--violet); }

.buscador { margin: 0 16px 14px; position: relative; }
.buscador input {
  width: 100%; height: 36px; border: 0; border-radius: 10px; background: var(--fill); padding: 0 12px 0 34px; font-size: 17px; outline: none;
}
.buscador input::placeholder { color: var(--ink-3); }
.buscador .i { position: absolute; left: 9px; top: 8px; width: 20px; height: 20px; color: var(--ink-3); }

.campo { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; position: relative; }
.campo + .campo::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.campo label { width: 96px; flex: none; font-size: 15px; color: var(--ink-3); letter-spacing: -.012em; }
.campo input, .campo textarea, .campo select { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; padding: 12px 0; }
.campo textarea { resize: none; min-height: 88px; line-height: 1.35; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--ink-4); }
.campo.apilado { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.campo.apilado label { width: auto; font-size: 13px; }
.campo.apilado input { padding: 4px 0 11px; }

.interruptor { position: relative; width: 51px; height: 31px; flex: none; }
.interruptor input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.interruptor span { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2); transition: background .25s; }
.interruptor span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .3s var(--ease); }
.interruptor input:checked + span { background: #34c759; }
.interruptor input:checked + span::after { transform: translateX(20px); }

/* ---------- avatares ---------- */
.av {
  --t: 40px; width: var(--t); height: var(--t); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  color: #fff; font: 600 calc(var(--t) * .38)/1 var(--font-d); letter-spacing: -.01em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--av, #8e8e93) 72%, #fff), var(--av, #8e8e93));
}
.av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- la tarjeta ----------
   Proporción de una tarjeta de presentación real (85 × 55 mm). */
.tarjeta {
  --c1: #22407e; --c2: #3461b8; --tx: #fff; --tx2: rgba(255, 255, 255, .72);
  position: relative; aspect-ratio: 85 / 55; width: 100%; border-radius: 18px; overflow: hidden; isolation: isolate;
  color: var(--tx); background: linear-gradient(135deg, var(--c2) 0%, var(--c1) 58%, color-mix(in srgb, var(--c1) 80%, #000) 100%);
  box-shadow: var(--shadow-card); padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  transform: translateZ(0); user-select: none; -webkit-user-select: none;
}
.tarjeta::before { /* brillo del material */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at var(--lx, 18%) var(--ly, -10%), rgba(255, 255, 255, .28), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 40%);
  transition: background-position .3s;
}
.tarjeta::after { /* borde de luz */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.tarjeta .arriba { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tarjeta .logo { height: 26px; display: flex; align-items: center; gap: 8px; font: 650 14px/1 var(--font-d); letter-spacing: -.01em; }
.tarjeta .logo svg { height: 26px; width: 26px; }
.tarjeta .rotulo { font: 600 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--tx2); padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tarjeta .abajo { display: flex; align-items: flex-end; gap: 13px; }
.tarjeta .av { --t: 52px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); background: linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .12)); }
.tarjeta .quien { flex: 1; min-width: 0; }
.tarjeta .nombre { font: 650 21px/1.1 var(--font-d); letter-spacing: -.026em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta .cargo { font-size: 13.5px; line-height: 1.3; color: var(--tx2); margin-top: 3px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta .nfc { width: 22px; height: 22px; color: var(--tx2); flex: none; margin-bottom: 2px; }
.tarjeta.claro { --tx: #1d1d1f; --tx2: #6e6e73; background: linear-gradient(160deg, #ffffff, #f1f2f6); }
.tarjeta.claro::before { background: radial-gradient(120% 90% at var(--lx, 18%) var(--ly, -10%), rgba(255, 255, 255, .9), transparent 55%); }
.tarjeta.claro::after { box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.tarjeta.claro .rotulo { background: var(--brand-soft); color: var(--c1); }
.tarjeta.claro .av { box-shadow: none; background: linear-gradient(160deg, var(--c2), var(--c1)); color: #fff; }
.tarjeta.claro .logo { color: var(--c1); }
.tarjeta.claro .banda { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.tarjeta.grafito { --c1: #1c1c1e; --c2: #3a3a3c; }
.tarjeta.grafito .av { background: linear-gradient(160deg, var(--acento, #8aa9ff), color-mix(in srgb, var(--acento, #8aa9ff) 60%, #000)); }
.tarjeta .trama { position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none; }

/* carrusel de tarjetas */
.carrusel {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 56px; margin-bottom: -30px; scroll-padding: 0 24px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel > .slot { flex: 0 0 calc(100% - 48px); scroll-snap-align: center; scroll-snap-stop: always; transition: transform .4s var(--ease); }
.carrusel .tarjeta { cursor: pointer; transition: transform .25s var(--ease-out); }
.carrusel .tarjeta:active { transform: scale(.98); transition: transform .12s; }
.puntos { display: flex; justify-content: center; gap: 7px; margin: -12px 0 14px; }
.puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); opacity: .45; transition: opacity .3s, background .3s, width .3s var(--ease); }
.puntos i.on { opacity: 1; background: var(--ink-2); }
.meta-tarjeta { text-align: center; font-size: 13px; color: var(--ink-3); letter-spacing: -.005em; margin: 0 20px 18px; min-height: 17px; }

.acciones-tarjeta { display: flex; gap: 12px; padding: 0 24px; margin-bottom: 30px; }
.acciones-tarjeta .btn.pri { flex: 1; }
.acciones-tarjeta .cuad { width: 50px; padding: 0; flex: none; background: var(--surface); box-shadow: var(--shadow-1); }

/* números de la semana */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r-m); padding: 13px 14px 12px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 5px; border: 0; text-align: left; cursor: pointer; color: var(--ink); transition: transform .2s var(--ease-out); }
.stat:active { transform: scale(.97); transition: none; }
.stat .l { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: -.005em; color: var(--ink-3); }
.stat .l .i { width: 15px; height: 15px; }
.stat .v { font: 650 28px/1 var(--font-d); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 13px; font-weight: 600; color: var(--ok); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.stat .d.baja { color: var(--bad); }
.stat .d span { color: var(--ink-3); font-weight: 400; }

/* ---------- hojas ---------- */
.hoja-fondo { position: absolute; z-index: 200; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .45s var(--ease); }
.hoja-fondo.in { opacity: 1; }
.hoja {
  position: absolute; z-index: 201; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-t) - 10px);
  background: var(--bg); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .5s var(--ease);
  display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(0, 0, 0, .12); will-change: transform;
}
.hoja.in { transform: translateY(0); }
.hoja.arrastrando { transition: none; }
.hoja.alta { height: calc(100% - var(--safe-t) - 10px); }
.hoja .agarre { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.hoja .agarre::before { content: ""; width: 36px; height: 5px; border-radius: 3px; background: var(--ink-4); opacity: .6; }
.hoja .hoja-cab { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 8px 6px; touch-action: none; }
.hoja .hoja-cab h3 { margin: 0; font: 600 17px/1.2 var(--font-d); letter-spacing: -.024em; text-align: center; }
.hoja .hoja-cab .der { justify-self: end; } .hoja .hoja-cab .izq { justify-self: start; }
.hoja .hoja-cuerpo { flex: 1; overflow-y: auto; padding: 6px 0 calc(var(--safe-b) + 20px); overscroll-behavior: contain; scrollbar-width: none; }
.hoja .hoja-cuerpo::-webkit-scrollbar { display: none; }

/* ---------- compartir ---------- */
.qr-marco { margin: 4px auto 18px; width: min(300px, calc(100% - 64px)); background: #fff; border-radius: 28px; padding: 22px; box-shadow: var(--shadow-2); position: relative; }
.qr-marco svg { width: 100%; height: auto; }
.qr-marco .qr-pie { margin-top: 14px; text-align: center; color: #1d1d1f; }
.qr-marco .qr-pie b { display: block; font: 650 17px/1.2 var(--font-d); letter-spacing: -.024em; }
.qr-marco .qr-pie span { font-size: 13px; color: #6e6e73; }
.qr-marco.cambia svg { animation: qrcambia .45s var(--ease); }
@keyframes qrcambia { from { opacity: .2; transform: scale(.96); filter: blur(4px); } }
.enlace-fila { display: flex; align-items: center; gap: 10px; margin: 0 16px 22px; padding: 6px 6px 6px 16px; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-1); }
.enlace-fila .url { flex: 1; min-width: 0; font-size: 16px; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enlace-fila .url span { color: var(--ink-3); }
.grilla-compartir { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 4px; padding: 0 12px; margin-bottom: 24px; }
.grilla-compartir .redondo { min-width: 0; }
.redondo .c.wa { background: #25d366; color: #fff; } .redondo .c.sms { background: #34c759; color: #fff; }
.redondo .c.mail { background: linear-gradient(180deg, #1a8cff, #0a6fe0); color: #fff; } .redondo .c.wallet { background: #000; color: #fff; }
.aviso-suave { display: flex; gap: 10px; align-items: flex-start; margin: 0 20px 18px; font-size: 13px; line-height: 1.38; color: var(--ink-3); letter-spacing: -.005em; }
.aviso-suave .i { width: 17px; height: 17px; color: var(--ink-3); margin-top: 1px; }

/* ---------- contactos ---------- */
.resumen-contactos { display: flex; gap: 10px; margin: 0 16px 18px; }
.resumen-contactos .stat { flex: 1; padding: 11px 13px; }
.resumen-contactos .stat .v { font-size: 24px; }
.fila.contacto { padding: 9px 16px; gap: 12px; }
.fila.contacto .cuerpo .t { font-weight: 600; font-size: 16.5px; letter-spacing: -.02em; }
.fila.contacto .der { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.fila.contacto .hora { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.fila.contacto .fuente { width: 16px; height: 16px; color: var(--ink-4); }
.estado-punto { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; display: inline-block; }
.estado-punto.nuevo { background: var(--info); } .estado-punto.seguir { background: var(--warn-dot); } .estado-punto.reunion { background: var(--violet); } .estado-punto.cliente { background: var(--ok-dot); }
.vacio { text-align: center; padding: 48px 32px; color: var(--ink-3); font-size: 15px; }
.vacio .i { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--ink-4); }
.vacio b { display: block; color: var(--ink); font: 600 20px/1.2 var(--font-d); letter-spacing: -.02em; margin-bottom: 6px; }

/* ficha de contacto */
.ficha-cab { text-align: center; padding: 4px 24px 18px; }
.ficha-cab .av { --t: 92px; margin: 0 auto 12px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .3); }
.ficha-cab h1 { margin: 0; font: 700 26px/1.15 var(--font-d); letter-spacing: -.028em; }
.ficha-cab .sub { font-size: 15px; color: var(--ink-3); margin-top: 4px; letter-spacing: -.012em; }
.ficha-cab .tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.acciones-ficha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 16px 24px; }
.acciones-ficha button { border: 0; background: var(--surface); border-radius: 12px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--brand-tint); font-size: 11.5px; font-weight: 500; letter-spacing: -.005em; cursor: pointer; box-shadow: var(--shadow-1); transition: transform .15s; }
.acciones-ficha button:active { transform: scale(.95); transition: none; }
.acciones-ficha button .i { width: 22px; height: 22px; }
.acciones-ficha button[disabled] { color: var(--ink-4); }
.estados { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px; }
.estados button { border: 0; background: var(--fill); border-radius: 10px; min-height: 52px; padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 11.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); transition: background .2s, color .2s, transform .15s; }
.estados button:active { transform: scale(.95); transition: none; }
.estados button.on { background: var(--brand); color: var(--brand-ink); }
.estados button.on .estado-punto { background: currentColor; }
.nota { padding: 12px 16px; font-size: 16px; line-height: 1.42; letter-spacing: -.016em; }
.nota + .nota { border-top: .5px solid var(--sep); }
.nota .cuando { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; letter-spacing: -.005em; }
.ia-caja { margin: 0 16px 26px; border-radius: var(--r-m); padding: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 9%, var(--surface)), color-mix(in srgb, var(--brand) 9%, var(--surface))); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.ia-caja h3 { margin: 0 0 4px; display: flex; gap: 7px; align-items: center; font: 600 16px/1.2 var(--font-d); letter-spacing: -.02em; }
.ia-caja h3 .i { width: 19px; height: 19px; color: var(--violet); }
.ia-caja p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); letter-spacing: -.012em; }
.borrador { background: var(--surface); border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.5; letter-spacing: -.012em; white-space: pre-wrap; margin: 0 16px 16px; box-shadow: var(--shadow-1); }
.borrador .asunto { font-weight: 600; display: block; margin-bottom: 10px; padding-bottom: 10px; border-bottom: .5px solid var(--sep); }
.escribiendo::after { content: "▍"; color: var(--violet); animation: parpadeo 1s steps(2) infinite; margin-left: 1px; }
@keyframes parpadeo { 50% { opacity: 0; } }

/* ---------- actividad ---------- */
.grafico { background: var(--surface); border-radius: var(--r-m); padding: 16px 16px 10px; box-shadow: var(--shadow-1); position: relative; touch-action: pan-y; }
.grafico .cab-g { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.grafico .cab-g .l { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: -.005em; }
.grafico .cab-g .v { font: 650 30px/1.1 var(--font-d); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.grafico .cab-g .f { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.grafico svg { width: 100%; height: 150px; overflow: visible; }
.grafico .ejes { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); padding: 4px 0 0; font-variant-numeric: tabular-nums; }
.barras .b { display: grid; grid-template-columns: 92px 1fr 44px; gap: 10px; align-items: center; padding: 9px 16px; font-size: 15px; letter-spacing: -.012em; }
.barras .b + .b { border-top: .5px solid var(--sep); }
.barras .pista { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.barras .pista i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transform-origin: left; animation: crece .9s var(--ease) both; }
.barras .pct { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 14px; }
@keyframes crece { from { transform: scaleX(0); } }

/* ---------- editor ---------- */
.vista-editor { position: sticky; top: -8px; z-index: 5; padding: 0 36px 16px; background: linear-gradient(var(--bg) 82%, transparent); }
.muestras { display: flex; gap: 14px; padding: 14px 16px; overflow-x: auto; scrollbar-width: none; }
.muestra { flex: none; width: 92px; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 7px; align-items: center; font-size: 12.5px; color: var(--ink-2); letter-spacing: -.005em; }
.muestra .mini { width: 92px; aspect-ratio: 85 / 55; border-radius: 9px; box-shadow: 0 0 0 .5px var(--sep), 0 3px 8px rgba(0, 0, 0, .1); transition: box-shadow .2s, transform .2s var(--ease-out); }
.muestra.on .mini { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--brand-tint); }
.muestra:active .mini { transform: scale(.95); }
.colores { display: flex; gap: 11px; padding: 12px 16px 14px; flex-wrap: wrap; }
.color { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15); transition: transform .15s var(--ease-out), box-shadow .2s; }
.color.on { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--ink-3); }
.color:active { transform: scale(.9); }
.fila .asa { width: 20px; height: 20px; color: var(--ink-4); cursor: grab; touch-action: none; }

/* ---------- escanear ---------- */
.camara { position: absolute; inset: 0; z-index: 300; background: #000; color: #fff; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .5s var(--ease); }
.camara.in { transform: none; }
.camara video, .camara .simulada { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camara .simulada { background: radial-gradient(90% 60% at 50% 45%, #4a4540, #1a1816 70%); display: grid; place-items: center; }
.camara .papel { width: 74%; aspect-ratio: 85 / 55; border-radius: 6px; background: linear-gradient(165deg, #fbfaf6, #ecebe4); box-shadow: 0 30px 60px -10px rgba(0, 0, 0, .6); transform: perspective(900px) rotateX(14deg) rotateZ(-4deg); color: #222; padding: 6% 7%; display: flex; flex-direction: column; justify-content: space-between; }
.camara .papel b { font: 600 17px/1.1 Georgia, serif; letter-spacing: 0; }
.camara .papel small { display: block; font: 11px/1.45 Georgia, serif; color: #555; letter-spacing: 0; }
.camara .papel > svg { width: 100%; height: auto; }
.camara .cab-cam { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-t) + 4px) 12px 0; }
.camara .cab-cam .nbtn { color: #fff; }
.camara .cab-cam .nbtn.circulo { background: rgba(255, 255, 255, .16); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.camara .visor { position: relative; z-index: 2; flex: 1; display: grid; place-items: center; }
.camara .marco { width: 82%; aspect-ratio: 85 / 55; position: relative; transition: aspect-ratio .4s var(--ease), width .4s var(--ease); }
.camara .marco.cuadrado { width: 64%; aspect-ratio: 1; }
.camara .marco.hoja-a4 { width: 66%; aspect-ratio: 210 / 297; }
.camara .marco i { position: absolute; width: 30px; height: 30px; border: 3.5px solid #fff; }
.camara .marco i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.camara .marco i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.camara .marco i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.camara .marco i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.camara .marco.detectado i { border-color: #ffd60a; transition: border-color .2s; }
.camara .barrido { position: absolute; left: 4%; right: 4%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, #ffd60a, transparent); box-shadow: 0 0 18px 3px rgba(255, 214, 10, .5); animation: barrido 1.4s var(--ease) infinite alternate; }
@keyframes barrido { to { top: 88%; } }
.camara .indicacion { position: absolute; left: 0; right: 0; bottom: calc(100% + 16px); text-align: center; font-size: 15px; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.camara .pie-cam { position: relative; z-index: 2; padding: 0 20px calc(var(--safe-b) + 18px); display: flex; flex-direction: column; align-items: center; gap: 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .55) 40%); padding-top: 30px; }
.modos { display: flex; gap: 22px; font: 600 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.modos button { border: 0; background: none; color: rgba(255, 255, 255, .7); cursor: pointer; padding: 6px 0; letter-spacing: inherit; }
.modos button.on { color: #ffd60a; }
.disparador { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 3px; cursor: pointer; }
.disparador i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .15s; }
.disparador:active i { transform: scale(.88); }
.fila-cam { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.fila-cam .lado { width: 54px; height: 54px; display: grid; place-items: center; }
.fila-cam .lado button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.leyendo { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; color: var(--ink-3); font-size: 15px; }
.anillo-carga { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--violet); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.campo.dudoso input { color: var(--warn); }

/* ---------- herramientas: firma, fondos, qr ---------- */
.lienzo { margin: 0 16px 20px; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-2); background: var(--surface); }
.lienzo.firma { padding: 18px; background: #fff; color: #1d1d1f; }
.lienzo canvas, .lienzo img { width: 100%; height: auto; display: block; }
.qr-editor { margin: 0 auto 20px; width: 230px; padding: 18px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-2); }

/* ---------- aviso flotante ---------- */
.toast {
  position: absolute; z-index: 500; left: 50%; top: calc(var(--safe-t) + 6px); transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px; border-radius: 24px; white-space: nowrap;
  background: var(--raised); color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.015em; box-shadow: var(--shadow-2);
  transition: transform .55s var(--ease); pointer-events: none;
}
.toast.in { transform: translate(-50%, 0); }
.toast .i { width: 20px; height: 20px; color: var(--ok-dot); }

/* menú contextual */
.menu { position: absolute; z-index: 400; min-width: 250px; background: color-mix(in srgb, var(--raised) 86%, transparent); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); border-radius: 14px; box-shadow: 0 10px 50px rgba(0, 0, 0, .2), 0 0 0 .5px var(--sep); overflow: hidden; transform-origin: top right; transform: scale(.4); opacity: 0; transition: transform .38s var(--ease), opacity .2s; }
.menu.in { transform: none; opacity: 1; }
.menu button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 16px; border: 0; background: none; font-size: 17px; color: var(--ink); cursor: pointer; text-align: left; }
.menu button + button { border-top: .5px solid var(--sep); }
.menu button:active { background: var(--fill); }
.menu button .i { width: 20px; height: 20px; }
.menu-velo { position: absolute; inset: 0; z-index: 399; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .page.anim, .hoja, .camara, .tabbar, .toast, .menu { transition-duration: .2s !important; }
  .page.entra, .page.atras { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav.solida, .tabbar, .menu { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
