/**
 * ============================================
 * Stylesheet: community-v2.css
 * Area:   海豹社區 v2.0 新增樣式
 * Version: v2.0
 * ============================================
 *
 * WHAT THIS FILE DOES:
 *   v2.0 新增模組的樣式，包括：
 *   - 用戶資料卡 (Profile Card)
 *   - 個人主頁面板 (My Profile)
 *   - 通知系統 (Notifications)
 *   - 圖片上傳 & 燈箱 (Media)
 *   - 表情選擇器 (Emoji Picker)
 *   - 遊戲化系統 (Gamification)
 *   - 管理面板 (Admin)
 *   - 頭像選擇器 (Avatar Selector)
 *
 * DEPENDS ON:
 *   - community.css (基礎樣式)
 */

/* =============================================
   Profile Card (懸停用戶卡片)
   ============================================= */
.mc-profile-card {
  position: absolute;
  z-index: 10000;
  width: 300px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 20px;
  display: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-8px);
}

.mc-profile-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.mc-profile-card-avatar,
.mc-pc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E8F4FD, #FCE4EC);
}

.mc-pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-profile-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.mc-profile-card-level {
  font-size: 13px;
  color: #6B7280;
}

.mc-profile-card-bio {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.5;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mc-profile-card-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 14px;
}

.mc-pc-stat {
  text-align: center;
}

.mc-pc-stat-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.mc-pc-stat-lbl {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 2px;
}

.mc-profile-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mc-badge-mini {
  font-size: 18px;
  cursor: default;
}

.mc-no-badges {
  font-size: 12px;
  color: #9CA3AF;
}

/* =============================================
   Experience Bar
   ============================================= */
.mc-exp-bar {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
}

.mc-exp-bar-lg {
  height: 10px;
  border-radius: 5px;
}

.mc-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ECDC4, #44CF6C);
  border-radius: inherit;
  transition: width 0.6s ease;
}

.mc-profile-card-exp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-exp-text {
  font-size: 11px;
  color: #9CA3AF;
  white-space: nowrap;
}

/* =============================================
   My Profile Modal
   ============================================= */
.mc-modal-profile {
  max-width: 700px;
  width: 95%;
}

.mc-my-profile-top {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mc-my-avatar-section {
  text-align: center;
  flex-shrink: 0;
}

.mc-my-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #E8F4FD, #FCE4EC);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mc-my-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-my-info {
  flex: 1;
}

.mc-my-name {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.mc-my-level {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 12px;
}

.mc-my-exp-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mc-bio-textarea {
  width: 100%;
  resize: none;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #FAFAFA;
  transition: border-color 0.2s;
}

.mc-bio-textarea:focus {
  border-color: #4ECDC4;
  outline: none;
  background: #fff;
}

/* My Stats */
.mc-my-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.mc-my-stat {
  text-align: center;
  padding: 12px 8px;
  background: #F9FAFB;
  border-radius: 12px;
}

.mc-my-stat-val {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.mc-my-stat span:last-child {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* My Badges */
.mc-my-badges-section {
  margin-bottom: 24px;
}

.mc-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px;
}

.mc-my-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.mc-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: #F9FAFB;
  transition: transform 0.2s;
  cursor: default;
}

.mc-badge-item:hover {
  transform: translateY(-2px);
}

.mc-badge-earned {
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border: 1px solid #FDE68A;
}

.mc-badge-locked {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.mc-badge-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.mc-badge-name {
  font-size: 11px;
  color: #6B7280;
  text-align: center;
}

/* My Tabs */
.mc-my-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid #F3F4F6;
}

.mc-my-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 14px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.mc-my-tab.mc-active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
  font-weight: 600;
}

.mc-my-tab-content {
  min-height: 200px;
}

.mc-my-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.mc-my-post-item:hover {
  background: #F9FAFB;
}

.mc-my-post-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a2e;
  flex: 1;
}

.mc-my-post-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #9CA3AF;
}

.mc-empty-tab {
  text-align: center;
  color: #9CA3AF;
  padding: 40px 0;
  font-size: 14px;
}

.mc-loading-mini {
  text-align: center;
  padding: 20px;
  color: #9CA3AF;
}

/* =============================================
   Avatar Selector
   ============================================= */
.mc-modal-small {
  max-width: 450px;
}

.mc-avatar-hint {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 16px;
}

.mc-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mc-avatar-option {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.mc-avatar-option:hover {
  background: #F0FDFA;
  border-color: #4ECDC4;
  transform: translateY(-2px);
}

.mc-avatar-option-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mc-avatar-option-name {
  display: block;
  font-size: 12px;
  color: #6B7280;
}

/* =============================================
   Notification System
   ============================================= */
.mc-notif-bell-container {
  position: relative;
}

.mc-btn-notif {
  position: relative;
}

.mc-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: mc-notif-pulse 2s infinite;
}

@keyframes mc-notif-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.mc-notif-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 380px;
  max-height: 500px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 10001;
  overflow: hidden;
}

.mc-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mc-notif-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.mc-notif-mark-all {
  background: none;
  border: none;
  color: #4ECDC4;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

.mc-notif-mark-all:hover {
  text-decoration: underline;
}

.mc-notif-tabs {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mc-notif-tab {
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.mc-notif-tab.mc-active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
  font-weight: 600;
}

.mc-notif-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}

.mc-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.mc-notif-item:hover {
  background: #F9FAFB;
}

.mc-notif-unread {
  background: #F0FDFA;
}

.mc-notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.mc-notif-content {
  flex: 1;
  min-width: 0;
}

.mc-notif-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

.mc-notif-preview {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-notif-time {
  font-size: 11px;
  color: #D1D5DB;
  margin-top: 4px;
}

.mc-notif-dot {
  width: 8px;
  height: 8px;
  background: #4ECDC4;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.mc-notif-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
}

.mc-notif-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.mc-notif-empty-hint {
  font-size: 12px;
  color: #D1D5DB;
  margin-top: 4px;
}

.mc-notif-loading {
  text-align: center;
  padding: 20px;
  color: #9CA3AF;
}

/* =============================================
   Image Upload
   ============================================= */
.mc-upload-area {
  margin-top: 12px;
}

#mc-upload-status { margin-block: 12px; font-size: .9375rem; line-height: 1.65; overflow-wrap: anywhere; color: var(--mc-text-primary); }
#mc-upload-status:empty, #mc-upload-cancel[hidden] { display: none !important; }
#mc-upload-cancel { min-height: 44px; }

.mc-writing-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 16px; }
.mc-writing-tools button, #mc-post-adopt { min-height: 44px; white-space: normal; }
#mc-post-status, #mc-reply-status, #mc-post-draft-note, #mc-reply-draft-note { line-height: 1.65; overflow-wrap: anywhere; }
#mc-post-status:empty, #mc-reply-status:empty, #mc-reply-draft-note:empty { display: none; }
#mc-post-current, #mc-post-original-text, #mc-reply-original-text { white-space: pre-wrap; overflow-wrap: anywhere; max-block-size: 20rem; overflow: auto; font: inherit; line-height: 1.65; padding: 12px; background: var(--mc-bg-secondary, #f4f2ed); }
#mc-post-conflict { margin-block: 20px; }
.mc-writing-tools [hidden], #mc-post-conflict[hidden], #mc-post-original[hidden], #mc-reply-original[hidden] { display: none !important; }
[data-reaction-status], [data-reaction-warning] { margin-block: 12px; line-height: 1.7; overflow-wrap: anywhere; }
[data-reaction-action="like"], [data-reaction-action="bookmark"] { min-height: 44px; margin-inline-end: 12px; margin-block: 8px; white-space: normal; }
[data-reaction-action][aria-pressed="true"] { border-color: #17695e; color: #123d39; background: #d8eee4; }

.mc-upload-dropzone {
  border: 2px dashed #D1D5DB;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.mc-upload-dropzone.mc-dragover {
  border-color: #4ECDC4;
  background: #F0FDFA;
}

.mc-upload-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #9CA3AF;
  font-size: 13px;
}

.mc-upload-icon {
  font-size: 28px;
}

.mc-upload-btn {
  background: none;
  border: none;
  color: #4ECDC4;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.mc-upload-formats {
  font-size: 11px;
  color: #D1D5DB;
}

.mc-upload-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mc-preview-item {
  position: relative;
  width: 80px;
}

.mc-preview-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

.mc-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #EF4444;
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mc-preview-name {
  display: block;
  font-size: 10px;
  color: #9CA3AF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* =============================================
   Lightbox
   ============================================= */
.mc-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.mc-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.mc-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mc-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.mc-lightbox-close:hover {
  opacity: 1;
}

.mc-lightbox-caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 12px;
}

/* =============================================
   Emoji Picker
   ============================================= */
.mc-emoji-picker {
  position: absolute;
  z-index: 10002;
  width: 320px;
  max-height: 380px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: none;
  overflow: hidden;
}

.mc-emoji-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mc-emoji-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.mc-emoji-tab.mc-active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
  font-weight: 600;
}

.mc-emoji-search {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mc-emoji-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.mc-emoji-search-input:focus {
  border-color: #4ECDC4;
}

.mc-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.mc-emoji-item {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mc-emoji-item:hover {
  background: #F0FDFA;
  transform: scale(1.2);
}

.mc-seal-emoji {
  font-size: 24px;
}

.mc-emoji-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
  padding: 20px;
}

.mc-editor-btn {
  padding: 4px 8px;
  border: 1px solid #E5E7EB;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.mc-editor-btn:hover {
  background: #F0FDFA;
  border-color: #4ECDC4;
}

/* =============================================
   Leaderboard
   ============================================= */
.mc-leaderboard-section {
  margin-top: 16px;
}

.mc-lb-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.mc-lb-tab {
  flex: 1;
  padding: 6px 10px;
  border: none;
  background: #F3F4F6;
  border-radius: 8px;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
}

.mc-lb-tab.mc-active {
  background: #4ECDC4;
  color: white;
}

.mc-lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.2s;
}

.mc-lb-item:hover {
  background: #F9FAFB;
}

.mc-lb-rank {
  width: 28px;
  text-align: center;
  font-size: 16px;
}

.mc-lb-rank-num {
  font-size: 13px;
  font-weight: 600;
  color: #9CA3AF;
}

.mc-lb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.mc-lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #F3F4F6;
}

.mc-lb-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-lb-info {
  min-width: 0;
}

.mc-lb-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.mc-lb-level {
  font-size: 11px;
  color: #9CA3AF;
}

.mc-lb-value {
  font-size: 12px;
  font-weight: 600;
  color: #4ECDC4;
  white-space: nowrap;
}

.mc-lb-empty {
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
  padding: 16px;
}

/* =============================================
   Weekly Star
   ============================================= */
.mc-weekly-star-section {
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #FDE68A;
}

.mc-ws-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mc-ws-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mc-ws-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-ws-name {
  font-size: 15px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 4px;
}

.mc-ws-level {
  font-size: 12px;
  color: #B45309;
  margin-bottom: 6px;
}

.mc-ws-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #D97706;
}

.mc-ws-empty {
  text-align: center;
  color: #B45309;
  font-size: 13px;
}

/* =============================================
   Points Rules
   ============================================= */
.mc-rules-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.mc-rule-desc {
  color: #6B7280;
}

.mc-rule-points {
  color: #4ECDC4;
  font-weight: 600;
}

/* =============================================
   Admin Panel
   ============================================= */
.mc-nav-admin {
  color: #F59E0B !important;
}

.mc-modal-admin {
  max-width: 900px;
  width: 95%;
  max-height: 85vh;
}

.mc-admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #F3F4F6;
  flex-wrap: wrap;
}

.mc-admin-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.mc-admin-tab.mc-active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
  font-weight: 600;
}

.mc-admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.mc-admin-stat-card {
  text-align: center;
  padding: 20px 12px;
  background: #F9FAFB;
  border-radius: 14px;
  transition: transform 0.2s;
}

.mc-admin-stat-card:hover {
  transform: translateY(-2px);
}

.mc-admin-stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.mc-admin-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
}

.mc-admin-stat-lbl {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
}

.mc-admin-quick-actions h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px;
}

.mc-admin-actions-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-admin-action-btn {
  padding: 8px 16px;
  border: 1px solid #E5E7EB;
  background: white;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.mc-admin-action-btn:hover {
  background: #F0FDFA;
  border-color: #4ECDC4;
}

.mc-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mc-admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: #F9FAFB;
  color: #6B7280;
  font-weight: 600;
  border-bottom: 1px solid #E5E7EB;
}

.mc-admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  color: #374151;
}

.mc-admin-td-title {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-admin-status {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.mc-status-published {
  background: #D1FAE5;
  color: #065F46;
}

.mc-status-draft {
  background: #FEF3C7;
  color: #92400E;
}

.mc-status-hidden {
  background: #FEE2E2;
  color: #991B1B;
}

.mc-admin-role {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.mc-role-admin {
  background: #EDE9FE;
  color: #5B21B6;
}

.mc-role-moderator {
  background: #DBEAFE;
  color: #1E40AF;
}

.mc-role-user {
  background: #F3F4F6;
  color: #6B7280;
}

.mc-admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-admin-btn {
  padding: 4px 10px;
  border: 1px solid #E5E7EB;
  background: white;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.mc-admin-btn:hover {
  background: #F0FDFA;
  border-color: #4ECDC4;
}

.mc-admin-btn-danger {
  border-color: #FECACA;
  color: #DC2626;
}

.mc-admin-btn-danger:hover {
  background: #FEF2F2;
  border-color: #EF4444;
}

.mc-admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mc-admin-search {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.mc-admin-search:focus {
  border-color: #4ECDC4;
}

.mc-admin-filter {
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: white;
}

.mc-admin-empty {
  text-align: center;
  padding: 40px;
  color: #9CA3AF;
}

.mc-report-card {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.mc-report-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mc-report-type {
  font-weight: 600;
  color: #1a1a2e;
}

.mc-report-time {
  font-size: 12px;
  color: #9CA3AF;
}

.mc-report-body {
  margin-bottom: 12px;
  font-size: 13px;
  color: #6B7280;
}

.mc-report-actions {
  display: flex;
  gap: 8px;
}

/* =============================================
   Responsive Overrides for v2.0
   ============================================= */
@media (max-width: 768px) {
  .mc-profile-card {
    width: 260px;
  }

  .mc-notif-panel {
    width: 320px;
    right: -40px;
  }

  .mc-emoji-picker {
    width: 280px;
  }

  .mc-my-profile-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mc-my-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .mc-admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mc-avatar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mc-my-badges {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}

@media (max-width: 480px) {
  .mc-notif-panel {
    width: 100vw;
    right: -16px;
    border-radius: 0 0 16px 16px;
  }

  .mc-emoji-picker {
    width: 100vw;
    left: 0 !important;
    border-radius: 0 0 16px 16px;
  }

  .mc-my-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .mc-admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Attendance shares the community form and recovery controls. */
.mc-checkin-content label { display:block; text-align:start; margin-block:1rem .5rem; }
.mc-attendance-note { text-align:start; line-height:1.6; }
.mc-checkin-content p, .mc-attendance-history { overflow-wrap:anywhere; }
.mc-checkin-content .mc-writing-tools { margin-block:1rem; }
.mc-checkin-content [hidden] { display:none !important; }
.mc-attendance-history { text-align:start; }
.mc-attendance-history article { padding-block:1rem; border-block-end:1px solid var(--mc-border,#e2e8f0); }
.mc-attendance-history p { margin-block:.5rem 0; white-space:pre-wrap; }

/* Public browsing status belongs to its list, not to an overlay. */
#mc-browse-status, #mc-stat-status { overflow-wrap:anywhere; line-height:1.6; }
#mc-browse-status:empty { display:none; }
.mc-category-item, .mc-cat-name { overflow-wrap:anywhere; min-width:0; }
#mc-stat-status { margin-block:.75rem; }
