.profile-page {
  background: #fffaf4;
  min-height: 100vh;
}

/* AUTH HEADER SAME AS OTHER UPDATED PAGES */

.auth-menu {
  position: relative;
  flex: 0 0 auto;
}

.user-dropdown {
  position: relative;
}

.user-dropdown-btn {
  min-height: 44px;
  border: none;
  border-radius: 7px;
  background: var(--maroon);
  color: white;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(141, 16, 34, 0.18);
}

.user-dropdown-btn:hover {
  background: var(--maroon-dark);
}

.user-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 240px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  padding: 10px;
  display: none;
  z-index: 500;
}

.user-dropdown-panel.show {
  display: block;
}

.user-box {
  padding: 12px;
  background: #fff6e9;
  border: 1px solid #ead8c1;
  border-radius: 10px;
  margin-bottom: 8px;
}

.user-box strong {
  display: block;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 4px;
  line-height: 1.3;
}

.user-box small {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.user-dropdown-panel a,
.user-dropdown-panel button {
  width: 100%;
  min-height: 40px;
  border: none;
  background: transparent;
  color: #243044;
  display: flex;
  align-items: center;
  text-align: left;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.user-dropdown-panel a:hover,
.user-dropdown-panel button:hover {
  background: #fff6e9;
  color: var(--maroon);
}

.mobile-auth-box {
  display: none;
}

.mobile-auth-box button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

/* HERO */

.profile-hero {
  padding: 52px 0 38px;
  background: linear-gradient(90deg, #fff7ea, #f7e4ca);
  border-bottom: 1px solid #ead8c1;
}

.profile-hero h1 {
  color: var(--blue);
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.05;
  margin-bottom: 12px;
}

.profile-hero p {
  max-width: 760px;
  color: #5a667a;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
}

/* LAYOUT */

.profile-section {
  padding: 34px 0 70px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 26px;
  align-items: flex-start;
}

.profile-summary-card,
.profile-form-card {
  background: #ffffff;
  border: 1px solid #ead8c1;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.profile-summary-card {
  padding: 26px;
  position: sticky;
  top: 130px;
}

.avatar-circle {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--maroon);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 18px;
  box-shadow: 0 16px 30px rgba(141, 16, 34, 0.20);
}

.profile-summary-card h2 {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
}

.profile-summary-card p {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  word-break: break-word;
}

.profile-status {
  margin: 18px 0;
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff6e9;
  border: 1px solid #ead8c1;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 900;
}

.profile-status.saved {
  background: #effaf3;
  border-color: #bfe8cc;
  color: #0d7a32;
}

.summary-lines {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.summary-lines div {
  background: #fffaf4;
  border: 1px solid #f0e1cf;
  border-radius: 12px;
  padding: 13px;
}

.summary-lines span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.summary-lines strong {
  display: block;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  word-break: break-word;
}

/* FORM */

.profile-form-card {
  padding: 28px;
}

.form-heading {
  margin-bottom: 22px;
}

.form-heading p {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  margin-bottom: 6px;
}

.form-heading h2 {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.profile-message {
  padding: 13px 15px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 850;
}

.profile-message.success {
  display: block !important;
  color: #0d7a32;
  background: #effaf3;
  border: 1px solid #bfe8cc;
}

.profile-message.error {
  display: block !important;
  color: var(--maroon);
  background: #fff1f3;
  border: 1px solid #ecc7ce;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  color: #243044;
  font-size: 13px;
  font-weight: 900;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 50px;
  border: 1px solid #ead8c1;
  background: #fffaf4;
  color: #1f2937;
  border-radius: 9px;
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  font-weight: 800;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--gold);
  background: #ffffff;
}

.form-field small {
  color: #667085;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.secondary-profile-btn,
.save-profile-btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.secondary-profile-btn {
  border: 1px solid var(--maroon);
  color: var(--maroon);
  background: #ffffff;
}

.secondary-profile-btn:hover {
  background: var(--maroon);
  color: #ffffff;
}

.save-profile-btn {
  border: none;
  background: var(--maroon);
  color: #ffffff;
}

.save-profile-btn:hover {
  background: var(--maroon-dark);
}

.save-profile-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .auth-menu {
    display: none;
  }

  .mobile-auth-box {
    display: block;
    width: 100%;
  }

  .mobile-auth-box a,
  .mobile-auth-box button {
    display: block;
    width: 100%;
    padding: 13px 12px;
    color: #243044;
    font-size: 14px;
    font-weight: 900;
  }

  .mobile-auth-box a:hover,
  .mobile-auth-box button:hover {
    background: #fff6e9;
    color: var(--maroon);
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-summary-card {
    position: static;
  }
}

@media (max-width: 650px) {
  .profile-hero {
    padding: 38px 0 28px;
  }

  .profile-form-card,
  .profile-summary-card {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    flex-direction: column;
  }

  .secondary-profile-btn,
  .save-profile-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .profile-hero h1 {
    font-size: 32px;
  }

  .form-heading h2 {
    font-size: 23px;
  }
}