/* Sitio público de LeiAI (soporte.leiai.online): mismo lenguaje visual que leiai.online y el Hub.
   Fondo casi negro, tipografía grande, líneas finas, etiquetas «(01)», un solo acento cian y botones en píldora. */
:root {
  --bg: #050608; --bg-2: #0b0d12; --bg-3: #10131a;
  --surface: rgba(255, 255, 255, 0.03); --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1); --line-2: rgba(255, 255, 255, 0.18);
  --text: #f3f4f6; --muted: #8b919c; --dim: #353a43; --dim-2: #1c1f26;
  --accent: #00d4ff; --accent-2: #2f6bff; --ok: #5cf2a8; --warn: #ffd27a; --bad: #ff8a8f;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px); --nav-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
/* Luz cian suave arriba, como la portada */
body::before {
  content: ''; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 70% 20%, rgba(0, 212, 255, .10), transparent 70%), radial-gradient(ellipse 40% 50% at 20% 0%, rgba(47, 107, 255, .08), transparent 70%);
}
a { color: inherit; }
::selection { background: var(--accent); color: #001018; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
h1 em, h2 em, h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent); }
p { margin: 0; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Navegación ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter);
  background: rgba(5, 6, 8, .72); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.brand em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; color: var(--accent); letter-spacing: 0; }
.top nav { display: flex; gap: 8px; align-items: center; }

/* ---------- Botones en píldora ---------- */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 500 13px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--text); color: var(--bg);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s;
}
.btn:hover, .pill:hover { background: var(--accent); color: #001018; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost, .pill-line { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover, .pill-line:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.dark { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn.dark:hover { background: var(--bad); color: #1a0306; border-color: var(--bad); }
.top .pill { height: 38px; padding: 0 16px; font-size: 12px; }
.btn span[aria-hidden] { transition: transform .35s var(--ease); }
.btn:hover span[aria-hidden] { transform: translateX(4px); }

/* ---------- Estructura ---------- */
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) 72px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--gutter) 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.eyebrow { display: flex; gap: 14px; align-items: baseline; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { color: var(--text); font-weight: 400; font-variant-numeric: tabular-nums; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 30px); }
.card.soft { padding: 20px 22px; }
.card h3 { margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero { margin-bottom: clamp(28px, 4vw, 44px); padding-top: 16px; border-top: 1px solid var(--line); }
.hero h1 { margin: 22px 0 16px; font-size: clamp(40px, 7vw, 84px); }
.hero p { max-width: 600px; color: var(--muted); font-size: clamp(16px, 1.3vw, 18.5px); }
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.side { display: grid; gap: 14px; }

/* ---------- Formularios (como el Hub) ---------- */
.form { display: grid; gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f { display: grid; gap: 8px; }
.f > span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #5b616c; }
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { border-color: rgba(0, 212, 255, .6); box-shadow: 0 0 0 4px rgba(0, 212, 255, .1); background: var(--bg-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer; transition: all .2s var(--ease);
}
.chips button:hover { color: var(--text); border-color: var(--text); }
.chips button.on { color: var(--accent); border-color: var(--accent); background: rgba(0, 212, 255, .08); }
.prios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prios button {
  display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: all .2s var(--ease);
}
.prios button b { font-weight: 500; }
.prios small { color: var(--muted); font-size: 12px; }
.prios button:hover { border-color: var(--line-2); }
.prios button.on { border-color: var(--accent); background: rgba(0, 212, 255, .07); box-shadow: inset 0 0 0 1px var(--accent); }
.prios .p-alta.on { border-color: var(--warn); background: rgba(255, 210, 122, .07); box-shadow: inset 0 0 0 1px var(--warn); }
.prios .p-urgente.on { border-color: var(--bad); background: rgba(255, 138, 143, .08); box-shadow: inset 0 0 0 1px var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { margin: 0; color: var(--bad); font-size: 14px; }
.err:empty { display: none; }
.form > .btn { justify-self: start; min-width: 220px; height: 52px; font-size: 13.5px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }

/* Lateral */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; counter-increment: s; }
.steps li::before { content: '(0' counter(s) ')'; grid-row: span 2; color: var(--text); font-size: 12.5px; letter-spacing: .04em; font-variant-numeric: tabular-nums; padding-top: 2px; }
.steps b { font-weight: 500; font-size: 15px; }
.steps span { color: var(--muted); font-size: 14px; }
.mine { display: grid; gap: 8px; }
.mine a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color .2s; }
.mine a:hover { border-color: var(--accent); }
.mine a b { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--accent); }
.mine a span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact { display: grid; gap: 8px; }
.contact a { color: var(--text); text-decoration: none; width: fit-content; border-bottom: 1px solid var(--line-2); transition: color .2s, border-color .2s; }
.contact a:hover { color: var(--accent); border-color: var(--accent); }

/* Confirmación */
.done { max-width: 720px; margin: 10px auto; padding: clamp(28px, 5vw, 48px); text-align: center; }
.done h1 { margin: 14px 0 12px; font-size: clamp(30px, 5vw, 52px); }
.done p { color: var(--muted); }
.ok-badge { width: 60px; height: 60px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(92, 242, 168, .4); background: rgba(92, 242, 168, .08); color: var(--ok); font-size: 26px; }
.linkbox { display: flex; gap: 8px; margin: 22px 0; }
.linkbox input { font-family: var(--mono); font-size: 13px; }
.linkbox .btn { flex-shrink: 0; height: 46px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty { max-width: 620px; margin: 40px auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.empty h2 { font-size: clamp(26px, 4vw, 38px); }
.empty p { color: var(--muted); }
.center { text-align: center; color: var(--muted); }
.center a { color: var(--accent); }

/* ---------- Solicitud ---------- */
.back { display: block; width: fit-content; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; transition: color .2s; }
.back:hover { color: var(--text); }
.ticket-head { padding-top: 16px; border-top: 1px solid var(--line); }
.ticket-head h1 { margin: 16px 0 16px; font-size: clamp(30px, 5vw, 56px); }
.status { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(0, 212, 255, .35); background: rgba(0, 212, 255, .08); color: var(--accent); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status.s-esperando { border-color: rgba(255, 210, 122, .35); background: rgba(255, 210, 122, .08); color: var(--warn); }
.status.s-resuelto, .status.s-cerrado { border-color: rgba(92, 242, 168, .35); background: rgba(92, 242, 168, .08); color: var(--ok); }
.track { display: grid; grid-template-columns: repeat(4, 1fr); margin: 34px 0 30px; padding: 0; list-style: none; }
.track li { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.track li::after { content: ''; position: absolute; top: 7px; left: 50%; width: 100%; height: 1px; background: var(--line-2); }
.track li:last-child::after { display: none; }
.track li.on::after { background: var(--accent); box-shadow: 0 0 8px rgba(0, 212, 255, .5); }
.track li.cur::after { background: var(--line-2); box-shadow: none; }
.track i { position: relative; z-index: 1; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.track li.on i { border-color: var(--accent); background: var(--accent); }
.track li.cur i { box-shadow: 0 0 0 6px rgba(0, 212, 255, .14), 0 0 14px rgba(0, 212, 255, .6); }
.track li.on span { color: var(--text); }
.thread { display: grid; gap: 12px; margin-bottom: 20px; }
.msg { max-width: 80%; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.msg.me { justify-self: end; background: rgba(47, 107, 255, .1); border-color: rgba(47, 107, 255, .3); border-bottom-right-radius: 6px; }
.msg.team { border-left: 2px solid var(--accent); border-bottom-left-radius: 6px; }
.msg header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.msg header b { color: var(--text); font-weight: 500; }
.msg header time { white-space: nowrap; }
.msg p { overflow-wrap: anywhere; }
.reply { display: grid; gap: 14px; }
.reply .btn { justify-self: start; }

/* ---------- Cotización ---------- */
.banner { margin-bottom: 18px; padding: 16px 20px; border-radius: 14px; border: 1px solid; font-size: 15px; }
.banner.ok { border-color: rgba(92, 242, 168, .35); background: rgba(92, 242, 168, .08); color: var(--ok); }
.banner.bad { border-color: rgba(255, 138, 143, .35); background: rgba(255, 138, 143, .07); color: var(--bad); }
.banner.warn { border-color: rgba(255, 210, 122, .35); background: rgba(255, 210, 122, .07); color: var(--warn); }
.doc { padding: clamp(22px, 4.5vw, 52px); }
.doc-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-brand { display: flex; gap: 14px; align-items: center; }
.doc-brand img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; }
.doc-brand b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.doc-brand small, .doc-meta small { display: block; color: var(--muted); font-size: 12.5px; }
.doc-meta { text-align: right; }
.doc-meta span { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc-meta b { display: block; margin: 2px 0 4px; font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--accent); }
.doc-meta small.bad { color: var(--bad); }
.doc-title { margin: 30px 0 6px; font-size: clamp(28px, 4.4vw, 48px); }
.doc-client { margin: 20px 0 6px; padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.doc-client span { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc-client b { display: block; margin: 2px 0; font-size: 17px; font-weight: 500; }
.doc-client small { color: var(--muted); }
.doc-group { margin-top: 32px; }
.doc-group h3, .doc-notes h3 { display: flex; gap: 12px; margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.n { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
th.n { font-family: var(--sans); font-size: 11.5px; }
.tot { display: flex; justify-content: flex-end; gap: 28px; padding: 8px 12px 0; }
.tot span { color: var(--muted); font-size: 13.5px; }
.tot b { min-width: 170px; text-align: right; font-family: var(--mono); font-weight: 400; font-size: 14px; }
.tot.big { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.tot.big span { color: var(--text); font-size: 15px; }
.tot.big b { font-size: 19px; font-weight: 500; color: var(--accent); }
.doc-notes { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-notes p { color: var(--muted); }
.doc-foot { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0; }
.actions .btn { min-width: 210px; height: 52px; }
.decide { max-width: 680px; margin: 0 auto; display: grid; gap: 16px; }
.decide h2 { font-size: clamp(26px, 3.6vw, 36px); }
.decide .row { justify-content: flex-start; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .prios { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --nav-h: 64px; }
  .top nav .pill { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .form > .btn, .actions .btn, .reply .btn { width: 100%; }
  .msg { max-width: 94%; }
  .track span { font-size: 10px; letter-spacing: .02em; }
  .doc-meta { text-align: left; }
  .tot { gap: 14px; }
  .tot b { min-width: 0; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .linkbox { flex-direction: column; }
  .foot { justify-content: center; text-align: center; }
}
/* Impresión: documento claro y limpio */
@media print {
  :root { --text: #11141a; --muted: #555b66; --line: #dcdfe5; --accent: #11141a; --bg-2: #f4f5f7; --surface: #fff; }
  body { background: #fff; color: #11141a; }
  body::before, .top, .foot, .no-print, .banner { display: none !important; }
  main { padding: 0; }
  .doc { border: 0; padding: 0; }
}
