/* ═══════════════════════════════════════════════════════════════
   MyOstad — Components: Feed, Profile, Channels, Editor v3.1
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   ۱. Stories Bar
   ══════════════════════════════════════════════════════════════ */
.stories-bar {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  scroll-snap-align: start;
  cursor: pointer;
  flex-shrink: 0;
}

.story-ring {
  padding: 2.5px;
  background: linear-gradient(135deg, var(--gold-400), #e855aa, var(--navy-500));
  border-radius: var(--r-full);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.story-item:hover .story-ring { transform: scale(1.06); }
.story-ring .avatar { border: 2.5px solid var(--navy-950); }

.story-item.seen .story-ring { background: var(--border-mid); }

.story-item.my-story .story-ring {
  background: var(--surface-2);
  border: 2px dashed var(--border-strong);
  padding: 2px;
}

.story-name {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.6);
  max-width: 58px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.story-add-badge {
  width: 22px; height: 22px;
  background: var(--gold-400);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: -2px; left: -2px;
  border: 2px solid var(--navy-950);
}
.story-add-badge svg { width: 12px; height: 12px; color: var(--navy-950); }

/* ══════════════════════════════════════════════════════════════
   ۲. Post Card
   ══════════════════════════════════════════════════════════════ */
.mo-post-card {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--dur-fast) var(--ease-out);
  animation: fade-up var(--dur-slow) var(--ease-out) both;
}
.mo-post-card:hover { background: rgba(255,255,255,0.008); }

/* Post Header */
.mo-post-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.mo-post-card__meta { flex: 1; min-width: 0; }

.mo-post-card__author {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.9375rem;
  font-weight: 800;
  color: white;
  line-height: 1.3;
}

.mo-post-card__time {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.42);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.meta-dot {
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.28);
  border-radius: 50%;
  flex-shrink: 0;
}

.mo-post-card__more-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.38);
  transition: all var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.mo-post-card__more-btn:hover { background: var(--surface-1); color: white; }
.mo-post-card__more-btn svg  { width: 18px; height: 18px; }

/* Post Content */
.mo-post-card__content {
  font-size: 0.9375rem;
  line-height: 1.78;
  color: rgba(255,255,255,0.88);
  margin-bottom: var(--sp-3);
  word-break: break-word;
}

.mo-post-card__content-collapsed {
  max-height: 5.4rem; /* ~3 lines */
  overflow: hidden;
  position: relative;
}

.mo-post-card__content-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--navy-950));
  pointer-events: none;
}

.mo-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--navy-400);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: var(--sp-3);
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-fa);
  transition: color var(--dur-fast);
}
.mo-read-more:hover { color: var(--navy-300); }

/* Rich text formatting within posts */
.mo-post-card__content blockquote,
.mo-post-card__blockquote {
  border-right: 3px solid var(--gold-400);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
  background: rgba(212,160,23,0.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin: var(--sp-2) 0;
}

.mo-post-card__spoiler {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  user-select: none;
  color: transparent;
  text-shadow: 0 0 8px rgba(255,255,255,0.65);
  transition: all var(--dur-fast);
}
.mo-post-card__spoiler.revealed { color: rgba(255,255,255,0.9); text-shadow: none; }

/* Post Media */
.mo-post-card__media {
  margin: var(--sp-3) calc(-1 * var(--sp-5));
  position: relative;
  overflow: hidden;
  background: var(--surface-1);
  border-radius: 0;
}

.mo-post-card__media img,
.mo-post-card__media video {
  width: 100%;
  display: block;
  max-height: 440px;
  object-fit: cover;
}

/* Multi-image grid */
.mo-post-card__media-grid {
  display: grid;
  gap: 2px;
}
.mo-post-card__media-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.mo-post-card__media-grid.cols-3 { grid-template-columns: 2fr 1fr; }
.mo-post-card__media-grid.cols-3 > *:first-child { grid-row: span 2; }

.mo-post-card__media-grid img {
  width: 100%; height: 220px;
  object-fit: cover;
}

.mo-post-card__video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  transition: opacity var(--dur-fast);
}

.mo-post-card__video-play {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.mo-post-card__video-play:hover { transform: scale(1.1); background: white; }
.mo-post-card__video-play svg { width: 24px; height: 24px; color: var(--navy-900); margin-right: -2px; }

/* File Attachment */
.file-attachment {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin: var(--sp-3) 0;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}
.file-attachment:hover { background: var(--surface-2); border-color: var(--border-mid); }

.file-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  background: rgba(59,130,246,0.12);
}

.file-info   { flex: 1; min-width: 0; }
.file-name   { font-size: 0.875rem; font-weight: 600; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size   { font-size: 0.75rem; color: rgba(255,255,255,0.42); margin-top: 2px; }

.file-dl-btn {
  width: 34px; height: 34px;
  background: var(--navy-600);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  transition: background var(--dur-fast);
}
.file-dl-btn:hover { background: var(--navy-500); }

/* Reactions */
.reactions-strip {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin: var(--sp-2) 0;
  flex-wrap: wrap;
}

.reaction-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
  user-select: none;
}
.reaction-bubble:hover    { background: var(--surface-2); border-color: var(--border-mid); transform: scale(1.06); }
.reaction-bubble.reacted  { background: rgba(212,160,23,0.1); border-color: rgba(212,160,23,0.28); }

.reaction-emoji { font-size: 1rem; }
.reaction-count { font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 600; }

/* Post Actions */
.post-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-3);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  transition: all var(--dur-fast) var(--ease-out);
  background: none;
  border: none;
  font-family: var(--font-fa);
  flex: 1;
  justify-content: center;
  user-select: none;
}
.post-action:hover         { background: var(--surface-1); color: rgba(255,255,255,0.85); }
.post-action.liked         { color: #f87171; }
.post-action.bookmarked    { color: var(--gold-400); }

.post-action svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease-spring); }
.post-action:hover svg    { transform: scale(1.16); }
.post-action.liked svg    { fill: #f87171; }

.action-count { font-weight: 700; font-size: 0.8125rem; }

/* SEO bar on post */
.post-seo-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-0);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

.seo-track {
  flex: 1;
  height: 3px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.seo-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.6s var(--ease-out);
}
.seo-fill.low    { background: var(--danger); }
.seo-fill.medium { background: var(--warning); }
.seo-fill.high   { background: var(--success); }

/* ══════════════════════════════════════════════════════════════
   ۳. Comments
   ══════════════════════════════════════════════════════════════ */
.comments-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--sp-4);
}

.comment-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  animation: fade-up var(--dur-mid) var(--ease-out) both;
}

.comment-body { flex: 1; min-width: 0; }

.comment-bubble {
  background: var(--surface-1);
  border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-subtle);
}

.comment-author {
  font-size: 0.8125rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.comment-text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  padding-right: var(--sp-4);
}

.comment-action-btn {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.38);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-fa);
  padding: 0;
  transition: color var(--dur-fast);
}
.comment-action-btn:hover { color: white; }

/* Reply indent */
.reply-item { margin-right: calc(36px + var(--sp-3)); }
.reply-item .comment-bubble {
  background: rgba(255,255,255,0.02);
  border-radius: 0 var(--r-md) var(--r-md) var(--r-md);
}

/* Comment Input */
.comment-input-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-0);
}

.comment-input {
  flex: 1;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  color: white;
  font-family: var(--font-fa);
  font-size: 0.875rem;
  outline: none;
  min-height: 38px;
  resize: none;
  transition: border-color var(--dur-fast);
  text-align: right;
  direction: rtl;
}
.comment-input:focus { border-color: var(--navy-400); }
.comment-input::placeholder { color: rgba(255,255,255,0.28); }

/* ══════════════════════════════════════════════════════════════
   ۴. Profile Page
   ══════════════════════════════════════════════════════════════ */
.profile-hero { position: relative; padding-bottom: var(--sp-4); }

.profile-cover {
  height: 168px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  position: relative;
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--navy-950));
}

.profile-avatar-wrap {
  position: absolute;
  bottom: -48px;
  right: var(--sp-5);
}

.profile-avatar-ring {
  padding: 3px;
  background: linear-gradient(135deg, var(--gold-400), var(--navy-500));
  border-radius: var(--r-full);
  display: inline-block;
}
.profile-avatar-ring .avatar { border: 3px solid var(--navy-950); }

.profile-info {
  padding: calc(48px + var(--sp-4)) var(--sp-5) var(--sp-4);
}

.profile-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.profile-name {
  font-size: 1.375rem;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  letter-spacing: -0.01em;
}

.profile-username {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.42);
  font-weight: 400;
  margin-top: 2px;
}

.profile-bio {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.75;
  margin: var(--sp-3) 0;
}

/* Stats Grid */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: var(--sp-4) 0;
}

.profile-stat {
  background: var(--surface-0);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.profile-stat:hover { background: var(--surface-1); }

.profile-stat-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: white;
  display: block;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.profile-stat-label {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.42);
  display: block;
  margin-top: 2px;
  font-weight: 500;
}

/* Teacher Credentials */
.credential-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.65);
}

.credential-check {
  width: 18px; height: 18px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.credential-check svg { width: 10px; height: 10px; stroke: white; fill: none; stroke-width: 2.5; }

/* Profile Music */
.profile-music {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.profile-music:hover { background: var(--surface-2); }

.music-play-btn {
  width: 36px; height: 36px;
  background: var(--navy-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.profile-music:hover .music-play-btn { transform: scale(1.1); }

.music-info { flex: 1; min-width: 0; }
.music-title  { font-size: 0.875rem; font-weight: 700; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-artist { font-size: 0.75rem; color: rgba(255,255,255,0.42); margin-top: 2px; }

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}
.waveform-bar {
  width: 3px;
  background: var(--navy-400);
  border-radius: var(--r-full);
  animation: waveform 0.8s ease-in-out infinite alternate;
}
.waveform-bar:nth-child(2) { animation-delay: 0.12s; }
.waveform-bar:nth-child(3) { animation-delay: 0.22s; }
.waveform-bar:nth-child(4) { animation-delay: 0.16s; }
.waveform-bar:nth-child(5) { animation-delay: 0.06s; }

/* ══════════════════════════════════════════════════════════════
   ۵. Channel / Group
   ══════════════════════════════════════════════════════════════ */
.channel-hero {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}

.channel-avatar {
  width: 64px; height: 64px;
  border-radius: var(--r-lg);
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.channel-info { flex: 1; min-width: 0; }
.channel-name {
  font-size: 1.0625rem;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: 4px;
}
.channel-meta { font-size: 0.8125rem; color: rgba(255,255,255,0.42); display: flex; gap: var(--sp-3); }

.channel-desc {
  padding: var(--sp-3) var(--sp-5);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.65;
  border-bottom: 1px solid var(--border-subtle);
}

/* Channel List Item */
.channel-list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.channel-list-item:hover { background: var(--surface-0); }

.channel-list-info { flex: 1; min-width: 0; }
.channel-list-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: 3px;
}
.channel-list-preview {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}
.channel-list-time { font-size: 0.6875rem; color: rgba(255,255,255,0.32); }
.channel-list-badge {
  background: var(--navy-500);
  color: white;
  font-size: 0.6875rem;
  font-weight: 800;
  border-radius: var(--r-full);
  min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* ══════════════════════════════════════════════════════════════
   ۶. Class Card
   ══════════════════════════════════════════════════════════════ */
.class-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 0 var(--sp-5) var(--sp-4);
  transition: all var(--dur-mid) var(--ease-out);
  cursor: pointer;
  animation: fade-up var(--dur-slow) var(--ease-out) both;
}
.class-card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.class-card-header {
  padding: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.class-card-body { padding: var(--sp-4); }

.class-title {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: var(--sp-2);
  line-height: 1.4;
}

.class-teacher {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--sp-3);
}

.class-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.class-meta-item { display: flex; flex-direction: column; gap: 2px; }
.class-meta-label { font-size: 0.6875rem; color: rgba(255,255,255,0.32); font-weight: 600; }
.class-meta-value { font-size: 0.8125rem; font-weight: 700; color: rgba(255,255,255,0.82); }

/* Capacity bar */
.capacity-bar {
  height: 5px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: var(--sp-2);
}
.capacity-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--warning));
  border-radius: var(--r-full);
  transition: width 0.7s var(--ease-out);
}
.capacity-fill.almost-full { background: linear-gradient(90deg, var(--warning), var(--danger)); }

.class-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-0);
}

.class-price {
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--gold-400);
  letter-spacing: -0.01em;
}
.class-price-label { font-size: 0.6875rem; color: rgba(255,255,255,0.32); margin-top: 2px; }

/* Urgency */
.urgency-alert {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--r-md);
  font-size: 0.75rem;
  color: #fca5a5;
  margin: 0 var(--sp-4) var(--sp-3);
}
.urgency-dot {
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse-ring 1.6s ease-out infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   ۷. Post Editor (Rich Text)
   ══════════════════════════════════════════════════════════════ */
.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.editor-title { font-size: 1rem; font-weight: 800; }

.editor-author-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.editor-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
}

.editor-area {
  width: 100%;
  min-height: 200px;
  background: none;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.88);
  font-family: var(--font-fa);
  font-size: 1rem;
  line-height: 1.78;
  direction: rtl;
  text-align: right;
}
.editor-area:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.22);
  pointer-events: none;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  background: var(--surface-0);
}
.editor-toolbar::-webkit-scrollbar { display: none; }

.toolbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.48);
  transition: all var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.toolbar-btn:hover         { background: var(--surface-1); color: white; }
.toolbar-btn.active        { background: rgba(37,99,235,0.14); color: var(--navy-400); }
.toolbar-btn svg           { width: 18px; height: 18px; }

.toolbar-sep {
  width: 1px; height: 22px;
  background: var(--border-subtle);
  margin: 0 var(--sp-2);
  flex-shrink: 0;
}

/* SEO Analyzer */
.seo-box { border-top: 1px solid var(--border-subtle); flex-shrink: 0; }

.seo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.seo-header:hover { background: var(--surface-0); }

.seo-score-wrap { display: flex; align-items: center; gap: var(--sp-2); }

.seo-score-num {
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.seo-score-num.low    { color: var(--danger); }
.seo-score-num.medium { color: var(--warning); }
.seo-score-num.high   { color: var(--success); }

.seo-body {
  padding: 0 var(--sp-5) var(--sp-4);
  display: none;
}
.seo-body.open { display: block; animation: fade-up var(--dur-mid) var(--ease-out); }

.seo-meter {
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.seo-meter-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
  background-size: 300% 100%;
  transition: width 0.8s var(--ease-out);
}

.seo-checklist { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }

.seo-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.seo-check-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.seo-check-icon.pass { background: rgba(16,185,129,0.15); color: var(--success); }
.seo-check-icon.fail { background: rgba(239,68,68,0.12);  color: var(--danger); }
.seo-check-icon.warn { background: rgba(245,158,11,0.12); color: var(--warning); }

.seo-check-text       { flex: 1; }
.seo-check-text.pass  { color: rgba(255,255,255,0.58); }
.seo-check-text.fail  { color: rgba(255,255,255,0.82); }

/* Editor Bottom Bar */
.editor-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-0);
  padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom));
  flex-shrink: 0;
}

.editor-word-count {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.32);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════
   ۸. Search Bar
   ══════════════════════════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: rgba(5,12,26,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.search-wrap { flex: 1; position: relative; }

.search-icon {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.32);
  width: 18px; height: 18px;
  pointer-events: none;
  transition: color var(--dur-fast);
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 var(--sp-5);
  padding-right: 44px;
  background: var(--surface-1);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-full);
  color: white;
  font-family: var(--font-fa);
  font-size: 0.9375rem;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: all var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
}
.search-input:focus { border-color: var(--navy-400); background: var(--surface-2); }
.search-input::placeholder { color: rgba(255,255,255,0.28); }
.search-wrap:focus-within .search-icon { color: var(--navy-400); }

/* ══════════════════════════════════════════════════════════════
   ۹. Notification Item
   ══════════════════════════════════════════════════════════════ */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--dur-fast);
  position: relative;
}
.notif-item:hover { background: var(--surface-0); }
.notif-item.unread { background: rgba(37,99,235,0.04); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  right: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: var(--navy-400);
  border-radius: var(--r-full) 0 0 var(--r-full);
}

.notif-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 0.875rem; color: rgba(255,255,255,0.8); line-height: 1.55; }
.notif-text strong { color: white; font-weight: 700; }
.notif-time { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 4px; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   Post Editor — ویرایشگر پست
   ═══════════════════════════════════════════════════════════════════════════ */

.mo-post-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--mo-surface);
}

.mo-post-editor__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mo-border);
  position: sticky;
  top: 0;
  background: var(--mo-surface);
  z-index: 10;
}

.mo-post-editor__title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.mo-post-editor__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Toolbar */
.mo-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--mo-bg);
  border: 1px solid var(--mo-border);
  border-radius: 10px;
  flex-wrap: wrap;
}

.mo-editor-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--mo-text-muted);
  transition: background 0.15s, color 0.15s;
}
.mo-editor-tool:hover,
.mo-editor-tool.is-active {
  background: var(--mo-primary-alpha, rgba(37,99,235,.1));
  color: var(--mo-primary);
}
.mo-editor-tool-sep {
  width: 1px;
  height: 22px;
  background: var(--mo-border);
  margin: 0 4px;
}

/* Area */
.mo-editor-area {
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--mo-border);
  border-radius: 12px;
  background: var(--mo-bg);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--mo-text);
  outline: none;
  transition: border-color 0.2s;
}
.mo-editor-area:focus { border-color: var(--mo-primary); }
.mo-editor-area:empty::before {
  content: attr(data-placeholder);
  color: var(--mo-text-muted);
  pointer-events: none;
}

/* Media preview */
.mo-editor-media-preview { border-radius: 12px; overflow: hidden; }
.mo-media-preview__img   { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.mo-media-preview__video { width: 100%; max-height: 320px; display: block; }
.mo-media-alt-wrap       { position: relative; display: flex; flex-direction: column; gap: 8px; }
.mo-media-alt-field      { display: flex; flex-direction: column; gap: 4px; }
.mo-media-file-wrap      { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--mo-border); border-radius: 10px; }
.mo-upload-progress      { display: flex; align-items: center; gap: 10px; padding: 16px; }

/* Error */
.mo-editor-error {
  padding: 10px 14px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
}
[data-theme="dark"] .mo-editor-error { background: #450a0a; border-color: #991b1b; color: #fca5a5; }

/* ═══════════════════════════════════════════════════════════════════════════
   Quality Box — آنالیزگر کیفیت محتوا
   ═══════════════════════════════════════════════════════════════════════════ */

.mo-quality-box {
  border: 1px solid var(--mo-border);
  border-radius: 14px;
  padding: 16px;
  background: var(--mo-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mo-quality-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mo-quality-box__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mo-text);
}

.mo-quality-box__score {
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
}
.mo-quality-box__score.excellent { color: #16a34a; background: #dcfce7; }
.mo-quality-box__score.good      { color: #2563eb; background: #dbeafe; }
.mo-quality-box__score.fair      { color: #d97706; background: #fef3c7; }
.mo-quality-box__score.poor      { color: #dc2626; background: #fee2e2; }
[data-theme="dark"] .mo-quality-box__score.excellent { background: #14532d; }
[data-theme="dark"] .mo-quality-box__score.good      { background: #1e3a8a; }
[data-theme="dark"] .mo-quality-box__score.fair      { background: #78350f; }
[data-theme="dark"] .mo-quality-box__score.poor      { background: #450a0a; }

/* Progress bar */
.mo-quality-bar {
  height: 8px;
  background: var(--mo-border);
  border-radius: 99px;
  overflow: hidden;
}
.mo-quality-bar__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease, background-color 0.4s;
}
.mo-quality-bar__fill--excellent { background: #16a34a; }
.mo-quality-bar__fill--good      { background: #2563eb; }
.mo-quality-bar__fill--fair      { background: #d97706; }
.mo-quality-bar__fill--poor      { background: #dc2626; }

/* Criteria list */
.mo-quality-criteria {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mo-quality-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mo-text-muted);
  font-size: 0.85rem;
}

.mo-quality-criterion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
}
.mo-quality-criterion__body { display: flex; flex-direction: column; gap: 2px; }
.mo-quality-criterion__label { font-weight: 600; color: var(--mo-text); }
.mo-quality-criterion__msg   { color: var(--mo-text-muted); line-height: 1.45; }

/* Criterion icons */
.mo-qc-icon        { flex-shrink: 0; margin-top: 1px; }
.mo-qc-icon--good    { color: #16a34a; }
.mo-qc-icon--partial { color: #d97706; }
.mo-qc-icon--bad     { color: #dc2626; }
.mo-qc-icon--neutral { color: var(--mo-text-muted); }

/* Reward preview */
.mo-quality-reward {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #15803d;
}
[data-theme="dark"] .mo-quality-reward { background: #052e16; border-color: #14532d; color: #86efac; }

/* ══════════════════════════════════════════════════════════════
   [BUGFIX] Post Card — کلاس‌های مفقود متناظر با JS renderer
   ══════════════════════════════════════════════════════════════ */

.mo-post-card {
  background: var(--surface-0, rgba(255,255,255,0.03));
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  padding: var(--sp-4, 16px) var(--sp-5, 20px);
  transition: background var(--dur-fast, 0.15s);
}
.mo-post-card:hover { background: rgba(255,255,255,0.005); }

.mo-post-card__header {
  display: flex; align-items: center;
  gap: var(--sp-3, 12px); margin-bottom: var(--sp-3, 12px);
}

.mo-post-card__avatar-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  flex-shrink: 0;
}

.mo-post-card__meta {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}

.mo-post-card__author {
  font-size: 0.9375rem; font-weight: 800; color: white;
  display: flex; align-items: center; gap: 4px;
}

.mo-post-card__time {
  font-size: 0.75rem; color: rgba(255,255,255,0.38);
}

.mo-post-card__body { margin-bottom: var(--sp-3, 12px); }

.mo-post-card__content {
  font-size: 0.9375rem; line-height: 1.7;
  color: rgba(255,255,255,0.82);
  white-space: pre-wrap; word-break: break-word;
}

.mo-read-more {
  display: inline-block; margin-top: var(--sp-2, 8px);
  font-size: 0.8125rem; color: var(--navy-400, #3b82f6);
  cursor: pointer; font-weight: 700;
  background: none; border: none; padding: 0;
}

.mo-post-card__image {
  width: 100%; max-height: 380px; object-fit: cover;
  border-radius: var(--r-md, 10px); display: block;
  margin-top: var(--sp-2, 8px);
}

.mo-post-card__video {
  width: 100%; max-height: 360px; border-radius: var(--r-md, 10px);
  display: block; margin-top: var(--sp-2, 8px);
}

.mo-post-card__file {
  display: flex; align-items: center; gap: var(--sp-3, 12px);
  padding: var(--sp-3, 12px); margin-top: var(--sp-2, 8px);
  background: var(--surface-1, rgba(255,255,255,0.07));
  border-radius: var(--r-md, 10px);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  color: rgba(255,255,255,0.65);
}
.mo-post-card__file svg { width: 24px; height: 24px; flex-shrink: 0; }
.mo-post-card__file span { flex: 1; font-size: 0.875rem; font-weight: 600; }

.mo-post-card__footer { padding-top: var(--sp-2, 8px); }

.mo-post-card__actions {
  display: flex; align-items: center; gap: var(--sp-1, 4px);
}

/* Action buttons */
.mo-reaction-btn,
.mo-comment-btn,
.mo-share-btn,
.mo-bookmark-btn {
  display: flex; align-items: center; gap: 5px;
  padding: var(--sp-2, 8px) var(--sp-3, 12px);
  border-radius: var(--r-md, 10px);
  cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: rgba(255,255,255,0.45);
  background: none; border: none;
  transition: all var(--dur-fast, 0.15s);
}
.mo-reaction-btn:hover { color: #fca5a5; background: rgba(239,68,68,0.08); }
.mo-reaction-btn.is-active { color: #fca5a5; }
.mo-comment-btn:hover { color: var(--navy-400, #3b82f6); background: rgba(59,130,246,0.08); }
.mo-bookmark-btn:hover { color: var(--gold-400, #e8b84b); background: rgba(212,160,23,0.08); }
.mo-bookmark-btn.is-active { color: var(--gold-400, #e8b84b); }
.mo-share-btn:hover { color: rgba(255,255,255,0.78); background: var(--surface-1); }

/* Auth fixes for JS-rendered classes */
.auth-card__header {
  text-align: center;
  padding: var(--sp-6, 24px) var(--sp-5, 20px) var(--sp-4, 16px);
}

.auth-card__logo {
  display: flex; justify-content: center; margin-bottom: var(--sp-4, 16px);
}

.auth-card__title {
  font-size: 1.5rem; font-weight: 900;
  color: white; margin: 0 0 var(--sp-1, 4px);
}

.auth-card__subtitle {
  font-size: 0.875rem; color: rgba(255,255,255,0.5);
  line-height: 1.6; margin: 0;
}

.auth-card__body {
  padding: var(--sp-4, 16px) var(--sp-5, 20px) var(--sp-6, 24px);
}

.auth-input-group { margin-bottom: var(--sp-3, 12px); }

.auth-otp-inputs {
  display: flex; gap: var(--sp-2, 8px);
  justify-content: center; margin-bottom: var(--sp-4, 16px);
}

.auth-resend {
  text-align: center; margin-top: var(--sp-3, 12px);
  font-size: 0.8125rem; color: rgba(255,255,255,0.42);
}

.auth-link {
  color: var(--navy-400, #3b82f6); cursor: pointer;
  font-weight: 700; background: none; border: none; padding: 0;
}

.auth-role-cards {
  display: grid; gap: var(--sp-3, 12px);
}

.auth-error {
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-md, 10px);
  color: #fca5a5; font-size: 0.875rem;
  margin-bottom: var(--sp-3, 12px);
}

/* ═══════════════════════════════════════════════════════════════
   [BUG FIX] موارد ضروری که در CSS اصلی تعریف نشده بودند
   ═══════════════════════════════════════════════════════════════ */

/* ── فیلدهای ورودی (mo-input) ─────────────────────────────── */
/* قبلاً این کلاس‌ها تعریف نشده بودند → فیلدها تیز و بی‌استایل نشون داده می‌شدند */
.mo-input {
  width: 100%;
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  background: var(--surface-1, rgba(255,255,255,0.06));
  border: 1.5px solid var(--border-mid, rgba(255,255,255,0.13));
  border-radius: var(--r-lg, 20px);   /* گوشه‌های نرم و مدرن */
  color: rgba(255,255,255,0.92);
  font-size: 0.9375rem;
  font-family: var(--font-fa, 'Vazirmatn', sans-serif);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.mo-input::placeholder {
  color: rgba(255,255,255,0.32);
}

.mo-input:focus {
  border-color: var(--navy-400, #3b82f6);
  background: var(--surface-2, rgba(255,255,255,0.09));
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

.mo-input--xl {
  padding: var(--sp-4, 16px) var(--sp-5, 20px);
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: var(--r-xl, 28px);
}

/* Light mode overrides for inputs */
[data-theme="light"] .mo-input {
  background: rgba(15,32,68,0.04);
  border-color: rgba(15,32,68,0.15);
  color: rgba(10,22,50,0.9);
}
[data-theme="light"] .mo-input::placeholder { color: rgba(10,22,50,0.38); }
[data-theme="light"] .mo-input:focus {
  border-color: var(--navy-500, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}

/* ── دارک مود: بهبود کنتراست عنوان‌ها ───────────────────────── */
/* [BUG FIX] عنوان‌ها در دارک مود کنتراست کافی نداشتند */
.mo-post-card__author,
.mo-sidebar__user-name,
.mo-quality-criterion__label,
.page-header-title,
.section-title,
.sheet-title,
.mo-post-editor__title,
.mo-topbar__logo-text {
  color: rgba(255,255,255,0.97) !important;
}

/* متن‌های فرعی که باید خوانا باشند */
.mo-post-card__time,
.mo-sidebar__user-role,
.mo-quality-criterion__msg,
.auth-card__subtitle {
  color: rgba(255,255,255,0.58) !important;
}

/* دارک مود: عنوان‌های سفید در پس‌زمینه تاریک */
[data-theme="dark"] .mo-post-card__author,
[data-theme="dark"] .page-header-title,
[data-theme="dark"] .section-title {
  color: #ffffff !important;
}

/* لایت مود: عنوان‌ها به رنگ تیره */
[data-theme="light"] .mo-post-card__author,
[data-theme="light"] .page-header-title,
[data-theme="light"] .section-title,
[data-theme="light"] .mo-topbar__logo-text,
[data-theme="light"] .mo-post-editor__title {
  color: rgba(10,22,50,0.95) !important;
}
[data-theme="light"] .mo-post-card__time,
[data-theme="light"] .mo-sidebar__user-role,
[data-theme="light"] .mo-quality-criterion__msg {
  color: rgba(10,22,50,0.55) !important;
}

/* ── دکمه تم‌تاگل ──────────────────────────────────────────── */
/* [NEW] آیکون‌های خورشید/ماه در هدر */
.mo-theme-icon { display: none; }
/* حالت پیش‌فرض (dark): آیکون ماه */
.mo-theme-icon--dark { display: block; }
[data-theme="light"] .mo-theme-icon--dark  { display: none; }
[data-theme="light"] .mo-theme-icon--light { display: block; }

/* ── فیلد عنوان ویرایشگر پست ───────────────────────────────── */
/* [BUG FIX] فیلد عنوان پست قبلاً بی‌استایل و تیز بود */
#mo-editor-title.mo-input--xl {
  border-radius: var(--r-xl, 28px);
  margin-bottom: var(--sp-3, 12px);
}

/* ── دکمه ارسال پست: نمایش وضعیت غیرفعال ─────────────────── */
/* [BUG FIX] دکمه انتشار در حالت disabled باید واضح نشون بده که چرا غیرفعاله */
#mo-editor-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
#mo-editor-submit:not(:disabled) {
  animation: pulse-submit 1.8s ease-in-out 1;
}
@keyframes pulse-submit {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50%  { box-shadow: 0 0 0 8px rgba(37,99,235,0); }
  100% { box-shadow: none; }
}

/* ════════════════════════════════════════════════════════════════════
   [v4.0 — بازنویسی کامل] CSS برای موارد جدید و اصلاحات
   ════════════════════════════════════════════════════════════════════ */

/* ── فیلد ورودی (mo-input) ── */
.mo-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-1, rgba(255,255,255,0.06));
  border: 1.5px solid var(--border-mid, rgba(255,255,255,0.13));
  border-radius: 20px;
  color: rgba(255,255,255,0.92);
  font-size: 0.9375rem;
  font-family: var(--font-fa, 'Vazirmatn', sans-serif);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.mo-input::placeholder { color: rgba(255,255,255,0.32); }
.mo-input:focus {
  border-color: var(--navy-400, #3b82f6);
  background: var(--surface-2, rgba(255,255,255,0.09));
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}
.mo-input--xl { padding: 14px 20px; font-size: 1.0625rem; font-weight: 700; border-radius: 24px; }

[data-theme="light"] .mo-input {
  background: rgba(15,32,68,0.04);
  border-color: rgba(15,32,68,0.15);
  color: rgba(10,22,50,0.92);
}
[data-theme="light"] .mo-input::placeholder { color: rgba(10,22,50,0.38); }
[data-theme="light"] .mo-input:focus {
  border-color: var(--navy-500, #2563eb);
  background: rgba(255,255,255,0.88);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}

/* ── Toggle Switch (دکمه دارک/لایت) ── */
.mo-toggle-switch {
  width: 52px; height: 28px;
  border-radius: 14px;
  background: var(--surface-3, rgba(255,255,255,0.14));
  border: 1px solid var(--border-mid);
  cursor: pointer;
  position: relative;
  transition: background 0.25s, border-color 0.25s;
  flex-shrink: 0;
}
.mo-toggle-switch.is-on {
  background: var(--navy-500, #2563eb);
  border-color: transparent;
}
.mo-toggle-switch__knob {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: right 0.25s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.mo-toggle-switch.is-on .mo-toggle-switch__knob { right: calc(100% - 23px); }

/* ── تم هدر — دکمه تاگل ── */
#mo-theme-toggle svg { transition: opacity 0.2s; }

/* ── Settings Page ── */
.mo-settings-page { padding-bottom: 40px; width: 100%; }

.mo-settings-section {
  margin: 16px 16px 0;
  background: var(--surface-1, rgba(255,255,255,0.05));
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
}
[data-theme="light"] .mo-settings-section {
  background: rgba(255,255,255,0.88);
  border-color: rgba(15,32,68,0.1);
  box-shadow: 0 2px 12px rgba(15,32,68,0.06);
}

.mo-settings-section-title {
  padding: 10px 16px 6px;
  font-size: 0.6875rem;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
[data-theme="light"] .mo-settings-section-title { color: rgba(10,22,50,0.45); }

.mo-settings-row {
  display: flex; align-items: center;
  gap: 14px; padding: 14px 16px;
  cursor: pointer; border: none;
  background: transparent; width: 100%;
  text-align: right; text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-top: 1px solid var(--border-subtle);
}
.mo-settings-row:first-child { border-top: none; }
.mo-settings-row:hover { background: var(--surface-1); }
[data-theme="light"] .mo-settings-row:hover { background: rgba(15,32,68,0.04); }

.mo-settings-row__icon { font-size: 1.25rem; flex-shrink: 0; width: 28px; text-align: center; }
.mo-settings-row__body { flex: 1; }
.mo-settings-row__label { font-size: 0.9375rem; font-weight: 600; color: rgba(255,255,255,0.9); display: block; }
.mo-settings-row__desc  { font-size: 0.8125rem; color: rgba(255,255,255,0.45); margin-top: 2px; display: block; }
[data-theme="light"] .mo-settings-row__label { color: rgba(10,22,50,0.9); }
[data-theme="light"] .mo-settings-row__desc  { color: rgba(10,22,50,0.5); }
.mo-settings-row--danger .mo-settings-row__label { color: #fca5a5; }
.mo-settings-row--link svg { color: rgba(255,255,255,0.35); flex-shrink: 0; }
[data-theme="light"] .mo-settings-row--link svg { color: rgba(10,22,50,0.35); }

/* ── Profile Page ── */
.mo-profile-page { padding-bottom: 40px; }
.mo-profile-hero {
  padding: 20px 20px 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
}
.mo-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.mo-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-mid);
  background: var(--surface-2);
}
.mo-online-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 12px; height: 12px;
  background: #22c55e; border-radius: 50%;
  border: 2px solid var(--navy-950);
}
.mo-profile-text { flex: 1; min-width: 0; }
.mo-profile-name {
  font-size: 1.125rem; font-weight: 900;
  color: rgba(255,255,255,0.97);
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
[data-theme="light"] .mo-profile-name { color: rgba(10,22,50,0.95); }
.mo-profile-username { font-size: 0.8125rem; color: var(--navy-400); margin-top: 2px; }
.mo-profile-bio { font-size: 0.875rem; color: rgba(255,255,255,0.65); margin-top: 6px; line-height: 1.6; }
[data-theme="light"] .mo-profile-bio { color: rgba(10,22,50,0.65); }
.mo-profile-stats { display: flex; gap: 20px; margin-top: 12px; }
.mo-stat { text-align: center; }
.mo-stat strong { display: block; font-size: 1rem; font-weight: 800; color: rgba(255,255,255,0.95); }
.mo-stat span   { font-size: 0.6875rem; color: rgba(255,255,255,0.45); font-weight: 500; }
[data-theme="light"] .mo-stat strong { color: rgba(10,22,50,0.95); }
[data-theme="light"] .mo-stat span   { color: rgba(10,22,50,0.5); }

/* ── Home Stories Bar ── */
.mo-home-stories-bar {
  padding: 12px 16px;
  display: flex; gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.mo-home-stories-bar::-webkit-scrollbar { display: none; }
.mo-story-add {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.mo-story-add__circle {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px dashed var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: border-color 0.2s, color 0.2s;
}
.mo-story-add:hover .mo-story-add__circle { border-color: var(--navy-400); color: var(--navy-400); }
.mo-story-add span { font-size: 0.6875rem; color: rgba(255,255,255,0.45); }

/* ── Story Items (dynamic) ── */
.mo-story-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; flex-shrink: 0;
}
.mo-story-item__ring {
  width: 56px; height: 56px; border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899, #8b5cf6);
}
.mo-story-item__ring.is-seen {
  background: rgba(255,255,255,0.18);
}
.mo-story-item__avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--navy-950);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mo-story-item__avatar img { width:100%; height:100%; object-fit:cover; }
.mo-story-item__initial {
  font-size: 1.1rem; font-weight: 700;
  color: rgba(255,255,255,0.8);
}
.mo-story-item__name {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.55);
  max-width: 58px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}


/* ── Channels / Tabs ── */
.mo-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  gap: 0;
}
.mo-tab {
  flex: 1; padding: 12px; text-align: center;
  font-size: 0.875rem; font-weight: 700;
  color: rgba(255,255,255,0.45);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
  margin-bottom: -1px;
}
.mo-tab.active { color: white; border-bottom-color: var(--navy-400, #3b82f6); }
[data-theme="light"] .mo-tab { color: rgba(10,22,50,0.45); }
[data-theme="light"] .mo-tab.active { color: var(--navy-600); border-bottom-color: var(--navy-600); }

.mo-channel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; transition: background 0.15s;
}
.mo-channel-item:hover { background: var(--surface-1); }
.mo-channel-item__avatar { flex-shrink: 0; }
.mo-channel-item__avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.mo-channel-item__avatar-placeholder {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; font-weight: 800; color: white;
}
.mo-channel-item__body { flex: 1; min-width: 0; }
.mo-channel-item__name {
  font-size: 0.9375rem; font-weight: 700;
  color: rgba(255,255,255,0.92);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
[data-theme="light"] .mo-channel-item__name { color: rgba(10,22,50,0.92); }
.mo-channel-item__last { font-size: 0.8125rem; color: rgba(255,255,255,0.42); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-theme="light"] .mo-channel-item__last { color: rgba(10,22,50,0.5); }
.mo-channel-item__meta { flex-shrink: 0; text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mo-channel-item__time { font-size: 0.6875rem; color: rgba(255,255,255,0.32); }
.mo-channel-item__unread {
  background: var(--navy-500); color: white;
  font-size: 0.6875rem; font-weight: 800;
  border-radius: 10px; min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ── Notifications ── */
.mo-notifs-list { padding-bottom: 20px; }
.mo-notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative; transition: background 0.15s;
}
.mo-notif-item.unread { background: var(--surface-0); }
.mo-notif-item:hover { background: var(--surface-1); }
.mo-notif-body { flex: 1; }
.mo-notif-dot {
  position: absolute; top: 18px; left: 14px;
  width: 8px; height: 8px;
  background: var(--navy-400); border-radius: 50%;
}
.notif-text { font-size: 0.875rem; color: rgba(255,255,255,0.85); line-height: 1.55; }
.notif-time { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 4px; display: block; }
[data-theme="light"] .notif-text { color: rgba(10,22,50,0.85); }
[data-theme="light"] .notif-time { color: rgba(10,22,50,0.45); }

/* ── Classes ── */
.mo-classes-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.mo-class-card {
  background: var(--surface-1); border: 1px solid var(--border-subtle);
  border-radius: 18px; padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.mo-class-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
[data-theme="light"] .mo-class-card { background: white; border-color: rgba(15,32,68,0.1); box-shadow: 0 2px 12px rgba(15,32,68,0.06); }
.mo-class-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mo-class-card__teacher { font-size: 0.875rem; font-weight: 700; color: rgba(255,255,255,0.9); }
[data-theme="light"] .mo-class-card__teacher { color: rgba(10,22,50,0.9); }
.mo-class-card__badge { font-size: 0.6875rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; margin-right: auto; }
.mo-class-card__badge.online  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.mo-class-card__badge.offline { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.mo-class-card__title { font-size: 1rem; font-weight: 800; color: rgba(255,255,255,0.97); margin-bottom: 6px; }
[data-theme="light"] .mo-class-card__title { color: rgba(10,22,50,0.97); }
.mo-class-card__desc { font-size: 0.8125rem; color: rgba(255,255,255,0.52); line-height: 1.6; margin-bottom: 10px; }
[data-theme="light"] .mo-class-card__desc { color: rgba(10,22,50,0.55); }
.mo-class-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8125rem; color: rgba(255,255,255,0.58); margin-bottom: 14px; }
[data-theme="light"] .mo-class-card__meta { color: rgba(10,22,50,0.58); }

/* ── Sidebar Theme Row ── */
.mo-sidebar__theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px;
  font-size: 0.9rem; font-weight: 600;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}
.mo-sidebar__item-emoji { width: 28px; text-align: center; font-size: 1.1rem; }

/* ── Post Editor: word count ── */
.mo-editor-word-count {
  padding: 6px 4px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.42);
  text-align: left;
  direction: ltr;
}
.mo-word-count-min { margin-right: 6px; }
[data-theme="light"] .mo-editor-word-count { color: rgba(10,22,50,0.42); }

/* ── Post editor submit disabled ── */
#mo-editor-submit:disabled {
  opacity: 0.42; cursor: not-allowed; transform: none !important;
}
#mo-editor-submit:not(:disabled) {
  animation: pulse-btn 2s ease 1;
}
@keyframes pulse-btn {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100% { box-shadow: none; }
}

/* ── Light Mode: کنتراست کامل ── */
[data-theme="light"] .mo-post-card__author { color: rgba(10,22,50,0.95) !important; }
[data-theme="light"] .mo-post-card__time   { color: rgba(10,22,50,0.52) !important; }
[data-theme="light"] .mo-post-card { background: white; border-color: rgba(15,32,68,0.08); }
[data-theme="light"] .mo-post-editor__title,
[data-theme="light"] .page-header-title,
[data-theme="light"] .section-title { color: rgba(10,22,50,0.95) !important; }
[data-theme="light"] .mo-topbar__logo-text { color: rgba(10,22,50,0.95); }
[data-theme="light"] body, [data-theme="light"] .myostad-app { background: var(--navy-950); }
[data-theme="light"] .mo-editor-area { color: rgba(10,22,50,0.92); background: rgba(15,32,68,0.03); }
[data-theme="light"] .mo-editor-area::before { color: rgba(10,22,50,0.35) !important; }

/* ── Dark Mode: کنتراست کامل ── */
[data-theme="dark"] .mo-post-card__author { color: rgba(255,255,255,0.97) !important; }
[data-theme="dark"] .page-header-title { color: rgba(255,255,255,0.97) !important; }
[data-theme="dark"] .mo-post-editor__title { color: rgba(255,255,255,0.97) !important; }
[data-theme="dark"] .mo-topbar__logo-text { color: white !important; }

/* ── Post card title ── */
.mo-post-card__title-text {
  font-size: 1rem; font-weight: 800;
  color: rgba(255,255,255,0.97);
  padding: 0 16px 10px;
  line-height: 1.5;
}
[data-theme="light"] .mo-post-card__title-text { color: rgba(10,22,50,0.97); }

/* ══════════════════════════════════════════════════════════════
   پروفایل — المان‌های اضافه‌شده v7
   ══════════════════════════════════════════════════════════════ */

.mo-profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #3b82f6);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}

.mo-profile-avatar-wrap {
  position: relative;
  display: inline-block;
}

.mo-profile-avatar-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: var(--primary, #3b82f6);
  color: #fff;
  border: 2px solid var(--navy-950, #050c1a);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s;
}
.mo-profile-avatar-edit-btn:hover { transform: scale(1.12); }

.mo-profile-music { padding: 8px 16px; }

.mo-profile-birth {
  color: var(--muted-text, rgba(255,255,255,0.5));
  font-size: 13px;
  margin: 4px 0;
}

.mo-teacher-badge {
  display: inline-block;
  background: rgba(59,130,246,0.18);
  color: var(--primary, #3b82f6);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  margin-right: 4px;
  vertical-align: middle;
}

/* فرم ویرایش پروفایل */
.mo-profile-edit-form {
  border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  margin-top: 8px;
}

.mo-select {
  background: var(--surface-1, rgba(255,255,255,0.06));
  color: var(--text-primary, #f0f4ff);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.12));
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
[data-theme="light"] .mo-select {
  background: #fff;
  color: #0a1632;
  border-color: #d1d5db;
}

.mo-form-hint {
  font-size: 12px;
  color: var(--muted-text, rgba(255,255,255,0.45));
  margin-top: 4px;
  display: block;
}

/* دکمه بیومتریک */
.mo-btn--biometric {
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.12)) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}
.mo-btn--biometric:hover {
  border-color: var(--primary, #3b82f6) !important;
}

/* خط جداکننده در auth modal */
.mo-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted-text, rgba(255,255,255,0.4));
  font-size: 12px;
}
.mo-auth-divider::before,
.mo-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle, rgba(255,255,255,0.1));
}

/* light mode overrides */
[data-theme="light"] .mo-profile-avatar-edit-btn {
  border-color: #f0f5ff;
}
[data-theme="light"] .mo-teacher-badge {
  background: rgba(37,99,235,0.1);
}
[data-theme="light"] .mo-form-hint {
  color: rgba(10,22,50,0.5);
}

/* ══════════════════════════════════════════════════════════════
   [COMPREHENSIVE FIX] Light Mode (مهتابی) — پوشش کامل
   ══════════════════════════════════════════════════════════════ */

/* notifications */
[data-theme="light"] .mo-notif-item {
  background: white !important;
  border-color: rgba(15,32,68,0.08) !important;
  color: rgba(10,22,50,0.88) !important;
}
[data-theme="light"] .notif-text { color: rgba(10,22,50,0.85) !important; }
[data-theme="light"] .notif-time { color: rgba(10,22,50,0.42) !important; }
[data-theme="light"] .notif-unread { background: rgba(37,99,235,0.08) !important; }

/* settings */
[data-theme="light"] .mo-settings-section {
  background: white !important;
  border-color: rgba(15,32,68,0.08) !important;
  box-shadow: 0 2px 12px rgba(15,32,68,0.06) !important;
}
[data-theme="light"] .mo-settings-section-title { color: rgba(10,22,50,0.42) !important; }
[data-theme="light"] .mo-settings-row { border-bottom-color: rgba(15,32,68,0.07) !important; }
[data-theme="light"] .mo-settings-row__label { color: rgba(10,22,50,0.9) !important; }
[data-theme="light"] .mo-settings-row__desc { color: rgba(10,22,50,0.5) !important; }
[data-theme="light"] .mo-settings-row__icon { opacity: 0.85; }
[data-theme="light"] .mo-settings-row--link svg { color: rgba(10,22,50,0.3) !important; }
[data-theme="light"] .mo-settings-row--danger { color: #dc2626 !important; }

/* toggle switch */
[data-theme="light"] .mo-toggle-switch {
  background: rgba(15,32,68,0.15) !important;
  border-color: rgba(15,32,68,0.2) !important;
}
[data-theme="light"] .mo-toggle-switch.is-on { background: var(--primary, #2563eb) !important; }

/* profile page */
[data-theme="light"] .mo-profile-page { background: #f0f5ff !important; }
[data-theme="light"] .mo-profile-hero { background: white !important; border-bottom-color: rgba(15,32,68,0.08) !important; }
[data-theme="light"] .mo-profile-name { color: rgba(10,22,50,0.95) !important; }
[data-theme="light"] .mo-profile-username { color: rgba(10,22,50,0.45) !important; }
[data-theme="light"] .mo-profile-bio { color: rgba(10,22,50,0.65) !important; }
[data-theme="light"] .mo-stat strong { color: rgba(10,22,50,0.95) !important; }
[data-theme="light"] .mo-stat span { color: rgba(10,22,50,0.5) !important; }
[data-theme="light"] .mo-profile-edit-form { border-top-color: rgba(15,32,68,0.08) !important; }

/* tabs in light mode */
[data-theme="light"] .mo-tabs { border-bottom-color: rgba(15,32,68,0.1) !important; }
[data-theme="light"] .mo-tab { color: rgba(10,22,50,0.42) !important; }

/* class cards */
[data-theme="light"] .mo-class-card {
  background: white !important;
  border-color: rgba(15,32,68,0.08) !important;
  box-shadow: 0 2px 12px rgba(15,32,68,0.06) !important;
}
[data-theme="light"] .mo-class-card__title { color: rgba(10,22,50,0.97) !important; }
[data-theme="light"] .mo-class-card__desc { color: rgba(10,22,50,0.55) !important; }
[data-theme="light"] .mo-class-card__meta { color: rgba(10,22,50,0.5) !important; }
[data-theme="light"] .mo-class-card__teacher { color: rgba(10,22,50,0.85) !important; }

/* channel items */
[data-theme="light"] .mo-channel-item {
  background: white !important;
  border-color: rgba(15,32,68,0.08) !important;
}
[data-theme="light"] .mo-channel-item__name { color: rgba(10,22,50,0.92) !important; }
[data-theme="light"] .mo-channel-item__last { color: rgba(10,22,50,0.5) !important; }

/* inputs */
[data-theme="light"] .mo-input {
  background: white !important;
  border-color: rgba(15,32,68,0.18) !important;
  color: rgba(10,22,50,0.92) !important;
}
[data-theme="light"] .mo-input:focus { border-color: var(--primary, #2563eb) !important; box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important; }

/* buttons in light mode */
[data-theme="light"] .mo-btn--ghost {
  border-color: rgba(15,32,68,0.2) !important;
  color: rgba(10,22,50,0.75) !important;
  background: transparent !important;
}
[data-theme="light"] .mo-btn--ghost:hover {
  background: rgba(15,32,68,0.06) !important;
  color: rgba(10,22,50,0.92) !important;
}

/* post editor in light mode */
[data-theme="light"] .mo-post-editor { background: #f0f5ff !important; }
[data-theme="light"] .mo-post-editor__header { background: rgba(240,245,255,0.95) !important; border-bottom-color: rgba(15,32,68,0.1) !important; }
[data-theme="light"] .mo-editor-area { background: white !important; color: rgba(10,22,50,0.92) !important; border-color: rgba(15,32,68,0.12) !important; }
[data-theme="light"] .mo-editor-toolbar { background: rgba(15,32,68,0.04) !important; border-color: rgba(15,32,68,0.1) !important; }
[data-theme="light"] .mo-editor-tool { color: rgba(10,22,50,0.6) !important; }
[data-theme="light"] .mo-editor-tool:hover { background: rgba(15,32,68,0.08) !important; color: rgba(10,22,50,0.92) !important; }
[data-theme="light"] .mo-editor-word-count { color: rgba(10,22,50,0.4) !important; }

/* ── story add button در لایت مود ── */
[data-theme="light"] .mo-story-add span { color: rgba(10,22,50,0.45) !important; }
[data-theme="light"] .mo-story-add__circle { border-color: rgba(15,32,68,0.25) !important; color: rgba(10,22,50,0.5) !important; }
[data-theme="light"] .mo-story-add:hover .mo-story-add__circle { border-color: var(--primary, #2563eb) !important; color: var(--primary, #2563eb) !important; }
[data-theme="light"] .mo-story-item__name { color: rgba(10,22,50,0.55) !important; }

/* section header در لایت مود */
[data-theme="light"] .section-title { color: rgba(10,22,50,0.92) !important; }
[data-theme="light"] .section-more { color: var(--primary, #2563eb) !important; }
[data-theme="light"] .section-title::before { background: linear-gradient(to bottom, var(--accent, #d4a017), var(--primary, #2563eb)) !important; }

/* home stories bar */
[data-theme="light"] .mo-home-stories-bar { border-bottom-color: rgba(15,32,68,0.08) !important; }

/* page-header-title در لایت مود */
[data-theme="light"] .page-header-title { color: rgba(10,22,50,0.92) !important; }

/* ── post card actions در لایت مود ── */
[data-theme="light"] .mo-post-card__actions button { color: rgba(10,22,50,0.45) !important; }
[data-theme="light"] .mo-post-card__actions button:hover { color: rgba(10,22,50,0.85) !important; }
[data-theme="light"] .mo-post-more-btn { color: rgba(10,22,50,0.35) !important; }

/* context menu در لایت مود */
[data-theme="light"] .context-menu, [data-theme="light"] [id="mo-post-context-menu"] {
  background: white !important;
  border-color: rgba(15,32,68,0.12) !important;
  box-shadow: 0 8px 32px rgba(15,32,68,0.18) !important;
}
