/* HamProp — formularios y panel (W2), extiende style.css */
.auth-wrap { max-width: 440px; margin: 60px auto; padding: 0 24px; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; }
.card h1 { font-family: var(--font-display); font-size: 28px; margin-bottom: 6px; }
.card .sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  background: #0A0F1A; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 11px 13px; font-size: 16px; font-family: inherit; width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.btn-full { width: 100%; text-align: center; border: 0; cursor: pointer; font-family: inherit; }
.form-foot { margin-top: 16px; font-size: 14.5px; color: var(--muted); text-align: center; }
.alert-err { background: #3A1520; border: 1px solid #7F1D2D; color: #FCA5A5;
  border-radius: 10px; padding: 11px 14px; font-size: 14.5px; margin-bottom: 16px; }
.alert-ok { background: #0E2A1B; border: 1px solid #14532D; color: #86EFAC;
  border-radius: 10px; padding: 11px 14px; font-size: 14.5px; margin-bottom: 16px; }

.panel-wrap { max-width: 900px; margin: 40px auto 80px; padding: 0 24px; display: grid; gap: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.panel-head h1 { font-family: var(--font-display); font-size: 30px; }
.panel-head .mono { color: var(--muted); font-size: 14px; }
.tg-link { border-left: 3px solid var(--accent); }
.code-big { font-family: var(--font-mono); font-size: 30px; letter-spacing: .18em;
  background: #0A0F1A; border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 18px; display: inline-block; margin: 10px 0; }
.builder-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px; margin-bottom: 10px; }
.alerts-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.alerts-table th { text-align: left; color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px;
  border-bottom: 1px solid var(--line); }
.alerts-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.pill { display: inline-block; background: var(--accent-soft); color: #9EC2FF;
  border-radius: 999px; padding: 2px 11px; font-size: 13.5px; font-family: var(--font-mono);
  margin: 2px 3px 2px 0; }
.btn-danger { background: none; border: 1px solid #7F1D2D; color: #FCA5A5;
  border-radius: 8px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: #3A1520; }
@media (max-width: 640px) { .builder-row { grid-template-columns: 1fr; } }
.builder-row input, .builder-row select {
  background: #0A0F1A; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 11px 13px; font-size: 16px; font-family: inherit; width: 100%; }
.builder-row input:focus, .builder-row select:focus {
  outline: 2px solid var(--accent); border-color: transparent; }
.builder-row select option { background: #0A0F1A; color: var(--text); }

/* ---------- QR de vinculacion ---------- */
.qr-box { background: #fff; padding: 14px; border-radius: 14px;
  width: max-content; margin: 0 auto; line-height: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.qr-box img, .qr-box canvas { display: block; }
.qr-hint { color: var(--muted); font-size: 13.5px; margin-top: 10px;
  text-align: center; }

/* ---------- Stats publicas (W3) ---------- */
.stats-wrap { max-width: 1100px; margin: 34px auto 80px; padding: 0 24px;
  display: grid; gap: 26px; }
.stats-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px; flex-wrap: wrap; }
.stats-head h1 { font-family: var(--font-display); font-size: 34px; }
.stats-head .lead { font-size: 17px; margin-top: 8px; }
.live-dot { color: var(--ok); font-size: 13.5px; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 13px; white-space: nowrap; }
.live-dot::before { content: "●"; margin-right: 7px; }
.live-dot.stale { color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px; display: grid; gap: 4px; }
.kpi-n { font-size: 26px; font-weight: 500; color: var(--accent);
  line-height: 1.15; }
.kpi-l { font-size: 12.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; }

.stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card-h { font-family: var(--font-display); font-size: 19px; margin-bottom: 16px;
  display: flex; align-items: baseline; gap: 10px; }
.card-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  font-weight: 400; letter-spacing: .04em; }
.card-foot { color: var(--muted); font-size: 13.5px; margin-top: 14px;
  border-top: 1px solid var(--line); padding-top: 12px; }
.chart-box { height: 260px; }

.rank, .spotted, .watched { list-style: none; display: grid; gap: 2px; }
.rank li, .spotted li, .watched li { display: grid; align-items: center;
  gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line);
  font-size: 15px; }
.rank li { grid-template-columns: 1fr auto; counter-increment: r; }
.rank li::before { content: counter(r); display: none; }
.spotted li { grid-template-columns: auto 1fr auto; }
.watched li { grid-template-columns: 1fr auto; }
.rank li:last-child, .spotted li:last-child, .watched li:last-child { border-bottom: 0; }
.rank-name { color: var(--text); }
.rank-n, .sp-n { color: var(--accent); font-size: 14.5px; }
.tag { color: var(--muted); font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
  margin-left: 7px; }
.sp-call { color: var(--text); font-size: 15.5px; }
.sp-meta { color: var(--muted); font-size: 13.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); font-size: 14.5px; border-bottom: 0 !important; }

.stats-cta { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; text-align: center;
  display: grid; gap: 14px; justify-items: center; }
.stats-cta h2 { font-family: var(--font-display); font-size: 26px; margin: 0; }
.stats-cta .lead { margin: 0; font-size: 16.5px; }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-cols { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .spotted li { grid-template-columns: auto auto; }
  .sp-meta { grid-column: 1 / -1; }
}

/* ---------- Codigo + QR lado a lado (P1-bis) ---------- */
.link-pair { display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 22px; margin: 20px 0 6px; }
.link-code, .link-qr { display: grid; justify-items: center; }
.link-code .code-big { margin: 0; }
.link-or { color: var(--muted); font-size: 13px; text-transform: uppercase;
  letter-spacing: .12em; }
@media (max-width: 620px) {
  .link-pair { grid-template-columns: 1fr; gap: 14px; }
  .link-or { display: none; }
}

/* Fix: la pill de Most watched no debe estirarse */
.watched li { grid-template-columns: max-content auto; }
.watched .pill { margin: 0; }
