/* ===== Forge · cuenta / dashboard ===== */
.cuenta-body { min-height: 100vh; }

/* El atributo hidden debe ganar SIEMPRE: reglas de autor con display: (.auth-wrap,
   .btn inline-flex, etc.) pisarían al [hidden]{display:none} del navegador. */
[hidden] { display: none !important; }

/* ── LOGIN ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px;
  box-shadow: var(--shadow);
}
.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand img, .auth-brand video { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 6px 20px -6px rgba(255,138,30,.5); }
.auth-brand span { font-weight: 800; letter-spacing: .2em; font-size: 14px; }
.auth-brand.small img, .auth-brand.small video { width: 28px; height: 28px; }
.auth-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.auth-sub { color: var(--muted); font-size: 14.5px; margin: 8px 0 24px; }

#login-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
#login-form input {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px;
  background: #0c0d10; border: 1px solid var(--line); border-radius: 11px;
  color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .18s, box-shadow .18s;
}
#login-form input:focus { outline: none; border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,138,30,.14); }
.auth-submit { width: 100%; margin-top: 6px; }
.auth-msg { font-size: 13.5px; margin-top: 12px; min-height: 18px; text-align: center; }
.auth-msg.err { color: var(--red, #ff5470); }
.auth-msg.ok { color: var(--green, #23d18b); }

.auth-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
.auth-foot a { color: var(--fire-2); font-size: 14px; }
.auth-foot span { color: var(--dim); font-size: 13px; }

/* ── DASHBOARD · top bar ── */
.dash-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 26px; border-bottom: 1px solid var(--line-soft);
  background: rgba(10,10,11,.82); backdrop-filter: blur(14px);
}
.dash-user { display: flex; align-items: center; gap: 14px; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); }
.dash-main { max-width: 1120px; margin: 0 auto; padding: 34px 26px 40px; }

/* ── Hero ── */
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 22px; margin-bottom: 28px;
}
.dash-eyebrow { font-size: 11px; letter-spacing: .22em; color: var(--dim); margin-bottom: 8px; }
.dash-h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.02em; }
.dash-h1 span { color: var(--fire-2); }
.hero-stats {
  display: grid; grid-auto-flow: column; gap: 0;
  border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
}
.hstat { padding: 12px 20px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line-soft); }
.hstat:first-child { border-left: none; }
.hstat span { font-size: 11px; letter-spacing: .04em; color: var(--dim); text-transform: uppercase; }
.hstat b { font-size: 15px; font-weight: 700; }
.hstat b.ok { color: var(--green, #23d18b); }
.hstat b.bad { color: var(--red, #ff5470); }

.demo-banner {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 22px; padding: 11px 16px; border-radius: 12px; font-size: 13.5px;
  color: var(--fire-2); background: rgba(255,138,30,.07); border: 1px solid rgba(255,138,30,.25);
}
.demo-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fire-2); box-shadow: 0 0 8px var(--fire-2); }

/* ── Cards grid ── */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 22px;
  transition: border-color .2s;
}
.dash-card:hover { border-color: var(--line); }
.dash-card.span-2 { grid-column: span 2; }
.dash-card.span-3 { grid-column: span 3; }
.dash-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.dash-card-head h2 { font-size: 16px; font-weight: 700; }
.card-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--fire-2); background: rgba(255,138,30,.08); border: 1px solid rgba(255,138,30,.16); flex: none; }
.card-ic svg { width: 17px; height: 17px; }
.dash-note-inline { color: var(--dim); font-size: 12.5px; margin-left: auto; }
.dash-note { color: var(--dim); font-size: 12.5px; margin-top: 12px; }

.badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.pro { color: var(--fire-2); border-color: rgba(255,138,30,.4); background: rgba(255,138,30,.08); }
.badge.basic { color: var(--cyan, #35d0e0); border-color: rgba(53,208,224,.35); background: rgba(53,208,224,.07); }

/* ── Suscripción ── */
.plan-block { display: flex; gap: 20px; align-items: stretch; }
.plan-face {
  flex: none; width: 168px; border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,138,30,.16), transparent 55%),
    linear-gradient(160deg, #17140f, #0d0d10);
  border: 1px solid rgba(255,138,30,.22);
}
.plan-tier { font-size: 28px; font-weight: 900; letter-spacing: .02em; }
.plan-face-sub { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); }
.plan-block .kv { flex: 1; align-content: center; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; }
.kv.one { grid-template-columns: 1fr; }
.kv div { display: flex; flex-direction: column; gap: 3px; }
.kv span { color: var(--dim); font-size: 12px; }
.kv b { font-size: 15px; font-weight: 600; }
.kv b.ok { color: var(--green, #23d18b); }
.kv b.bad { color: var(--red, #ff5470); }

.card-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.card-actions.col { flex-direction: column; align-items: stretch; }
.card-actions .dash-note { margin-top: 0; }

/* ── Descargas ── */
.dl-primary a, .dl-primary span { width: 100%; }
.dl-btn {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--text); transition: border-color .18s, background .18s;
}
.dl-btn .os { display: grid; place-items: center; width: 22px; color: var(--fire-2); }
.dl-btn .os svg { width: 18px; height: 18px; }
.dl-btn small { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--dim); font-family: 'JetBrains Mono', monospace; }
a.dl-btn.primary { border-color: rgba(255,138,30,.4); background: rgba(255,138,30,.06); }
a.dl-btn:hover { border-color: var(--fire); background: rgba(255,138,30,.09); cursor: pointer; }
.dl-btn.disabled { opacity: .5; cursor: default; }
.dl-others { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dl-others .dl-btn { padding: 10px 13px; font-size: 13px; }

/* ── Indicadores ── */
.ind-group { margin-bottom: 8px; }
.ind-group-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.ind-count { color: var(--dim); font-size: 11.5px; }
.ind-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.ind-list li {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px;
  border: 1px solid var(--line-soft); border-radius: 10px; font-size: 13.5px;
  background: rgba(255,255,255,.012);
}
.ind-list li .lk { display: grid; place-items: center; width: 15px; color: var(--green, #23d18b); flex: none; }
.ind-list li .lk svg { width: 14px; height: 14px; }
.ind-list li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ind-list li.locked { opacity: .48; }
.ind-list li.locked .lk { color: var(--dim); }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.tag.basic { color: var(--cyan, #35d0e0); border-color: rgba(53,208,224,.3); background: rgba(53,208,224,.07); }
.tag.pro { color: var(--fire-2); border-color: rgba(255,138,30,.35); background: rgba(255,138,30,.08); }

/* ── Empty states ── */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 0 10px; }
.empty-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--dim); background: rgba(255,255,255,.02); border: 1px solid var(--line-soft); margin-bottom: 4px; }
.empty-ic svg { width: 20px; height: 20px; }
.empty-state p { font-size: 14px; color: var(--muted); }
.empty-state small { font-size: 12.5px; color: var(--dim); }

.btn.small { padding: 9px 15px; font-size: 13.5px; }

/* ── Modal ── */
.modal-back {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(6,6,8,.72); backdrop-filter: blur(6px);
}
.modal-back[hidden] { display: none !important; }
.modal {
  width: 100%; max-width: 400px; padding: 26px;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.modal h3 { font-size: 19px; font-weight: 800; }
.modal-sub { color: var(--muted); font-size: 13.5px; margin: 8px 0 20px; }
#pass-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
#pass-form input {
  display: block; width: 100%; margin-top: 7px; padding: 11px 13px;
  background: #0c0d10; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 14.5px; font-family: inherit; transition: border-color .18s, box-shadow .18s;
}
#pass-form input:focus { outline: none; border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,138,30,.14); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ── 2FA ── */
.tfa-help { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.tfa-secret {
  display: block; text-align: center; letter-spacing: .16em; font-size: 15px; font-weight: 700;
  color: var(--fire-2); background: #0c0d10; border: 1px dashed rgba(255,138,30,.4);
  border-radius: 10px; padding: 12px; margin-bottom: 16px; word-break: break-all;
}
#k-2fa.on { color: var(--green, #23d18b); }
#k-2fa.off { color: var(--dim); }
.tfa-codes { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 16px; }
.tfa-codes li { text-align: center; letter-spacing: .12em; font-size: 14px; color: var(--text); background: #0c0d10; border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.dash-foot { text-align: center; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 12.5px; }
.dash-foot a { color: var(--muted); }
.dash-foot a:hover { color: var(--fire-2); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-card.span-2, .dash-card.span-3 { grid-column: span 2; }
  .ind-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .dash-main { padding: 24px 16px 40px; }
  .hero-stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; width: 100%; }
  .hstat { border-left: none; border-top: 1px solid var(--line-soft); }
  .hstat:first-child, .hstat:nth-child(2) { border-top: none; }
  .hstat:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-card.span-2, .dash-card.span-3 { grid-column: span 1; }
  .ind-list { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .plan-block { flex-direction: column; }
  .plan-face { width: 100%; flex-direction: row; align-items: center; gap: 14px; }
  .plan-tier { font-size: 24px; }
}
