/* Move · mobile-first, "noche violeta". Dark-first (sin tema claro). Estructura heredada de Nico Viajero. */
:root {
  --fondo: #0B0D17; --sup: #141226; --sup-2: rgba(124, 92, 255, .10); --sup-3: rgba(124, 92, 255, .16);
  --borde: rgba(160, 140, 255, .18); --borde-f: rgba(160, 140, 255, .34);
  --turq: #1BCFC9; --turq-2: #048A9E; --violeta: #7C5CFF; --magenta: #C04CFD; --ambar: #F5A524; --rojo: #FF5C7A; --verde: #4FD1A5;
  --txt: #ECEBFF; --txt-2: #A7A3C7; --txt-3: #8A86AE;
  --grad: linear-gradient(135deg, #1BCFC9 0%, #048A9E 100%);
  --radio: 16px; --radio-s: 10px;
  --tab-h: 64px; --top-h: 78px;
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--fondo); }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0; color: var(--txt); background: var(--fondo);
  background-image: radial-gradient(70% 40% at 100% 0%, rgba(124, 92, 255, .22), transparent 70%), radial-gradient(60% 35% at 0% 12%, rgba(27, 207, 201, .13), transparent 70%);
  background-attachment: fixed;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums; overscroll-behavior-y: none;
}
body.hoja-abierta { overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: var(--turq); }
.oculto { display: none !important; }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.acento { color: var(--turq); }
.glass, .glass-sup { background: var(--sup-2); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--borde); }

/* ---------- eyebrow / badges ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--turq); background: rgba(27, 207, 201, .08); border: 1px solid rgba(27, 207, 201, .38); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.eyebrow.violeta { color: #B7A6FF; background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .5); }
.eyebrow.magenta { color: #E08BFF; background: rgba(192, 76, 253, .10); border-color: rgba(192, 76, 253, .5); }
.eyebrow.ambar { color: var(--ambar); background: rgba(245, 165, 36, .10); border-color: rgba(245, 165, 36, .5); }
.eyebrow.rojo { color: var(--rojo); background: rgba(255, 92, 122, .10); border-color: rgba(255, 92, 122, .5); }
.chip-estado { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; color: var(--ambar); border: 1px solid rgba(245, 165, 36, .5); background: rgba(245, 165, 36, .1); white-space: nowrap; }
.av { --c: #7C5CFF; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #0B0D17; background: var(--c); flex: none; border: 2px solid var(--fondo); }
.av.g { width: 38px; height: 38px; font-size: 14px; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -8px; }

/* ---------- splash / login ---------- */
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--fondo); z-index: 50; }
.splash img { border-radius: 22px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--borde); border-top-color: var(--turq); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--sa-t)) 20px calc(24px + var(--sa-b)); }
.login-caja { width: 100%; max-width: 380px; border-radius: 28px; padding: 32px 24px 24px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 80px rgba(124, 92, 255, .18); }
.login-logo { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(27, 207, 201, .35), 0 10px 30px rgba(4, 138, 158, .4); margin-bottom: 16px; }
.login h1 { margin: 12px 0 4px; font-size: 34px; letter-spacing: -.8px; }
.login-sub { margin: 0 0 24px; color: var(--txt-2); }
.g-btn { display: flex; justify-content: center; min-height: 44px; }
.login-pie { margin: 20px 0 0; font-size: 12px; color: var(--txt-3); }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; min-height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--sa-t)) 16px 10px;
  background: rgba(11, 13, 23, .72); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent; }
.topbar.sombra { border-bottom-color: var(--borde); }
.topbar-t { flex: 1; min-width: 0; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.5px; }
.topbar small { color: var(--txt-2); font-size: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--borde-f); padding: 0; overflow: hidden; background: var(--sup); color: var(--txt); font-weight: 800; cursor: pointer; flex: none; display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar img:not([src]), .avatar img[src=""] { display: none; }

main { max-width: 720px; margin: 0 auto; padding: 8px 16px calc(var(--tab-h) + var(--sa-b) + 28px); }
.vista { display: none; animation: entra .18s ease-out; }
.vista.on { display: block; }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- tarjetas, campos, botones ---------- */
.card { background: var(--sup-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; margin: 12px 0; }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campo { display: block; min-width: 0; }
.campo.full { grid-column: 1 / -1; }
.campo > span { display: block; font-size: 12px; font-weight: 600; color: var(--txt-2); margin-bottom: 5px; }
input[type=text], input[type=date], input[type=number], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--txt); background: rgba(11, 13, 23, .6); border: 1px solid var(--borde); border-radius: var(--radio-s); appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s; }
input[type=text], input[type=date], input[type=number], input[type=time], input[type=url], input[type=search], select { height: 48px; padding: 0 12px; }
input[type=date], input[type=time] { min-width: 0; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--txt-2) 50%), linear-gradient(135deg, var(--txt-2) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { padding: 10px 12px; min-height: 84px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 3px rgba(27, 207, 201, .22); }
::placeholder { color: var(--txt-3); }

.acciones { display: grid; gap: 10px; margin: 14px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: none; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .08s, opacity .15s, filter .15s; text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primario { background: var(--grad); color: #04141A; box-shadow: 0 6px 20px rgba(4, 138, 158, .35); }
.btn.secundario { background: rgba(124, 92, 255, .22); color: #D7CEFF; border: 1px solid rgba(124, 92, 255, .5); }
.btn.violeta { background: var(--violeta); color: #fff; }
.btn.peligro { background: rgba(255, 92, 122, .16); color: var(--rojo); border: 1px solid rgba(255, 92, 122, .5); }
.btn.fantasma { background: transparent; color: var(--txt-2); font-weight: 600; }
.btn.chico { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn.cargando { pointer-events: none; opacity: .65; }
.icono-btn { width: 44px; height: 44px; border: none; background: transparent; border-radius: 12px; cursor: pointer; display: grid; place-items: center; color: var(--txt-2); flex: none; }
.icono-btn:active { background: var(--sup-3); }
.icono-btn.del { color: var(--rojo); }
.icono-btn.on { color: var(--turq); }

.aviso { font-size: 13.5px; padding: 10px 12px; border-radius: 12px; margin: 10px 0; }
.aviso.mal { background: rgba(255, 92, 122, .12); color: #FF8FA4; border: 1px solid rgba(255, 92, 122, .35); }
.aviso.bien { background: rgba(79, 209, 165, .12); color: var(--verde); border: 1px solid rgba(79, 209, 165, .35); }
.aviso.info { background: rgba(245, 165, 36, .1); color: var(--ambar); border: 1px solid rgba(245, 165, 36, .35); }
.nota { font-size: 12.5px; color: var(--txt-2); margin: 10px 2px; }
.vacio { text-align: center; color: var(--txt-2); padding: 36px 16px; }
.vacio .ico { display: block; margin: 0 auto 8px; width: 36px; height: 36px; color: var(--violeta); }
.sec-t { font-size: 12px; text-transform: uppercase; letter-spacing: .9px; color: var(--txt-2); margin: 24px 4px 8px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
code { background: rgba(124, 92, 255, .18); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borde); background: rgba(20, 18, 38, .7); color: var(--txt); border-radius: 22px; height: 44px; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip.on { background: rgba(27, 207, 201, .14); border-color: var(--turq); color: var(--turq); }
.chip.chico { height: 36px; padding: 0 12px; font-size: 13px; }

/* ---------- INICIO ---------- */
.hero { position: relative; margin: 8px 0 14px; padding: 22px 16px 18px; border-radius: 24px; overflow: hidden; text-align: center;
  background: radial-gradient(90% 70% at 50% 0%, rgba(124, 92, 255, .30), transparent 70%), radial-gradient(60% 60% at 90% 100%, rgba(27, 207, 201, .18), transparent 70%), var(--sup);
  border: 1px solid var(--borde); }
.hero-t { margin: 14px 0 4px; font-size: 32px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
.hero-sub { margin: 0 0 16px; color: var(--txt-2); font-size: 13.5px; }
.cuenta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.tile { border-radius: 16px; padding: 12px 4px 9px; background: var(--sup-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--borde); }
.tile b { display: block; font-size: clamp(30px, 10vw, 46px); line-height: 1; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.tile:first-child b { color: var(--turq); }
.tile span { display: block; margin-top: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--txt-2); }
.cuenta.chica .tile b { font-size: clamp(24px, 8vw, 34px); }
.grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { text-align: left; border-radius: var(--radio); padding: 14px; background: var(--sup-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--borde); color: inherit; cursor: pointer; min-height: 44px; }
.stat .n { display: block; font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; margin: 8px 0 2px; }
.stat small { color: var(--txt-2); font-size: 12.5px; display: block; }
.stat.ambar .n { color: var(--ambar); }
.stat.full { grid-column: 1 / -1; }
.prox { display: flex; align-items: center; gap: 14px; }
.prox .grande { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.prox .ico-c { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(124, 92, 255, .2); color: #CFC3FF; flex: none; }
.prox .ico-c .ico { width: 24px; height: 24px; }
.docs-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 10px; }
.docs-card .ico-c { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(27, 207, 201, .14); color: var(--turq); flex: none; }
.docs-card b { display: block; }
.docs-card small { color: var(--txt-2); }

/* ---------- VIAJE (calendario) ---------- */
.cal-cab, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-cab span { text-align: center; font-size: 11px; font-weight: 700; color: var(--txt-2); text-transform: uppercase; letter-spacing: .6px; padding: 4px 0; }
.dia { position: relative; min-height: 88px; padding: 5px 2px 4px; text-align: left; border-radius: 12px; border: 1px solid var(--borde); background: var(--sup-2); color: var(--txt); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dia:active { transform: scale(.98); }
.dia.fuera { opacity: .35; background: transparent; border-style: dashed; cursor: default; }
.dia.hoy { border-color: var(--turq); box-shadow: 0 0 0 1px var(--turq) inset; }
.dia .n { font-size: 12px; font-weight: 700; color: var(--txt-2); display: flex; justify-content: space-between; align-items: center; padding: 0 2px; }
.dia .n em { font-style: normal; font-size: 9px; color: var(--turq); text-transform: uppercase; letter-spacing: .4px; }
.dia .ciu { font-size: 9px; line-height: 1.15; font-weight: 800; letter-spacing: -.2px; overflow-wrap: break-word; hyphens: auto; padding: 0 1px; }
.dia .tra { font-size: 9px; line-height: 1.15; color: #CFC3FF; overflow-wrap: break-word; hyphens: auto; padding: 0 1px; }
.dia .pie-d { margin-top: auto; display: flex; align-items: center; gap: 3px; padding: 0 2px; font-size: 9.5px; color: var(--txt-2); min-height: 12px; }
.dia .sin-plan { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--ambar); }
.dia.sin .sin-plan { background: transparent; }
.dia .cant { font-weight: 700; color: var(--turq); }
.dia.t-0 { border-top: 3px solid #7C5CFF; } .dia.t-1 { border-top: 3px solid #1BCFC9; } .dia.t-2 { border-top: 3px solid #F5A524; }
.dia.t-3 { border-top: 3px solid #C04CFD; } .dia.t-4 { border-top: 3px solid #4FD1A5; } .dia.t-5 { border-top: 3px solid #FF5C7A; }
.leyenda { display: grid; gap: 8px; margin-top: 8px; }
.leyenda div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.leyenda small { color: var(--txt-2); margin-left: auto; }

/* ---------- hoja del día ---------- */
.dia-cab { margin: -4px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item { border: 1px solid var(--borde); border-radius: 14px; padding: 10px 12px; margin: 0 0 8px; background: rgba(11, 13, 23, .45); }
.item-cab { display: flex; align-items: flex-start; gap: 10px; }
.item-cab .grow { flex: 1; min-width: 0; }
.item b { display: block; overflow-wrap: anywhere; }
.item small { display: block; color: var(--txt-2); font-size: 12.5px; }
.item .lineas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.est { font-size: 11px; font-weight: 800; border-radius: 20px; padding: 3px 10px; white-space: nowrap; letter-spacing: .3px; border: 1px solid; }
.est.idea { color: var(--txt-2); border-color: var(--borde-f); }
.est.decidida { color: #B7A6FF; border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .12); }
.est.reservada { color: var(--turq); border-color: rgba(27, 207, 201, .6); background: rgba(27, 207, 201, .1); }
.est.hecha { color: var(--verde); border-color: rgba(79, 209, 165, .6); background: rgba(79, 209, 165, .1); }
.est.por_comprar { color: var(--ambar); border-color: rgba(245, 165, 36, .6); background: rgba(245, 165, 36, .1); }
.est.comprado { color: var(--turq); border-color: rgba(27, 207, 201, .6); background: rgba(27, 207, 201, .1); }
.est.usado { color: var(--txt-2); border-color: var(--borde-f); }
button.est { cursor: pointer; background: transparent; min-height: 32px; }
.voto { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 22px; border: 1px solid var(--borde); background: transparent; color: var(--txt-2); cursor: pointer; font-weight: 700; }
.voto.on { color: var(--turq); border-color: var(--turq); background: rgba(27, 207, 201, .12); }
.hora-c { font-size: 12px; font-weight: 800; color: var(--turq); }
.badge-ia { color: #E08BFF; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }

/* ---------- TICKETS ---------- */
.tk { border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px; margin: 0 0 10px; background: var(--sup-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tk.pronto { border-color: rgba(245, 165, 36, .7); box-shadow: 0 0 0 1px rgba(245, 165, 36, .25) inset; }
.tk.vencido { border-color: rgba(255, 92, 122, .75); box-shadow: 0 0 0 1px rgba(255, 92, 122, .25) inset; }
.tk-cab { display: flex; gap: 10px; align-items: flex-start; }
.tk-cab .grow { flex: 1; min-width: 0; }
.tk b { font-size: 16px; display: block; overflow-wrap: anywhere; }
.tk small { color: var(--txt-2); font-size: 12.5px; }
.tk-precio { font-weight: 800; font-size: 15px; white-space: nowrap; }
.tk-limite { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.tk-limite.pronto { color: var(--ambar); background: rgba(245, 165, 36, .12); }
.tk-limite.vencido { color: var(--rojo); background: rgba(255, 92, 122, .12); }
.tk-limite.ok { color: var(--txt-2); background: var(--sup-2); }
.tk-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--sa-b) + 16px); z-index: 25; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: none; border-radius: 26px; background: var(--grad); color: #04141A; font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 0 10px 28px rgba(4, 138, 158, .5); }

/* ---------- MAPA ---------- */
#v_mapa { margin: 0 -16px; }
.mapa-wrap { position: relative; height: calc(100dvh - var(--top-h) - var(--sa-t) - var(--tab-h) - var(--sa-b) - 8px); min-height: 380px; overflow: hidden; }
#mapa { position: absolute; inset: 0; background: #0B0D17; }
.mapa-top { position: absolute; top: 8px; left: 0; right: 0; z-index: 5; padding: 0 12px; }
.mapa-top .chip { background: rgba(20, 18, 38, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mapa-top .chip.on { background: rgba(27, 207, 201, .22); }
.mapa-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 6; max-height: 52%; display: flex; flex-direction: column; border-radius: 22px; padding: 8px 14px 12px; background: rgba(20, 18, 38, .78); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border: 1px solid var(--borde-f); box-shadow: 0 -8px 40px rgba(0, 0, 0, .45); }
.mapa-sheet.min { max-height: 76px; overflow: hidden; }
.mapa-sheet .asa { width: 38px; height: 5px; border-radius: 3px; background: var(--borde-f); margin: 0 auto 8px; border: none; padding: 0; cursor: pointer; min-height: 5px; }
.mapa-sheet-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mapa-sheet-cab b { font-size: 16px; }
.mapa-sheet .lista { overflow-y: auto; margin-top: 8px; display: grid; gap: 8px; }
.paso { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--borde); background: rgba(11, 13, 23, .5); }
.paso .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--violeta); color: #fff; flex: none; }
.paso .num.sin { background: transparent; border: 1.5px dashed var(--borde-f); color: var(--txt-2); }
.paso .grow { flex: 1; min-width: 0; cursor: pointer; }
.paso b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.paso small { color: var(--txt-2); font-size: 12px; display: block; }
.paso a.btn { min-height: 44px; font-size: 12.5px; padding: 0 10px; }
.mapa-vacio { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px 24px 160px; gap: 8px; color: var(--txt-2); }
.mapa-vacio .ico { width: 44px; height: 44px; color: var(--violeta); }
.mapa-vacio h3 { margin: 0; color: var(--txt); font-size: 18px; }
gmp-place-autocomplete { width: 100%; color-scheme: dark; --gmpx-color-surface: #141226; --gmpx-color-on-surface: #ECEBFF; }

/* ---------- IA ---------- */
.ia-sel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ia-sel select { height: 44px; font-size: 15px; }
.ia-sel .campo.full { grid-column: 1 / -1; }
.chat { display: grid; gap: 12px; padding: 4px 0 8px; min-height: 160px; }
.burbuja { max-width: 92%; padding: 11px 14px; border-radius: 18px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.burbuja.user { justify-self: end; background: var(--violeta); color: #fff; border-bottom-right-radius: 6px; }
.burbuja.ia { justify-self: start; background: var(--sup-2); border: 1px solid rgba(192, 76, 253, .4); border-bottom-left-radius: 6px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.burbuja p { margin: 0 0 8px; } .burbuja p:last-child { margin-bottom: 0; }
.burbuja ul { margin: 4px 0 8px; padding-left: 20px; }
.burbuja-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--txt-2); }
.burbuja-meta .btn { min-height: 44px; }
.escribiendo i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--magenta); animation: late 1s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .15s; } .escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes late { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ia-entrada { position: sticky; bottom: calc(var(--tab-h) + var(--sa-b) + 8px); display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: 20px; background: rgba(20, 18, 38, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--borde-f); margin-top: 8px; }
.ia-entrada textarea { min-height: 46px; max-height: 140px; border: none; background: transparent; padding: 11px 8px; }
.ia-entrada textarea:focus { box-shadow: none; }
.ia-entrada .btn { min-height: 46px; width: 46px; padding: 0; border-radius: 50%; }
.sugerencias { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sugerencias .chip { white-space: normal; height: auto; min-height: 44px; padding: 8px 14px; text-align: left; line-height: 1.25; }
.prev-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid var(--borde); border-radius: 12px; margin-bottom: 8px; background: rgba(11, 13, 23, .45); }
.prev-item input { width: 24px; height: 24px; accent-color: var(--turq); flex: none; margin-top: 2px; }
.prev-item small { display: block; color: var(--txt-2); }

/* ---------- docs ---------- */
.doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 8px; background: rgba(11, 13, 23, .45); }
.doc .grow { flex: 1; min-width: 0; }
.doc b { display: block; overflow-wrap: anywhere; font-size: 14.5px; }
.doc small { color: var(--txt-2); font-size: 12px; }
.doc .ico-c { color: var(--turq); }

/* ---------- barra inferior ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + var(--sa-b)); padding-bottom: var(--sa-b);
  background: rgba(15, 13, 30, .82); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--borde); }
.tabbar button { position: relative; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--txt-3); font-size: 10.5px; font-weight: 600; cursor: pointer; min-height: 48px; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--turq); }
.tabbar button.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ambar); color: #1B1200; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; }

/* ---------- hoja inferior ---------- */
.hoja { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.hoja-fondo { position: absolute; inset: 0; background: rgba(4, 5, 12, .62); animation: aparece .2s; }
.hoja-panel { position: relative; width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 8px 18px calc(18px + var(--sa-b)); animation: sube .25s cubic-bezier(.2, .9, .3, 1); background: rgba(20, 18, 38, .92); }
.hoja-asa { width: 38px; height: 5px; border-radius: 3px; background: var(--borde-f); margin: 0 auto 12px; }
.hoja h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.3px; }
.hoja p { color: var(--txt-2); font-size: 13.5px; margin: 0 0 12px; }
.hoja-form { display: grid; gap: 12px; margin-bottom: 8px; }
.hoja-form .campos { gap: 10px; }
.hoja-acciones { display: grid; gap: 6px; margin-top: 10px; }
.acc-prin, .acc-sec { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-prin .btn { flex: 1 1 120px; min-width: 0; min-height: 48px; padding: 6px 10px; font-size: 15px; line-height: 1.2; border-radius: 14px; }
.acc-sec .btn { flex: 1 1 0; min-width: max-content; min-height: 44px; font-size: 14px; }
.hoja-usuario { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.hoja-usuario img { width: 48px; height: 48px; border-radius: 50%; }
.hoja-usuario small { display: block; color: var(--txt-2); }
@keyframes sube { from { transform: translateY(100%); } to { transform: none; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 600px) { .hoja { align-items: center; } .hoja-panel { border-radius: 24px; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sa-b) + 14px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 70; background: #ECEBFF; color: #0B0D17; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); width: max-content; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.mal { background: var(--rojo); color: #1B0008; }

@media (min-width: 900px) {
  .tabbar { top: 0; bottom: 0; right: auto; width: 96px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: center; border-top: none; border-right: 1px solid var(--borde); padding: 0; }
  .topbar, main { margin-left: 96px; }
  main { padding-bottom: 40px; }
  .toast { bottom: 24px; }
  .fab { bottom: 24px; }
  .mapa-wrap { height: calc(100dvh - var(--top-h) - 16px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .btn, .chip, .item, .tk { border: 1px solid CanvasText; } }
.ico.mini { width: 14px; height: 14px; vertical-align: -2px; }
