/* ══ PROFILE PAGE ══ */
html, body { overflow: auto; height: auto; display: flex; flex-direction: column; }

#page {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 20px;
}

/* ══ SIDEBAR ══ */
.prof-sidebar {
  position: sticky; top: 20px;
  align-self: start;
}

.ps-avatar-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
  text-align: center; margin-bottom: 12px;
}

.ps-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--acc2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; margin: 0 auto 10px;
  overflow: hidden;
}

.ps-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.ps-username { font-size: 15px; font-weight: 700; margin-bottom: 6px; }

#verify-block { margin-bottom: 12px; }

.btn-verify {
  display: block; width: 100%;
  padding: 11px 16px;
  background: linear-gradient(135deg, #2a7a2a, #3aaa3a);
  color: #fff; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  text-align: center; cursor: pointer;
  border: none; font-family: inherit;
  box-shadow: 0 3px 10px rgba(58,170,58,.3);
  transition: opacity .2s;
}
.btn-verify:hover { opacity: .85; }

.verified-badge-big {
  display: block; width: 100%; padding: 10px;
  background: rgba(58,170,58,.12); border: 1px solid rgba(58,170,58,.4);
  border-radius: 8px; color: #3aaa3a;
  font-size: 13px; font-weight: 700; text-align: center;
}

.ps-nav { display: flex; flex-direction: column; gap: 2px; }

.ps-link {
  display: block; padding: 9px 12px;
  border-radius: 6px; color: var(--text2);
  font-size: 13px; font-weight: 500;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.ps-link:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.ps-link.active { background: rgba(139,0,0,.2); color: var(--acc3); }
.ps-link.logout-link:hover { color: #ff6666; }

.nav-badge {
  display: inline-block; background: var(--acc2); color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 5px;
  border-radius: 10px; margin-left: 4px;
}

/* ══ MAIN CONTENT ══ */
.prof-main { display: flex; flex-direction: column; gap: 14px; }

/* ══ PROFILE HEADER CARD ══ */
.prof-header-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
  display: flex; gap: 20px; align-items: flex-start;
}

.prof-photo-wrap {
  position: relative; flex-shrink: 0;
}

.prof-photo {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--acc); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800;
  overflow: hidden; border: 3px solid var(--border2);
}

.prof-photo img { width: 100%; height: 100%; object-fit: cover; }

.photo-upload-btn {
  position: absolute; bottom: 4px; right: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--acc2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
  border: 2px solid var(--bg2);
  transition: background .2s;
}
.photo-upload-btn:hover { background: var(--acc3); }
#photo-file-input { display: none; }

.prof-header-info { flex: 1; }

.prof-header-name {
  font-size: 22px; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.verified-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #3aaa3a; color: #fff; font-size: 11px; font-weight: 800;
}

.prof-header-location {
  font-size: 13px; color: var(--text2); margin-bottom: 12px;
}

.prof-header-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.btn-outline {
  padding: 7px 14px; border: 1px solid var(--border2);
  border-radius: 5px; color: var(--text2); font-size: 12px;
  font-weight: 600; transition: all .15s;
}
.btn-outline:hover { border-color: var(--acc3); color: var(--acc3); }

.btn-msg {
  padding: 8px 16px;
  background: var(--acc2); color: #fff;
  border-radius: 5px; font-size: 13px; font-weight: 700;
  transition: opacity .2s; text-decoration: none;
}
.btn-msg:hover { opacity: .85; text-decoration: none; }

/* ══ SECTION CARD ══ */
.section-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}

.section-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 14px;
}

.section-title { font-size: 15px; font-weight: 700; color: var(--text); }

.edit-link {
  font-size: 12px; color: var(--acc3); cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.edit-link:hover { text-decoration: underline; }

/* ══ ABOUT ══ */
.about-text { font-size: 14px; color: var(--text2); line-height: 1.7; }
.about-empty { font-size: 13px; color: var(--text3); font-style: italic; }

.about-edit textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 5px; color: var(--text); font-size: 14px;
  min-height: 80px; resize: vertical; outline: none;
  font-family: inherit; line-height: 1.5;
  transition: border-color .2s;
}
.about-edit textarea:focus { border-color: var(--acc2); }

/* ══ INTERESTS ══ */
.interests-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.interest-tag {
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); font-size: 13px; font-weight: 500;
  cursor: default;
}

.interests-edit .interest-tag {
  cursor: pointer; transition: all .15s; user-select: none;
}
.interests-edit .interest-tag:hover { border-color: var(--acc3); color: var(--text); }
.interests-edit .interest-tag.selected {
  background: rgba(179,0,0,.2); border-color: var(--acc3);
  color: var(--acc3);
}

/* ══ DETAILS GRID ══ */
.details-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.detail-row { display: flex; flex-direction: column; }
.detail-label { font-size: 11px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.detail-value { font-size: 14px; color: var(--text2); }
.detail-empty { font-size: 13px; color: var(--text3); font-style: italic; }

.details-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.details-edit .fg { margin-bottom: 0; }

/* ══ SAVE CONTROLS ══ */
.save-row { display: flex; gap: 8px; margin-top: 14px; }

.btn-save {
  padding: 8px 20px;
  background: var(--acc2); color: #fff;
  border-radius: 5px; font-size: 13px; font-weight: 700;
  transition: opacity .2s; cursor: pointer; border: none;
  font-family: inherit;
}
.btn-save:hover { opacity: .85; }

.btn-cancel {
  padding: 8px 16px; border: 1px solid var(--border2);
  color: var(--text2); border-radius: 5px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.btn-cancel:hover { border-color: var(--text2); color: var(--text); }

/* ══ VISITORS ══ */
.visitors-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.visitor-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  width: 90px; cursor: pointer; transition: border-color .15s;
  text-decoration: none;
}
.visitor-card:hover { border-color: var(--acc3); text-decoration: none; }

.visitor-av {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  overflow: hidden;
}
.visitor-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.visitor-name { font-size: 11px; color: var(--text2); text-align: center; }

/* ══ WIDE MODAL ══ */
.wide-modal { max-width: 600px; }

/* ══ LOADING ══ */
.loading-msg { color: var(--text2); padding: 40px; text-align: center; }
