/* بطاقة البث المباشر */
.cs-live-broadcast-card {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(12, 8, 18, 0.6) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.cs-live-broadcast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cs-live-broadcast-head h3 {
  margin: 0;
  font-size: 1rem;
}

.cs-live-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.cs-live-status-pill.is-on-air {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.cs-live-title-inp {
  width: 100%;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(236, 72, 153, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: #e2e8f0;
  font: inherit;
}

.cs-live-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cs-btn-live-start {
  flex: 1;
  min-width: 140px;
}

.cs-live-preview-wrap {
  position: relative;
  margin: 12px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  min-height: 200px;
}

.cs-live-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.25s;
}

.cs-live-preview-wrap:not(.is-waiting-cam) .cs-live-poster {
  opacity: 0;
}

.cs-live-preview-wrap.is-waiting-cam::before {
  content: 'جاري تشغيل الكاميرا…';
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.cs-live-preview-wrap:not(.is-waiting-cam)::before {
  display: none;
}

.cs-live-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
  transform: scaleX(-1);
}

.cs-live-preview.has-stream {
  z-index: 4;
}

.cs-live-fan-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 10px 48px;
}

.cs-live-fan-layer[hidden] {
  display: none !important;
}

.cs-live-active-guest {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(254, 44, 85, 0.92);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.cs-live-active-guest.hidden {
  display: none;
}

.cs-live-active-guest-label {
  opacity: 0.9;
  font-weight: 600;
}

.cs-live-guests-col {
  position: absolute;
  left: 10px;
  top: 56px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  pointer-events: none;
}

.cs-live-guest-pip {
  position: relative;
  left: auto;
  top: auto;
  width: 92px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.3);
  pointer-events: auto;
  flex-shrink: 0;
}

.cs-live-remote-audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.cs-live-guest-pip.hidden {
  display: none;
}

.cs-live-guest-video {
  width: 100%;
  height: 128px;
  object-fit: cover;
  display: block;
  background: #111;
}

.cs-live-guest-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(254, 44, 85, 0.9);
  color: #fff;
}

.cs-live-guest-ctrl {
  width: 100%;
  border: none;
  padding: 5px 6px;
  background: #fe2c55;
  color: #fff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.cs-live-join-queue {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.cs-live-join-queue.hidden {
  display: none;
}

.cs-live-join-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.78rem;
}

.cs-live-join-actions {
  display: flex;
  gap: 6px;
}

.cs-live-join-approve,
.cs-live-join-reject {
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.cs-live-join-approve {
  background: #22c55e;
  color: #fff;
}

.cs-live-join-reject {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cs-live-gift-toasts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 0;
}

.cs-live-gift-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.95), rgba(254, 44, 85, 0.9));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  animation: cs-gift-toast-in 4s ease-out forwards;
}

.cs-live-gift-toast-emoji {
  font-size: 1.35rem;
}

@keyframes cs-gift-toast-in {
  0% {
    opacity: 0;
    transform: translateX(-12px);
  }
  10% {
    opacity: 1;
    transform: none;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.cs-live-fan-chat {
  max-height: 38%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
}

.cs-live-fan-line {
  align-self: flex-start;
  max-width: 95%;
  padding: 7px 11px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.35;
  backdrop-filter: blur(8px);
}

.cs-live-fan-line strong {
  margin-inline-end: 6px;
}

.cs-live-host-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-width: calc(100% - 20px);
}

.cs-live-host-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(236, 72, 153, 0.6);
}

.cs-live-host-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.cs-live-on-air-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 900;
  color: #fecaca;
  letter-spacing: 0.04em;
}

.cs-live-on-air-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: cs-live-pulse 1.2s ease-in-out infinite;
}

@keyframes cs-live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.cs-live-overlay-stats {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cs-live-overlay-stats span {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(8px);
}

/* استوديو المبدع — لوحة تحكم احترافية موحّدة */
.cs-studio-page {
  min-height: 100vh;
  margin: 0;
  background: #0c0812;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(236, 72, 153, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.12), transparent),
    linear-gradient(180deg, #0f0a14 0%, #1a1024 40%, #120a18 100%);
  font-family: Tajawal, sans-serif;
  color: #e2e8f0;
}

.cs-shell {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cs-boot-error {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.cs-boot-error.hidden {
  display: none !important;
}

/* ——— الهيدر ——— */
.cs-studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(12, 8, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
  position: sticky;
  top: 0;
  z-index: 40;
}

.cs-studio-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cs-studio-brand > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 4px;
  min-width: 0;
}
.cs-studio-brand strong {
  display: inline;
  font-size: 1rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cs-studio-brand > div small {
  flex-basis: 100%;
}

.cs-studio-brand small {
  color: #94a3b8;
  font-size: 0.8rem;
}

.cs-avatar-mini-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.cs-avatar-mini {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(236, 72, 153, 0.6);
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  display: block;
}

.cs-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border: 2px solid rgba(236, 72, 153, 0.6);
}

.cs-avatar-mini:not(.hidden) + .cs-avatar-fallback {
  display: none;
}

.cs-studio-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cs-header-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  color: #f9a8d4;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.25);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cs-header-link:hover {
  background: rgba(236, 72, 153, 0.22);
  color: #fff;
}

.cs-header-link--ghost {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ——— شريط الإحصائيات ——— */
.cs-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 18px 0;
}

.cs-stats-bar > div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.cs-stats-bar strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #f472b6;
  line-height: 1.2;
}

.cs-stats-bar span {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* ——— التبويبات ——— */
.cs-studio-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cs-studio-tabs::-webkit-scrollbar {
  display: none;
}

.cs-nav-tab {
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cs-nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.cs-nav-tab.active {
  background: linear-gradient(135deg, #ec4899, #a855f7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35);
}

/* ——— المحتوى ——— */
.cs-studio-main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 18px calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#studio-analytics {
  padding-bottom: 8px;
}

.cs-dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 16px;
  color: #94a3b8;
  font-weight: 700;
}

.cs-dash-loading-spin {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: cs-dash-spin 0.75s linear infinite;
}

@keyframes cs-dash-spin {
  to {
    transform: rotate(360deg);
  }
}

.cs-studio-panel.hidden {
  display: none !important;
}

/* ——— البطاقات ——— */
.cs-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.cs-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fce7f3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-card h3 i {
  color: #f472b6;
}

.cs-card-premium {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.06);
}

.cs-card label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
}

.cs-hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0 0 12px;
  line-height: 1.5;
}

.cs-card textarea,
.cs-card input[type="text"],
.cs-card input[type="number"],
.cs-card input[type="password"],
.cs-card input[type="file"] {
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.cs-card input::placeholder,
.cs-card textarea::placeholder {
  color: #64748b;
}

.cs-card input[type="file"] {
  padding: 10px;
  font-size: 0.85rem;
}

.cs-select-country {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #f1f5f9;
  font-family: inherit;
}

.cs-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-weight: 600;
  color: #e2e8f0;
}

/* ——— لوحة التحكم / المقاييس ——— */
.cs-dash-intro {
  margin-bottom: 18px;
}

.cs-dash-intro h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
}

.cs-dash-intro p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.cs-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cs-metric-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}

.cs-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 72, 153, 0.35);
}

.cs-metric-card i {
  display: block;
  font-size: 1.25rem;
  color: #f472b6;
  margin-bottom: 10px;
}

.cs-metric-card strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}

.cs-metric-card span {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.cs-metric-card.wide {
  grid-column: span 2;
}

.cs-metric-card.highlight {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.15));
  border-color: rgba(236, 72, 153, 0.4);
}

.cs-metric-card.highlight strong {
  color: #fcd34d;
}

.cs-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.cs-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cs-quick-btn i {
  font-size: 1.2rem;
  color: #f472b6;
}

.cs-quick-btn:hover {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.35);
  color: #fff;
}

/* ——— أزرار ——— */
.cs-btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.35);
  transition: opacity 0.2s, transform 0.15s;
}

.cs-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cs-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cs-btn-ghost {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cs-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cs-btn-danger-sm {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.cs-btn-danger-sm:hover {
  background: rgba(248, 113, 113, 0.22);
}

.cs-paid-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

/* ——— منشورات وقصص ——— */
.cs-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cs-post-card,
.cs-story-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  color: #e2e8f0;
}

.cs-post-card p {
  margin: 8px 0 4px;
  font-size: 0.9rem;
}

.cs-post-card small {
  color: #94a3b8;
}

.cs-story-card {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.cs-story-card img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.cs-empty,
.cs-empty-state {
  color: #94a3b8;
  text-align: center;
  padding: 32px 20px;
}

.cs-empty-state i {
  font-size: 2.5rem;
  color: #f472b6;
  opacity: 0.5;
  margin-bottom: 12px;
  display: block;
}

/* ——— الرسائل ——— */
.cs-messages-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 24px;
}

.cs-conversation {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.cs-conversation.unread {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.12);
}

.cs-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(236, 72, 153, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cs-conv-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cs-conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-conv-user strong {
  display: block;
  font-size: 0.95rem;
  color: #f8fafc;
}

.cs-conv-user small {
  color: #94a3b8;
  font-size: 0.75rem;
}

.cs-mark-read {
  font-size: 0.75rem !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  background: rgba(236, 72, 153, 0.2) !important;
  border: 1px solid rgba(236, 72, 153, 0.35) !important;
  color: #f9a8d4 !important;
}

.cs-conv-thread {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
}

.cs-bubble-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.85;
}

.cs-bubble p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.cs-bubble--fan {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.cs-bubble--creator {
  align-self: flex-start;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.cs-reply-composer textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #f1f5f9;
  padding: 12px 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
  box-sizing: border-box;
}

.cs-reply-composer .cs-btn-primary {
  width: auto;
  align-self: flex-start;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ——— كلمة السر ——— */
.cs-pass-wrap {
  position: relative;
}

.cs-pass-wrap input {
  padding-left: 72px;
}

.cs-pass-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.cs-prof-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(236, 72, 153, 0.4);
  background: rgba(0, 0, 0, 0.3);
}

.cs-cover-preview {
  width: 100%;
  max-width: 280px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
}

.cs-prof-preview.hidden,
.cs-cover-preview.hidden {
  display: none !important;
}

.cs-prof-media {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}

/* ——— Toast (إشعارات) ——— */
.cs-studio-page .toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  max-width: min(92vw, 400px);
  padding: 14px 22px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  white-space: pre-line;
}

.cs-studio-page .toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cs-studio-page .toast.toast--error {
  border-color: rgba(248, 113, 113, 0.5);
  background: #451a1a;
}

.cs-studio-page .toast.toast--success {
  border-color: rgba(52, 211, 153, 0.4);
  background: #134e4a;
}

.hidden {
  display: none !important;
}

/* ——— تسجيل الدخول ——— */
.cs-login-page {
  min-height: 100vh;
  background: linear-gradient(165deg, #0f0a14, #2d1b3d);
  font-family: Tajawal, sans-serif;
}

.cs-login-card {
  max-width: 400px;
  margin: 48px auto;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: #e2e8f0;
}

.cs-login-back {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
}

.cs-login-logo {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #ec4899, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 16px 0 8px;
}

.cs-login-sub {
  color: #94a3b8;
  margin-bottom: 20px;
}

.cs-login-card label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.cs-login-card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

.cs-login-err {
  color: #f87171;
  margin-top: 12px;
  text-align: center;
}

.cs-incoming-call {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(22, 22, 30, 0.96);
  border: 1px solid rgba(236, 72, 153, 0.45);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-width: min(96vw, 420px);
}

.cs-incoming-call.hidden {
  display: none !important;
}

.cs-incoming-call p {
  margin: 0;
  flex: 1 1 100%;
  color: #fce7f3;
  font-weight: 700;
}

/* مكالمة الاستوديو — أنماط التخطيط في call-ui.css */

@media (max-width: 520px) {
  .cs-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cs-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* نافذة تسجيل البصمة الصوتية */
.cs-voice-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cs-voice-modal.hidden {
  display: none;
}

.cs-voice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.cs-voice-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(160deg, #1a1228 0%, #0f0a14 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 18px;
  padding: 18px 20px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.cs-voice-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cs-voice-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cs-voice-modal-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cs-voice-modal-hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.cs-voice-mode-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cs-voice-mode-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cs-voice-mode-opt input {
  accent-color: #ec4899;
}

.cs-voice-mode-opt--active,
.cs-voice-mode-opt:has(input:checked) {
  border-color: rgba(236, 72, 153, 0.65);
  background: rgba(236, 72, 153, 0.12);
}

.cs-voice-mode-opt--female span {
  color: #f9a8d4;
}

.cs-voice-preset-row {
  margin-bottom: 12px;
}

.cs-voice-preset-row label {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.cs-voice-rec-status {
  font-size: 0.9rem;
  color: #e2e8f0;
  margin-bottom: 8px;
  min-height: 1.4em;
}

.cs-voice-rec-status.is-recording {
  color: #f472b6;
  font-weight: 700;
}

.cs-voice-rec-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ec4899;
  margin-bottom: 10px;
}

.cs-voice-preview {
  width: 100%;
  margin-bottom: 12px;
}

.cs-voice-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-voice-modal-actions .cs-btn-primary {
  flex: 1;
  min-width: 100px;
}

.cs-voice-fem-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #f9a8d4;
  line-height: 1.45;
}

.cs-live-access-fieldset {
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0 14px;
}

.cs-live-access-fieldset legend {
  padding: 0 6px;
  font-size: 0.85rem;
  color: #f9a8d4;
}

.cs-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.cs-live-paywall-fields {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.cs-simple-studio .cs-metrics-grid {
  display: none;
}

.cs-simple-studio .cs-dash-intro + .cs-metrics-grid + section {
  margin-top: 0;
}

.cs-simple-studio #studio-analytics .cs-metrics-grid {
  display: grid;
}
