/* ============================================================
   Oasis Omnicanal · tokens, armazón y componentes comunes
   Contrato: oasis/DISEÑO.md §2 · convenciones: oasis/NOTAS-base.md
   Prefijo "o-" para lo común; cada módulo usa el suyo (bj-, ct-, aj-, rp-, df-, ia-).
   ============================================================ */
:root {
  --bg: #F7F6EF;        /* fondo general, crema muy tenue */
  --panel: #FFFFFF;     /* superficies (lista, hilo, tarjetas) */
  --side: #F3F1E7;      /* barra lateral de la bandeja/ajustes */
  --rail: #EFEDE2;      /* rail de íconos izquierdo */
  --line: #E6E2D2;      /* bordes */
  --line-2: #EFECDF;    /* divisores suaves */
  --ink: #232A1C;       /* texto principal */
  --ink-2: #5B6150;     /* secundario */
  --ink-3: #8E9182;     /* terciario / placeholders */
  --verde: #283618;     /* primario (botón principal, títulos fuertes) */
  --verde-h: #34461F;   /* hover del primario */
  --olivo: #606C38;     /* activo / acentos */
  --olivo-50: #F0F2E6;  /* fondo seleccionado */
  --olivo-100: #E3E7D2; /* fondo activo más marcado */
  --cobre: #BC6C25;     /* no leídos, insignias, avisos */
  --cobre-50: #F7ECE1;
  --arena: #DDA15E;     /* comentarios internos, "Pronto" */
  --arena-50: #FBF3E5;
  --crema: #FEFAE0;
  --rojo: #B4533F; --rojo-50: #F6E6E1;   /* errores (terracota, no rojo puro) */
  --ok: #5C7A3A;                          /* palomitas leídas, éxito */
  --burbuja-in: #F2F1EA;  /* mensaje del cliente */
  --burbuja-out: #EDF0E2; /* mensaje nuestro */
  --sombra: 0 1px 2px rgba(35,42,28,.06), 0 4px 16px rgba(35,42,28,.06);
  --radio: 10px; --radio-s: 8px; --radio-l: 14px;

  /* extras de la base (no cambian los de arriba) */
  --ink-3t: #6B6E5D;    /* terciario con contraste AA para texto chico (12 px); --ink-3 solo para placeholders e íconos */
  --cobre-t: #9A5419;   /* cobre para fondos con texto blanco (insignias de no leídos) con contraste AA */
  --arena-t: #7A4F16;   /* texto sobre --arena-50 */
  --hover: #F8F7F1;     /* hover de filas sobre blanco */
  --sombra-l: 0 2px 6px rgba(35,42,28,.06), 0 18px 48px -12px rgba(35,42,28,.22);
  --foco: 0 0 0 3px rgba(96,108,56,.18);
  --fuente: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fuente-marca: 'Archivo Black', 'Inter', sans-serif;
  --rail-w: 60px; --lat-w: 232px; --lista-w: 340px; --rail-der-w: 52px; --der-w: 320px;
  --cab-h: 56px; --barra-movil-h: 58px;
  --z-cajon: 45; --z-velo: 50; --z-menu: 60; --z-toast: 80; --z-tip: 90;
}

/* ---------------- reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--fuente); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01';
  overflow: hidden; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--olivo); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
/* placeholders con contraste AA (5.2:1 sobre blanco): en el panel del contacto son la única pista de cada campo vacío.
   body .ct-in gana a la regla de contacto.css (que usaba --ink-3, 3.2:1) sin tocar ese archivo */
::placeholder, body .ct-in::placeholder { color: var(--ink-3t); opacity: 1; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--olivo); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: #D8D4C3 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8D4C3; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--olivo-100); }
.o-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.o-ico { flex: none; }
.o-mut { color: var(--ink-2); }
.o-chico { font-size: 12px; color: var(--ink-3t); }
.o-num-tab { font-variant-numeric: tabular-nums; }

/* ---------------- armazón (escritorio ≥ 1100 px) ---------------- */
/* 100vh primero: los navegadores sin dvh (iOS < 15.4, Chrome < 108) descartan la segunda línea y se quedan con la primera */
#raiz { min-height: 100vh; min-height: 100dvh; overflow-y: auto; height: 100vh; height: 100dvh; }
.o-app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); }
.o-centro { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding-right: env(safe-area-inset-right, 0px); } /* min-height:0: en celular (.o-app en columna) el contenido alto no empuja el armazón y cada módulo hace su propio scroll */
.o-cuerpo { flex: 1; min-height: 0; display: flex; position: relative; }

/* rail izquierdo */
.o-rail { width: calc(var(--rail-w) + env(safe-area-inset-left, 0px)); flex: none; background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 12px 0 12px env(safe-area-inset-left, 0px); gap: 4px; z-index: 20; }
.o-rail-logo { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 10px; }
.o-rail-logo:hover { background: var(--olivo-50); text-decoration: none; }
.o-rail-logo img { width: 32px; height: 32px; }
.o-rail-mods { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-height: 0; }
.o-rail-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); transition: background .12s, color .12s; }
.o-rail-btn:hover { background: var(--olivo-50); color: var(--ink); text-decoration: none; }
.o-rail-btn.on { background: var(--olivo-100); color: var(--verde); }
.o-rail-num { position: absolute; top: 1px; right: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--cobre-t); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; border: 2px solid var(--rail); box-sizing: content-box; transform: translate(25%, -25%); }
.o-rail-pronto { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); padding: 0 5px; height: 16px; line-height: 14px; border-radius: 99px; background: var(--arena-50); border: 1px solid #EED8B6; color: var(--arena-t); font-size: 10px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.o-rail-btn:has(.o-rail-pronto) { margin-bottom: 8px; }
.o-rail-pie { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.o-rail-neg, .o-rail-yo { border-radius: 10px; padding: 2px; display: grid; place-items: center; transition: background .12s, box-shadow .12s; }
.o-rail-yo { border-radius: 50%; }
.o-rail-neg:hover, .o-rail-yo:hover, .o-rail-neg[aria-expanded="true"], .o-rail-yo[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--olivo-100); }

/* avisos (franjas) */
.o-avisos:empty { display: none; }
.o-franja { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; font-size: 13px; border-bottom: 1px solid var(--line); background: var(--olivo-50); color: #3B4524; }
.o-franja .o-franja-txt { flex: 1; min-width: 0; }
.o-franja-corto { display: none; }
.o-franja.pronto { background: var(--arena-50); color: var(--arena-t); border-bottom-color: #F0DFC4; }
.o-franja.error { background: var(--rojo-50); color: #7A3324; border-bottom-color: #EED3CB; }
.o-franja .o-btn.sm { height: 28px; }
.o-franja-x { color: inherit; opacity: .7; }
.o-franja-x:hover { opacity: 1; }

/* barra lateral del módulo */
.o-lateral { width: var(--lat-w); flex: none; background: var(--side); border-right: 1px solid var(--line); display: none; flex-direction: column; min-height: 0; transition: margin-left .2s ease; }
.con-lateral .o-lateral { display: flex; }
.lateral-oculta .o-lateral { margin-left: calc(-1 * var(--lat-w) - 1px); }
/* colapsada (escritorio) o cajón cerrado (tablet/celular): fuera del orden del tabulador y del lector de pantalla.
   visibility espera a que termine la animación al cerrar y cambia al instante al abrir */
@media (min-width: 1100px) {
  .o-lateral { transition: margin-left .2s ease, visibility 0s; }
  .lateral-oculta .o-lateral { visibility: hidden; transition: margin-left .2s ease, visibility 0s linear .2s; }
}
.o-lat-cab { height: var(--cab-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 0 16px; }
.o-lat-cab h2 { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-lat-cuerpo { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 20px; }
.o-lat-sec { margin-top: 12px; }
.o-lat-tit-fila { display: flex; align-items: center; gap: 4px; }
.o-lat-tit { flex: 1; display: flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 8px 4px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3t); border-radius: 6px; }
.o-lat-tit:hover { color: var(--ink-2); }
.o-lat-tit .o-ico { transition: transform .15s; color: var(--ink-3); }
.o-lat-sec.cerrada .o-lat-tit .o-ico { transform: rotate(-90deg); }
.o-lat-sec.cerrada .o-lat-items { display: none; }
.o-lat-items { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.o-lat-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: var(--radio-s); color: var(--ink-2); font-size: 14px; text-align: left; transition: background .12s, color .12s; text-decoration: none; }
.o-lat-item:hover { background: var(--olivo-50); color: var(--ink); text-decoration: none; }
.o-lat-item.on { background: var(--olivo-100); color: var(--verde); font-weight: 600; }
.o-lat-item .o-ico { color: var(--ink-3t); }
.o-lat-item.on .o-ico { color: var(--olivo); }
.o-lat-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-lat-punto { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 4px 0 4px; }
.o-cuenta { margin-left: auto; font-size: 12px; color: var(--ink-3t); font-variant-numeric: tabular-nums; font-weight: 500; }
.o-lat-item.on .o-cuenta { color: var(--verde); } /* --olivo sobre --olivo-100 quedaba en 4.49:1 */
.o-lat-vacio { padding: 6px 10px; font-size: 13px; color: var(--ink-3t); }
.o-btn.o-btn-lateral { display: none; } /* .o-btn.ico pone inline-flex: hace falta la misma especificidad */
.o-lat-plegar .o-ico-cajon { display: none; }
.lateral-oculta.con-lateral .o-btn.o-btn-lateral { display: inline-flex; }

/* principal */
.o-principal { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); position: relative; overflow: hidden; }
.o-principal:focus { outline: none; }
.o-cab { height: var(--cab-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.o-cab h1 { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-cab .o-esp { flex: 1; }
.o-pagina { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; }
.o-pagina-in { max-width: 880px; margin: 0 auto; }

/* rail derecho + panel derecho */
.o-rail-der { width: var(--rail-der-w); flex: none; border-left: 1px solid var(--line); background: var(--panel); display: none; flex-direction: column; align-items: center; padding: 10px 0; gap: 6px; }
.con-conv .o-rail-der { display: flex; }
.o-derecho { width: var(--der-w); flex: none; border-left: 1px solid var(--line); background: var(--panel); display: none; flex-direction: column; min-height: 0; }
.con-conv.derecho-abierto .o-derecho { display: flex; }
.o-der-cab { height: var(--cab-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line-2); }
.o-der-tit { flex: 1; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-der-pestanas { display: none; }
.o-der-cuerpo { flex: 1; min-height: 0; overflow-y: auto; }
.o-derecho:focus { outline: none; }
.o-velo-lat, .o-velo-der { display: none; }

/* barra inferior del celular */
.o-barra-movil { display: none; }

/* márgenes seguros (viewport-fit=cover): con el iPhone en horizontal el rail se pinta hasta la orilla y sus íconos
   quedan fuera del notch (padding izquierdo del rail); a la derecha, .o-centro deja el margen; abajo, la barra de inicio */
@media (min-width: 760px) {
  .o-rail { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .o-centro { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ---------------- botones ---------------- */
.o-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radio-s); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; user-select: none; -webkit-user-select: none; }
.o-btn:hover:not(:disabled) { background: var(--olivo-50); border-color: #DAD6C3; text-decoration: none; }
.o-btn:active:not(:disabled) { transform: translateY(.5px); }
.o-btn:disabled { opacity: .5; }
.o-btn.pri { background: var(--verde); border-color: var(--verde); color: #FBFAF2; }
.o-btn.pri:hover:not(:disabled) { background: var(--verde-h); border-color: var(--verde-h); }
.o-btn.sec { background: var(--panel); }
.o-btn.fan { background: transparent; border-color: transparent; color: var(--ink-2); }
.o-btn.fan:hover:not(:disabled) { background: var(--olivo-50); border-color: transparent; color: var(--ink); }
.o-btn.peligro { color: var(--rojo); border-color: #EBCFC7; }
.o-btn.peligro:hover:not(:disabled) { background: var(--rojo-50); border-color: #E3BDB2; }
.o-btn.pri.peligro { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.o-btn.pri.peligro:hover:not(:disabled) { background: #9E4734; border-color: #9E4734; }
.o-btn.cobre { background: var(--cobre-t); border-color: var(--cobre-t); color: #fff; }
.o-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }
.o-btn.lg { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 10px; }
.o-btn.blq { width: 100%; }
.o-btn.ico { width: 36px; padding: 0; }
.o-btn.ico.sm { width: 30px; }
.o-btn.ico.lg { width: 44px; }
.o-btn.on { background: var(--olivo-100); border-color: var(--olivo-100); color: var(--verde); }
.o-btn .o-cargando { width: 14px; height: 14px; }
.o-grupo-btn { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------- formularios ---------------- */
.o-input, .o-select, .o-textarea { display: block; width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radio-s); background: var(--panel); color: var(--ink); font-size: 14px; transition: border-color .12s, box-shadow .12s; }
.o-input.lg { height: 44px; font-size: 15px; border-radius: 10px; }
.o-textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.o-input:hover, .o-select:hover, .o-textarea:hover { border-color: #D9D4C1; }
.o-input:focus, .o-select:focus, .o-textarea:focus { border-color: var(--olivo); box-shadow: var(--foco); outline: none; }
.o-input:disabled, .o-select:disabled, .o-textarea:disabled { background: var(--bg); color: var(--ink-3t); }
.o-input.error, .o-textarea.error { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(180,83,63,.12); }
.o-select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6150' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.o-campo { display: block; }
.o-campo > span:first-child, .o-etiqueta { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.o-campo + .o-campo, .o-campo + .o-fila, .o-fila + .o-campo { margin-top: 14px; }
.o-ayuda { font-size: 12px; color: var(--ink-3t); margin-top: 6px; }
.o-ayuda.error { color: var(--rojo); }
.o-fila { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.o-fila > * { flex: 1; min-width: 140px; }
.o-busca { position: relative; display: block; }
.o-busca .o-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.o-busca .o-input { padding-left: 36px; }
.o-pass { position: relative; display: block; }
.o-pass .o-input { padding-right: 46px; }
.o-pass .o-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.o-casilla { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.o-casilla input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--verde); flex: none; }

/* interruptor: <label class="o-interruptor"><input type="checkbox"><span class="o-int-pista"></span>Texto</label> */
.o-interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; -webkit-user-select: none; }
.o-interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.o-int-pista { position: relative; width: 36px; height: 21px; flex: none; border-radius: 99px; background: #D6D2C0; transition: background .15s; }
.o-int-pista::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(35,42,28,.25); transition: transform .15s; }
.o-interruptor input:checked + .o-int-pista { background: var(--olivo); }
.o-interruptor input:checked + .o-int-pista::after { transform: translateX(15px); }
.o-interruptor input:focus-visible + .o-int-pista { box-shadow: 0 0 0 3px rgba(96,108,56,.3); }
.o-interruptor input:disabled + .o-int-pista { opacity: .5; }

/* segmento (dos o tres opciones juntas) */
.o-segmento { display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.o-segmento button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.o-segmento button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(35,42,28,.1); }

/* ---------------- chips, insignias, puntos ---------------- */
.o-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; max-width: 100%; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.o-chip > i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.o-chip > span { overflow: hidden; text-overflow: ellipsis; }
button.o-chip:hover { background: var(--olivo-50); }
.o-chip.sm { height: 20px; font-size: 12px; padding: 0 7px 0 6px; gap: 5px; }
.o-insignia { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.o-insignia.cobre { background: var(--cobre-t); color: #fff; }
.o-insignia.ok { background: var(--olivo-50); color: #4A5628; }
.o-insignia.pronto { background: var(--arena-50); color: var(--arena-t); border: 1px solid #F0DCBC; }
.o-insignia.error { background: var(--rojo-50); color: #8A3B2A; }
.o-insignia.info { background: #E8EEF2; color: #3D5A70; }
.o-num { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--cobre-t); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.o-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------------- avatares y canales ---------------- */
.o-av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 600; letter-spacing: .01em; line-height: 1; user-select: none; -webkit-user-select: none; }
.o-av.cuadrado { border-radius: 9px; }
.o-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.o-av .o-canal { position: absolute; right: -3px; bottom: -3px; border: 2px solid var(--panel); box-sizing: content-box; z-index: 1; }
.o-canal { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; }
.o-canal svg { width: 64%; height: 64%; }
.o-canal-wa { background: #25D366; }
.o-canal-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.o-canal-fb { background: #0084FF; }

/* ---------------- tarjetas, tablas, pestañas, avisos ---------------- */
.o-tarjeta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio-l); padding: 18px 20px; }
.o-tarjeta + .o-tarjeta { margin-top: 16px; }
.o-tarjeta-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.o-tarjeta-cab h3 { font-size: 15px; flex: 1; }
.o-tarjeta-cab p { font-size: 13px; color: var(--ink-2); }
.o-tarjeta.plana { box-shadow: none; }
.o-tarjeta.sombra { box-shadow: var(--sombra); border-color: transparent; }
.o-tabla-caja { border: 1px solid var(--line); border-radius: var(--radio); overflow: auto; background: var(--panel); }
.o-tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.o-tabla th { position: sticky; top: 0; background: #FAF9F4; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.o-tabla td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.o-tabla tr:last-child td { border-bottom: 0; }
.o-tabla tbody tr:hover td { background: var(--hover); }
.o-tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.o-pestanas { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 16px; overflow-x: auto; flex: none; }
.o-pestana { position: relative; height: 42px; padding: 0 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.o-pestana:hover { color: var(--ink); }
.o-pestana.on { color: var(--verde); font-weight: 600; }
.o-pestana.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--verde); }
.o-aviso { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radio-s); font-size: 13px; line-height: 1.45; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); }
.o-aviso .o-ico { margin-top: 1px; }
.o-aviso.info { background: var(--olivo-50); border-color: #DCE1C8; color: #3B4524; }
.o-aviso.ok { background: var(--olivo-50); border-color: #D4DBBA; color: #3B4524; }
.o-aviso.ok .o-ico { color: var(--ok); }
.o-aviso.pronto { background: var(--arena-50); border-color: #F0DCBC; color: var(--arena-t); }
.o-aviso.error { background: var(--rojo-50); border-color: #EBCFC7; color: #7A3324; }
.o-separador { height: 1px; background: var(--line-2); margin: 16px 0; border: 0; }
.o-sep { display: flex; align-items: center; gap: 12px; color: var(--ink-3t); font-size: 12px; margin: 18px 0 14px; }
.o-sep::before, .o-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
kbd { font-family: var(--fuente); font-size: 11px; color: var(--ink-3t); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel); }

/* ---------------- estados: vacío, cargando, esqueletos ---------------- */
.o-vacio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; gap: 6px; min-height: 220px; }
.o-vacio.compacto { padding: 28px 16px; min-height: 0; }
.o-vacio-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--olivo-50); color: var(--olivo); display: grid; place-items: center; margin-bottom: 8px; }
.o-vacio.compacto .o-vacio-ico { width: 44px; height: 44px; border-radius: 12px; }
.o-vacio h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.o-vacio p { font-size: 14px; color: var(--ink-2); max-width: 360px; }
.o-vacio .o-btn { margin-top: 12px; }
.o-cargando { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: o-gira .75s linear infinite; flex: none; vertical-align: -3px; opacity: .8; }
.o-cargando-caja { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--ink-3t); font-size: 13px; min-height: 120px; }
@keyframes o-gira { to { transform: rotate(360deg); } }
.o-esq { background: linear-gradient(90deg, #EFEDE3 0%, #F7F6F0 45%, #EFEDE3 90%); background-size: 220% 100%; animation: o-brillo 1.4s ease-in-out infinite; border-radius: 6px; display: block; }
@keyframes o-brillo { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.o-esq-caja { padding: 8px 0; }
.o-esq-fila { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.o-esq-av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.o-esq-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.o-esq-linea { height: 11px; }
.o-esq-linea.chica { height: 9px; opacity: .8; }
.o-esq-caja.texto { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.o-esq-caja.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 16px; }
.o-esq-tarjeta { height: 110px; border-radius: var(--radio-l); }
.o-esq-tabla { display: grid; grid-template-columns: 2fr 1.4fr .6fr; gap: 20px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }

/* ---------------- capas: modal, menú, cajón, toast, tooltip ---------------- */
.o-velo { position: fixed; inset: 0; z-index: var(--z-velo); background: rgba(35,42,28,.34); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 24px; overflow-y: auto; animation: o-aparece .14s ease-out; }
.o-velo.sale { animation: o-desaparece .14s ease-in forwards; }
@keyframes o-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes o-desaparece { to { opacity: 0; } }
.o-modal { width: 100%; max-width: 460px; background: var(--panel); border-radius: var(--radio-l); box-shadow: var(--sombra-l); display: flex; flex-direction: column; animation: o-sube .16s ease-out; }
.o-modal.ancho { max-width: 680px; }
.o-modal:focus { outline: none; }
@keyframes o-sube { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } }
.o-modal-cab { display: flex; align-items: center; gap: 10px; padding: 16px 12px 0 20px; }
.o-modal-cab h2 { flex: 1; font-size: 16px; font-weight: 600; }
.o-modal-cuerpo { padding: 12px 20px 4px; font-size: 14px; color: var(--ink); }
.o-modal-texto { color: var(--ink-2); }
.o-modal-pie { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 20px 18px; flex-wrap: wrap; }
.o-pasos { list-style: decimal; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.o-velo-menu { position: fixed; inset: 0; z-index: var(--z-menu); }
.o-menu { position: fixed; min-width: 200px; max-width: 320px; max-height: min(72vh, 460px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); box-shadow: var(--sombra-l); padding: 4px; animation: o-menu .12s ease-out; }
@keyframes o-menu { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.o-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 7px; font-size: 14px; color: var(--ink); text-align: left; }
.o-menu-item .o-ico { color: var(--ink-2); }
.o-menu-item:hover:not(:disabled), .o-menu-item:focus-visible { background: var(--olivo-50); outline: none; }
.o-menu-item:disabled { opacity: .55; cursor: default; }
.o-menu-item.peligro, .o-menu-item.peligro .o-ico { color: var(--rojo); }
.o-menu-item.peligro:hover { background: var(--rojo-50); }
.o-menu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-menu-txt small { font-size: 12px; color: var(--ink-3t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-menu-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-menu-check { color: var(--olivo) !important; }
.o-menu-punto { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 2px; }
.o-menu-sep { height: 1px; background: var(--line-2); margin: 4px; }
.o-menu-tit { padding: 8px 10px 6px; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; }
.o-menu-tit small { font-size: 12px; font-weight: 400; color: var(--ink-3t); }
.o-menu-item .o-av { margin: -2px 0; }
.o-velo-menu.hoja { background: rgba(35,42,28,.34); animation: o-aparece .14s; }
.o-menu.hoja { left: 0; right: 0; bottom: 0; top: auto; max-width: none; width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: 16px 16px 0 0; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); animation: o-hoja .2s ease-out; border: 0; }
.o-menu.hoja .o-menu-item { min-height: 48px; font-size: 15px; }
@keyframes o-hoja { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.o-hoja-asa { display: block; width: 38px; height: 4px; border-radius: 99px; background: #D9D5C4; margin: 4px auto 8px; flex: none; }
.o-velo-cajon { align-items: stretch; justify-content: flex-start; padding: 0; overflow: hidden; }
.o-cajon { position: fixed; top: 0; bottom: 0; background: var(--panel); box-shadow: var(--sombra-l); width: min(88vw, 340px); display: flex; flex-direction: column; min-height: 0; }
.o-cajon:focus { outline: none; }
.o-cajon.izq { left: 0; animation: o-de-izq .2s ease-out; }
.o-cajon.der { right: 0; animation: o-de-der .2s ease-out; }
.o-cajon.abajo { left: 0; right: 0; top: auto; width: auto; max-height: 90vh; max-height: 90dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: o-hoja .22s ease-out; }
@keyframes o-de-izq { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes o-de-der { from { transform: translateX(100%); } to { transform: none; } }
.o-cajon-cab { height: var(--cab-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line-2); }
.o-cajon-cab h2 { flex: 1; font-size: 15px; }
.o-cajon-cuerpo { flex: 1; min-height: 0; overflow-y: auto; }
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.o-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 42px; max-width: min(92vw, 460px); padding: 10px 16px 10px 12px; border-radius: 10px; background: #2C3423; color: #F4F3EA; font-size: 14px; box-shadow: var(--sombra-l); cursor: pointer; animation: o-toast .2s ease-out; }
.o-toast .o-ico { color: #B9CB93; }
.o-toast.error { background: #8E3E2D; }
.o-toast.error .o-ico { color: #FFD9CF; }
.o-toast.info .o-ico { color: #E5C38F; }
.o-toast.sale { animation: o-toast-sale .2s ease-in forwards; }
@keyframes o-toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes o-toast-sale { to { opacity: 0; transform: translateY(6px); } }
.o-tip { position: fixed; z-index: var(--z-tip); max-width: 260px; background: #2C3423; color: #F4F3EA; font-size: 12px; font-weight: 500; line-height: 1.35; padding: 6px 8px; border-radius: 8px; pointer-events: none; opacity: 0; transition: opacity .1s; white-space: normal; }
.o-tip.on { opacity: 1; }

/* ---------------- pantallas sueltas: carga, entrada, sin negocio ---------------- */
.o-splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--ink-3t); font-size: 13px; }
.o-splash img { width: 56px; height: 56px; }
.o-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--verde); }
.o-lockup img { width: 46px; height: 46px; flex: none; }
.o-wm { display: flex; align-items: stretch; font-family: var(--fuente-marca); font-weight: 400; line-height: .92; }
.o-wm-o { font-size: 44px; color: var(--cobre); line-height: .78; margin-right: 2px; letter-spacing: -1px; }
.o-wm-r { display: flex; flex-direction: column; justify-content: center; font-size: 17.5px; letter-spacing: .6px; }
.o-wm-r span:last-child { font-size: 12.2px; letter-spacing: 1px; }
.o-lockup.claro { color: var(--crema); }
.o-entrada { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--bg); }
.o-entrada-form { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 32px 24px 0; }
.o-entrada-caja { width: 100%; max-width: 380px; margin: auto; padding: 24px 0 32px; }
.o-entrada-caja h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 36px; }
.o-entrada-sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
#entAviso { margin-top: 18px; }
#entAviso:empty { margin-top: 0; }
.o-btn-google { margin-top: 24px; gap: 10px; }
#entForm { display: flex; flex-direction: column; gap: 14px; }
#entForm .o-campo + .o-campo { margin-top: 0; }
#entForm .o-btn.pri { margin-top: 4px; }
#entEnlace { margin-top: 10px; }
.o-ent-codigo { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radio); background: var(--panel); }
.o-ent-codigo .o-ayuda { margin-top: -4px; }
#entCodigo { font-size: 20px; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; }
#entCodigo::placeholder { letter-spacing: normal; }
.o-liga .o-casilla { margin-top: 4px; }
.o-liga .o-chico { margin: 0; }
.o-entrada-nota { font-size: 12px; color: var(--ink-3t); margin-top: 8px; text-align: center; }
.o-entrada-pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--ink-3t); }
.o-entrada-pie a { color: var(--ink-2); }
.o-entrada-marca { position: relative; overflow: hidden; background: var(--verde); color: #EDEBD7; display: flex; align-items: center; justify-content: center; padding: 48px; }
.o-entrada-marca::before { content: ''; position: absolute; right: -180px; top: -180px; width: 560px; height: 560px; border-radius: 50%; border: 46px solid rgba(221,161,94,.10); }
.o-entrada-marca::after { content: ''; position: absolute; left: -140px; bottom: -220px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(254,250,224,.10); box-shadow: 0 0 0 60px rgba(254,250,224,.025), 0 0 0 120px rgba(254,250,224,.02); }
.o-entrada-marca-in { position: relative; z-index: 1; width: 100%; max-width: 440px; }
.o-entrada-iso { width: 64px; height: 64px; }
.o-entrada-marca h2 { font-family: var(--fuente-marca); font-weight: 400; font-size: 34px; line-height: 1.08; letter-spacing: -.01em; color: var(--crema); margin-top: 22px; }
.o-entrada-puntos { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: #DCDAC4; }
.o-entrada-puntos li { display: flex; gap: 12px; align-items: center; }
.o-entrada-puntos .o-ico { color: var(--arena); }
.o-mock { margin-top: 30px; background: var(--panel); border-radius: var(--radio-l); box-shadow: 0 24px 60px -24px rgba(0,0,0,.5); padding: 6px; color: var(--ink); }
.o-mock-fila { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; }
.o-mock-fila:first-child { background: var(--olivo-50); }
.o-mock-fila + .o-mock-fila { border-top: 1px solid var(--line-2); }
.o-mock-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-mock-txt b { font-size: 14px; }
.o-mock-txt span { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-mock-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.o-mock-meta small { font-size: 12px; color: var(--ink-3t); }
.o-mock-meta .o-chip { height: 20px; font-size: 11px; }
.o-mock-num { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 99px; background: var(--cobre-t); color: #fff; font-size: 11px; font-weight: 600; }
.o-entrada-hecho { margin-top: 22px; font-size: 13px; color: #B6B59C; }
.o-suelta { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px 0; }
.o-suelta-caja { width: 100%; max-width: 420px; margin: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sombra); padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; }
.o-suelta-caja h1 { font-size: 20px; margin-top: 18px; }
.o-suelta-caja p { color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }

/* ---------------- escritorio angosto (1100–1439 px) con el panel del contacto abierto ----------------
   rail 60 + barra lateral 232 + lista 340 + rail derecho 52 + panel 320 = 1004 px: a 1100 la conversación quedaba en ~96 px
   (texto en columna de una letra). Mientras el panel está abierto la barra lateral se guarda sola; al cerrarlo regresa. */
@media (min-width: 1100px) and (max-width: 1439px) {
  .con-conv.derecho-abierto .o-lateral { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .con-conv.derecho-abierto { --der-w: 300px; }
}

/* ---------------- tablet (760–1099 px): barra lateral y panel derecho como cajones ---------------- */
@media (max-width: 1099px) {
  .o-lateral { position: fixed; left: calc(var(--rail-w) + env(safe-area-inset-left, 0px)); top: 0; bottom: 0; z-index: var(--z-cajon); transform: translateX(calc(-100% - var(--rail-w) - env(safe-area-inset-left, 0px))); transition: transform .2s ease, visibility 0s linear .2s; box-shadow: var(--sombra-l); margin-left: 0 !important; visibility: hidden; }
  .lateral-abierta .o-lateral { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
  .lateral-abierta .o-velo-lat { display: block; position: fixed; inset: 0; z-index: calc(var(--z-cajon) - 1); background: rgba(35,42,28,.28); animation: o-aparece .14s; }
  .con-lateral .o-btn.o-btn-lateral { display: inline-flex; }
  .o-lat-plegar .o-ico-col { display: none; }
  .o-lat-plegar .o-ico-cajon { display: block; }
  .o-derecho { position: fixed; right: calc(var(--rail-der-w) + env(safe-area-inset-right, 0px)); top: 0; bottom: 0; z-index: var(--z-cajon); box-shadow: var(--sombra-l); width: min(88vw, var(--der-w)); }
  .con-conv.derecho-abierto .o-velo-der { display: block; position: fixed; inset: 0; z-index: calc(var(--z-cajon) - 1); background: rgba(35,42,28,.22); }
  .o-entrada { grid-template-columns: 1fr; }
  .o-entrada-marca { display: none; }
}

/* ---------------- celular (< 760 px): barra inferior, pantallas completas, hoja que sube ---------------- */
@media (max-width: 759px) {
  .o-app { flex-direction: column; }
  .o-rail { display: none; }
  .o-centro { padding-bottom: calc(var(--barra-movil-h) + env(safe-area-inset-bottom)); padding-left: env(safe-area-inset-left, 0px); }
  .enfoque .o-centro { padding-bottom: 0; }
  .o-lateral { left: 0; width: min(86vw, 300px); transform: translateX(-105%); padding-left: env(safe-area-inset-left, 0px); }
  .o-rail-der { display: none !important; }
  .o-derecho { right: 0; left: 0; top: auto; bottom: 0; width: auto; height: 88vh; height: 88dvh; border-radius: 16px 16px 0 0; border-left: 0; animation: o-hoja .22s ease-out; z-index: calc(var(--z-cajon) + 2); padding-bottom: env(safe-area-inset-bottom); }
  .con-conv.derecho-abierto .o-velo-der { z-index: calc(var(--z-cajon) + 1); }
  .o-der-cab { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 4px; padding: 6px 6px 0 6px; border-bottom: 1px solid var(--line); }
  .o-der-cab::before { content: ''; grid-column: 1 / -1; justify-self: center; width: 38px; height: 4px; border-radius: 99px; background: #D9D5C4; margin: 2px 0 4px; }
  .o-der-tit { display: none; }
  .o-der-pestanas { display: flex; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .o-der-pestanas::-webkit-scrollbar { display: none; }
  .o-der-pestana { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; font-size: 14px; flex: none; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
  .o-der-pestana.on { color: var(--verde); font-weight: 600; }
  .o-der-pestana.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--verde); border-radius: 2px; }
  .o-barra-movil { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--barra-movil-h) + env(safe-area-inset-bottom)); padding: 0 calc(4px + env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom) calc(4px + env(safe-area-inset-left, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
  .enfoque .o-barra-movil { display: none; }
  .o-bm-btn { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--ink-3t); text-decoration: none; }
  .o-bm-btn:hover { text-decoration: none; }
  .o-bm-btn.on { color: var(--verde); }
  .o-bm-btn.on .o-bm-ico { background: var(--olivo-100); }
  .o-bm-ico { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 99px; transition: background .15s; }
  .o-bm-ico .o-rail-num { top: -5px; left: 29px; right: auto; border-color: var(--panel); transform: none; }
  .o-rail-pronto.movil { bottom: auto; top: -6px; left: auto; right: -6px; transform: none; }
  #toasts { bottom: calc(var(--barra-movil-h) + 14px + env(safe-area-inset-bottom)); }
  .enfoque ~ #toasts, .o-con-modal #toasts { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .o-cab { padding: 0 8px 0 12px; }
  .o-franja { font-size: 13px; padding: 8px 8px 8px 12px; line-height: 1.4; }
  .o-franja-largo { display: none; }
  .o-franja-corto { display: inline; }
  /* campos de texto y listas desplegables de 44 px para el dedo (min-height gana a los altos fijos de cada módulo) */
  .o-input, .o-select { min-height: 44px; }
  .o-pagina { padding: 16px; }
  .o-velo { align-items: flex-end; padding: 0; }
  .o-modal { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); animation: o-hoja .22s ease-out; }
  .o-modal-pie { flex-direction: column-reverse; }
  .o-modal-pie .o-btn { width: 100%; height: 44px; }
  .o-btn { min-height: 36px; }
  .o-btn.ico { min-width: 40px; }
  .o-lat-item { font-size: 15px; }
  /* iOS hace zoom al enfocar campos con letra < 16 px */
  /* < 16 px hace zoom en iOS al enfocar: ningún campo de texto baja de 16 px en el celular (gana a los tamaños de cada módulo) */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; }
  .o-entrada-form { padding: 20px 16px 0; }
  .o-entrada-caja { padding-top: 8px; }
  .o-entrada-caja h1 { font-size: 23px; margin-top: 28px; }
}

/* ---------------- áreas táctiles ----------------
   Con el dedo (pantallas táctiles) cada control recibe toques en al menos 44 × 44 px sin cambiar cómo se ve:
   un ::before invisible y centrado crece hasta 44 px. :where() deja la especificidad en 0 para no pisar a nadie
   (los botones con position absolute/fixed/sticky la conservan). */
@media (pointer: coarse) {
  :where(.o-btn, .o-chip, .o-segmento button, .o-interruptor, .o-lat-tit, .o-franja-x, .o-menu-item,
         .o-rail-btn, .o-rail-logo, .o-rail-neg, .o-rail-yo,
         .bj-herr, .bj-modo, .bj-pie-btn, .bj-orden, .bj-fchip > button, .bj-limpiar, .bj-etapa, .bj-asig, .bj-pop-emoji,
         .ct-filtro, .ct-sel, .ct-etq-mas, .ct-etq-x, .ct-th-btn, .ct-sec-tit, .rp-ayuda, .rp-orden, .rp-tile-ir, .rp-link,
         .aj-punto, .aj-asa, .aj-var-btn, .ia-deshacer button) { position: relative; }
  :where(.o-btn, .o-chip, .o-segmento button, .o-interruptor, .o-lat-tit, .o-franja-x, .o-menu-item,
         .o-rail-btn, .o-rail-logo, .o-rail-neg, .o-rail-yo,
         .bj-herr, .bj-modo, .bj-pie-btn, .bj-orden, .bj-fchip > button, .bj-limpiar, .bj-etapa, .bj-asig, .bj-pop-emoji,
         .ct-filtro, .ct-sel, .ct-etq-mas, .ct-etq-x, .ct-th-btn, .ct-sec-tit, .rp-ayuda, .rp-orden, .rp-tile-ir, .rp-link,
         .aj-punto, .aj-asa, .aj-var-btn, .ia-deshacer button)::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
  /* tablet táctil (760–1099 px) igual que el celular: renglones, campos y listas de 44 px y letra de 16 px en los campos
     (Safari de iOS hace zoom al enfocar un campo con letra < 16 px). body .ct-in gana a la altura de contacto.css */
  .o-lat-item { min-height: 44px; }
  .o-input, .o-select, body .ct-in { min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .o-cargando { animation: o-gira 1.6s linear infinite !important; animation-iteration-count: infinite !important; animation-duration: 1.6s !important; }
}
@media print {
  .o-rail, .o-lateral, .o-rail-der, .o-derecho, .o-barra-movil, .o-avisos { display: none !important; }
  body, .o-app { overflow: visible; height: auto; }
}
