
  /* =====================================
     Profile page
     ===================================== */
  #profile-content.profile-page {
    background: transparent;
  }

  #profile-content.profile-page #listings-container.profile-page__container {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 16px 96px;
    box-sizing: border-box;
  }

  #profile-content .profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 18px;
    margin-bottom: 16px;
    border: 1px solid #e5ebf3;
    border-radius: 22px;
    background:
      radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
  }

  #profile-content .profile-hero--edit {
    margin-bottom: 18px;
  }

  #profile-content .profile-hero__copy {
    min-width: 0;
  }

  #profile-content .profile-hero__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
  }

  #profile-content .profile-hero h2 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #0f172a;
  }

  #profile-content .profile-hero p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
    max-width: 620px;
  }

  #profile-content .profile-hero__action {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  #profile-content .profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .95fr);
    gap: 18px;
  }

  #profile-content .profile-card {
    border: 1px solid #e5ebf3;
    border-radius: 24px;
    background:
      radial-gradient(circle at top right, rgba(37,99,235,.05), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
    overflow: hidden;
  }

  #profile-content .profile-card--details,
  #profile-content .profile-card--form {
    padding: 0;
  }

  #profile-content .profile-card--side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  #profile-content .profile-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  #profile-content .profile-card__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
  }

  #profile-content .profile-card__header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
  }

  #profile-content .profile-details-list {
    padding: 6px 20px 2px;
  }

  #profile-content .profile-detail-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid #eef2f7;
  }

  #profile-content .profile-detail-row:last-child {
    border-bottom: 0;
  }

  #profile-content .profile-detail-row__label {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    letter-spacing: -.01em;
  }

  #profile-content .profile-detail-row__value {
    min-width: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #0f172a;
    font-weight: 700;
    word-break: break-word;
  }

  #profile-content .profile-inline-msg {
    margin: 16px 20px 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
  }

  #profile-content .profile-inline-msg.success,
  #profile-content #profile-msg-view.success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
  }

  #profile-content #profile-msg-edit.error,
  #profile-content .profile-inline-msg.error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
  }

  #profile-content .profile-actions-row {
    padding: 18px 20px 20px;
    border-top: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  #profile-content .profile-side-panel {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  #profile-content .profile-side-panel__icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  }

  #profile-content .profile-side-panel__text h4 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.01em;
  }

  #profile-content .profile-side-panel__text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
  }

  #profile-content .profile-danger-zone {
    padding: 18px;
    border: 1px solid #fecaca;
    border-radius: 20px;
    background:
      radial-gradient(circle at top right, rgba(239,68,68,.05), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
  }

  #profile-content .profile-danger-zone__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #dc2626;
  }

  #profile-content .profile-danger-zone h4 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    color: #7f1d1d;
    letter-spacing: -.01em;
  }

  #profile-content .profile-danger-help {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #7f1d1d;
  }

  #profile-content .profile-delete-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  #profile-content .profile-delete-btn.is-loading {
    opacity: .72;
    cursor: wait;
  }

  #profile-content .profile-form {
    padding: 20px;
  }

  #profile-content .profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 16px;
  }

  #profile-content .profile-form-field {
    min-width: 0;
  }

  #profile-content .profile-form-field .form-label {
    display: block;
    margin-bottom: 8px;
    padding-top: 0 !important;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.01em;
  }

  #profile-content .profile-form-field .form-group {
    margin: 0;
  }

  #profile-content .profile-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    padding: 0 14px;
    font-size: 14px;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
  }

  #profile-content .profile-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
  }

  #profile-content .profile-password-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    background: #f8fbff;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
  }

  #profile-content .profile-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
  }

  #profile-content .profile-save-btn,
  #profile-content .profile-back-btn {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: -.01em;
  }

  #profile-content .profile-save-btn[disabled],
  #profile-content .profile-back-btn[disabled] {
    opacity: .7;
    cursor: not-allowed;
  }

  @media (max-width: 900px) {
    #profile-content .profile-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 767px) {
    #profile-content.profile-page #listings-container.profile-page__container {
      padding: 16px 14px 96px;
    }

    #profile-content .profile-hero {
      flex-direction: column;
      align-items: flex-start;
      padding: 16px;
    }

    #profile-content .profile-hero h2 {
      font-size: 24px;
    }

    #profile-content .profile-hero__action {
      width: 100%;
      justify-content: center;
    }

    #profile-content .profile-card__header {
      padding: 16px 16px 14px;
    }

    #profile-content .profile-details-list {
      padding: 4px 16px 2px;
    }

    #profile-content .profile-detail-row {
      grid-template-columns: 1fr;
      gap: 6px;
      padding: 14px 0;
    }

    #profile-content .profile-actions-row {
      padding: 16px;
    }

    #profile-content .profile-form {
      padding: 16px;
    }

    #profile-content .profile-form-grid {
      grid-template-columns: 1fr;
      gap: 14px;
    }

    #profile-content .profile-form-actions {
      flex-direction: column;
    }

    #profile-content .profile-save-btn,
    #profile-content .profile-back-btn,
    #profile-content .profile-delete-btn {
      width: 100%;
      justify-content: center;
    }

    #profile-content .profile-card--side {
      padding: 16px;
    }
  }



/* ===== Profile view + edit – mobile friendly ===== */

#profile-content {
  padding: 10px 12px 80px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f4f5f7;}

#profile-content #listings-container {
  max-width: 640px;
  margin: 0 auto;
}

/* Page title inside profile */

#profile-content .page-title {
  margin-bottom: 8px;}

#profile-content .page-title .wrap h2 {
  font-size: 18px; font-weight: 600; margin: 0 0 4px; color: #0f172a;}

#profile-content .page-title .wrap p {
  font-size: 13px; color: #6b7280; margin: 0 0 4px;}

/* Card container for both view and edit blocks */

#profile-content .block {
  background: #ffffff; border-radius: 16px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12); padding: 12px 14px 16px; margin: 6px 0 0;}

/* ===== Read-only details (profile-view) ===== */

#profile-content .profile-detail {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f5;
}

#profile-content .profile-detail:last-child {
  border-bottom: none;}

#profile-content .profile-detail strong {
  font-size: 13px; font-weight: 600; color: #64748b; min-width: 90px;}

#profile-content .profile-detail span {
  font-size: 14px; color: #0f172a; text-align: right; word-break: break-word;}

/* View-mode message under details */

#profile-content #profile-msg-view {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 1.4;}

#profile-content #profile-msg-view.success {
  background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0;}

/* ===== Edit form (profile-edit) ===== */

#profile-content #profile-edit-form .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  margin: 8px 0 4px;
  padding-top: 0 !important; /* override inline if needed */
}

#profile-content #profile-edit-form .form-group {
  margin-bottom: 8px;}

#profile-content #profile-edit-form .form-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #d4d7e2;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.3;
  color: #0f172a;
  background: #ffffff;
  -webkit-appearance: none;
}

#profile-content #profile-edit-form .form-input:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);}

/* Edit-mode message */

#profile-content #profile-msg-edit {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 1.4;}

#profile-content #profile-msg-edit.error {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;}

#profile-content #profile-msg-edit.success {
  background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0;}

/* ===== Buttons – use existing .btn classes but more mobile friendly here ===== */

#profile-content .btn {
  min-height: 44px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  box-sizing: border-box;
}

/* Blue primary button (Edit / Save) */
#profile-content .btn.blue { background: #1f6feb; color: #ffffff; border: none;}

/* Alt button (Back To Profile) */
#profile-content .btn.alt {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

#profile-content .mar-bot-2 { display: flex; flex-wrap: wrap; gap: 8px;}
#profile-content .block { padding: 12px 12px 20px;}

.profile-detail {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

.profile-detail strong { flex: 0 0 32%; color: #6b7280;}
.profile-detail span { flex: 1; text-align: right; color: #111827; word-break: break-word;}
.profile-danger-zone { margin-top: 16px; padding-top: 10px; border-top: 1px solid #fee2e2;}
.btn.danger { background: #dc2626; border-color: #b91c1c; color: #fff;}

.btn.danger:hover,
.btn.danger:focus {
  background: #b91c1c;
  border-color: #991b1b;
}

.btn.danger.is-loading { opacity: 0.7; pointer-events: none;}
.profile-danger-help { margin: 6px 0 0; font-size: 12px; color: #6b7280;}
