:root {
  --hs-color-ink: #0f172a;
  --hs-color-muted: #5f6b7a;
  --hs-color-line: rgba(15, 23, 42, 0.12);
  --hs-color-panel: #ffffff;
  --hs-color-bg: #f5f7fb;
  --hs-color-accent: #d23c3c;
  --hs-color-accent-dark: #a52d2d;
  --hs-color-success: #0f9d58;
  --hs-color-danger: #b42318;
}

.hs-profile {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  :root {
    --hs-profile-ink: #0f172a;
    --hs-profile-muted: #6b7280;
    --hs-profile-line: #e5e7eb;
    --hs-profile-panel: #ffffff;
    --hs-profile-bg: #ffffff;
    --hs-profile-accent: #426571; /* matches other HS UI */
    --hs-profile-accent-dark: #2b3c4a;
    --hs-profile-success: #0f9d58;
    --hs-profile-danger: #b42318;
  }

  /* Shell ------------------------------------------------------------------ */

  .hs-profile {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: var(--hs-profile-ink) !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    padding: 24px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  .hs-profile--security {
    border-radius: 12px !important;
    border-color: var(--hs-profile-line) !important;
  }

  .hs-profile--details {
    border-radius: 12px !important;
  }

  /* Cards & sections ------------------------------------------------------- */

  .hs-profile__card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    margin-bottom: 25px !important;
    border-radius: 10px !important;
    padding: 20px 22px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .hs-profile__card--danger {
    background: #fff5f5 !important;
    border-color: var(--hs-profile-danger) !important;
  }

  .hs-profile__section {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    padding: 20px 22px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 25px !important;
  }

  .hs-profile__section--business {
    background: rgba(66, 101, 113, 0.04) !important;
    border-color: rgba(66, 101, 113, 0.35) !important;
    box-shadow: 0 6px 24px rgba(66, 101, 113, 0.12) !important;
  }

  .hs-profile__grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 16px !important;
  }

  /* Typography ------------------------------------------------------------- */

  .hs-profile__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    color: #8193a4;
    margin: 0 0 6px;
}

  .hs-profile h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }

  .hs-profile__copy {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: var(--hs-profile-muted) !important;
    line-height: 1.5 !important;
  }

  .hs-profile__label {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: var(--hs-profile-ink) !important;
  }

  .hs-profile__hint {
    font-size: 0.8rem !important;
    color: #9ca3af !important;
    line-height: 1.3 !important;
  }

  /* Fields ----------------------------------------------------------------- */

  .hs-profile__field {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .hs-profile__input,
  .hs-profile__form input,
  .hs-profile__form select {
    border-radius: 6px !important;
    border: 1px solid #93f4cd !important;
    padding: 9px 12px !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: #ffffff !important;
    color: var(--hs-profile-ink) !important;
    box-shadow: none !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease !important;
  }

  .hs-profile__form input:focus,
  .hs-profile__form select:focus,
  .hs-profile__input:focus {
    outline: none !important;
    border-color: var(--hs-profile-accent) !important;
    box-shadow: 0 0 0 2px rgba(66, 101, 113, 0.25) !important;
  }

  .hs-profile__input--disabled {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
  }

  /* Buttons ---------------------------------------------------------------- */

  .hs-profile__actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }

  .hs-profile__btn,
  .hs-profile button.hs-profile__btn,
  .hs-profile [type="submit"].hs-profile__btn,
  .hs-profile [type="button"].hs-profile__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 12px !important;
    padding: 7px 18px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border: 1px solid #426571 !important;
    background: #426571 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background 0.16s ease, transform 0.12s ease !important;
  }

  .hs-profile__btn:not(:disabled):hover {
    background: var(--hs-profile-accent-dark) !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
  }

  .hs-profile__btn:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    transform: none !important;
  }

  .hs-profile__btn--ghost,
  .hs-profile button.hs-profile__btn--ghost,
  .hs-profile [type="button"].hs-profile__btn--ghost {
    background: #ffffff !important;
    color: #426571 !important;
    border: 1px solid #426571 !important;
  }

  .hs-profile__btn--ghost:not(:disabled):hover {
    border-color: var(--hs-profile-accent) !important;
    color: var(--hs-profile-accent) !important;
  }

  .hs-profile__btn--danger,
  .hs-profile button.hs-profile__btn--danger,
  .hs-profile [type="submit"].hs-profile__btn--danger {
    background: #a52d2d !important;
    margin-top: 20px !important;
  }

  /* Status + errors -------------------------------------------------------- */

  .hs-profile__status {
    margin-top: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--hs-profile-muted) !important;
  }

  .hs-profile__status.is-success {
    color: var(--hs-profile-success) !important;
  }

  .hs-profile__status.is-error {
    color: var(--hs-profile-danger) !important;
  }

  .hs-profile--error {
    background: #fff5f5 !important;
    color: var(--hs-profile-danger) !important;
    border: 1px solid var(--hs-profile-danger) !important;
    border-radius: 10px !important;
    padding: 12px !important;
    text-align: center !important;
  }

  .hs-profile--alert,
  .hs-profile.hs-profile--alert {
    border: 1px solid var(--hs-profile-accent) !important;
    background: rgba(210, 60, 60, 0.08) !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    color: var(--hs-profile-ink) !important;
    box-shadow: 0 8px 24px rgba(178, 35, 24, 0.18) !important;
  }

  .hs-profile--alert p,
  .hs-profile.hs-profile--alert p {
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
  }

  .hs-profile__link {
    color: var(--hs-profile-ink) !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-decoration: underline !important;
  }

  /* Security layout -------------------------------------------------------- */

  [data-hs-profile-security] {
    display: grid !important;
    gap: 18px !important;
  }

  [data-hs-profile-security] form {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  [data-hs-profile-status] {
    margin-top: 6px !important;
  }

}

/* Top-level heading styles for profile blocks --------------------------- */

.hs-profile .hs-profile__card h3,
.hs-profile .hs-profile__section h3 {
  margin: 0 0 12px 0 !important;
  font-size: 22px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  color: var(--hs-profile-ink, #0f172a) !important;
}

/* Standalone alert styles (top-level selectors to override Elementor wrappers) */
.hs-profile--alert,
.hs-profile.hs-profile--alert {
  border: 1px solid #d23c3c !important;
  background: rgba(210, 60, 60, 0.08) !important;
  border-radius: 12px !important;
  padding: 18px 20px !important;
  color: var(--hs-profile-ink, #0f172a) !important;
  box-shadow: 0 8px 24px rgba(178, 35, 24, 0.18) !important;
  display: block !important;
}

.hs-profile--alert p,
.hs-profile.hs-profile--alert p {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: inherit !important;
}

.hs-profile__link,
.hs-profile.hs-profile--alert .hs-profile__link {
  color: #0f172a !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-decoration: underline !important;
}
