/* ── Profile Page ────────────────────────────────────────────────────────────── */
.profile-view {
  padding: 28px 20px;
}

.profile-header,
.profile-privacy-section,
.profile-info-grid {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.profile-header {
  text-align: center;
  padding: 32px 0 24px;
}

.profile-avatar-wrap {
  margin: 0 auto 16px;
  display: inline-block;
}

.profile-avatar-img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.profile-avatar-fallback {
  width: 80px; height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-name-row h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.profile-role-badge {
  display: inline-block;
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
}
.profile-role-badge.hidden { display: none; }

.profile-reg-date {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Profile Info Grid */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 0 0 20px;
}

.profile-info-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.1);
}

.profile-info-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.profile-info-value {
  font-size: .92rem;
  color: var(--text);
}

/* Profile Notes Section */
.profile-section {
  margin-top: 4px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.profile-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-dim);
}

/* ── Profile privacy toggles ─────────────────────────────────────────────── */
.profile-privacy-section { margin-bottom: 20px; }
.privacy-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.privacy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .88rem;
  color: var(--text-dim);
  transition: border-color .2s, background .2s;
}
.privacy-toggle:hover {
  border-color: var(--button-soft);
  background: rgba(255,255,255,.1);
}

.profile-section .notes-grid {
  /* 继承 .notes-grid 的多列自适应布局，与笔记大厅保持一致 */
}

/* ── Profile Admin Bar ──────────────────────────────────────────────────── */
.profile-admin-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 18px 0 6px; padding: 14px 18px;
  background: rgba(28,36,68,.35); border: 1px solid var(--border); border-radius: 12px;
}
.profile-admin-bar.hidden { display: none; }

.btn-profile-admin {
  padding: 8px 16px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; cursor: pointer; font-family: inherit;
  background: var(--accent); color: var(--button-text); border: none;
  box-shadow: 0 0 14px rgba(245,213,98,.18);
  transition: background .2s, box-shadow .2s;
}
.btn-profile-admin:hover { background: #E0C550; box-shadow: 0 0 20px rgba(245,213,98,.3); }
.btn-profile-admin.off {
  background: rgba(255,255,255,.08); color: var(--text-dim);
  box-shadow: none;
}
.btn-profile-admin.off:hover { background: rgba(255,255,255,.12); }

.btn-profile-delete {
  margin-left: auto;
  background: linear-gradient(105deg, rgba(255,221,226,.9), rgba(255,248,238,.85));
  color: #d94d67; box-shadow: none;
}
.btn-profile-delete:hover { background: linear-gradient(105deg, rgba(255,205,213,.95), rgba(255,245,235,.92)); }
