/* =====================================================
   PROFILE PAGE – HABIT MOVER UI
===================================================== */

/* Reuse container spacing nicely */
.container {
  max-width: 520px;
  margin: auto;
  padding: 20px;
}

/* =====================================================
   TOP BAR (PROFILE)
===================================================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.topbar button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
}

/* =====================================================
   PROFILE CARD
===================================================== */
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* =====================================================
   AVATAR
===================================================== */
.avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 10px auto 20px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0,0,0,0.1);
}

.avatar-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #4f46e5, #6d5dfc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79,70,229,0.5);
}

.avatar-btn span {
  font-size: 16px;
}

/* =====================================================
   FORM ELEMENTS
===================================================== */
.profile-card label {
  font-size: 13px;
  opacity: 0.75;
}

.profile-card input {
  padding: 14px;
  border-radius: 12px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.75);
  font-size: 14px;
}

body.dark .profile-card input {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.profile-card input:disabled {
  opacity: 0.6;
}

/* =====================================================
   BUTTONS
===================================================== */
.profile-card button {
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.profile-card button:active {
  transform: scale(0.97);
}

#saveProfileBtn {
  background: linear-gradient(135deg, #4f46e5, #6d5dfc);
  color: #fff;
}

#changePasswordBtn {
  background: rgba(0,0,0,0.1);
}

body.dark #changePasswordBtn {
  background: rgba(255,255,255,0.12);
}

/* =====================================================
   SECTION DIVIDER
===================================================== */
.profile-card hr {
  border: none;
  height: 1px;
  background: rgba(0,0,0,0.1);
  margin: 16px 0;
}

body.dark .profile-card hr {
  background: rgba(255,255,255,0.15);
}

/* =====================================================
   HEADINGS & TEXT
===================================================== */
.profile-card h3 {
  margin: 4px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

#msg {
  font-size: 13px;
  text-align: center;
  opacity: 0.8;
}

/* =====================================================
   MOBILE POLISH
===================================================== */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }

  .avatar-wrap {
    width: 96px;
    height: 96px;
  }

  .profile-card input {
    font-size: 15px;
  }

  .profile-card button {
    font-size: 16px;
  }
}
