/* ==========================================================================
   BLOODTSUN · Legión Asmodiana — AION 2
   Paleta asmodiana: negro violáceo, carmesí, plata y cian gélido.
   ========================================================================== */

:root {
  --bg: #0b0710;
  --bg-soft: #120a1a;
  --bg-deep: #070409;
  --panel: rgba(30, 20, 42, .72);
  --panel-solid: #171021;
  --line: rgba(170, 130, 210, .16);
  --line-strong: rgba(180, 140, 220, .32);
  --text: #e8e0ef;
  --muted: #a397b4;
  --crimson: #c0392b;
  --crimson-l: #ff6a5e;
  --violet: #7a2e9e;
  --violet-l: #b06fe0;
  --cyan: #5fd4e0;
  --gold: #d9b26a;
  --ok: #57c98a;
  --warn: #e0a33a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--violet-l); text-decoration: none; }
a:hover { color: var(--cyan); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .4em;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .85em; color: var(--cyan); }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.wrap.narrow { width: min(760px, 92vw); }

.skip {
  position: absolute; left: -9999px;
  background: var(--violet); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* Fondo: aura + viñeta -------------------------------------------------- */
.bg-aura {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% -8%, rgba(122, 46, 158, .34), transparent 70%),
    radial-gradient(45% 40% at 8% 4%, rgba(192, 57, 43, .18), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(95, 212, 224, .07), transparent 70%),
    linear-gradient(180deg, #0b0710 0%, #08050c 100%);
}
.bg-aura::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 3px 3px; opacity: .35;
}

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 6, 13, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.4rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { filter: drop-shadow(0 0 14px rgba(192, 57, 43, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b {
  font-family: var(--font-display); font-size: 1.18rem; letter-spacing: .16em;
  background: linear-gradient(120deg, #fff, var(--gold) 45%, var(--crimson-l));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text i { font-style: normal; font-size: .68rem; color: var(--muted); letter-spacing: .13em; text-transform: uppercase; }

.nav { display: flex; gap: 1.3rem; margin-left: auto; }
.nav a { color: var(--muted); font-size: .92rem; font-weight: 500; padding: .3rem 0; position: relative; }
.nav a:hover, .nav a.on { color: var(--text); }
.nav a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--violet-l));
  border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: .35rem .6rem; font-size: 1.1rem; cursor: pointer; }

/* Botones --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .58rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .9rem; font-family: var(--font-body);
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--crimson) 0%, #8a2b22 55%, var(--violet) 100%);
  color: #fff; box-shadow: 0 10px 30px -12px rgba(192, 57, 43, .8);
  border-color: rgba(255, 140, 120, .25);
}
.btn-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 16px 38px -14px rgba(255, 106, 94, .85); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--violet-l); color: var(--text); background: rgba(176, 111, 224, .09); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { color: var(--violet-l); font-weight: 600; font-size: .9rem; }
.link-btn { background: none; border: 0; color: var(--violet-l); cursor: pointer; font: inherit; font-size: .9rem; padding: .15rem .3rem; }
.link-btn:hover { color: var(--cyan); }
.link-btn.danger:hover { color: var(--crimson-l); }

/* Hero ------------------------------------------------------------------ */
.hero { padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(1.5rem, 3vw, 3rem); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.kicker {
  font-size: .72rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .8rem; font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: .06em; margin-bottom: .2rem;
  background: linear-gradient(115deg, #fff 10%, #f4d9d4 40%, var(--crimson-l) 72%, var(--violet-l) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(192, 57, 43, .35));
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 54ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 2rem; }
.hero-stats { display: flex; gap: 2.2rem; margin: 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }
.hero-stats dt { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: .15rem 0 0; font-family: var(--font-display); font-size: 1.55rem; color: var(--text); }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% 6%;
  background: radial-gradient(circle, rgba(192, 57, 43, .35), rgba(122, 46, 158, .18) 45%, transparent 70%);
  filter: blur(38px); z-index: -1;
}
.hero-art img { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .75)); animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Secciones ------------------------------------------------------------- */
.section { padding: clamp(2rem, 4vw, 3.4rem) 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(122, 46, 158, .06) 30%, transparent); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.6rem; }

/* Eventos --------------------------------------------------------------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.event-grid-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card {
  position: relative; padding: 1.15rem 1.2rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.event-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--violet));
  box-shadow: 0 0 22px 2px var(--accent, var(--violet));
  opacity: .85;
}
.event-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.event-card.accent-cyan { --accent: var(--cyan); }
.event-card.accent-gold { --accent: var(--gold); }
.event-card.accent-violet { --accent: var(--violet-l); }
.event-card.accent-crimson { --accent: var(--crimson-l); }
.event-card.accent-green { --accent: var(--ok); }
.event-card.accent-slate { --accent: #7d8aa0; }
.event-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.event-head h3 { margin: 0; font-size: 1.02rem; }
.tag {
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent, var(--muted)); border: 1px solid currentColor;
  border-radius: 999px; padding: .12rem .5rem; opacity: .85; white-space: nowrap;
}
.countdown { display: flex; align-items: baseline; gap: .6rem; margin: .4rem 0 .5rem; }
.countdown-state { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); min-width: 5.4rem; }
.countdown-digits { font-family: var(--font-mono); font-size: 1.42rem; font-weight: 600; color: var(--text); letter-spacing: .04em; }
.event-card.is-active .countdown-state { color: var(--ok); }
.event-card.is-active .countdown-digits { color: var(--ok); }
.event-rule { font-size: .78rem; color: var(--gold); margin: 0 0 .5rem; letter-spacing: .03em; }
.event-desc { font-size: .82rem; color: var(--muted); margin: 0 0 .5rem; }
.event-note { font-size: .74rem; color: #8d81a0; margin: 0; font-style: italic; }

.next-panel {
  margin-bottom: 1.8rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: linear-gradient(120deg, rgba(122, 46, 158, .14), rgba(192, 57, 43, .08));
}
.next-panel h2 { font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.next-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; border-bottom: 1px dashed rgba(170, 130, 210, .12); padding-bottom: .4rem; }
.next-list li:last-child { border: 0; }
.next-list b { font-weight: 600; }
.next-list .nx-when { color: var(--muted); font-family: var(--font-mono); font-size: .82rem; white-space: nowrap; }

/* Lista de poder -------------------------------------------------------- */
.power-list { list-style: none; margin: 0; padding: 0; }
.power-list li + li { border-top: 1px solid var(--line); }
.power-list a { display: flex; align-items: center; gap: .9rem; padding: .7rem .2rem; color: var(--text); }
.power-list a:hover { background: rgba(176, 111, 224, .06); }
.rank-n { font-family: var(--font-display); color: var(--gold); width: 1.6rem; font-size: 1.05rem; }
.who { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.who b { font-size: .96rem; }
.who i { font-style: normal; font-size: .76rem; color: var(--muted); }
.cp { font-family: var(--font-mono); font-size: .95rem; color: var(--cyan); }

/* Noticias -------------------------------------------------------------- */
.news-mini { display: grid; gap: .8rem; }
.news-mini-item {
  display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text);
}
.news-mini-item:hover { border-color: var(--violet-l); }
.news-mini-item time { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.news-mini-item span { font-size: .84rem; color: var(--muted); }

.news-list { display: grid; gap: 1rem; }
.news-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 1.3rem 1.4rem;
}
.news-card header { display: flex; gap: .7rem; align-items: center; margin-bottom: .3rem; }
.news-card time { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.news-card h2 { font-size: 1.4rem; margin: 0 0 .4rem; }
.news-card h2 a { color: var(--text); }
.news-card h2 a:hover { color: var(--violet-l); }
.pin { font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; border: 1px solid var(--crimson); color: var(--crimson-l); border-radius: 999px; padding: .1rem .5rem; }

/* Artículo -------------------------------------------------------------- */
.article { padding: 2.6rem 0 3.5rem; }
.article h1 { margin-bottom: .3rem; }
.article-meta { color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.article-summary { font-size: 1.1rem; color: var(--text); border-left: 3px solid var(--crimson); padding-left: 1rem; }

.prose { color: #d6cee0; }
.prose p { margin: 0 0 1.1em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4em; }
.prose strong { color: #fff; }

/* Encabezado de página -------------------------------------------------- */
.page-head { padding: clamp(2rem, 4vw, 3.2rem) 0 1.2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .2rem; }
.page-head .lead { margin: 0; }
.tz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.field-inline { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--muted); }
.field-inline select { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: .35rem .6rem; font: inherit; }
.sync-note { font-size: .76rem; color: var(--muted); margin-left: auto; }

/* Filtros y roster ------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; margin-bottom: 1.4rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.filter-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.filter-right { margin-left: auto; }
.chip {
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--violet-l); color: var(--text); }
.chip.on { background: rgba(176, 111, 224, .16); border-color: var(--violet-l); color: #fff; }
.search input {
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .85rem; min-width: 220px;
}
.search input:focus { outline: 2px solid rgba(176, 111, 224, .5); outline-offset: 1px; }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: .9rem; }
.member-card {
  display: flex; gap: .9rem; padding: .85rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
}
.member-card:hover { transform: translateY(-2px); border-color: var(--line-strong); color: var(--text); }
.member-portrait {
  position: relative; width: 68px; height: 68px; flex: 0 0 68px;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 50% 30%, rgba(122, 46, 158, .35), #0d0812);
  display: grid; place-items: center;
}
.member-portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback { font-family: var(--font-display); font-size: 1.6rem; color: var(--violet-l); }
.portrait-fallback.xl { font-size: 3.4rem; }
.badge-warn {
  position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--warn); color: #1b1200; font-size: .72rem;
  font-weight: 700; display: grid; place-items: center;
}
.member-body { min-width: 0; flex: 1; }
.member-top { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.member-name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-sub { margin: .1rem 0 .5rem; font-size: .78rem; color: var(--muted); }
.member-stats { display: flex; gap: 1rem; font-family: var(--font-mono); font-size: .84rem; color: var(--text); }
.member-stats i { font-style: normal; color: var(--muted); font-size: .68rem; letter-spacing: .1em; margin-right: .2rem; }

.rank-pill, .member-rank {
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 999px; padding: .12rem .55rem; border: 1px solid var(--line-strong);
  color: var(--muted); white-space: nowrap;
}
.member-rank.rank-lider { color: var(--gold); border-color: rgba(217, 178, 106, .5); }
.member-rank.rank-oficial { color: var(--crimson-l); border-color: rgba(255, 106, 94, .45); }
.member-rank.rank-elite { color: var(--violet-l); border-color: rgba(176, 111, 224, .5); }

/* Ficha de miembro ------------------------------------------------------ */
.member-hero { padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--line); }
.member-hero-inner { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.member-hero-portrait {
  width: 168px; height: 168px; border-radius: 18px; overflow: hidden; flex: 0 0 168px;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  background: radial-gradient(circle at 50% 25%, rgba(122, 46, 158, .4), #0c0711);
  box-shadow: 0 0 50px -12px rgba(122, 46, 158, .6);
}
.member-hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.member-hero-body { flex: 1; min-width: 260px; }
.member-line { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dot { opacity: .4; }
.legion-line { font-size: .85rem; }
.ok-dot, .warn-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.ok-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.warn-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin: 1.2rem 0 0; }
.stat-grid dt { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat-grid dd { margin: .1rem 0 0; font-family: var(--font-display); font-size: 1.35rem; }
.stat-grid.compact { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; }
.stat-grid.compact dd { font-size: 1.05rem; font-family: var(--font-body); }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.2rem 1.3rem; }
.panel h2 { font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.chart { width: 100%; height: auto; display: block; }

.gear { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.gear-item { display: flex; gap: .7rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid rgba(170, 130, 210, .1); }
.gear-icon { width: 34px; height: 34px; object-fit: contain; }
.gear-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.gear-meta b { font-size: .86rem; font-weight: 600; }
.gear-meta span { font-size: .74rem; color: var(--muted); }
.gear-meta em { font-style: normal; color: var(--violet-l); }
.grade-unique .gear-meta b, .grade-unique em { color: var(--gold); }
.grade-legend .gear-meta b { color: var(--orange, #e08a3a); }
.grade-epic .gear-meta b { color: var(--violet-l); }

.boards { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.boards li { display: flex; gap: .7rem; align-items: center; }
.boards img { width: 34px; height: 34px; object-fit: contain; }
.boards span { font-size: .76rem; color: var(--muted); display: block; }
.boards b { font-size: .88rem; }
.bar { margin-top: .3rem; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); }

.titles { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.titles li { display: flex; justify-content: space-between; gap: .6rem; font-size: .84rem; border-bottom: 1px solid rgba(170, 130, 210, .1); padding-bottom: .25rem; }
.titles em { font-style: normal; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.hint { font-size: .76rem; color: var(--muted); margin-top: .7rem; }
.data-note { margin-top: 2rem; font-size: .76rem; color: #7e738f; }

/* Formularios ----------------------------------------------------------- */
.form-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 1.5rem; display: grid; gap: 1rem;
}
.form-card.wide { max-width: 900px; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 10px; padding: .65rem .8rem; font: inherit;
  width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid rgba(176, 111, 224, .45); outline-offset: 1px; border-color: var(--violet-l);
}
.field small { font-size: .74rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); }
.check input { width: auto; }
.form-note { font-size: .76rem; color: var(--muted); }
.alert { border-radius: 10px; padding: .8rem 1rem; font-size: .88rem; border: 1px solid; margin-bottom: 1rem; }
.alert.err { border-color: rgba(255, 106, 94, .5); background: rgba(192, 57, 43, .14); color: #ffc9c3; }
.alert.ok { border-color: rgba(87, 201, 138, .45); background: rgba(87, 201, 138, .12); color: #c7f4da; }
.alert.info { border-color: var(--line-strong); background: rgba(176, 111, 224, .1); color: #e2d4f2; }
.flash-wrap { margin-top: 1rem; }
.flash { border-radius: 10px; padding: .7rem 1rem; margin-bottom: .5rem; font-size: .88rem; }
.flash.ok { background: rgba(87, 201, 138, .12); border: 1px solid rgba(87, 201, 138, .4); color: #c7f4da; }
.flash.err { background: rgba(192, 57, 43, .14); border: 1px solid rgba(255, 106, 94, .45); color: #ffc9c3; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin: 0 0 1.6rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; background: var(--panel); }
.steps b { display: block; font-family: var(--font-display); color: var(--gold); margin-bottom: .2rem; }
.steps span { font-size: .82rem; color: var(--muted); }

/* Verificación ---------------------------------------------------------- */
.verify-card { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); padding: 1.6rem; }
.verify-char { display: grid; gap: .2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.verify-label { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.verify-char b { font-family: var(--font-display); font-size: 1.4rem; }
.verify-char span { font-size: .84rem; color: var(--muted); }
.verify-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); text-align: center; padding: .8rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(217, 178, 106, .07); }
.verify-steps { color: var(--muted); font-size: .9rem; }

/* CTA ------------------------------------------------------------------- */
.cta-band { text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(60% 100% at 50% 0%, rgba(192, 57, 43, .16), transparent 70%); }
.cta-inner { max-width: 640px; margin-inline: auto; }
.cta-inner p { color: var(--muted); }

/* Login ----------------------------------------------------------------- */
.login-wrap { display: grid; place-items: center; min-height: 70vh; padding: 2rem 1rem; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.login-card img { filter: drop-shadow(0 0 22px rgba(192, 57, 43, .5)); margin-bottom: .6rem; }
.login-card h1 { font-size: 1.5rem; margin-bottom: .1rem; }
.login-card form { display: grid; gap: .9rem; text-align: left; margin-top: 1.2rem; }
.muted { color: var(--muted); font-size: .85rem; }

/* Admin ----------------------------------------------------------------- */
.admin-shell { display: grid; grid-template-columns: 210px 1fr; gap: 2rem; padding: 2rem 0 3rem; width: min(1240px, 94vw); margin-inline: auto; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 82px; align-self: start; }
.admin-nav-title { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem .7rem; }
.admin-nav a { padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font-size: .88rem; }
.admin-nav a:hover { background: rgba(176, 111, 224, .08); color: var(--text); }
.admin-nav a.on { background: rgba(192, 57, 43, .18); color: #fff; border-left: 2px solid var(--crimson-l); }
.admin-nav hr { border: 0; border-top: 1px solid var(--line); margin: .8rem 0; width: 100%; }
.logout-form { margin-top: .4rem; padding-left: .7rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 1.7rem; }
.admin-head .count { font-family: var(--font-body); font-size: .9rem; color: var(--muted); vertical-align: middle; }
.head-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.admin-note { font-size: .82rem; color: var(--muted); }
.admin-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.admin-panel h2 { font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); padding: .9rem 1rem; }
.kpi span { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi b { font-family: var(--font-display); font-size: 1.5rem; }
.kpi.warn { border-color: rgba(224, 163, 58, .5); background: rgba(224, 163, 58, .08); }

.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .6rem .5rem; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(176, 111, 224, .04); }
.table .right, .table th.right { text-align: right; }
.table .actions { display: flex; gap: .3rem; justify-content: flex-end; align-items: center; }
.table .actions form { display: inline; }
.muted-row { opacity: .5; }
.err-text { color: var(--crimson-l); font-size: .8rem; cursor: help; }
.tag-mini { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 .4rem; color: var(--muted); }

.status { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; padding: .12rem .5rem; border: 1px solid; }
.s-pendiente { color: var(--muted); }
.s-esperando_titulo { color: var(--gold); border-color: rgba(217, 178, 106, .5); }
.s-verificado { color: var(--cyan); border-color: rgba(95, 212, 224, .5); }
.s-aprobado { color: var(--ok); border-color: rgba(87, 201, 138, .5); }
.s-rechazado { color: var(--crimson-l); border-color: rgba(255, 106, 94, .5); }

.app-card { display: flex; gap: 1.2rem; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1rem 1.2rem; margin-bottom: .8rem; }
.app-main { flex: 1; min-width: 260px; }
.app-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.app-title b { font-family: var(--font-display); font-size: 1.15rem; }
.app-meta { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; }
.app-msg { margin: .6rem 0 0; padding: .5rem .8rem; border-left: 2px solid var(--line-strong); color: var(--muted); font-size: .85rem; }
.app-actions { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; }

/* Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(6, 4, 9, .6); padding: 2.2rem 0 2.6rem; margin-top: 2rem; }
.footer-inner { display: grid; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand b { display: block; font-family: var(--font-display); letter-spacing: .14em; }
.footer-brand span { font-size: .78rem; color: var(--muted); }
.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .85rem; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }
.disclaimer { font-size: .72rem; color: #6f657e; max-width: 90ch; margin: 0; }

.empty { color: var(--muted); font-size: .9rem; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 300px; margin-inline: auto; }
  .two-col { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .admin-nav hr, .admin-nav-title { display: none; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(9, 6, 13, .98); padding: 1rem 4vw; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .filter-right { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
}
@media (max-width: 560px) {
  .hero-stats { gap: 1.2rem; flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr; }
  .member-hero-portrait { width: 120px; height: 120px; flex-basis: 120px; }
  .header-actions .btn-ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
