/* ═══════════════════════════════════════════════════════════
   ROLEPLAY K$ · Design system idéntico a grupo.kashagency.me
   Tokens extraídos 1:1 del panel real (Outfit + Bebas Neue)
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #101114;
  --panel: #16171b;
  --panel-2: #1b1d22;
  --panel-3: #23252b;
  --sidebar: #0c0d10;
  --sidebar-ink: #c9cdd3;
  --sidebar-ink-dim: #7e838c;
  --sidebar-border: #23252b;
  --ink: #d4d7dc;
  --ink-2: #a9aeb6;
  --ink-3: #7e838c;
  --ink-4: #565b63;
  --line: #2c2f36;
  --line-2: #23252b;
  --accent: #3fb6e8;
  --accent-hover: #63c6ef;
  --accent-ink: #0d1013;
  --accent-soft: #12242e;
  --ok: #45c98b;
  --ok-soft: #14291f;
  --warn: #e0b25b;
  --warn-soft: #2e2712;
  --bad: #e2685f;
  --bad-soft: #2e1714;
  --shadow-sm: 0 1px 2px #0009;
  --shadow: 0 2px 6px #00000080, 0 10px 24px -8px #0009;
  --shadow-lg: 0 6px 16px #0009, 0 28px 48px -12px #000000b3;
  --radius: 8px;
  --radius-sm: 5px;
  /* aliases de compatibilidad con el código existente */
  --card: var(--panel);
  --card-2: var(--panel-2);
  --accent-hi: var(--accent-hover);
  --danger: var(--bad);
  --text: var(--ink);
  --text-dim: var(--ink-3);
  --border: var(--line-2);
  --border-hi: var(--accent);
  --track: 0.05em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Bebas Neue', 'Outfit', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--ink);
}
h1 { font-size: 32px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }

.hidden { display: none !important; }
.dim { color: var(--ink-3); font-size: 13px; }
a { color: var(--accent); }

/* ── Layout con sidebar (idéntico al panel del grupo) ────── */
.con-sidebar { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  padding: 20px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sb-logo { display: flex; align-items: center; gap: 10px; padding: 0 4px 14px; }
.logo-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  color: #050505;
  background: var(--accent);
  border-radius: 7px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sb-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--sidebar-ink);
  text-transform: uppercase;
  white-space: nowrap;
}

.sb-sec {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--sidebar-ink-dim);
  padding: 14px 12px 6px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-ink);
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: transparent;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.sb-item:hover { background: rgba(255,255,255,0.04); color: var(--ink); }
.sb-item.activo { background: rgba(0, 191, 255, 0.1); color: var(--accent); }
.sb-item .ico { width: 18px; text-align: center; flex-shrink: 0; opacity: 0.85; }

.sb-foot { margin-top: auto; padding: 12px 4px 4px; display: flex; flex-direction: column; gap: 8px; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Topbar dentro del contenido ─────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 60px;
  flex-wrap: wrap;
}

/* Header legado (páginas /motor /system /owner sin sidebar) */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--sidebar);
  border-bottom: 1px solid var(--sidebar-border);
  position: sticky; top: 0; z-index: 10; gap: 16px; min-height: 60px;
}
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-text {
  font-family: 'Bebas Neue', sans-serif; font-size: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--sidebar-ink);
  white-space: nowrap;
}
.logo-text small { color: var(--sidebar-ink-dim); font-family: 'Outfit', sans-serif; font-size: 10.5px; letter-spacing: 0.12em; margin-left: 6px; }
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* Kicker de página (label PANEL sobre el H1) */
.kicker {
  font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}

.api-status { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.api-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.api-status.ok .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.api-status.bad .dot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

/* ── Botones (idénticos: pills uppercase 11px) ───────────── */
.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--panel);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.btn:hover { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: #4a2320; }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }

.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink-3); }
.btn-ghost:hover { background: var(--panel); color: var(--ink); }

/* ── Chips / badges ──────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 12px; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  cursor: default;
}

.badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0;
}
.badge.nivel { background: var(--accent-soft); color: var(--accent); }
.badge.compra { background: var(--ok-soft); color: var(--ok); }
.badge.interesado { background: var(--warn-soft); color: var(--warn); }
.badge.precio { background: var(--accent-soft); color: var(--accent); }
.badge.pregunta { background: var(--panel-3); color: var(--ink-2); }
.badge.enojado { background: var(--bad-soft); color: var(--bad); }

.rol-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.rol-owner { background: var(--accent); color: var(--accent-ink); }
.rol-admin { background: var(--accent-soft); color: var(--accent); border: 1px solid #1d3a4a; }
.rol-supervisor { background: var(--panel-3); color: var(--ink); }
.rol-usuario { background: transparent; color: var(--ink-3); border: 1px solid var(--line-2); }
.tono-positivo { background: var(--ok-soft); color: var(--ok); }
.tono-negativo { background: var(--bad-soft); color: var(--bad); }
.tono-neutro { background: var(--panel-3); color: var(--ink-2); }

/* ── Pantallas / hero ────────────────────────────────────── */
.screen { animation: fadeIn 0.25s ease; }
.hero { padding: 28px 28px 6px; }
.hero.centrado { text-align: center; padding-top: 48px; }
.hero h1 { font-size: 32px; }
.hero h1 .accent, .hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--ink-3); margin-top: 6px; font-size: 13.5px; }
.toolbar { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hero.centrado .toolbar { justify-content: center; }

/* ── Cards de simulación ─────────────────────────────────── */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding: 20px 28px 50px;
}

.sim-card {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.15s, background 0.15s;
  animation: fadeInUp 0.3s ease both;
  box-shadow: var(--shadow-sm);
}
.sim-card:hover { border-color: var(--line); background: var(--panel-2); }
.sim-card .card-top { display: flex; align-items: center; gap: 12px; }
.sim-card .avatar,
.chat-header .avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 2px solid var(--line);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 13px; font-weight: 700;
}
.sim-card h3 { font-size: 17px; letter-spacing: 0.05em; }
.sim-card .card-tag { font-size: 10px; color: var(--ink-4); letter-spacing: 0.1em; text-transform: uppercase; }
.sim-card p { color: var(--ink-3); font-size: 13px; flex: 1; }
.sim-card.loading { opacity: 0.5; pointer-events: none; }

.select {
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 10px; font-family: inherit; font-size: 12.5px;
}
.select:focus { outline: none; border-color: var(--accent); }

/* ── Chat ────────────────────────────────────────────────── */
.sim-layout { display: flex; gap: 14px; padding: 16px 24px; height: calc(100vh - 60px); }

.chat-panel {
  flex: 0 0 70%; max-width: 70%;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
}
.chat-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.chat-subtitle { font-size: 12px; color: var(--ink-3); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}

.msg {
  max-width: 72%; padding: 10px 14px;
  border-radius: var(--radius);
  white-space: pre-wrap; word-wrap: break-word;
  animation: fadeInUp 0.25s ease; font-size: 13.5px;
}
.msg.trainee { align-self: flex-start; background: var(--accent-soft); border: 1px solid #1d3a4a; border-bottom-left-radius: 3px; }
.msg.client { align-self: flex-end; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-right-radius: 3px; }
.msg .who { font-size: 10px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.msg.attachment { background: var(--panel-3); border: 1px dashed var(--line); font-size: 13px; }
.msg.attachment .file-chip { display: flex; align-items: center; gap: 9px; }
.msg.attachment img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.msg.attachment .file-ico { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.msg.typing { color: var(--ink-3); font-style: italic; }
.msg.typing .dots::after { content: ''; animation: dots 1.2s steps(4, end) infinite; }

.chat-inputbar {
  display: flex; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--line-2); background: var(--panel-2);
}
.chat-inputbar input {
  flex: 1; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink);
  font-family: inherit; font-size: 13.5px; outline: none;
}
.chat-inputbar input:focus { border-color: var(--accent); }

/* ── Panel lateral de contenido ──────────────────────────── */
.content-panel {
  flex: 1;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.meter-box { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.meter-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; color: var(--ink-2); }
.meter-top b { font-size: 16px; color: var(--ink); }
.meter-bar { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 4px; width: 0; background: linear-gradient(90deg, var(--bad), var(--warn) 45%, var(--ok) 85%); transition: width 0.5s ease; }
.meter-estado { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; min-height: 16px; }
.meter-estado.frio { color: var(--accent); }
.meter-estado.listo { color: var(--ok); font-weight: 600; }

.content-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.content-header h2 { font-size: 14px; }
.content-tabs { display: flex; gap: 5px; padding: 0 14px 10px; flex-wrap: wrap; }

/* Tabs idénticas al panel: 11.5px 600 uppercase */
.tab {
  background: transparent; border: 1px solid transparent;
  color: var(--ink-3); border-radius: 4px; padding: 6px 12px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  font-family: 'Outfit', sans-serif; cursor: pointer; transition: all 0.12s;
}
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab.active { background: var(--accent); color: var(--accent-ink); }

.content-grid {
  flex: 1; overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 9px; padding: 4px 14px 14px; align-content: start;
}
.file-card {
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  transition: border-color 0.12s; animation: fadeIn 0.25s ease;
}
.file-card:hover { border-color: var(--accent); }
.file-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--panel-3); }
.file-card .thumb-ico { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--panel-3); }
.file-card .meta { padding: 6px 8px; }
.file-card .fname { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.file-card .ftype { font-size: 10px; color: var(--ink-4); }
.content-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 26px 10px; }
.content-hint { font-size: 11px; color: var(--ink-4); padding: 10px 14px; border-top: 1px solid var(--line-2); }

/* ── Overlays / modales ──────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 9, 11, 0.78); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.login-box, .eval-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-lg);
  width: min(420px, 92vw); text-align: center; animation: fadeInUp 0.25s ease;
}
.eval-box { width: min(680px, 94vw); max-height: 88vh; overflow-y: auto; text-align: left; position: relative; }
.login-box h2 { margin-bottom: 6px; }
.login-box form { display: flex; gap: 10px; margin-top: 18px; }
.login-box input {
  flex: 1; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink);
  font-family: inherit; font-size: 14px; outline: none;
}
.login-box input:focus { border-color: var(--accent); }

.eval-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  font-size: 15px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2;
  transition: color 0.12s, border-color 0.12s;
}
.eval-close:hover { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }

/* ── Evaluación ──────────────────────────────────────────── */
.eval-score-ring { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.ring { width: 105px; height: 105px; flex-shrink: 0; }
.eval-cats { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eval-cat { font-size: 12px; color: var(--ink-2); }
.eval-cat .cat-bar { height: 6px; border-radius: 3px; background: var(--panel-3); margin-top: 3px; overflow: hidden; }
.eval-cat .cat-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.eval-lista { margin: 8px 0 14px; padding-left: 2px; }
.eval-lista li { margin: 6px 0; font-size: 13px; list-style: none; color: var(--ink-2); }
.eval-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 9px; margin: 12px 0; }

.metrica { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.metrica b { display: block; font-size: 20px; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.03em; color: var(--ink); }
.metrica span { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.metrica.destacada { background: var(--accent-soft); border-color: #1d3a4a; }
.metrica.destacada b { color: var(--accent); }

.score-pill { font-weight: 700; padding: 3px 10px; border-radius: 4px; display: inline-block; min-width: 40px; text-align: center; font-size: 12px; }
.score-alto { background: var(--ok-soft); color: var(--ok); }
.score-medio { background: var(--warn-soft); color: var(--warn); }
.score-bajo { background: var(--bad-soft); color: var(--bad); }

/* ── Tablas (headers 10px uppercase como el panel) ───────── */
.tabla { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); }
.tabla th, .tabla td { padding: 10px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.tabla th { background: var(--panel-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); font-weight: 600; }
.tabla tr:hover td { background: var(--panel-2); }
.tabla .clicable { cursor: pointer; }

/* ── Páginas de panel ────────────────────────────────────── */
.panel-page { max-width: 1160px; margin: 0 auto; padding: 24px 28px 50px; width: 100%; }
.panel-page.narrow { max-width: 720px; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h1 { font-size: 32px; }
.panel-foot { margin-top: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.dash-sec { margin-top: 28px; }
.dash-sec h2 { font-size: 18px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); display: flex; align-items: baseline; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }

/* ── Progreso del agente ─────────────────────────────────── */
.progreso-box {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 18px 20px; margin: 16px 28px 0;
  animation: fadeIn 0.3s ease; box-shadow: var(--shadow-sm);
}
.progreso-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progreso-top h3 { font-size: 14px; }
.progreso-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.progreso-stat { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.progreso-stat .label { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.progreso-stat .value { font-size: 22px; font-family: 'Bebas Neue', sans-serif; margin-top: 3px; color: var(--ink); }
.progreso-escenarios { display: flex; flex-direction: column; gap: 8px; }
.prog-esc { display: flex; align-items: center; gap: 12px; }
.prog-esc-nombre { flex: 0 0 42%; font-size: 13px; color: var(--ink-2); }
.prog-esc-nombre b { color: var(--ink); font-weight: 600; }
.prog-esc-bar { flex: 1; height: 7px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.prog-esc-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s; }
.prog-esc-info { flex: 0 0 auto; font-size: 11.5px; color: var(--ink-3); min-width: 130px; text-align: right; }

/* ── Opciones de inicio ──────────────────────────────────── */
.opciones-inicio {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin: 20px 28px 40px;
}
.opciones-inicio.home-2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
  max-width: 900px;
  margin: 40px auto;
}
.opciones-inicio.home-2 .opcion-card { padding: 60px 40px; }
.opciones-inicio.home-2 .opcion-card h2 { font-size: 34px; }
.opciones-inicio.home-2 .opcion-card p { font-size: 14px; max-width: 340px; margin: 0 auto; }
.opciones-inicio.home-2 .opcion-card .btn { padding: 12px 24px; font-size: 12px; margin-top: 14px; }
.opcion-card {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 32px 26px; text-align: center;
  transition: border-color 0.15s, background 0.15s;
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeInUp 0.3s ease both; box-shadow: var(--shadow-sm);
}
.opcion-card:hover { border-color: var(--line); background: var(--panel-2); }
.opcion-card.destacada { border-color: #1d3a4a; background: linear-gradient(170deg, var(--panel), var(--accent-soft)); }
.opcion-emoji { font-size: 38px; }
.opcion-card h2 { font-size: 21px; }
.opcion-card p { color: var(--ink-3); font-size: 13px; flex: 1; line-height: 1.55; }
.opcion-card .btn { align-self: center; margin-top: 8px; }

/* ── Masivo ──────────────────────────────────────────────── */
.masivo-layout { display: flex; gap: 14px; align-items: flex-start; }
.masivo-envio, .masivo-respuestas {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.masivo-envio { flex: 0 0 42%; }
.masivo-respuestas { flex: 1; }
.masivo-envio h2, .masivo-respuestas h2 { font-size: 15px; margin-bottom: 12px; }
.masivo-envio textarea, .editor-form textarea, .editor-form input {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--ink);
  font-family: inherit; font-size: 13.5px; outline: none; resize: vertical; margin-bottom: 10px;
}
.masivo-envio textarea:focus, .editor-form textarea:focus, .editor-form input:focus { border-color: var(--accent); }
.masivo-lista { max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.fan-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 12px; cursor: pointer;
  transition: border-color 0.12s; animation: fadeIn 0.25s ease;
}
.fan-row:hover { border-color: var(--accent); }
.fan-row .avatar {
  width: 34px; height: 34px; border-radius: var(--radius-sm); font-size: 11px;
  background: var(--panel-3); border: 2px solid var(--line); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-weight: 700; flex-shrink: 0;
}
.fan-row .fr-texto { flex: 1; min-width: 0; }
.fan-row .fr-nombre { font-weight: 600; font-size: 13px; color: var(--ink); }
.fan-row .fr-msg { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metricas { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 9px; }
.aviso-bloqueo {
  background: var(--bad-soft); border: 1px solid #4a2320;
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px;
  animation: fadeIn 0.25s; color: var(--ink); font-size: 13px;
}

/* ── Admin ───────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 5px; margin-bottom: 20px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; flex-wrap: wrap; }
.admin-sec { animation: fadeIn 0.2s ease; }
.admin-sec h2 { font-size: 18px; margin-bottom: 6px; }
.admin-sec > p.dim { margin-bottom: 14px; }
#admin-tonos-lista { display: flex; flex-direction: column; gap: 10px; }
.tono-fila {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
}
.tono-fila input, .tono-fila textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; color: var(--ink); font-family: inherit; font-size: 13px;
  outline: none; resize: vertical; width: 100%;
}
.tono-fila input:focus, .tono-fila textarea:focus { border-color: var(--accent); }
.tono-fila input { font-weight: 600; }
.tono-fila textarea { min-height: 84px; }

#admin-instruccion {
  width: 100%; min-height: 170px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--ink); font-family: inherit; font-size: 13.5px;
  outline: none; resize: vertical;
}
#admin-instruccion:focus { border-color: var(--accent); }

.reglas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
/* Pasos numerados del wizard "Lanzar roleplay" */
.pr-paso { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line-2); }
.pr-paso:first-of-type { border-top: none; }
.pr-paso-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #0d1013; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.pr-paso > div:last-child > .r-titulo { font-size: 15px; font-weight: 600; color: var(--ink); }

.regla-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.regla-box .r-titulo { font-weight: 600; margin-bottom: 3px; color: var(--ink); font-size: 13.5px; }
.regla-box .r-desc { font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; }
.regla-box .r-linea { display: flex; align-items: center; gap: 10px; }
.regla-box input[type=range] { flex: 1; accent-color: var(--accent); }
.regla-box .r-num {
  width: 56px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; padding: 5px 7px; color: var(--ink); font-family: inherit;
  font-size: 12.5px; text-align: center; outline: none;
}

.datos-layout { display: grid; grid-template-columns: 250px 1fr; gap: 14px; }
.datos-lista, .datos-editor { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; }
.datos-lista { max-height: 60vh; overflow-y: auto; }
.datos-editor { padding: 16px; }
.datos-editor label { display: block; font-size: 11px; color: var(--ink-3); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.datos-editor input, .datos-editor textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px; color: var(--ink);
  font-family: inherit; font-size: 13px; outline: none; resize: vertical;
}
.datos-editor input:focus, .datos-editor textarea:focus { border-color: var(--accent); }
.datos-editor textarea { font-family: 'SF Mono', 'Menlo', monospace; font-size: 12px; }
.datos-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.12s; font-size: 12.5px;
  color: var(--ink-2);
}
.datos-item:hover { background: var(--panel-2); }
.datos-item.activo { background: rgba(0, 191, 255, 0.1); color: var(--accent); }
.datos-item .di-nombre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Motor ───────────────────────────────────────────────── */
.motor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 8px; }
.motor-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 13px 15px; }
.motor-box .m-label { font-size: 10px; color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 5px; font-weight: 600; }
.motor-box .m-val { font-size: 14px; font-weight: 600; word-break: break-all; color: var(--ink); }
.motor-box .m-val.grande { font-family: 'Bebas Neue', sans-serif; font-size: 30px; line-height: 1; }
.motor-box .m-sub { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.motor-box.ok { border-color: #1d3a4a; }
.motor-box.bad { border-color: #4a2320; }

.motor-consumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 8px; }
.motor-config { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.motor-config label { display: block; font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px; font-weight: 600; }
.motor-config input, .motor-config select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; color: var(--ink); font-family: inherit; font-size: 13px; outline: none;
}
.motor-config input:focus, .motor-config select:focus { border-color: var(--accent); }
.motor-config .config-item { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 13px 15px; }
.motor-config .config-item small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 5px; }

.credito-simple { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow-sm); }
.credito-num { font-family: 'Bebas Neue', sans-serif; font-size: 68px; line-height: 1; letter-spacing: 0.01em; }
.credito-lbl { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px; font-weight: 600; }
.credito-foot { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.credito-desglose { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px auto 0; max-width: 520px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.credito-desglose > div { text-align: center; }
.credito-desglose b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 21px; color: var(--ink); }
.credito-desglose span { font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.credito-nota { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); text-align: left; }
.credito-nota b { font-size: 13.5px; color: var(--ink); }
.credito-nota p { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; line-height: 1.55; }

.intensidad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.intensidad-card {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 18px 14px 16px; cursor: pointer;
  text-align: center; transition: border-color 0.12s, background 0.12s; position: relative;
}
.intensidad-card:hover { border-color: var(--line); background: var(--panel-2); }
.intensidad-card.activo { border-color: var(--accent); background: var(--accent-soft); }
.int-emoji { font-size: 30px; margin-bottom: 7px; }
.int-nombre { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 0.04em; margin-bottom: 5px; color: var(--ink); }
.int-desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.45; min-height: 58px; }
.int-activo { margin-top: 9px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

.setting-avanzado { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 13px 15px; }
.setting-avanzado summary { cursor: pointer; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); user-select: none; font-weight: 600; }
.setting-avanzado[open] summary { color: var(--ink); margin-bottom: 12px; }

/* ── Owner ───────────────────────────────────────────────── */
.owner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 40px; }
.owner-card {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 26px 22px; cursor: pointer;
  display: flex; flex-direction: column; gap: 11px;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none; color: var(--ink); animation: fadeInUp 0.3s ease both;
  box-shadow: var(--shadow-sm);
}
.owner-card:hover { border-color: var(--line); background: var(--panel-2); }
.owner-card.destacada { border-color: #1d3a4a; }
.owner-emoji { font-size: 38px; }
.owner-card h2 { font-size: 21px; }
.owner-card p { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; flex: 1; }
.owner-cta { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--accent); }

/* ── System dash ─────────────────────────────────────────── */
.temp-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 15px 17px; }
.temp-label { font-size: 10px; color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.temp-value { font-family: 'Bebas Neue', sans-serif; font-size: 50px; line-height: 1; margin: 8px 0; }
.temp-value.score-alto { color: var(--ok); background: none; }
.temp-value.score-medio { color: var(--warn); background: none; }
.temp-value.score-bajo { color: var(--bad); background: none; }
.temp-bar { height: 9px; background: var(--panel-3); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.temp-fill { height: 100%; background: linear-gradient(90deg, var(--bad), var(--warn) 50%, var(--ok) 90%); transition: width 0.5s; }

.tono-bar { display: flex; height: 30px; border-radius: 4px; overflow: hidden; margin-top: 10px; background: var(--panel-3); }
.tono-seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--accent-ink); transition: width 0.4s; }
.tono-seg.pos { background: var(--ok); }
.tono-seg.neu { background: var(--ink-4); color: #000; }
.tono-seg.neg { background: var(--bad); color: #fff; }
.tono-leyenda { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--ink-3); }
.tono-leyenda .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.tono-leyenda .pos { background: var(--ok); }
.tono-leyenda .neu { background: var(--ink-4); }
.tono-leyenda .neg { background: var(--bad); }

.scores-chart { padding: 8px 0; }
.bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; align-items: end; }
.bar-col { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bar { width: 100%; min-height: 4px; border-radius: 2px 2px 0 0; }
.bar.pos { background: var(--ok); }
.bar.neu { background: var(--warn); }
.bar.neg { background: var(--bad); }
.bar-val { font-size: 10.5px; color: var(--ink-3); }
.bar-lbl { font-size: 9.5px; color: var(--ink-4); letter-spacing: 0.04em; }

/* ── Editor / supervisor extra ───────────────────────────── */
.editor-form label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.editor-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.spark { display: block; }
.sup-seccion { margin-top: 24px; }
.sup-seccion h2 { font-size: 16px; margin-bottom: 10px; }
.transcript-view { max-height: 55vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px; margin-top: 10px; }
.tv-msg { margin-bottom: 10px; font-size: 13px; white-space: pre-wrap; color: var(--ink-2); }
.tv-msg .tv-quien { font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.tv-msg.tv-trainee { border-left: 3px solid var(--accent); padding-left: 10px; }
.tv-msg.tv-cliente { border-left: 3px solid var(--line); padding-left: 10px; }
.tv-msg.tv-sistema { opacity: 0.5; font-style: italic; }

.ver-como { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.ver-como select {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 9px; color: var(--ink); font-family: inherit; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ver-como select:focus { outline: none; border-color: var(--accent); }

#roles-tabla { margin-top: 10px; }
#roles-tabla td .rol-select {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 9px; color: var(--ink); font-family: inherit; font-size: 12px;
}
#roles-tabla td .btn-mini { padding: 5px 9px; font-size: 10px; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 20px; font-size: 13px;
  box-shadow: var(--shadow-lg); z-index: 100; animation: fadeInUp 0.25s ease;
  max-width: 80vw; color: var(--ink);
}
.toast.error { border-color: var(--bad); background: var(--bad-soft); }

/* ── Animaciones / scrollbars / responsive ───────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

@media (max-width: 980px) {
  .sidebar { display: none; }
  .sim-layout { flex-direction: column; height: auto; }
  .chat-panel { flex: none; max-width: 100%; height: 65vh; }
  .content-panel { max-height: 45vh; }
  .tono-fila { grid-template-columns: 1fr; }
  .datos-layout { grid-template-columns: 1fr; }
  .datos-lista { max-height: 200px; }
  .editor-form .grid2 { grid-template-columns: 1fr; }
  .masivo-layout { flex-direction: column; }
  .masivo-envio { flex: none; width: 100%; }
  .ver-como { display: none; }
}
