/* Demos de IntegraSquad. Tokens copiados de IntegraSquad/site/styles.css */
:root {
  --bg: #05070d;
  --bg-2: #0a1020;
  --blue: #0b5cc7;
  --cyan: #3fd0ff;
  --warm: #ff8a3d;
  --ok: #3ddc97;
  --text: #e8eef8;
  --muted: #93a2bd;
  --line: rgba(120, 160, 230, 0.16);
  --panel: rgba(10, 16, 32, 0.78);
  --radius: 18px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #0b1630 0%, var(--bg) 65%) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { height: 34px; width: auto; }
.brand span { font: 700 13px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }
.lang {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); font: 600 12px/1 var(--font-head); letter-spacing: .06em; color: var(--muted); cursor: pointer;
}
.lang span { padding: 6px 9px; border-radius: 999px; }
.lang[data-active="es"] [data-l="es"], .lang[data-active="en"] [data-l="en"] { background: rgba(63,208,255,.18); color: var(--text); }

/* Banda DEMO */
.demo-band {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 12px; margin-bottom: 20px;
  background: rgba(255, 138, 61, .1); border: 1px solid rgba(255, 138, 61, .45); color: #ffd2b3; font-size: 14px;
}
.sello {
  display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--warm); color: #1a0d03;
  font: 800 11px/1.2 var(--font-head); letter-spacing: .12em;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 700; }
.lead { color: var(--muted); max-width: 70ch; margin-bottom: 24px; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .2s, transform .2s; text-decoration: none; color: var(--text);
}
.card:hover { border-color: rgba(63,208,255,.55); transform: translateY(-2px); }
.card .sector { font: 600 12px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.card h2 { font-size: 19px; }
.card p { color: var(--muted); font-size: 14px; }
.card .sello { position: absolute; top: 16px; right: 16px; }
.card.off { cursor: default; opacity: .6; }
.card.off:hover { transform: none; border-color: var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: 999px;
  font: 700 14px/1 var(--font-head); color: #fff; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, var(--blue) 0%, #1d8fe8 100%);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px var(--line) inset; }

/* Chat + panel */
.sala { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.chat, .panel { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.chat { display: flex; flex-direction: column; height: min(680px, calc(100vh - 170px)); min-height: 460px; overflow: hidden; }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: grid; place-items: center; font: 800 15px var(--font-head); }
.chat-top b { display: block; font-family: var(--font-head); }
.chat-top small { color: var(--muted); font-size: 12px; }
.chat-top .btn { margin-left: auto; padding: 8px 14px; font-size: 12px; }
.log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.burbuja { max-width: 82%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.burbuja.bot { align-self: flex-start; background: rgba(255,255,255,.06); border-bottom-left-radius: 4px; }
.burbuja.yo { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #1d74d8); border-bottom-right-radius: 4px; }
.burbuja.aviso { align-self: center; max-width: 95%; background: rgba(255,138,61,.12); border: 1px solid rgba(255,138,61,.4); font-size: 13px; text-align: center; }
.escribiendo { display: inline-flex; gap: 4px; }
.escribiendo i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pulso 1s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .15s; } .escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes pulso { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .escribiendo i { animation: none; } .card { transition: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(63,208,255,.4); background: rgba(63,208,255,.08); font-size: 13px; cursor: pointer; text-align: left; }
.chip:hover { background: rgba(63,208,255,.18); }
.entrada { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.entrada textarea { flex: 1; min-width: 0; resize: none; overflow-y: auto; scrollbar-width: none; height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.pie-chat { display: flex; justify-content: space-between; gap: 8px; padding: 0 16px 10px; color: var(--muted); font-size: 12px; }
#turnstile { display: flex; justify-content: center; }
#turnstile:empty { display: none; }

.panel { padding: 18px; }
.panel h2 { font-size: 16px; margin-bottom: 4px; }
.panel .nota { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.ficha { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.ficha dt { color: var(--muted); }
.ficha dd { overflow-wrap: anywhere; }
.ficha dd.vacio { color: rgba(147,162,189,.5); }
.ficha dd.nuevo { animation: brillo 1.2s ease; }
@keyframes brillo { from { color: var(--cyan); } }
.estado { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.06); }
.estado[data-a="proponer_cita"] { background: rgba(63,208,255,.15); color: var(--cyan); }
.estado[data-a="confirmar_cita"] { background: rgba(61,220,151,.15); color: var(--ok); }
.estado[data-a="pasar_a_humano"] { background: rgba(255,138,61,.15); color: var(--warm); }
.cita { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(61,220,151,.6); background: rgba(61,220,151,.07); font-size: 14px; }
.cita b { color: var(--ok); }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.panel .real { color: var(--muted); font-size: 13px; }

footer { color: var(--muted); font-size: 13px; padding: 28px 0 36px; }
footer a { color: var(--muted); }

@media (max-width: 860px) {
  .sala { grid-template-columns: 1fr; }
  .chat { height: 72vh; min-height: 420px; }
  .burbuja { max-width: 90%; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
}
