/* ══════════════════════════════════════════
   ACADEMIA RETIMBRASUR — Sistema de diseño
   (tokens del ecosistema retimbrasur.com)
══════════════════════════════════════════ */
:root {
  --bg:       #07090f;
  --bg2:      #0c1018;
  --bg3:      #111720;
  --bg4:      #182030;
  --bg5:      #1e2840;
  --orange:   #e8610a;
  --orange2:  #ff7a2a;
  --orange-d: #b84d08;
  --og15:     rgba(232,97,10,.15);
  --og10:     rgba(232,97,10,.10);
  --og06:     rgba(232,97,10,.06);
  --og40:     rgba(232,97,10,.40);
  --text:     #dce6f0;
  --text2:    #8a96a6;
  --text3:    #526070;
  --border:   rgba(255,255,255,.07);
  --border2:  rgba(255,255,255,.12);
  --green:    #22c55e;
  --red:      #ef4444;
  --blue:     #60a5fa;
  --gold:     #f59e0b;
  --r:        10px;
  --r2:       14px;
  --fd:       'Syne', sans-serif;
  --fb:       'DM Sans', sans-serif;
  --sh: 0 4px 32px rgba(0,0,0,.5);
  --glow-sm: 0 0 12px rgba(232,97,10,.25);
  --tsm: cubic-bezier(.23,1,.32,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--fb); font-size: 14.5px; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased; letter-spacing: .01em;
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: rgba(232,97,10,.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange-d); }

/* ══ NAV ══ */
nav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 60px;
  background: rgba(7,9,15,.88); backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 1px 24px rgba(0,0,0,.35);
}
.logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; transition: transform .3s ease; }
.logo:hover { transform: scale(1.05); }
.logo-flame {
  width: 26px; height: 26px;
  background: linear-gradient(160deg, var(--orange2), var(--orange-d));
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  filter: brightness(2) contrast(1.25) grayscale(1) drop-shadow(0 0 10px rgba(255,107,53,.3));
  transition: filter .3s ease, transform .3s ease;
}
.logo:hover .logo-flame { filter: brightness(1) contrast(1) grayscale(0) drop-shadow(0 0 10px rgba(255,107,53,.5)); }
.logo-text { font-family: 'Outfit', var(--fd), sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: -.6px; color: #fff; }
.logo-text b { color: rgb(255,107,53); font-weight: 800; }
.nav-links { display: flex; gap: .15rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text2); font-size: .85rem; font-weight: 500;
  padding: .38rem .9rem; border-radius: 7px; transition: color .25s var(--tsm), background .25s var(--tsm), transform .2s var(--tsm);
}
.nav-links a:hover { color: #fff; background: var(--bg3); transform: translateY(-1px); }
.nav-links a.active { color: var(--orange); text-shadow: 0 0 12px rgba(232,97,10,.35); }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-user {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg3); border: 1px solid var(--border);
  padding: .35rem .8rem .35rem .45rem; border-radius: 999px;
  cursor: pointer; text-decoration: none; color: var(--text);
  transition: border-color .25s, box-shadow .25s, transform .2s var(--tsm);
}
.nav-user:hover { border-color: var(--og40); box-shadow: var(--glow-sm); transform: translateY(-1px); }
.nav-user-av {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fd); font-weight: 800; font-size: .62rem; color: #fff;
}
.nav-user span { font-size: .82rem; font-weight: 500; }
.btn-admin {
  display: flex; align-items: center; gap: .45rem;
  background: transparent; border: 1px solid var(--border2); color: var(--text);
  padding: .4rem 1rem; border-radius: 8px; font-size: .83rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: border-color .25s, background .25s, box-shadow .25s, transform .2s var(--tsm);
}
.btn-admin:hover { border-color: var(--orange); background: var(--og06); transform: translateY(-1px); box-shadow: var(--glow-sm); }

/* ══ CONTENEDORES ══ */
.wrap { max-width: 1100px; margin: 0 auto; padding: 2.25rem 2.5rem 5rem; width: 100%; flex: 1; }
.wrap-ancho { max-width: 1300px; }
.wrap-lectura { max-width: 860px; }

/* ══ HERO ══ */
.hero { position: relative; overflow: hidden; padding: 3rem 2.5rem 2.25rem; }
.hero-mesh {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 75% at 10% 50%, rgba(232,97,10,.09) 0%, transparent 70%),
    radial-gradient(ellipse 35% 55% at 90% 20%, rgba(232,97,10,.065) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,.4) 40%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.hero-label {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--og10); border: 1px solid rgba(232,97,10,.35); color: var(--orange);
  font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .32rem .9rem; border-radius: 999px; margin-bottom: 1.1rem;
  box-shadow: var(--glow-sm); animation: subtlePulse 3s ease-in-out infinite;
}
.hero-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: blink 1.8s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes subtlePulse { 0%,100%{box-shadow:0 0 0 0 rgba(232,97,10,.2)} 50%{box-shadow:0 0 0 4px rgba(232,97,10,.05)} }
.hero h1 {
  font-family: var(--fd); font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.05; letter-spacing: -.04em;
  margin-bottom: .8rem; text-shadow: 0 2px 30px rgba(232,97,10,.12);
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero-desc { color: var(--text2); font-size: .95rem; font-weight: 400; max-width: 560px; line-height: 1.7; letter-spacing: .015em; }

/* ══ TARJETAS DE CURSO ══ */
.grid-cursos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.card-curso {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r2);
  padding: 1.4rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .8rem;
  position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .25s var(--tsm);
}
.card-curso:hover { border-color: var(--og40); box-shadow: var(--glow-sm); transform: translateY(-3px); }
.card-curso::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent); opacity: 0; transition: opacity .3s;
}
.card-curso:hover::before { opacity: 1; }
.curso-icono { font-size: 1.9rem; line-height: 1; }
.curso-titulo { font-family: var(--fd); font-weight: 700; font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }
.curso-desc { font-size: .82rem; color: var(--text2); flex: 1; }
.curso-meta { display: flex; align-items: center; gap: .9rem; font-size: .73rem; color: var(--text3); }
.curso-pie { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.curso-pct { font-family: var(--fd); font-weight: 800; font-size: .85rem; color: var(--orange); flex-shrink: 0; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: .28rem;
  font-size: .63rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .18rem .52rem; border-radius: 4px; flex-shrink: 0; white-space: nowrap;
}
.b-ok    { background: rgba(34,197,94,.1); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.b-curso { background: rgba(96,165,250,.1); color: var(--blue); border: 1px solid rgba(96,165,250,.2); }
.b-pend  { background: var(--og10); color: var(--orange); border: 1px solid var(--og40); }
.b-no    { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }

/* barra de progreso */
.prog-bar { height: 5px; border-radius: 3px; background: var(--bg4); overflow: hidden; width: 100%; }
.prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--orange), var(--orange2)); transition: width .6s ease; }

/* ══ PÁGINA DE CURSO (temario) ══ */
.curso-cab { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.curso-cab-icono {
  width: 64px; height: 64px; border-radius: var(--r2); font-size: 1.9rem; flex-shrink: 0;
  background: var(--og10); border: 1px solid var(--og40);
  display: flex; align-items: center; justify-content: center;
}
.curso-cab h1 { font-family: var(--fd); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.15; margin-bottom: .35rem; }
.curso-cab p { color: var(--text2); font-size: .9rem; max-width: 640px; }

.modulo { margin-bottom: 1.5rem; }
.modulo-tit {
  font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--text3);
  margin-bottom: .55rem; display: flex; align-items: center; gap: .55rem;
}
.modulo-tit .num { color: var(--orange); font-family: var(--fd); }
.lecciones-lista { display: flex; flex-direction: column; }
.leccion-item {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem 1rem; background: var(--bg2);
  border: 1px solid var(--border); border-bottom: none;
  text-decoration: none; color: inherit;
  transition: background .2s var(--tsm), transform .2s var(--tsm), box-shadow .25s;
}
.leccion-item:first-child { border-radius: var(--r2) var(--r2) 0 0; }
.leccion-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--r2) var(--r2); }
.leccion-item:only-child { border-radius: var(--r2); }
.leccion-item:hover { background: var(--bg3); transform: translateX(2px); box-shadow: inset 0 0 0 1px rgba(232,97,10,.08); }
.leccion-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--bg5); display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #fff;
}
.leccion-check.done { background: var(--green); border-color: var(--green); }
.leccion-nombre { flex: 1; font-size: .88rem; font-weight: 500; }
.leccion-dur { font-size: .72rem; color: var(--text3); flex-shrink: 0; }

/* ══ LECCIÓN (contenido) ══ */
.leccion-ruta { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: .6rem; }
.leccion-ruta a { color: var(--text3); text-decoration: none; }
.leccion-ruta a:hover { color: var(--orange); }
.contenido { margin-top: 1.25rem; }
.contenido h1 { font-family: var(--fd); font-weight: 800; font-size: 1.65rem; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 1rem; }
.contenido h2 {
  font-family: var(--fd); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em;
  margin: 1.75rem 0 .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}
.contenido h3 { font-family: var(--fd); font-weight: 700; font-size: .95rem; margin: 1.25rem 0 .5rem; color: var(--orange2); }
.contenido p { margin-bottom: .85rem; color: var(--text); font-size: .92rem; line-height: 1.75; }
.contenido ul, .contenido ol { margin: 0 0 .95rem 1.35rem; }
.contenido li { margin-bottom: .4rem; font-size: .92rem; line-height: 1.7; }
.contenido strong { color: #fff; }
.contenido table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.25rem; font-size: .84rem; }
.contenido th {
  text-align: left; padding: .55rem .8rem; background: var(--bg4);
  font-family: var(--fd); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--orange2); border: 1px solid var(--border);
}
.contenido td { padding: .55rem .8rem; border: 1px solid var(--border); background: var(--bg2); vertical-align: top; }
.contenido tr:hover td { background: var(--bg3); }

/* cajas de aviso */
.caja { border-radius: var(--r); padding: .9rem 1.1rem; margin: 1rem 0 1.25rem; font-size: .87rem; border: 1px solid; }
.caja .caja-tit { font-family: var(--fd); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; display: block; }
.caja-clave { background: var(--og06); border-color: var(--og40); }
.caja-clave .caja-tit { color: var(--orange); }
.caja-peligro { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.35); }
.caja-peligro .caja-tit { color: var(--red); }
.caja-norma { background: rgba(96,165,250,.06); border-color: rgba(96,165,250,.3); }
.caja-norma .caja-tit { color: var(--blue); }
.caja-taller { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.3); }
.caja-taller .caja-tit { color: var(--green); }

/* navegación lección */
.leccion-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; }
.leccion-nav form { display: contents; }

/* ══ BOTONES ══ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--orange); border: none; color: #fff;
  font-family: var(--fd); font-weight: 700; font-size: .875rem;
  padding: .6rem 1.4rem; border-radius: 8px; cursor: pointer; text-decoration: none;
  letter-spacing: .02em; white-space: nowrap; position: relative; overflow: hidden;
  transition: background .2s, transform .2s var(--tsm), box-shadow .3s;
  box-shadow: 0 4px 16px rgba(232,97,10,.3);
}
.btn:hover { background: var(--orange2); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232,97,10,.45); }
.btn-sec {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--border2); color: var(--text2);
  font-family: var(--fb); font-size: .875rem; font-weight: 500;
  padding: .6rem 1.3rem; border-radius: 8px; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--tsm);
}
.btn-sec:hover { background: var(--bg3); color: var(--text); border-color: var(--og40); transform: translateY(-1px); }
.btn-verde { background: var(--green); box-shadow: 0 4px 16px rgba(34,197,94,.3); }
.btn-verde:hover { background: #16a34a; box-shadow: 0 6px 24px rgba(34,197,94,.4); }

/* ══ LOGIN / PORTADA ══ */
.login-grid {
  position: relative; z-index: 1; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
  padding: 3.5rem 2.5rem 4rem;
}
.login-feats { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.9rem; }
.login-feat { display: flex; gap: .9rem; align-items: flex-start; }
.login-feat-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; font-size: 1.05rem;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.login-feat strong { display: block; font-family: var(--fd); font-size: .88rem; font-weight: 700; }
.login-feat span { font-size: .78rem; color: var(--text2); }
.panel-login {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 18px;
  padding: 1.9rem; box-shadow: var(--sh), 0 0 80px rgba(232,97,10,.06);
}
.panel-login h2 { font-family: var(--fd); font-weight: 700; font-size: 1.2rem; margin-bottom: .3rem; }
.panel-login .sub { font-size: .8rem; color: var(--text2); margin-bottom: 1.4rem; }

.fl { margin-bottom: 1.05rem; }
.fl-label { display: block; font-size: .72rem; font-weight: 700; color: var(--text2); margin-bottom: .4rem; letter-spacing: .07em; text-transform: uppercase; }
.fl-input, .fl-select, .fl-ta {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--fb); font-size: .9rem;
  padding: .65rem 1rem; border-radius: 8px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.fl-input:focus, .fl-select:focus, .fl-ta:focus { border-color: var(--og40); box-shadow: 0 0 0 3px var(--og06), 0 0 16px rgba(232,97,10,.1); }
.fl-input::placeholder { color: var(--text3); }
.fl-select option { background: var(--bg3); }
.fl-ta { min-height: 130px; resize: vertical; line-height: 1.6; }

.alerta { border-radius: var(--r); padding: .7rem 1rem; margin-bottom: 1.1rem; font-size: .84rem; border: 1px solid; }
.alerta-err { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); color: #fca5a5; }
.alerta-ok  { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.35); color: #86efac; }
.alerta-info{ background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.3); color: #93c5fd; }

/* ══ TEST ══ */
.pregunta {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r2);
  padding: 1.25rem 1.4rem; margin-bottom: 1.1rem;
}
.pregunta-num { font-family: var(--fd); font-weight: 800; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: .45rem; }
.pregunta-txt { font-weight: 600; font-size: .95rem; margin-bottom: .85rem; line-height: 1.5; }
.opcion {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .6rem .85rem; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: .45rem; cursor: pointer; font-size: .88rem;
  transition: border-color .2s, background .2s;
}
.opcion:hover { border-color: var(--og40); background: var(--og06); }
.opcion input { margin-top: .2rem; accent-color: var(--orange); }
.opcion.correcta { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.07); }
.opcion.incorrecta { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.07); }
.explicacion { font-size: .8rem; color: var(--text2); border-left: 3px solid var(--og40); padding: .4rem .8rem; margin-top: .6rem; background: var(--og06); border-radius: 0 8px 8px 0; }

.nota-panel {
  text-align: center; padding: 2.25rem 1.5rem; border-radius: 18px; margin-bottom: 1.75rem;
  background: var(--bg2); border: 1px solid var(--border2);
}
.nota-grande { font-family: var(--fd); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.nota-grande.ok { color: var(--green); text-shadow: 0 0 30px rgba(34,197,94,.3); }
.nota-grande.mal { color: var(--red); text-shadow: 0 0 30px rgba(239,68,68,.3); }

/* ══ TABLAS ADMIN ══ */
.tabla { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 1rem; }
.tabla th {
  text-align: left; padding: .6rem .9rem; background: var(--bg3);
  font-family: var(--fd); font-weight: 700; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text3); border-bottom: 1px solid var(--border2);
}
.tabla td { padding: .65rem .9rem; border-bottom: 1px solid var(--border); background: var(--bg2); }
.tabla tr:hover td { background: var(--bg3); }
.tabla .mini { font-size: .72rem; color: var(--text3); }

.stat-fila { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 .5rem; }
.stat-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r2);
  padding: .9rem 1.4rem; min-width: 150px;
  transition: border-color .3s, box-shadow .3s, transform .25s var(--tsm);
}
.stat-card:hover { border-color: var(--og40); box-shadow: var(--glow-sm); transform: translateY(-2px); }
.stat-n { font-family: var(--fd); font-weight: 800; font-size: 1.8rem; color: var(--orange); line-height: 1.1; text-shadow: 0 0 20px rgba(232,97,10,.25); }
.stat-l { font-size: .7rem; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-top: .2rem; }

.sec-tit { font-family: var(--fd); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; margin: 2rem 0 .4rem; }
.sec-sub { color: var(--text2); font-size: .85rem; margin-bottom: .75rem; }

/* ══ CERTIFICADO ══ */
.certificado {
  max-width: 880px; margin: 2.5rem auto; padding: 3.2rem 3.5rem;
  background: var(--bg2); border: 1px solid var(--og40); border-radius: 4px;
  position: relative; text-align: center;
  box-shadow: 0 0 60px rgba(232,97,10,.08);
}
.certificado::before {
  content: ''; position: absolute; inset: 10px; border: 1px solid var(--border2); border-radius: 2px; pointer-events: none;
}
.cert-marca { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.6rem; color: #fff; margin-bottom: .4rem; }
.cert-marca b { color: rgb(255,107,53); }
.cert-tipo { font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); margin-bottom: 2rem; }
.cert-otorga { font-size: .85rem; color: var(--text2); }
.cert-nombre { font-family: var(--fd); font-weight: 800; font-size: 2.1rem; margin: .6rem 0; letter-spacing: -.02em; }
.cert-curso { font-family: var(--fd); font-weight: 700; font-size: 1.15rem; color: var(--orange2); margin: .5rem 0 1.5rem; }
.cert-datos { display: flex; justify-content: center; gap: 2.5rem; margin-top: 2rem; font-size: .8rem; color: var(--text2); flex-wrap: wrap; }
.cert-datos strong { display: block; color: var(--text); font-size: .95rem; font-family: var(--fd); }
.cert-pie { margin-top: 2.5rem; font-size: .7rem; color: var(--text3); }

@media print {
  body { background: #fff; color: #111; }
  nav, footer, .no-print { display: none !important; }
  .certificado { border-color: #e8610a; box-shadow: none; background: #fff; color: #111; margin: 0 auto; }
  .cert-marca { color: #111; }
  .cert-nombre, .cert-datos strong { color: #111; }
  .cert-otorga, .cert-datos, .cert-pie { color: #444; }
}

/* ══ FOOTER ══ */
footer { border-top: 1px solid var(--border); padding: 1.5rem 2.5rem; text-align: center; font-size: .78rem; color: var(--text3); }

/* ══ ANIMACIONES ══ */
.fade-up { opacity: 0; transform: translateY(14px); animation: fu .5s ease forwards; }
@keyframes fu { to { opacity: 1; transform: none; } }
.fd1{animation-delay:.04s} .fd2{animation-delay:.09s} .fd3{animation-delay:.14s} .fd4{animation-delay:.19s}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .login-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1.25rem 3rem; }
  .wrap { padding: 1.75rem 1.25rem 4rem; }
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .hero { padding: 2.5rem 1.25rem 1.75rem; }
  .certificado { padding: 2rem 1.25rem; }
}

/* ══ FORO ══ */
.foro-barra { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.foro-tabs { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; }
.foro-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 500; color: var(--text2);
  padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--border);
  text-decoration: none; transition: color .2s, border-color .2s, background .2s;
}
.foro-tab:hover { color: var(--text); border-color: var(--border2); background: var(--bg3); }
.foro-tab.activa { color: var(--orange); border-color: var(--og40); background: var(--og10); }
.foro-tab .pill { font-size: .65rem; background: var(--bg4); color: var(--text3); padding: .08rem .4rem; border-radius: 999px; }
.foro-tab.activa .pill { background: var(--og15); color: var(--orange); }
.foro-busca { flex-shrink: 0; }
.foro-busca .fl-input { width: 210px; padding: .48rem .9rem; }

.panel-nuevo {
  display: none; background: var(--bg2); border: 1px solid var(--og40); border-radius: var(--r2);
  padding: 1.4rem; margin-bottom: 1.25rem; box-shadow: 0 0 40px rgba(232,97,10,.06);
}
.panel-nuevo.abierto { display: block; }
.fila-2 { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; }
@media (max-width: 700px) { .fila-2 { grid-template-columns: 1fr; } }

.hilos-lista { display: flex; flex-direction: column; }
.hilo-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 1rem; align-items: center;
  padding: .95rem 1.1rem; background: var(--bg2);
  border: 1px solid var(--border); border-bottom: none;
  text-decoration: none; color: inherit;
  transition: background .2s var(--tsm), transform .2s var(--tsm), box-shadow .25s;
}
.hilo-item:first-child { border-radius: var(--r2) var(--r2) 0 0; }
.hilo-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--r2) var(--r2); }
.hilo-item:only-child { border-radius: var(--r2); }
.hilo-item:hover { background: var(--bg3); transform: translateX(2px); box-shadow: inset 0 0 0 1px rgba(232,97,10,.08); }
.hilo-item.fijado { background: linear-gradient(135deg, rgba(232,97,10,.07), var(--bg2)); }
.hilo-arriba { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.hilo-titulo { font-family: var(--fd); font-weight: 700; font-size: .93rem; line-height: 1.3; }
.hilo-item:hover .hilo-titulo { color: #fff; }
.hilo-meta { display: flex; align-items: center; gap: .8rem; font-size: .73rem; color: var(--text3); }
.cat-tag { font-size: .68rem; font-weight: 600; padding: .1rem .5rem; border-radius: 4px; border: 1px solid var(--border); color: var(--text3); }
.hilo-stats { text-align: right; flex-shrink: 0; }
.hilo-nresp { font-size: .78rem; color: var(--text2); }
.hilo-nresp strong { font-family: var(--fd); font-weight: 800; font-size: 1rem; color: var(--text); }
.hilo-ultimo { font-size: .68rem; color: var(--text3); margin-top: .15rem; }

.av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fd); font-weight: 800; font-size: .85rem; color: #fff;
}
.av-a { background: linear-gradient(135deg,#e8610a,#ff9a56); }
.av-b { background: linear-gradient(135deg,#3b82f6,#60a5fa); }
.av-c { background: linear-gradient(135deg,#22c55e,#4ade80); }
.av-d { background: linear-gradient(135deg,#a855f7,#c084fc); }
.av-e { background: linear-gradient(135deg,#14b8a6,#2dd4bf); }
.av-f { background: linear-gradient(135deg,#f59e0b,#fbbf24); }

.foro-vacio { text-align: center; padding: 3.5rem 2rem; color: var(--text2); font-size: .9rem; }

/* Página de hilo */
.hilo-post {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r2);
  padding: 1.3rem 1.5rem; margin-bottom: 1rem; position: relative; overflow: hidden;
}
.hilo-post.op { border-color: var(--border2); }
.hilo-post.solucion { border-color: rgba(34,197,94,.45); box-shadow: 0 0 24px rgba(34,197,94,.07); }
.sol-banda {
  font-family: var(--fd); font-weight: 700; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--green); margin-bottom: .8rem;
}
.hilo-post-cab { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.hilo-post-autor { font-weight: 600; font-size: .88rem; }
.hilo-post-fecha { font-size: .72rem; color: var(--text3); }
.hilo-post-titulo { font-family: var(--fd); font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.2; margin-bottom: .8rem; }
.hilo-post-cuerpo { font-size: .9rem; line-height: 1.75; color: var(--text); word-wrap: break-word; }
.hilo-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.btn-mini {
  background: none; border: 1px solid var(--border2); color: var(--text2);
  font-family: var(--fb); font-size: .75rem; font-weight: 500;
  padding: .32rem .8rem; border-radius: 6px; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-mini:hover { border-color: var(--og40); color: var(--orange); background: var(--og06); }
.btn-mini.verde:hover { border-color: rgba(34,197,94,.5); color: var(--green); background: rgba(34,197,94,.06); }
.btn-mini.rojo:hover { border-color: rgba(239,68,68,.5); color: var(--red); background: rgba(239,68,68,.06); }
.panel-responder {
  background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r2);
  padding: 1.4rem 1.5rem; margin-top: 1.75rem;
}
@media (max-width: 700px) {
  .hilo-item { grid-template-columns: 36px 1fr; }
  .hilo-stats { display: none; }
  .foro-busca .fl-input { width: 100%; }
}
