.profile-page {
  min-height: 100vh;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
}

.profile-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

.profile-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  height: fit-content;
  box-shadow: 0 8px 28px rgba(var(--shadow-ink), 0.06);
}

.profile-heading {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.profile-subheading {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.profile-progress-wrap {
  margin-bottom: 32px;
}

.profile-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#profile-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.profile-progress-track {
  height: 10px;
  border-radius: 100px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.profile-progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-dark, var(--accent)) 0%, var(--accent) 60%, #B45CE8 100%);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.profile-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: profile-progress-shine 2.2s ease-in-out infinite;
}

@keyframes profile-progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-progress-fill { transition: none; }
  .profile-progress-fill::after { animation: none; }
}

.profile-progress-fill.complete {
  background: linear-gradient(90deg, var(--success, #1E7A46) 0%, #2FAE68 100%);
}

.profile-field {
  margin-bottom: 18px;
}

.profile-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.profile-field input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  box-sizing: border-box;
}

.profile-field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg-soft);
}

.profile-field-readonly {
  opacity: 0.85;
}

.profile-readonly-value {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 15px;
}

.btn-profile-save {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.btn-profile-save:hover:not(:disabled) {
  opacity: 0.92;
}

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

.profile-save-status {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--success, #1E7A46);
  margin: 12px 0 0;
  min-height: 18px;
}

.profile-save-status.error {
  color: var(--danger, #C0392B);
}

.avatar-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.avatar-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}

.avatar-swatch:hover {
  transform: scale(1.08);
}

.avatar-swatch.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}

.profile-oauth-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-oauth-photo-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

.profile-section-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.profile-optional-tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  margin-top: 2px;
}

.favorite-places-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  min-height: 20px;
}

.favorite-places-empty {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}

.favorite-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border-radius: 100px;
  background: var(--accent-bg-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}

.favorite-place-remove {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-place-remove:hover {
  background: rgba(0, 0, 0, 0.18);
}

.favorite-place-add-row {
  display: flex;
  gap: 8px;
}

.favorite-place-add-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-ui);
}

.btn-add-place {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-add-place:hover {
  opacity: 0.9;
}

.dob-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dob-trigger:hover {
  border-color: var(--accent);
}

.dob-trigger svg {
  color: var(--accent);
  flex-shrink: 0;
}

#dob-trigger-label.dob-set {
  color: var(--ink);
  font-weight: 600;
}

.dob-popover {
  position: relative;
  margin-top: 8px;
  max-width: 320px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.14);
  animation: date-picker-in 0.2s ease;
}

.dob-popover-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: linear-gradient(120deg, var(--accent-dark, var(--accent)) 0%, var(--accent) 100%);
}

.dob-select {
  flex: 1;
  padding: 7px 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
}

.dob-select option {
  color: var(--ink);
  background: #fff;
}

.dob-popover-header .date-picker-close {
  flex-shrink: 0;
}
