/* Panel Mi perfil (perfil.js): foto, contraseña, correo con código de confirmación y avisos. */

.perfil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
  align-items: start;
}
.perfil-col {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.perfil-id {
  display: flex;
  align-items: center;
  gap: 16px;
}
.perfil-id h2 {
  margin: 0;
}
.perfil-id .sub {
  margin: 2px 0 0;
}
.avatar.grande {
  width: 72px;
  height: 72px;
  font-size: 24px;
}
.avatar.media {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

/* Correo */
.correo-cuenta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 14px;
}
.correo-cuenta div {
  flex: 1;
  min-width: 0;
}
.correo-cuenta b {
  display: block;
  overflow-wrap: anywhere;
}
.correo-cuenta small,
.switch-row small,
.conexion small {
  display: block;
  color: var(--ink-3);
  font-weight: 400;
}
.perfil-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.perfil-acciones .button,
.perfil-acciones button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.danger.ghost {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 40%, transparent);
}
.callout-mini {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 13px;
}

/* Interruptores */
.switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.switch-row b {
  display: block;
}
.switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  display: block;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--line-2);
  transition: background 0.2s;
}
.switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch input:checked + span {
  background: var(--brand);
}
.switch input:checked + span::after {
  transform: translateX(18px);
}
.switch input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}
.switch input:disabled {
  cursor: not-allowed;
}
.switch input:disabled + span {
  opacity: 0.5;
}

/* Conexiones del sitio (solo administrador) */
.conexion {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.conexion b {
  display: block;
}
.conexion div {
  min-width: 0;
}
code,
.uri {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: var(--mint-2);
  color: var(--brand-2);
  border-radius: 6px;
  padding: 1px 6px;
}
.uri {
  display: block;
  margin-top: 6px;
  padding: 6px 8px;
  overflow-wrap: anywhere;
}

/* Foto de perfil y textos de ayuda */
.foto-acciones {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}
.foto-subir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.hint {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 400;
}
.perfil-id + .hint {
  margin-top: 12px;
}

/* Correo: formularios y código de confirmación */
.correo-form,
.codigo-form {
  margin-top: 14px;
}
.correo-form[hidden] {
  display: none;
}
.codigo-input {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.4em;
  text-align: center;
  max-width: 220px;
}
