/* ============================================================
   PRT-024 — Capacitaciones Motfware
   Paleta dark space: #060B18 / #00D4FF / #7C3AED
   Fuentes: Space Grotesk (títulos) + Inter (cuerpo)
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #060B18;
  --bg2:       #0D1525;
  --bg3:       #111927;
  --cyan:      #00D4FF;
  --cyan-dim:  #00B8DC;
  --purple:    #7C3AED;
  --purple-dim:#6D28D9;
  --text:      #E2E8F0;
  --text-dim:  #94A3B8;
  --border:    rgba(0,212,255,.15);
  --shadow:    0 4px 24px rgba(0,0,0,.5);
  --radius:    10px;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #fff; }

/* ── Layout helpers ───────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.text-center { text-align: center; }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2rem;
}

/* ── Botones ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--cyan);
  color: #060B18;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--cyan-dim); transform: translateY(-2px); text-decoration: none; color: #060B18; }
.btn-primary.btn-lg { font-size: 1.05rem; padding: 1rem 2.25rem; }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--cyan);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-ghost:hover { background: rgba(0,212,255,.1); text-decoration: none; }

.btn-purple {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-purple:hover { background: var(--purple-dim); transform: translateY(-2px); text-decoration: none; color: #fff; }

/* ── Flash messages ───────────────────────────────────────── */
.flash-success {
  background: rgba(0,212,255,.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.flash-error {
  background: rgba(239,68,68,.1);
  border: 1px solid #EF4444;
  color: #FCA5A5;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.flash-warning {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.45);
  color: #FCD34D;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

/* ── Powered by ───────────────────────────────────────────── */
.powered-by {
  text-align: center;
  padding: 1rem;
  font-size: .78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.powered-by a { display: inline-flex; align-items: center; }
.powered-logo { height: 18px; width: auto; vertical-align: middle; margin-left: .3rem; filter: brightness(0) invert(1); opacity: .7; }

body.layout-cap .powered-logo {
  filter: none;
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT: PUBLIC (landing)
   ════════════════════════════════════════════════════════════ */
.layout-public { }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 24px 4rem;
  background: radial-gradient(ellipse at 70% 30%, rgba(124,58,237,.22) 0%, transparent 55%),
              radial-gradient(ellipse at 15% 80%, rgba(0,212,255,.12) 0%, transparent 50%),
              var(--bg);
}
.hero-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* split: perfil | terminal */
.hero-split {
  flex-direction: row;
  align-items: center;
  gap: 4rem;
}

/* ── Hero perfil (columna izq) ──────────────────────────── */
.hero-profile {
  flex: 0 0 auto;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* avatar */
.profile-avatar {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.profile-avatar svg {
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,212,255,.25), 0 0 32px rgba(124,58,237,.3);
}
.profile-status {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-dim);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80;
  flex-shrink: 0;
}

/* nombre */
.profile-name {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0;
}
.name-accent { color: var(--cyan); }

/* rol */
.profile-role {
  font-size: .92rem;
  color: var(--text-dim);
  font-weight: 500;
  margin: 0;
}

/* descripción corta */
.profile-desc {
  font-size: .93rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}
.profile-desc strong { color: var(--text); }

/* badges */
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.pbadge {
  background: rgba(0,212,255,.07);
  border: 1px solid rgba(0,212,255,.22);
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 20px;
  font-family: var(--font-head);
}

/* ── Hero terminal (columna der) ─────────────────────────── */
.hero-terminal-wrap {
  flex: 1 1 0;
  min-width: 0;
}

/* terminal */
.hero-terminal {
  width: 100%;
  max-width: 680px;
  background: #0a1020;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,212,255,.08), var(--shadow);
  overflow: hidden;
}
.terminal-bar {
  background: #1a2035;
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red    { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green  { background: #28C840; }
.terminal-title {
  margin-left: auto;
  font-size: .78rem;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
}
.terminal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  font-family: 'Courier New', 'Fira Code', monospace;
  font-size: .92rem;
  min-height: 300px;
}
.term-line {
  color: var(--text);
  line-height: 1.75;
  min-height: 1.75em;
}
.term-line.cmd { color: var(--cyan); }
.term-line.out { color: #7DD3FC; }
.term-line.ok  { color: #4ADE80; }
.term-cursor {
  color: var(--cyan);
  animation: blink 1.1s step-end infinite;
  font-size: .92rem;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* CTA hero */
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── About ────────────────────────────────────────────────── */
.about {
  padding: 5rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: .9rem; }
.about-text strong { color: #fff; }
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 160px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: .82rem;
  color: var(--text-dim);
  margin-top: .2rem;
}

/* ── Skills ───────────────────────────────────────────────── */
.skills {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.skill-group--cyan  { border-top: 2px solid var(--cyan); }
.skill-group--purple { border-top: 2px solid var(--purple); }

.skill-group--cyan  .skill-cat { color: var(--cyan); }
.skill-group--purple .skill-cat { color: #C4B5FD; }

.skill-cat {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.25rem;
}

/* grid de iconos */
.skill-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .75rem;
}

.skill-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 10px;
  padding: 1rem .5rem .75rem;
  cursor: default;
  transition: border-color .2s, transform .2s, background .2s;
}
.skill-icon-card:hover {
  border-color: rgba(0,212,255,.3);
  background: rgba(0,212,255,.04);
  transform: translateY(-3px);
}

.skill-devicon {
  font-size: 2.2rem;
  line-height: 1;
}
.skill-si-icon {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}
.skill-si-icon--invert { filter: brightness(0) invert(1); }
.skill-emoji {
  font-size: 1.9rem;
  line-height: 1;
}
.skill-icon-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  font-family: var(--font-head);
  line-height: 1.2;
}

/* grid 2×2 compacto para las 4 categorías */
.skills-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Clientes / Proyectos ────────────────────────────────── */
.clientes {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}
.clientes-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 2rem;
}

/* contenedor con máscara fade en los bordes */
.clientes-track-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* banda animada */
.clientes-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: scroll-logos 30s linear infinite;
}
.clientes-track:hover { animation-play-state: paused; }

@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* cada logo */
.cliente-item {
  flex-shrink: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.4rem;
  background: #fff;
  border-radius: 10px;
  opacity: .55;
  transition: opacity .3s, transform .2s, box-shadow .2s;
}
.cliente-item:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,212,255,.15);
}
.cliente-item img {
  max-height: 44px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* ── Login ───────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 60% 30%, rgba(124,58,237,.2) 0%, transparent 55%), var(--bg);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.login-brand {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .5rem;
}
.login-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.login-sub {
  font-size: .85rem;
  color: var(--text-dim);
  margin: -.6rem 0 0;
}
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-dim); font-family: var(--font-head); }
.form-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .65rem .9rem;
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s;
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus { border-color: var(--cyan); }
.btn-block { width: 100%; justify-content: center; margin-top: .4rem; }
.field-error { font-size: .8rem; color: #FCA5A5; margin: .2rem 0 0; }
.has-error .form-input { border-color: rgba(239,68,68,.5); }
.flash-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #FCA5A5;
  border-radius: 8px;
  padding: .65rem .9rem;
  font-size: .88rem;
}

/* chips — mantener para uso interno */
.chip {
  background: rgba(0,212,255,.07);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--text);
  font-size: .8rem;
  padding: .2rem .65rem;
  border-radius: 20px;
}

/* ── Cap CTA ──────────────────────────────────────────────── */
.cap-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(124,58,237,.12) 0%, rgba(0,212,255,.06) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cap-cta-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer landing ───────────────────────────────────────── */
.footer {
  padding: 2.5rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--cyan);
}

/* ════════════════════════════════════════════════════════════
   LAYOUT: CAP (flujo participante)
   ════════════════════════════════════════════════════════════ */
.layout-cap { }

.cap-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

/* tarjeta de paso */
.cap-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}
.cap-card-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}
.cap-card-sub {
  color: var(--text-dim);
  font-size: .92rem;
  margin-bottom: 2rem;
}
.cap-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 2rem;
  display: block;
}

/* formulario */
.cap-form { display: flex; flex-direction: column; gap: 1.1rem; }
.cap-field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: .35rem;
}
.cap-field input, .cap-field select {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid rgba(0,212,255,.2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .65rem .9rem;
  outline: none;
  transition: border-color .2s;
}
.cap-field input:focus, .cap-field select:focus {
  border-color: var(--cyan);
}
.cap-field .error-msg {
  font-size: .8rem;
  color: #F87171;
  margin-top: .3rem;
}

/* elección cards */
.eleccion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.eleccion-card {
  background: var(--bg3);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.eleccion-card:hover { border-color: var(--cyan); background: rgba(0,212,255,.04); }
.eleccion-card.selected { border-color: var(--cyan); background: rgba(0,212,255,.08); }
.eleccion-card input[type=radio] { display: none; }
.eleccion-icon { font-size: 2.2rem; margin-bottom: .6rem; }
.eleccion-label { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: #fff; }
.eleccion-desc { font-size: .8rem; color: var(--text-dim); margin-top: .3rem; }

/* módulos lista */
.modulos-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin: 1rem 0 2rem; }
.modulo-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
}
.modulo-num {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  color: var(--cyan);
  min-width: 28px;
  text-align: center;
}
.modulo-titulo { font-size: .9rem; color: var(--text); }

/* quiz */
.quiz-pregunta {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.quiz-modulo-tag {
  font-size: .72rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}
.quiz-texto {
  font-weight: 500;
  color: #fff;
  margin-bottom: 1rem;
  font-size: .97rem;
}
.quiz-opciones { display: flex; flex-direction: column; gap: .5rem; }
.opcion-label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  background: var(--bg2);
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: .65rem .9rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.opcion-label:hover { border-color: var(--cyan); background: rgba(0,212,255,.04); }
.opcion-label input[type=radio]:checked + span { color: #fff; }
.opcion-label:has(input:checked) { border-color: var(--cyan); background: rgba(0,212,255,.08); }
.quiz-progress {
  font-size: .82rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* resultado */
.resultado-score {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
.score-num {
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}
.score-num.alta   { color: #4ADE80; }
.score-num.media  { color: #FBBF24; }
.score-num.baja   { color: #F87171; }
.score-label { font-size: .95rem; color: var(--text-dim); margin-top: .4rem; }
.resultado-msg { color: var(--text-dim); font-size: .95rem; margin: 1rem 0 1.5rem; text-align: center; }

/* ════════════════════════════════════════════════════════════
   LAYOUT: ADMIN
   ════════════════════════════════════════════════════════════ */
.layout-admin {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: #070b14;
}

/* sidebar */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  background: linear-gradient(180deg, #0a1220 0%, #070b14 100%);
  border-right: 1px solid rgba(148,163,184,.12);
  display: flex;
  flex-direction: column;
  padding: 1.35rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 1.15rem 1.1rem;
  border-bottom: 1px solid rgba(148,163,184,.12);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-logo {
  width: 54px;
  height: 36px;
  object-fit: contain;
  padding: .3rem .45rem;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.sidebar-brand-copy {
  min-width: 0;
}
.brand-motfware {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.brand-sub {
  display: block;
  font-size: .74rem;
  color: var(--text-dim);
  margin-top: .15rem;
}
.sidebar-panel {
  margin: 0 .95rem 1rem;
  padding: .95rem;
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 8px;
  background: rgba(15,23,42,.56);
}
.sidebar-panel-label {
  display: block;
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.sidebar-panel strong {
  display: block;
  color: #fff;
  font-family: var(--font-head);
  font-size: .94rem;
  line-height: 1.2;
}
.sidebar-panel small {
  display: block;
  color: var(--text-dim);
  font-size: .76rem;
  margin-top: .25rem;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  padding: 0 .85rem;
  flex: 1;
}
.nav-section-label {
  color: #64748B;
  font-family: var(--font-head);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 1rem .8rem .35rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 40px;
  padding: .58rem .72rem;
  border-radius: 8px;
  font-size: .9rem;
  color: #CBD5E1;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
  border: 1px solid transparent;
}
.nav-item:hover, .nav-item.active {
  background: rgba(0,212,255,.075);
  border-color: rgba(0,212,255,.18);
  color: var(--cyan);
  text-decoration: none;
}
.nav-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(148,163,184,.1);
  color: inherit;
  font-size: .9rem;
  flex: 0 0 24px;
}
.nav-icon svg,
.topbar-link svg,
.admin-user-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.nav-item.nav-cta {
  background: rgba(0,212,255,.11);
  color: var(--cyan);
  border-color: rgba(0,212,255,.2);
}
.nav-item.nav-cta:hover { background: rgba(0,212,255,.18); color: #fff; }

.sidebar-footer {
  padding: 1rem .95rem 0;
  border-top: 1px solid rgba(148,163,184,.12);
  font-size: .82rem;
}
.admin-user-pill {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 36px;
  margin-bottom: .75rem;
}
.admin-user-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,212,255,.1);
  color: var(--cyan);
  flex: 0 0 28px;
}
.admin-email {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  width: 100%;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: #FCA5A5;
  font-size: .82rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .15s;
}
.btn-logout:hover { background: rgba(239,68,68,.1); }

/* main content */
.admin-main {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  min-width: 0;
}
.admin-topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  padding: .9rem 1.6rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(148,163,184,.12);
  position: sticky;
  top: 0;
  background: rgba(7,11,20,.96);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.topbar-left {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.topbar-kicker {
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.topbar-title {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: nowrap;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 40px;
  color: var(--text-dim);
  font-size: .86rem;
  font-weight: 600;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.topbar-link-primary {
  color: var(--cyan);
  background: rgba(0,212,255,.08);
  border-color: rgba(0,212,255,.2);
}
.admin-content {
  padding: 1.6rem;
}
.topbar-link:hover {
  background: rgba(148,163,184,.1);
  color: #fff;
  text-decoration: none;
}
.topbar-link-primary:hover {
  background: rgba(0,212,255,.14);
  color: #fff;
}
.topbar-form {
  margin: 0;
}
.topbar-logout {
  min-height: 40px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: #FCA5A5;
  font-size: .84rem;
  font-weight: 700;
  padding: .5rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
}
.topbar-logout:hover {
  background: rgba(239,68,68,.14);
}
.profile-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.profile-row:last-of-type {
  border-bottom: 0;
}
.profile-row span {
  color: var(--text-dim);
  font-size: .86rem;
}
.profile-row strong {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-page-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2rem;
}

/* dashboard cards */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.dash-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.dash-num {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}
.dash-label {
  font-size: .82rem;
  color: var(--text-dim);
  margin-top: .35rem;
}

/* tablas admin */
.admin-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table thead tr {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  padding: .85rem 1.1rem;
  text-align: left;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-table td {
  padding: .85rem 1.1rem;
  color: var(--text);
  border-bottom: 1px solid rgba(0,212,255,.06);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(0,212,255,.03); }
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-active  { background: rgba(74,222,128,.12); color: #4ADE80; }
.badge-off     { background: rgba(239,68,68,.12);  color: #F87171; }
.badge-archive { background: rgba(148,163,184,.12); color: #94A3B8; }

/* formularios admin */
.admin-form { max-width: 560px; }
.admin-field { margin-bottom: 1.25rem; }
.admin-field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: .4rem;
}
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid rgba(0,212,255,.2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .93rem;
  padding: .65rem .9rem;
  outline: none;
  transition: border-color .2s;
}
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus { border-color: var(--cyan); }
.admin-field textarea { resize: vertical; min-height: 90px; }
.admin-field .hint { font-size: .78rem; color: var(--text-dim); margin-top: .3rem; }

/* QR box */
.qr-box {
  display: inline-block;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
}
.qr-url {
  font-size: .82rem;
  color: var(--cyan);
  word-break: break-all;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .5rem .85rem;
  display: inline-block;
  margin-top: .5rem;
  max-width: 100%;
}

/* acciones */
.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* ── Admin views ─────────────────────────────────────────── */
.admin-page {
  max-width: 1180px;
  margin: 0 auto;
}
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-head); font-size: 1.28rem; font-weight: 700;
  color: #fff; margin: 0;
}
.page-sub { font-size: .86rem; color: var(--text-dim); margin: .2rem 0 0; }

.stats-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .9rem; margin-bottom: 1.2rem;
}
.stat-card {
  background: rgba(13,21,37,.88);
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.stat-value { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; color: var(--cyan); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-dim); }

.admin-card {
  background: rgba(13,21,37,.88);
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 8px;
  padding: 1.1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}
.admin-card--narrow { max-width: 520px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-title { font-family: var(--font-head); font-size: .95rem; font-weight: 700; color: #fff; margin: 0; }
.table-wrap { overflow-x: auto; }

.badge--active { background: rgba(74,222,128,.12); color: #4ADE80; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge--off    { background: rgba(239,68,68,.12);  color: #F87171; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge--count  { background: rgba(0,212,255,.1);   color: var(--cyan); padding: .15rem .55rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }

.empty-state { color: var(--text-dim); font-size: .9rem; padding: 1rem 0; }
.empty-state a { color: var(--cyan); }
.text-dim  { color: var(--text-dim); }
.text-cyan { color: var(--cyan); }

.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }

.asignacion-form-card {
  max-width: 980px;
}

.asignacion-form {
  display: grid;
  gap: 1rem;
}

.asignacion-form .form-section {
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 8px;
  background: rgba(2,6,23,.22);
  padding: 1rem;
}

.asignacion-form .form-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .9rem;
}

.asignacion-form .form-section-head h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
}

.asignacion-form .form-section-head span {
  color: var(--text-dim);
  font-size: .78rem;
}

.asignacion-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.asignacion-form .form-grid--main {
  grid-template-columns: 1fr 1.2fr .7fr .55fr;
}

.asignacion-form .form-field {
  margin: 0;
}

.asignacion-form .form-label {
  display: block;
  margin-bottom: .35rem;
}

.asignacion-form .form-input {
  width: 100%;
}

.asignacion-form input[type=file].form-input {
  min-height: 42px;
  padding: .48rem .65rem;
  background: rgba(15,23,42,.86);
}

.asignacion-form .form-file-row {
  margin-top: .9rem;
}

.asignacion-form .form-hint {
  margin: .35rem 0 0;
  color: var(--text-dim);
  font-size: .78rem;
  word-break: break-word;
}

.asignacion-form .partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.asignacion-form .partner-card {
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 8px;
  background: rgba(15,23,42,.42);
  padding: .9rem;
  display: grid;
  gap: .75rem;
}

.asignacion-form .form-actions--sticky {
  justify-content: flex-end;
  margin-top: .2rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .9rem;
}
.course-module {
  min-height: 118px;
  background: rgba(13,21,37,.88);
  border: 1px solid rgba(148,163,184,.13);
  border-radius: 8px;
  padding: 1rem;
}
.course-module-number {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.course-module h2 {
  color: #fff;
  font-family: var(--font-head);
  font-size: .98rem;
  line-height: 1.3;
  margin-top: .6rem;
}

.btn-danger {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  color: #F87171; padding: .55rem 1.2rem; border-radius: 8px;
  font-size: .9rem; font-family: var(--font-body); cursor: pointer;
  text-decoration: none; transition: background .2s;
}
.btn-danger:hover { background: rgba(239,68,68,.18); }
.btn-sm { padding: .35rem .8rem !important; font-size: .82rem !important; }

/* session detail layout */
.session-detail { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: start; }
.qr-card { text-align: center; }
.qr-wrap { background: #fff; display: inline-block; padding: 1rem; border-radius: 12px; margin: .75rem 0; }
.qr-img  { display: block; width: 220px; height: 220px; }
.qr-hint { font-size: .8rem; color: var(--text-dim); margin: .5rem 0 0; }

@media (max-width: 700px) {
  .session-detail { grid-template-columns: 1fr; }
}

/* login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(124,58,237,.15) 0%, transparent 60%), var(--bg);
  padding: 2rem;
}
.login-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: .25rem;
}
.login-sub {
  font-size: .88rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-split {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-profile { max-width: 100%; align-items: center; }
  .profile-status { justify-content: center; }
  .profile-badges { justify-content: center; }
  .hero-cta { justify-content: center; }
  .hero-terminal-wrap { width: 100%; }
}

@media (max-width: 768px) {
  .skills-2x2 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; justify-content: space-around; }
  .eleccion-grid { grid-template-columns: 1fr; }

  .layout-admin {
    display: flex;
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    position: relative;
    padding: .9rem 0;
  }
  .sidebar-brand {
    padding: 0 1rem .9rem;
    margin-bottom: .65rem;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 .8rem;
  }
  .sidebar-panel { display: none; }
  .nav-section-label { display: none; }
  .nav-item {
    flex: 1 1 calc(50% - .25rem);
    min-width: 138px;
  }
  .admin-main { padding: 0; }
  .admin-topbar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: .9rem 1rem;
    gap: .8rem;
  }
  .topbar-actions {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .15rem;
  }
  .topbar-actions > * {
    flex: 0 0 auto;
  }
  .admin-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .asignacion-form .form-grid,
  .asignacion-form .form-grid--main,
  .asignacion-form .partner-grid {
    grid-template-columns: 1fr;
  }
}

/* Layout Capacitaciones: flujo participante */
body.layout-cap {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body), 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(13, 20, 37, 0.96) 0%, rgba(6, 8, 18, 0.98) 40%, #05070f 100%),
    radial-gradient(circle at 10% 0%, rgba(0, 212, 255, 0.24), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.18), transparent 28%);
  background-attachment: fixed;
  padding: 22px 14px 34px;
}

body.layout-cap .cap-wrapper {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

body.layout-cap .cap-page {
  width: 100%;
}

body.layout-cap:has(.cap-modules-page) .cap-wrapper,
body.layout-cap.cap-modules-layout .cap-wrapper {
  width: min(1180px, 100%);
}

body.layout-cap .cap-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(19, 27, 45, 0.94), rgba(13, 20, 33, 0.96));
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
  padding: 30px;
}

body.layout-cap .cap-register-card {
  padding: 24px;
}

body.layout-cap .cap-header {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(17, 24, 44, 0.72), rgba(14, 19, 35, 0.76));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 14px 18px;
}

body.layout-cap .cap-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.layout-cap .cap-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(0, 212, 255, 0.25));
}

body.layout-cap .cap-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.layout-cap .cap-brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f4f8ff;
  line-height: 1.1;
}

body.layout-cap .cap-brand-subtitle {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 0.77rem;
}

body.layout-cap .cap-brand-chip {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #dff9ff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(0, 212, 255, 0.11);
  white-space: nowrap;
}

body.layout-cap .cap-register-head {
  margin-bottom: 18px;
}

body.layout-cap .cap-kicker {
  margin: 0 0 8px;
  color: #00D4FF;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.layout-cap .cap-title {
  margin: 0;
  font-family: var(--font-head), 'Inter', sans-serif;
  color: #f8fbff;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.18;
}

body.layout-cap .cap-subtitle {
  margin: 9px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.48;
}

body.layout-cap .cap-modules-page .cap-card {
  padding: 26px;
}

body.layout-cap .cap-topics {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.layout-cap .cap-topic {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  animation: capTopicIn 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.06s);
  transition: border-color 0.2s ease;
}

@keyframes capTopicIn {
  to { opacity: 1; transform: none; }
}

body.layout-cap .cap-topic.is-open {
  border-color: rgba(0, 212, 255, 0.4);
}

body.layout-cap .cap-topic-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body.layout-cap .cap-topic-head:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.6);
  outline-offset: -2px;
  border-radius: 12px;
}

body.layout-cap .cap-topic-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

body.layout-cap .cap-topic-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

body.layout-cap .cap-topic-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.layout-cap .cap-topic-num {
  color: #9ee7ff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.layout-cap .cap-topic-title {
  color: #f5f8ff;
  font-family: var(--font-head), 'Inter', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}

body.layout-cap .cap-topic-chevron {
  flex: 0 0 auto;
  display: flex;
  transition: transform 0.25s ease;
}

body.layout-cap .cap-topic-chevron img {
  width: 20px;
  height: 20px;
}

body.layout-cap .cap-topic.is-open .cap-topic-chevron {
  transform: rotate(180deg);
}

body.layout-cap .cap-topic-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

body.layout-cap .cap-topic.is-open .cap-topic-body {
  max-height: 280px;
}

body.layout-cap .cap-topic-summary {
  margin: 0;
  padding: 2px 18px 16px;
  color: #aebcda;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  body.layout-cap .cap-topic {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

body.layout-cap .cap-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(4, 8, 18, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

body.layout-cap .cap-loader.is-active {
  display: flex;
}

body.layout-cap .cap-loader-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(0, 212, 255, 0.2);
  border-top-color: #00d4ff;
  animation: capSpin 0.8s linear infinite;
}

@keyframes capSpin {
  to { transform: rotate(360deg); }
}

body.layout-cap .cap-loader-text {
  color: #dbe6f2;
  font-size: 1rem;
  font-weight: 600;
}

body.layout-cap .cap-section-title {
  margin: 0 0 12px;
  font-family: var(--font-head), 'Inter', sans-serif;
  color: #eef4ff;
  font-size: 0.98rem;
  font-weight: 600;
}

body.layout-cap .cap-meta {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

body.layout-cap .cap-meta .cap-text {
  margin: 0;
  color: var(--text-dim);
}

body.layout-cap .cap-text strong {
  color: #f0f7ff;
}

body.layout-cap .cap-register-layout {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

body.layout-cap .card-elevated {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

body.layout-cap .cap-register-form {
  display: grid;
  gap: 12px;
}

body.layout-cap .cap-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

body.layout-cap .cap-label {
  color: #cfd9f1;
  font-size: 0.81rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body.layout-cap .cap-input,
body.layout-cap input[type='text'],
body.layout-cap input[type='email'],
body.layout-cap input[type='number'] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #f3f7ff;
  padding: 13px 12px;
  font-size: 0.96rem;
  line-height: 1.25;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

body.layout-cap .cap-input:focus,
body.layout-cap input:focus {
  border-color: rgba(0, 212, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

body.layout-cap .cap-actions {
  margin-top: 4px;
}

body.layout-cap .cap-btn,
body.layout-cap .btn-ghost,
body.layout-cap .btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 46px;
  width: 100%;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

body.layout-cap .cap-btn,
body.layout-cap .btn-primary {
  background: linear-gradient(90deg, #00D4FF 0%, #00d2a9 100%);
  color: #01141a;
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.18);
}

body.layout-cap .cap-btn:hover,
body.layout-cap .cap-btn:focus-visible,
body.layout-cap .btn-primary:hover,
body.layout-cap .btn-primary:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

body.layout-cap .cap-btn:focus-visible,
body.layout-cap .btn-primary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

body.layout-cap:has(.cap-quiz-page) .cap-wrapper,
body.layout-cap.cap-quiz-layout .cap-wrapper {
  width: min(980px, 100%);
}

body.layout-cap .cap-quiz-shell {
  padding: 26px;
}

body.layout-cap .cap-quiz-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}

body.layout-cap .cap-quiz-counter {
  min-width: 104px;
  border: 1px solid rgba(0, 212, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.08);
  padding: 12px 14px;
  text-align: center;
}

body.layout-cap .cap-quiz-counter strong {
  display: block;
  color: #e9fbff;
  font-family: var(--font-head), 'Inter', sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

body.layout-cap .cap-quiz-counter span {
  display: block;
  margin-top: 4px;
  color: #9fb0d1;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.layout-cap .cap-quiz-form {
  margin-top: 0;
  gap: 14px;
}

body.layout-cap .cap-quiz-card {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
}

body.layout-cap .cap-quiz-module {
  width: auto;
  max-width: 100%;
  padding: 0 8px;
  color: #9ee7ff;
  font-family: var(--font-head), 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

body.layout-cap .cap-quiz-question-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 4px 0 14px;
}

body.layout-cap .cap-quiz-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: #9ee7ff;
  font-family: var(--font-head), 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
}

body.layout-cap .cap-quiz-question {
  margin: 2px 0 0;
  color: #f4f8ff;
  font-family: var(--font-head), 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

body.layout-cap .cap-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.layout-cap .cap-quiz-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(7, 13, 24, 0.72);
  color: #dbe6fb;
  cursor: pointer;
  padding: 12px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

body.layout-cap .cap-quiz-option:hover,
body.layout-cap .cap-quiz-option:focus-within {
  border-color: rgba(0, 212, 255, 0.42);
  background: rgba(0, 212, 255, 0.07);
}

body.layout-cap .cap-quiz-option:has(input:checked) {
  border-color: rgba(0, 212, 255, 0.72);
  background: rgba(0, 212, 255, 0.12);
}

body.layout-cap .cap-quiz-option input[type='radio'] {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #00d4ff;
}

body.layout-cap .cap-quiz-option span {
  min-width: 0;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
}

body.layout-cap .cap-quiz-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

body.layout-cap .cap-quiz-actions .cap-btn {
  width: auto;
  min-width: 190px;
}

body.layout-cap .cap-errors {
  color: #ffb7bf;
  border-left: 3px solid #ff6d7b;
  background: rgba(255, 82, 102, 0.12);
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
}

body.layout-cap .cap-error-list {
  margin: 8px 0 0 18px;
  padding: 0;
  color: #ffd0d8;
  display: grid;
  gap: 6px;
}

body.layout-cap .cap-error-list li {
  margin: 0;
}

body.layout-cap .cap-register-page .powered-by {
  margin: 0 auto;
}

body.layout-cap .cap-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--text);
}

body.layout-cap .cap-modal.is-open {
  display: flex;
}

body.layout-cap .cap-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 12, 26, 0.78);
  cursor: pointer;
}

body.layout-cap .cap-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(84vh, 720px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 25, 45, 0.98), rgba(10, 18, 33, 0.98));
  padding: 18px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.52);
}

body.layout-cap .cap-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: inline-flex;
  border: 0;
  background: transparent;
  color: #d8e4ff;
  font-size: 1.25rem;
  cursor: pointer;
}

body.layout-cap .cap-modal-title {
  margin: 2px 0 0;
  color: #f4f8ff;
  font-size: 1.08rem;
  line-height: 1.2;
}

body.layout-cap .cap-modal-subtitle {
  margin: 4px 0 10px;
  color: var(--text-dim);
  font-size: 0.86rem;
}

body.layout-cap .cap-modal-body {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

body.layout-cap .cap-modal-description {
  margin: 0;
  color: #dce7ff;
  font-size: 0.92rem;
  line-height: 1.45;
}

body.layout-cap .cap-modal-empty,
body.layout-cap .cap-modal-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

body.layout-cap .cap-modal-hint {
  margin: 6px 0 0;
  color: #a9beff;
  font-size: 0.84rem;
}

body.layout-cap .cap-modal-viewer {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #02070f;
  min-height: 180px;
  display: grid;
  place-items: center;
}

body.layout-cap .cap-modal-viewer img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

body.layout-cap .cap-modal-viewer iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 10px;
}

body.layout-cap .cap-modal-link {
  width: 100%;
  margin-top: 2px;
}

@media (max-width: 720px) {
  body.layout-cap {
    padding: 16px 10px 28px;
  }

  body.layout-cap .cap-wrapper,
  body.layout-cap .powered-by {
    width: 100%;
  }

  body.layout-cap .cap-card {
    padding: 20px;
    border-radius: 14px;
  }

  body.layout-cap .cap-title {
    font-size: 1.22rem;
  }

  body.layout-cap .cap-btn {
    min-height: 44px;
    font-size: 0.92rem;
  }

  body.layout-cap .cap-quiz-shell {
    padding: 20px;
  }

  body.layout-cap .cap-quiz-head {
    grid-template-columns: 1fr;
  }

  body.layout-cap .cap-quiz-counter {
    width: 100%;
    text-align: left;
  }

  body.layout-cap .cap-quiz-question-row {
    grid-template-columns: 1fr;
  }

  body.layout-cap .cap-quiz-options {
    grid-template-columns: 1fr;
  }

  body.layout-cap .cap-quiz-actions .cap-btn {
    width: 100%;
  }
}

@media (min-width: 900px) {
  body.layout-cap .cap-register-layout {
    grid-template-columns: 0.95fr 1.1fr;
    align-items: start;
  }

  body.layout-cap .cap-register-page .cap-card {
    padding: 26px;
  }
}
