* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Kantumruy Pro', sans-serif;
}

:root {
  --bg: #07090f;
  --surface: rgba(17, 22, 34, 0.8);
  --surface-solid: #121826;
  --surface-2: rgba(28, 36, 54, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f43f5e;
  --accent-2: #8b5cf6;
  --gold: #f59e0b;
  --fire: #fb923c;
}

body { background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
body { min-height: var(--tg-viewport-height, 100vh); }
.ambient-glow { position: fixed; border-radius: 50%; filter: blur(120px); opacity: 0.22; pointer-events: none; z-index: 0; }
.glow-1 { width: 420px; height: 420px; background: #e11d48; top: -120px; left: -100px; }
.glow-2 { width: 480px; height: 480px; background: #6366f1; bottom: -160px; right: -120px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Admin Portal */
.admin-gate { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.admin-login-card { width: 100%; max-width: 400px; margin: 0; padding: 28px; }
.admin-container { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.pwd-chip {
  display: inline-block; background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af; padding: 2px 8px; border-radius: 6px; font-size: 0.78rem; font-family: monospace;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 15, 0.85); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border); padding: 12px 26px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
  background: #fff; border: 1px solid rgba(255,255,255,.2); object-fit: cover;
}
.brand h1 { font-size: 1.1rem; font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 0.72rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  padding: 5px 12px 5px 6px; border-radius: 99px; border: 1px solid var(--border); font-size: 0.84rem; cursor: pointer;
}

/* Buttons */
.btn { border: none; border-radius: 11px; padding: 10px 18px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.18s; color: #fff; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-sm { padding: 7px 13px; font-size: 0.82rem; border-radius: 9px; }
.btn-full { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #4f46e5); }
.btn-accent { background: linear-gradient(135deg, var(--accent), #ec4899); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }

/* Layout */
.app-shell { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 20px 24px; }
.sidebar { position: sticky; top: 80px; height: fit-content; display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  position: relative; background: transparent; color: var(--muted); border: 1px solid transparent;
  border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  font-size: 0.94rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: left;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-help { color: var(--muted); text-decoration: none; }
.nav-help:hover { color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(139, 92, 246, 0.12)); border-color: rgba(244, 63, 94, 0.38); color: #fff; }
.nav-icon { font-size: 1.18rem; }
.unread-pill { margin-left: auto; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeSlide 0.25s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.glass-card { background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 18px; }
.glass-card h3 { margin-bottom: 14px; font-size: 1.02rem; }

/* Avatar & Badges */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; font-size: 0.95rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xl { width: 92px; height: 92px; font-size: 2rem; border: 3px solid var(--accent); }

.rank-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; }
.role-admin { background: rgba(244, 63, 94, 0.18); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.4); }
.role-president { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-vp1 { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.role-vp2 { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.role-member { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }

/* Stories Bar (TikTok Style) */
.stories-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stories-bar::-webkit-scrollbar { display: none; }
.stories-scroll { display: flex; gap: 14px; align-items: center; }
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 68px;
  flex-shrink: 0;
  user-select: none;
}
.story-item span {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
  color: #e2e8f0;
  text-align: center;
}
.story-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #00f2fe 0%, #25f4ee 50%, #4facfe 100%);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.35);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.story-ring:hover { transform: scale(1.05); }
.story-ring.viewed {
  background: #334155;
  box-shadow: none;
}
.story-ring .avatar {
  width: 50px;
  height: 50px;
  border: 2.5px solid #000;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

/* Your Story with TikTok + badge */
.my-story-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
}
.my-story-avatar-wrap .avatar {
  width: 50px;
  height: 50px;
  border: 2.5px solid #000;
  display: grid;
  place-items: center;
}
.my-story-plus-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00f2fe;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #000;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.7);
}
.story-ring.my-story-ring {
  background: var(--surface-2);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}
.story-ring.my-story-ring.has-story {
  background: linear-gradient(135deg, #00f2fe 0%, #25f4ee 50%, #4facfe 100%);
  border: none;
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.45);
}

/* TikTok Story Creator Studio Modal */
.story-creator-modal {
  max-width: 680px;
  width: 95%;
  padding: 22px;
}
.story-studio-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-top: 14px;
  align-items: start;
}
@media (max-width: 650px) {
  .story-studio-body { grid-template-columns: 1fr; }
}
.story-preview-phone {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 400px;
  background: #000;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.story-preview-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}
.story-preview-canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #09090b, #1e1b4b, #312e81);
}
.story-preview-canvas img,
.story-preview-canvas video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-empty-hint {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  padding: 20px;
}
.story-text-overlay {
  position: absolute;
  inset: 0;
  padding: 50px 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  word-break: break-word;
  pointer-events: none;
}
.story-bg-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.bg-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.bg-swatch:hover, .bg-swatch.active {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.story-studio-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.btn-tiktok-story {
  background: linear-gradient(135deg, #00f2fe 0%, #25f4ee 100%);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-tiktok-story:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.6);
}

/* TikTok Immersive Story Viewer */
.tiktok-story-viewer-container {
  width: 100%;
  max-width: 420px;
  height: 88vh;
  max-height: 800px;
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}
@media (max-width: 500px) {
  .tiktok-story-viewer-container {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
}
.story-progress-segments {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 4px;
  height: 3px;
}
.story-progress-bar {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}
.story-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.05s linear;
}
.story-viewer-header {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 15;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}
.story-viewer-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.story-viewer-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.story-action-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.story-action-btn:hover { background: rgba(239, 68, 68, 0.6); }
.story-viewer-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #09090b;
  user-select: none;
}
.story-tap-zone {
  position: absolute;
  top: 60px;
  bottom: 80px;
  z-index: 10;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tap-left { left: 0; width: 35%; }
.tap-right { right: 0; width: 65%; }
.story-viewer-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.story-viewer-media img,
.story-viewer-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.story-text-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 90px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  word-break: break-word;
}
.story-viewer-caption {
  position: absolute;
  bottom: 74px;
  left: 0;
  right: 0;
  z-index: 12;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
  color: #fff;
  font-size: 0.92rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  max-height: 120px;
  overflow-y: auto;
}
.story-viewer-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 70%, transparent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.story-reply-form {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.story-reply-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 36px 8px 14px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.story-reply-form input:focus {
  border-color: #00f2fe;
  background: rgba(255, 255, 255, 0.18);
}
.story-send-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #00f2fe;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}
.story-quick-reactions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.story-emoji-btn {
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.story-emoji-btn:hover { transform: scale(1.3); }
.story-floating-emojis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 18;
}
.flying-emoji {
  position: absolute;
  font-size: 2.2rem;
  animation: flyUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes flyUp {
  0% { opacity: 1; transform: translateY(0) scale(0.6); }
  50% { transform: translateY(-160px) scale(1.3) rotate(-10deg); }
  100% { opacity: 0; transform: translateY(-320px) scale(1) rotate(15deg); }
}

/* TikTok Feed */
.tiktok-feed { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.post-card { width: min(100%, 430px); background: #000; border: 1px solid var(--border-bright); border-radius: 22px; overflow: hidden; position: relative; }
.post-media-wrap { position: relative; width: 100%; aspect-ratio: 4 / 5; background: #0d111a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.post-media-wrap > video, .post-media-wrap > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.text-post-canvas {
  padding: 35px 24px 110px; width: 100%; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 1.2rem; font-weight: 600; background: linear-gradient(135deg, #1e1b4b, #312e81, #701a75);
}
.post-actions-right { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; max-height: calc(100% - 20px); overflow-y: auto; scrollbar-width: none; padding: 4px 3px; }
.post-actions-right::-webkit-scrollbar { display: none; }
.action-circle {
  background: transparent; border: 0;
  color: #fff; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.08rem; cursor: pointer;
}
.action-circle:hover { background: rgba(255,255,255,0.1); }
.action-circle.liked { color: var(--accent); }
.post-actions-right .action-circle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.post-actions-right .action-circle.liked svg { fill: currentColor; }
.action-count { font-size: 0.7rem; line-height: 1.1; text-align: center; margin-top: 2px; font-weight: 600; }
.post-overlay-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 66px 16px 16px; background: linear-gradient(to top, rgba(0,0,0,0.92), transparent); }
.post-author-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.clickable-user { cursor: pointer; }
.clickable-user:hover { text-decoration: underline; }

/* TikTok Profile Page with Cover Banner */
.tiktok-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.profile-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(10, 10, 15, 0.4);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.profile-top-center {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.profile-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-icon-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
.profile-cover-wrap {
  width: 100%;
  height: 175px;
  position: relative;
  background: linear-gradient(135deg, #09090b 0%, #1e1b4b 50%, #312e81 100%);
  overflow: hidden;
}
.profile-cover-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s;
}
.change-cover-badge {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  z-index: 5;
}
.change-cover-badge:hover {
  background: rgba(0,0,0,0.85);
  border-color: #00f2fe;
}
.profile-avatar-row {
  display: flex;
  justify-content: center;
  margin-top: -46px;
  position: relative;
  z-index: 6;
}
.profile-avatar-wrap { position: relative; display: inline-block; }
.profile-avatar-wrap .avatar-xl {
  width: 92px;
  height: 92px;
  font-size: 2.2rem;
  border: 3.5px solid #000;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}
.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #00f2fe;
  color: #000;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 2px solid #000;
  font-size: 0.85rem;
  font-weight: 800;
}
.profile-info-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 20px;
}
.profile-bio { max-width: 480px; color: #cbd5e1; font-size: 0.9rem; line-height: 1.4; margin: 6px 0 14px; }
.profile-stats { display: flex; gap: 32px; margin-bottom: 18px; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; }
.profile-stats strong { font-size: 1.15rem; font-weight: 700; color: #fff; }
.profile-stats span { font-size: 0.75rem; color: var(--muted); }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ========================================================
   PREMIUM TIKTOK & IOS SETTINGS & PRIVACY SHEET
======================================================== */
.settings-sheet-box {
  width: 100%;
  max-width: 520px;
  height: 92vh;
  max-height: 840px;
  background: #111218;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
  animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
#settingsSheetModal {
  padding: 0 !important;
}
@media (max-width: 600px) {
  #settingsSheetModal {
    padding: 0 !important;
  }
  .settings-sheet-box {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
}
@keyframes slideUpSheet {
  from { transform: translateY(45px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.settings-sheet-header {
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(17, 18, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  z-index: 10;
}
.settings-sheet-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.2px;
}
.settings-back-btn, .settings-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}
.settings-back-btn:hover, .settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.settings-sheet-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 96px;
  display: block;
}
.settings-sheet-content > * {
  flex-shrink: 0;
}

/* User Profile Mini-Card in Settings */
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}
.settings-profile-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}
.settings-profile-avatar {
  position: relative;
  flex-shrink: 0;
}
.settings-profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-profile-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-profile-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(254, 44, 85, 0.15);
  color: #fe2c55;
  border: 1px solid rgba(254, 44, 85, 0.25);
  flex-shrink: 0;
}
.settings-profile-handle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}
.settings-profile-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #00f2fe;
  flex-shrink: 0;
}

/* Group Sections */
.settings-group-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 18px 8px 8px;
}
.settings-group-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  margin-bottom: 6px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.settings-item-admin {
  background: rgba(254, 44, 85, 0.04);
}
.settings-item-admin:hover {
  background: rgba(254, 44, 85, 0.08);
}

/* Squircle Gradient Icons */
.settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.icon-admin { background: linear-gradient(135deg, #ff416c, #ff4b2b); }
.icon-profile { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.icon-security { background: linear-gradient(135deg, #10b981, #059669); }
.icon-account { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.icon-telegram { background: linear-gradient(135deg, #0088cc, #00b4d8); }
.icon-mode { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-theme { background: linear-gradient(135deg, #ec4899, #be185d); }
.icon-wallpaper { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.icon-sound { background: linear-gradient(135deg, #f97316, #ea580c); }
.icon-lang { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.icon-cache { background: linear-gradient(135deg, #64748b, #475569); }
.icon-lite { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.icon-class { background: linear-gradient(135deg, #eab308, #b45309); }
.icon-switch { background: linear-gradient(135deg, #475569, #334155); }
.icon-logout { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.settings-item-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.settings-item-label strong {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
}
.settings-item-label strong.text-admin {
  color: #ff4d6d;
}
.settings-value-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.3;
}
.settings-item-arrow {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
}
.settings-mode-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.2px;
}
.settings-item-logout:hover {
  background: rgba(239, 68, 68, 0.08);
}

.settings-footer-enterprise {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 0 8px;
  text-align: center;
}
.settings-version-brand {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
}
.settings-security-badge {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.28);
}

.theme-palette-dropdown {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-option {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.theme-option:hover, .theme-option.active {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.14);
  color: #00f2fe;
}
.tiktok-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.tiktok-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.18);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.tiktok-switch input:checked + .switch-slider {
  background-color: #00f2fe;
}
.tiktok-switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}
.settings-logout-btn {
  width: 100%;
  padding: 13px 16px;
  background: transparent;
  border: none;
  color: #f43f5e;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.settings-logout-btn:hover {
  background: rgba(244, 63, 94, 0.12);
}
.settings-footer-info {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  margin-top: 10px;
}

.personal-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.data-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }

.profile-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-post-tile {
  aspect-ratio: 3/4; background: #0f172a; border-radius: 12px; overflow: hidden;
  position: relative; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.grid-post-tile img, .grid-post-tile video { width: 100%; height: 100%; object-fit: cover; }
.grid-post-text { padding: 10px; font-size: 0.78rem; text-align: center; color: #e2e8f0; }
.grid-post-likes { position: absolute; bottom: 6px; left: 8px; font-size: 0.74rem; font-weight: 700; text-shadow: 0 1px 4px #000; }

/* Rich Direct Chat */
.chat-shell { display: grid; grid-template-columns: 310px 1fr; gap: 18px; height: calc(100vh - 120px); min-height: 540px; }
.chat-sidebar { display: flex; flex-direction: column; padding: 16px; margin-bottom: 0; overflow: hidden; }
.chat-sidebar-head { margin-bottom: 12px; }
.chat-contacts-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.contact-row { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.contact-row:hover { background: var(--surface-2); }
.contact-row.active { background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(99, 102, 241, 0.14)); border-color: rgba(244, 63, 94, 0.42); }
.contact-meta { flex: 1; min-width: 0; }
.contact-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.contact-name { font-size: 0.88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-preview { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-streak { font-size: 0.76rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgba(251, 146, 60, 0.14); color: var(--fire); }
.contact-streak.zero { background: rgba(148, 163, 184, 0.1); color: var(--muted); }
.leaderboard-mini { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); max-height: 140px; overflow-y: auto; }
.leaderboard-mini h4 { font-size: 0.82rem; color: var(--gold); margin-bottom: 6px; }
.lb-row { display: flex; justify-content: space-between; font-size: 0.76rem; padding: 3px 0; }

.chat-window { display: flex; flex-direction: column; padding: 0; margin-bottom: 0; overflow: hidden; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.chat-empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 12px; }
.chat-active { display: flex; flex-direction: column; height: 100%; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(11, 15, 25, 0.65); display: flex; justify-content: space-between; align-items: center; }
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-friend-name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mobile-back-btn { display: none; }
.streak-counter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: rgba(249, 115, 22, 0.2); border: 1px solid rgba(251, 146, 60, 0.5); font-weight: 700; color: #fdba74; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }

.msg-row { display: flex; flex-direction: column; max-width: 78%; }
.msg-row.me { align-self: flex-end; align-items: flex-end; }
.msg-row.them { align-self: flex-start; align-items: flex-start; }
.msg-bubble { padding: 10px 14px; border-radius: 18px; font-size: 0.9rem; line-height: 1.5; word-break: break-word; }
.msg-row.me .msg-bubble { background: linear-gradient(135deg, var(--accent), #db2777); color: #fff; border-bottom-right-radius: 5px; }
.msg-row.them .msg-bubble { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 5px; }
.msg-bubble.streak-ping { background: linear-gradient(135deg, #f97316, #ef4444) !important; font-weight: 700; }
.msg-media { max-width: 260px; max-height: 260px; border-radius: 12px; display: block; margin-top: 6px; }
.msg-file-card {
  display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.25);
  padding: 8px 12px; border-radius: 10px; margin-top: 6px; color: #fff; text-decoration: none; font-size: 0.84rem;
}
.msg-folder-box { background: rgba(0,0,0,0.25); padding: 10px; border-radius: 12px; margin-top: 6px; }
.msg-folder-title { font-weight: 700; margin-bottom: 6px; font-size: 0.86rem; }
.msg-time { font-size: 0.68rem; color: var(--muted); margin-top: 3px; }

.chat-composer { padding: 12px; border-top: 1px solid var(--border); background: rgba(11, 15, 25, 0.72); display: flex; align-items: center; gap: 8px; }
.icon-btn-round {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--border);
  background: var(--surface-2); display: grid; place-items: center; font-size: 1.05rem; cursor: pointer;
}

/* Class Info & Forms */
.class-hero { background: linear-gradient(135deg, #1e1b4b, #1d4ed8 65%, #312e81); border: 1px solid rgba(255,255,255,0.14); }
.motto-pill { display: inline-block; background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 99px; font-size: 0.8rem; margin-bottom: 10px; }
.teacher-pill { margin-top: 14px; display: inline-block; background: rgba(0,0,0,0.28); padding: 7px 14px; border-radius: 10px; font-size: 0.9rem; }
.ann-item { padding: 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; border-left: 3px solid var(--accent-2); }
.ann-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hierarchy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.member-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }

.form-group { margin-bottom: 12px; }
label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
input, textarea, select { width: 100%; padding: 10px 13px; border-radius: 11px; background: rgba(15, 20, 32, 0.85); border: 1px solid var(--border); color: var(--text); font-size: 0.9rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-user-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: 12px; margin-bottom: 10px; }
.admin-user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-user-actions select { width: auto; padding: 6px 10px; font-size: 0.82rem; }
.media-preview { margin-top: 10px; border-radius: 12px; overflow: hidden; max-height: 280px; }
.media-preview img, .media-preview video { width: 100%; max-height: 280px; object-fit: contain; background: #000; }

/* Modals & Toast */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.76); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.modal-box { width: 100%; max-width: 400px; margin: 0; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.close-btn { background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.comments-list { max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.comment-item { padding: 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.comment-input-row { display: flex; gap: 8px; }
.alert-box { background: rgba(244, 63, 94, 0.15); border: 1px solid var(--accent); padding: 12px; border-radius: 11px; margin-bottom: 14px; font-size: 0.88rem; }
.toast { position: fixed; bottom: 82px; right: 22px; z-index: 200; background: var(--surface-solid); border: 1px solid var(--accent); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 0.88rem; }

@media (max-width: 860px) {
  html, body { width: 100%; min-height: 100%; }
  body { min-height: 100dvh; }
  .app-shell {
    width: 100%; max-width: none; min-height: calc(100dvh - 70px);
    grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 0 calc(62px + env(safe-area-inset-bottom));
  }
  .main-stage { width: 100%; min-width: 0; min-height: calc(100dvh - 132px); padding: 12px; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 60; flex-direction: row; justify-content: space-around; background: rgba(7, 9, 15, 0.96); border-top: 1px solid var(--border); padding: 8px 4px; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 0.7rem; }
  .unread-pill { position: absolute; top: 2px; right: 4px; padding: 1px 5px; font-size: 0.65rem; }
  .admin-grid { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 155px); }
  .chat-shell.mobile-chat-open .chat-sidebar { display: none; }
  .chat-shell:not(.mobile-chat-open) .chat-window { display: none; }
  .mobile-back-btn { display: inline-flex; }
}

/* TikTok-style share sheet */
.share-modal { z-index: 130; padding: 0; place-items: center; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); }
.share-sheet { width: min(100%, 430px); padding: 0; overflow: hidden; color: #f4f4f5; background: #1c1c20; border: 1px solid rgba(255,255,255,.1); border-radius: 20px 20px 0 0; box-shadow: 0 16px 48px rgba(0,0,0,.65); }
.share-header { height: 52px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 12px; }
.share-header h3 { margin: 0; text-align: center; font-size: 1rem; font-weight: 700; color: #fff; }
.share-search, .share-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #eee; background: transparent; border: 0; cursor: pointer; }
.share-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.share-close { justify-self: end; font-size: 1.7rem; line-height: 1; }
.share-search-input { display: block; width: calc(100% - 32px); margin: 0 16px 12px; padding: 8px 14px; color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; font-size: 0.85rem; outline: none; }
.share-search-input:focus { border-color: #00f2fe; background: rgba(255,255,255,0.12); }
.share-contacts { display: flex; gap: 12px; min-height: 120px; padding: 6px 16px 16px; overflow-x: auto; scrollbar-width: none; }
.share-contacts::-webkit-scrollbar, .share-actions::-webkit-scrollbar { display: none; }
.share-contact { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px; color: #eee; background: transparent; border: 0; cursor: pointer; border-radius: 12px; transition: background 0.15s; }
.share-contact:hover { background: rgba(255,255,255,0.06); }
.share-contact > span:nth-of-type(1) { width: 72px; overflow: hidden; color: #eee; font-size: .72rem; font-weight: 600; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.share-sent-check { position: absolute; bottom: 0; right: 0; background: #10b981; color: #fff; font-size: 11px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #1c1c20; }
.share-sent-badge { font-size: 0.65rem; font-weight: 700; color: #10b981; background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.35); border-radius: 10px; padding: 2px 8px; line-height: 1.2; }
.share-send-btn-pill { font-size: 0.65rem; font-weight: 700; color: #00f2fe; background: rgba(0, 242, 254, 0.14); border: 1px solid rgba(0, 242, 254, 0.3); border-radius: 10px; padding: 2px 8px; line-height: 1.2; }
.share-contact:hover .share-send-btn-pill { background: #00f2fe; color: #000; }
.share-no-contacts { align-self: center; width: 100%; color: #aaa; font-size: .82rem; text-align: center; padding: 20px 0; }
.share-actions { display: flex; gap: 10px; padding: 18px 16px 16px; border-top: 1px solid rgba(255,255,255,.08); overflow-x: auto; scrollbar-width: none; }
.share-actions > button { flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; color: #eee; background: transparent; border: 0; cursor: pointer; }
.share-action-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; font-size: 1.5rem; font-weight: 700; transition: transform 0.15s; }
.share-actions > button:hover .share-action-icon { transform: scale(1.08); }
.share-actions b { font-size: .68rem; font-weight: 600; white-space: nowrap; }
.share-repost { background: #ffc20a; }
.share-copy { background: #2878ff; }
.share-telegram { background: #229ed9; }
.share-embed { background: #0a9eac; font-size: 1.1rem; }
.share-facebook { background: #0866ff; font-family: Arial,sans-serif; font-size: 2.2rem; }
@media (max-width: 860px) {
  .share-modal { place-items: end center; }
  .share-sheet { width: 100%; max-width: none; border-radius: 20px 20px 0 0; }
}

/* Shared Post Card inside Direct Chat */
.msg-shared-post-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  max-width: 250px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.msg-shared-post-box:hover {
  transform: translateY(-2px);
  border-color: #00f2fe;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.3);
}
.shared-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #00f2fe;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.shared-author {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.shared-card-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: #09090b;
  position: relative;
  margin-bottom: 6px;
}
.shared-card-thumb img, .shared-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
}
.shared-caption {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shared-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #00f2fe;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Post Pulse Glow Highlight */
.post-highlight {
  outline: 3px solid #00f2fe !important;
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.75) !important;
  animation: postPulse 2s ease-in-out;
}
@keyframes postPulse {
  0% { transform: scale(1.02); }
  50% { transform: scale(1.035); }
  100% { transform: scale(1); }
}


/* ================= TIKTOK STUDIO UPLOAD & PHONE PREVIEW ================= */
.studio-layout { display: grid; grid-template-columns: 1.45fr 310px; gap: 22px; align-items: start; }
.studio-head { margin-bottom: 16px; }
.studio-head h2 { font-size: 1.2rem; margin-bottom: 4px; }

.drop-zone {
  border: 2px dashed rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.05);
  border-radius: 16px; padding: 30px 20px; text-align: center;
  cursor: pointer; transition: all 0.2s; margin-bottom: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.drop-zone:hover, .drop-zone.dragover { background: rgba(244, 63, 94, 0.14); border-color: var(--accent); }
.drop-icon { font-size: 2.2rem; }

.selected-files-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.84rem;
}

.caption-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.caption-tools { display: flex; gap: 6px; }
.chip-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 4px 10px; border-radius: 99px; font-size: 0.76rem; cursor: pointer; font-weight: 600;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }

.mention-picker {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}

.studio-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 6px; }
.toggle-switch input { width: auto; accent-color: var(--accent); transform: scale(1.2); }
.studio-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Phone Frame Live Preview */
.phone-frame {
  width: 290px; height: 560px; margin: 0 auto;
  background: #000; border-radius: 36px; padding: 10px;
  border: 3px solid #2b3449; box-shadow: 0 20px 50px rgba(0,0,0,0.65);
  position: relative;
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 18px; background: #000; border-radius: 99px; z-index: 10;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  position: relative; background: #0e131f;
}
.phone-media-area { width: 100%; height: 100%; display: grid; place-items: center; }
.phone-media-area img, .phone-media-area video { width: 100%; height: 100%; object-fit: cover; }
.phone-placeholder { text-align: center; color: var(--muted); }
.phone-placeholder span { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.phone-right-icons {
  position: absolute; right: 10px; bottom: 86px; z-index: 5;
  display: flex; flex-direction: column; gap: 12px; text-align: center; font-size: 1.15rem;
}
.phone-right-icons small { display: block; font-size: 0.65rem; }
.phone-bottom-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 48px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); font-size: 0.8rem;
}
.phone-bottom-info p { margin-top: 4px; color: #e2e8f0; line-height: 1.4; word-break: break-word; }

/* ================= PHOTO SLIDE CAROUSEL IN FEED ================= */
.carousel-wrap { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.carousel-slide { width: 100%; height: 100%; object-fit: cover; display: none; }
.carousel-slide.active { display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2); color: #fff;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 64px; }
.carousel-counter {
  position: absolute; top: 14px; right: 14px; z-index: 6;
  background: rgba(0,0,0,0.65); padding: 3px 10px; border-radius: 99px; font-size: 0.74rem; font-weight: 700;
}
.private-tag {
  position: absolute; top: 14px; left: 14px; z-index: 6;
  background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border-bright);
  padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700;
}
.pin-tag {
  position: absolute; top: 50px; right: 14px; z-index: 6;
  background: rgba(127, 29, 29, 0.88); border: 1px solid rgba(251, 113, 133, 0.55);
  padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700;
}
.hashtag { color: #38bdf8; font-weight: 600; }
.mention { color: #fbbf24; font-weight: 600; }
.action-circle.saved { color: #fbbf24; border-color: #fbbf24; }
.action-circle.reposted { color: #10b981; border-color: #10b981; }

/* Profile Tabs */
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 14px; gap: 6px; }
.p-tab {
  flex: 1; background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.p-tab.active { color: #fff; border-bottom-color: var(--accent); }
.grid-lock-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 6px; font-size: 0.7rem; }

@media (max-width: 960px) {
  .studio-layout { grid-template-columns: 1fr; }
  .studio-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .tiktok-feed { gap: 16px; }
  .post-card { max-width: 430px; border-radius: 18px; }
  .post-actions-right { right: 5px; gap: 5px; }
  .action-circle { width: 36px; height: 36px; flex-basis: 36px; font-size: 0.98rem; }
  .action-count { font-size: 0.64rem; }
  .post-overlay-bottom { padding: 26px 54px 13px 12px; }
  .text-post-canvas { padding: 28px 18px 100px; font-size: 1.05rem; }
}

/* Desktop For You layout: tall centered media with a separate action rail. */
@media (min-width: 861px) {
  .topbar { min-height: 62px; height: 62px; padding: 8px 20px; }
  .app-shell {
    width: 100%; max-width: none; height: calc(100vh - 62px); min-height: 0;
    grid-template-columns: 218px minmax(0, 1fr); gap: 0; padding: 0;
  }
  .sidebar {
    position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto;
    padding: 14px 12px; border-right: 1px solid var(--border);
  }
  .main-stage { min-width: 0; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; }
  #tab-feed.tab-panel.active { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
  .stories-bar {
    height: 62px; min-height: 62px; flex: 0 0 62px; gap: 9px;
    margin: 0 12px 4px; padding: 5px 8px; overflow-x: auto;
  }
  .stories-scroll { gap: 8px; }
  .story-item { width: 58px; gap: 2px; }
  .story-ring, .story-ring.add-ring { width: 38px; height: 38px; }
  .story-ring .avatar { width: 32px; height: 32px; }
  .story-item span { max-width: 58px; font-size: 0.62rem; }
  #feedContainer {
    flex: 1; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden;
    overscroll-behavior-y: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
    justify-content: flex-start; gap: 16px; padding: 0 16px 16px;
  }
  .post-card {
    position: relative; display: flex; justify-content: center; align-items: stretch;
    width: 100%; height: min(calc(100vh - 132px), 760px); max-width: none;
    aspect-ratio: auto; flex: 0 0 auto; margin: 0;
    border: 0; border-radius: 0; overflow: visible; background: transparent;
  }
  .post-media-wrap {
    position: relative; width: auto; height: 100%; aspect-ratio: 9 / 16;
    border-radius: 12px; overflow: hidden; flex: 0 1 auto;
  }
  .post-media-wrap > video, .post-media-wrap > img { object-fit: cover; }
  .carousel-wrap { height: 100%; }
  .carousel-slide { object-fit: cover; }
  .text-post-canvas { height: 100%; min-height: 0; padding: 36px 24px 110px; }
  .post-actions-right {
    right: clamp(14px, 3vw, 48px); top: 50%; bottom: auto; transform: translateY(-50%);
    gap: 5px; max-height: calc(100% - 28px); overflow-y: auto;
  }
  .post-actions-right .action-circle {
    width: 46px; height: 38px; flex-basis: 38px; border: 0;
    background: transparent; backdrop-filter: none; font-size: 1.25rem;
  }
  .post-actions-right .action-circle svg { width: 21px; height: 21px; }
  .post-actions-right .action-circle:hover { background: rgba(255,255,255,0.1); }
  .post-actions-right .action-count { font-size: 0.67rem; margin-top: 1px; }
  .post-overlay-bottom { padding: 28px 18px 16px; }
}

/* TikTok-inspired mobile dock and comment sheet */
.comments-modal { padding: 16px; place-items: center; }
.comments-sheet {
  display: flex; flex-direction: column; width: min(100%, 560px); height: min(82vh, 780px);
  max-width: 560px; max-height: 90vh; padding: 0; overflow: hidden;
  color: #f5f5f5; background: #1c1c1e; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px;
}
.comments-header {
  min-height: 58px; flex: 0 0 58px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.comments-heading-group { display: flex; align-items: center; justify-content: center; gap: 8px; }
.comments-heading-group h3 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.comment-sort-btn, .comments-close-btn { color: #f5f5f5; background: transparent; border: 0; cursor: pointer; }
.comment-sort-btn { padding: 5px; font-size: 1rem; opacity: 0.75; }
.comment-sort-btn.active { color: #fff; opacity: 1; }
.comments-close-btn { justify-self: end; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); font-size: 1rem; }
.comments-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; margin: 0; padding: 5px 18px 14px; }
.comment-item {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 72px; align-items: start; gap: 12px;
  padding: 15px 0; margin: 0; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.035); background: transparent;
}
.comment-avatar .avatar { width: 42px; height: 42px; }
.comment-content { min-width: 0; }
.comment-author-line { display: flex; align-items: center; gap: 8px; margin: 1px 0 4px; }
.comment-author-line strong { font-size: 0.82rem; color: #bdbdbd; }
.comment-author-line small { color: #858585; font-size: 0.72rem; }
.comment-text { color: #f5f5f5; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.comment-meta-row { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.comment-reply-btn, .comment-delete-btn { padding: 0; color: #aaa; background: transparent; border: 0; font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.comment-delete-btn { color: #fda4af; }
.comment-reactions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-top: 24px; color: #a8a8a8; font-size: 0.68rem; }
.comment-reaction { width: 28px; height: 28px; color: #aaa; background: transparent; border: 0; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.comment-reaction.active { color: #f43f5e; }
.comment-reaction:last-child.active { color: #e5e7eb; }
.comment-media { display: block; width: min(100%, 230px); max-height: 260px; object-fit: cover; border-radius: 12px; margin-top: 9px; }
.comments-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #f5f5f5; }
.comments-empty span { font-size: 2rem; margin-bottom: 4px; }
.comments-empty small { color: #999; }
.comments-disabled-note { padding: 14px; text-align: center; color: #aaa; border-top: 1px solid rgba(255,255,255,0.08); }
.comment-input-row { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,0.12); background: #1c1c1e; }
.comment-composer-avatar { flex: 0 0 38px; }
.comment-composer-box { min-width: 0; flex: 1; padding: 0 8px 0 14px; border-radius: 24px; background: #303033; border: 1px solid rgba(255,255,255,0.04); }
.comment-composer-controls { min-height: 44px; display: flex; align-items: center; gap: 7px; }
.comment-composer-controls input { min-width: 0; flex: 1; padding: 8px 0; color: #fff; background: transparent; border: 0; font-size: 0.9rem; }
.comment-composer-controls input:focus { border: 0; outline: 0; }
.comment-tool-btn, .comment-send-btn { flex: 0 0 auto; display: inline-grid; place-items: center; width: 30px; height: 34px; padding: 0; margin: 0; color: #e8e8e8; background: transparent; border: 0; font-size: 1.28rem; cursor: pointer; }
.comment-tool-btn input { display: none; }
.comment-send-btn { width: 28px; color: #ff3b65; font-size: 1.1rem; }
.comment-attachment-preview { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px 0; color: #ddd; font-size: 0.75rem; }
.comment-attachment-preview button { color: #ddd; background: transparent; border: 0; cursor: pointer; }

@media (max-width: 860px) {
  body:has(#tab-feed.active) .topbar { display: none; }
  body:has(#tab-feed.active) .app-shell { height: calc(100dvh - 57px - env(safe-area-inset-bottom)); min-height: 0; padding: 0; overflow: hidden; }
  body:has(#tab-feed.active) .main-stage { min-width: 0; height: 100%; padding: 0; overflow: hidden; }
  body:has(#tab-feed.active) #tab-feed.tab-panel.active { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
  body:has(#tab-feed.active) .stories-bar {
    display: flex;
    position: relative;
    padding: 8px 10px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    z-index: 8;
    flex-shrink: 0;
  }
  body:has(#tab-feed.active) #feedContainer { flex: 1; min-height: 0; width: 100%; padding: 0; gap: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; scroll-snap-type: y mandatory; }
  body:has(#tab-feed.active) .post-card { width: 100%; height: 100%; min-height: 0; max-width: none; border-radius: 0; scroll-snap-align: start; scroll-snap-stop: always; }
  body:has(#tab-feed.active) .post-media-wrap { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  body:has(#tab-feed.active) .post-actions-right { right: 12px; gap: 2px; }
  body:has(#tab-feed.active) .post-actions-right .action-circle { width: 44px; height: 38px; flex-basis: 38px; }
  body:has(#tab-feed.active) .post-actions-right .action-count { font-size: 0.7rem; }
  .sidebar { gap: 0; justify-content: space-around; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); }
  .nav-item { flex: 1; min-width: 0; min-height: 52px; border: 0; border-radius: 12px; color: #d8d8d8; }
  .nav-item.active { color: #fe2c55; background: transparent; border: 0; }
  .nav-icon { font-size: 1.42rem; line-height: 1; }
  .nav-label { font-size: 0.62rem; line-height: 1.1; white-space: nowrap; }
  .nav-create .nav-icon { width: 48px; height: 31px; border-radius: 9px; color: #111; background: #fff; box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55; font-size: 1.28rem; }
  .nav-create .nav-label { display: none; }
  .unread-pill { top: 1px; right: calc(50% - 20px); z-index: 2; }
  .comments-modal { padding: 0; place-items: end center; }
  .comments-sheet { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 20px 20px 0 0; }
  .comment-item { grid-template-columns: 38px minmax(0, 1fr) 62px; gap: 9px; }
  .comment-avatar .avatar { width: 38px; height: 38px; }
  .comment-reactions { gap: 0; }
  .comment-reaction { width: 25px; }
}

/* Persistent dark and light appearance modes */
.theme-mode-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 12px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.theme-mode-toggle:hover { filter: brightness(1.08); }
.mobile-theme-toggle { display: none; }
#desktopThemeToggle { order: 3; }
.top-actions { order: 2; margin-left: auto; }
:root[data-color-mode="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --border: #e2e8f0;
  --border-bright: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --card-bg: #ffffff;
  --modal-bg: #ffffff;
}

:root[data-color-mode="light"] body {
  background: #f8fafc !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .ambient-glow {
  opacity: 0.05 !important;
}

:root[data-color-mode="light"] .topbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  backdrop-filter: blur(16px);
}

:root[data-color-mode="light"] .topbar h1,
:root[data-color-mode="light"] .brand-title,
:root[data-color-mode="light"] .brand-logo {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .sidebar {
  background-color: rgba(255, 255, 255, 0.94) !important;
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .nav-item {
  color: #475569 !important;
}

:root[data-color-mode="light"] .nav-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .nav-item.active {
  color: #fe2c55 !important;
  background: rgba(254, 44, 85, 0.08) !important;
  border-color: rgba(254, 44, 85, 0.22) !important;
}

:root[data-color-mode="light"] .user-chip {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .user-chip strong,
:root[data-color-mode="light"] .user-chip span {
  color: #0f172a !important;
}

/* Settings Sheet in Light Mode */
:root[data-color-mode="light"] .settings-sheet-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.15) !important;
}

:root[data-color-mode="light"] .settings-sheet-header {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .settings-sheet-header h3 {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-back-btn,
:root[data-color-mode="light"] .settings-close-btn {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-profile-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

:root[data-color-mode="light"] .settings-profile-name {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-profile-handle {
  color: #64748b !important;
}

:root[data-color-mode="light"] .settings-group-title {
  color: #64748b !important;
}

:root[data-color-mode="light"] .settings-group-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03) !important;
}

:root[data-color-mode="light"] .settings-item {
  border-bottom-color: #f1f5f9 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-item:hover {
  background: #f8fafc !important;
}

:root[data-color-mode="light"] .settings-item-label strong {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-value-sub {
  color: #64748b !important;
}

:root[data-color-mode="light"] .settings-item-arrow {
  color: #94a3b8 !important;
}

:root[data-color-mode="light"] .settings-mode-pill {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .settings-item-admin {
  background: rgba(254, 44, 85, 0.04) !important;
}

:root[data-color-mode="light"] .settings-version-brand {
  color: #64748b !important;
}

:root[data-color-mode="light"] .settings-security-badge {
  color: #94a3b8 !important;
}

:root[data-color-mode="light"] .theme-palette-dropdown {
  background: #f1f5f9 !important;
  border-top-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .theme-option {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .switch-slider {
  background-color: #cbd5e1 !important;
}

/* Modals & Popups in Light Mode */
:root[data-color-mode="light"] .modal-box,
:root[data-color-mode="light"] .tt-modal-card,
:root[data-color-mode="light"] .admin-panel-modal-box,
:root[data-color-mode="light"] .glass-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12) !important;
}

:root[data-color-mode="light"] .tt-modal-head,
:root[data-color-mode="light"] .modal-head {
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .modal-head h2,
:root[data-color-mode="light"] .modal-head h3,
:root[data-color-mode="light"] .tt-modal-head h3 {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .edit-field-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .edit-field-item label {
  color: #64748b !important;
}

:root[data-color-mode="light"] .edit-field-item input,
:root[data-color-mode="light"] .edit-field-item textarea {
  color: #0f172a !important;
}

:root[data-color-mode="light"] input,
:root[data-color-mode="light"] textarea,
:root[data-color-mode="light"] select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

:root[data-color-mode="light"] input::placeholder,
:root[data-color-mode="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

/* Chat Tab in Light Mode */
:root[data-color-mode="light"] .chat-shell,
:root[data-color-mode="light"] .chat-sidebar,
:root[data-color-mode="light"] .chat-main,
:root[data-color-mode="light"] .chat-messages-container,
:root[data-color-mode="light"] .chat-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-header strong,
:root[data-color-mode="light"] .chat-header h3 {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-item {
  border-bottom-color: #f1f5f9 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-item:hover,
:root[data-color-mode="light"] .chat-item.active {
  background: #f1f5f9 !important;
}

:root[data-color-mode="light"] .chat-item-name {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-item-preview,
:root[data-color-mode="light"] .chat-item-time {
  color: #64748b !important;
}

:root[data-color-mode="light"] .chat-bubble.other,
:root[data-color-mode="light"] .msg-item:not(.me) .chat-bubble,
:root[data-color-mode="light"] .chat-msg-in {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

:root[data-color-mode="light"] .chat-bubble.other .msg-text,
:root[data-color-mode="light"] .msg-item:not(.me) .chat-bubble span {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .chat-bubble.me,
:root[data-color-mode="light"] .msg-item.me .chat-bubble,
:root[data-color-mode="light"] .chat-msg-out {
  background: linear-gradient(135deg, #fe2c55, #ff0050) !important;
  color: #ffffff !important;
}

:root[data-color-mode="light"] .chat-input-bar,
:root[data-color-mode="light"] .chat-composer {
  background: #ffffff !important;
  border-top-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .chat-composer input,
:root[data-color-mode="light"] .chat-input {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Class Tab in Light Mode */
:root[data-color-mode="light"] .class-container,
:root[data-color-mode="light"] .class-hero-card,
:root[data-color-mode="light"] .announcement-card,
:root[data-color-mode="light"] .leaderboard-card,
:root[data-color-mode="light"] .role-card,
:root[data-color-mode="light"] .class-member-row,
:root[data-color-mode="light"] .schedule-card,
:root[data-color-mode="light"] .class-stats-pill {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

:root[data-color-mode="light"] .class-hero-card h2,
:root[data-color-mode="light"] .class-hero-card strong,
:root[data-color-mode="light"] .announcement-card h3,
:root[data-color-mode="light"] .announcement-card strong,
:root[data-color-mode="light"] .class-member-row strong {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .class-hero-card p,
:root[data-color-mode="light"] .announcement-card p,
:root[data-color-mode="light"] .class-member-row span {
  color: #64748b !important;
}

/* Profile Tab in Light Mode */
:root[data-color-mode="light"] .profile-card,
:root[data-color-mode="light"] .profile-header,
:root[data-color-mode="light"] .profile-body {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .profile-stats strong {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .profile-stats span {
  color: #64748b !important;
}

:root[data-color-mode="light"] .profile-name,
:root[data-color-mode="light"] .profile-fullname {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .profile-handle {
  color: #64748b !important;
}

:root[data-color-mode="light"] .profile-bio {
  color: #334155 !important;
}

:root[data-color-mode="light"] .profile-nav-tabs button {
  color: #64748b !important;
}

:root[data-color-mode="light"] .profile-nav-tabs button.active {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .data-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .data-box strong {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .data-box span {
  color: #64748b !important;
}

/* Comments & Share Sheet */
:root[data-color-mode="light"] .comments-sheet,
:root[data-color-mode="light"] .comment-input-row,
:root[data-color-mode="light"] .share-sheet {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .comments-header,
:root[data-color-mode="light"] .comment-item,
:root[data-color-mode="light"] .share-actions {
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .comments-header h3,
:root[data-color-mode="light"] .comment-text,
:root[data-color-mode="light"] .comment-author-line strong,
:root[data-color-mode="light"] .share-header h3 {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .comment-meta-row,
:root[data-color-mode="light"] .comment-reactions {
  color: #64748b !important;
}

:root[data-color-mode="light"] .comment-composer-box {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

:root[data-color-mode="light"] .comment-composer-controls input {
  color: #0f172a !important;
}

:root[data-color-mode="light"] .share-search,
:root[data-color-mode="light"] .share-close,
:root[data-color-mode="light"] .share-contact,
:root[data-color-mode="light"] .share-actions > button {
  color: #0f172a !important;
}

/* Bottom Navigation */
:root[data-color-mode="light"] .mobile-nav,
:root[data-color-mode="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid #e2e8f0 !important;
}

:root[data-color-mode="light"] .mobile-nav .nav-item,
:root[data-color-mode="light"] .bottom-nav .nav-item {
  color: #64748b !important;
}

:root[data-color-mode="light"] .mobile-nav .nav-item.active,
:root[data-color-mode="light"] .bottom-nav .nav-item.active {
  color: #fe2c55 !important;
}

:root[data-color-mode="light"] .tg-drawer-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-color-mode="light"] .tg-quick-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
@media (max-width: 860px) {
  body:has(#tab-feed.active) .mobile-theme-toggle { display: inline-flex; position: fixed; top: 12px; right: 12px; z-index: 55; }
}



/* ================= V23 SUPERCHARGED CHAT & GROUP FEATURES ================= */
.group-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
.group-section-head h4 {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-create-group {
  background: rgba(37, 244, 238, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-create-group:hover {
  background: var(--accent);
  color: #000;
}
.group-chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.group-chat-item:hover, .group-chat-item.active {
  background: rgba(255, 255, 255, 0.08);
}
.group-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

/* Seen ticks (✓ / ✓✓) */
.read-tick {
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 4px;
  letter-spacing: -1px;
}
.read-tick.sent {
  color: var(--muted);
}
.read-tick.seen {
  color: #25f4ee;
}

/* Emoji Reactions on Messages */
.msg-bubble-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.msg-bubble-container {
  position: relative;
  display: inline-flex;
  flex-direction: column;
}
.msg-reactions-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--card, #18181c);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 0.74rem;
  margin-top: -6px;
  z-index: 3;
  align-self: flex-end;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  cursor: pointer;
}
.message-row.received .msg-reactions-pill {
  align-self: flex-start;
}
.msg-react-picker-bar {
  display: flex;
  gap: 6px;
  background: var(--card, #18181c);
  border: 1px solid var(--border, rgba(255,255,255,0.15));
  padding: 5px 9px;
  border-radius: 99px;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  z-index: 10;
}
.msg-react-picker-bar button {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.1s;
}
.msg-react-picker-bar button:active {
  transform: scale(1.3);
}

/* Voice Message Player */
.voice-msg-bubble-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.voice-del-btn-separated {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
  user-select: none;
}
.voice-del-btn-separated:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}
.voice-del-btn-separated:active {
  transform: scale(0.92);
}

.voice-msg-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  max-width: 260px;
  padding: 4px 2px;
  user-select: none;
}
.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #111;
  border: none;
  font-size: 0.95rem;
  font-weight: bold;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.voice-play-btn:hover {
  transform: scale(1.08);
}
.voice-play-btn:active {
  transform: scale(0.92);
}
.voice-msg-player.playing .voice-play-btn {
  background: #fe2c55;
  color: #fff;
}
.voice-del-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  transition: all 0.18s ease;
}
.voice-del-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}
.voice-del-btn:active {
  transform: scale(0.92);
}
.voice-progress-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.voice-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.voice-waveform .vbar {
  width: 3px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}
.voice-msg-player.playing .voice-waveform .vbar {
  background: #25f4ee;
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}
.voice-waveform .vbar:nth-child(1) { height: 35%; }
.voice-waveform .vbar:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.voice-waveform .vbar:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.voice-waveform .vbar:nth-child(4) { height: 50%; animation-delay: 0.45s; }
.voice-waveform .vbar:nth-child(5) { height: 85%; animation-delay: 0.2s; }
.voice-waveform .vbar:nth-child(6) { height: 40%; animation-delay: 0.35s; }
.voice-waveform .vbar:nth-child(7) { height: 90%; animation-delay: 0.5s; }
.voice-waveform .vbar:nth-child(8) { height: 60%; animation-delay: 0.25s; }
.voice-waveform .vbar:nth-child(9) { height: 35%; }

@keyframes wavePulse {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

.voice-time-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}
.msg-row.them .voice-time-label {
  color: var(--muted);
}
.msg-row.them .voice-waveform .vbar {
  background: rgba(255, 255, 255, 0.25);
}
.msg-row.them .voice-msg-player.playing .voice-waveform .vbar {
  background: #25f4ee;
}
.msg-row.them .voice-play-btn {
  background: var(--surface-2, #24242c);
  color: var(--text, #fff);
  border: 1px solid var(--border);
}

/* Options Trigger (3 dots button beside bubble) */
.msg-opts-trigger {
  opacity: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
  user-select: none;
}
.msg-row:hover .msg-opts-trigger,
.msg-opts-trigger.active {
  opacity: 1;
}
.msg-opts-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
@media (max-width: 768px) {
  .msg-opts-trigger {
    opacity: 0.7;
  }
}

/* Location Card */
.location-card {
  display: block;
  background: rgba(37, 244, 238, 0.12);
  border: 1px solid #25f4ee;
  padding: 10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 0.84rem;
  margin-top: 5px;
}

/* Group Pinned Message Banner */
.chat-pinned-banner {
  background: rgba(254, 44, 85, 0.15);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  z-index: 10;
}

/* Group Seen Avatars */
.gp-seen-avatars {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  justify-content: flex-end;
}
.gp-seen-mini-av {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
  border: 1px solid #000;
}
.gp-seen-mini-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Generic Modals */
.tt-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 110;
}
.tt-modal-card {
  background: var(--card-bg, #18181c); border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 18px; width: 92%; max-width: 440px; max-height: 85vh; overflow-y: auto; padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.tt-modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}



/* ================= EDIT & DELETE MESSAGE STYLES ================= */
.msg-deleted {
  font-style: italic;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  padding: 2px 0;
}
.msg-edited-badge {
  font-size: 0.68rem;
  color: var(--accent, #25f4ee);
  margin-left: 5px;
  font-weight: 600;
  opacity: 0.85;
}
.msg-actions-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card-bg, #1c1c22);
  border: 1px solid var(--border, rgba(255,255,255,0.15));
  border-radius: 8px;
  padding: 3px 6px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 10;
}
.msg-act-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 0.76rem;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: background 0.15s;
}
.msg-act-btn:hover {
  background: rgba(255,255,255,0.1);
}
.msg-act-btn.del:hover {
  background: rgba(254, 44, 85, 0.2);
  color: #fe2c55;
}

.msg-actions-popup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0;
  z-index: 10;
  animation: fadeIn 0.15s ease-out;
}
.msg-row.me .msg-actions-popup {
  align-items: flex-end;
}
.msg-row.them .msg-actions-popup {
  align-items: flex-start;
}

.recording-pulse {
  animation: pulseRecording 1s infinite alternate !important;
}
@keyframes pulseRecording {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.7); }
  100% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(254, 44, 85, 0); }
}



/* ==========================================================================
   TIKTOK & TELEGRAM UI UPGRADES (MATCHING EXACT USER SCREENSHOTS)
   ========================================================================== */

/* 1. TIKTOK INBOX EXACT REPLICA (IMAGE MOCKUP SPEC) */
.chat-sidebar {
  width: 320px;
  background: #0d0e15;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  overflow-y: auto;
  scrollbar-width: none;
}
.chat-sidebar::-webkit-scrollbar {
  display: none;
}

/* Header Row: Inbox • on left, 📷 🔍 buttons on right */
.inbox-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.inbox-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-title-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.inbox-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
  display: inline-block;
}
.inbox-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1c1f2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.inbox-circle-btn:hover {
  background: #272c3d;
  transform: scale(1.06);
}

/* Permanent Search Box with Icon */
.inbox-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.inbox-search-icon {
  position: absolute;
  left: 14px;
  font-size: 0.92rem;
  opacity: 0.75;
  pointer-events: none;
}
.inbox-search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 999px;
  background: #151821;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.inbox-search-box input:focus {
  border-color: rgba(37, 244, 238, 0.6);
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.15);
}

/* Horizontal Dividers */
.inbox-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 12px 2px;
}

/* Activity Banner Card */
.inbox-activity-card {
  background: linear-gradient(135deg, rgba(80, 18, 35, 0.48), rgba(35, 12, 22, 0.48));
  border: 1px solid rgba(254, 44, 85, 0.32);
  border-radius: 15px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.inbox-activity-card:hover {
  background: linear-gradient(135deg, rgba(100, 22, 45, 0.6), rgba(45, 15, 28, 0.6));
  border-color: rgba(254, 44, 85, 0.55);
  transform: translateY(-1px);
}
.activity-lightning-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fe2c55;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fde047;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.4);
}
.activity-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-card-info strong {
  font-size: 0.92rem;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-card-info span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-card-arrow {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.45);
  margin-left: auto;
}

/* Sections: Groups & Streaks */
.inbox-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 8px;
}
.inbox-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
}
.inbox-section-title.streak-title {
  color: #f59e0b;
}
.btn-create-group-pill {
  background: transparent;
  border: 1.5px solid #00f2fe;
  color: #00f2fe;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-create-group-pill:hover {
  background: rgba(0, 242, 254, 0.15);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.chat-groups-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-leaderboard-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-head-tt {
  padding: 10px 14px 6px;
  background: transparent;
}
.inbox-topbar-exact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.inbox-nav-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: background 0.15s, transform 0.15s;
}
.inbox-nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.08);
}
.inbox-title-center {
  display: flex;
  align-items: center;
  gap: 7px;
}
.inbox-title-text {
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.inbox-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
  display: inline-block;
}
.inbox-search-wrap {
  padding: 4px 0 8px;
}
.inbox-search-wrap input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 20px;
  background: #1e1e24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}
.inbox-search-wrap input:focus {
  border-color: #25f4ee;
}

.inbox-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.inbox-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.active-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  display: inline-block;
}
.inbox-head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text, #fff);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: background 0.15s, transform 0.15s;
}
.inbox-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

/* Stories & Active Strip inside Inbox (Image 8) */
.inbox-stories-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px 14px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}
.inbox-stories-strip::-webkit-scrollbar {
  display: none;
}
.inbox-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  width: 62px;
}
.inbox-story-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #00f2fe, #fe2c55);
}
.inbox-story-avatar-wrap.has-no-story {
  background: rgba(255, 255, 255, 0.15);
}
.story-ring-blue {
  background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
}
.story-ring-cyan {
  background: linear-gradient(135deg, #00f2fe, #4facfe) !important;
}
.story-ring-red {
  background: linear-gradient(135deg, #fe2c55, #ff007f) !important;
  position: relative;
}
.story-ring-grey {
  background: rgba(255, 255, 255, 0.25) !important;
}
.story-red-dot-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fe2c55;
  border: 2px solid #0f0f13;
  box-shadow: 0 0 6px #fe2c55;
}
.inbox-system-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.inbox-red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fe2c55;
  box-shadow: 0 0 6px rgba(254, 44, 85, 0.8);
  margin-right: 6px;
  flex-shrink: 0;
}
.inbox-count-badge {
  background: #33333d;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  margin-right: 6px;
  flex-shrink: 0;
}
.inbox-story-av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #24242c;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  border: 2px solid #121216;
}
.inbox-story-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inbox-story-badge-plus {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: #00f2fe;
  color: #000;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 900;
  border: 2px solid #121216;
}
.inbox-thought-bubble {
  position: absolute;
  top: -24px;
  background: #2a2a32;
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.64rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
}
.inbox-thought-bubble::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #2a2a32 transparent;
}
.inbox-story-label {
  font-size: 0.7rem;
  color: var(--text, #eee);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Activity & New Followers Banner (Image 8) */
.inbox-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 6px 10px;
  background: rgba(254, 44, 85, 0.08);
  border: 1px solid rgba(254, 44, 85, 0.18);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.inbox-activity-row:hover {
  background: rgba(254, 44, 85, 0.15);
}
.activity-lightning-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fe2c55;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(254, 44, 85, 0.5);
}
.activity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-info strong {
  font-size: 0.85rem;
  color: #fff;
}
.activity-info span {
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-arrow {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Camera button on right of contact row (Image 8) */
.contact-camera-quick-btn {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--muted);
  padding: 6px;
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.contact-camera-quick-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 2. CHAT COMPOSER WITH SELECTED ATTACHMENTS (IMAGE 5) */
.chat-staged-attachments {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(24, 24, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.chat-staged-attachments::-webkit-scrollbar {
  display: none;
}
.staged-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #272730;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: #fff;
  flex-shrink: 0;
  max-width: 180px;
  position: relative;
}
.staged-chip-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: #333;
}
.staged-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.staged-chip-del {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 800;
  transition: background 0.15s;
}
.staged-chip-del:hover {
  background: #fe2c55;
}

.chat-composer-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #141418;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.chat-attach-wrap {
  position: relative;
}
.chat-plus-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.15s, background 0.15s;
}
.chat-plus-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}
.chat-attach-dropdown {
  position: absolute;
  bottom: 48px;
  left: 0;
  width: 210px;
  background: #1e1e26;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeIn 0.15s ease-out;
}
.chat-attach-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  width: 100%;
}
.chat-attach-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.chat-composer-v2 input[type="text"] {
  flex: 1;
  background: #22222a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.15s;
}
.chat-composer-v2 input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.chat-composer-v2 input[type="text"]:focus {
  border-color: #25f4ee;
}
.chat-voice-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  transition: transform 0.15s;
}
.chat-voice-btn:hover {
  transform: scale(1.15);
}
.chat-blue-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 1.25rem;
  font-weight: bold;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
  transition: transform 0.15s, background 0.15s;
  flex-shrink: 0;
}
.chat-blue-send-btn:hover {
  background: #1d4ed8;
  transform: scale(1.06);
}
.chat-blue-send-btn:active {
  transform: scale(0.92);
}

/* 3. TIKTOK STUDIO & CREATE POST ENHANCEMENTS (IMAGES 9, 10, 11) */
.studio-mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px 14px;
  overflow-x: auto;
}
.studio-mode-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}
.studio-mode-pill.active {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.studio-mode-pill.gallery-btn {
  background: rgba(254, 44, 85, 0.15);
  color: #fe2c55;
  border-color: rgba(254, 44, 85, 0.35);
}
.location-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Three-stage post composer for phones and desktop */
.studio-progress { max-width: 760px; margin: 0 auto 18px; padding: 0 8px; }
.studio-progress-line { height: 3px; margin: 0 28px -14px; overflow: hidden; border-radius: 99px; background: var(--border-bright); }
.studio-progress-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #25f4ee, #fe2c55); transition: width .2s ease; }
.studio-step-labels { position: relative; display: flex; justify-content: space-between; }
.studio-step-label { display: flex; align-items: center; gap: 7px; padding: 0 4px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.studio-step-label b { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border-bright); border-radius: 50%; background: var(--bg); }
.studio-step-label.active, .studio-step-label.complete { color: var(--text); }
.studio-step-label.active b, .studio-step-label.complete b { color: #fff; background: var(--accent); border-color: var(--accent); }
.studio-layout.studio-wizard-layout { grid-template-columns: minmax(0, 1fr); }
.studio-wizard-pane { display: none; min-width: 0; }
.studio-wizard-pane.active { display: block; animation: fadeSlide .2s ease; }
.studio-wizard-pane[data-studio-pane="3"].active { display: grid; grid-template-columns: minmax(0, 1fr) 310px; grid-template-areas: "review preview" "actions preview"; align-items: start; gap: 18px; }
.studio-wizard-pane[data-studio-pane="3"] > .studio-review { grid-area: review; }
.studio-wizard-pane[data-studio-pane="3"] > .studio-preview-col { grid-area: preview; width: 100%; }
.studio-wizard-pane[data-studio-pane="3"] > .studio-actions-v2 { grid-area: actions; flex-wrap: wrap; align-self: end; margin-top: 0; }
.studio-step-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.studio-step-actions .btn { min-height: 44px; }
.studio-review { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.studio-review-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; background: rgba(16,185,129,.18); color: #34d399; font-weight: 800; }
.studio-review h3 { margin: 0 0 5px; font-size: 1rem; }
.studio-review p { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.studio-review-sound { margin-top: 8px; color: #25f4ee; font-size: .8rem; }
.studio-audio-picker { margin: 12px 0 16px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.studio-audio-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.studio-audio-heading > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#8b5cf6,#fe2c55); font-size: 1.2rem; }
.studio-audio-heading strong, .studio-audio-heading small { display: block; }
.studio-audio-heading small, .studio-audio-url-label { color: var(--muted); font-size: .75rem; }
.studio-audio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.studio-audio-actions label { display: inline-flex; align-items: center; cursor: pointer; }
.studio-audio-url-label { display: block; margin-bottom: 6px; }
.studio-audio-picker input[type="url"] { width: 100%; min-width: 0; }
.studio-sound-preview { display: block; width: 100%; height: 36px; margin-top: 10px; }
.studio-phone-sound { display: block; width: 100%; height: 30px; margin-top: 7px; }
.post-soundtrack { display: block; width: min(230px, 100%); height: 34px; margin: 7px 0; }

@media (max-width: 700px) {
  .studio-progress { margin: 0 auto 12px; }
  .studio-step-label { gap: 5px; font-size: .68rem; }
  .studio-step-label b { width: 24px; height: 24px; }
  .studio-wizard-pane[data-studio-pane="3"].active { grid-template-columns: minmax(0,1fr); grid-template-areas: "review" "preview" "actions"; gap: 12px; }
  .studio-wizard-pane[data-studio-pane="3"] > .studio-preview-col { max-width: 320px; justify-self: center; }
  .studio-wizard-pane[data-studio-pane="3"] > .studio-actions-v2 { position: sticky; bottom: 0; z-index: 5; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); }
  .studio-step-actions .btn { flex: 1; padding-inline: 10px; }
  .studio-mode-bar { justify-content: flex-start; }
}

/* Full-screen, reference-led post flow: camera, gallery, post details */
#tab-create.tab-panel.active {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: block;
  width: 100vw;
  height: var(--tg-viewport-height, 100dvh);
  min-height: var(--tg-viewport-height, 100dvh);
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #000;
}
#tab-create .studio-progress,
#tab-create .studio-head { display: none !important; }
#tab-create #createGuestNotice { position: fixed; top: 8px; left: 50%; z-index: 125; width: min(92vw, 480px); transform: translateX(-50%); padding: 8px 12px; font-size: .76rem; }
#tab-create .studio-layout.studio-wizard-layout { display: block; width: 100%; height: 100%; margin: 0; padding: 0; }
#tab-create .studio-editor { width: 100%; height: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#tab-create #createPostForm { width: 100%; height: 100%; margin: 0; }
#tab-create .studio-wizard-pane { width: 100%; min-width: 0; height: 100%; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; color: #fff; background: #111; }
#tab-create .studio-wizard-pane.active { display: block; }
#tab-create .studio-wizard-pane[data-studio-pane="1"].active { position: relative; display: block; height: 100dvh; overflow: hidden; background: #000; }
.studio-camera-stage { position: absolute; inset: 0; overflow: hidden; background: #000; }
#studioCameraVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-camera-placeholder { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; color: rgba(255,255,255,.75); background: #000; text-align: center; }
.studio-camera-placeholder span { font-size: 1.1rem; }
.studio-camera-placeholder button { padding: 10px 16px; color: #fff; border: 1px solid #555; border-radius: 99px; background: #242426; }
.studio-camera-top { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.studio-camera-top > button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: #fff; border: 0; border-radius: 50%; background: rgba(30,30,30,.8); font-size: 1.7rem; cursor: pointer; }
.studio-camera-top strong { padding: 12px 18px; border-radius: 99px; background: rgba(32,32,32,.9); font-size: .94rem; }
.studio-camera-tools { position: absolute; top: 20%; right: max(16px, calc((100vw - 620px)/2)); z-index: 3; display: flex; flex-direction: column; gap: 15px; }
.studio-camera-tools button { width: 42px; height: 42px; padding: 0; color: #fff; border: 0; background: transparent; font-size: 1.5rem; cursor: pointer; }
#tab-create .studio-mode-bar { position: absolute; right: 0; bottom: calc(112px + env(safe-area-inset-bottom)); left: 0; z-index: 4; display: flex; justify-content: center; gap: 10px; padding: 8px; }
#tab-create .studio-mode-pill { padding: 6px 12px; color: #ddd; border: 0; background: transparent; font-size: .8rem; }
#tab-create .studio-mode-pill.active { color: #111; background: #fff; }
.studio-camera-bottom { position: absolute; right: 16px; bottom: max(22px, env(safe-area-inset-bottom)); left: 16px; z-index: 4; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; justify-items: center; }
.studio-gallery-shortcut, .studio-camera-create { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 0; color: #fff; border: 0; background: transparent; font-size: .72rem; cursor: pointer; }
#studioGalleryThumb { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid #ddd; border-radius: 9px; background: #27272a; font-size: 1.25rem; }
#studioGalleryThumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-shutter { width: 76px; height: 76px; border: 5px solid #fff; border-radius: 50%; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 4px #000; cursor: pointer; }
#tab-create #studioAudioPicker { position: absolute; top: max(72px, calc(env(safe-area-inset-top) + 64px)); left: 50%; z-index: 5; width: min(390px, calc(100vw - 32px)); max-height: 190px; overflow: auto; transform: translateX(-50%); padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(28,28,30,.96); }
#tab-create #studioAudioPicker .studio-audio-heading { margin: 0; }
#tab-create #studioAudioPicker .studio-sound-trigger { display: flex; align-items: center; gap: 8px; width: 100%; padding: 2px; color: #fff; border: 0; background: transparent; text-align: left; cursor: pointer; }
#tab-create #studioAudioPicker .studio-sound-trigger > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #303033; }
#tab-create #studioAudioPicker .studio-sound-trigger strong { font-size: .86rem; }
#tab-create #studioAudioPicker .studio-sound-trigger small { min-width: 0; margin-left: auto; overflow: hidden; color: #aaa; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
#tab-create #studioAudioPicker .studio-audio-actions,
#tab-create #studioAudioPicker .studio-audio-url-label,
#tab-create #studioAudioPicker #postSoundUrl,
#tab-create #studioAudioPicker .studio-sound-preview { display: none; }
#tab-create #studioAudioPicker.expanded .studio-audio-actions,
#tab-create #studioAudioPicker.expanded .studio-audio-url-label,
#tab-create #studioAudioPicker.expanded #postSoundUrl,
#tab-create #studioAudioPicker.expanded .studio-sound-preview { display: flex; }
#tab-create #studioAudioPicker .studio-audio-actions { gap: 6px; margin: 6px 0; }
#tab-create #studioAudioPicker .studio-audio-url-label { margin: 4px 0; }
#tab-create #studioAudioPicker .studio-sound-preview { margin-top: 5px; }
#tab-create .studio-wizard-pane[data-studio-pane="2"].active { display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 calc(86px + env(safe-area-inset-bottom)); background: #121214; }
.studio-gallery-header { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 60px; padding: 0 12px; text-align: center; }
.studio-gallery-header button, .studio-post-header button { color: #fff; border: 0; background: transparent; font-size: 1.45rem; cursor: pointer; }
.studio-gallery-header strong { justify-self: center; padding: 8px 18px; border-radius: 99px; background: #303033; font-size: .92rem; }
.studio-gallery-tabs { display: flex; justify-content: space-around; gap: 6px; border-bottom: 1px solid #2a2a2c; }
.studio-gallery-tabs button { min-height: 46px; padding: 0 12px; color: #aaa; border: 0; border-bottom: 2px solid transparent; background: transparent; font-weight: 650; }
.studio-gallery-tabs button.active { color: #fff; border-bottom-color: #fff; }
.studio-gallery-tabs button:disabled { color: #777; }
#tab-create .studio-wizard-pane[data-studio-pane="2"] .drop-zone { flex: 0 0 auto; margin: 7px 10px; padding: 5px; border: 0; border-radius: 8px; background: #202023; }
#tab-create .studio-wizard-pane[data-studio-pane="2"] .drop-zone > :not(input):not(button) { display: none; }
#tab-create .studio-wizard-pane[data-studio-pane="2"] .drop-zone > button { width: 100%; margin: 0 !important; padding: 8px; color: #ddd; border: 0; background: transparent; }
#tab-create .studio-wizard-pane[data-studio-pane="2"] .selected-files-bar { display: none !important; }
.studio-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 2px; flex: 1; min-height: 130px; overflow-y: auto; }
.studio-gallery-item { position: relative; aspect-ratio: 1; overflow: hidden; background: #252528; }
.studio-gallery-item > img, .studio-gallery-item > video { width: 100%; height: 100%; object-fit: cover; }
.studio-gallery-item > span { position: absolute; top: 7px; left: 7px; display: grid; place-items: center; width: 22px; height: 22px; color: #fff; border: 2px solid #fff; border-radius: 50%; background: #fe2c55; font-size: .7rem; font-weight: 800; }
.studio-gallery-item > button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; color: #fff; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); font-size: 1rem; }
.studio-gallery-footer { position: fixed; right: 0; bottom: 0; left: 0; z-index: 6; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #27272a; background: #121214; }
.studio-gallery-selected { min-height: 34px; padding: 3px 2px 8px; color: #aaa; font-size: .76rem; }
.studio-gallery-footer > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-gallery-footer button { min-height: 48px; color: #fff; border: 0; border-radius: 99px; background: #303033; font-weight: 700; }
.studio-gallery-footer .studio-gallery-next { color: #fff; background: #fe2c55; }
#tab-create .studio-wizard-pane[data-studio-pane="3"].active { display: block; padding: 0 0 calc(100px + env(safe-area-inset-bottom)); background: #111; }
.studio-post-header { position: sticky; top: 0; z-index: 8; display: grid; grid-template-columns: 48px 1fr 64px; align-items: center; min-height: 58px; padding: 0 12px; border-bottom: 1px solid #29292b; background: rgba(17,17,17,.96); text-align: center; }
.studio-post-header strong { font-size: .96rem; }
.studio-post-header button:last-child { justify-self: end; font-size: .82rem; }
.studio-cover-strip { display: flex; gap: 10px; width: min(100%, 760px); min-height: 112px; margin: 14px auto 10px; padding: 0 18px; }
.studio-cover-thumb, .studio-cover-add { position: relative; display: grid; place-items: center; width: 104px; min-height: 104px; overflow: hidden; border-radius: 12px; background: #29292b; }
.studio-cover-thumb img, .studio-cover-thumb video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.studio-cover-thumb > span { position: absolute; top: 6px; left: 7px; z-index: 1; color: #fff; font-size: .75rem; font-weight: 700; text-shadow: 0 1px 4px #000; }
.studio-cover-add { color: #fff; border: 0; font-size: 2rem; cursor: pointer; }
.studio-cover-add input { display: none; }
.studio-detail-section { width: min(100%, 760px); margin: 0 auto; padding: 0 18px; }
.studio-detail-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0; color: #f4f4f5; border: 0; border-bottom: 1px solid #2b2b2d; background: transparent; text-align: left; font-size: .94rem; font-weight: 650; cursor: pointer; }
.studio-detail-row > span:last-child { color: #888; font-size: 1.35rem; transition: transform .18s ease; }
.studio-detail-row.expanded > span:last-child { transform: rotate(90deg); }
.studio-detail-panel { display: grid; gap: 10px; padding: 12px 2px; color: #d4d4d8; font-size: .86rem; }
.studio-detail-panel label { display: flex; align-items: center; gap: 10px; margin: 0; color: #d4d4d8; font-size: .84rem; }
.studio-detail-panel input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #fe2c55; }
.studio-camera-grid { position: absolute; inset: 0; z-index: 1; display: none; pointer-events: none; background: linear-gradient(90deg,transparent 33%,rgba(255,255,255,.24) 33.2%,transparent 33.5%,transparent 66%,rgba(255,255,255,.24) 66.2%,transparent 66.5%),linear-gradient(0deg,transparent 33%,rgba(255,255,255,.24) 33.2%,transparent 33.5%,transparent 66%,rgba(255,255,255,.24) 66.2%,transparent 66.5%); }
.studio-camera-stage.grid-on .studio-camera-grid { display: block; }
.studio-camera-tools button.active { color: #fe2c55; }
.studio-camera-tools.collapsed button:not(:last-child) { display: none; }
.studio-recording-indicator { position: absolute; top: max(78px, calc(env(safe-area-inset-top) + 68px)); left: 50%; z-index: 4; padding: 6px 10px; transform: translateX(-50%); border-radius: 99px; color: #fff; background: rgba(190,20,40,.85); font-size: .75rem; font-weight: 800; }
.studio-shutter.video-mode { border-color: #fe2c55; box-shadow: inset 0 0 0 16px #fe2c55; }
.studio-shutter.recording { border-color: #fe2c55; background: #fe2c55; box-shadow: inset 0 0 0 19px #000; }
.studio-shutter.text-mode { border-radius: 18px; }
.studio-drafts-backdrop { position: fixed; inset: 0; z-index: 140; display: none; align-items: end; justify-content: center; padding: 14px; background: rgba(0,0,0,.72); }
.studio-drafts-backdrop.open { display: flex; }
.studio-drafts-sheet { width: min(100%, 520px); max-height: min(78dvh, 620px); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 20px 20px 14px 14px; color: #fff; background: #1b1b1e; box-shadow: 0 22px 70px rgba(0,0,0,.5); }
.studio-drafts-sheet > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #303033; font-size: 1rem; }
.studio-drafts-sheet > header button, .studio-draft-delete { width: 32px; height: 32px; color: #ddd; border: 0; border-radius: 50%; background: #303033; font-size: 1.2rem; }
#studioDraftsList { max-height: 48dvh; overflow-y: auto; padding: 8px 14px; }
.studio-draft-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #303033; }
.studio-draft-load { display: grid; flex: 1; gap: 4px; min-width: 0; padding: 4px; color: #fff; border: 0; background: transparent; text-align: left; }
.studio-draft-load strong, .studio-draft-load small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-draft-load small, .studio-drafts-empty { color: #aaa; font-size: .78rem; }
.studio-draft-delete { flex: 0 0 32px; cursor: pointer; }
.studio-drafts-sheet > footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #303033; }
.studio-drafts-sheet > footer button { min-height: 46px; color: #fff; border: 0; border-radius: 99px; background: #343438; font-weight: 700; }
.studio-drafts-sheet > footer .studio-drafts-close { background: #fe2c55; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] > .form-group,
#tab-create .studio-wizard-pane[data-studio-pane="3"] > .studio-settings-grid { width: min(100%, 760px); margin-right: auto; margin-left: auto; padding-right: 18px; padding-left: 18px; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] #postVisibility { padding: 10px 0; border: 0; border-radius: 0; border-bottom: 1px solid #2b2b2d; background: transparent; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .location-chips-row { padding: 2px 0 8px; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .loc-chip { min-height: 36px; color: #f4f4f5; border-color: #303033; background: #27272a; }
#tab-create #coverUploadBox { margin-top: 12px; }
#tab-create #coverUploadBox label { margin-bottom: 5px; }
#tab-create #coverUploadBox input { padding: 6px; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .studio-preview-col { display: none !important; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .studio-actions-v2 { position: fixed; right: 0; bottom: 0; left: 0; z-index: 9; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #29292b; background: #111; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .studio-actions-v2 > button:nth-child(2) { display: none; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .studio-actions-v2 > button { min-height: 48px; border-radius: 99px; }
#tab-create .studio-wizard-pane[data-studio-pane="3"] .btn-post-tt { grid-column: 2; }
@media (min-width: 800px) {
  .studio-camera-stage { inset: 0; }
  #studioCameraVideo { width: min(100%, 620px); height: 100%; left: 50%; transform: translateX(-50%); }
  .studio-camera-placeholder { right: max(0px, calc((100vw - 620px)/2)); left: max(0px, calc((100vw - 620px)/2)); }
  #tab-create #studioAudioPicker { top: 74px; }
  .studio-gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px 12px; }
  .studio-gallery-footer { right: 50%; left: 50%; width: min(100%, 760px); transform: translateX(-50%); }
  #tab-create .studio-wizard-pane[data-studio-pane="3"] > .form-group,
  #tab-create .studio-wizard-pane[data-studio-pane="3"] > .studio-settings-grid { width: min(100%, 760px); }
}
.loc-chip {
  background: #22222c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.loc-chip:hover, .loc-chip.active {
  background: rgba(37, 244, 238, 0.15);
  border-color: #25f4ee;
  color: #25f4ee;
}
.studio-actions-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.btn-post-tt {
  flex: 1;
  background: #fe2c55 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.98rem;
}

/* 4. TELEGRAM PROFILE VIEW (IMAGE 1) */
.tg-profile-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 12px 24px;
}
.tg-profile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.tg-top-back-btn, .tg-top-menu-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
}
.tg-top-back-btn:hover, .tg-top-menu-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.tg-top-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.tg-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0 18px;
  text-align: center;
}
.tg-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  margin-bottom: 12px;
}
.tg-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #3b82f6;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.2);
}
.tg-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tg-avatar-camera-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.75);
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  cursor: pointer;
}
.tg-profile-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
}
.tg-profile-status {
  font-size: 0.8rem;
  color: var(--muted);
}

/* 4 Circular Action Buttons (Image 1) */
.tg-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.tg-circle-action {
  background: #1c1c24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.tg-circle-action:hover {
  background: #252530;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.tg-circle-action:active {
  transform: translateY(0);
}
.tg-circle-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.tg-circle-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

/* Details Card (Image 1) */
.tg-details-card {
  background: #18181f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.tg-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tg-details-row:last-child {
  border-bottom: none;
}
.tg-details-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tg-details-content strong {
  font-size: 0.95rem;
  color: #fff;
  word-break: break-all;
}
.tg-details-sub {
  font-size: 0.72rem;
  color: var(--muted);
}
.tg-qr-icon-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 6px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s;
}
.tg-qr-icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.tg-owner-actions-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tg-owner-actions-row .btn {
  flex: 1;
}

/* Telegram Pill Tabs (Image 1) */
.tg-pill-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #14141a;
  border-radius: 99px;
  margin-bottom: 14px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tg-pill-tab {
  flex: 1;
  min-width: 60px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 99px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.tg-pill-tab.active {
  background: #252530;
  color: #fff;
}

/* 3x3 Media Grid (Image 1) */
.tg-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 14px;
  overflow: hidden;
}
.tg-media-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #1a1a22;
  overflow: hidden;
  cursor: pointer;
}
.tg-media-tile img, .tg-media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tg-video-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 5. PROFILE SIDE DRAWER (IMAGE 3) */
.profile-drawer-box {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: #121216;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.7);
  padding: 16px 0;
  overflow-y: auto;
  z-index: 120;
  animation: slideInRight 0.25s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-user-label {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.drawer-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.drawer-section-title {
  padding: 14px 18px 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.drawer-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.drawer-item-icon {
  font-size: 1.25rem;
  width: 24px;
  display: grid;
  place-items: center;
}
.drawer-item-label {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 500;
}
.drawer-arrow {
  color: var(--muted);
  font-size: 1.15rem;
}



/* 7. TIKTOK EDIT PROFILE SHEET (IMAGE 7) */
.edit-profile-sheet {
  position: fixed;
  inset: 0;
  background: #000;
  overflow-y: auto;
  z-index: 135;
}
@media (min-width: 600px) {
  .edit-profile-sheet {
    left: auto;
    width: 480px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
}
.edit-profile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.edit-back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}
.edit-save-top-btn {
  background: #fe2c55;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.edit-profile-content {
  padding: 16px;
}
.edit-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}
.edit-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 10px;
}
.edit-avatar-camera-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  cursor: pointer;
}
.change-photo-text-btn {
  font-size: 0.85rem;
  color: #25f4ee;
  font-weight: 600;
  cursor: pointer;
}
.edit-card {
  background: #18181f;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.edit-card-title {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  margin: 14px 6px 6px;
}
.edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.edit-row:last-child {
  border-bottom: none;
}
.edit-row-label {
  font-size: 0.88rem;
  color: #fff;
  min-width: 80px;
}
.edit-row-input, .edit-row-val {
  flex: 1;
  text-align: right;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}
.edit-row-textarea {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  text-align: right;
  resize: vertical;
  min-height: 48px;
  outline: none;
}
.edit-row-arrow {
  color: var(--muted);
  margin-left: 8px;
}
.edit-link-row {
  cursor: pointer;
}
.edit-profile-link {
  flex: 1;
  font-size: 0.8rem;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-copy-btn {
  background: none;
  border: none;
  color: #25f4ee;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
}

/* 8. CAMERA SNAP MODAL (IMAGE 9) */
.camera-snap-card {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 150;
}
.camera-snap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  z-index: 10;
}
.camera-snap-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.camera-sound-pill {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
}
.camera-top-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.camera-tool-icon {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}
.camera-snap-viewfinder {
  position: absolute;
  inset: 0;
  background: #0a0a0f;
  z-index: 1;
}
.camera-modes-strip {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.cam-mode {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.cam-mode.active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.camera-shutter-row {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 20px 30px;
}
.camera-shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.camera-shutter-btn:active {
  transform: scale(0.9);
}
.camera-gallery-tile, .camera-effects-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.camera-gallery-tile small, .camera-effects-tile small {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ================= CHAT WALLPAPER MODAL & PRESETS ================= */
.chat-bg-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.chat-bg-preset {
  cursor: pointer;
  border-radius: 12px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.chat-bg-preset:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.chat-bg-preset.active {
  border-color: var(--accent, #fe2c55);
  background: rgba(254, 44, 85, 0.12);
  box-shadow: 0 0 12px rgba(254, 44, 85, 0.35);
}
.chat-bg-preset .preset-preview {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.chat-bg-preset span {
  font-size: 0.75rem;
  color: var(--text-sub, #a1a1aa);
  text-align: center;
  white-space: nowrap;
}
.chat-bg-preset.active span {
  color: #fff;
  font-weight: 600;
}
.chat-wallpaper-btn {
  font-size: 0.78rem !important;
  padding: 5px 12px !important;
  border-radius: 99px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f4f4f5 !important;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-wallpaper-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: var(--accent, #fe2c55) !important;
}

/* ================= EDIT PROFILE ENHANCEMENTS (IMAGE 7) ================= */
.edit-profile-body {
  display: flex;
  flex-direction: column;
}
.edit-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.edit-avatar-preview-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}
.edit-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent, #fe2c55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #141418;
}
.change-photo-text {
  font-size: 0.82rem;
  color: #00f2fe;
  font-weight: 600;
  margin-top: 8px;
  cursor: pointer;
}
.ep-field-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
}

/* ================= FULLSCREEN MOBILE DRAWERS (IMAGES 1, 2, 3, 4, 6, 7) ================= */
.tt-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: flex-end;
}
.tt-drawer.hidden {
  display: none !important;
}
.tg-drawer-panel {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: #0f0f12;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0,0,0,0.8);
  animation: slideDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.tg-drawer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(15, 15, 18, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.tg-topbar-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.tg-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.15s;
}
.tg-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.tg-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
  text-align: center;
}
.tg-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 700;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  margin-bottom: 12px;
}
.tg-profile-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 4px;
}
.tg-profile-status {
  font-size: 0.8rem;
  color: var(--muted, #a1a1aa);
}
.tg-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}
.tg-action-card {
  background: #18181f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.tg-action-card:hover {
  background: #23232c;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.tg-action-icon {
  font-size: 1.3rem;
}
.tg-action-label {
  font-size: 0.72rem;
  color: var(--muted, #a1a1aa);
  font-weight: 600;
}
.tg-info-section {
  background: #141419;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  margin-bottom: 12px;
}
.tg-info-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.tg-info-item:last-child {
  border-bottom: none;
}
.tg-info-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4f4f5;
}
.tg-info-sub {
  font-size: 0.75rem;
  color: var(--muted, #a1a1aa);
  margin-top: 2px;
}
.tg-qr-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.tg-tabs-strip {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 16px;
  overflow-x: auto;
}
.tg-tab-btn {
  background: none;
  border: none;
  color: var(--muted, #a1a1aa);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 12px 4px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.tg-tab-btn.active {
  color: #fe2c55;
}
.tg-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #fe2c55;
  border-radius: 2px;
}
.tg-tab-content {
  flex: 1;
  padding: 12px 16px;
}
.tg-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.tg-media-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #1c1c24;
  position: relative;
}
.tg-media-thumb img, .tg-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Settings and Privacy Panel (Images 2, 4, 6) */
.settings-panel {
  max-width: 500px;
}
.settings-scroll-body {
  padding: 12px 16px 40px;
  overflow-y: auto;
}
.settings-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted, #a1a1aa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 4px 8px;
}
.settings-card-group {
  background: #141419;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.settings-row-icon {
  font-size: 1.15rem;
  width: 26px;
  margin-right: 12px;
}
.settings-row-label {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}
.settings-row-arrow {
  font-size: 1.1rem;
  color: var(--muted, #71717a);
}
.settings-row-badge {
  font-size: 0.8rem;
  color: var(--muted, #a1a1aa);
}
.settings-version-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted, #71717a);
  margin-top: 24px;
}

/* Edit Profile Drawer (Image 7) */
.edit-profile-panel {
  max-width: 480px;
}
.edit-profile-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 16px;
}
.edit-profile-av-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  cursor: pointer;
}
.edit-profile-av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #3b82f6;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,0.2);
}
.edit-profile-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-profile-cam-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.edit-profile-change-link {
  color: #00f2fe;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  cursor: pointer;
}
.edit-profile-fields-list {
  padding: 0 16px 40px;
}
.edit-field-item {
  background: #141419;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.edit-field-item label {
  font-size: 0.72rem;
  color: var(--muted, #a1a1aa);
  text-transform: uppercase;
}
.edit-field-item input, .edit-field-item textarea {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}
.edit-profile-link-preview {
  font-size: 0.75rem;
  color: var(--muted, #71717a);
  margin: -4px 0 12px 6px;
}
.edit-section-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #71717a);
  text-transform: uppercase;
  margin: 16px 4px 6px;
}

/* ========================================================
   ADMIN CONTROL PANEL STYLES
======================================================== */
.admin-panel-modal-box {
  width: 95%;
  max-width: 860px;
  max-height: 90vh;
  background: #11131c;
  border: 1px solid rgba(254, 44, 85, 0.4);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(254, 44, 85, 0.2);
}
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 22, 32, 0.85);
}
.admin-tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 24, 0.95);
  overflow-x: auto;
}
.admin-nav-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted, #94a3b8);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.admin-nav-tab.active {
  background: #fe2c55;
  color: #ffffff;
  border-color: #fe2c55;
  box-shadow: 0 0 12px rgba(254, 44, 85, 0.5);
}
.admin-panel-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.admin-card {
  background: rgba(24, 27, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}
.admin-label {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 5px;
  font-weight: 600;
}
.admin-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: #161822;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
}
.admin-input:focus {
  border-color: #25f4ee;
}
.admin-users-list, .admin-strikes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}
.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(18, 20, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.admin-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-diagnostics-box {
  background: #090a10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 350px;
  overflow-y: auto;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border, rgba(255,255,255,.12));
}
.btn-telegram-auth {
  border: 0;
  background: linear-gradient(135deg, #229ed9, #168acd);
  color: #fff;
  font-weight: 700;
}
.btn-telegram-auth:disabled {
  opacity: .62;
  cursor: not-allowed;
}
.security-status-row,
.security-sessions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.1));
  font-size: .88rem;
}
.security-status-row strong { color: #22c55e; }
.security-sessions-row { margin-top: 16px; }
.security-sessions-row div { display: grid; gap: 3px; }
.security-sessions-row small { color: var(--muted); font-size: .75rem; }

/* ========================================================
   LIGHT MODE OVERRIDES FOR DRAWERS, PANELS & CONTROLS
======================================================== */
:root[data-color-mode="light"] .tg-drawer-panel {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.1) !important;
}
:root[data-color-mode="light"] .tg-drawer-topbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-topbar-title {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-icon-btn {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-icon-btn:hover {
  background: #e2e8f0 !important;
}
:root[data-color-mode="light"] .tg-profile-title {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-action-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-action-card:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}
:root[data-color-mode="light"] .tg-info-section {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .tg-info-val {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .tg-info-sub {
  color: #64748b !important;
}
:root[data-color-mode="light"] .settings-card-group {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .settings-row {
  border-bottom-color: #f1f5f9 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .settings-row:hover {
  background: #f8fafc !important;
}
:root[data-color-mode="light"] .edit-field-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .edit-field-item label {
  color: #64748b !important;
}
:root[data-color-mode="light"] .edit-field-item input,
:root[data-color-mode="light"] .edit-field-item textarea {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .security-status-row,
:root[data-color-mode="light"] .security-sessions-row {
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .security-sessions-row strong {
  color: #0f172a !important;
}

/* ========================================================
   COMPLETE LIGHT MODE FOR PROFILE, INBOX, CHAT, CLASS & FEED
======================================================== */
:root[data-color-mode="light"] .tiktok-profile-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}
:root[data-color-mode="light"] .profile-avatar-wrap .avatar-xl {
  border-color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.14) !important;
}
:root[data-color-mode="light"] .avatar-edit-badge {
  border-color: #ffffff !important;
}
:root[data-color-mode="light"] .profile-bio {
  color: #475569 !important;
}
:root[data-color-mode="light"] .profile-stats strong {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .profile-stats span {
  color: #64748b !important;
}
:root[data-color-mode="light"] .grid-post-tile {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .grid-post-text {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .profile-tabs {
  border-bottom-color: #e2e8f0 !important;
}

/* Inbox & Chat in Light Mode */
:root[data-color-mode="light"] .chat-sidebar,
:root[data-color-mode="light"] .chat-window {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-title-text {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-circle-btn,
:root[data-color-mode="light"] .inbox-icon-btn {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-circle-btn:hover,
:root[data-color-mode="light"] .inbox-icon-btn:hover {
  background: #e2e8f0 !important;
}
:root[data-color-mode="light"] .inbox-nav-icon-btn {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-nav-icon-btn:hover {
  background: #f1f5f9 !important;
}
:root[data-color-mode="light"] .inbox-search-box input,
:root[data-color-mode="light"] .inbox-search-wrap input {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-divider {
  background: #e2e8f0 !important;
}
:root[data-color-mode="light"] .inbox-stories-strip {
  border-bottom-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .inbox-story-avatar-wrap.has-no-story {
  background: #cbd5e1 !important;
}
:root[data-color-mode="light"] .inbox-story-av {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
}
:root[data-color-mode="light"] .inbox-story-badge-plus {
  border-color: #ffffff !important;
}
:root[data-color-mode="light"] .inbox-story-label {
  color: #334155 !important;
}
:root[data-color-mode="light"] .inbox-thought-bubble {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1) !important;
}
:root[data-color-mode="light"] .inbox-thought-bubble::after {
  border-color: #ffffff transparent !important;
}
:root[data-color-mode="light"] .inbox-system-icon {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .inbox-activity-card,
:root[data-color-mode="light"] .inbox-activity-row {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6) !important;
  border-color: #fecdd3 !important;
}
:root[data-color-mode="light"] .activity-card-info strong,
:root[data-color-mode="light"] .activity-info strong {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .activity-card-info span,
:root[data-color-mode="light"] .activity-info span {
  color: #475569 !important;
}
:root[data-color-mode="light"] .contact-row:hover,
:root[data-color-mode="light"] .group-chat-item:hover {
  background: #f1f5f9 !important;
}
:root[data-color-mode="light"] .contact-row.active,
:root[data-color-mode="light"] .group-chat-item.active {
  background: rgba(254, 44, 85, 0.08) !important;
  border-color: rgba(254, 44, 85, 0.25) !important;
}
:root[data-color-mode="light"] .contact-name {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .contact-preview {
  color: #64748b !important;
}
:root[data-color-mode="light"] .chat-header,
:root[data-color-mode="light"] .chat-composer,
:root[data-color-mode="light"] .chat-composer-v2 {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .chat-plus-btn,
:root[data-color-mode="light"] .chat-voice-btn,
:root[data-color-mode="light"] .icon-btn-round {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .chat-attach-dropdown {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
}
:root[data-color-mode="light"] .chat-attach-menu-item {
  color: #0f172a !important;
}
:root[data-color-mode="light"] .chat-attach-menu-item:hover {
  background: #f1f5f9 !important;
}
:root[data-color-mode="light"] .chat-composer-v2 input[type="text"] {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .chat-composer-v2 input[type="text"]::placeholder {
  color: #94a3b8 !important;
}
:root[data-color-mode="light"] .msg-row.them .msg-bubble {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .msg-row.me .msg-bubble {
  background: linear-gradient(135deg, #fe2c55, #db2777) !important;
  color: #ffffff !important;
}
:root[data-color-mode="light"] .msg-file-card,
:root[data-color-mode="light"] .msg-folder-box {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .msg-reactions-pill,
:root[data-color-mode="light"] .msg-react-picker-bar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .chat-staged-attachments {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}

/* Stories Bar & Mobile Navigation Dock in Light Mode */
:root[data-color-mode="light"] .stories-bar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
:root[data-color-mode="light"] .story-item span,
:root[data-color-mode="light"] #myStoryLabel {
  color: #0f172a !important;
}
@media (max-width: 860px) {
  :root[data-color-mode="light"] body:has(#tab-feed.active) .stories-bar {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom-color: #e2e8f0 !important;
  }
  :root[data-color-mode="light"] .sidebar .nav-item {
    color: #64748b !important;
  }
  :root[data-color-mode="light"] .sidebar .nav-item.active {
    color: #fe2c55 !important;
    background: transparent !important;
  }
  :root[data-color-mode="light"] .nav-create .nav-icon {
    background: #0f172a !important;
    color: #ffffff !important;
  }
}

/* Class Tab & Toast in Light Mode */
:root[data-color-mode="light"] .ann-item,
:root[data-color-mode="light"] .member-tile,
:root[data-color-mode="light"] .admin-user-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
:root[data-color-mode="light"] .class-hero,
:root[data-color-mode="light"] .class-hero h2,
:root[data-color-mode="light"] .class-hero p,
:root[data-color-mode="light"] .class-hero span {
  color: #ffffff !important;
}
:root[data-color-mode="light"] .toast {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2) !important;
}



