/* ============================================================
   SINGO MINGO &#8212; Dashboard / App Pages CSS
   Phase 3 &#8212; Logged-in user interface
   ============================================================ */

/* &#9472;&#9472; App Layout (sidebar + main) &#9472;&#9472; */
.app-layout {
  display: flex;
  min-height: calc(100vh - 68px);
  background: var(--bg);
}

/* &#9472;&#9472; Sidebar Nav &#9472;&#9472; */
.sidebar {
  width: 240px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

@media (max-width: 900px) {
  .sidebar { display: none; }
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 16px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--text-sub);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.sidebar-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--primary-s);
  color: var(--primary);
  font-weight: 700;
}

.sidebar-link .s-icon { font-size: 1.15rem; flex-shrink: 0; }

.sidebar-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px 0;
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 2px solid var(--primary-s);
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-status {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* &#9472;&#9472; Main Content Area &#9472;&#9472; */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 28px 20px;
  max-width: 900px;
}

@media (min-width: 1024px) {
  .app-main { padding: 32px 36px; }
}

/* &#9472;&#9472; Bottom Mobile Nav &#9472;&#9472; */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 8px 0 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

@media (max-width: 900px) {
  .mobile-bottom-nav { display: flex; }
  .app-main { padding: 20px 14px 90px; }
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.mobile-nav-item .mn-icon { font-size: 1.4rem; line-height: 1; }
.mobile-nav-item .mn-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-mute);
  transition: color 0.2s;
}
.mobile-nav-item.active .mn-label { color: var(--primary); }
.mobile-nav-item.active .mn-icon { filter: none; }

.mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
}

/* &#9472;&#9472; Dashboard Header &#9472;&#9472; */
.dash-header {
  margin-bottom: 28px;
}

.dash-greeting {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.dash-subtitle { font-size: 0.9rem; color: var(--text-sub); }

/* &#9472;&#9472; Stat Cards Row &#9472;&#9472; */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}

.stat-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }

.sc-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.sc-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.sc-label {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-weight: 500;
}

/* &#9472;&#9472; Section Card &#9472;&#9472; */
.dash-section {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-s);
}

.dash-section-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-section-link {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.dash-section-link:hover { color: var(--primary-h); }

.dash-section-body { padding: 16px 20px; }

/* &#9472;&#9472; Suggested Users Row &#9472;&#9472; */
.suggested-users {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.suggested-users::-webkit-scrollbar { display: none; }

.suggested-card {
  flex-shrink: 0;
  width: 140px;
  height: 200px;
  background: var(--bg-alt);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-s);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  cursor: pointer;
  position: relative;
}

.suggested-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* Full-cover photo area */
.sc-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.sc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback initial shown when no photo */
.sc-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
  color: #fff;
}

/* Gradient overlay at bottom for text readability */
.sc-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  padding: 10px 8px 8px;
}

.sc-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-loc { font-size: 0.68rem; color: rgba(255,255,255,0.8); margin-top: 2px; margin-bottom: 6px; }

.sc-action {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 5px 0;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.sc-action:hover { background: var(--primary-h); }

/* &#9472;&#9472; Recent Chats Row &#9472;&#9472; */
.chat-list { display: flex; flex-direction: column; }

.chat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-s);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  text-decoration: none;
}
.chat-item:last-child { border-bottom: none; }
.chat-item:hover { opacity: 0.8; }

.chat-avatar {
  position: relative;
  flex-shrink: 0;
}
.chat-avatar img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-alt);
}
.chat-avatar .online-indicator {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  background: #22C55E;
  border-radius: 50%;
  border: 2px solid var(--card);
}

.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.chat-preview { font-size: 0.82rem; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.chat-meta { text-align: right; flex-shrink: 0; }
.chat-time { font-size: 0.72rem; color: var(--text-mute); }
.chat-unread {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  margin-top: 4px;
}

/* &#9472;&#9472; Invite Progress Banner &#9472;&#9472; */
.invite-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.invite-banner::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.ib-icon { font-size: 2rem; flex-shrink: 0; }
.ib-content { flex: 1; min-width: 160px; }
.ib-title { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.ib-sub { font-size: 0.82rem; opacity: 0.85; }
.ib-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.ib-btn:hover { background: rgba(255,255,255,0.3); color: white; }

/* &#9472;&#9472; Sponsored Ad Unit (tasteful, in-app) &#9472;&#9472; */
.sponsored-box {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--text-mute);
}
.sponsored-box .ad-label-pill {
  background: var(--bg-alt);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* &#9472;&#9472; Explore Grid &#9472;&#9472; */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 540px) { .explore-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .explore-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .explore-grid { grid-template-columns: repeat(4, 1fr); } }

.explore-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-s);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.explore-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--primary); }

.ec-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.ec-img img { width: 100%; height: 100%; object-fit: cover; }

.ec-online {
  position: absolute;
  top: 10px; right: 10px;
  width: 10px; height: 10px;
  background: #22C55E;
  border-radius: 50%;
  border: 2px solid var(--card);
}

.ec-body { padding: 12px; }
.ec-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--text); }
.ec-meta { font-size: 0.75rem; color: var(--text-sub); margin-top: 3px; }
.ec-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.ec-tag { background: var(--bg-alt); color: var(--text-sub); padding: 3px 8px; border-radius: 50px; font-size: 0.68rem; font-weight: 600; }
.ec-actions { display: flex; gap: 8px; margin-top: 10px; }
.ec-btn { flex: 1; padding: 8px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; border: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s; font-family: 'DM Sans', sans-serif; }
.ec-btn-like { background: var(--primary-s); color: var(--primary); }
.ec-btn-like:hover { background: var(--primary); color: white; }
.ec-btn-msg { background: var(--accent-s); color: var(--accent); }
.ec-btn-msg:hover { background: var(--accent); color: white; }

/* &#9472;&#9472; Explore Filters &#9472;&#9472; */
.explore-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.explore-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--primary);
  background: var(--primary-s);
  color: var(--primary);
}

/* &#9472;&#9472; Profile Page &#9472;&#9472; */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-wrap {
  position: relative;
  margin-top: -52px;
  padding: 0 20px;
}
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 4px solid var(--card);
  object-fit: cover;
  background: var(--primary-s);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}

.profile-body { padding: 16px 20px 24px; }
.profile-name { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--text); }
.profile-username { font-size: 0.88rem; color: var(--text-sub); margin-top: 2px; }
.profile-bio { font-size: 0.92rem; color: var(--text-sub); margin-top: 12px; line-height: 1.65; }

.profile-stats {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-s);
  border-bottom: 1px solid var(--border-s);
}
.ps-item { text-align: center; }
.ps-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.ps-label { font-size: 0.72rem; color: var(--text-sub); font-weight: 600; margin-top: 2px; }

.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.profile-interests { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pi-tag {
  background: var(--bg-alt);
  border: 1px solid var(--border-s);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* &#9472;&#9472; Invite Page &#9472;&#9472; */
.invite-code-box {
  background: var(--card);
  border: 2px solid var(--primary-s);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.invite-code {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 6px;
  margin: 16px 0;
  display: block;
}
.copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.copy-btn:hover { background: var(--primary-h); }

.invite-progress {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.reward-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-s);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.reward-step:last-child { border-bottom: none; }

.rs-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.rs-icon.locked { background: var(--bg-alt); filter: grayscale(1); opacity: 0.5; }
.rs-icon.unlocked { background: var(--primary-s); }
.rs-icon.done { background: #DCFCE7; }

.rs-info { flex: 1; }
.rs-title { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.rs-desc { font-size: 0.78rem; color: var(--text-sub); margin-top: 2px; }

.rs-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}
.rs-badge.locked { background: var(--bg-alt); color: var(--text-mute); }
.rs-badge.next { background: var(--primary-s); color: var(--primary); }
.rs-badge.done { background: #DCFCE7; color: #16A34A; }

/* &#9472;&#9472; Premium Page &#9472;&#9472; */
.premium-card {
  background: var(--card);
  border: 2px solid var(--border-s);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.premium-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-s);
}
.premium-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pc-header {
  padding: 24px;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-s);
}
.premium-card.featured .pc-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.pc-badge {
  display: inline-block;
  background: var(--primary-s);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.premium-card.featured .pc-badge { background: rgba(255,255,255,0.2); color: white; }

.pc-name { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.1rem; }
.premium-card.featured .pc-name { color: white; }

.pc-price {
  margin: 12px 0 4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.pc-amount { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2.2rem; color: var(--text); line-height: 1; }
.premium-card.featured .pc-amount { color: white; }
.pc-period { font-size: 0.82rem; color: var(--text-sub); padding-bottom: 4px; }
.premium-card.featured .pc-period { color: rgba(255,255,255,0.75); }

.pc-body { padding: 20px 24px; }
.pc-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pc-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text);
}
.pc-feature .fc-icon { color: var(--accent); flex-shrink: 0; font-size: 0.9rem; }
.pc-feature.disabled { opacity: 0.4; }
.pc-feature.disabled .fc-icon { color: var(--text-mute); }

.pc-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pc-btn-primary { background: var(--primary); color: white; }
.pc-btn-primary:hover { background: var(--primary-h); }
.pc-btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.pc-btn-outline:hover { background: var(--primary-s); }

/* Payment methods */
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.pm-chip {
  background: var(--bg-alt);
  border: 1px solid var(--border-s);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.pm-chip:hover, .pm-chip.selected { border-color: var(--accent); background: var(--accent-s); color: var(--accent); }

/* &#9472;&#9472; Form Styles (edit-profile) &#9472;&#9472; */
.edit-form-group {
  margin-bottom: 20px;
}
.edit-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.edit-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.edit-input:focus { border-color: var(--primary); }
.edit-input::placeholder { color: var(--text-mute); }
textarea.edit-input { height: 100px; resize: vertical; }

/* Avatar upload area */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-s);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  border: 3px solid var(--border);
  overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-btn {
  background: var(--bg-alt);
  color: var(--text);
  border: 2px solid var(--border);
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-s); }
.upload-note { font-size: 0.75rem; color: var(--text-mute); }


/* &#9472;&#9472; Spinner / Loading animations &#9472;&#9472; */
@keyframes spin { to { transform: rotate(360deg); } }

.gate-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* -- Mobile Performance Additions -- */

/* Smooth momentum scrolling */
.chat-list, .page, .app-main, .sidebar {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent text selection on buttons (improves tap response) */
.btn-primary, .btn-outline, .btn-ghost,
.sidebar-link, .mobile-nav-item,
.swipe-btn, .ec-btn {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* GPU-composite the mobile bottom nav */
.mobile-bottom-nav {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Faster tap on links */
a, button { touch-action: manipulation; }

/* Contain swipe cards for paint isolation */
.swipe-card, .card-stack { contain: layout paint; }

/* Reduce shadow complexity on low-end devices */
@media (max-width: 480px) {
  .card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
  .dash-section { box-shadow: none; }
  .mobile-bottom-nav { box-shadow: 0 -1px 0 var(--border); }
}

/* Instant page transitions via opacity instead of transform */
.app-main { animation: fadeUp 0.2s ease both; }
@keyframes fadeUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
