/* =============================================================
   GLAZE — Account Edit (Profile Details) page styles
   Reuses design tokens (glaze.css) and form primitives
   (.form-group / .form-input / .form-row / .btn-*) from
   glaze_components_merged.css. Page-specific polish lives here.
   ============================================================= */

:root {
  /* Semantic colors referenced by form/alert primitives */
  --error: #E53935;
  --success: #1E9E5A;
  --warning: #E8A317;
  --info: #2F80ED;
}

/* ---------- Page intro ---------- */
.account-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.account-intro .intro-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-intro h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--ink);
}
.account-intro p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}

/* ---------- Form ---------- */
.account-edit-form {
  margin: 0;
}
.form-section-hint {
  font-size: 13px;
  color: var(--ink-3);
  margin: -8px 0 18px;
}
.field-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 10px;
  align-self: center;
}
.required-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.required-note .dot {
  color: var(--error);
  font-weight: 700;
}

/* ---------- Custom radio group (gender / email format) ---------- */
.glaze-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.glaze-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--input);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition: border-color .2s, background .2s, color .2s;
}
.glaze-radio:hover {
  border-color: var(--brand);
  color: var(--ink);
}
.glaze-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.glaze-radio .radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s;
}
.glaze-radio:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.glaze-radio:has(input:checked) .radio-dot {
  border-color: var(--brand);
}
.glaze-radio:has(input:checked) .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.glaze-radio:focus-within {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* ---------- Read-only field (locked referral source) ---------- */
.form-static {
  padding: 11px 14px;
  border: 1px solid var(--input);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Message stack / alerts (account content scope) ---------- */
.account-content .alert,
.account-content .messageStackError,
.account-content .messageStackWarning {
  display: block;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 20px;
}
.account-content .alert.error,
.account-content .messageStackError {
  background: #FDECEC;
  color: var(--error);
  border: 1px solid #F6C9C9;
}
.account-content .alert.success {
  background: #E8F8EF;
  color: var(--success);
  border: 1px solid #C7ECD6;
}

/* ---------- Shared account layout (used by account, address_book, wishlist, account_edit) ---------- */
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 32px 0 64px;
  align-items: start;
}
.account-sidebar {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  position: sticky;
  top: 92px;
}
.account-content { min-width: 0; }

.sidebar-profile {
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
}
.sidebar-profile .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 auto 12px;
}
.sidebar-profile h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}
.sidebar-profile p {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0;
}

.sidebar-nav { padding: 12px 0; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: var(--brand);
  background: var(--brand-light);
  border-left-color: var(--brand);
}
.sidebar-link.active {
  color: var(--brand-ink);
  background: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}
.sidebar-link svg,
.sidebar-link i[data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: background .15s;
}
.sidebar-logout:hover { background: var(--surface-2); color: var(--brand); }
.sidebar-logout svg,
.sidebar-logout i[data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }

.page-title-wrap { margin-bottom: 24px; }
.page-title-wrap h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 4px;
}
.page-title-wrap p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}

/* ---------- Action bar ---------- */
.account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.account-actions .actions-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.account-actions .btn-primary {
  width: auto;
  padding: 13px 34px;
}
.account-actions .btn-ghost {
  padding: 13px 26px;
}
.account-actions .secondary-link {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.account-actions .secondary-link:hover {
  color: var(--brand);
}
.account-actions .secondary-link svg {
  width: 16px;
  height: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .account-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .account-sidebar {
    position: static;
  }
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .account-intro h1 {
    font-size: 26px;
  }
  .account-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .account-actions .actions-right {
    justify-content: space-between;
  }
  .account-actions .btn-primary,
  .account-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}
