/* ═══════════════════════════════════════════════════════════════════
   Alza Tu Voz — CSS Completo v2.2
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --atv-brand:    #1a2e4a;
  --atv-brand2:   #243d63;
  --atv-gold:     #c8962a;
  --atv-gold-bg:  #fdf3dc;
  --atv-ok:       #2d7a4f;
  --atv-ok-bg:    #f0fdf4;
  --atv-err:      #dc2626;
  --atv-err-bg:   #fef2f2;
  --atv-info:     #1d4ed8;
  --atv-info-bg:  #eff6ff;
  --atv-text:     #111827;
  --atv-muted:    #6b7280;
  --atv-border:   #e5e7eb;
  --atv-bg:       #f3f4f6;
  --atv-card:     #ffffff;
  --atv-r:        8px;
  --atv-r2:       14px;
  --atv-shadow:   0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
  --atv-shadow2:  0 4px 20px rgba(0,0,0,.12);
  --atv-side-w:   252px;
  --atv-top-h:    56px;
  --atv-font:     'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; }

.atv-auth-wrap, .atv-auth, .atv-dash, .atv-pub {
  font-family: var(--atv-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--atv-text);
}

/* ═══════════════════════════════════════════════════════════════════
   AUTH — Login / Registro / Recuperar
   ═══════════════════════════════════════════════════════════════════ */
.atv-auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #0f1c2e 0%, var(--atv-brand) 60%, #243d63 100%);
  margin: -32px -9999px;
  padding-left: 9999px; padding-right: 9999px;
  position: relative;
}
.atv-auth { width: 100%; max-width: 420px; }

.atv-auth__brand {
  text-align: center; margin-bottom: 24px;
}
.atv-auth__logo {
  font-size: 22px; font-weight: 800; color: #fff;
  text-decoration: none; letter-spacing: -.3px;
  display: inline-flex; align-items: center; gap: 8px;
}
.atv-auth__logo img { height: 40px; filter: brightness(0) invert(1); }
.atv-auth__tagline { font-size: 13px; color: rgba(255,255,255,.55); margin: 6px 0 0; }

.atv-auth__card {
  background: var(--atv-card); border-radius: 20px;
  padding: 36px 32px; box-shadow: var(--atv-shadow2);
}
.atv-auth__title {
  font-size: 20px; font-weight: 800; margin: 0 0 22px; color: var(--atv-text);
}
.atv-auth__footer {
  text-align: center; margin: 20px 0 0; font-size: 14px; color: var(--atv-muted);
}
.atv-auth__footer a { color: var(--atv-brand); font-weight: 600; }

@media (max-width: 480px) {
  .atv-auth__card { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════════
   FORMULARIOS
   ═══════════════════════════════════════════════════════════════════ */
.atv-field {
  display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px;
}
.atv-field label {
  font-size: 13px; font-weight: 600; color: var(--atv-text);
  display: flex; justify-content: space-between; align-items: center;
}
.atv-link-sm { font-size: 12px; font-weight: 400; color: var(--atv-muted); }
.atv-link-sm:hover { color: var(--atv-brand); }

.atv-field input,
.atv-field select,
.atv-field textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--atv-border);
  border-radius: var(--atv-r);
  font-size: 15px; font-family: var(--atv-font);
  background: #fafafa; color: var(--atv-text);
  outline: none; width: 100%;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.atv-field input:focus,
.atv-field select:focus,
.atv-field textarea:focus {
  border-color: var(--atv-brand);
  box-shadow: 0 0 0 3px rgba(26,46,74,.1);
  background: #fff;
}
.atv-field textarea { resize: vertical; min-height: 80px; }
.atv-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; margin-bottom: 16px; cursor: pointer;
}
.atv-check input { width: 16px; height: 16px; accent-color: var(--atv-brand); }

/* Clave con ojo */
.atv-pass-wrap { position: relative; display: flex; align-items: center; }
.atv-pass-wrap input { flex: 1; padding-right: 42px; }
.atv-ojo {
  position: absolute; right: 10px; background: none; border: none;
  cursor: pointer; font-size: 15px; padding: 4px; color: var(--atv-muted);
  line-height: 1; border-radius: 4px;
}
.atv-ojo:hover { color: var(--atv-brand); }

/* Grid de formularios */
.atv-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.atv-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .atv-form-grid { grid-template-columns: 1fr; } }

/* Fieldsets */
.atv-fieldset {
  border: none; border-top: 1px solid var(--atv-border);
  padding: 20px 0 4px; margin: 0 0 4px;
}
.atv-fieldset legend {
  font-size: 13px; font-weight: 700; color: var(--atv-brand);
  padding: 0 8px 0 0; text-transform: uppercase; letter-spacing: .4px;
}
.atv-req       { color: var(--atv-err); }
.atv-req-legend { font-size: 11px; font-weight: 400; color: var(--atv-muted); text-transform: none; letter-spacing: 0; }

/* ═══════════════════════════════════════════════════════════════════
   BOTONES
   ═══════════════════════════════════════════════════════════════════ */
.atv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; background: var(--atv-brand); color: #fff;
  border: 1.5px solid transparent; border-radius: var(--atv-r);
  font-size: 14px; font-weight: 600; font-family: var(--atv-font);
  cursor: pointer; text-decoration: none; width: 100%;
  transition: background .18s, transform .12s, opacity .18s, box-shadow .18s;
  white-space: nowrap;
}
.atv-btn:hover { background: var(--atv-brand2); text-decoration: none; box-shadow: var(--atv-shadow); }
.atv-btn:active { transform: translateY(1px); }
.atv-btn:disabled, .atv-btn.loading { opacity: .55; pointer-events: none; }
.atv-btn--outline {
  background: transparent; color: var(--atv-brand);
  border-color: var(--atv-brand);
}
.atv-btn--outline:hover { background: var(--atv-brand); color: #fff; }
.atv-btn--sm { padding: 6px 14px; font-size: 13px; width: auto; }
.atv-btn--danger { background: var(--atv-err); border-color: var(--atv-err); }
.atv-btn--danger:hover { background: #b91c1c; }

/* Spinner */
.atv-spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: atv-spin .7s linear infinite;
}
@keyframes atv-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════
   MENSAJES / NOTICES
   ═══════════════════════════════════════════════════════════════════ */
.atv-msg {
  padding: 11px 15px; border-radius: var(--atv-r);
  font-size: 14px; margin-bottom: 14px;
  border-left: 4px solid transparent;
}
.atv-msg--error { background: var(--atv-err-bg); border-color: var(--atv-err); color: #991b1b; }
.atv-msg--ok    { background: var(--atv-ok-bg);  border-color: var(--atv-ok);  color: #14532d; }
.atv-msg--info  { background: var(--atv-info-bg); border-color: var(--atv-info); color: #1e3a8a; }

/* ═══════════════════════════════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════════════════════════════ */
.atv-progress {
  background: var(--atv-border); border-radius: 99px; height: 8px; overflow: hidden;
}
.atv-progress__bar {
  height: 100%; border-radius: 99px; background: var(--atv-brand);
  transition: width .5s ease;
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — Layout
   ═══════════════════════════════════════════════════════════════════ */
.atv-dash {
  display: flex; min-height: 100vh;
  background: var(--atv-bg);
}

/* ── Sidebar ── */
.atv-side {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--atv-side-w);
  background: linear-gradient(180deg, #0d1b2e 0%, var(--atv-brand) 100%);
  display: flex; flex-direction: column;
  z-index: 300; overflow-y: auto; overflow-x: hidden;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.atv-side__head {
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.atv-side__brand {
  font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.2px;
  text-decoration: none;
}
.atv-side__brand img { height: 32px; filter: brightness(0) invert(1); }

.atv-side__user {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.atv-side__user img,
.atv-side__user .avatar {
  border-radius: 50%; width: 40px; height: 40px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.atv-side__user strong { display: block; color: #fff; font-size: 13px; font-weight: 700; }
.atv-side__user small  { color: var(--atv-gold); font-size: 11px; font-weight: 600; }

.atv-side__nav { list-style: none; margin: 0; padding: 10px 0; flex: 1; }
.atv-side__nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; color: rgba(255,255,255,.65);
  font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
  border-right: 3px solid transparent;
}
.atv-side__nav li a:hover { background: rgba(255,255,255,.08); color: #fff; }
.atv-side__nav li a.active {
  background: rgba(255,255,255,.12); color: #fff; font-weight: 700;
  border-right-color: var(--atv-gold);
}
.atv-side__nav li a span:first-child { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.atv-side__sep {
  padding: 14px 18px 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.3);
}

.atv-side__foot {
  padding: 10px 0 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.atv-side__foot a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; color: rgba(255,100,100,.75);
  font-size: 13px; text-decoration: none;
  transition: background .15s;
}
.atv-side__foot a:hover { background: rgba(255,100,100,.1); color: #fca5a5; }

/* Overlay mobile */
.atv-side-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 290;
  backdrop-filter: blur(2px);
}

/* ── Main ── */
.atv-main {
  margin-left: var(--atv-side-w); flex: 1;
  display: flex; flex-direction: column; min-height: 100vh;
}

.atv-top {
  position: sticky; top: 0; z-index: 200;
  height: var(--atv-top-h);
  background: var(--atv-card);
  border-bottom: 1px solid var(--atv-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  box-shadow: 0 1px 0 var(--atv-border);
}
.atv-top-breadcrumb { font-size: 13px; color: var(--atv-muted); flex: 1; }
.atv-top-breadcrumb a { color: var(--atv-brand); font-weight: 600; text-decoration: none; }
.atv-top-breadcrumb a:hover { text-decoration: underline; }
.atv-top__avatar {
  display: flex; align-items: center;
}
.atv-top__avatar img,
.atv-top__avatar .avatar {
  border-radius: 50%; width: 30px; height: 30px; object-fit: cover;
  border: 2px solid var(--atv-border); cursor: pointer;
}
.atv-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  font-size: 20px; padding: 6px; color: var(--atv-text);
  border-radius: var(--atv-r);
}
.atv-menu-btn:hover { background: var(--atv-border); }

.atv-content { padding: 28px 28px 40px; flex: 1; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .atv-side { transform: translateX(-100%); }
  .atv-side.open { transform: translateX(0); }
  .atv-side-overlay.open { display: block; }
  .atv-main { margin-left: 0; }
  .atv-menu-btn { display: flex; }
  .atv-content { padding: 20px 16px 32px; }
}

/* ═══════════════════════════════════════════════════════════════════
   COMPONENTES DEL DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */

/* Widget */
.atv-widget {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 20px;
  box-shadow: var(--atv-shadow);
}

/* Cards de acceso rápido */
.atv-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px;
}
@media (max-width: 960px) { .atv-cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .atv-cards { grid-template-columns: 1fr; } }

.atv-card-link {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 18px 16px;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: var(--atv-text);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.atv-card-link:hover {
  box-shadow: var(--atv-shadow2); transform: translateY(-2px);
  border-color: #d1d5db; text-decoration: none;
}
.atv-card-icon {
  font-size: 24px; width: 44px; height: 44px;
  background: var(--atv-gold-bg); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.atv-card-link strong { font-size: 14px; font-weight: 700; }
.atv-card-link small  { font-size: 12px; color: var(--atv-muted); }

/* Sección header */
.atv-sec-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.atv-sec-header h1 { margin: 0; font-size: 22px; font-weight: 800; }
.atv-pct-box { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.atv-pct-num { font-size: 20px; font-weight: 800; color: var(--atv-brand); line-height: 1; }

/* Empty state */
.atv-empty {
  padding: 52px 28px; text-align: center; color: var(--atv-muted);
  background: var(--atv-card); border: 2px dashed var(--atv-border);
  border-radius: var(--atv-r2);
}
.atv-empty p { margin: 8px 0; }
.atv-empty strong { color: var(--atv-text); }

/* ═══════════════════════════════════════════════════════════════════
   FOTO DE PERFIL
   ═══════════════════════════════════════════════════════════════════ */
.atv-foto-wrap {
  display: flex; align-items: center; gap: 20px;
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 20px 24px;
  margin-bottom: 20px;
}
.atv-foto-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  flex-shrink: 0;
}
#atv-avatar-preview {
  width: 90px; height: 90px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--atv-border);
  transition: opacity .2s, border-color .2s;
  display: block;
}
#atv-avatar-preview:hover { border-color: var(--atv-brand); }
.atv-foto-btn {
  background: none; border: 1.5px solid var(--atv-border); border-radius: var(--atv-r);
  color: var(--atv-brand); font-size: 12px; font-weight: 600; font-family: var(--atv-font);
  padding: 5px 12px; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s;
  display: flex; align-items: center; gap: 5px;
}
.atv-foto-btn:hover { border-color: var(--atv-brand); background: var(--atv-info-bg); }

/* ═══════════════════════════════════════════════════════════════════
   DIRECTORIO / MIEMBROS
   ═══════════════════════════════════════════════════════════════════ */
.atv-dir-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px;
}
.atv-member-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  transition: box-shadow .18s;
}
.atv-member-card:hover { box-shadow: var(--atv-shadow2); }
.atv-member-card img,
.atv-member-card .avatar {
  border-radius: 50%; width: 60px; height: 60px; object-fit: cover;
  border: 2px solid var(--atv-border);
}
.atv-member-card strong { font-size: 14px; font-weight: 700; }
.atv-member-card span  { font-size: 12px; color: var(--atv-muted); }

/* ═══════════════════════════════════════════════════════════════════
   PÁGINAS PÚBLICAS
   ═══════════════════════════════════════════════════════════════════ */
.atv-pub { max-width: 1060px; margin: 0 auto; padding: 36px 24px; }
.atv-pub__hero {
  text-align: center; padding: 44px 24px;
  background: linear-gradient(135deg, #0d1b2e 0%, var(--atv-brand) 100%);
  color: #fff; border-radius: 20px; margin-bottom: 32px;
}
.atv-pub__hero h2 {
  font-size: 30px; font-weight: 800; margin: 0 0 8px; color: #fff;
}
.atv-pub__hero p { font-size: 15px; color: rgba(255,255,255,.7); margin: 0; }

.atv-search {
  display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap;
}
.atv-search input {
  flex: 1; min-width: 160px; padding: 10px 13px;
  border: 1.5px solid var(--atv-border); border-radius: var(--atv-r);
  font-size: 14px; font-family: var(--atv-font); background: #fff;
  outline: none; transition: border-color .18s;
}
.atv-search input:focus { border-color: var(--atv-brand); }
.atv-search .atv-btn { width: auto; }

.atv-cta {
  text-align: center; margin-top: 36px; padding: 36px 24px;
  background: var(--atv-card); border: 2px dashed var(--atv-border);
  border-radius: var(--atv-r2);
}
.atv-cta .atv-btn { width: auto; margin-top: 14px; }


/* ═══════════════════════════════════════════════════════════════════
   BUSCADOR DE HERMANOS
   ═══════════════════════════════════════════════════════════════════ */

/* Búsqueda en topbar */
.atv-top-search { position: relative; flex: 1; max-width: 280px; }
.atv-top-search input {
  width: 100%; padding: 7px 32px 7px 12px;
  border: 1.5px solid var(--atv-border); border-radius: 99px;
  font-size: 13px; font-family: var(--atv-font); outline: none;
  background: var(--atv-bg); transition: border-color .18s, background .18s;
}
.atv-top-search input:focus { border-color: var(--atv-brand); background: #fff; }

.atv-search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); box-shadow: var(--atv-shadow2);
  z-index: 500; max-height: 320px; overflow-y: auto;
  display: none;
}
.atv-search-dropdown.visible { display: block; }
.atv-search-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f3f4f6;
  text-decoration: none; color: var(--atv-text);
  transition: background .12s;
}
.atv-search-result:hover { background: #f9fafb; }
.atv-search-result img, .atv-search-result .avatar {
  border-radius: 50%; width: 32px; height: 32px; object-fit: cover;
}
.atv-search-result strong { font-size: 13px; display: block; }
.atv-search-result small  { font-size: 11px; color: var(--atv-muted); }

/* Búsqueda en sidebar */
.atv-side__search {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.atv-side__search input {
  width: 100%; padding: 7px 12px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px; color: #fff; font-size: 13px; font-family: var(--atv-font);
  outline: none;
}
.atv-side__search input::placeholder { color: rgba(255,255,255,.45); }
.atv-side__search input:focus { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); }
#atv-side-resultados {
  position: absolute; left: 12px; right: 12px; top: 100%;
  background: #fff; border-radius: var(--atv-r); box-shadow: var(--atv-shadow2);
  z-index: 400; max-height: 240px; overflow-y: auto;
  display: none;
}
#atv-side-resultados.visible { display: block; }

/* Grid de hermanos */
.atv-hermanos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px;
}
.atv-hermano-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 16px; display: flex;
  flex-direction: column; gap: 8px;
  transition: box-shadow .18s, transform .15s;
}
.atv-hermano-card:hover { box-shadow: var(--atv-shadow2); transform: translateY(-1px); }
.atv-hermano-card__top {
  display: flex; align-items: center; gap: 10px;
}
.atv-hermano-card__top img,
.atv-hermano-card__top .avatar {
  border-radius: 50%; width: 48px; height: 48px; object-fit: cover; flex-shrink: 0;
}
.atv-hermano-card__top strong { font-size: 14px; font-weight: 700; display: block; }
.atv-hermano-rol { font-size: 11px; color: var(--atv-gold); font-weight: 700; }
.atv-hermano-card__meta { display: flex; flex-direction: column; gap: 2px; }
.atv-hermano-card__meta span { font-size: 12px; color: var(--atv-muted); }

/* Filtros grid */
.atv-filtros-grid {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.atv-filtros-grid input,
.atv-filtros-grid select {
  padding: 9px 12px; border: 1.5px solid var(--atv-border);
  border-radius: var(--atv-r); font-size: 13px; font-family: var(--atv-font);
  background: #fff; flex: 1; min-width: 140px; outline: none;
  transition: border-color .18s;
}
.atv-filtros-grid input:focus,
.atv-filtros-grid select:focus { border-color: var(--atv-brand); }

/* Tags */
.atv-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.atv-tags--sm .atv-tag-gold,
.atv-tags--sm .atv-tag-blue { font-size: 10px; padding: 1px 6px; }
.atv-tag-gold { background: var(--atv-gold-bg); color: var(--atv-gold); padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.atv-tag-blue { background: #eff6ff; color: #1d4ed8; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.atv-badge-nivel { display: inline-block; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.atv-badge-nivel--sm { font-size: 10px; padding: 1px 7px; }
.atv-badge-esc { display: inline-block; background: #f0fdf4; color: #15803d; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }

/* Perfil público dentro del dashboard */
.atv-perfil-pub__hero {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.atv-perfil-pub__hero img,
.atv-perfil-pub__hero .avatar { border-radius: 50%; width: 90px; height: 90px; object-fit: cover; flex-shrink: 0; }
.atv-perfil-pub__info h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.atv-pub-meta { margin: 3px 0; font-size: 14px; color: var(--atv-muted); }
.atv-pub-tag { display: inline-block; background: var(--atv-bg); border: 1px solid var(--atv-border); padding: 3px 9px; border-radius: 99px; font-size: 12px; color: var(--atv-muted); }
.atv-perfil-pub__body { display: flex; flex-direction: column; gap: 16px; }
.atv-pub-bloque { background: var(--atv-card); border: 1px solid var(--atv-border); border-radius: var(--atv-r2); padding: 18px; }
.atv-pub-bloque h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--atv-muted); margin: 0 0 10px; }
.atv-pub-bloque--victoria { background: #f0fdf4; border-color: #86efac; }

/* ═══════════════════════════════════════════════════════════════════
   PANEL ADMIN
   ═══════════════════════════════════════════════════════════════════ */
.atv-stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 14px;
}
@media (max-width:768px) { .atv-stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px) { .atv-stats-grid { grid-template-columns: 1fr; } }

.atv-stat-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: box-shadow .15s;
}
.atv-stat-card:hover { box-shadow: var(--atv-shadow2); }
.atv-stat-card--warn { border-color: #fcd34d; background: #fffbeb; }
.atv-stat-icon { font-size: 28px; flex-shrink: 0; }
.atv-stat-num   { display: block; font-size: 26px; font-weight: 800; color: var(--atv-brand); line-height: 1; }
.atv-stat-label { display: block; font-size: 12px; color: var(--atv-muted); margin-top: 3px; }

/* Tabs */
.atv-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--atv-border); margin-bottom: 0; }
.atv-tab {
  padding: 10px 18px; background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--atv-muted); font-family: var(--atv-font);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.atv-tab:hover { color: var(--atv-brand); }
.atv-tab.active { color: var(--atv-brand); border-bottom-color: var(--atv-brand); }

/* Banner de bienvenida */
.atv-banner {
  margin: 0; border-radius: 0; border-left: none; border-right: none;
  border-top: none; border-bottom: 3px solid var(--atv-ok);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; flex-wrap: wrap; gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   CAPACITACIÓN
   ═══════════════════════════════════════════════════════════════════ */
.atv-recursos-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap:16px;
}
.atv-recurso-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 18px 16px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .18s, transform .15s;
}
.atv-recurso-card:hover { box-shadow: var(--atv-shadow2); transform: translateY(-1px); }
.atv-recurso-card__icono {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.atv-recurso-card__body { flex: 1; min-width: 0; }

/* Filtros de tipo */
.atv-filter-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--atv-card); border: 1.5px solid var(--atv-border);
  color: var(--atv-muted); text-decoration: none; cursor: pointer;
  transition: all .15s;
}
.atv-filter-btn:hover { border-color: var(--atv-brand); color: var(--atv-brand); text-decoration: none; }
.atv-filter-btn.active {
  background: var(--atv-brand); border-color: var(--atv-brand); color: #fff;
}
.atv-filter-count {
  background: rgba(255,255,255,.25); border-radius: 99px;
  padding: 0px 6px; font-size: 11px; font-weight: 700;
}
.atv-filter-btn:not(.active) .atv-filter-count {
  background: var(--atv-bg); color: var(--atv-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   METAS — categorías coloreadas
   ═══════════════════════════════════════════════════════════════════ */
.atv-meta-cat { transition: box-shadow .15s; }
.atv-meta-cat:hover { box-shadow: var(--atv-shadow); }
.atv-meta-row:has(.atv-meta-check:checked) { background: #f0fdf4 !important; }

/* ═══════════════════════════════════════════════════════════════════
   ARTÍCULO DE CAPACITACIÓN (lectura completa)
   ═══════════════════════════════════════════════════════════════════ */
.atv-articulo {
  max-width: 720px; margin: 0 auto;
}
.atv-articulo__header {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 28px 32px 24px;
  margin-bottom: 24px;
}
.atv-articulo__tipo {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; padding: 3px 10px; border-radius: 99px;
  margin-bottom: 12px;
}
.atv-articulo__titulo {
  font-size: 26px; font-weight: 800; line-height: 1.3;
  margin: 0 0 16px; color: var(--atv-text);
}
.atv-articulo__meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--atv-muted); flex-wrap: wrap;
}
.atv-articulo__meta img,
.atv-articulo__meta .avatar { border-radius: 50%; width: 28px; height: 28px; }

.atv-articulo__cuerpo {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 32px;
  font-size: 16px; line-height: 1.8; color: #374151;
  margin-bottom: 20px;
}
.atv-articulo__cuerpo p  { margin: 0 0 1.2em; }
.atv-articulo__cuerpo h2 { font-size: 20px; font-weight: 700; margin: 1.5em 0 .6em; }
.atv-articulo__cuerpo h3 { font-size: 17px; font-weight: 700; margin: 1.3em 0 .5em; }
.atv-articulo__cuerpo ul,
.atv-articulo__cuerpo ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.atv-articulo__cuerpo li { margin-bottom: .4em; }
.atv-articulo__cuerpo blockquote {
  border-left: 4px solid var(--atv-gold); margin: 1.2em 0;
  padding: 12px 20px; background: var(--atv-gold-bg);
  border-radius: 0 8px 8px 0; font-style: italic;
}
.atv-articulo__cta {
  text-align: center; margin-top: 28px;
}
.atv-articulo__admin {
  margin-top: 12px; text-align: right;
}
.atv-articulo__desc { color: #4b5563; line-height: 1.7; }

/* ═══════════════════════════════════════════════════════════════════
   MURO DE HONOR
   ═══════════════════════════════════════════════════════════════════ */
.atv-honor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 20px;
}
.atv-honor-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .18s, transform .15s;
}
.atv-honor-card:hover { box-shadow: var(--atv-shadow2); transform: translateY(-2px); }

.atv-honor-card__badge {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid transparent;
}
.atv-honor-card__icon { font-size: 24px; line-height: 1; }
.atv-honor-card__tipo { font-size: 13px; font-weight: 700; }

.atv-honor-card__miembro {
  display: flex; align-items: center; gap: 12px;
}
.atv-honor-card__miembro img,
.atv-honor-card__miembro .avatar { border-radius: 50%; width: 60px; height: 60px; object-fit: cover; }

.atv-honor-card__titulo { font-size: 15px; font-weight: 700; margin: 0; line-height: 1.35; }
.atv-honor-card__desc   { font-size: 13px; color: var(--atv-muted); margin: 0; line-height: 1.55; }
.atv-honor-card__pie    {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #9ca3af; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--atv-border);
  flex-wrap: wrap; gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   RECLUTAR
   ═══════════════════════════════════════════════════════════════════ */
#atv-link-invitacion::selection { background: rgba(255,255,255,.3); }

/* ═══════════════════════════════════════════════════════════════════
   SISTEMA DE RANGOS
   ═══════════════════════════════════════════════════════════════════ */

/* Héroe del rango actual */
.atv-rango-hero {
  display: flex; gap: 20px; align-items: flex-start;
  border-radius: var(--atv-r2); padding: 24px 28px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.atv-rango-hero__icono { font-size: 56px; line-height: 1; flex-shrink: 0; }
.atv-rango-hero__info  { flex: 1; min-width: 200px; }
.atv-rango-hero__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; }
.atv-rango-hero__nombre{ font-size: 28px; font-weight: 800; margin: 4px 0 8px; display: block; }
.atv-rango-hero__desc  { font-size: 14px; color: #4b5563; line-height: 1.6; margin: 0 0 10px; }
.atv-rango-hero__verso { font-size: 13px; font-style: italic; color: #9ca3af; margin: 0; border-left: 3px solid currentColor; padding-left: 10px; }

/* Métricas del rango */
.atv-rango-metricas {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px;
}
@media(max-width:700px){ .atv-rango-metricas { grid-template-columns: repeat(2,1fr); } }
.atv-rango-metrica {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 16px; text-align: center;
}
.atv-rango-metrica__num   { display: block; font-size: 24px; font-weight: 800; color: var(--atv-brand); }
.atv-rango-metrica__label { display: block; font-size: 11px; color: #9ca3af; margin-top: 3px; }

/* Escala de rangos */
.atv-escala-rangos {
  display: flex; flex-direction: column; gap: 0;
}
.atv-escala-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  opacity: .45; transition: opacity .15s;
}
.atv-escala-item--alcanzado { opacity: 1; }
.atv-escala-item--actual    { background: var(--atv-gold-bg); opacity: 1; }
.atv-escala-item__icono     { font-size: 22px; width: 32px; text-align: center; }
.atv-escala-sep             { text-align: center; font-size: 12px; color: #d1d5db; padding: 2px 0; }

/* ═══════════════════════════════════════════════════════════════════
   CENTRO DE AYUDA
   ═══════════════════════════════════════════════════════════════════ */
.atv-ayuda-hero {
  background: linear-gradient(135deg,#0d1b2e,var(--atv-brand));
  color: #fff; border-radius: var(--atv-r2); padding: 32px;
  margin: 16px 0 24px;
}
.atv-ayuda-hero h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; color: #fff; }
.atv-ayuda-hero p  { font-size: 15px; color: rgba(255,255,255,.75); margin: 0; }

.atv-ayuda-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 24px;
}
@media(max-width:600px){ .atv-ayuda-grid { grid-template-columns: 1fr; } }

.atv-ayuda-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 20px;
}
.atv-ayuda-card__icono { font-size: 28px; display: block; margin-bottom: 10px; }
.atv-ayuda-card h3     { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.atv-ayuda-card p      { font-size: 13px; color: #4b5563; line-height: 1.6; margin: 0; }

.atv-ayuda-seccion { margin-bottom: 24px; }
.atv-ayuda-seccion h3 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }

.atv-ayuda-versos { display: flex; flex-direction: column; gap: 10px; }
.atv-ayuda-versos blockquote {
  margin: 0; padding: 12px 16px;
  background: var(--atv-gold-bg); border-left: 4px solid var(--atv-gold);
  border-radius: 0 8px 8px 0; font-style: italic; font-size: 13px; color: #4b5563;
}

/* Rango card en ayuda */
.atv-ayuda-rango-card {
  background: var(--atv-card); border: 1px solid var(--atv-border);
  border-radius: var(--atv-r2); padding: 20px 24px;
}
.atv-ayuda-rango-card__header {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}

/* Panel de ayuda */
.atv-ayuda-panel { padding-top: 4px; }

/* FAQ */
.atv-faq-item {
  background: var(--atv-card); border: 1px solid var(--atv-border); border-radius: var(--atv-r2); overflow: hidden;
}
.atv-faq-btn {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-size: 14px; font-weight: 600; text-align: left;
  font-family: var(--atv-font); color: var(--atv-text);
}
.atv-faq-btn:hover { background: #f9fafb; }
.atv-faq-ico { font-size: 18px; font-weight: 400; flex-shrink: 0; color: var(--atv-brand); }
.atv-faq-resp { padding: 0 18px 16px; }
.atv-faq-resp p { margin: 0; font-size: 13px; color: #4b5563; line-height: 1.65; }
