/* Perfil y centro de suscripción. Aislado para no afectar al resto de vistas. */
.profile-page {
  --profile-panel: rgba(16, 42, 64, .82);
  --profile-line: rgba(153, 186, 199, .16);
  --profile-muted: #91a7b4;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.75rem 0 3.5rem;
}

.profile-page > .row { --bs-gutter-x: 1.75rem; --bs-gutter-y: 1.75rem; }

.profile-header {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: clamp(1.5rem, 4vw, 2.7rem);
  overflow: hidden;
  border: 1px solid rgba(82, 237, 199, .16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 25%, rgba(82, 237, 199, .13), transparent 20rem),
    linear-gradient(135deg, #11334b, #0d293f 58%, #123549);
  box-shadow: 0 20px 55px rgba(0, 8, 18, .22);
}

.profile-header::after {
  content: "";
  position: absolute;
  right: -8rem;
  top: -13rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255, 255, 255, .018), 0 0 0 8rem rgba(255, 255, 255, .012);
  pointer-events: none;
}

.profile-header-glow { position: absolute; left: -4rem; bottom: -7rem; width: 15rem; height: 15rem; border-radius: 50%; background: rgba(77, 157, 224, .08); filter: blur(8px); }
.profile-identity { position: relative; z-index: 1; display: flex; min-width: 0; align-items: center; gap: 1.25rem; }
.profile-avatar { display: grid; width: 82px; height: 82px; flex: 0 0 82px; place-items: center; color: #06271f; border: 5px solid rgba(255, 255, 255, .08); border-radius: 25px; background: linear-gradient(145deg, #76ebce, #27c8a1); box-shadow: 0 15px 35px rgba(27, 200, 156, .2); font-size: 1.8rem; font-weight: 900; text-transform: uppercase; }
.profile-eyebrow { color: var(--app-teal); font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-header h1 { margin: .25rem 0 .2rem; font-size: clamp(1.85rem, 4vw, 2.8rem); font-weight: 850; }
.profile-header p { margin: 0; overflow: hidden; color: var(--profile-muted); font-size: .86rem; text-overflow: ellipsis; }
.profile-plan-badge { position: relative; z-index: 1; display: inline-flex; flex: none; align-items: center; gap: .5rem; padding: .7rem .9rem; color: #b6c8cf; border: 1px solid var(--profile-line); border-radius: 999px; background: rgba(5, 23, 37, .45); font-size: .72rem; font-weight: 800; }
.profile-plan-badge.is-premium { color: #06271f; border-color: var(--app-teal); background: var(--app-teal); box-shadow: 0 10px 28px rgba(82, 237, 199, .2); }
.profile-plan-badge.is-free i { color: var(--app-info); }

.profile-card,
.profile-premium-card {
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--profile-line);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--profile-panel), rgba(10, 31, 48, .88));
  box-shadow: 0 14px 40px rgba(0, 7, 15, .13);
}

.profile-card-heading { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.6rem; }
.profile-card-icon { display: grid; width: 45px; height: 45px; flex: 0 0 45px; place-items: center; color: var(--app-teal); border: 1px solid rgba(82, 237, 199, .16); border-radius: 14px; background: rgba(82, 237, 199, .07); font-size: 1.1rem; }
.profile-card-heading h2 { margin: 0 0 .18rem; font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.profile-card-heading p { margin: 0; color: var(--profile-muted); font-size: .72rem; }
.profile-form { display: grid; gap: 1.15rem; }
.profile-field label { margin-bottom: .45rem; color: #c8d7dc !important; font-size: .74rem; font-weight: 750; }
.profile-input-wrap { position: relative; }
.profile-input-wrap > i { position: absolute; left: 1rem; top: 50%; z-index: 2; color: #718b99; transform: translateY(-50%); pointer-events: none; }
.profile-input-wrap .form-control { min-height: 50px; padding-left: 2.75rem; border-color: var(--profile-line); background: rgba(6, 24, 38, .58); }
.profile-input-wrap .form-control:focus { border-color: rgba(82, 237, 199, .55); }
.profile-form-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .25rem; }
.profile-form-actions .btn { display: inline-flex; min-height: 45px; align-items: center; gap: .45rem; border-radius: 12px; font-size: .78rem; font-weight: 750; }

.profile-premium-card { position: relative; display: flex; min-height: 100%; flex-direction: column; border-color: rgba(255, 118, 92, .2); background: linear-gradient(145deg, rgba(56, 38, 49, .9), rgba(17, 37, 53, .94)); }
.profile-premium-card::after { content: ""; position: absolute; right: -5rem; top: -6rem; width: 15rem; height: 15rem; border-radius: 50%; background: rgba(255, 118, 92, .08); filter: blur(4px); pointer-events: none; }
.profile-premium-card.is-active { border-color: rgba(82, 237, 199, .26); background: linear-gradient(145deg, rgba(15, 65, 68, .83), rgba(12, 38, 55, .96)); }
.profile-premium-card.is-active::after { background: rgba(82, 237, 199, .1); }
.profile-premium-loading { display: grid; min-height: 260px; place-items: center; align-content: center; gap: .8rem; color: var(--profile-muted); text-align: center; }
.profile-premium-loading .spinner-border { width: 2rem; height: 2rem; color: var(--app-teal); }
.profile-premium-loading p { margin: 0; font-size: .75rem; }
.profile-premium-content { position: relative; z-index: 1; display: flex; height: 100%; flex-direction: column; }
.profile-premium-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.profile-premium-logo { display: grid; width: 50px; height: 50px; place-items: center; color: #fff; border-radius: 16px; background: linear-gradient(145deg, #ff785f, #e5533a); box-shadow: 0 10px 28px rgba(229, 83, 58, .2); font-size: 1.35rem; }
.profile-premium-card.is-active .profile-premium-logo { color: #06271f; background: linear-gradient(145deg, #78ecd0, #2bc9a2); box-shadow: 0 10px 28px rgba(43, 201, 162, .18); }
.profile-status-pill { padding: .42rem .65rem; color: #ffc0b3; border-radius: 999px; background: rgba(255, 118, 92, .1); font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.profile-premium-card.is-active .profile-status-pill { color: var(--app-teal); background: rgba(82, 237, 199, .1); }
.profile-premium-content h2 { margin: 1.3rem 0 .65rem; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 830; line-height: 1.1; }
.profile-premium-content > p { color: #9fb2bc; font-size: .8rem; line-height: 1.65; }
.profile-premium-features { display: grid; gap: .55rem; margin: 1rem 0 1.4rem; padding: 0; list-style: none; color: #c5d4d8; font-size: .72rem; }
.profile-premium-features i { display: inline-grid; width: 22px; height: 22px; margin-right: .45rem; place-items: center; color: var(--app-teal); border-radius: 50%; background: rgba(82, 237, 199, .09); }
.profile-premium-actions { display: grid; gap: .6rem; margin-top: auto; }
.profile-premium-actions .btn { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; gap: .5rem; border-radius: 12px; font-size: .76rem; font-weight: 800; }
.profile-patreon-btn { color: #fff !important; border: 0 !important; background: linear-gradient(135deg, #ff765c, #df5038) !important; box-shadow: 0 10px 25px rgba(223, 80, 56, .18); }
.profile-patreon-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.profile-premium-note { margin: .8rem 0 0 !important; color: #758d9a !important; font-size: .62rem !important; line-height: 1.5 !important; }
.profile-premium-expiry { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 1.15rem; padding: .7rem .8rem; color: #b9cbcF; border: 1px solid var(--profile-line); border-radius: 12px; background: rgba(5, 22, 35, .35); font-size: .68rem; }
.profile-premium-expiry i { color: var(--app-teal); }

.profile-section-intro {
  max-width: 650px;
  margin: clamp(3.5rem, 7vw, 5rem) 0 1.75rem;
}
.profile-section-intro > span { color: var(--app-teal); font-size: .67rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-section-intro h2 { margin: .45rem 0 .55rem; font-size: clamp(1.65rem, 3.5vw, 2.35rem); font-weight: 840; }
.profile-section-intro p { margin: 0; color: var(--profile-muted); font-size: .84rem; line-height: 1.65; }
.profile-security-row > div { display: flex; }
.profile-security-row .profile-card { width: 100%; }

.profile-security-card { min-height: 100%; }
.profile-settings-list { display: grid; gap: .65rem; }
.profile-settings-list details { padding: 0; overflow: hidden; background: rgba(6, 24, 38, .34); }
.profile-settings-list summary { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; list-style: none; }
.profile-settings-list summary::-webkit-details-marker { display: none; }
.profile-settings-list summary > span { display: flex; align-items: center; gap: .75rem; }
.profile-settings-list summary > span > i { display: grid; width: 37px; height: 37px; flex: none; place-items: center; color: var(--app-info); border-radius: 11px; background: rgba(77, 157, 224, .08); }
.profile-settings-list summary span span { display: flex; flex-direction: column; }
.profile-settings-list summary strong { color: #dbe7ea; font-size: .78rem; }
.profile-settings-list summary small { margin-top: .17rem; color: #7e95a1; font-size: .63rem; font-weight: 500; }
.profile-settings-list summary > i { color: #738c99; font-size: .72rem; transition: transform .2s ease; }
.profile-settings-list details[open] summary > i { transform: rotate(180deg); }
.profile-setting-body { padding: .2rem 1rem 1rem; }
.profile-mfa-disable { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; }
.profile-sessions-card #mobile-session-management { padding: 0; border: 0; background: transparent; }
.profile-sessions-card #mobile-session-management > summary { display: none; }
.profile-sessions-card #mobile-session-management > div { margin-top: 0 !important; }
.profile-sessions-card [data-mobile-sessions] > div { border-color: var(--profile-line) !important; background: rgba(6, 24, 38, .3); }
.profile-placeholder { display: flex; align-items: center; gap: .5rem; color: var(--profile-muted); font-size: .72rem; }

.profile-help { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1.35rem 1.5rem; border: 1px solid var(--profile-line); border-radius: 18px; background: rgba(12, 35, 53, .58); }
.profile-help > span { display: grid; width: 42px; height: 42px; flex: none; place-items: center; color: var(--app-teal); border-radius: 13px; background: rgba(82, 237, 199, .08); }
.profile-help > div { min-width: 0; flex: 1; }
.profile-help strong { font-size: .78rem; }.profile-help p { margin: .18rem 0 0; color: var(--profile-muted); font-size: .68rem; }.profile-help .btn { border-radius: 11px; font-size: .72rem; }

@media (max-width: 767.98px) {
  .profile-page { padding-top: .25rem; }
  .profile-header { min-height: 0; align-items: flex-start; flex-direction: column; gap: 1.2rem; border-radius: 22px; }
  .profile-avatar { width: 66px; height: 66px; flex-basis: 66px; border-radius: 20px; font-size: 1.45rem; }
  .profile-plan-badge { align-self: flex-start; }
  .profile-card, .profile-premium-card { border-radius: 20px; }
  .profile-section-intro { margin-top: 3.25rem; }
  .profile-form-actions { flex-direction: column; }.profile-form-actions .btn { justify-content: center; width: 100%; }
  .profile-mfa-disable { grid-template-columns: 1fr; }
  .profile-help { align-items: flex-start; flex-wrap: wrap; }.profile-help .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page *, .profile-page *::before, .profile-page *::after { transition-duration: .01ms !important; }
}
