:host {
  --brand: #E33DCF;
  --blue: #030FAA;
  --text: #111214;
  --muted: rgba(17, 18, 20, 0.65);
  --success-bg: rgba(25, 135, 84, 0.1);
  --success-text: #198754;
  --danger-bg: rgba(220, 53, 69, 0.1);
  --danger-text: #dc3545;
  --radius-xl: 22px;
  --shadow-card: 0 22px 46px rgba(17, 18, 20, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: 1px solid rgba(227, 61, 207, 0.16);

  display: block;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  box-sizing: border-box;
}

.perfil-page {
  min-height: 100vh;
  padding: 0 12px;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-y: auto;
  background:
    radial-gradient(900px 420px at 20% 10%, rgba(227, 61, 207, 0.14), transparent 60%),
    radial-gradient(820px 380px at 80% 30%, rgba(227, 61, 207, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 70%);
}

.page-blob {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.55;
  z-index: 0;
  background: radial-gradient(circle at 30% 30%, rgba(227, 61, 207, 0.55), rgba(227, 61, 207, 0.06));
  animation: floaty 10s ease-in-out infinite;

  &.blob-1 { width: 420px; height: 420px; top: -140px; left: -140px; }
  &.blob-2 { width: 520px; height: 520px; top: -220px; right: -240px; animation-duration: 12s; }
  &.blob-3 { width: 360px; height: 360px; bottom: -180px; left: 25%; animation-duration: 14s; }
  &.blob-4 { width: 520px; height: 520px; bottom: -260px; right: -260px; animation-duration: 16s; opacity: 0.45; }
}

@keyframes floaty {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, 10px) scale(1.03); }
  100% { transform: translate(0, 0) scale(1); }
}

.container-geral-responsive {
  width: 100%;
  max-width: 1180px;
  position: relative;
  z-index: 1;
  margin-top: 40px;
  margin-bottom: 120px;
}

.geral-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--glass-bg);
  border: var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-height: 80vh;
}

.geral-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(17, 18, 20, 0.06);
  background: linear-gradient(180deg, rgba(227, 61, 207, 0.06), rgba(255, 255, 255, 0.2));
}

.header-row-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.title-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(227, 61, 207, 0.22);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;

  i { color: var(--brand); }
}

.header-title {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.title {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-top: 10px;
}

.subtitle {
  color: var(--muted);
  font-weight: 700;
}

.header-actions {
  justify-self: end;
  min-height: 1px;
}

.geral-body {
  padding: 18px;
}

.perfil-sections {
  display: grid;
  gap: 14px;
}

.perfil-section-card {
  background: #ffffff;
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(17, 18, 20, 0.06);
  padding: 18px 20px;
}

.section-header {
  margin-bottom: 12px;

  h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
}

.form-alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;

  &.error {
    background: var(--danger-bg);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger-text);
  }

  &.success {
    background: var(--success-bg);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: var(--success-text);
  }
}

.profile-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;

  label {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
}

.form-control {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(17, 18, 20, 0.16);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 14px;
  padding: 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;

  &:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(227, 61, 207, 0.15);
    background: #fff;
  }
}

.field-error {
  color: var(--danger-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-brand {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 900;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;

  &:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(227, 61, 207, 0.25);
    filter: brightness(1.05);
  }

  &:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
  }
}

@media (max-width: 768px) {
  .container-geral-responsive {
    margin-top: 16px;
    margin-bottom: 64px;
  }

  .header-row-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }

  .title-badge {
    justify-self: center;
  }

  .header-actions {
    display: none;
  }

  .geral-header {
    padding: 14px 16px;
  }

  .geral-body {
    padding: 12px;
  }

  .perfil-section-card {
    padding: 14px;
  }

  .section-actions {
    justify-content: stretch;
  }

  .section-actions .btn {
    width: 100%;
  }
}
