/* Zeus Bot · diseño minimalista blanco, adaptable a cada dispositivo.
   Un solo fondo (blanco), un solo acento (negro), bordes finos,
   sin degradados, brillos ni sombras pesadas. Los colores semánticos
   (verde/rojo/azul/ámbar) solo comunican estado. */

/* Fuentes servidas por el propio panel (OFL 1.1, ver /fonts/OFL.txt). */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/outfit-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/outfit-latin-ext-wght-normal.woff2') format('woff2-variations'), url('/fonts/outfit-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Color: blanco + negro + grises neutros */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #ececec;
  --border: #e3e3e3;
  --border-soft: #ededed;
  --border-strong: #111111;
  --text: #111111;
  --text-secondary: #555555;
  --text-muted: #8c8c8c;
  --accent: #111111;
  --accent-contrast: #ffffff;

  /* Compatibilidad: el JS usa --purple* en estilos inline; ahora son negro/gris */
  --purple: #111111;
  --purple-bright: #111111;
  --purple-deep: #111111;
  --purple-tint: #f3f3f3;

  /* Estado (único uso del color) */
  --green: #16803c;
  --green-tint: #eef7f1;
  --red: #c62828;
  --red-tint: #fdf1f1;
  --blue: #1d4ed8;
  --blue-tint: #eff4ff;
  --yellow: #b45309;
  --yellow-tint: #fdf6ea;
  --pink: #111111;

  /* Forma y espacio fluidos: se adaptan sin saltos entre dispositivos */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-width: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --space: clamp(16px, 3vw, 28px);
  --header-h: 64px;
  --bottomnav-h: 68px;

  --font: 'Outfit', Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-purple: none;
  --red-border: #e5b4b4;
  --border-hover: #c9c9c9;
  --accent-hover: #2b2b2b;
  --glass: rgba(255, 255, 255, .92);
  --shimmer: rgba(255, 255, 255, .7);
  --fill-soft: rgba(0, 0, 0, .05);
  --ease: .18s ease;
}


/* ── Tema oscuro: elegido a mano (data-theme="dark") o del sistema si no hay elección ── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e10;
  --bg-soft: #151518;
  --bg-raised: #18181b;
  --surface: #18181b;
  --surface-2: #232328;
  --surface-3: #303036;
  --border: #2c2c31;
  --border-soft: #232327;
  --border-strong: #ededed;
  --text: #ededed;
  --text-secondary: #b4b4ba;
  --text-muted: #85858d;
  --accent: #ededed;
  --accent-contrast: #111111;
  --purple: #ededed;
  --purple-bright: #ededed;
  --purple-deep: #ededed;
  --purple-tint: #232327;
  --green: #4ade80;
  --green-tint: #12261a;
  --red: #f87171;
  --red-tint: #2a1414;
  --blue: #7aa2ff;
  --blue-tint: #141c33;
  --yellow: #fbbf24;
  --yellow-tint: #2a2010;
  --pink: #ededed;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .5);
  --red-border: #6b2a2a;
  --border-hover: #3a3a40;
  --accent-hover: #cfcfcf;
  --glass: rgba(14, 14, 16, .9);
  --shimmer: rgba(255, 255, 255, .08);
  --fill-soft: rgba(255, 255, 255, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0e0e10;
  --bg-soft: #151518;
  --bg-raised: #18181b;
  --surface: #18181b;
  --surface-2: #232328;
  --surface-3: #303036;
  --border: #2c2c31;
  --border-soft: #232327;
  --border-strong: #ededed;
  --text: #ededed;
  --text-secondary: #b4b4ba;
  --text-muted: #85858d;
  --accent: #ededed;
  --accent-contrast: #111111;
  --purple: #ededed;
  --purple-bright: #ededed;
  --purple-deep: #ededed;
  --purple-tint: #232327;
  --green: #4ade80;
  --green-tint: #12261a;
  --red: #f87171;
  --red-tint: #2a1414;
  --blue: #7aa2ff;
  --blue-tint: #141c33;
  --yellow: #fbbf24;
  --yellow-tint: #2a2010;
  --pink: #ededed;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .5);
  --red-border: #6b2a2a;
  --border-hover: #3a3a40;
  --accent-hover: #cfcfcf;
  --glass: rgba(14, 14, 16, .9);
  --shimmer: rgba(255, 255, 255, .08);
  --fill-soft: rgba(255, 255, 255, .06);
  }
}
/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  min-width: 300px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-width: 300px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
svg { flex: 0 0 auto; }
::selection { color: var(--accent-contrast); background: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; border-radius: 4px; }

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-fill { fill: currentColor; stroke: none; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link:focus {
  position: fixed; z-index: 1000; top: 12px; left: 12px;
  padding: 10px 16px; border-radius: var(--radius-sm); color: var(--accent-contrast); background: var(--accent);
}
/* Decoración ambiental anterior: eliminada en el diseño minimalista */
.ambient { display: none; }
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ── Cabecera ───────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 20px;
  width: 100%; min-height: var(--header-h);
  padding: calc(8px + env(safe-area-inset-top)) max(var(--gutter), calc((100vw - var(--max-width)) / 2)) 8px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--glass);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; min-width: max-content; }
.brand-mark {
  display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center;
  border-radius: 10px; color: var(--accent-contrast); background: var(--accent);
}
.brand-glyph { font-size: 18px; line-height: 1; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.brand-name em { font-style: normal; }
.brand-tagline { margin-top: 2px; color: var(--text-muted); font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.header-links, .desktop-app-nav { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: center; gap: 2px; }
.header-link {
  display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 12px;
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: color var(--ease), background var(--ease);
}
.header-link .icon { width: 15px; height: 15px; }
.header-link:hover { color: var(--text); background: var(--surface-2); }
.header-link.is-active { color: var(--text); font-weight: 700; background: var(--surface-2); }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }

.icon-button {
  position: relative; display: inline-grid; width: 40px; height: 40px; place-items: center;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); cursor: pointer; transition: all var(--ease);
}
.icon-button .icon { width: 19px; height: 19px; }
.icon-button:hover { border-color: var(--border); color: var(--text); background: var(--surface-2); }
.notification-count {
  position: absolute; top: 1px; right: 0; display: grid; min-width: 17px; height: 17px; padding: 0 4px;
  place-items: center; border: 2px solid var(--surface); border-radius: 99px; color: var(--accent-contrast); background: var(--accent);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
}
.profile-button {
  display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 3px 10px 3px 4px;
  border: 1px solid var(--border); border-radius: 99px; background: var(--surface); cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.profile-button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.profile-button .icon { width: 14px; height: 14px; color: var(--text-muted); }
.avatar {
  display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center;
  border-radius: 50%; color: var(--accent-contrast); background: var(--accent); font-size: 11px; font-weight: 700;
}
.profile-name { max-width: 110px; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.uhamburger.mobile-menu-toggle { display: none; }
.service-pill, .live-chip, .hero-version, .live-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--border); border-radius: 99px; color: var(--text-secondary);
  background: var(--surface); font-size: 11px; font-weight: 600; white-space: nowrap;
}
.live-chip .dot, .live-badge i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--text-muted); }
.live-chip.is-live, .service-pill { color: var(--green); border-color: var(--border); }
.live-chip.is-live .dot, .live-badge i { background: var(--green); }
.live-chip.is-off { color: var(--red); }
.live-chip.is-off .dot { background: var(--red); }
.pulse-dot { position: relative; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--green); }

/* ── Contenido general ──────────────────────────────────────────── */
.main-content {
  width: min(var(--max-width), calc(100% - (var(--gutter) * 2)));
  flex: 1; margin: 0 auto; padding: clamp(22px, 4vw, 40px) 0 64px; outline: none;
}
.page-content { animation: page-in .22s ease both; }
/* Pie al final de la pantalla en páginas cortas (clase is-short-page, la pone layout.js solo si
 * la página no llena la pantalla; las largas no cambian). El hueco (mínimo 44px) crece y lo empuja abajo. */
.main-content.is-short-page { display: flex; flex-direction: column; }
.main-content.is-short-page > .page-content { flex: 1 0 auto; display: flex; flex-direction: column; }
.main-content.is-short-page > .page-content::after { content: ''; order: 1; flex: 1 0 44px; }
.main-content.is-short-page > .page-content > .page-footer { order: 2; margin-top: 0; }
/* Asistente de Crear bot: el pie está dentro de .wizard-wrap. */
.main-content.is-short-page > .page-content > .wizard-wrap { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; }
.main-content.is-short-page > .page-content > .wizard-wrap::after { content: ''; order: 1; flex: 1 0 44px; }
.main-content.is-short-page > .page-content > .wizard-wrap > .page-footer { order: 2; margin-top: 0; }
.main-content.is-short-page > .page-content:has(> .wizard-wrap)::after { content: none; }
.page-content.no-enter { animation: none; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.section-block { margin-top: clamp(36px, 6vw, 64px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading.center { display: block; text-align: center; }
.section-kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 1.2; text-transform: uppercase;
}
.section-kicker .icon, .eyebrow .icon { width: 14px; height: 14px; color: var(--text); }
.section-title { margin: 8px 0 0; color: var(--text); font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.section-copy { max-width: 640px; margin: 9px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.section-heading.center .section-copy { margin-right: auto; margin-left: auto; }
.gradient-text { color: var(--text); }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.purple { color: var(--text); font-weight: 700; }
.green { color: var(--green); }
.red { color: var(--red); }
.blue { color: var(--blue); }
.yellow { color: var(--yellow); }
.mono { font-family: var(--mono); }
code { font-family: var(--mono); }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-hover { transition: border-color var(--ease); }
@media (hover: hover) { .card-hover:hover { border-color: var(--border-hover); } }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { margin: 8px 0 0; font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.page-heading p { max-width: 660px; margin: 9px 0 0; color: var(--text-secondary); font-size: 15px; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Botones y formularios ──────────────────────────────────────── */
.btn, .glow-btn {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: var(--surface); cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}
.btn .icon, .glow-btn .icon { width: 17px; height: 17px; }
.btn:hover, .glow-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn:active, .glow-btn:active { transform: translateY(1px); }
.btn-primary, .glow-btn { border-color: var(--border-strong); color: var(--accent-contrast); background: var(--accent); box-shadow: none; }
.btn-primary:hover, .glow-btn:hover { color: var(--accent-contrast); background: var(--accent-hover); border-color: var(--accent-hover); }
.glow-btn::after { display: none; }
.glow-btn-soft { min-height: 42px; padding: 0 16px; font-size: 13px; }
.btn-quiet { border-color: transparent; color: var(--text-secondary); background: transparent; }
.btn-quiet:hover { border-color: var(--border); color: var(--text); background: var(--surface-2); }
.btn-outline { color: var(--text); background: var(--surface); }
.btn-danger { border-color: var(--red-border); color: var(--red); background: var(--surface); }
.btn-danger:hover { border-color: var(--red); color: var(--accent-contrast); background: var(--red); }
.btn-large { min-height: 50px; padding: 0 24px; font-size: 15px; }
.btn-small { min-height: 38px; padding: 0 13px; border-radius: 10px; font-size: 12.5px; }
.btn-full { width: 100%; }
.btn:disabled, .glow-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.field { display: grid; gap: 7px; min-width: 0; }
.field-label { color: var(--text); font-size: 13.5px; font-weight: 600; }
.field-label .icon { width: 15px; height: 15px; vertical-align: -2px; }
.field-hint { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.text-input, .select-input, .text-area {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  outline: 0; color: var(--text); background: var(--surface); font-size: 15px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.text-input::placeholder, .text-area::placeholder { color: var(--text-muted); opacity: 1; }
.text-input:focus, .select-input:focus, .text-area:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--fill-soft); }
.select-input {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' 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 14px center;
}
.select-input option { color: var(--text); background: var(--surface); }
.select-input.select-small { width: auto; min-height: 38px; padding: 0 32px 0 11px; border-radius: 10px; background-position: right 9px center; font-size: 12.5px; }
.text-area { min-height: 120px; padding-top: 12px; resize: vertical; }
.mono-input { font-family: var(--mono); font-size: 12.5px; }

.badge{
  display: inline-grid; min-width: 22px; height: 20px; place-items: center; padding: 0 7px;
  border-radius: 99px; color: var(--text-secondary); background: var(--surface-2);
  font-family: var(--mono); font-size: 10px; font-weight: 600;
}
.status-badge, .status-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  border: 1px solid var(--border); border-radius: 99px; color: var(--green); background: var(--green-tint);
  font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.status-badge .pulse-dot, .status-tag .pulse-dot { width: 6px; height: 6px; flex-basis: 6px; }
.status-badge.status-offline { color: var(--text-muted); background: var(--surface-2); }
.status-badge.status-offline .pulse-dot { background: var(--text-muted); }
.status-badge.status-error { color: var(--red); background: var(--red-tint); }
.status-badge.status-error .pulse-dot { background: var(--red); }
.status-badge.status-online { color: var(--green); background: var(--green-tint); }

/* ── Landing ────────────────────────────────────────────────────── */
.landing-page { padding-bottom: 8px; }
.landing-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center; gap: clamp(28px, 5vw, 56px);
  padding: clamp(28px, 6vw, 72px) 0 clamp(24px, 4vw, 44px);
}
.landing-hero-copy { max-width: 640px; min-width: 0; }
.hero-version .pulse-dot { width: 6px; height: 6px; flex-basis: 6px; }
.landing-title { max-width: 640px; margin: 20px 0 16px; color: var(--text); font-size: clamp(38px, 6vw, 64px); font-weight: 750; letter-spacing: -.04em; line-height: 1.04; }
.landing-title .title-line { display: block; }
.landing-lede { max-width: 560px; margin: 0; color: var(--text-secondary); font-size: clamp(15px, 1.6vw, 17.5px); line-height: 1.7; }
.landing-lede strong { color: var(--text); font-weight: 650; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-footnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 20px; color: var(--text-muted); font-size: 12.5px; }
.hero-footnote span { display: inline-flex; align-items: center; gap: 6px; }
.hero-footnote .icon { width: 14px; height: 14px; color: var(--text); }

.hero-showcase { min-width: 0; }
.orbit, .float-chip { display: none; }
.showcase-window { width: min(100%, 440px); margin-left: auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.showcase-top { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.showcase-title { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.showcase-title .icon { width: 16px; height: 16px; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); }
.showcase-body { padding: 18px; }
.showcase-bot { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-soft); }
.showcase-bot > span:nth-child(2) { min-width: 0; }
.bot-orb { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: var(--radius); color: var(--accent-contrast); background: var(--accent); }
.bot-orb .icon { width: 23px; height: 23px; }
.showcase-bot strong { display: block; font-size: 14px; }
.showcase-bot small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11.5px; }
.showcase-bot .status-tag { margin-left: auto; }
.showcase-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.showcase-stat { padding: 11px 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); }
.showcase-stat b { display: block; color: var(--text); font-family: var(--mono); font-size: 17px; letter-spacing: -.02em; }
.showcase-stat span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.showcase-connection { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text-secondary); background: var(--surface-2); font-size: 11.5px; }
.showcase-connection .icon { width: 16px; height: 16px; color: var(--text); }
.showcase-connection b { color: var(--text); }

.landing-proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 20px; }
.proof-card { display: flex; min-height: 84px; align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.proof-card .icon-wrap, .icon-wrap { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; color: var(--text); background: var(--surface-2); }
.proof-card .icon-wrap .icon, .icon-wrap .icon { width: 18px; height: 18px; }
.proof-card strong { display: block; color: var(--text); font-family: var(--mono); font-size: 19px; line-height: 1.15; overflow-wrap: anywhere; }
.proof-card span:last-child { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.steps-grid, .benefits-grid, .stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-card, .benefit-card, .stack-card { padding: 22px; }
.step-number, .benefit-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface-2); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.benefit-icon .icon { width: 20px; height: 20px; }
.step-card h3, .benefit-card h3 { margin: 16px 0 7px; font-size: 16.5px; font-weight: 700; }
.step-card p, .benefit-card p { margin: 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.7; }
.stack-card { display: flex; min-height: 104px; align-items: center; gap: 14px; }
.stack-symbol { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface-2); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.stack-card strong { display: block; font-size: 14px; }
.stack-card small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }

.premium-panel { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 28px; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.premium-heading { display: flex; align-items: center; gap: 12px; }
.premium-heading h3 { margin: 0; font-size: 21px; }
.premium-label { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.premium-content p { max-width: 600px; margin: 16px 0; color: var(--text-secondary); font-size: 14px; line-height: 1.75; }
.premium-perks { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.premium-perks li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.premium-perks .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--text); }
.premium-includes { padding: 18px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-soft); }
.premium-includes h4 { margin: 0 0 12px; color: var(--text-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.premium-note { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.premium-note p { margin: 0; color: var(--text-secondary); font-size: 12.5px; }
.official-methods { display: grid; gap: 8px; }
.official-method { display: flex; align-items: center; justify-content: space-between; padding: 12px 13px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 600; }
.official-method span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.official-method .icon { width: 16px; height: 16px; }
.official-method span:last-child { color: var(--text-muted); font-size: 10px; font-weight: 500; }

.faq-list { display: grid; max-width: 820px; gap: 8px; margin: 0 auto; }
.faq-item { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-item summary { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { width: 18px; height: 18px; flex: 0 0 18px; color: var(--text-muted); content: '+'; font-size: 21px; font-weight: 400; line-height: 18px; text-align: center; }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { max-width: 720px; padding: 0 17px 17px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.7; }

.landing-cta { padding: clamp(28px, 5vw, 44px) clamp(18px, 4vw, 34px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft); text-align: center; }
.landing-cta h2 { margin: 0; font-size: clamp(24px, 3.6vw, 36px); font-weight: 700; letter-spacing: -.03em; }
.landing-cta p { max-width: 620px; margin: 11px auto 21px; color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.landing-cta .landing-actions { justify-content: center; margin-top: 0; }
.landing-cta .section-kicker { justify-content: center; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 56px; padding: 22px 0 10px; border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: 11.5px; }
.site-footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-weight: 600; }
.site-footer-brand .brand-mark { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; }
.site-footer-brand .brand-glyph { font-size: 14px; }
.site-footer-brand .brand-copy { display: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a:hover, .page-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 44px; padding: 20px 0 6px; border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: 11px; }
.page-footer > span:last-child { display: inline-flex; flex-wrap: wrap; gap: 14px; }
.page-footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.page-footer .icon { width: 14px; height: 14px; }

/* ── Panel: inicio ──────────────────────────────────────────────── */
.desktop-app-nav { justify-content: center; }
.bottom-navigation { display: none; }
.welcome-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 26px;
  padding: clamp(22px, 4vw, 36px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft);
}
.welcome-copy { max-width: 640px; min-width: 0; }
.welcome-copy h1 { margin: 11px 0 8px; color: var(--text); font-size: clamp(32px, 5vw, 52px); font-weight: 750; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; }
.welcome-copy p { max-width: 560px; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.welcome-emblem { display: grid; width: clamp(84px, 12vw, 128px); height: clamp(84px, 12vw, 128px); place-items: center; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--accent-contrast); background: var(--accent); }
.welcome-emblem .icon { width: 44%; height: 44%; }

.info-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 14px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.info-symbol { display: grid; width: 44px; height: 44px; place-items: center; border-radius: var(--radius); color: var(--text); background: var(--surface-2); }
.info-symbol .icon { width: 21px; height: 21px; }
.info-banner h2 { margin: 0; font-size: 15px; font-weight: 700; }
.info-banner p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12.5px; line-height: 1.6; }
.info-banner .btn { min-width: 140px; }

.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metrics-grid-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-card { position: relative; min-width: 0; min-height: 128px; padding: 17px 18px; }
.metric-label { display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.metric-label .icon { width: 15px; height: 15px; color: var(--text-muted); }
.metric-value { display: block; margin-top: 11px; color: var(--text); font-family: var(--mono); font-size: clamp(24px, 3vw, 32px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.metric-note { display: block; margin-top: 7px; color: var(--text-muted); font-size: 11.5px; overflow-wrap: anywhere; }
.metric-indicator { position: absolute; top: 17px; right: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shortcut-card { display: flex; min-height: 100px; align-items: center; gap: 15px; padding: 17px 19px; }
.shortcut-card > span:nth-child(2) { min-width: 0; }
.shortcut-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: var(--radius); color: var(--text); background: var(--surface-2); }
.shortcut-icon .icon { width: 21px; height: 21px; }
.shortcut-card strong { display: block; font-size: 15px; font-weight: 700; }
.shortcut-card small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 12.5px; }
.shortcut-arrow { margin-left: auto; color: var(--text-muted); }
.shortcut-arrow .icon { width: 19px; height: 19px; }
.uv-card .shortcut-icon { color: var(--text); background: var(--surface-2); }
.uv-card .shortcut-reveal { display: block; }

.collaborator-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.collaborator-card { display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; padding: 17px; text-align: center; }
.collaborator-avatar { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 50%; color: var(--accent-contrast); background: var(--accent); font-size: 18px; font-weight: 700; }
.collaborator-card strong { margin-top: 10px; font-size: 13px; }
.collaborator-card small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

/* ── Asistente de creación / vinculación ────────────────────────── */
.wizard-wrap { max-width: 720px; margin: 0 auto; }
.stepper { position: relative; display: flex; align-items: center; justify-content: space-between; margin: 4px 0 26px; padding: 0 2px; }
.stepper-track { position: absolute; top: 50%; right: 34px; left: 34px; height: 2px; overflow: hidden; border-radius: 9px; background: var(--surface-3); transform: translateY(-50%); }
.stepper-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.stepper-item { position: relative; z-index: 1; display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 2px solid var(--border); border-radius: 50%; color: var(--text-muted); background: var(--surface); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.stepper-item.is-active { border-color: var(--border-strong); color: var(--text); }
.stepper-item.is-complete { border-color: var(--border-strong); color: var(--accent-contrast); background: var(--accent); }
.stepper-item .icon { width: 18px; height: 18px; }
.wizard-card { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.wizard-step-label { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px; color: var(--text-secondary); background: var(--surface-2); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.wizard-title { margin: 18px 0 9px; color: var(--text); font-size: clamp(27px, 4vw, 38px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.wizard-description { margin: 0 0 26px; color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.wizard-form { display: grid; gap: 20px; }
.wizard-two-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 13px; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 26px; }
.wizard-actions .btn { min-width: 0; min-height: 50px; flex: 1; font-size: 14.5px; }
.wizard-actions.is-single .btn { width: 100%; }
.wizard-footer-note { margin: 16px 0 0; color: var(--text-muted); font-size: 10.5px; text-align: center; }
.server-note { display: flex; gap: 8px; margin-top: -10px; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.server-note .icon { width: 15px; height: 15px; margin-top: 2px; }

.instance-select-wrap { position: relative; }
.instance-select-trigger, .pairing-option {
  display: flex; width: 100%; min-height: 68px; align-items: center; gap: 13px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface);
  cursor: pointer; text-align: left; transition: border-color var(--ease), background var(--ease);
}
.instance-select-trigger:hover, .instance-select-trigger.is-expanded, .pairing-option:hover { border-color: var(--border-strong); }
.instance-select-trigger > .icon { width: 19px; height: 19px; margin-left: auto; color: var(--text-muted); transition: transform var(--ease); }
.instance-select-trigger.is-expanded > .icon { transform: rotate(180deg); }
.option-icon, .pairing-option-icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: var(--radius); color: var(--text); background: var(--surface-2); }
.option-icon .icon, .pairing-option-icon .icon { width: 21px; height: 21px; }
.option-icon.is-muted { color: var(--text-muted); }
.option-copy { min-width: 0; }
.option-copy strong, .pairing-option strong { display: block; font-size: 15px; font-weight: 700; }
.option-copy small, .pairing-option small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.instance-options { display: grid; gap: 6px; margin-top: 8px; padding: 7px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lift); }
.instance-option { display: flex; min-height: 66px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.instance-option:hover, .instance-option.is-selected { border-color: var(--border); background: var(--surface-2); }
.instance-option.is-disabled { opacity: .5; }
.instance-option .option-icon { width: 40px; height: 40px; flex-basis: 40px; }
.instance-option .option-copy strong { font-size: 14px; }
.instance-option .option-copy small { font-size: 11px; }
.pairing-methods { display: grid; gap: 9px; }
.pairing-option > span:last-child { min-width: 0; }
.pairing-option.is-selected { border-color: var(--border-strong); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pairing-option.is-selected .pairing-option-icon { color: var(--accent-contrast); background: var(--accent); }

.callout { display: flex; align-items: flex-start; gap: 11px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-secondary); background: var(--bg-soft); font-size: 13px; line-height: 1.65; }
.callout .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--text); }
.callout strong { color: var(--text); }
.token-note { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.token-links { display: flex; flex-wrap: wrap; gap: 8px; }
.token-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); background: var(--surface); font-size: 11px; font-weight: 600; }
.token-link:hover { border-color: var(--border-strong); color: var(--text); }
.token-link .icon { width: 14px; height: 14px; }
.link-code-card { display: grid; justify-items: center; gap: 15px; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.pairing-code-display { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(4px, 1vw, 8px); color: var(--text); font-family: var(--mono); font-size: clamp(18px, 4vw, 27px); font-weight: 600; }
.pairing-code-display span { display: grid; min-width: 34px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pairing-code-display b { color: var(--text-muted); font-weight: 400; }
.expiry-label { color: var(--text-muted); font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.instruction-list { display: grid; gap: 11px; margin: 4px 0 0; padding: 0; list-style: none; }
.instruction-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.instruction-number { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface-2); font-family: var(--mono); font-size: 11px; }
.instruction-list strong { color: var(--text); }
.qr-frame { display: grid; width: min(100%, 232px); min-height: 212px; margin: 0 auto; place-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.qr-frame img { width: min(190px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; }
.link-error, .modal-error { color: var(--red); }
.link-error { padding: 13px 14px; border: 1px solid var(--red-border); border-radius: var(--radius); background: var(--red-tint); font-size: 12.5px; line-height: 1.6; }
.success-panel { display: grid; justify-items: center; padding: 12px 0; text-align: center; }
.success-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; color: var(--accent-contrast); background: var(--green); }
.success-icon .icon { width: 28px; height: 28px; }
.success-panel h2 { margin: 17px 0 6px; font-size: 25px; }
.success-panel p { max-width: 480px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.success-panel .wizard-actions { width: 100%; }

.pairing-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pairing-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pairing-card-head h3 { margin: 0; font-size: 15px; }
.pairing-card-head h3 .icon { vertical-align: -3px; margin-right: 5px; }
.pairing-card-head small { color: var(--text-muted); font-size: 11.5px; }
.pairing-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.pairing-code { display: inline-flex; align-items: center; padding: 11px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); font-family: var(--mono); font-size: clamp(19px, 5vw, 28px); font-weight: 600; letter-spacing: .18em; color: var(--text); overflow-wrap: anywhere; }
.pairing-empty { padding: 15px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-secondary); background: var(--bg-soft); font-size: 12.5px; text-align: center; }
.pairing-progress { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 11.5px; }
.pairing-progress .track, .pairing-progress .pairing-progress-track { position: relative; width: 110px; height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.pairing-progress .fill { position: absolute; inset: 0 auto 0 0; width: var(--pairing-progress, 100%); border-radius: 99px; background: var(--accent); transition: width 1s linear; }
.pairing-steps { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; color: var(--text-secondary); font-size: 12.5px; }
.pairing-steps li { display: flex; gap: 8px; align-items: flex-start; }
.pairing-steps b { color: var(--text); }
.pairing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pairing-wa-note { padding: 11px 13px; border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 8px; color: var(--text-secondary); background: var(--green-tint); font-size: 12px; line-height: 1.6; }
.pairing-wa-note code { color: var(--text); font-weight: 700; }
.pairing-stage { display: grid; justify-items: center; gap: 8px; padding: 16px 0 6px; }
.pairing-stage p { margin: 0; color: var(--text-secondary); font-size: 12.5px; text-align: center; }

/* Loader sobrio (sustituye al átomo decorativo) */
.atom-loader { display: grid; width: 44px; height: 44px; place-items: center; }
.atom-loader .react-star { position: relative; width: 36px; height: 36px; border: 3px solid var(--surface-3); border-top-color: var(--border-strong); border-radius: 50%; animation: spin .8s linear infinite; }
.atom-loader .nucleus, .atom-loader .electron { display: none; }
.loading-panel { display: grid; justify-items: center; gap: 11px; padding: 22px; color: var(--text-secondary); font-size: 12.5px; }
.loading-spinner, .loader-dot { width: 34px; height: 34px; border: 3px solid var(--surface-3); border-top-color: var(--border-strong); border-radius: 50%; animation: spin .8s linear infinite; }
.loader-dot { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bots ───────────────────────────────────────────────────────── */
.bots-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; margin: 20px 0; }
.summary-tile { padding: 16px 18px; }
.summary-tile strong { display: block; margin-top: 6px; font-family: var(--mono); font-size: 23px; font-weight: 600; overflow-wrap: anywhere; }
.summary-tile span { color: var(--text-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.summary-tile span { display: flex; align-items: center; gap: 7px; }
.summary-tile strong em { margin-left: 3px; font-style: normal; font-size: .62em; font-weight: 500; color: var(--text-muted); }
.summary-tile small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.summary-tile.is-ok strong { color: var(--green); }
.summary-tile.is-warn strong { color: var(--yellow); }
.summary-tile.is-warn { border-color: color-mix(in srgb, var(--yellow) 35%, var(--border, transparent)); }
.summary-tile.is-muted strong { color: var(--text); }
.bot-list { display: grid; gap: 10px; }
.bot-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 17px; }
.bot-card-icon { display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface-2); }
.bot-card-icon .icon { width: 25px; height: 25px; }
.bot-card-main { min-width: 0; }
.bot-card-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.bot-card-title h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.bot-card-main p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12.5px; overflow-wrap: anywhere; }
.bot-card-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 9px; color: var(--text-muted); font-size: 11px; }
.bot-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.bot-card-meta .icon { width: 13px; height: 13px; }
.bot-card-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.empty-state, .endpoint-empty, .ticket-empty { padding: 36px 20px; color: var(--text-muted); text-align: center; }
.empty-state { display: grid; min-height: 300px; justify-items: center; align-content: center; border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--bg-soft); }
.empty-state-icon { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); background: var(--surface); }
.empty-state-icon .icon { width: 26px; height: 26px; }
.empty-state h2 { margin: 15px 0 5px; color: var(--text); font-size: 19px; }
.empty-state p, .ticket-empty p { max-width: 420px; margin: 0 0 17px; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.ticket-empty .icon { width: 32px; height: 32px; margin: 0 auto 11px; color: var(--text-muted); }
.ticket-empty strong { display: block; color: var(--text); font-size: 16px; }
.ticket-empty p { margin: 4px auto 0; }

/* ── Métricas ───────────────────────────────────────────────────── */
.telemetry-card { position: relative; min-width: 0; padding: 19px; }
.telemetry-card .metric-value { font-family: var(--font); font-size: 28px; letter-spacing: -.03em; }
.progress-track { height: 6px; overflow: hidden; margin-top: 17px; border-radius: 99px; background: var(--surface-3); }
.progress-value { height: 100%; border-radius: inherit; background: var(--accent); }
.progress-value.green-fill { background: var(--green); }
.chart-card { margin-top: 12px; padding: 20px; }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.chart-card-header strong { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.chart-card-header strong .icon { width: 18px; height: 18px; }
.chart-card-header span { color: var(--text-muted); font-family: var(--mono); font-size: 10px; }
.chart-svg { width: 100%; height: auto; min-height: 170px; overflow: visible; }
.chart-grid { stroke: var(--border-soft); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--border-strong); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.chart-area { fill: var(--fill-soft); }
.chart-dot { fill: var(--surface); stroke: var(--border-strong); stroke-width: 2.5; }
.service-list { display: grid; padding: 6px 18px; }
.service-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.service-row:last-child { border-bottom: 0; }
.service-row > * { min-width: 0; overflow-wrap: anywhere; }
.service-info { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; }
.service-health { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; grid-column: 1 / -1; }
.service-health i { height: 13px; border-radius: 3px; background: var(--green); }
.service-health i.down { background: var(--red); }
.service-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; grid-column: 1 / -1; color: var(--text-muted); font-size: 10.5px; }
.ranking-list { overflow: hidden; }
.ranking-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
.ranking-row:last-child { border: 0; }
.ranking-row code { overflow-wrap: anywhere; }
.rank-number { color: var(--text-muted); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ranking-bar-wrap { display: block; height: 4px; overflow: hidden; margin-top: 6px; border-radius: 99px; background: var(--surface-3); }
.ranking-bar { height: 100%; border-radius: inherit; background: var(--accent); }

/* ── Tienda ─────────────────────────────────────────────────────── */
.store-hero, .ticket-hero { padding: clamp(22px, 4vw, 32px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft); }
.store-hero { text-align: center; }
.store-hero .section-kicker, .store-hero h1 { justify-content: center; }
.store-hero h1, .ticket-hero h1 { margin: 13px 0 8px; font-size: clamp(30px, 5vw, 48px); font-weight: 750; letter-spacing: -.04em; line-height: 1.08; }
.store-hero p, .ticket-hero p { max-width: 620px; margin: 0 auto; color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.ticket-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; text-align: left; }
.ticket-hero p { margin: 0; }
.store-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 19px; }
.segment-control, .code-tabs, .modal-tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.segment-control button, .code-tabs button, .modal-tabs button { min-height: 36px; flex: 1; padding: 0 12px; border: 0; border-radius: 9px; color: var(--text-muted); background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.segment-control button.is-active, .code-tabs button.is-active, .modal-tabs button.is-active { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.segment-control { display: inline-flex; border-radius: 99px; }
.segment-control button { border-radius: 99px; }

.search-box { position: relative; display: block; min-width: 0; }
.search-box .icon { position: absolute; top: 50%; left: 15px; width: 19px; height: 19px; color: var(--text-muted); transform: translateY(-50%); pointer-events: none; }
.search-box .text-input { min-height: 52px; padding-left: 47px; font-size: 14.5px; }
.command-search { display: flex; gap: 8px; align-items: center; min-height: 48px; padding: 0 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.command-search .icon { width: 16px; height: 16px; color: var(--text-muted); }
.command-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); outline: none; font-size: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid var(--border); border-radius: 99px; color: var(--text-secondary); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; transition: all var(--ease); }
.filter-chip .icon { width: 13px; height: 13px; }
.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip.is-active { border-color: var(--border-strong); color: var(--accent-contrast); background: var(--accent); }
.category-select-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.category-select-row .select-input { min-height: 46px; } .edit-tabs::-webkit-scrollbar { display: none; }
.code-window { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.code-window-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); font-family: var(--mono); font-size: 10px; }
.code-window-top > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.traffic-lights { display: flex; gap: 5px; }
.traffic-lights i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-hover); }
.code-window pre { overflow: auto; max-height: 360px; margin: 0; padding: 14px; color: var(--text); font-family: var(--mono); font-size: 11px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.help-key { display: inline-flex; min-width: 20px; justify-content: center; padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); background: var(--surface-2); font-family: var(--mono); font-size: 11px; }
.copied-flash { animation: copied .4s ease; }
@keyframes copied { 45% { transform: scale(1.1); } }
.copy-feedback { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12px; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--shimmer), transparent); content: ''; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ── Endpoints funcionales / keys / owner ───────────────────────── */
.account-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-chip-user { display: flex; align-items: center; gap: 9px; padding: 5px 11px 5px 5px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.account-chip-user strong { display: block; font-size: 13px; }
.account-chip-user small { display: block; max-width: 190px; overflow: hidden; color: var(--text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; color: var(--accent-contrast); background: var(--accent); font-size: 11px; font-weight: 700; }
.usage-card { display: grid; gap: 2px; padding: 8px 15px; }

/* ── Tickets / perfil / comandos ────────────────────────────────── */
.ticket-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.ticket-stat, .stat-card { padding: 17px; }
.stat-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--text); background: var(--surface-2); }
.stat-icon .icon { width: 18px; height: 18px; }
.ticket-stat strong { display: block; margin-top: 11px; font-family: var(--mono); font-size: 24px; font-weight: 600; }
.ticket-stat span:last-child { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ticket-toolbar { display: flex; gap: 9px; margin: 16px 0; }
.ticket-toolbar .search-box { flex: 1; }
.ticket-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 15px; border-bottom: 1px solid var(--border-soft); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row strong { display: block; overflow-wrap: anywhere; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.profile-card { padding: 20px; }
.profile-card h2 { margin: 0 0 15px; font-size: 16px; }
.profile-key { display: flex; align-items: center; gap: 7px; padding: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); min-width: 0; }
.profile-key code { min-width: 0; flex: 1; overflow: hidden; color: var(--text); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.profile-details { display: grid; }
.profile-detail { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); color: var(--text-secondary); font-size: 12.5px; }
.profile-detail:last-child { border: 0; }
.profile-detail strong { color: var(--text); font-size: 12.5px; text-align: right; overflow-wrap: anywhere; }
.command-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 11px; align-items: start; }
.command-card { padding: 19px; }
.command-card h2 { margin: 0; font-size: 15px; }
.command-card[hidden], .command-pill[hidden], .command-item[hidden] { display: none; }
.command-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.command-pill { min-height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface-2); cursor: pointer; font-family: var(--mono); font-size: 11.5px; }
.command-pill:hover { border-color: var(--border-strong); background: var(--surface); }
.commands-summary { margin: 0 0 14px; color: var(--text-secondary); font-size: 13.5px; }
.commands-summary strong { color: var(--text); }
.command-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.command-list { margin-top: 6px; }
.command-item { padding: 11px 0; border-top: 1px solid var(--border-soft); }
.command-item:first-child { border-top: 0; padding-top: 6px; }
.command-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.command-item-head .command-pill { min-height: 34px; }
.command-args { font-family: var(--mono); font-size: 11px; color: var(--text-secondary); overflow-wrap: anywhere; }
.command-badge { margin-left: auto; padding: 2px 8px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); color: var(--text-secondary); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.command-desc { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.command-aliases { margin: 5px 0 0; color: var(--text-muted); font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
.command-aliases code { font-family: var(--mono); font-size: 11px; }

/* ── Drawer / modales / toasts ──────────────────────────────────── */
.overlay-layer { position: fixed; z-index: 200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.overlay-scrim { position: absolute; inset: 0; border: 0; background: rgba(17, 17, 17, .38); cursor: default; }
.menu-drawer { position: absolute; top: 0; right: 0; bottom: 0; display: flex; width: min(400px, 100%); flex-direction: column; overflow: auto; border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lift); animation: drawer-in .22s ease both; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
@keyframes drawer-in { from { opacity: .6; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.drawer-profile { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid var(--border-soft); background: var(--bg-soft); }
.drawer-profile .avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 15px; }
.drawer-profile-copy { flex: 1; min-width: 0; }
.drawer-profile-copy strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.drawer-profile-copy small { color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.drawer-close { align-self: flex-start; }
.drawer-section { padding: 14px 12px 6px; }
.drawer-section-label { display: flex; align-items: center; justify-content: space-between; margin: 0 9px 9px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.drawer-item { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text-secondary); cursor: pointer; text-align: left; transition: all var(--ease); }
.drawer-item:hover, .drawer-item.is-active { color: var(--text); background: var(--surface-2); }
.drawer-item.is-active { border-color: var(--border); font-weight: 600; }
.drawer-item-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.drawer-item-icon .icon { width: 19px; height: 19px; }
.drawer-item-copy { flex: 1; min-width: 0; }
.drawer-item-copy strong { display: block; font-size: 13px; font-weight: 700; }
.drawer-item-copy small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10.5px; }
.drawer-item > .icon { width: 15px; height: 15px; color: var(--text-muted); transform: rotate(-90deg); }
.drawer-bottom { margin-top: auto; padding: 15px 20px 22px; border-top: 1px solid var(--border-soft); }
.drawer-bottom p { margin: 0; color: var(--text-muted); font-size: 10.5px; text-align: center; }

.modal-layer { z-index: 230; }
.modal-card { position: relative; width: min(460px, 100%); max-height: 90vh; max-height: 90dvh; overflow: auto; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lift); animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 13px; right: 13px; z-index: 3; }
.modal-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 19px; }
.modal-brand .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
.modal-card h2 { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -.02em; padding-right: 36px; overflow-wrap: anywhere; }
.modal-description { margin: 0 0 18px; color: var(--text-secondary); font-size: 12.5px; line-height: 1.65; }
.modal-form { display: grid; gap: 13px; }
.modal-error { min-height: 17px; margin: 2px 0 0; font-size: 11.5px; text-align: center; }
.modal-switch { margin: 15px 0 0; color: var(--text-muted); font-size: 12px; text-align: center; }
.modal-switch button { padding: 0; border: 0; color: var(--text); background: none; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.modal-tabs { margin-bottom: 17px; }
.confirm-card { display: grid; gap: 13px; }
.confirm-card .confirm-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: var(--radius); color: var(--red); background: var(--red-tint); }
.confirm-card h2 { margin: 0; font-size: 19px; padding-right: 0; }
.confirm-card p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.confirm-card .confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.toast-stack { position: fixed; z-index: 400; top: calc(var(--header-h) + 12px); right: 16px; display: grid; width: min(360px, calc(100vw - 32px)); gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); box-shadow: var(--shadow-lift); font-size: 12.5px; line-height: 1.5; animation: toast-in .2s ease both; pointer-events: auto; overflow-wrap: anywhere; }
.toast::before { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 5px; border-radius: 50%; background: var(--accent); content: ''; }
.toast.toast-success::before { background: var(--green); }
.toast.toast-error::before { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Editor de bot ──────────────────────────────────────────────── */
.edit-modal-card { width: min(860px, calc(100vw - 24px)); max-height: 92vh; max-height: 92dvh; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
#modal-content:has(> .edit-modal-card) { width: min(860px, calc(100vw - 32px)); max-height: none; padding: 0; overflow: visible; border: 0; background: transparent; box-shadow: none; }
#modal-content > .edit-modal-card { width: 100% !important; max-height: min(92dvh, 920px) !important; }
.edit-modal-head { padding: 22px 22px 0; flex-shrink: 0; }
.edit-modal-head h2 { font-size: 21px; }
.edit-modal-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 12px; }
.edit-tabs { display: flex; gap: 5px; padding: 13px 18px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-soft); background: var(--surface); flex-shrink: 0; -webkit-overflow-scrolling: touch; }
.edit-tab-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.edit-tab-btn .icon { width: 14px; height: 14px; }
.edit-tab-btn.is-active { color: var(--text); border-bottom-color: var(--border-strong); }
.edit-tab-btn:hover { color: var(--text); }
.edit-content { flex: 1; overflow: auto; padding: 18px; display: grid; gap: 14px; align-content: start; }
.edit-section { display: grid; gap: 12px; }
.edit-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.edit-section-title .icon { width: 16px; height: 16px; }
.edit-card { padding: 15px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-soft); min-width: 0; }
.edit-card h4 { margin: 0 0 8px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.edit-card h4 .icon { width: 15px; height: 15px; }
.edit-card.is-cat-off { opacity: .65; border-style: dashed; }
.edit-prefixes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.edit-prefixes .pairing-option { min-height: 60px; justify-content: center; padding: 8px 0; text-align: center; }
.edit-prefixes .pairing-option strong { font-family: var(--mono); font-size: 19px; }
.edit-prefixes .pairing-option small { margin-top: 2px; font-size: 10px; }
.edit-footer { display: flex; gap: 9px; padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-soft); background: var(--surface); flex-shrink: 0; }
.edit-footer .btn { flex: 1; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 10px 11px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); min-width: 0; }
.toggle-row.is-disabled { opacity: .55; border-color: var(--red-border); background: var(--red-tint); }
.toggle-row-main { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; }
.toggle-row-main strong { font-size: 12px; }
.toggle-row-main small { color: var(--text-muted); font-size: 11px; display: block; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-switch { position: relative; width: 46px; height: 26px; flex: none; border-radius: 99px; background: var(--surface-3); cursor: pointer; transition: background .18s; border: 0; padding: 0; }
.toggle-switch.is-on { background: var(--accent); }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); transition: transform .18s; }
.toggle-switch.is-on::after { transform: translateX(20px); }
.toggle-switch:disabled { opacity: .45; cursor: not-allowed; }

/* Interruptor con checkbox real (formularios): mismo aspecto que .toggle-switch */
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.switch-field:hover { border-color: var(--border-hover); }
.switch-field-text { display: grid; gap: 2px; min-width: 0; }
.switch-field-text strong { color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.switch-field-text .field-hint { margin: 0; }
.switch-input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 46px; height: 26px; margin: 0; border: 0; border-radius: 99px; background: var(--surface-3); cursor: pointer; transition: background .18s; }
.switch-input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.switch-input:checked { background: var(--accent); }
.switch-input:checked::before { transform: translateX(20px); }
.switch-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-input:disabled { opacity: .45; cursor: not-allowed; }

.alias-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.alias-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.alias-chip button { display: grid; width: 17px; height: 17px; place-items: center; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--text); cursor: pointer; font-size: 10px; }
.alias-chip button:hover { background: var(--red); color: var(--accent-contrast); }
.alias-add { display: flex; gap: 7px; margin-top: 8px; }
.alias-add input { flex: 1; min-width: 0; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.category-card { position: relative; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; }
.category-card.is-custom { border-color: var(--border-strong); }
.category-card.is-disabled { opacity: .55; border-style: dashed; }
.category-card.is-disabled h5 { text-decoration: line-through; }
.category-card-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.category-card-head .cat-icon { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); font-size: 15px; }
.category-card h5 { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.category-card p { margin: 0; color: var(--text-muted); font-size: 11px; }
.category-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.style-card { position: relative; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.style-card.is-selected { border-color: var(--border-strong); box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--bg-soft); }
.style-card:hover { border-color: var(--border-strong); }
.style-card h5 { margin: 0 0 4px; font-size: 13px; padding-right: 20px; }
.style-card p { margin: 0 0 7px; color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.style-card .style-preview-badge, .style-preview-badge { display: inline-flex; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-muted); font-family: var(--mono); font-size: 9px; }
.menu-preview { max-height: 320px; overflow: auto; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); color: var(--text); font-family: var(--mono); font-size: 10px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.custom-cmd-form { display: grid; gap: 11px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.custom-cmd-list { display: grid; gap: 9px; }
.custom-cmd-item { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.custom-cmd-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
.custom-cmd-item-head strong { font-family: var(--mono); font-size: 12px; color: var(--text); }
.custom-cmd-item p { margin: 0; color: var(--text-secondary); font-size: 11px; overflow-wrap: anywhere; }
.banner-preview { display: grid; gap: 9px; margin-bottom: 11px; }
.banner-preview img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.banner-preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.banner-editor { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.banner-editor .field { display: grid; gap: 6px; }
.banner-editor input[type='file'].text-input { padding: 8px 10px; font-size: 11px; min-height: 48px; }
.banner-editor input[type='file'].text-input::file-selector-button { margin-right: 9px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 11px; cursor: pointer; }

/* Menú hamburguesa (landing en móvil) */
.uhamburger { display: inline-flex; align-items: center; }
.uhamburger input { display: none; }
.uhamburger .toggle { position: relative; display: flex; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1px solid transparent; border-radius: var(--radius-sm); }
.uhamburger .toggle:hover { border-color: var(--border); background: var(--surface-2); }
.uhamburger .bars { width: 20px; height: 2px; border-radius: 5px; background: var(--text); transition-duration: .25s; }
.uhamburger input:checked + .toggle #bar1 { transform: translateY(8px) rotate(45deg); }
.uhamburger input:checked + .toggle #bar2 { opacity: 0; }
.uhamburger input:checked + .toggle #bar3 { transform: translateY(-8px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════════════
   ADAPTACIÓN POR DISPOSITIVO
   ≥901px  escritorio / tablet horizontal: navegación superior
   ≤900px  tablet vertical y móvil: navegación inferior de app
   ≤640px  móvil: una columna, modales de hoja inferior, toasts abajo
   ≤400px  móvil pequeño: todo compacto sin desbordar
   ══════════════════════════════════════════════════════════════════ */

/* Escritorio ancho */
@media (min-width: 1440px) {
  :root { --max-width: 1180px; }
}

/* Portátil / tablet horizontal: la cabecera se compacta sin cortarse */
@media (max-width: 1120px) and (min-width: 901px) {
  .site-header { gap: 12px; }
  .desktop-app-nav .header-link { padding: 0 9px; gap: 5px; font-size: 12.5px; }
  .desktop-app-nav .header-link .icon { display: none; }
  .brand-tagline { display: none; }
  .profile-name { max-width: 70px; }
}
@media (max-width: 980px) and (min-width: 901px) {
  .is-app-header .brand-copy, .is-app-header .profile-name, .is-app-header .notification-button { display: none; }
  .is-app-header .live-chip span:last-child { display: none; }
  .is-app-header .live-chip { padding: 8px; }
}

/* Tablet vertical y móvil */
@media (max-width: 900px) {
  html { scroll-padding-bottom: calc(var(--bottomnav-h) + 24px + env(safe-area-inset-bottom)); }
  .site-header { gap: 10px; min-height: 60px; padding-right: max(var(--gutter), env(safe-area-inset-right)); padding-left: max(var(--gutter), env(safe-area-inset-left)); }
  .header-links, .desktop-app-nav { display: none; }
  .header-actions { margin-left: auto; gap: 6px; }
  .is-app-header .brand-copy { display: none; }
  .notification-button, .service-pill { display: none; }
  .profile-button { min-height: 40px; padding: 3px 8px 3px 3px; }
  .profile-button .avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .profile-name { display: none; }
  .uhamburger.mobile-menu-toggle { display: inline-flex; }
  .main-content { padding-bottom: calc(var(--bottomnav-h) + 40px + env(safe-area-inset-bottom)); }
  .main-content.is-wizard { padding-top: 12px; }
  .main-content.is-wizard .wizard-footer-note { display: none; }

  /* Menú desplegable de la landing */
  .landing-header .header-links.mobile-open {
    position: absolute; top: 100%; right: 0; left: 0; display: grid; gap: 2px;
    padding: 10px var(--gutter) 14px; border-bottom: 1px solid var(--border);
    background: var(--surface); box-shadow: var(--shadow-lift);
  }
  .landing-header .header-links.mobile-open .header-link { min-height: 46px; justify-content: flex-start; font-size: 14px; }

  /* Navegación inferior tipo app */
  .bottom-navigation {
    position: fixed; z-index: 90; right: 0; bottom: 0; left: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch;
    min-height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
    padding: 6px max(4px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    border-top: 1px solid var(--border); background: var(--glass);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .bottom-nav-item {
    position: relative; display: flex; min-width: 0; min-height: 52px; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; padding: 4px 2px;
    border: 0; border-radius: 10px; color: var(--text-muted); background: transparent; cursor: pointer;
    font-size: 9.5px; font-weight: 600; line-height: 1.15; text-align: center;
  }
  .bottom-nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav-item .icon { width: 21px; height: 21px; }
  .bottom-nav-item.is-active { color: var(--text); font-weight: 750; }
  .bottom-nav-item.is-active::before { position: absolute; top: -7px; width: 22px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); content: ''; }

  .landing-hero { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
  .showcase-window { margin: 0 auto; width: min(100%, 460px); }
  .landing-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid, .benefits-grid, .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premium-panel { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-hero { grid-template-columns: 1fr; padding: 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading-actions { width: 100%; }
  .page-heading-actions .btn { flex: 1; }
  .info-banner { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .info-banner > .btn { grid-column: 1 / -1; width: 100%; }
  .ticket-hero { align-items: flex-start; flex-direction: column; }
  .ticket-hero .btn { width: 100%; }
  .ticket-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

/* Móvil */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* 16px en campos: iOS no hace zoom automático al escribir */
  .text-input, .select-input, .text-area, .command-search input { font-size: 16px; }
  .landing-header .live-chip, .landing-header .header-panel-link { display: none; }
  .landing-title { font-size: clamp(34px, 11vw, 46px); }
  .landing-actions { display: grid; grid-template-columns: 1fr; }
  .landing-actions .btn { width: 100%; }
  .landing-cta .landing-actions { grid-template-columns: 1fr; }
  .hero-footnote { font-size: 11.5px; gap: 7px 13px; }
  .showcase-top, .showcase-body { padding: 13px; }
  .showcase-bot { padding: 11px; }
  .showcase-bot .status-tag { display: none; }
  .showcase-stat b { font-size: 15px; }
  .proof-card { min-height: 74px; padding: 12px; gap: 9px; }
  .proof-card strong { font-size: 17px; }
  .steps-grid, .benefits-grid, .stack-grid, .shortcut-grid { grid-template-columns: 1fr; }
  .step-card, .benefit-card { padding: 18px; }
  .section-heading.center { text-align: left; }
  .section-heading.center .section-copy { margin-left: 0; }
  .section-title { font-size: 26px; }
  .welcome-hero { grid-template-columns: 1fr; padding: 20px; }
  .welcome-emblem { display: none; }
  .welcome-copy h1 { font-size: 34px; }
  .welcome-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .welcome-actions .btn { padding: 0 10px; font-size: 13px; }
  .metric-card { min-height: 112px; padding: 14px; }
  .metric-value { font-size: 23px; }
  .metric-note { font-size: 10px; }
  .shortcut-card { min-height: 84px; padding: 13px; }
  .shortcut-icon { width: 43px; height: 43px; flex-basis: 43px; }
  .stepper-item { width: 38px; height: 38px; flex-basis: 38px; }
  .stepper-track { right: 30px; left: 30px; }
  .wizard-card { padding: 22px 17px; border-radius: var(--radius); }
  .wizard-title { font-size: 28px; margin-top: 16px; }
  .wizard-description { font-size: 13.5px; margin-bottom: 20px; }
  .wizard-actions { margin-top: 22px; gap: 8px; }
  .wizard-actions .btn { min-height: 50px; padding: 0 10px; font-size: 13px; }
  .pairing-code { font-size: 20px; letter-spacing: .13em; width: 100%; justify-content: center; }
  .pairing-actions .glow-btn, .pairing-actions .btn { flex: 1 1 100%; }
  .pairing-card-head { flex-direction: column; }
  .bot-card { grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 14px; }
  .bot-card-icon { width: 44px; height: 44px; }
  .bot-card-actions { grid-column: 1 / -1; justify-content: stretch; }
  .bot-card-actions .btn { flex: 1; white-space: nowrap; }
  .bot-card-actions .btn:first-child { flex-basis: 100%; }
  .summary-tile { padding: 13px; }
  .summary-tile strong { font-size: 19px; }
  .telemetry-card { padding: 15px; }
  .chart-card { padding: 14px; }
  .service-row .mono { overflow-wrap: anywhere; }
  .category-select-row { grid-template-columns: 1fr; }
  .endpoint-row { grid-template-columns: minmax(0, 1fr) auto; }
  .endpoint-row .method-badge { display: none; }
  .fn-endpoint-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fn-endpoint-head .method-badge, .fn-endpoint-head > .icon { display: none; }
  .fn-endpoint-head .tier-badge { grid-column: 3; }
  .key-form-grid { grid-template-columns: 1fr; }
  .usage-row { grid-template-columns: minmax(0, 1fr) auto; }
  .usage-row > span:nth-child(n + 3) { display: none; }
  .account-chip { width: 100%; }
  .account-chip .btn { flex: 1; }
  .catalog-note { flex-wrap: wrap; }
  .catalog-note .btn { flex: 1; }
  .ticket-toolbar { flex-direction: column; }
  .ticket-row { grid-template-columns: auto minmax(0, 1fr); }
  .ticket-row .status-badge { grid-column: 2; justify-self: start; }
  .page-footer { align-items: flex-start; flex-direction: column; }
  .toggle-row-main small { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; }
  .toggle-row { flex-wrap: wrap; }
  .menu-preview { font-size: 9px; }
  .code-window pre { font-size: 10px; }

  /* Modales como hoja inferior: pulgar cómodo y sin recortes */
  .overlay-layer.modal-layer { align-items: flex-end; padding: 0; }
  .modal-card, .endpoint-modal {
    width: 100%; max-height: 92vh; max-height: 92dvh;
    border-right: 0; border-bottom: 0; border-left: 0;
    border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .modal-card { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
  .edit-modal-card { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; padding-bottom: 0; }
  #modal-content:has(> .edit-modal-card) { width: 100%; padding: 0; }
  #modal-content > .edit-modal-card { max-height: 94dvh !important; }
  .edit-modal-head { padding: 18px 16px 0; }
  .edit-tabs { padding-right: 10px; padding-left: 10px; }
  .edit-content { padding: 13px; }
  .edit-footer { padding-right: 13px; padding-left: 13px; }
  .edit-prefixes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .edit-prefixes .pairing-option small { display: none; }
  .menu-drawer { width: min(340px, 88vw); }
  .endpoint-modal-head { padding: 13px; }
  .endpoint-modal-body { padding: 13px; gap: 13px; }
  .endpoint-modal-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .confirm-card .confirm-actions .btn { flex: 1; }

  /* Toasts abajo, sobre la navegación: no tapan la cabecera */
  .toast-stack { top: auto; right: 12px; bottom: calc(var(--bottomnav-h) + 14px + env(safe-area-inset-bottom)); left: 12px; width: auto; }
}

/* Móvil pequeño (≤400px): nada se sale, todo sigue legible */
@media (max-width: 400px) {
  :root { --gutter: 14px; }
  .landing-header .brand-tagline, .is-app-header .live-chip { display: none; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 33px; height: 33px; flex-basis: 33px; }
  .landing-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .proof-card .icon-wrap { display: none; }
  .metrics-grid { gap: 7px; }
  .metric-label { font-size: 8.5px; letter-spacing: .05em; }
  .metric-value { font-size: 20px; }
  .bots-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .bots-summary > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .welcome-actions { grid-template-columns: 1fr; }
  .wizard-actions { flex-direction: column-reverse; align-items: stretch; }
  .wizard-actions .btn { width: 100%; flex: none; }
  .pairing-code-display span { min-width: 29px; height: 37px; }
  .info-banner { grid-template-columns: 1fr; }
  .info-symbol { display: none; }
  .endpoint-category-head { padding: 10px 12px; }
  .endpoint-category-title strong { font-size: 12.5px; }
  .filter-chip { flex: 1 1 auto; }
  .bot-card-meta { font-size: 10px; }
  .ticket-stats { gap: 7px; }
  .faq-item summary { font-size: 13px; padding: 12px 14px; }
  .faq-answer { padding: 0 14px 14px; font-size: 12.5px; }
}

/* Pantallas bajas en horizontal (móvil girado): cabecera y hojas compactas */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 52px; --bottomnav-h: 54px; }
  .site-header { min-height: var(--header-h); }
  .landing-hero { padding-top: 18px; }
  .bottom-nav-item { min-height: 44px; }
  .bottom-nav-item .icon { width: 19px; height: 19px; }
  .modal-card, .endpoint-modal, .edit-modal-card { max-height: 96dvh; }
}

/* Dispositivos táctiles: objetivos de al menos 44px */
@media (pointer: coarse) {
  .btn-small { min-height: 42px; }
  .filter-chip { min-height: 42px; }
  .favorite-button { width: 40px; height: 40px; flex-basis: 40px; }
  .header-link { min-height: 44px; }
  .ep-tab, .edit-tab-btn { min-height: 44px; }
  .command-pill { min-height: 42px; }
  .endpoint-category-head, .endpoint-row, .fn-endpoint-head, .drawer-item { min-height: 56px; }
  .alias-chip button { width: 22px; height: 22px; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Impresión sobria */
@media print {
  .site-header, .bottom-navigation, .toast-stack, .overlay-layer, .landing-actions, .welcome-actions, .bot-card-actions, .page-heading-actions { display: none !important; }
  body { font-size: 12px; }
  .main-content { width: 100%; padding: 0; }
  .card, .wizard-card { box-shadow: none; break-inside: avoid; }
}

/* ── Paleta de comandos (Ctrl/⌘+K) ─────────────────────────────── */
.palette-layer { position: fixed; inset: 0; z-index: 140; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.palette-layer[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .38); }
.palette-card { position: relative; width: min(560px, 100%); background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .18); overflow: hidden; animation: modal-in .18s ease both; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
.palette-search svg { flex: none; color: var(--text-muted); }
.palette-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.palette-search kbd { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--text-muted); font: inherit; font-size: 11px; }
.palette-list { max-height: min(46vh, 380px); overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.palette-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.palette-item strong { display: block; font-size: 14px; line-height: 1.25; }
.palette-item small { display: block; color: var(--text-muted); font-size: 12px; }
.palette-item.is-active { background: var(--surface-2); }
.palette-empty { padding: 20px; color: var(--text-muted); font-size: 14px; text-align: center; }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: 12px; }

.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 640px) {
  .palette-layer { padding: 10px; }
  .palette-list { max-height: 54vh; }
  .page-heading-actions { width: 100%; }
  .page-heading-actions .btn { flex: 1; }
}

.command-filters { margin: 0 0 14px; }
.command-filters .command-badge { margin-left: 2px; padding: 1px 7px; font-size: 10.5px; }
.command-filters .filter-chip.is-active .command-badge { color: var(--text); background: var(--surface); }
@media (max-width: 640px) { .command-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .command-filters .filter-chip { flex: 0 0 auto; } }

.premium-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.premium-benefits { margin-top: 14px; }
.premium-cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.premium-cmd { padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); font-family: var(--mono); font-size: 12px; }
.premium-compare { padding: 22px; }
.premium-compare h2 { margin: 0 0 14px; font-size: 17px; }
.premium-compare table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.premium-compare th, .premium-compare td { padding: 10px 6px; border-bottom: 1px solid var(--border); text-align: center; }
.premium-compare tbody th { text-align: left; font-weight: 500; color: var(--text-secondary); }
.premium-compare thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.premium-compare tr:last-child th, .premium-compare tr:last-child td { border-bottom: 0; }
.premium-yes { color: var(--green); } .premium-yes .icon { width: 16px; height: 16px; }
.premium-no { color: var(--text-muted); }
.premium-steps { display: grid; gap: 14px; margin: 0 0 14px; padding: 0; list-style: none; }
.premium-step { display: flex; gap: 12px; align-items: flex-start; }
.premium-step .step-number { flex: 0 0 42px; }
.premium-step strong { font-size: 14.5px; }
.premium-step p { margin: 3px 0 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; }

.drawer-logout, .drawer-logout:hover { color: var(--red); }
.drawer-logout .drawer-item-icon { color: var(--red); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.btn-danger:hover { color: var(--accent-contrast); background: var(--red); border-color: var(--red); }

/* La imagen del QR necesita fondo blanco en cualquier tema. */
.qr-frame { background: #ffffff; }

/* Selector de tema (menú de usuario) */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.theme-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 13px; }
.theme-switch button .icon { width: 16px; height: 16px; }
.theme-switch button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.theme-switch button:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 1px; }

/* Veces que se usó cada comando (catálogo en vivo del bot) */
.command-uses { margin-left: auto; color: var(--text-muted); font-family: var(--mono); font-size: 11px; white-space: nowrap; }

/* ── Portada pulida (2026-12-03): misma estructura, detalles monocromos y datos en vivo ── */
.hero-grid-bg { position: relative; isolation: isolate; }
.hero-grid-bg::before {
  position: absolute; inset: -40px -24px; z-index: -1; content: ''; pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 30%, transparent 75%);
}
.landing-cta.hero-grid-bg { overflow: hidden; }
.landing-cta.hero-grid-bg::before { inset: 0; }

.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 10px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-secondary); font-size: 12.5px; }
.hero-pill b { color: var(--text); font-family: var(--mono); font-weight: 650; }
.landing-hero-copy .landing-title { margin-top: 18px; }
.title-soft { color: var(--text-muted); }

.pulse-dot.live::after { position: absolute; inset: 0; border-radius: 50%; background: inherit; content: ''; animation: live-ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes live-ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

.btn-arrow .icon { transition: transform .18s ease; }
.btn-arrow:hover .icon { transform: translateX(3px); }

.showcase-window { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -18px rgba(0, 0, 0, .18); }
.showcase-live { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-family: var(--mono); font-size: 11px; }
.showcase-live .pulse-dot { width: 6px; height: 6px; flex-basis: 6px; }
.status-tag b { font-family: var(--mono); }
.showcase-slots { margin-top: 10px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface); }
.showcase-slots-head { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.showcase-slots-head b { color: var(--text); font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.showcase-slots .progress-track { margin-top: 9px; }
.showcase-slots small { display: block; margin-top: 7px; color: var(--text-muted); font-size: 11px; }

/* Pasos unidos por una línea en escritorio */
.steps-connected { position: relative; }
@media (min-width: 901px) {
  .steps-connected::before { position: absolute; top: 43px; right: 16%; left: 16%; z-index: 0; height: 1px; background: var(--border); content: ''; }
  .steps-connected .step-card { position: relative; z-index: 1; }
}
.step-number { transition: background var(--ease), color var(--ease), border-color var(--ease); }
.step-card:hover .step-number { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }

/* Tarjetas de funciones */
.benefit-card { transition: border-color var(--ease), transform .2s ease; }
.benefit-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.benefit-icon { transition: background var(--ease), color var(--ease), border-color var(--ease); }
.benefit-card:hover .benefit-icon { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.benefit-card h3 { display: flex; align-items: baseline; gap: 8px; }
.benefit-count { color: var(--text-muted); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.cmd-chip { color: var(--text); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.cmd-chip:hover { border-color: var(--border-strong); background: var(--surface-3); }

/* FAQ con apertura suave donde el navegador lo soporta */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-item::details-content { height: 0; overflow: clip; transition: height .25s ease, content-visibility .25s allow-discrete; }
  .faq-item[open]::details-content { height: auto; }
}

/* Aparición al hacer scroll */
.reveal .section-heading, .reveal .reveal-item, .reveal .faq-list, .landing-cta.reveal > * { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible .section-heading, .reveal.is-visible .reveal-item, .reveal.is-visible .faq-list, .landing-cta.reveal.is-visible > * { opacity: 1; transform: none; }
.reveal.is-visible .reveal-item:nth-child(2) { transition-delay: .06s; }
.reveal.is-visible .reveal-item:nth-child(3) { transition-delay: .12s; }
.reveal.is-visible .reveal-item:nth-child(4) { transition-delay: .18s; }
.reveal.is-visible .reveal-item:nth-child(5) { transition-delay: .24s; }
.reveal.is-visible .reveal-item:nth-child(6) { transition-delay: .3s; }

@media (max-width: 640px) {
  .hero-pill { font-size: 12px; }
  .hero-grid-bg::before { inset: -24px -12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot.live::after { animation: none; }
  .reveal .section-heading, .reveal .reveal-item, .reveal .faq-list, .landing-cta.reveal > * { opacity: 1; transform: none; transition: none; }
  .benefit-card:hover { transform: none; }
}

/* ── Premium (2026-12-03): organizado para quien no conoce Premium, con datos reales ── */
.prem-hero { padding-top: clamp(30px, 5vw, 52px); padding-bottom: clamp(26px, 4vw, 40px); overflow: hidden; }
.prem-crown { display: inline-grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: var(--accent); color: var(--accent-contrast); }
.prem-crown .icon { width: 26px; height: 26px; }
.prem-hero h1 { margin-top: 16px; }
.prem-notice { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 7px 14px 7px 11px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-secondary); font-size: 13px; text-align: left; }
.prem-notice b { color: var(--text); font-family: var(--mono); }
.prem-notice.is-full .pulse-dot { background: var(--yellow); }
.prem-foot { margin-top: 16px !important; color: var(--text-muted) !important; font-size: 12.5px !important; }
.prem-foot b { color: var(--text); font-family: var(--mono); }

.my-prem-list { padding: 4px 18px; }
.my-prem-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.my-prem-row:last-child { border-bottom: 0; }
.my-prem-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.my-prem-icon .icon { width: 19px; height: 19px; }
.my-prem-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.my-prem-title strong { font-size: 14.5px; }
.my-prem-title .muted { font-size: 12px; }
.my-prem-main p { margin: 4px 0 0; color: var(--text-secondary); font-size: 13px; }
.my-prem-main p b { color: var(--text); }
.my-prem-main .progress-track { max-width: 360px; height: 4px; margin-top: 9px; }
.progress-value.is-low { background: var(--yellow); }
.prem-state { padding: 2px 9px; border: 1px solid var(--border); border-radius: 99px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.prem-state.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.prem-state.is-grace { border-color: var(--yellow); background: var(--yellow-tint); color: var(--yellow); }

.prem-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prem-group { padding: 24px; transition: border-color var(--ease); }
.prem-group:hover { border-color: var(--border-strong); }
.prem-group:hover .benefit-icon { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.prem-group h3 { margin: 16px 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.prem-group > p, .prem-group > div > p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.prem-group-wide { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: center; gap: clamp(20px, 4vw, 44px); }
.prem-points { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.prem-points li { display: flex; align-items: flex-start; gap: 9px; color: var(--text); font-size: 13.5px; }
.prem-points .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--green); }
.prem-points code { padding: 0 5px; border-radius: 4px; background: var(--surface-2); font-family: var(--mono); font-size: 12px; }

.wa-bubble { position: relative; margin: 0; padding: 6px; border-radius: 12px 12px 12px 3px; background: var(--surface-2); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.wa-banner { display: grid; height: 96px; place-items: center; border-radius: 8px; background: repeating-linear-gradient(135deg, var(--surface-3) 0 10px, var(--surface-2) 10px 20px); color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.wa-bubble pre { margin: 8px 6px 4px; color: var(--text-secondary); font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.wa-bubble pre b { color: var(--text); }
.wa-bubble figcaption { margin: 8px 6px 2px; color: var(--text-muted); font-size: 11.5px; }

.quality-compare { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.quality-compare > span { display: grid; gap: 2px; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.quality-compare small { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.quality-compare b { font-family: var(--mono); font-size: 20px; }
.quality-compare > span.is-prem { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.quality-compare > span.is-prem small { color: inherit; opacity: .7; }
.quality-compare > .icon { width: 18px; height: 18px; color: var(--text-muted); }

.prem-table { max-width: 820px; margin: 0 auto; }
.prem-table th.is-prem, .prem-table td.is-prem { background: var(--surface-2); }
.prem-table thead th.is-prem { border-radius: 8px 8px 0 0; background: var(--accent); color: var(--accent-contrast); }
.prem-table tbody tr:last-child td.is-prem { border-radius: 0 0 8px 8px; }

.prem-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.prem-timeline li { position: relative; padding: 0 4px; }
.prem-timeline li:not(:last-child)::after { position: absolute; top: 21px; left: 54px; right: -6px; height: 1px; background: var(--border); content: ''; }
.prem-timeline strong { display: block; margin-top: 14px; font-size: 15px; }
.prem-timeline p { margin: 6px 0 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.65; }
.prem-timeline a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.prem-timeline li:last-child .step-number { border-color: var(--yellow); color: var(--yellow); }
.prem-timeline .premium-cmd { font-size: 11.5px; }

@media (max-width: 900px) {
  .prem-groups { grid-template-columns: 1fr; }
  .prem-group-wide { grid-template-columns: 1fr; }
  .prem-timeline { grid-template-columns: 1fr 1fr; }
  .prem-timeline li::after { display: none; }
}
@media (max-width: 640px) {
  .my-prem-row { grid-template-columns: auto minmax(0, 1fr); }
  .my-prem-row > .btn { grid-column: 1 / -1; }
  .prem-timeline { grid-template-columns: 1fr; gap: 18px; }
  .prem-timeline li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  .prem-timeline strong { margin-top: 2px; }
  .prem-notice { font-size: 12px; }
}

/* Precio de Premium en la cabecera */
.prem-price { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; }
.prem-price-amount { color: var(--text); font-family: var(--mono); font-size: clamp(40px, 6vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.prem-price-meta { color: var(--text-muted); font-size: 12px; font-weight: 600; line-height: 1.3; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.prem-price + .prem-notice { display: flex; width: fit-content; margin: 14px auto 0; }

/* ── Conectar sub-bot (2026-12-03): comprobación del número + pantalla del código ── */
.text-button, .link-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.text-button:hover { color: var(--text); }
.link-button { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.num-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-secondary); font-size: 12.5px; line-height: 1.5; }
.num-check .icon { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.num-check a { color: inherit; font-weight: 700; }
.num-check.is-ok { border-color: color-mix(in srgb, var(--green) 35%, transparent); background: var(--green-tint); color: var(--text); }
.num-check.is-ok .icon { color: var(--green); }
.num-check.is-bad { border-color: var(--red-border); background: var(--red-tint); color: var(--text); }
.num-check.is-bad .icon { color: var(--red); }
.num-check.is-warn { border-color: color-mix(in srgb, var(--yellow) 40%, transparent); background: var(--yellow-tint); color: var(--text); }
.num-check.is-warn .icon { color: var(--yellow); }
.num-check.is-checking { border-style: dashed; }
.wizard-notice { margin: 0 0 16px; }

.connect-card { text-align: center; }
.connect-card .wizard-title { margin-bottom: 18px; }
.connect-foot { display: flex; justify-content: center; margin-top: 18px; }
.pair-card { display: grid; justify-items: center; gap: 14px; }
.pair-code-btn { padding: 0; border: 0; background: none; cursor: copy; color: inherit; }
.pair-code-btn:disabled { cursor: default; }
.pair-code { display: flex; align-items: center; gap: clamp(4px, 1.2vw, 8px); }
.pair-code span { display: grid; width: clamp(32px, 8vw, 46px); height: clamp(44px, 11vw, 58px); place-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: clamp(20px, 5vw, 28px); font-weight: 700; transition: opacity .2s, border-color .2s; }
.pair-code-btn:not(:disabled):hover .pair-code span { border-color: var(--text); }
.pair-code i { color: var(--text-muted); font-style: normal; }
.pair-card.is-expired .pair-code span { opacity: .35; text-decoration: line-through; }
.pair-skel { display: block; width: 60%; height: 40%; border-radius: 4px; background: var(--surface-3); animation: pair-pulse 1.1s ease-in-out infinite alternate; }
@keyframes pair-pulse { from { opacity: .35; } to { opacity: 1; } }
.pair-status, .pair-wait { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-muted); font-size: 12.5px; }
.pair-spinner { width: 13px; height: 13px; border: 2px solid var(--surface-3); border-top-color: var(--text-secondary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pair-timer { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pair-timer .track { position: relative; width: 140px; height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.pair-timer .fill { position: absolute; inset: 0 auto 0 0; width: var(--pairing-progress, 100%); border-radius: 99px; background: var(--text); transition: width 1s linear; }
.pair-card.is-expired .pair-timer { color: var(--red); }
.pair-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pair-error { padding: 12px 14px; border: 1px solid var(--red-border); border-radius: var(--radius); background: var(--red-tint); font-size: 13px; }
.pair-path { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--text-secondary); font-size: 12.5px; }
.pair-path li + li::before { content: '›'; margin-right: 6px; color: var(--text-muted); }
.pair-path b { color: var(--text); }
.pair-card.is-done { padding: 10px 0; }
.pair-card.is-done h3 { margin: 0; font-size: 18px; }
.pair-card.is-done p { margin: 0; color: var(--text-secondary); font-size: 13.5px; }
.pair-done-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--green-tint); color: var(--green); }
.pair-done-icon .icon { width: 26px; height: 26px; }
#modal-content .pair-card { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .pair-skel, .pair-spinner { animation: none; } .pair-timer .fill { transition: none; } }
@media (max-width: 520px) { .pair-path { flex-direction: column; align-items: center; gap: 3px; } .pair-path li + li::before { content: "↓"; display: block; margin: 0 0 3px; text-align: center; } }


/* ── menú de cuenta (avatar) y avisos de inicio de sesión ── */
.header-login { gap: 7px; white-space: nowrap; }
.header-login .icon { width: 15px; height: 15px; }
.account-menu-wrap { position: relative; }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 250px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--surface); box-shadow: var(--shadow-lift); animation: drawer-in .14s ease both; }
.account-menu-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border-soft); }
.account-menu-head span:last-child { min-width: 0; }
.account-menu-head strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-head small { display: block; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; }
.account-menu-item:hover, .account-menu-item:focus-visible { background: var(--surface-2); }
.account-menu-item .icon { width: 17px; height: 17px; color: var(--text-muted); }
.account-menu-item.is-danger, .account-menu-item.is-danger .icon { color: var(--red); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border-soft); }
.drawer-head strong { font-size: 18px; }
.drawer-login { margin: 16px 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--bg-soft); }
.drawer-login p { margin: 0 0 12px; color: var(--text-secondary); font-size: 13.5px; }
.drawer-login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-prompt { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--bg-soft); }
.login-prompt > .icon { width: 20px; height: 20px; flex: 0 0 20px; color: var(--text-muted); }
.login-prompt > div:first-of-type { flex: 1; min-width: 0; }
.login-prompt strong { display: block; font-size: 14px; }
.login-prompt span { display: block; color: var(--text-muted); font-size: 12.5px; }
.login-prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.num-check .login-prompt { margin: 0; }
@media (max-width: 640px) {
  .header-login { padding-inline: 12px; font-size: 12.5px; }
  .login-prompt { flex-wrap: wrap; }
  .login-prompt-actions { width: 100%; }
  .login-prompt-actions .btn { flex: 1; }
}

/* ── seguridad: sesiones abiertas ── */
.session-list { display: grid; gap: 6px; margin-top: 10px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.session-row.is-current { border-color: var(--border); background: var(--bg-soft); }
.session-device strong { display: block; font-size: 13.5px; }
.session-device small { display: block; color: var(--text-muted); font-size: 12px; }
.session-tag { padding: 2px 8px; border-radius: 99px; background: var(--surface-2); font-size: 11px; font-weight: 600; }
.password-box { margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.password-box summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.password-box form { margin-top: 10px; }

/* ── verificación de correo / recuperar contraseña ── */
.link-button { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.forgot-link { justify-self: end; font-size: 12.5px; color: var(--text-secondary); }
.verify-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-muted); font-size: 10.5px; font-weight: 700; vertical-align: middle; }
.verify-tag.is-ok { color: var(--green, #15803d); }
.verify-note { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); color: var(--text-secondary); font-size: 12.5px; line-height: 1.5; }
.account-menu-item.is-warn { font-weight: 600; }

/* ── invitado: guardar el sub-bot en una cuenta ── */
.guest-save { margin: 16px 0 4px; text-align: left; }
.guest-save .login-prompt { margin-bottom: 8px; }
.guest-save > p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }

/* ── Google / GitHub y Turnstile ── */
.oauth-buttons { display: grid; gap: 8px; margin-top: 14px; }
.oauth-btn { gap: 10px; justify-content: center; }
.oauth-btn .icon { width: 18px; height: 18px; }
.oauth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: var(--text-muted); font-size: 12px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
.captcha-slot { min-height: 65px; }
.linked-providers .icon { width: 14px; height: 14px; vertical-align: -2px; }
.oauth-logo { width: 18px; height: 18px; flex: 0 0 auto; stroke: none; }
.linked-providers .oauth-logo { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* ── soporte: tickets con conversación ── */
.ticket-row { color: inherit; text-decoration: none; cursor: pointer; transition: background .15s; }
.ticket-row:hover { background: var(--fill-soft); }
.ticket-row-main { display: grid; gap: 3px; min-width: 0; }
.ticket-preview { overflow: hidden; color: var(--text-secondary); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-toolbar { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ticket-toolbar .search-box { flex: 0 1 380px; }
.ticket-toolbar .search-box .text-input { min-height: 42px; }
@media (max-width: 640px) {
  .ticket-toolbar { align-items: stretch; }
  .ticket-toolbar .search-box { flex: none; }
  .ticket-tabs { justify-content: flex-start; }
}
.ticket-tabs { display: flex; gap: 7px; }
.chip-count { min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--fill-soft); font-family: var(--mono); font-size: 11px; text-align: center; }
.filter-chip.is-active .chip-count { background: rgba(127,127,127,.25); }
.ticket-more { display: flex; justify-content: center; padding: 14px; }
.ticket-form { margin-bottom: 18px; }
.ticket-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ticket-back { margin-bottom: 14px; }
.ticket-detail { padding: clamp(16px, 3vw, 24px); }
.ticket-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.ticket-detail-head h1 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ticket-detail-head p { margin: 0; font-size: 12.5px; }
.ticket-thread { display: flex; flex-direction: column; gap: 12px; padding: 18px 0; }
.ticket-msg { max-width: min(560px, 88%); padding: 11px 14px; border: 1px solid var(--border-soft); border-radius: 14px 14px 14px 4px; background: var(--surface-2); }
.ticket-msg.is-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--fill-soft); }
.ticket-msg.is-staff { border-color: var(--border-strong); }
.ticket-msg-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; color: var(--text-muted); font-size: 11.5px; }
.ticket-msg-head strong { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.ticket-msg-head .icon { width: 13px; height: 13px; }
.ticket-msg-text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-system { align-self: center; color: var(--text-muted); font-size: 11.5px; text-align: center; }
.ticket-reply { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.ticket-reply .text-area { min-height: 96px; }
.ticket-closed-note { margin: 0; font-size: 12.5px; }

/* ── cupones de Premium ── */
.coupon-card { padding: clamp(16px, 3vw, 24px); }
.coupon-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.coupon-card-head .section-title { margin: 0 0 3px; }
.coupon-card-head .section-copy { margin: 0; }
.coupon-redeem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.coupon-redeem .btn { min-height: 46px; }
.coupon-form { margin-bottom: 18px; }
.coupon-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; gap: 12px; }
.coupon-form-row .field { align-content: start; }
.coupon-presets { display: flex; gap: 6px; margin-top: 7px; }
.coupon-presets .filter-chip { min-height: 30px; padding: 0 10px; font-size: 12px; }
.coupon-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px; border-bottom: 1px solid var(--border-soft); }
.coupon-row:last-child { border-bottom: 0; }
.coupon-main { display: grid; gap: 7px; min-width: 0; flex: 1; }
.coupon-main p { margin: 0; font-size: 12.5px; }
.coupon-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coupon-code { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--text); background: none; cursor: pointer; font-size: 16px; font-weight: 700; letter-spacing: .03em; }
.coupon-code .icon { width: 14px; height: 14px; color: var(--text-muted); }
.coupon-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.coupon-reds { display: grid; gap: 6px; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.coupon-reds div { display: flex; gap: 10px; flex-wrap: wrap; }
.coupon-reds p { margin: 0; }
@media (max-width: 640px) {
  .coupon-redeem { grid-template-columns: 1fr; }
  .coupon-row { flex-direction: column; }
  .coupon-actions { justify-content: flex-start; }
}

/* cupón en el asistente de crear bot */
.wizard-coupon { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.wizard-coupon summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; font-weight: 650; list-style: none; }
.wizard-coupon summary::-webkit-details-marker { display: none; }
.wizard-coupon summary .icon, .wizard-coupon-hint .icon { width: 16px; height: 16px; }
.wizard-coupon[open] summary { margin-bottom: 10px; }
.wizard-coupon .field-hint { display: block; margin-top: 6px; }
.wizard-coupon-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; }

/* ── chat de comunidad ── */
.chat-page { display: flex; flex-direction: column; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--border-soft); }
.chat-top-info { min-width: 0; }
.chat-top h1 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.chat-top p { margin: 1px 0 0; font-size: 12px; }
.chat-card { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 250px); min-height: 380px; overflow: hidden; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 12px 8px; overscroll-behavior: contain; }
.chat-empty { display: grid; justify-items: center; gap: 6px; padding: 50px 16px; color: var(--text-muted); text-align: center; }
.chat-empty .icon { width: 30px; height: 30px; }
.chat-empty strong { color: var(--text); }
.chat-empty p { margin: 0; font-size: 13px; }
.chat-more, .chat-start { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 0 12px; color: var(--text-muted); font-size: 12px; }
.chat-spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: chat-spin .7s linear infinite; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
.chat-day { display: flex; justify-content: center; margin: 14px 0 6px; pointer-events: none; }
.chat-day span { padding: 4px 11px; border: 1px solid var(--border-soft); border-radius: 99px; color: var(--text-secondary); background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.06); font-size: 11.5px; font-weight: 600; }
.chat-day span::first-letter { text-transform: uppercase; }
.chat-presence { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-online { display: inline-flex; align-items: center; gap: 5px; }
.chat-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.chat-hint { display: flex; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 11px; }
.chat-count b { font-weight: 600; }
.chat-count b.is-near { color: #b26a00; }
.chat-count b.is-full { color: var(--red); }
.chat-send:disabled { opacity: .45; cursor: default; }
.chat-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--text); background: var(--surface-2); font-size: 12px; font-weight: 700; }
.chat-avatar.is-owner { color: var(--accent-contrast); background: var(--accent); }
.chat-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
/* Etiquetas (Zeus, Mod, Bot, Premium) pegadas al borde derecho de la burbuja; el nombre, al izquierdo. */
.chat-head > :nth-child(2) { margin-left: auto; }
.chat-head strong { font-size: 13.5px; }
.chat-owner { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; color: var(--accent-contrast); background: var(--accent); font-size: 10.5px; font-weight: 700; }
.chat-owner .icon { width: 11px; height: 11px; }
.chat-text a { text-decoration: underline; }
.chat-actions { display: flex; align-items: flex-start; gap: 2px; opacity: 0; transition: opacity .15s; }
.chat-msg:hover .chat-actions, .chat-msg:focus-within .chat-actions { opacity: 1; }
@media (hover: none) { .chat-actions { display: none; } .chat-bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.chat-actions button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 8px; color: var(--text-muted); background: none; cursor: pointer; }
.chat-actions button:hover { color: var(--text); background: var(--surface-2); }
.chat-actions .icon { width: 15px; height: 15px; }
.chat-mute-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; }
.chat-mute-menu .filter-chip { min-height: 28px; padding: 0 10px; font-size: 11.5px; }
.chat-composer { display: grid; gap: 7px; padding: 10px 12px 12px; border-top: 1px solid var(--border-soft); background: var(--surface); }
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input-row .text-area { flex: 1; min-height: 44px; max-height: 140px; padding-top: 11px; resize: none; }
.chat-send { min-width: 46px; min-height: 44px; padding: 0 14px; }
.chat-replying .icon-button { width: 28px; height: 28px; }
.chat-card .login-prompt { margin: 10px 12px 12px; }
.chat-muted { display: flex; align-items: center; gap: 8px; padding: 14px; border-top: 1px solid var(--border-soft); color: var(--text-secondary); font-size: 13px; }
.chat-muted .icon { width: 16px; height: 16px; }
.chat-mod { margin-bottom: 12px; padding: 14px 16px; }
.chat-mod h3 { margin: 4px 0 8px; font-size: 14px; }
.chat-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px -6px 8px 0; }
.chat-mod-head h2 { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 16px; }
.chat-mod-head h2 .icon { width: 17px; height: 17px; }
.chat-mod h3 + p, .chat-mod > p { margin: 0 0 10px; font-size: 12.5px; }
.chat-mod-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.chat-mod-row p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-mod-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-badge { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); }
.bottom-nav-item, .header-link { position: relative; }
.header-link .nav-badge { top: 4px; right: 4px; }
@media (max-width: 900px) { .chat-card { height: calc(100dvh - 235px); } }
@media (max-width: 640px) { .chat-mod-row { flex-direction: column; } .chat-mod-actions { justify-content: flex-start; } }

.confirm-card .confirm-icon.is-neutral { color: var(--text); background: var(--surface-2); }

/* burbujas (como WhatsApp): las propias a la derecha */
.chat-msg { position: relative; display: flex; align-items: flex-start; gap: 8px; margin-top: 2px; }
.chat-msg:not(.is-cont) { margin-top: 10px; }
.chat-msg.is-mine { flex-direction: row-reverse; }
.chat-avatar { flex: 0 0 auto; }
.chat-avatar.is-empty { height: 0; background: none; }
.chat-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 560px); }
.chat-msg.is-mine .chat-body { align-items: flex-end; }
.chat-bubble { max-width: 100%; padding: 6px 10px 5px; border-radius: 14px; background: var(--surface-2); }
.chat-msg:not(.is-cont):not(.is-mine) .chat-bubble { border-top-left-radius: 4px; }
.chat-msg.is-mine .chat-bubble { color: var(--accent-contrast); background: var(--accent); }
.chat-msg.is-mine:not(.is-cont) .chat-bubble { border-top-right-radius: 4px; }
.chat-head { margin-bottom: 1px; }
.chat-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-time { float: right; margin: 7px -2px -3px 10px; color: var(--text-muted); font-size: 10.5px; line-height: 1; white-space: nowrap; }
.chat-msg.is-mine .chat-time { color: inherit; opacity: .7; }
.chat-msg.is-mine .chat-text a { color: inherit; }
.chat-deleted { display: inline-flex; align-items: center; gap: 5px; opacity: .7; }
.chat-deleted .icon { width: 13px; height: 13px; }
.chat-actions { align-self: center; }

/* reacciones */
.chat-body { position: relative; }
.chat-react-picker { position: absolute; bottom: calc(100% - 4px); left: 0; z-index: 4; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); box-shadow: 0 8px 26px rgba(0,0,0,.18); animation: chat-pop .14s ease-out; }
.chat-msg.is-mine .chat-react-picker { right: 0; left: auto; }
@keyframes chat-pop { from { opacity: 0; transform: translateY(4px) scale(.96); } }
.chat-react-picker button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 21px; line-height: 1; transition: transform .12s, background .12s; }
.chat-react-picker button:hover { background: var(--surface-2); transform: scale(1.15); }
.chat-react-picker button.is-on { background: var(--fill-soft); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -4px; padding: 0 6px; position: relative; z-index: 1; }
.chat-reaction { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border: 1px solid var(--border); border-radius: 99px; color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); font: inherit; font-size: 13px; line-height: 1; cursor: default; }
button.chat-reaction { cursor: pointer; }
button.chat-reaction:hover { border-color: var(--border-strong); }
.chat-reaction b { font-size: 11.5px; font-weight: 600; }
.chat-reaction.is-on { border-color: var(--border-strong); background: var(--surface-2); }
@media (max-width: 640px) { .chat-react-picker button { width: 34px; height: 34px; font-size: 20px; } }

/* deslizar para responder y hoja de opciones (celular) */
.chat-msg .chat-body { transform: translateX(var(--swipe, 0)); }
.chat-msg.is-swipe-back .chat-body { transition: transform .18s ease-out; }
.chat-swipe-icon { position: absolute; top: 50%; left: 4px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--text); background: var(--surface-2); opacity: var(--swipe-p, 0); transform: translateY(-50%) scale(calc(.6 + var(--swipe-p, 0) * .4)); pointer-events: none; }
.chat-swipe-icon .icon { width: 15px; height: 15px; }
.chat-msg:not(.is-swiping) .chat-swipe-icon { opacity: 0; transition: opacity .15s; }
.chat-msg.is-pressed .chat-bubble { filter: brightness(.92); transition: filter .15s; }
.chat-sheet { display: grid; gap: 12px; }
.chat-sheet-preview { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.chat-sheet-preview p { margin: 3px 0 0; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-sheet-reactions { display: flex; justify-content: space-between; padding: 4px; border: 1px solid var(--border); border-radius: 99px; }
.chat-sheet-reactions button { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: none; font-size: 24px; cursor: pointer; }
.chat-sheet-reactions button.is-on { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.chat-sheet-list { display: grid; border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.chat-sheet-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--border-soft); color: var(--text); background: none; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.chat-sheet-item:last-child { border-bottom: 0; }
.chat-sheet-item .icon { width: 18px; height: 18px; color: var(--text-secondary); }
.chat-sheet-item.is-danger, .chat-sheet-item.is-danger .icon { color: var(--red); }
.chat-sheet-mute { display: grid; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.chat-sheet-mute > span { display: inline-flex; align-items: center; gap: 6px; }
.chat-sheet-mute .icon { width: 15px; height: 15px; }
.chat-sheet-mute div { display: flex; flex-wrap: wrap; gap: 6px; }

/* formato de texto (como WhatsApp) */
.chat-text strong { font-weight: 700; }
.chat-text code, .chat-fmt-hint code { padding: 1px 5px; border-radius: 5px; background: var(--fill-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.chat-text .chat-code-block { display: block; margin: 3px 0; padding: 7px 9px; border-radius: 8px; white-space: pre-wrap; overflow-x: auto; }
.chat-msg.is-mine .chat-text code { background: color-mix(in srgb, var(--accent-contrast) 16%, transparent); }
/* Enlaces con flecha y código copiable (icono de papel). */
.chat-text a.chat-link { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; color: var(--accent); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.chat-text a.chat-link:hover { text-decoration: underline; }
.chat-text a.chat-link .icon { flex: none; width: .85em; height: .85em; stroke-width: 2.2; }
.chat-msg.is-mine .chat-text a.chat-link { color: inherit; text-decoration: underline; }
.chat-text code.chat-copyable { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.chat-text code.chat-copyable.chat-code-block { display: block; padding-right: 34px; }
.chat-copy { display: inline-grid; flex: none; width: 20px; height: 20px; place-items: center; padding: 0; border: 0; border-radius: 5px; color: inherit; background: none; opacity: .6; cursor: pointer; }
.chat-copy:hover, .chat-copy:focus-visible { opacity: 1; background: var(--fill-soft); }
.chat-copy .icon { width: 13px; height: 13px; }
.chat-code-block .chat-copy { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; }
.chat-text .chat-q { display: block; margin: 2px 0; padding-left: 8px; border-left: 3px solid currentColor; opacity: .8; }
/* Markdown tipo Discord: títulos, texto pequeño, listas y spoiler. */
.chat-text .chat-h { display: block; margin: 4px 0 2px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.chat-text .chat-h1 { font-size: 19px; }
.chat-text .chat-h2 { font-size: 16.5px; }
.chat-text .chat-h3 { font-size: 15px; }
.chat-text .chat-small { display: block; font-size: 11.5px; opacity: .7; }
.chat-text .chat-li { display: flex; gap: 6px; padding-left: calc(var(--ind, 0) * 5px + 2px); }
.chat-text .chat-li > i { flex-shrink: 0; min-width: 9px; font-style: normal; opacity: .75; }
.chat-text u { text-underline-offset: 2px; }
.chat-text .chat-spoiler { border-radius: 4px; padding: 0 2px; color: transparent; background: var(--text-muted); cursor: pointer; transition: color .15s, background .15s; user-select: none; }
.chat-text .chat-spoiler * { visibility: hidden; }
.chat-text .chat-spoiler.is-open { color: inherit; background: color-mix(in srgb, var(--text-muted) 22%, transparent); cursor: auto; user-select: text; }
.chat-text .chat-spoiler.is-open * { visibility: visible; }
.chat-fmt-hint { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-fmt-hint b { font-weight: 700; }
.chat-fmt-hint code { padding: 0 4px; font-size: 10.5px; }
.chat-count { flex: 0 0 auto; }

/* mensaje enviándose */
.chat-msg.is-pending .chat-bubble { opacity: .75; }
.chat-time .icon { width: 11px; height: 11px; vertical-align: -1px; }

/* cita como WhatsApp: rayita de color, nombre del color y el texto debajo */
.chat-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 0; margin: 2px 0 5px; padding: 5px 10px 6px; border: 0; border-left: 4px solid var(--qc, var(--border-strong)); border-radius: 7px; color: var(--text-secondary); background: var(--fill-soft); font: inherit; font-size: 12.5px; line-height: 1.35; text-align: left; }
button.chat-quote { cursor: pointer; }
button.chat-quote:hover { filter: brightness(.97); }
.chat-quote b { color: var(--qc, var(--text)); font-size: 12.5px; font-weight: 700; }
.chat-quote span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.is-mine .chat-quote { color: color-mix(in srgb, var(--accent-contrast) 78%, transparent); background: color-mix(in srgb, var(--accent-contrast) 13%, transparent); }
.chat-bubble:has(.chat-quote) { min-width: min(220px, 100%); }
.chat-replying { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 6px; border-radius: 10px; background: var(--surface-2); }
.chat-replying .chat-quote { flex: 1; margin: 0; background: var(--fill-soft); }
.chat-msg.is-flash .chat-bubble { animation: chat-flash 1.5s ease-out; }
@keyframes chat-flash { 0%, 35% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 30%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* editado y fijados */
.chat-edited { margin-right: 4px; font-style: italic; }
.chat-pinned-mark .icon { width: 10px; height: 10px; margin-right: 3px; }
.chat-pins { display: flex; align-items: stretch; gap: 4px; padding: 6px 8px 6px 10px; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.chat-pin-bars { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; }
.chat-pin-bars i { flex: 1; width: 3px; border-radius: 2px; background: var(--border); }
.chat-pin-bars i.is-on { background: var(--text); }
.chat-pin-main { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 3px 4px; border: 0; border-radius: 8px; color: var(--text); background: none; font: inherit; text-align: left; cursor: pointer; }
.chat-pin-main:hover { background: var(--fill-soft); }
.chat-pin-main > .icon { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-secondary); }
.chat-pin-main span { display: grid; min-width: 0; }
.chat-pin-main b { font-size: 12px; }
.chat-pin-main em { overflow: hidden; color: var(--text-secondary); font-size: 12.5px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.chat-pin-x { width: 30px; height: 30px; align-self: center; }
.chat-replying.is-editing .chat-quote b { display: inline-flex; align-items: center; gap: 5px; }
.chat-replying.is-editing .chat-quote b .icon { width: 12px; height: 12px; }
/* hora + fijado + editado en una sola fila (los svg son display:block por defecto) */
.chat-time { display: inline-flex; align-items: center; gap: 3px; }
.chat-time .icon, .chat-pinned-mark .icon { display: inline-block; margin: 0; }
.chat-pinned-mark { display: inline-flex; }
.chat-edited { margin-right: 1px; }

/* insignias */
.chat-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700; }
.chat-badge .icon { width: 11px; height: 11px; }
.chat-badge.is-premium { color: #8a5a00; background: #fff1c2; }
.dark-theme .chat-badge.is-premium { color: #ffd66b; background: rgba(255, 196, 0, .14); }
.chat-badge.is-mod { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
/* menciones */
.chat-composer { position: relative; }
.chat-mentions { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); z-index: 5; display: grid; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.chat-mentions[hidden] { display: none; }
.chat-mentions button { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 0; border-radius: 8px; color: var(--text); background: none; font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.chat-mentions button.is-sel, .chat-mentions button:hover { background: var(--surface-2); }
.chat-mentions .chat-avatar { width: 26px; height: 26px; font-size: 10.5px; }
.nav-badge.is-mention { display: grid; width: 15px; height: 15px; place-items: center; top: 3px; right: calc(50% - 20px); color: #fff; background: #2f6fe4; font-size: 10px; font-style: normal; font-weight: 800; line-height: 1; }
/* escribiendo */
.chat-typing { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-weight: 600; }
.chat-typing i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: chat-dot 1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; margin-right: 4px; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
/* no leídos */
.chat-unread-sep { display: flex; justify-content: center; margin: 14px -12px 6px; padding: 5px 0; background: var(--fill-soft); }
.chat-unread-sep span { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
/* emojis (solo con ratón) */
.chat-emoji-btn { flex: 0 0 auto; width: 44px; height: 44px; color: var(--text-secondary); }
.chat-emoji-btn.is-on { color: var(--text); background: var(--surface-2); }
@media (hover: none) { .chat-emoji-btn { display: none; } }
.chat-emoji-panel { position: absolute; left: 12px; bottom: calc(100% - 4px); z-index: 5; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; max-height: 240px; padding: 8px; overflow-y: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.16); animation: chat-pop .14s ease-out; }
.chat-emoji-panel button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 8px; background: none; font-size: 21px; cursor: pointer; }
.chat-emoji-panel button:hover { background: var(--surface-2); }
/* panel de moderación del owner */
.chat-mod-inline { display: flex; gap: 8px; margin: 8px 0 12px; }
.chat-mod-inline .text-input { flex: 1; min-height: 38px; }
.chat-words { display: grid; gap: 8px; margin-bottom: 6px; }
.chat-words .text-area { min-height: 90px; font-size: 13px; }
.chat-words .btn { justify-self: start; }

/* chat: sin hueco extra bajo la tarjeta (su alto lo calcula sizeChatCard) */
.main-content:has(.chat-page) { padding-bottom: 16px; }
@media (max-width: 900px) { .main-content:has(.chat-page) { padding-bottom: calc(var(--bottomnav-h) + 8px + env(safe-area-inset-bottom)); } }

/* menciones: la tuya en amarillo (etiqueta), las de otros en el color de esa persona */
.chat-mention { font-weight: 700; color: var(--mc, #2f6fe4); }
.chat-msg.is-mine .chat-mention:not(.is-me) { color: inherit; text-decoration: underline; text-decoration-color: var(--mc); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.chat-mention.is-me { padding: 0 5px; border-radius: 5px; color: #5c3b00; background: #ffd75e; }
.dark-theme .chat-mention.is-me { color: #1f1400; background: #f5c542; }
.chat-msg.is-mention .chat-bubble { box-shadow: inset 3px 0 0 #f2b705; }

/* páginas legales */
.legal-card { max-width: 820px; padding: 26px 28px; line-height: 1.65; font-size: 14.5px; color: var(--text-secondary); }
.legal-intro { margin: 0 0 18px; font-size: 15.5px; color: var(--text); }
.legal-toc { margin: 0 0 8px; padding: 14px 18px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-soft); }
.legal-toc strong { display: block; margin-bottom: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.legal-toc li { break-inside: avoid; margin: 0 0 4px; }
.legal-toc a { color: var(--text-secondary); }
.legal-toc a:hover { color: var(--text); text-decoration: underline; }
.legal-section { padding-top: 22px; scroll-margin-top: 90px; }
.legal-section h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.legal-section h2 span { color: var(--text-muted); font-weight: 600; }
.legal-section p { margin: 0 0 10px; }
.legal-section ul { margin: 0 0 10px; padding-left: 20px; }
.legal-section li { margin: 5px 0; }
.legal-section strong { color: var(--text); }
.legal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.legal-card a, .modal-legal a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.modal-legal { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); text-align: center; }
@media (max-width: 640px) { .legal-card { padding: 20px 18px; font-size: 14px; } .legal-toc ol { columns: 1; } }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 14px; }

/* botón «ir al último mensaje» */
.chat-jump { position: absolute; right: 16px; bottom: 92px; z-index: 5; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-secondary); background: var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; animation: chat-jump-in .16s ease both; }
.chat-jump[hidden] { display: none; }
.chat-jump:hover { color: var(--text); border-color: var(--border-hover); }
.chat-jump .icon { width: 20px; height: 20px; }
.chat-jump-count { position: absolute; top: -8px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; color: #fff; background: var(--green); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; white-space: nowrap; }
.chat-jump-count[hidden] { display: none; }
.chat-jump-count.is-mention { color: #3d2a00; background: #f5c542; }
@keyframes chat-jump-in { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat-jump { animation: none; } }

/* ZeusBot: colores del tema (--accent invierte en oscuro) */
.chat-avatar.is-bot { color: var(--accent-contrast); background: var(--accent); }
.chat-avatar.is-bot .icon { width: 17px; height: 17px; }
.chat-bot-name { color: var(--text); }
.chat-badge.is-bot { color: var(--accent-contrast); background: var(--accent); letter-spacing: .03em; }
.chat-msg.is-bot .chat-bubble { box-shadow: inset 0 0 0 1px var(--border-strong); }
.chat-msg.is-ephemeral .chat-bubble { border: 1px dashed var(--border-strong); box-shadow: none; }
.chat-eph { display: flex; align-items: center; gap: 5px; margin: 4px 2px 0; color: var(--text-muted); font-size: 11px; }
.chat-eph .icon { width: 11px; height: 11px; }
.chat-eph button { padding: 0; border: 0; color: var(--text-secondary); background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.chat-flag { white-space: nowrap; }
.chat-mentions .chat-cmd { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; align-items: baseline; text-align: left; }
.chat-mentions .chat-cmd b { font-weight: 700; }
.chat-mentions .chat-cmd i { color: var(--text-muted); font-size: 12px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-mentions .chat-cmd small { grid-column: 1 / -1; color: var(--text-muted); font-size: 11.5px; }
.chat-mentions { max-height: min(320px, 45vh); overflow-y: auto; }

/* Encuestas del chat */
.chat-poll-btn { flex: 0 0 auto; width: 44px; height: 44px; color: var(--text-secondary); }
.chat-poll { --poll-bg: var(--surface-2); display: flex; flex-direction: column; gap: 6px; min-width: min(260px, 62vw); margin-bottom: 4px; }
.chat-poll-q { display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
.chat-poll-q .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; opacity: .7; }
.chat-poll-sub { opacity: .7; font-size: 12px; }
.chat-poll-opts { display: flex; flex-direction: column; gap: 6px; }
.chat-poll-opt { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 7px 10px; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; isolation: isolate; }
.chat-poll-opt::before { content: ''; position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--p, 0%); background: color-mix(in srgb, currentColor 10%, transparent); transition: width .25s ease; }
.chat-poll-opt.is-on { border-color: currentColor; }
.chat-poll-opt.is-on::before { background: color-mix(in srgb, currentColor 18%, transparent); }
.chat-poll-opt:disabled { cursor: default; opacity: 1; }
.chat-poll-opt:not(:disabled):hover { border-color: color-mix(in srgb, currentColor 50%, transparent); }
.chat-poll-check { display: inline-grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border: 1.5px solid color-mix(in srgb, currentColor 60%, transparent); border-radius: 50%; }
.chat-poll-opt.is-on .chat-poll-check { border-color: currentColor; background: currentColor; }
.chat-poll-opt.is-on .chat-poll-check .icon { color: var(--poll-bg); }
.chat-msg.is-mine .chat-poll { --poll-bg: var(--accent); }
.chat-poll-check .icon { width: 12px; height: 12px; }
.chat-poll-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-poll-opt b { flex: 0 0 auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.chat-poll-who { margin: -2px 4px 2px; opacity: .75; font-size: 12px; overflow-wrap: anywhere; }
.chat-poll-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; }
.chat-poll-foot > span { opacity: .7; }
.chat-poll-foot .link-button { font-size: 12px; color: inherit; }
.chat-poll-inputs { display: flex; flex-direction: column; gap: 8px; }
.chat-poll-form > .link-button { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.chat-poll-form > .link-button .icon { width: 16px; height: 16px; }

/* Perfil y búsqueda del chat */
button.chat-who { padding: 0; border: 0; font: inherit; cursor: pointer; }
button.chat-who:not(.chat-avatar) { background: none; }
button.chat-avatar.chat-who { display: inline-grid; place-items: center; }
.chat-name { display: inline-flex; max-width: 100%; color: inherit; }
.chat-name:hover strong, .chat-name:focus-visible strong { text-decoration: underline; text-underline-offset: 2px; }
.chat-top-actions { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.chat-top-actions .btn-small { min-height: 36px; }
.chat-top-actions [aria-pressed="true"] { color: var(--accent-contrast); background: var(--accent); border-color: var(--accent); }
.chat-mod-count { min-width: 18px; padding: 0 5px; border-radius: 99px; color: #fff; background: var(--red, #e5484d); font-size: 11px; line-height: 18px; text-align: center; }
/* En celular, Moderación queda solo con el escudo (y el número de reportes). */
@media (max-width: 600px) { .chat-mod-label { display: none; } .chat-top-actions .btn-small { width: 36px; padding: 0; justify-content: center; } .chat-top-actions .btn-small:has(.chat-mod-count) { width: auto; padding: 0 8px; } }
.chat-search-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); }
.chat-profile { position: relative; display: flex; flex-direction: column; gap: 14px; }
.chat-profile .modal-close, .chat-search .modal-close { position: absolute; top: -4px; right: -4px; }
.chat-profile-top { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.chat-profile-top .chat-avatar { width: 56px; height: 56px; font-size: 20px; }
.chat-profile-top h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.chat-profile-top h2 small { font-size: 13px; font-weight: 500; }
.chat-profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-profile-badges:empty { display: none; }
.chat-profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-profile-stats div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.chat-profile-stats b { font-size: 15px; }
.chat-profile-stats span { color: var(--text-secondary); font-size: 12px; }
.chat-profile-staff { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-secondary); font-size: 13px; }
.chat-profile-staff span { display: inline-flex; align-items: center; gap: 5px; }
.chat-profile-staff b { color: var(--text); }
.chat-search { position: relative; display: flex; flex-direction: column; gap: 12px; }
.chat-search h2 { margin: 0; padding-right: 36px; }
.chat-search-field { position: relative; display: block; }
.chat-search-field .icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.chat-search-field .text-input { width: 100%; padding-left: 38px; }
.chat-search-results { display: flex; flex-direction: column; gap: 4px; max-height: min(60vh, 480px); overflow-y: auto; }
.chat-search-results > .muted { margin: 6px 2px; font-size: 13px; }
.chat-search-item { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-search-item:hover, .chat-search-item:focus-visible { background: var(--surface-2); }
.chat-search-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.chat-search-head small { flex: 0 0 auto; color: var(--text-secondary); font-size: 11.5px; }
.chat-search-text { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-search-text mark { padding: 0 1px; border-radius: 3px; background: #f2b70566; color: inherit; }
.chat-poll-check.is-box { border-radius: 5px; }
.chat-poll-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.chat-poll-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ── Mejoras de UX (diciembre 2026) ─────────────────────────────── */
/* Código de vinculación: las 8 casillas se encogen para caber en pantallas de 320px. */
.pair-code-btn { display: flex; justify-content: center; width: 100%; max-width: 100%; }
.pair-code { width: min(100%, 420px); justify-content: center; gap: clamp(3px, 1.2vw, 8px); }
.pair-code span { flex: 1 1 0; min-width: 0; max-width: 46px; width: auto; height: auto; aspect-ratio: 46 / 58; font-size: clamp(18px, 6vw, 26px); }
.pair-code i { flex: 0 0 auto; }
.pair-actions { flex-wrap: wrap; justify-content: center; }
.pair-copy-wa { display: none; }
@media (hover: none) and (pointer: coarse) { .pair-copy-wa:not([hidden]) { display: inline-flex; } }
/* País + vista previa del número completo. */
.phone-preview { display: block; min-height: 1.2em; margin-top: 6px; color: var(--text-secondary); font-size: 13px; }
.phone-preview b { color: var(--text); }
select.text-input { appearance: auto; }
/* Ver contraseña. */
.pass-wrap { position: relative; display: block; }
.pass-wrap .text-input { width: 100%; padding-right: 46px; }
.pass-wrap .pass-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; color: var(--text-muted); }
.pass-wrap .pass-toggle.is-on { color: var(--text); }
/* Error al enviar en el chat: debajo de la caja, sin taparla. */
.chat-send-error { color: var(--red, #e5484d); font-size: 12px; font-weight: 600; }
/* Bienvenida del chat. */
.chat-welcome { display: flex; align-items: center; gap: 10px; margin: 8px 10px 4px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 12.5px; line-height: 1.4; }
.chat-welcome p { flex: 1; margin: 0; color: var(--text-secondary); }
.chat-welcome p b { color: var(--text); }
.chat-welcome .btn { flex-shrink: 0; }
/* Premium: la píldora de cupos como texto normal en celular (antes se partía en tres columnas). */
@media (max-width: 600px) { .prem-notice { display: block; text-align: center; border-radius: 14px; padding: 8px 12px; line-height: 1.5; } .prem-notice .pulse-dot { display: inline-block; vertical-align: middle; margin-right: 6px; } .prem-price + .prem-notice { display: block; width: auto; } }

/* Bots principales (solo owners): página /principales */
.mains-page .main-add-card { padding: 16px; margin-bottom: 14px; }
.main-add { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.main-add .field { flex: 1 1 240px; margin: 0; }
.main-add-card > .link-error, .main-add-card > .muted { margin: 10px 0 0; }
.main-pairing { display: grid; gap: 10px; justify-items: center; text-align: center; }
.main-pairing p { margin: 0; }
.main-wait { display: inline-flex; align-items: center; gap: 8px; }
.main-wait svg { width: 18px; height: 18px; flex: none; }
.main-accept { flex: 1 1 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--yellow); border-radius: 10px; background: var(--yellow-tint); font-size: 13px; line-height: 1.45; cursor: pointer; }
.main-accept input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--yellow); }
.main-join-head { margin-bottom: 12px; }
.main-join-head h2 { margin: 0 0 4px; font-size: 16px; }
.main-join-head p { margin: 0; }
.main-slots { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.main-slots .field { flex: 0 1 300px; margin: 0; }
.main-slots > p { margin: 0 0 10px; }
.main-from { color: var(--text-muted); font-size: 12px; }
.main-section-title { font-size: 15px; margin: 4px 0 10px; }
.main-mine { margin-bottom: 18px; }
