.profile-page{
  min-height:100vh;
  background:#f5f8fc;
  color:#162239;
}
.profile-topbar{
  min-height:78px;
  padding:12px 28px;
  background:#fff;
  border-bottom:1px solid #e4eaf2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  position:sticky;
  top:0;
  z-index:20;
}
.profile-brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.profile-brand img{
  width:52px;
  height:52px;
  object-fit:contain;
  border-radius:50%;
  background:#fff;
  border:2px solid #e5ebf4;
  padding:3px;
}
.profile-brand small{
  display:block;
  color:#6d7a90;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
}
.profile-brand b{color:#073d8c}
.profile-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:30px 24px 60px;
}
.profile-hero-card{
  background:linear-gradient(135deg,#073d8c,#0867c8);
  color:#fff;
  border-radius:24px;
  padding:30px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:28px;
  box-shadow:0 18px 44px rgba(7,61,140,.16);
  margin-bottom:22px;
}
.profile-hero-card h1{
  margin:8px 0;
  font-size:clamp(28px,4vw,42px);
}
.profile-hero-card p{
  margin:0;
  max-width:680px;
  color:rgba(255,255,255,.82);
}
.profile-pill{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
}
.profile-account-card{
  min-width:220px;
  padding:18px 20px;
  border-radius:18px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(8px);
}
.profile-account-card small,
.profile-account-card span{display:block;color:rgba(255,255,255,.75)}
.profile-account-card strong{display:block;font-size:20px;margin:4px 0 7px}
.profile-layout{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:20px;
}
.profile-card{margin-bottom:20px}
.profile-card h2{margin:4px 0 5px}
.profile-readonly-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.profile-readonly-grid>div{
  background:#f7f9fc;
  border:1px solid #e5ebf3;
  padding:14px;
  border-radius:13px;
}
.profile-readonly-grid small{display:block;color:#728097;margin-bottom:5px}
.profile-info-note{
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  background:#eef6ff;
  color:#315f91;
  font-size:13px;
  line-height:1.45;
}
.profile-save-btn{margin-top:16px}
.password-card{margin-top:2px}
.security-mark{font-size:30px}
.profile-password-grid{align-items:start}
.profile-password-btn{margin-top:16px;min-width:230px}
.profile-message{
  padding:13px 15px;
  border-radius:12px;
  margin-bottom:18px;
  background:#fff0f1;
  color:#b70c15;
  border:1px solid #ffd4d7;
  font-weight:700;
}
.profile-message[data-type="success"]{
  background:#eaf8f1;
  color:#14714a;
  border-color:#cbeadb;
}
@media(max-width:860px){
  .profile-layout{grid-template-columns:1fr}
  .profile-hero-card{align-items:flex-start;flex-direction:column}
  .profile-account-card{width:100%;box-sizing:border-box}
  .profile-topbar{padding:10px 14px}
}
@media(max-width:620px){
  .profile-readonly-grid{grid-template-columns:1fr}
  .profile-wrap{padding:18px 12px 40px}
  .profile-hero-card{padding:22px;border-radius:18px}
  .profile-topbar{align-items:flex-start;flex-direction:column}
  .profile-topbar .actions{width:100%;display:flex;gap:8px}
  .profile-topbar .actions>*{flex:1;text-align:center}
}

/* Apariencia: el selector de tema vive exclusivamente en Mi perfil. */
.appearance-card{
  margin-top:2px;
}
.appearance-card-head{
  align-items:center;
  gap:22px;
}
.appearance-card-head>div:first-child{
  min-width:0;
}
.profile-page .theme-toggle-btn.theme-toggle-profile{
  position:relative;
  right:auto;
  bottom:auto;
  top:auto;
  left:auto;
  z-index:auto;
  flex:0 0 auto;
  min-width:148px;
  margin:0;
  box-shadow:0 8px 22px rgba(7,29,60,.10);
}
.appearance-note{
  margin-top:14px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #e3eaf4;
  border-radius:12px;
  background:#f7f9fc;
  color:#607087;
  font-size:13px;
  line-height:1.45;
}
.appearance-note-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:50%;
  background:#eaf3ff;
  color:#0d5eaf;
  font-size:17px;
  font-weight:900;
}
html[data-theme="dark"] .appearance-note{
  background:#0d1e31;
  border-color:#2a4058;
  color:#aebfd0;
}
html[data-theme="dark"] .appearance-note-icon{
  background:#123150;
  color:#8cc5ff;
}
@media(max-width:620px){
  .appearance-card-head{
    align-items:stretch;
    flex-direction:column;
  }
  .profile-page .theme-toggle-btn.theme-toggle-profile{
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    padding:9px 14px!important;
  }
  .profile-page .theme-toggle-btn.theme-toggle-profile .theme-toggle-label{
    display:inline!important;
  }
}

.profile-photo-layout{display:grid;grid-template-columns:150px minmax(0,1fr);gap:24px;align-items:center}.profile-photo-preview{width:136px;height:136px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#173b60,#0a2036);border:4px solid #1d4f7c;color:#dcecff;font-size:2rem;font-weight:900}.profile-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}.profile-photo-copy>b{display:block;color:#edf6ff;font-size:1rem;margin-bottom:6px}.profile-photo-copy>p{margin:0 0 14px;color:#96acc2}.profile-photo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}@media(max-width:620px){.profile-photo-layout{grid-template-columns:1fr;text-align:center}.profile-photo-preview{margin:auto}.profile-photo-actions{justify-content:center}}
