/* pocket chat · Pocketful brand con profundidad: fondo atmosférico, capas translúcidas (vidrio), sombras
   apiladas con filete de luz, y movimiento calmo (150–400 ms). Forma "pocket" (solo la esquina inferior
   derecha redondeada) en tarjetas, burbujas, botones e inputs. Modo oscuro sigue al sistema. */
:root {
  --fondo: #F8F7F5; --fondo-2: #EFEDE8; --blanco: #FFFFFF; --tinta: #1E1E1E; --titulos: #606060; --guia: #ACACAC; --linea: #DDDDDD;
  --teal: #90AEAE; --teal-oscuro: #2D3D3D; --teal-tinte: #DEE7E7; --alerta: #8F3B20;
  --burbuja-bot: #FFFFFF; --burbuja-usuario: #90AEAE; --texto-usuario: #1E1E1E; --input: #FFFFFF;
  --vidrio: rgba(248, 247, 245, 0.72); --vidrio-borde: rgba(30, 30, 30, 0.06); --filete: rgba(255, 255, 255, 0.6);
  --glow-1: rgba(144, 174, 174, 0.35); --glow-2: rgba(45, 61, 61, 0.08);
  --sombra-1: 0 1px 2px rgba(30, 30, 30, 0.06), 0 0 0 1px rgba(30, 30, 30, 0.04);
  --sombra-2: 0 1px 2px rgba(30, 30, 30, 0.05), 0 10px 28px -10px rgba(30, 30, 30, 0.22), inset 0 1px 0 var(--filete);
  --sombra-3: 0 2px 4px rgba(30, 30, 30, 0.06), 0 28px 56px -16px rgba(30, 30, 30, 0.35), inset 0 1px 0 var(--filete);
  --sombra-teal: 0 10px 28px -12px rgba(45, 61, 61, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --titulo: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --cuerpo: 'Dosis', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --encabezado: 'Oswald', 'Helvetica Neue', Arial, sans-serif;
  --marca: 'Permanent Marker', 'Brush Script MT', cursive;
  --suave: cubic-bezier(0.2, 0.8, 0.2, 1); --rapido: 150ms; --medio: 320ms; --lento: 480ms;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #171A1A; --fondo-2: #0F1212; --blanco: #232828; --tinta: #EEEDEA; --titulos: #ACACAC; --guia: #6E7474; --linea: #303737;
    --teal-tinte: #24393A; --alerta: #E08A6C;
    --burbuja-bot: #232828; --burbuja-usuario: #90AEAE; --texto-usuario: #171A1A; --input: #1D2222;
    --vidrio: rgba(23, 26, 26, 0.68); --vidrio-borde: rgba(255, 255, 255, 0.07); --filete: rgba(255, 255, 255, 0.07);
    --glow-1: rgba(144, 174, 174, 0.22); --glow-2: rgba(144, 174, 174, 0.06);
    --sombra-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --sombra-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 var(--filete);
    --sombra-3: 0 2px 4px rgba(0, 0, 0, 0.5), 0 32px 64px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 var(--filete);
    --sombra-teal: 0 12px 32px -12px rgba(144, 174, 174, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--cuerpo); font-size: 16px; line-height: 1.4; color: var(--tinta); background: var(--fondo);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
/* atmósfera: un halo teal arriba a la izquierda, un horizonte más denso abajo, y grano fino encima */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 40% at 12% 0%, var(--glow-1), transparent 70%),
    radial-gradient(80% 50% at 50% 115%, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--fondo) 0%, var(--fondo-2) 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: screen; opacity: 0.18; } }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font-family: inherit; font-size: 17px; color: inherit; }
a { color: var(--teal-oscuro); font-weight: 600; text-decoration: none; }
@media (prefers-color-scheme: dark) { a { color: var(--teal); } }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* movimiento */
@keyframes aparecer { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes aparecer-suave { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes vista-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes desde-derecha { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes desde-izquierda { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes hacia-izquierda { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes desvanecer { from { opacity: 1; } to { opacity: 0; } }
@keyframes latido { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes flotar { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, -10px); } }

.vista { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; animation: vista-in var(--medio) var(--suave); }
.titulo { font-family: var(--titulo); font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.subtitulo { font-size: 13px; color: var(--titulos); }
.encabezado, .etiqueta, .menu-seccion, .tabs button, .tarjeta-titulo, .separador-dia, .fecha-grupo {
  font-family: var(--encabezado); font-weight: 300; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--titulos);
}
.lockup { display: flex; align-items: baseline; gap: 4px; }
.lockup .pocket { font-weight: 500; font-size: 14px; }
.lockup .chat { font-family: var(--marca); font-size: 16px; color: var(--teal); line-height: 1; }
.lockup-grande { padding-left: 12px; margin-top: 4px; }
.lockup-grande .pocket { font-size: 30px; letter-spacing: 0.02em; }
.lockup-grande .chat { font-size: 34px; }

/* superficies */
.vidrio { background: var(--vidrio); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }

/* botones */
.btn-primario {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; width: 100%; padding: 0 16px;
  background: linear-gradient(180deg, #2C2C2C, var(--tinta)); color: #FFFFFF; border-radius: 0 0 12px 0; font-weight: 600; font-size: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 24px -12px rgba(30, 30, 30, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform var(--rapido) var(--suave), box-shadow var(--rapido) var(--suave), filter var(--rapido);
}
@media (prefers-color-scheme: dark) { .btn-primario { background: linear-gradient(180deg, #F4F3F0, #DEDCD7); color: #171A1A; } .btn-primario svg { stroke: #171A1A; } }
.btn-primario svg { stroke: #FFFFFF; width: 20px; height: 20px; }
.btn-primario:hover { filter: brightness(1.06); }
.btn-primario:active { transform: translateY(1px) scale(0.985); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.btn-primario:disabled { opacity: .5; }
.btn-icono { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 0 0 12px 0; transition: background var(--rapido), transform var(--rapido) var(--suave); }
.btn-icono:active { background: var(--teal-tinte); transform: scale(0.94); }
.btn-chip {
  height: 40px; padding: 0 14px; border: 1px solid var(--vidrio-borde); background: var(--burbuja-bot); border-radius: 0 0 10px 0;
  font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: var(--sombra-1);
  animation: aparecer-suave var(--medio) var(--suave) both;
  transition: transform var(--rapido) var(--suave), box-shadow var(--rapido) var(--suave), background var(--rapido);
}
.btn-chip:hover { transform: translateY(-1px); box-shadow: var(--sombra-2); }
.btn-chip:active { transform: scale(0.97); background: var(--teal-tinte); }

/* 1 · login */
#vista-login { padding: calc(96px + var(--safe-top)) 24px calc(32px + var(--safe-bottom)); justify-content: space-between; overflow: hidden; }
.esquina { position: absolute; right: 0; bottom: 0; width: 220px; height: 220px; background: linear-gradient(200deg, #3A4E4E, var(--teal-oscuro)); border-radius: 100% 0 0 0; box-shadow: -20px -20px 60px -30px rgba(45, 61, 61, 0.5); animation: flotar 9s ease-in-out infinite; }
.login-cuerpo { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px 24px 24px; border-radius: 0 0 22px 0; background: var(--vidrio); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); box-shadow: var(--sombra-3); border: 1px solid var(--vidrio-borde); }
.login-cuerpo > * { animation: aparecer var(--lento) var(--suave) both; }
.login-cuerpo > :nth-child(1) { animation-delay: 40ms; } .login-cuerpo > :nth-child(2) { animation-delay: 110ms; }
.login-cuerpo > :nth-child(3) { animation-delay: 180ms; } .login-cuerpo > :nth-child(4) { animation-delay: 260ms; }
.logo { width: 180px; height: auto; margin-left: -4px; }
@media (prefers-color-scheme: dark) { .logo { filter: invert(1) hue-rotate(180deg) brightness(1.1); } }
.login-sub { margin: 0; padding-left: 12px; color: var(--titulos); max-width: 280px; }
.form-login { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.form-login .etiqueta { margin-top: 10px; }
.form-login .btn-primario { margin: 16px 0 0 12px; width: auto; height: 52px; font-family: var(--titulo); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.campo { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; margin-left: 12px; border: 1px solid var(--linea); border-radius: 0 0 12px 0; background: var(--input); box-shadow: inset 0 1px 2px rgba(30, 30, 30, 0.04); transition: border-color var(--rapido), box-shadow var(--rapido); }
.campo:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tinte); }
.campo svg { width: 20px; height: 20px; stroke: var(--titulos); }
.campo input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.error { margin: 6px 0 0 12px; color: var(--alerta); font-size: 14px; animation: aparecer-suave var(--medio) var(--suave); }
.login-nota { position: relative; display: flex; gap: 10px; align-items: flex-start; max-width: 150px; margin: 0; font-size: 14px; color: var(--titulos); line-height: 1.45; animation: aparecer var(--lento) var(--suave) 380ms both; }
.login-nota svg { width: 20px; height: 20px; stroke: var(--titulos); }
.login-nota strong { color: var(--tinta); font-weight: 600; }

/* 2 · chat: la lista scrollea por debajo de la barra y del composer (vidrio) */
#vista-chat { position: fixed; }
.barra { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-top)) 12px 12px; background: var(--vidrio); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 1px 0 var(--vidrio-borde), 0 8px 24px -16px rgba(30, 30, 30, 0.25); }
.barra-titulo { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mensajes { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 8px; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
.separador-dia { align-self: center; color: var(--guia); }
.burbuja { max-width: 84%; padding: 12px 14px; border-radius: 0 0 16px 0; display: flex; flex-direction: column; gap: 12px; overflow-wrap: anywhere; animation: aparecer var(--medio) var(--suave) both; transform-origin: bottom left; }
.burbuja.bot { align-self: flex-start; background: var(--burbuja-bot); box-shadow: var(--sombra-2); }
.burbuja.usuario { align-self: flex-end; transform-origin: bottom right; color: var(--texto-usuario); background: linear-gradient(180deg, #9DB8B8, var(--burbuja-usuario)); box-shadow: var(--sombra-teal); }
.burbuja.usuario img { display: block; max-width: 248px; width: 100%; border-radius: 0 0 12px 0; box-shadow: var(--sombra-1); }
.burbuja.error { box-shadow: var(--sombra-2), 0 0 0 1px var(--alerta); color: var(--alerta); }
.burbuja p { margin: 0; white-space: pre-wrap; }
.escribiendo { display: flex; gap: 5px; padding: 4px 2px; }
.escribiendo i { width: 7px; height: 7px; background: var(--guia); border-radius: 50%; animation: latido 1.2s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .2s; } .escribiendo i:nth-child(3) { animation-delay: .4s; }

.tarjeta { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 0 0 12px 0; background: var(--fondo); box-shadow: var(--sombra-1), inset 0 1px 0 var(--filete); animation: aparecer-suave var(--lento) var(--suave) 80ms both; }
.tarjeta-valor { font-family: var(--titulo); font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: 0.02em; }
.tarjeta-sub { font-size: 13px; color: var(--titulos); margin-bottom: 8px; }
.tarjeta-fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.tarjeta-fila:last-of-type { border-bottom: 0; }
.tarjeta-fila.destacada { padding: 8px 10px; margin: 0 -10px; border-radius: 0 0 8px 0; background: var(--teal-tinte); border-bottom: 0; box-shadow: inset 0 1px 0 var(--filete); }
.tarjeta-fila .etiqueta-fila { display: flex; flex-direction: column; }
.tarjeta-fila .etiqueta-fila small { font-size: 12px; color: var(--teal-oscuro); }
.tarjeta-fila .valor-fila { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.tarjeta-fila .valor-fila small { font-size: 13px; font-weight: 600; color: var(--teal-oscuro); }
.tarjeta-fila.destacada .valor-fila, .tarjeta-fila.destacada .etiqueta-fila > span { font-weight: 600; }
.tarjeta-nota { font-size: 13px; color: var(--titulos); margin-top: 6px; }

.adjunto { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 0 0 12px 0; background: var(--fondo); box-shadow: var(--sombra-1), inset 0 1px 0 var(--filete); color: inherit; transition: transform var(--rapido) var(--suave), box-shadow var(--rapido) var(--suave); }
.adjunto:hover { transform: translateY(-1px); box-shadow: var(--sombra-2); }
.adjunto:active { transform: scale(0.98); }
.adjunto .icono { width: 36px; height: 36px; border-radius: 0 0 10px 0; background: var(--teal-tinte); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 var(--filete); }
.adjunto .icono svg { width: 20px; height: 20px; stroke: var(--teal-oscuro); }
.adjunto .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.adjunto .texto b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adjunto .texto small { font-size: 13px; color: var(--titulos); }
.adjunto .ver { height: 36px; padding: 0 14px; border: 1px solid var(--linea); background: var(--burbuja-bot); border-radius: 0 0 10px 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; }

.chips { position: relative; z-index: 2; display: flex; gap: 8px; padding: 8px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.composer { position: relative; z-index: 3; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(12px + var(--safe-bottom)); background: var(--vidrio); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 -1px 0 var(--vidrio-borde), 0 -12px 32px -20px rgba(30, 30, 30, 0.3); }
.composer .btn-icono { height: 46px; }
.entrada { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.entrada input { width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--linea); border-radius: 0 0 12px 0; background: var(--input); outline: 0; font-size: 16px; box-shadow: inset 0 1px 2px rgba(30, 30, 30, 0.04); transition: border-color var(--rapido), box-shadow var(--rapido); }
.entrada input::placeholder { color: var(--guia); }
.entrada input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tinte); }
.foto-preview { position: relative; width: 72px; animation: aparecer var(--medio) var(--suave); }
.foto-preview img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 0 0 10px 0; box-shadow: var(--sombra-2); }
.foto-preview button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; background: var(--tinta); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--sombra-1); }
.foto-preview button svg { width: 14px; height: 14px; stroke: var(--fondo); stroke-width: 2.5; }
.btn-enviar { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #9DB8B8, var(--teal)); border-radius: 0 0 12px 0; box-shadow: var(--sombra-teal); transition: transform var(--rapido) var(--suave), box-shadow var(--rapido), filter var(--rapido); }
.btn-enviar svg { stroke: #1E1E1E; stroke-width: 2; }
.btn-enviar:hover { filter: brightness(1.05); }
.btn-enviar:active { transform: scale(0.92); }
.btn-enviar:disabled { filter: saturate(0.4); opacity: 0.6; }

/* 5 · menú: telón con desenfoque + panel que entra desde la izquierda */
.menu { position: fixed; inset: 0; z-index: 10; }
.menu-fondo { position: absolute; inset: 0; background: rgba(45, 61, 61, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fundido var(--medio) ease-out both; }
.menu-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(310px, 82vw); display: flex; flex-direction: column; gap: 24px; background: var(--fondo); padding: calc(20px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); border-radius: 0 0 28px 0; overflow-y: auto; box-shadow: var(--sombra-3); animation: desde-izquierda var(--medio) var(--suave) both; }
.menu.cerrando .menu-fondo { animation: desvanecer var(--medio) ease-in both; }
.menu.cerrando .menu-panel { animation: hacia-izquierda var(--medio) var(--suave) both; }
.menu-panel > * { animation: aparecer-suave var(--lento) var(--suave) both; }
.menu-panel > :nth-child(1) { animation-delay: 60ms; } .menu-panel > :nth-child(2) { animation-delay: 100ms; } .menu-panel > :nth-child(3) { animation-delay: 140ms; }
.menu-panel > :nth-child(4) { animation-delay: 160ms; } .menu-panel > :nth-child(5) { animation-delay: 180ms; } .menu-panel > :nth-child(6) { animation-delay: 200ms; }
.menu-panel > :nth-child(7) { animation-delay: 220ms; } .menu-panel > :nth-child(8) { animation-delay: 240ms; } .menu-panel > :nth-child(9) { animation-delay: 260ms; } .menu-panel > :nth-child(10) { animation-delay: 300ms; }
.menu-usuario { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.avatar { width: 44px; height: 44px; border-radius: 0 0 12px 0; background: linear-gradient(180deg, #9DB8B8, var(--teal)); color: #1E1E1E; display: flex; align-items: center; justify-content: center; font-family: var(--titulo); font-weight: 700; font-size: 18px; box-shadow: var(--sombra-teal); }
.titulo-usuario { font-weight: 600; font-size: 17px; }
.menu-seccion { padding: 0 4px; margin-bottom: -14px; }
.menu-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; width: 100%; text-align: left; border-radius: 0 0 10px 0; transition: background var(--rapido), transform var(--rapido) var(--suave); }
.menu-item:hover { background: var(--teal-tinte); }
.menu-item:active { transform: scale(0.985); background: var(--teal-tinte); }
.menu-item span { flex: 1; }
.menu-item small { font-size: 13px; color: var(--titulos); }
.menu-item.apagado { color: var(--titulos); }
.menu-pie { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.lockup-pie { padding: 0 12px; }
.lockup-pie .pocket { font-size: 13px; color: var(--titulos); }
.lockup-pie .chat { font-size: 15px; }
.lockup-pie em { font-style: normal; font-size: 12px; color: var(--guia); margin-left: 6px; }

/* 6 · panel: entra desde la derecha */
#vista-panel { animation: desde-derecha var(--medio) var(--suave); }
.barra-panel { box-shadow: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; padding-bottom: 0; }
.tabs { position: relative; z-index: 2; display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--linea); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 10px 12px; font-size: 13px; letter-spacing: 0.18em; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--medio), border-color var(--medio); }
.tabs button.activa { color: var(--tinta); font-weight: 400; border-bottom-color: var(--tinta); }
.panel-contenido { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.panel-contenido > * { animation: aparecer-suave var(--medio) var(--suave) both; }
.resumen { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 0 0 14px 0; background: linear-gradient(180deg, var(--teal-tinte), color-mix(in srgb, var(--teal-tinte) 80%, var(--fondo))); box-shadow: var(--sombra-2); }
.resumen .encabezado { color: var(--teal-oscuro); }
.resumen .valor { font-family: var(--titulo); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: 0.02em; }
.resumen .estado { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--teal-oscuro); font-weight: 600; padding-bottom: 4px; }
.resumen .estado svg { width: 16px; height: 16px; stroke: var(--teal-oscuro); stroke-width: 2.25; }
.fecha-grupo { padding: 4px 0 6px; }
.fila { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 0 -4px; border-radius: 0 0 10px 0; border-bottom: 1px solid var(--linea); transition: background var(--rapido); }
.fila:hover { background: var(--teal-tinte); }
.fila .texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fila .texto b { font-weight: 600; }
.fila .texto small { font-size: 13px; color: var(--titulos); }
.fila .monto { font-weight: 600; }
.fila a.ver { height: 36px; padding: 0 14px; border: 1px solid var(--linea); background: var(--burbuja-bot); border-radius: 0 0 10px 0; font-size: 14px; display: flex; align-items: center; box-shadow: var(--sombra-1); }
.vacio { color: var(--titulos); padding: 24px 12px; text-align: center; }
.panel-pie { position: relative; z-index: 3; padding: 10px 16px calc(16px + var(--safe-bottom)); background: var(--vidrio); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 -1px 0 var(--vidrio-borde), 0 -12px 32px -20px rgba(30, 30, 30, 0.3); }

@media (min-width: 640px) { .vista { box-shadow: 0 0 0 1px var(--vidrio-borde), 0 40px 80px -30px rgba(30, 30, 30, 0.4); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* modo oscuro: los acentos "teal oscuro" no contrastan sobre fondos oscuros; van al final para ganar en cascada */
@media (prefers-color-scheme: dark) {
  .tarjeta-fila .etiqueta-fila small, .tarjeta-fila .valor-fila small, .resumen .encabezado, .resumen .estado { color: var(--teal); }
  .resumen .estado svg, .adjunto .icono svg { stroke: var(--teal); }
  .resumen { background: linear-gradient(180deg, #24393A, #1D2F30); }
}
