/* Mi panel — QuickScoreBet (solo /panel/) */
.up-page {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.up-hero {
  position: relative;
  padding: 2rem 0 1.75rem;
  margin: 0 -0.25rem 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: linear-gradient(
    145deg,
    rgba(88, 166, 255, 0.12) 0%,
    var(--color-surface) 45%,
    rgba(16, 185, 129, 0.06) 100%
  );
}

@media (min-width: 640px) {
  .up-hero {
    margin-left: 0;
    margin-right: 0;
    padding: 2.25rem 1.75rem;
  }
}

.up-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 100% 0%,
    rgba(88, 166, 255, 0.15),
    transparent 55%
  );
  pointer-events: none;
}

.up-hero__inner {
  position: relative;
  z-index: 1;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .up-hero__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
  }
}

.up-hello {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.up-hello em {
  font-style: normal;
  color: var(--color-accent);
}

.up-email {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

.up-role-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
}

.up-role-pill--admin {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.up-role-pill--analyst {
  border-color: rgba(88, 166, 255, 0.45);
  color: var(--color-accent);
  background: rgba(88, 166, 255, 0.08);
}

.up-role-pill--visitor {
  color: var(--color-text-muted);
}

.up-role-pill--staff {
  border-color: rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
}

.up-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .up-hero__actions {
    margin-top: 0;
    justify-content: flex-end;
  }
}

/* Franja pronósticos */
.up-pred-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.08),
    var(--color-surface) 70%
  );
}

.up-pred-strip--empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-style: dashed;
  border-color: var(--color-border);
  background: var(--color-surface);
}

.up-pred-strip__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.up-pred-stat {
  text-align: center;
  padding: 0.5rem 0.35rem;
}

.up-pred-stat__val {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6ee7b7;
  line-height: 1.1;
}

.up-pred-stat__lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Bento accesos */
.up-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--color-text-muted);
}

.up-bento {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.up-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  min-height: 5.5rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.up-tile:hover {
  border-color: rgba(88, 166, 255, 0.45);
  background: var(--color-surface-hover);
  transform: translateY(-2px);
}

.up-tile__icon {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.95;
}

.up-tile__name {
  font-size: 0.95rem;
  font-weight: 700;
}

.up-tile__desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.up-tile--accent {
  border-color: rgba(88, 166, 255, 0.35);
  background: linear-gradient(
    160deg,
    rgba(88, 166, 255, 0.1),
    var(--color-surface) 65%
  );
}

.up-tile--accent:hover {
  border-color: var(--color-accent);
}

.up-tile--gold {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(
    160deg,
    rgba(245, 158, 11, 0.08),
    var(--color-surface) 65%
  );
}

/* Tarjetas contenido */
.up-grid-2 {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .up-grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.up-card {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
}

.up-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.15);
}

.up-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.up-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.up-card__link:hover {
  text-decoration: underline;
}

.up-card__body {
  padding: 1rem;
}

.up-league-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.up-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
}

.up-pill__code {
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-muted);
  font-family: ui-monospace, monospace;
}

.up-muted {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.up-muted--last {
  margin-bottom: 0 !important;
}

/* Lista actividad */
.up-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.up-activity__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.12);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.up-activity__item:hover {
  border-color: var(--color-border);
  background: var(--color-surface-hover);
}

.up-activity__main {
  min-width: 0;
}

.up-activity__type {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.15rem;
}

.up-activity__link {
  color: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.up-activity__link:hover {
  color: var(--color-accent);
}

.up-activity__meta {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.up-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.up-footer-actions a {
  font-size: 0.875rem;
}

.up-logout {
  color: var(--color-text-muted);
  text-decoration: none;
}

.up-logout:hover {
  color: #f87171;
}

@media (prefers-reduced-motion: reduce) {
  .up-tile:hover {
    transform: none;
  }
}

/* Danger zone — eliminar cuenta */
.up-danger-zone {
  margin-top: 2rem;
  padding: 1.25rem 1.1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: radial-gradient(
      circle at 0 0,
      rgba(248, 113, 113, 0.18),
      transparent 55%
    ),
    var(--color-surface);
}

.up-danger-zone .up-section-title {
  color: #fecaca;
}

.up-danger-text {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: #fecaca;
}

.up-danger-text strong {
  color: #fca5a5;
}

.up-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.7);
  background: linear-gradient(
    135deg,
    rgba(248, 113, 113, 0.18),
    rgba(127, 29, 29, 0.95)
  );
  color: #fee2e2;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease,
    box-shadow 0.16s ease, border-color 0.16s ease;
}

.up-danger-button:hover {
  border-color: rgba(248, 113, 113, 1);
  background: linear-gradient(
    135deg,
    rgba(248, 113, 113, 0.22),
    rgba(153, 27, 27, 0.98)
  );
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4),
    0 14px 30px rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.up-danger-button:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45),
    0 10px 20px rgba(0, 0, 0, 0.6);
}

.up-danger-button-icon {
  font-size: 0.95rem;
}

/* ── Panel usuario (upanel): resumen pronósticos, historial, ranking ──────── */
.upanel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.upanel-hero__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.upanel-hero__sub {
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.upanel-hero__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.upanel-btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--color-accent);
  color: #0d1117;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.upanel-btn:hover {
  opacity: 0.88;
}

.upanel-btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
}

.upanel-streak-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.upanel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.upanel-kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.upanel-kpi--ok {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.upanel-kpi--fail {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.upanel-kpi--rate {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.08);
}

.upanel-kpi__val {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.upanel-kpi__label {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upanel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.upanel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.upanel-card__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.upanel-link {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
}

.upanel-link:hover {
  text-decoration: underline;
}

.upanel-pred-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.upanel-pred-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(139, 148, 158, 0.06);
  font-size: 0.875rem;
}

.upanel-pred-item--correct {
  background: rgba(16, 185, 129, 0.1);
}

.upanel-pred-item--incorrect {
  background: rgba(239, 68, 68, 0.1);
}

.upanel-pred-match {
  flex: 1;
  font-weight: 500;
}

.upanel-pred-date {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.upanel-pred-status {
  margin-left: auto;
  font-size: 0.8rem;
}

.upanel-pred-status--correct {
  color: #6cdd8c;
  font-weight: 600;
}

.upanel-pred-status--incorrect {
  color: #f87171;
  font-weight: 600;
}

.upanel-pred-status--pending {
  color: #fbbf24;
}

.upanel-pred-status--cancelled {
  color: var(--color-text-muted);
}

.upanel-hist-row--correct td:first-child {
  border-left: 3px solid #10b981;
}

.upanel-hist-row--incorrect td:first-child {
  border-left: 3px solid #ef4444;
}

.upanel-hist-row--cancelled td:first-child {
  border-left: 3px solid #9ca3af;
}

.upanel-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.upanel-filter-chip {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.15s;
}

.upanel-filter-chip:hover,
.upanel-filter-chip.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0d1117;
}

.upanel-ranking-row--me td {
  background: rgba(88, 166, 255, 0.1);
  font-weight: 600;
}

.upanel-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upanel-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.upanel-notif-item--correct {
  border-left: 4px solid #10b981;
}

.upanel-notif-item--incorrect {
  border-left: 4px solid #ef4444;
}

.upanel-notif-item--cancelled {
  border-left: 4px solid #9ca3af;
}

.upanel-notif-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.upanel-notif-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.875rem;
}

.upanel-notif-body strong {
  font-size: 0.95rem;
}

.upanel-notif-time {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.upanel-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem 0;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .upanel-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .upanel-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Perfil (Mi panel): layout ancho, héroe, tarjetas, archivos */
.user-panel.upanel-profile-page {
  max-width: 56rem;
  padding: 0 0.5rem 2.5rem;
}

@media (min-width: 640px) {
  .user-panel.upanel-profile-page {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

.upanel-back {
  margin: 0 0 1rem;
}

/* ── Héroe: avatar grande + atajos ───────────────────────────── */
.upanel-profile-hero {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.25rem 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: linear-gradient(
    160deg,
    rgba(88, 166, 255, 0.1) 0%,
    var(--color-surface) 48%,
    rgba(16, 185, 129, 0.05) 100%
  );
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.upanel-profile-hero--compact {
  margin-top: 0.25rem;
}

.upanel-profile-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem 1.5rem;
  margin-bottom: 1.15rem;
}

.upanel-avatar-wrap {
  flex-shrink: 0;
}

.upanel-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  background: linear-gradient(145deg, rgba(88, 166, 255, 0.2), var(--color-surface));
}

.upanel-avatar--hero {
  width: 120px;
  height: 120px;
  border: 3px solid rgba(88, 166, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 28px rgba(88, 166, 255, 0.12);
}

.upanel-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upanel-avatar__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.04em;
}

.upanel-avatar--hero .upanel-avatar__placeholder {
  font-size: 3rem;
}

.upanel-profile-hero__text {
  min-width: 0;
  flex: 1;
}

.upanel-profile-hero__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.upanel-profile-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 3.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  word-break: break-word;
}

.upanel-profile-hero__email {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  word-break: break-all;
  line-height: 1.45;
}

.upanel-profile-hero__meta {
  margin: 0 0 0.45rem;
}

.upanel-profile-hero__mini-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  margin-top: 0.1rem;
}

.upanel-profile-hero__mini-link:hover {
  text-decoration: underline;
}

/* Atajos tipo pastilla (scroll horizontal en móvil) */
.upanel-profile-shortcuts {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
  margin: 0 -0.1rem;
  scrollbar-width: thin;
}

.upanel-profile-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.upanel-profile-shortcut:hover {
  border-color: rgba(88, 166, 255, 0.55);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.upanel-profile-shortcut.is-active {
  border-color: rgba(88, 166, 255, 0.8);
  background: rgba(88, 166, 255, 0.14);
  color: #cfe7ff;
}

.upanel-profile-shortcut.is-active .upanel-profile-shortcut__ic {
  transform: translateY(-1px);
}

.upanel-profile-shortcut__ic {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.95;
}

/* Rejilla de tarjetas */
.upanel-profile-grid {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

@media (min-width: 900px) {
  .upanel-profile-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.upanel-profile-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.2rem 1.35rem 1.3rem;
  background: var(--color-surface);
  scroll-margin-top: 5.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.upanel-profile-card--wide,
.upanel-profile-card--links {
  grid-column: 1 / -1;
}

.upanel-profile-card__head {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.upanel-profile-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-top: 0.1rem;
  border-radius: 10px;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.22);
  font-size: 1.1rem;
  line-height: 2.15rem;
  text-align: center;
}

.upanel-profile-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.upanel-profile-card__title--solo {
  margin-bottom: 0.65rem;
}

.upanel-profile-card__lead {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Formularios del perfil (inputs coherentes con el tema) */
.upanel-profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.upanel-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.upanel-profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.upanel-profile-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  min-height: var(--touch-min, 44px);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.upanel-profile-input:hover {
  border-color: rgba(88, 166, 255, 0.35);
}

.upanel-profile-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.upanel-profile-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.65;
}

.upanel-profile-actions {
  margin-top: 0.2rem;
}

.upanel-profile-actions--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  flex-shrink: 0;
}

/* Botones: reutilizan upanel-btn (acento) en vez del submit “blanco” */
button.upanel-btn,
.upanel-btn[role="button"] {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

button.upanel-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.upanel-btn--block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.58rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Contraseña: variante contorno, menos peso visual */
.upanel-btn--outline-light {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent) !important;
  box-shadow: none;
}

.upanel-btn--outline-light:hover {
  background: rgba(88, 166, 255, 0.12);
  opacity: 1;
}

.upanel-btn--ghost {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
}

.upanel-btn--ghost:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  opacity: 1;
}

/* Zona de archivo */
.upanel-profile-avatar-row {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .upanel-profile-avatar-row {
    flex-direction: row;
    align-items: flex-end;
  }

  .upanel-profile-avatar-row .upanel-profile-file {
    flex: 1;
    min-width: 0;
  }
}

.upanel-profile-file {
  position: relative;
  border-radius: 12px;
  border: 1px dashed rgba(88, 166, 255, 0.4);
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s, background 0.15s;
}

.upanel-profile-file:hover {
  border-color: rgba(88, 166, 255, 0.7);
  background: rgba(88, 166, 255, 0.06);
}

.upanel-profile-file__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 0;
}

.upanel-profile-file__label {
  position: relative;
  z-index: 1;
  display: block;
  padding: 1.05rem 1rem 1.1rem;
  pointer-events: none;
}

.upanel-profile-file__title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.upanel-profile-file__sub {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.upanel-profile-delete-photo {
  margin: 0.6rem 0 0;
}

.upanel-profile-avatar-note {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Más enlaces: rejilla con hover */
.upanel-profile-linkgrid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 520px) {
  .upanel-profile-linkgrid {
    grid-template-columns: 1fr 1fr;
  }
}

.upanel-profile-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.15);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.upanel-profile-more span {
  opacity: 0.85;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.upanel-profile-more:hover {
  border-color: rgba(88, 166, 255, 0.4);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

/* Peligro: separar del grid */
.upanel-profile-danger {
  margin-top: 0.5rem;
  border-radius: 12px;
}

.upanel-plan-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.upanel-plan-portal-form {
  margin: 0;
}

.upanel-plan-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.upanel-plan-manage-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.upanel-plan-manage-banner p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
