/* Dashboard — Bottom Nav Layout */

/* App Shell */
.app-shell { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--bg); }

/* ─── Top Bar ─── */
.app-topbar {
  height: 60px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: white; border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(123,94,167,0.06); z-index: 50;
}
.topbar-logo {
  font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 2px;
}
.topbar-end { display: flex; align-items: center; gap: 8px; }

/* Lang pill */
.lang-pill { display: flex; background: var(--bg-raised); border-radius: var(--radius-pill); padding: 3px; border: 1.5px solid var(--border); }
.lang-pill-btn { padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast); font-family: var(--font-body); }
.lang-pill-btn.active { background: var(--lavender-dark); color: white; }

/* Notifications */
.notif-wrap { position: relative; }
.notif-btn { background: none; border: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; transition: background var(--transition-fast); }
.notif-btn:hover { background: var(--bg-raised); }
.notif-icon { font-size: 18px; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--pink); border-radius: 50%; border: 2px solid white; }
.notif-dropdown {
  position: absolute; top: 46px; right: 0; width: 300px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  z-index: 300; overflow: hidden;
}
[dir="rtl"] .notif-dropdown { right: 0; left: auto; }
@media (max-width: 480px) {
  .notif-dropdown { position: fixed; top: 58px; left: 8px; right: 8px; width: auto; border-radius: var(--radius-lg); }
  [dir="rtl"] .notif-dropdown { left: 8px; right: 8px; }
}
.notif-header { padding: 12px 16px; font-weight: 700; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border); }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-item-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.notif-item-title { font-weight: 700; color: var(--text-primary); font-size: 13px; margin-bottom: 2px; }
.notif-item-body { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.notif-item.warn { background: rgba(232,121,154,0.04); }
.notif-item.urgent { background: rgba(208,64,96,0.06); }
.notif-item.info { background: rgba(123,94,167,0.04); }
.notif-empty { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--text-muted); }
.notif-renew-btn { display: block; margin: 8px 16px 16px; width: calc(100% - 32px); padding: 8px; background: linear-gradient(135deg, var(--pink), var(--lavender-dark)); color: white; border: none; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }

/* Topbar avatar */
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  cursor: pointer; overflow: hidden; flex-shrink: 0;
  transition: box-shadow var(--transition-fast);
}
.topbar-avatar:hover { box-shadow: 0 0 0 3px var(--lavender-muted); }
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ─── Main content ─── */
.app-main { flex: 1; overflow-y: auto; padding: 20px 20px 84px; }
.panel { min-height: 100%; }

/* ─── Bottom Nav ─── */
.bottom-nav {
  flex-shrink: 0; height: 68px;
  background: white; border-top: 1.5px solid var(--border);
  display: flex; align-items: stretch;
  box-shadow: 0 -4px 20px rgba(123,94,167,0.08); z-index: 50;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: none; cursor: pointer;
  color: var(--text-muted); text-decoration: none;
  transition: color var(--transition-fast); position: relative;
  padding: 0;
}
.bnav-item::before {
  content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 2.5px;
  background: var(--lavender-dark); border-radius: 0 0 3px 3px;
  transform: scaleX(0); transition: transform var(--transition-fast);
}
.bnav-item.active { color: var(--lavender-dark); }
.bnav-item.active::before { transform: scaleX(1); }
.bnav-icon { font-size: 21px; line-height: 1; }
.bnav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }

/* ─── Streak ─── */
.streak-banner {
  background: linear-gradient(135deg, rgba(232,121,154,0.08), rgba(184,159,212,0.12));
  border: 1.5px solid rgba(232,121,154,0.2);
  border-radius: var(--radius-xl); padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.streak-info { display: flex; align-items: center; gap: 14px; }
.streak-flame { font-size: 32px; animation: pulse 2s ease-in-out infinite; }
.streak-count { font-size: 38px; font-weight: 800; color: var(--pink); line-height: 1; }
.streak-label { font-size: 13px; color: var(--text-secondary); }
.streak-total { font-size: 13px; color: var(--text-secondary); text-align: right; }
.streak-total strong { color: var(--lavender-dark); font-size: 22px; display: block; font-weight: 800; }

/* ─── Program Cards ─── */
.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.program-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pink); border-color: rgba(232,121,154,0.25); }
.program-thumb { height: 110px; background: linear-gradient(135deg, rgba(232,121,154,0.15), rgba(184,159,212,0.2)); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.program-body { padding: 16px; }
.program-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.program-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.program-progress-bar { height: 5px; background: var(--bg-raised); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.program-progress-fill { height: 100%; background: linear-gradient(90deg, var(--pink), var(--lavender-dark)); border-radius: 3px; transition: width 0.5s ease; }
.program-count { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ─── Exercise Detail ─── */
.exercise-detail { animation: fadeIn 0.3s ease; }
.progress-ring-wrap { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.progress-ring-svg { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--bg-raised); }
.progress-ring-fill { fill: none; stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.ring-label { font-size: 28px; font-weight: 800; color: var(--pink); }
.ring-sublabel { font-size: 12px; color: var(--text-secondary); }
.exercise-list { display: flex; flex-direction: column; gap: 10px; }
.exercise-item { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color var(--transition); }
.exercise-item.completed { border-color: rgba(232,121,154,0.4); background: rgba(232,121,154,0.02); }
.exercise-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; cursor: pointer; gap: 12px; }
.exercise-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.exercise-duration { font-size: 11px; color: var(--lavender-dark); background: var(--lavender-muted); padding: 2px 10px; border-radius: var(--radius-pill); display: inline-block; margin-top: 3px; }
.exercise-done-btn { padding: 7px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--border); background: none; color: var(--text-secondary); font-size: 12px; font-weight: 700; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; flex-shrink: 0; font-family: var(--font-body); }
.exercise-done-btn:hover { border-color: var(--pink); color: var(--pink-dark); }
.exercise-done-btn.done { border-color: var(--pink); background: var(--pink-muted); color: var(--pink-dark); }
.exercise-body { padding: 0 16px 16px; display: none; }
.exercise-item.expanded .exercise-body { display: block; }
.exercise-video { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md); background: #000; margin-bottom: 12px; overflow: hidden; }
.exercise-video iframe { width: 100%; height: 100%; border: none; }
.exercise-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── 28-Day Program ─── */
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color var(--transition), background var(--transition); }
.day-card.done { border-color: rgba(91,154,102,0.3); background: rgba(91,154,102,0.03); }
.day-card-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; cursor: pointer; user-select: none; }
.day-circle { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--text-muted); flex-shrink: 0; transition: all var(--transition); }
.day-circle.checked { background: #5B9A66; border-color: #5B9A66; color: white; font-size: 15px; }
.day-thumb-wrap { position: relative; flex-shrink: 0; width: 96px; height: 56px; border-radius: 8px; overflow: hidden; background: #000; }
.day-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.day-thumb-done { position: absolute; inset: 0; background: rgba(91,154,102,0.72); display: flex; align-items: center; justify-content: center; color: white; font-size: 22px; font-weight: 800; }
.day-card-info { flex: 1; min-width: 0; }
.day-day-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 2px; }
.day-card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-card.done .day-card-title { color: var(--text-secondary); }
.day-card-meta { font-size: 11px; color: var(--lavender-dark); background: var(--lavender-muted); display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); margin-top: 4px; }
.day-card-chevron { font-size: 22px; color: var(--text-muted); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; line-height: 1; }
.day-card-chevron.open { transform: rotate(90deg); color: var(--pink); }
.day-card-body { display: none; padding: 0 16px 16px; }
.day-card-body.open { display: block; animation: fadeIn 0.2s ease; }
.day-done-btn { width: 100%; padding: 14px; border-radius: var(--radius-lg); border: 2px solid var(--pink); background: var(--pink); color: white; font-size: 15px; font-weight: 800; cursor: pointer; transition: all var(--transition-fast); font-family: var(--font-body); margin-top: 12px; letter-spacing: 0.01em; }
.day-done-btn:hover:not(:disabled) { background: var(--pink-dark); border-color: var(--pink-dark); }
.day-done-btn.done { background: var(--bg-raised); border-color: rgba(91,154,102,0.4); color: #5B9A66; }
.day-done-btn.done:hover:not(:disabled) { background: rgba(91,154,102,0.08); }

/* ─── Community Feed ─── */
.feed-wrap {
  max-width: 600px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0;
}

/* Composer */
.feed-composer {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); padding: 16px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.feed-composer-row { display: flex; gap: 10px; align-items: flex-start; }
.feed-composer-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; overflow: hidden;
}
.feed-composer-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.feed-composer-input {
  flex: 1; border: 1.5px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 10px 14px; font-size: 14px; font-family: var(--font-body);
  color: var(--text-primary); background: var(--bg-raised); resize: none;
  outline: none; min-height: 42px; max-height: 160px; line-height: 1.5;
  transition: border-color var(--transition), min-height var(--transition);
}
.feed-composer-input:focus { border-color: var(--lavender-dark); background: white; min-height: 80px; }
.feed-composer-footer { display: flex; justify-content: flex-end; margin-top: 10px; }

/* Post card */
.feed-post {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-xl); margin-bottom: 14px;
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow var(--transition);
}
.feed-post:hover { box-shadow: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.08)); }
.feed-post-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; justify-content: space-between;
}
.feed-post-author { display: flex; align-items: center; gap: 10px; }
.feed-post-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: white; overflow: hidden;
}
.feed-post-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.feed-post-meta { display: flex; flex-direction: column; gap: 1px; }
.feed-post-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.feed-post-time { font-size: 11px; color: var(--text-muted); }
.feed-post-del {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 16px; padding: 4px 6px; border-radius: var(--radius-sm);
  opacity: 0; transition: opacity var(--transition), color var(--transition);
  line-height: 1;
}
.feed-post:hover .feed-post-del { opacity: 1; }
.feed-post-del:hover { color: var(--danger, #e74c3c); }

.feed-post-body {
  padding: 0 16px 14px;
  font-size: 15px; color: var(--text-primary); line-height: 1.6;
  word-break: break-word; white-space: pre-wrap;
}

/* Like + Comment bar */
.feed-post-actions {
  display: flex; gap: 0; border-top: 1.5px solid var(--border);
  padding: 2px 6px;
}
.feed-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  font-family: var(--font-body); transition: all var(--transition-fast);
}
.feed-action-btn:hover { background: var(--bg-raised); color: var(--lavender-dark); }
.feed-action-btn.liked { color: var(--pink); }
.feed-action-btn.liked:hover { background: rgba(232,121,154,0.08); }
.feed-action-icon { font-size: 16px; line-height: 1; }

/* Comments section */
.feed-comments {
  border-top: 1.5px solid var(--border);
  background: var(--bg-raised);
  padding: 12px 16px;
  display: none;
}
.feed-comments.open { display: block; }
.feed-comment {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.feed-comment:last-child { margin-bottom: 0; }
.feed-comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink-muted), var(--lavender-muted));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--lavender-dark); overflow: hidden;
}
.feed-comment-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.feed-comment-bubble {
  background: white; border: 1px solid var(--border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 7px 12px; flex: 1; min-width: 0; position: relative;
}
.feed-comment-name { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.feed-comment-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; word-break: break-word; }
.feed-comment-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.feed-comment-del {
  position: absolute; top: 6px; right: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-muted); opacity: 0;
  transition: opacity var(--transition);
}
.feed-comment-bubble:hover .feed-comment-del { opacity: 1; }
.feed-comment-del:hover { color: var(--danger, #e74c3c); }

/* Comment input row */
.feed-comment-input-row {
  display: flex; gap: 8px; align-items: center; margin-top: 10px;
}
.feed-comment-input {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 14px; font-size: 13px; font-family: var(--font-body);
  color: var(--text-primary); background: white; outline: none;
  transition: border-color var(--transition);
}
.feed-comment-input:focus { border-color: var(--lavender-dark); }
.feed-comment-send {
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  color: white; border: none; border-radius: var(--radius-pill);
  padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; font-family: var(--font-body);
}

/* Feed states */
.feed-empty {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
  font-size: 15px;
}
.feed-load-more {
  text-align: center; padding: 12px;
}
.feed-loading { text-align: center; padding: 32px; color: var(--text-muted); font-size: 14px; }

/* Role badges */
.role-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; }
.role-badge-admin { background: var(--pink-muted); color: var(--pink-dark); border: 1px solid rgba(232,121,154,0.3); }
.role-badge-coach { background: var(--lavender-muted); color: var(--lavender-dark); border: 1px solid rgba(123,94,167,0.2); }

/* ─── AI Chat ─── */
.ai-chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100dvh - 60px - 68px - 40px); min-height: 400px;
  border: 1.5px solid var(--border); border-radius: var(--radius-xl);
  overflow: hidden; background: white; box-shadow: var(--shadow-sm);
}
.ai-chat-header { padding: 14px 18px; border-bottom: 1.5px solid var(--border); flex-shrink: 0; background: white; }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 10px; max-width: 82%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; background: linear-gradient(135deg, var(--lavender), var(--lavender-dark)); color: white; }
.chat-msg.user .chat-msg-avatar { background: linear-gradient(135deg, var(--pink), var(--pink-dark)); }
.chat-msg-bubble { background: var(--bg-raised); border: 1.5px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.chat-msg.user .chat-msg-bubble { background: linear-gradient(135deg, rgba(232,121,154,0.1), rgba(184,159,212,0.12)); border-color: rgba(232,121,154,0.2); border-radius: 16px 16px 4px 16px; }
.typing-indicator { display: flex; align-items: center; gap: 5px; padding: 10px 14px; }
.typing-dot { width: 7px; height: 7px; background: var(--lavender); border-radius: 50%; animation: dotBounce 1.4s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }
.ai-chat-input-row { padding: 12px 16px; border-top: 1.5px solid var(--border); display: flex; gap: 10px; flex-shrink: 0; background: white; }
.ai-chat-input { flex: 1; background: var(--bg-raised); border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 10px 18px; font-size: 14px; font-family: var(--font-body); color: var(--text-primary); outline: none; transition: border-color var(--transition), background var(--transition); }
.ai-chat-input:focus { border-color: var(--lavender-dark); background: white; }
.private-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--lavender-muted); color: var(--lavender-dark); font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); margin-top: 6px; }

/* ─── Settings ─── */
.settings-tabs { display: flex; gap: 3px; background: var(--bg-raised); border-radius: var(--radius-pill); padding: 4px; width: fit-content; margin-bottom: 22px; border: 1.5px solid var(--border); }
.settings-tab { padding: 8px 22px; border-radius: var(--radius-pill); border: none; background: none; color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); font-family: var(--font-body); }
.settings-tab.active { background: var(--lavender-dark); color: white; box-shadow: var(--shadow-lavender); }
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; animation: fadeIn 0.2s ease; }
.settings-card { max-width: 480px; background: white; border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 26px; box-shadow: var(--shadow-sm); }

/* Avatar upload */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.avatar-large {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--lavender-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: white;
  cursor: pointer; overflow: hidden; flex-shrink: 0; position: relative;
  transition: box-shadow var(--transition-fast);
}
.avatar-large:hover { box-shadow: 0 0 0 4px var(--lavender-muted); }
.avatar-large .avatar-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; opacity: 0; transition: opacity var(--transition-fast); border-radius: 50%;
}
.avatar-large:hover .avatar-overlay { opacity: 1; }
.avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.form-row { margin-bottom: 16px; }
.membership-status-card { background: var(--bg-raised); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.expiry-alert { background: rgba(232,121,154,0.08); border: 1.5px solid rgba(232,121,154,0.3); border-radius: var(--radius-md); padding: 10px 14px; margin-top: 12px; font-size: 13px; color: var(--pink-dark); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.expiry-urgent { background: rgba(208,64,96,0.08); border-color: rgba(208,64,96,0.3); color: var(--danger); }
.status-badge-lg { font-size: 15px; font-weight: 700; padding: 6px 20px; border-radius: var(--radius-pill); display: inline-block; margin-bottom: 14px; }
.status-active { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--warning-bg); color: var(--warning); }
.status-expired { background: var(--danger-bg); color: var(--danger); }
.status-inactive { background: var(--bg-raised); color: var(--text-secondary); border: 1px solid var(--border); }
.membership-detail-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.membership-detail-row:last-child { border-bottom: none; }
.membership-detail-label { color: var(--text-secondary); }
.membership-detail-value { color: var(--text-primary); font-weight: 600; }

/* Locked/muted banners */
.locked-banner { background: var(--warning-bg); border: 1px solid rgba(160,112,48,0.25); border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; color: #a07030; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.muted-banner { background: var(--danger-bg); border: 1px solid rgba(208,64,96,0.2); border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; color: var(--danger); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* Panel heading */
.panel-heading { margin-bottom: 18px; }
.panel-heading h2 { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.panel-heading p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .discord-members { display: none; }
  .discord-wrap { height: calc(100dvh - 60px - 68px - 24px); }
  .ai-chat-wrap { height: calc(100dvh - 60px - 68px - 24px); }
  .app-main { padding: 12px 12px 80px; }
  .settings-card { padding: 18px; }
}
