/* Edit Profile modal — self-service profile + password editor. */

.profile-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 16px;
}

.profile-edit-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #222;
}

.profile-edit-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: #1f4b2f;
}

.profile-edit-subtitle {
  margin: 0 0 12px;
  font-size: 15px;
  color: #1f4b2f;
}

.profile-edit-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-edit-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.profile-edit-input {
  border: 1px solid #d5d9d5;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  color: #222;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.profile-edit-input:focus {
  outline: none;
  border-color: #1f4b2f;
  box-shadow: 0 0 0 3px rgba(31, 75, 47, 0.12);
}

.profile-edit-input-readonly {
  background: #f3f4f3;
  color: #777;
  cursor: default;
}

.profile-edit-divider {
  height: 1px;
  background: #eaece9;
  margin: 22px 0 18px;
}

.profile-edit-msg {
  min-height: 18px;
  font-size: 13px;
  margin: 8px 0 0;
}

.profile-edit-msg-error {
  color: #b3261e;
}

.profile-edit-msg-ok {
  color: #1f4b2f;
}

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

.profile-edit-btn {
  border: none;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-edit-save {
  background: #1f4b2f;
  color: #fff;
}

.profile-edit-save:hover {
  background: #173a24;
}

.profile-edit-save:disabled {
  opacity: 0.7;
  cursor: default;
}

.profile-edit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.profile-edit-close:hover {
  background: #f0f1f0;
  color: #444;
}

/* ── #134 dark mode overrides ─────────────────────────────── */
html[data-theme="dark"] .profile-edit-overlay {
  background: rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .profile-edit-modal {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Brand ink green -> light sage so the headings read on slate. */
html[data-theme="dark"] .profile-edit-title,
html[data-theme="dark"] .profile-edit-subtitle { color: #86c9a0; }

html[data-theme="dark"] .profile-edit-label { color: #94a3b8; }

html[data-theme="dark"] .profile-edit-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .profile-edit-input::placeholder { color: #64748b; }
html[data-theme="dark"] .profile-edit-input:focus {
  border-color: #86c9a0;
  box-shadow: 0 0 0 3px rgba(134, 201, 160, 0.18);
}
html[data-theme="dark"] .profile-edit-input-readonly {
  background: #273449;
  color: #94a3b8;
}

html[data-theme="dark"] .profile-edit-divider { background: rgba(148, 163, 184, 0.14); }

html[data-theme="dark"] .profile-edit-msg-error { color: #fca5a5; }
html[data-theme="dark"] .profile-edit-msg-ok { color: #86c9a0; }

html[data-theme="dark"] .profile-edit-save {
  background: #2f7a4c;
  color: #f0fdf4;
}
html[data-theme="dark"] .profile-edit-save:hover { background: #276440; }

html[data-theme="dark"] .profile-edit-close { color: #94a3b8; }
html[data-theme="dark"] .profile-edit-close:hover {
  background: #334155;
  color: #e2e8f0;
}
