/* Perfil Instituto DPC — distribución tipo NODO (cards + hero), identidad #CA233F */

.perfil-main {
  max-width: 960px;
  padding-top: 1.25rem;
  padding-bottom: 3.5rem;
}

/* —— Hero (como cabecera de perfil NODO, en claro) —— */
.perfil-hero {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.15rem;
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(202, 35, 63, 0.14), transparent 50%),
    linear-gradient(180deg, #fff, #f7f8f9);
  border: 1px solid rgba(25, 33, 38, 0.08);
  box-shadow: 0 10px 28px rgba(25, 33, 38, 0.05);
}

.perfil-hero-avatar-wrap {
  position: relative;
  flex: none;
}

.profile-avatar.xl {
  width: 96px;
  height: 96px;
  font-size: 2.1rem;
  border-width: 3px;
  border-color: #CA233F;
  box-shadow: 0 8px 22px rgba(202, 35, 63, 0.2);
}

.perfil-photo-fab {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #192126;
  border: 1px solid rgba(25, 33, 38, 0.12);
  box-shadow: 0 4px 12px rgba(25, 33, 38, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.perfil-photo-fab:hover { background: #f3f4f5; }
.perfil-photo-fab:active,
.perfil-photo-fab.is-pressed { transform: scale(0.94); }
.perfil-photo-fab svg { width: 16px; height: 16px; }

.perfil-hero-meta { min-width: 0; }
.perfil-hero-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #CA233F;
}
.perfil-hero-name {
  margin: 0 0 0.2rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: -0.02em;
  color: #192126;
  overflow-wrap: anywhere;
}
.perfil-hero-email {
  margin: 0;
  color: #5a6368;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.perfil-badge {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(202, 35, 63, 0.1);
  border: 1px solid rgba(202, 35, 63, 0.35);
  color: #CA233F;
  font-size: 0.78rem;
  font-weight: 700;
}

/* —— Grid de cards —— */
.perfil-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.perfil-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.2rem 1.2rem 1.25rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(25, 33, 38, 0.08);
  box-shadow: 0 8px 22px rgba(25, 33, 38, 0.04);
  min-width: 0;
}

.perfil-card--accent {
  background:
    linear-gradient(165deg, rgba(202, 35, 63, 0.05), transparent 45%),
    #fff;
  border-color: rgba(202, 35, 63, 0.14);
}

.perfil-card--staff {
  grid-column: 1 / -1;
  border-color: rgba(202, 35, 63, 0.35);
  background:
    linear-gradient(120deg, rgba(202, 35, 63, 0.07), transparent 40%),
    #fff;
}

.perfil-card--staff[hidden],
.perfil-card[hidden],
#perfilPasswordBlock[hidden] {
  display: none !important;
}

.perfil-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.perfil-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #192126;
}

.perfil-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(202, 35, 63, 0.1);
  color: #CA233F;
  flex: none;
}
.perfil-card-icon svg { width: 20px; height: 20px; }

.perfil-pill {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #CA233F;
  background: rgba(202, 35, 63, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.perfil-card-lead {
  margin: 0;
  color: #5a6368;
  font-size: 0.88rem;
  line-height: 1.45;
}

.perfil-card-form {
  display: grid;
  gap: 0.75rem;
}

.perfil-field {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: #445055;
  min-width: 0;
}

.perfil-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d5d8db;
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  color: #192126;
  background: #fafbfc;
}

.perfil-field input:focus {
  outline: none;
  border-color: #CA233F;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(202, 35, 63, 0.12);
}

#perfilEmail {
  background: #eef0f2;
  color: #5a6368;
}

.perfil-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.perfil-card-actions .btn-sm,
.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.perfil-link-btn {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.25rem;
  color: #5a6368;
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.perfil-link-btn:hover { color: #CA233F; }

.ok-msg {
  color: #1b6b36;
  font-weight: 600;
  margin: 0;
  font-size: 0.88rem;
}

.error {
  color: #CA233F;
  font-size: 0.88rem;
  margin: 0;
}

/* Meet toggle */
.meet-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(25, 33, 38, 0.03);
  border: 1px solid rgba(25, 33, 38, 0.06);
}

.meet-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.meet-toggle-ui {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: #c5cad0;
  position: relative;
  transition: background 0.2s ease;
}

.meet-toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.meet-toggle input:checked + .meet-toggle-ui { background: #CA233F; }
.meet-toggle input:checked + .meet-toggle-ui::after { transform: translateX(18px); }
.meet-toggle input:focus-visible + .meet-toggle-ui {
  box-shadow: 0 0 0 3px rgba(202, 35, 63, 0.25);
}

.meet-toggle-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.meet-toggle-text strong {
  font-size: 0.92rem;
  color: #192126;
}
.meet-toggle-text small {
  font-size: 0.78rem;
  color: #6a7378;
  line-height: 1.35;
  font-weight: 400;
}

.meet-fields {
  display: grid;
  gap: 0.75rem;
}
.meet-fields[hidden] { display: none !important; }
.meet-save-row {
  margin-top: 0.85rem;
}

.meet-same {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  line-height: 1.35;
}
.meet-same input {
  margin-top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: #CA233F;
}

.perfil-staff-scopes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.perfil-staff-scopes li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(25, 33, 38, 0.06);
  color: #333;
}
.perfil-staff-scopes[hidden] { display: none !important; }

/* Alerta Meet */
.meet-alert {
  background: #fff4e5;
  border: 1px solid #f0c36d;
  color: #5c3b00;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.meet-alert a {
  color: #CA233F;
  font-weight: 700;
}

.meet-reg-block {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid #eee;
}

.muted.small {
  font-size: 0.82rem;
  margin: 0;
}

@media (max-width: 720px) {
  .perfil-hero {
    flex-direction: column;
    text-align: center;
    padding: 1.35rem 1.1rem;
  }
  .perfil-hero-avatar-wrap { margin: 0 auto; }
  .perfil-grid {
    grid-template-columns: 1fr;
  }
  .perfil-card--staff { grid-column: auto; }
}
