/* =========================================================
   inLearning · Plataforma de Capacitación Comercial (demo)
   Sistema visual: morado inLearning #5d62a9 + naranja #ff6633,
   Poppins, motivo del "globo de pensamiento" del logo.
   ========================================================= */

:root {
  --morado: #5d62a9;
  --morado-600: #4f5499;
  --morado-700: #44488a;
  --morado-800: #33366c;
  --morado-900: #25274f;
  --morado-950: #1a1b3a;
  --morado-100: #e4e5f4;
  --morado-50: #f2f2fa;

  --naranja: #ff6633;
  --naranja-400: #ff8a5c;
  --naranja-txt: #c2410c;          /* naranja legible sobre blanco (AA) */
  --naranja-100: #ffe1d5;
  --naranja-50: #fff3ee;
  --grad-naranja: linear-gradient(100deg, #ea5a2c 0%, #f08a4b 100%);

  --tinta: #1d1e33;
  --tinta-2: #45475f;
  --tinta-3: #66688a;
  --fondo: #f5f5fb;
  --superficie: #ffffff;
  --borde: #e3e3ef;
  --borde-2: #d2d3e6;

  --ok: #15803d;
  --ok-500: #22a05a;
  --ok-50: #e8f6ee;
  --error: #c0263f;
  --error-50: #fdecef;
  --aviso: #a15c00;
  --aviso-50: #fff5e0;

  /* chat tipo WhatsApp */
  --wa-fondo: #efeae2;
  --wa-salida: #d9fdd3;
  --wa-entrada: #ffffff;
  --wa-header: #f0f2f5;
  --wa-verde: #128c7e;

  --radio: 14px;
  --radio-s: 10px;
  --radio-l: 20px;
  --sombra-1: 0 1px 2px rgba(29, 30, 51, .06), 0 1px 3px rgba(29, 30, 51, .05);
  --sombra-2: 0 6px 24px -8px rgba(37, 39, 79, .18), 0 2px 6px rgba(37, 39, 79, .06);
  --sombra-3: 0 24px 60px -18px rgba(37, 39, 79, .35);

  --blob: 58% 42% 55% 45% / 52% 56% 44% 48%;
  --blob-2: 46% 54% 42% 58% / 55% 45% 55% 45%;

  --demo-bar: 38px;
  --sidebar: 252px;
  --fuente: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--demo-bar) + 72px); }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--morado-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--naranja-txt); outline-offset: 2px; border-radius: 6px; }
.sidebar :focus-visible, .demo-bar :focus-visible, .hero :focus-visible { outline-color: var(--naranja); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Barra de demo ---------- */
.demo-bar {
  position: fixed; inset: 0 0 auto 0; height: var(--demo-bar); z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--morado-950); color: #d9daf0; font-size: 12.5px;
}
.demo-bar .tag {
  background: var(--naranja); color: var(--tinta); font-weight: 700; letter-spacing: .06em;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.demo-bar .demo-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar .roles { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.demo-bar .roles span { opacity: .75; margin-right: 4px; }
.demo-bar .roles a, .demo-bar button {
  color: #e9e9f8; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
  background: none; cursor: pointer; font-size: 12.5px; text-decoration: none; white-space: nowrap;
}
.demo-bar .roles a:hover, .demo-bar button:hover { background: rgba(255,255,255,.08); }
.demo-bar .roles a[aria-current="true"] { background: #fff; color: var(--morado-900); font-weight: 600; }
.demo-bar .reset { border-color: rgba(255,255,255,.22) !important; }

/* ---------- Estructura de la app ---------- */
.app { min-height: 100vh; padding-top: var(--demo-bar); }
.sidebar {
  position: fixed; top: var(--demo-bar); bottom: 0; left: 0; width: var(--sidebar); z-index: 40;
  background: var(--morado-900);
  background-image: radial-gradient(120% 60% at 0% 100%, rgba(255,102,51,.16), transparent 60%),
                    radial-gradient(90% 50% at 100% 0%, rgba(93,98,169,.55), transparent 70%);
  color: #e6e7f7; display: flex; flex-direction: column; padding: 22px 14px 18px;
  overflow-y: auto;
}
.sidebar .brand { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 18px; }
.sidebar .brand img { width: 150px; height: auto; }
.sidebar .brand small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #b8baf0; font-weight: 500; }
.sidebar .rol-chip {
  margin: 4px 6px 16px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
}
.sidebar .rol-chip b { display: block; color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.sidebar .rol-chip span { color: #b8baf0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .grupo { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #9497cf; padding: 14px 12px 6px; font-weight: 600; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #dcdcf3; font-size: 14px; font-weight: 500; text-decoration: none;
}
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 5px; border-radius: 0 6px 6px 0; background: var(--naranja);
}
.nav .sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); }
.nav .sub a { font-size: 13px; padding: 7px 10px; font-weight: 400; color: #c9cbee; }
.nav .sub a .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); flex: none; }
.nav .sub a .dot.ok { background: var(--ok-500); }
.nav .sub a .dot.curso { background: var(--naranja); }
.nav .badge-n { margin-left: auto; background: var(--naranja); color: var(--tinta); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.sidebar .pie { margin-top: auto; padding: 16px 10px 0; font-size: 11.5px; color: #a3a5d8; line-height: 1.5; }
.sidebar .pie a { color: #d7d8f5; }
.sidebar .salir { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #d7d8f5; font-size: 12.5px; }

.main { margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: var(--demo-bar); z-index: 30; height: 66px; display: flex; align-items: center; gap: 16px;
  padding: 0 32px; background: rgba(245,245,251,.88); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--borde);
}
.topbar .menu-btn { display: none; }
.topbar .migas { font-size: 12.5px; color: var(--tinta-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.topbar .migas a { color: var(--tinta-3); }
.topbar .migas b { color: var(--tinta); font-weight: 600; }
.topbar .acciones { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .hoy { font-size: 12.5px; color: var(--tinta-2); background: #fff; border: 1px solid var(--borde); padding: 6px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.topbar .hoy svg { width: 15px; height: 15px; color: var(--morado); }
.topbar .campana { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; display: grid; place-items: center; cursor: pointer; }
.topbar .campana svg { width: 18px; height: 18px; color: var(--tinta-2); }
.topbar .campana i { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--naranja); border: 2px solid #fff; }

.contenido { padding: 28px 32px 64px; max-width: 1280px; }
.encabezado { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.encabezado .titulos { flex: 1 1 380px; }
.encabezado .eyebrow, .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--naranja-txt); margin-bottom: 6px; display: block;
}
.encabezado p.lead, .lead { color: var(--tinta-2); margin-top: 6px; max-width: 70ch; }

/* ---------- Grillas ---------- */
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-aside { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seccion { margin-top: 30px; }
.seccion > .entre { margin-bottom: 14px; }
.muted { color: var(--tinta-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: var(--sombra-1); padding: 20px;
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { display: flex; align-items: center; gap: 8px; }
.card-h .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--morado-50); color: var(--morado); flex: none; }
.card-h .ico svg { width: 18px; height: 18px; }
.card.link { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card.link:hover { transform: translateY(-2px); box-shadow: var(--sombra-2); border-color: var(--borde-2); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; min-height: 42px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .1s; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--morado); color: #fff; box-shadow: 0 6px 16px -8px rgba(93,98,169,.8); }
.btn-primario:hover { background: var(--morado-700); }
.btn-acento { background: var(--naranja); color: var(--tinta); box-shadow: 0 6px 16px -8px rgba(255,102,51,.9); }
.btn-acento:hover { background: #ff7a4d; }
.btn-sec { background: #fff; color: var(--morado-700); border-color: var(--borde-2); }
.btn-sec:hover { border-color: var(--morado); background: var(--morado-50); }
.btn-fant { background: transparent; color: var(--morado-700); padding: 8px 12px; min-height: 36px; }
.btn-fant:hover { background: var(--morado-50); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-s { padding: 7px 14px; min-height: 34px; font-size: 13px; }
.btn-l { padding: 13px 24px; min-height: 50px; font-size: 15px; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-bloque { width: 100%; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--morado-50); color: var(--morado-700); white-space: nowrap; line-height: 1.6;
}
.chip svg { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-50); color: var(--ok); }
.chip.curso { background: var(--naranja-50); color: var(--naranja-txt); }
.chip.error { background: var(--error-50); color: var(--error); }
.chip.aviso { background: var(--aviso-50); color: var(--aviso); }
.chip.gris { background: #eeeef4; color: var(--tinta-2); }
.chip.borde { background: #fff; border: 1px solid var(--borde-2); color: var(--tinta-2); }
.chip.solido { background: var(--morado); color: #fff; }

/* ---------- Progreso ---------- */
.barra { height: 8px; border-radius: 999px; background: #ebebf4; overflow: hidden; }
.barra > i { display: block; height: 100%; border-radius: inherit; background: var(--morado); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.barra.naranja > i { background: var(--grad-naranja); }
.barra.ok > i { background: var(--ok-500); }
.barra.fina { height: 6px; }
.anillo { --p: 0; --t: 92px; width: var(--t); height: var(--t); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--naranja) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.anillo > div { width: calc(var(--t) - 16px); height: calc(var(--t) - 16px); border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: var(--morado-800); color: #fff; font-weight: 700; font-size: 20px; line-height: 1; }
.anillo > div small { display: block; font-size: 10px; font-weight: 500; opacity: .8; margin-top: 3px; letter-spacing: .04em; }
.anillo.claro { background: conic-gradient(var(--morado) calc(var(--p) * 1%), #ebebf4 0); }
.anillo.claro > div { background: #fff; color: var(--tinta); }

/* ---------- Avatares ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--morado-100); color: var(--morado-800);
  display: inline-grid; place-items: center; font-weight: 600; font-size: 14px; overflow: hidden; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.s { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.l { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.avatar.blob { border-radius: var(--blob); }
.avatar.naranja { background: var(--naranja-100); color: var(--naranja-txt); }
.persona { display: flex; align-items: center; gap: 10px; min-width: 0; }
.persona .avatar { display: inline-grid; }
.persona b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.persona span { display: block; font-size: 12.5px; color: var(--tinta-3); }

/* ---------- Motivo globo (logo) ---------- */
.globos { position: absolute; pointer-events: none; }
.globos i { position: absolute; display: block; border-radius: var(--blob); background: var(--grad-naranja); }
.globos i:nth-child(1) { width: 100%; height: 100%; }
.globos i:nth-child(2) { width: 28%; height: 26%; left: -16%; bottom: -10%; border-radius: var(--blob-2); }
.globos i:nth-child(3) { width: 10%; height: 9%; left: -26%; bottom: -22%; border-radius: 50%; }

/* ---------- Hero / banners ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radio-l); color: #fff; padding: 28px 30px;
  background: linear-gradient(120deg, var(--morado-800) 0%, var(--morado) 62%, #6c71b8 100%);
  box-shadow: var(--sombra-2);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 300px; border-radius: var(--blob);
  border: 2px solid rgba(255,255,255,.18); pointer-events: none;
}
.hero h1 { font-size: 28px; }
.hero p { color: #e6e7f8; }
.hero .eyebrow { color: #ffc2a8; }

/* ---------- Tablas ---------- */
.tabla-wrap { position: relative; overflow-x: auto; border-radius: var(--radio); border: 1px solid var(--borde); background: #fff; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabla th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-3); font-weight: 600;
  padding: 12px 14px; background: #fafafd; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: 12px 14px; border-bottom: 1px solid #efeff6; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr:hover td { background: #fbfbfe; }
.tabla tr.yo td { background: var(--naranja-50); }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tabs button:focus-visible, .tabs a:focus-visible { outline-offset: -3px; }
.tabs button, .tabs a {
  background: none; border: 0; padding: 11px 14px; font-weight: 500; font-size: 14px; color: var(--tinta-3); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 7px; align-items: center;
}
.tabs button svg, .tabs a svg { width: 16px; height: 16px; }
.tabs [aria-selected="true"] { color: var(--morado-700); border-bottom-color: var(--naranja); font-weight: 600; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label, .label { font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--borde-2); border-radius: var(--radio-s); background: #fff;
  font: inherit; font-size: 14px; color: var(--tinta);
}
.input:focus { outline: 2px solid var(--morado); outline-offset: 0; border-color: var(--morado); }
textarea.input { min-height: 84px; resize: vertical; }
.buscador { position: relative; }
.buscador svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--tinta-3); }
.buscador .input { padding-left: 38px; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--tinta-3); }
.kpi .l { font-size: 13px; color: var(--tinta-2); }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--ok); display: inline-flex; gap: 4px; align-items: center; }
.kpi .delta.neg { color: var(--error); }

/* ---------- Módulos (tarjetas de ruta) ---------- */
.modulo-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modulo-card .cover { position: relative; aspect-ratio: 16 / 8; background: var(--morado-100) center / cover no-repeat; }
.modulo-card .cover .n {
  position: absolute; left: 14px; top: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--blob);
  background: #fff; color: var(--morado-800); font-weight: 700; box-shadow: var(--sombra-1);
}
.modulo-card .cover .chip { position: absolute; right: 12px; top: 14px; box-shadow: var(--sombra-1); }
.modulo-card .cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.modulo-card .cuerpo p { font-size: 13.5px; color: var(--tinta-2); }
.modulo-card .meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--tinta-3); flex-wrap: wrap; }
.modulo-card .meta span { display: inline-flex; gap: 5px; align-items: center; }
.modulo-card .meta svg { width: 14px; height: 14px; }
.modulo-card .pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }

/* ---------- Semana (línea de tiempo) ---------- */
.semana { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.semana .paso { position: relative; padding: 0 14px 0 0; }
.semana .paso .punto {
  width: 38px; height: 38px; border-radius: var(--blob); display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: #ebebf4; color: var(--tinta-3); position: relative; z-index: 1;
}
.semana .paso .punto svg { width: 18px; height: 18px; }
.semana .paso::before { content: ""; position: absolute; left: 38px; right: 0; top: 18px; height: 3px; background: #ebebf4; border-radius: 3px; }
.semana .paso:last-child::before { display: none; }
.semana .paso.hecho .punto { background: var(--ok-500); color: #fff; }
.semana .paso.hecho::before { background: var(--ok-500); }
.semana .paso.ahora .punto { background: var(--naranja); color: var(--tinta); box-shadow: 0 0 0 6px var(--naranja-100); }
.semana .paso.ahora::before { background: linear-gradient(90deg, var(--naranja) 0 40%, #ebebf4 40%); }
.semana .paso .cuando { margin-top: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-3); }
.semana .paso.ahora .cuando { color: var(--naranja-txt); }
.semana .paso h3 { font-size: 14.5px; margin-top: 2px; }
.semana .paso p { font-size: 12.5px; color: var(--tinta-2); margin-top: 4px; padding-right: 6px; }

/* ---------- Escenarios ---------- */
.escenario-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.escenario-card .competencias .chip { white-space: normal; }
.escenario-card .foto { width: 64px; height: 64px; border-radius: var(--blob); object-fit: cover; }
.escenario-card.bloqueado { background: #fafafd; }
.escenario-card.bloqueado .foto { filter: grayscale(1); opacity: .6; }
.competencias { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Ranking ---------- */
.ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ranking li { display: grid; grid-template-columns: 28px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.ranking li .pos { font-weight: 700; color: var(--tinta-3); text-align: center; font-variant-numeric: tabular-nums; }
.ranking li.top1 .pos { color: #b7791f; }
.ranking li.yo { background: var(--naranja-50); outline: 1px solid var(--naranja-100); }
.ranking li .nota { font-weight: 700; font-variant-numeric: tabular-nums; }
.ranking li .persona span { font-size: 12px; }

/* ---------- Avisos ---------- */
/* .aviso es el recuadro; .chip.aviso es la variante ámbar del chip (no heredan entre sí) */
.aviso:not(.chip) { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radio-s); background: var(--morado-50); color: var(--tinta-2); font-size: 13.5px; }
.aviso:not(.chip) svg { width: 19px; height: 19px; flex: none; color: var(--morado); margin-top: 1px; }
.aviso.naranja { background: var(--naranja-50); }
.aviso.naranja svg { color: var(--naranja-txt); }
.aviso.ok { background: var(--ok-50); }
.aviso.ok svg { color: var(--ok); }
.aviso.error { background: var(--error-50); }
.aviso.error svg { color: var(--error); }

/* ---------- Toast / modal ---------- */
.toast-zona { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--tinta); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--sombra-3);
  display: flex; gap: 10px; align-items: center; animation: toastIn .3s ease; max-width: 380px; }
.toast svg { width: 18px; height: 18px; color: var(--naranja-400); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.modal-fondo { position: fixed; inset: 0; z-index: 80; background: rgba(26,27,58,.55); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s ease; }
.modal { background: #fff; border-radius: var(--radio-l); box-shadow: var(--sombra-3); width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; position: relative; }
.modal .cerrar { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--morado-50); cursor: pointer; display: grid; place-items: center; }
.modal .cerrar svg { width: 18px; height: 18px; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Varios ---------- */
.sep { height: 1px; background: var(--borde); margin: 16px 0; border: 0; }
.lista-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lista-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--tinta-2); }
.lista-check li svg { width: 18px; height: 18px; flex: none; color: var(--ok-500); margin-top: 1px; }
.lista-check li.no svg { color: #b9bad0; }
.vacio { text-align: center; padding: 34px 20px; color: var(--tinta-3); }
.nota-demo { font-size: 12px; color: var(--tinta-3); display: inline-flex; gap: 6px; align-items: center; }
.nota-demo svg { width: 14px; height: 14px; }
.ico-svg { width: 18px; height: 18px; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g-main-aside { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-bar .demo-txt { display: none; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--sombra-3); }
  body.nav-abierta .sidebar { transform: none; }
  body.nav-abierta::after { content: ""; position: fixed; inset: 0; background: rgba(26,27,58,.45); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; cursor: pointer; }
  .topbar .menu-btn svg { width: 20px; height: 20px; }
  .contenido { padding: 20px 16px 56px; }
  .g-3 { grid-template-columns: 1fr; }
  .demo-bar .demo-txt { display: none; }
}
@media (max-width: 720px) {
  .g-2, .g-4 { grid-template-columns: 1fr; }
  .semana { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .semana .paso:nth-child(2)::before { display: none; }
  .topbar .hoy { display: none; }
  h1, .hero h1 { font-size: 22px; }
  .hero { padding: 22px 20px; }
  .demo-bar { gap: 8px; padding: 0 10px; }
  .demo-bar .roles span { display: none; }
  .demo-bar .roles a, .demo-bar button { padding: 4px 7px; font-size: 11.5px; }
  .demo-bar .tag { display: none; }
  /* migas: en celular solo la página actual, en una línea */
  .topbar .migas { flex-wrap: nowrap; min-width: 0; overflow: hidden; }
  .topbar .migas > :not(:last-child) { display: none; }
  .topbar .migas b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toast-zona { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}
@media (max-width: 420px) {
  .semana { grid-template-columns: 1fr; }
  .semana .paso::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .demo-bar, .sidebar, .topbar, .toast-zona { display: none !important; }
  .main { margin: 0; }
  .app { padding: 0; }
  body { background: #fff; }
}
