@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --border: #e5e7eb;
  --border-soft: #eef1f6;

  --text: #111827;
  --text-secondary: #374151;
  --muted: #6b7280;
  --muted-light: #9ca3af;

  --pink-start: #f466a8;
  --pink-end: #fb7185;
  --pink-soft: #fdf2f8;
  --pink-border: #fbcfe8;
  --pink-text: #be185d;

  --indigo-soft: #eef2ff;
  --indigo: #4f46e5;
  --indigo-icon: #6366f1;

  --yellow-soft: #fefce8;
  --yellow-border: #fde68a;
  --yellow-icon-bg: #fef3c7;
  --yellow-text: #78350f;
  --amber: #b45309;

  --green: #16a34a;
  --red: #dc2626;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.08), 0 2px 8px rgba(17, 24, 39, 0.04);
  --shadow-card: 0 4px 16px rgba(17, 24, 39, 0.04);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8f6fc;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(244, 114, 182, 0.16) 0%, transparent 38%),
    radial-gradient(circle at 92% 14%, rgba(99, 102, 241, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 50% 88%, rgba(251, 191, 36, 0.13) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
  color: var(--text-secondary);
  background: transparent;
  text-decoration: none;
}

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

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.83rem;
  border-radius: 10px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(244, 102, 168, 0.32);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(244, 102, 168, 0.4);
}

.btn-admin-soft {
  background: var(--pink-soft);
  border: 1px solid var(--pink-border);
  color: var(--pink-text);
}

.btn-admin-soft:hover:not(:disabled) {
  background: #fce7f3;
  border-color: #f9a8d4;
}

.btn-secondary {
  background: var(--indigo-soft);
  border-color: #e0e7ff;
  color: var(--indigo);
}

.btn-secondary:hover:not(:disabled) {
  background: #e0e7ff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: #d1d5db;
  color: var(--text);
}

.btn-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
  color: #ffffff;
}

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  color: #ffffff;
}

.btn-danger-ghost {
  background: var(--surface);
  border-color: #fecaca;
  color: #dc2626;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: #fef2f2;
}

.icon-btn {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  color: var(--text);
  background: #f3f4f6;
}

/* ---------- Auth & Pending Shell ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: 32px 28px 26px;
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
  display: grid;
  place-items: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(244, 102, 168, 0.28);
}

.brand-logo.sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.brand-logo.admin-accent {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

.brand-heading-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
}

.hub-badge {
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.fpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.fpill svg {
  color: var(--indigo-icon);
  flex-shrink: 0;
}

.gate-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--yellow-soft);
  border: 1px solid var(--yellow-border);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 22px;
}

.gate-notice-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--yellow-icon-bg);
  color: var(--amber);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.gate-notice-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--yellow-text);
  margin-bottom: 3px;
}

.gate-notice-text {
  font-size: 0.81rem;
  line-height: 1.45;
  color: #854d0e;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-leading-icon {
  position: absolute;
  left: 13px;
  color: var(--muted-light);
  display: flex;
  pointer-events: none;
}

.input-icon-wrap input {
  padding-left: 38px !important;
}

.field input,
.field textarea,
.select-input,
.topbar-search input {
  width: 100%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-light);
}

.field input:focus,
.field textarea:focus,
.select-input:focus,
.topbar-search input:focus {
  background: var(--surface);
  border-color: var(--pink-start);
  box-shadow: 0 0 0 3px rgba(244, 102, 168, 0.14);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted-light);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted-light);
}

.auth-footer span {
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Pending Status Card ---------- */
.status-card {
  text-align: center;
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 700;
}

.status-icon.pending {
  background: var(--yellow-soft);
  border: 1px solid var(--yellow-border);
  color: var(--amber);
}

.status-icon.denied {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #fde68a;
  border-top-color: var(--pink-start);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.identity-pill-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  margin: 18px 0;
  text-align: left;
}

.identity-pill-box .meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.identity-pill-box strong {
  font-size: 0.86rem;
  word-break: break-word;
}

.status-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.topbar-search {
  flex: 1;
  max-width: 320px;
}

.topbar-search input {
  padding: 8px 13px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.avatar-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
  display: inline-grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 5px 11px;
  border-radius: 999px;
}

/* ---------- Main Feed Layout ---------- */
.main-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 16px 64px;
}

.main-container.wide {
  max-width: 1080px;
}

/* ---------- Stories Strip ---------- */
.stories-bar {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 15px 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  max-width: 76px;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: inherit;
}

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--pink-start), var(--indigo-icon));
  display: grid;
  place-items: center;
  transition: transform 0.16s ease;
}

.story-item:hover .story-ring {
  transform: scale(1.05);
}

.story-ring.add-ring {
  background: linear-gradient(135deg, #fbcfe8, #c7d2fe);
}

.story-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--pink-soft);
  border: 2.5px solid #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--pink-text);
  overflow: hidden;
}

.story-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

/* ---------- Quick Post Card ---------- */
.quick-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.quick-post-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quick-post-prompt {
  flex: 1;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.quick-post-prompt:hover {
  border-color: var(--pink-border);
  background: var(--pink-soft);
  color: var(--text);
}

.quick-post-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.qp-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.qp-btn:hover {
  background: var(--surface-muted);
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.qp-btn.qp-pic:hover { background: var(--pink-soft); border-color: var(--pink-border); color: var(--pink-text); }
.qp-btn.qp-vlog:hover { background: var(--indigo-soft); border-color: #c7d2fe; color: var(--indigo); }
.qp-btn.qp-blog:hover { background: var(--yellow-soft); border-color: var(--yellow-border); color: var(--yellow-text); }
.qp-btn.qp-story:hover { background: var(--pink-soft); border-color: var(--pink-border); color: var(--pink-text); }

/* ---------- Story Viewer Modal ---------- */
.story-viewer-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  height: 78vh;
  max-height: 690px;
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.story-viewer-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.story-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  text-align: center;
}

.story-viewer-body img,
.story-viewer-body video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111827;
}

.story-text-content {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  word-break: break-word;
  z-index: 2;
}

.story-viewer-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: 0.94rem;
  text-align: center;
}

/* ---------- Texting / Messages View ---------- */
.chat-shell {
  display: grid;
  grid-template-columns: 265px 1fr;
  gap: 16px;
  min-height: 72vh;
}

.chat-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.chat-sidebar-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface-muted);
}

.chat-peer-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-peer-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
  font-family: inherit;
  width: 100%;
}

.chat-peer-item:hover {
  background: var(--surface-muted);
}

.chat-peer-item.active {
  background: var(--pink-soft);
  border-left: 3px solid var(--pink-start);
}

.chat-peer-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.chat-peer-preview {
  font-size: 0.77rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.chat-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 520px;
  max-height: 76vh;
}

.chat-main-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafbfe;
}

.msg-bubble {
  max-width: 76%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.91rem;
  line-height: 1.45;
  word-break: break-word;
}

.msg-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-bubble.theirs {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-meta {
  font-size: 0.7rem;
  opacity: 0.78;
  margin-bottom: 3px;
  font-weight: 600;
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.chat-input-bar input {
  flex: 1;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.91rem;
  color: var(--text);
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--pink-start);
  background: var(--surface);
}

/* ---------- Feed Controls ---------- */
.feed-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  color: #ffffff;
}

.count-pill {
  background: var(--yellow-icon-bg);
  color: var(--yellow-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.select-input {
  width: auto;
  min-width: 155px;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--surface);
}

/* ---------- Profile Banner ---------- */
.profile-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.back-feed-btn {
  margin-bottom: 12px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 180px;
}

.profile-info h2 {
  margin: 0 0 4px;
}

.profile-info p {
  margin: 0;
}

.profile-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
  min-width: 68px;
}

.stat-box strong {
  display: block;
  font-size: 1.15rem;
  color: var(--text);
}

.stat-box span {
  font-size: 0.74rem;
  color: var(--muted);
}

/* ---------- Post Cards ---------- */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 12px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.post-author-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
}

.post-author-name:hover {
  color: var(--pink-text);
}

.post-meta {
  font-size: 0.77rem;
  color: var(--muted);
}

.post-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.type-badge.pic { background: var(--pink-soft); color: var(--pink-text); }
.type-badge.vlog { background: var(--indigo-soft); color: var(--indigo); }
.type-badge.blog { background: var(--yellow-soft); color: var(--yellow-text); }

.post-body {
  padding: 0 18px 14px;
}

.post-title {
  margin: 0 0 6px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.post-text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-media {
  margin: 0 16px 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
  display: flex;
  justify-content: center;
}

.post-media img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  cursor: zoom-in;
  display: block;
}

.post-media video {
  width: 100%;
  max-height: 520px;
  display: block;
  background: #000;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--border-soft);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: var(--pink-soft);
  border-color: var(--pink-border);
  color: var(--pink-text);
}

.action-btn.liked {
  color: #ffffff;
  border-color: var(--pink-start);
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
}

/* ---------- Comments ---------- */
.comments-box {
  background: var(--surface-muted);
  border-top: 1px solid var(--border-soft);
  padding: 14px 18px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.comment-author {
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.comment-author:hover {
  color: var(--pink-text);
}

.comment-body {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

.comment-form input:focus {
  border-color: var(--pink-start);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 46px 24px;
  background: var(--surface);
  border: 1px dashed #d1d5db;
  border-radius: var(--radius);
  color: var(--muted);
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
}

/* ---------- Admin Dashboard ---------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.admin-stat-card.accent-amber { border-top: 3px solid #f59e0b; }
.admin-stat-card.accent-green { border-top: 3px solid #16a34a; }
.admin-stat-card.accent-indigo { border-top: 3px solid #6366f1; }
.admin-stat-card.accent-pink { border-top: 3px solid #f466a8; }

.admin-stat-card .stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-stat-card strong {
  font-size: 1.65rem;
  color: var(--text);
}

.admin-tabs {
  margin-bottom: 16px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.admin-row-card.pending-highlight {
  border-color: var(--yellow-border);
  background: linear-gradient(90deg, var(--yellow-soft), #ffffff 45%);
}

.admin-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-row-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-row-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
}

.status-pill.pending { background: var(--yellow-icon-bg); color: var(--yellow-text); }
.status-pill.approved { background: #dcfce7; color: #166534; }
.status-pill.denied,
.status-pill.revoked,
.status-pill.banned { background: #fee2e2; color: #b91c1c; }
.status-pill.logged_out { background: #f3f4f6; color: #4b5563; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(6px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-card.modal-sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.12rem;
  color: var(--text);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.composer-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.type-pill {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 9px;
  border-radius: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.type-pill.active {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  border-color: transparent;
  color: #ffffff;
}

.file-dropzone {
  display: block;
  border: 1.5px dashed #d1d5db;
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  background: var(--surface-muted);
  transition: all 0.15s ease;
  font-size: 0.86rem;
}

.file-dropzone:hover {
  border-color: var(--pink-start);
  background: var(--pink-soft);
  color: var(--text);
}

.file-dropzone input {
  display: none;
}

.media-preview {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111827;
}

.media-preview img,
.media-preview video {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.14s ease;
}

.swatch.active {
  border-color: var(--text);
  transform: scale(1.12);
}

/* ---------- Lightbox ---------- */
.lightbox-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox-wrap img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pink-start);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  max-width: 340px;
  animation: slideIn 0.2s ease;
}

.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Gamified 3-Column Campus Hub ---------- */
.main-container.hub-wide {
  max-width: 1240px;
}

.hub-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.hub-left,
.hub-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 74px;
}

.hub-center {
  min-width: 0;
}

.gamify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.xp-hero-card {
  background: linear-gradient(160deg, #ffffff 0%, #fdf2f8 65%, #eef2ff 100%);
  border-color: var(--pink-border);
}

.xp-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(90deg, var(--pink-soft), var(--indigo-soft));
  border: 1px solid var(--pink-border);
  border-radius: 999px;
  padding: 4px 11px 4px 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pink-text);
}

.xp-lv-dot {
  background: linear-gradient(135deg, var(--pink-start), var(--indigo));
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.xp-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.xp-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--pink-start), var(--indigo));
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(244, 102, 168, 0.3);
  flex-shrink: 0;
}

.xp-student-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text);
}

.xp-title-pill {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.xp-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.xp-progress-track {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.xp-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end), var(--indigo-icon));
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-heading {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--text-secondary);
}

.badge-empty {
  font-size: 0.76rem;
  color: var(--muted);
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.quest-chip {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--indigo-soft);
  color: var(--indigo);
  padding: 2px 8px;
  border-radius: 999px;
}

.live-dot-mini {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 999px;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.quest-item:hover {
  border-color: var(--pink-border);
  background: var(--pink-soft);
}

.quest-item.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.quest-xp {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pink-text);
  white-space: nowrap;
}

.quest-item.done .quest-xp {
  color: #15803d;
}

/* ---------- Live Campus Poll Widget ---------- */
.poll-card {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #fefce8 60%, #fdf2f8 100%);
  border-color: var(--yellow-border);
}

.poll-question {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-opt-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.poll-opt-btn:hover {
  border-color: var(--pink-start);
  transform: translateY(-1px);
}

.poll-opt-btn.voted {
  border-color: var(--pink-start);
  box-shadow: 0 0 0 2px rgba(244, 102, 168, 0.18);
}

.poll-opt-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(244, 102, 168, 0.2), rgba(99, 102, 241, 0.18));
  transition: width 0.45s ease;
  pointer-events: none;
}

.poll-opt-label,
.poll-opt-pct {
  position: relative;
  z-index: 1;
}

.poll-opt-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pink-text);
}

.quick-post-actions.five-col {
  grid-template-columns: repeat(5, 1fr);
}

/* ---------- Multi-Emoji Reactions ---------- */
.reaction-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rx-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
}

.rx-btn:hover {
  transform: scale(1.07);
  background: var(--pink-soft);
  border-color: var(--pink-border);
}

.rx-btn.active {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  border-color: transparent;
  color: #ffffff;
}

.author-lv-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-soft);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
}

/* ---------- Leaderboard & Class Battle ---------- */
.lb-list,
.class-battle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: background 0.14s ease;
}

.lb-row:hover {
  background: var(--pink-soft);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.lb-rank {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 800;
  background: #e5e7eb;
  color: var(--text);
  flex-shrink: 0;
}

.lb-rank.r1 { background: #fef08a; color: #854d0e; }
.lb-rank.r2 { background: #e2e8f0; color: #334155; }
.lb-rank.r3 { background: #fed7aa; color: #9a3412; }

.lb-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.lb-xp {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pink-text);
  white-space: nowrap;
}

.cb-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cb-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.cb-track {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.cb-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo-icon), var(--pink-start));
}

/* ---------- Floating +XP Celebration ---------- */
.xp-pop-layer {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 95;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xp-pop-pill {
  background: linear-gradient(90deg, var(--pink-start), var(--indigo));
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
  animation: xpFloat 2.1s ease forwards;
}

@keyframes xpFloat {
  0% { opacity: 0; transform: translateY(14px) scale(0.9); }
  15% { opacity: 1; transform: translateY(0) scale(1.04); }
  80% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { opacity: 0; transform: translateY(-24px) scale(0.96); }
}

/* ---------- Campus Notice Board ---------- */
.notice-board-card {
  background: linear-gradient(135deg, #ffffff 0%, #fefce8 60%, #fdf2f8 100%);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.notice-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.notice-board-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-board-title-row h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.notice-official-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--yellow-icon-bg);
  color: var(--yellow-text);
  padding: 3px 9px;
  border-radius: 999px;
}

.notice-board-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--indigo-icon);
  border-radius: 12px;
  padding: 12px 14px;
}

.notice-item.important {
  border-left-color: #f59e0b;
}

.notice-item.urgent {
  border-left-color: #ef4444;
  background: #fffbfb;
}

.notice-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.notice-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.notice-item-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.notice-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.notice-tag.info { background: var(--indigo-soft); color: var(--indigo); }
.notice-tag.important { background: var(--yellow-icon-bg); color: var(--yellow-text); }
.notice-tag.urgent { background: #fee2e2; color: #b91c1c; }

.avatar-chip img,
.post-avatar img,
.avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-chip,
.post-avatar,
.avatar-lg {
  overflow: hidden;
}

.profile-bio {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.edit-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.cooldown-hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

.cooldown-hint.locked {
  color: var(--amber);
  font-weight: 600;
}

/* ---------- Facebook-Style Topbar & Feed ---------- */
.fb-topbar-inner {
  max-width: 1180px;
}

.fb-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-nav-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-nav-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fb-nav-tab:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.fb-nav-tab.active {
  color: var(--pink-text);
  border-bottom-color: var(--pink-start);
}

.fb-container {
  max-width: 720px;
}

/* Facebook-style Create Post Box */
.fb-composer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.fb-composer-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.fb-composer-input {
  flex: 1;
  background: #f0f2f5;
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-composer-input:hover {
  background: #e4e6eb;
  color: var(--text);
}

.fb-composer-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 12px 0 8px;
}

.fb-composer-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.fb-action-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.fb-action-btn:hover {
  background: #f0f2f5;
  color: var(--text);
}

/* Facebook-style Tall Story Cards */
.fb-stories-wrap,
.flashes-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.fb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.fb-section-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.fb-stories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.fb-story-card {
  position: relative;
  width: 112px;
  height: 174px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #1f2937;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.fb-story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.fb-story-card.close-friends {
  border: 3px solid #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.fb-story-card.create-card {
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1.5px dashed #cbd5e1;
}

.fb-story-create-top {
  flex: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink-soft), var(--indigo-soft));
  font-size: 1.6rem;
  color: var(--pink-text);
}

.fb-story-create-bottom {
  padding: 10px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
}

.fb-story-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-story-text-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.fb-story-avatar-ring {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--pink-start);
  background: var(--pink-soft);
  color: var(--pink-text);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 2;
}

.fb-story-card.close-friends .fb-story-avatar-ring {
  border-color: #22c55e;
}

.fb-story-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-story-cf-star {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  z-index: 2;
}

.fb-story-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* Flashes Strip (Instant Snaps & Quick Status Bubbles) */
.flashes-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.flash-chip {
  min-width: 150px;
  max-width: 185px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
  position: relative;
}

.flash-chip.close-friends {
  border: 1.5px solid #22c55e;
  background: #f0fdf4;
}

.flash-chip-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.flash-chip-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flash-chip-img {
  width: 100%;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}

.flash-chip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
  word-break: break-word;
}

/* Audience Toggle & Close Friends */
.audience-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aud-btn {
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  font-family: inherit;
  cursor: pointer;
}

.aud-btn.active {
  background: var(--indigo-soft);
  border-color: var(--indigo);
  color: var(--indigo);
}

.aud-btn.cf.active {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}

.cf-viewer-badge {
  background: #22c55e;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.cf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.cf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

/* Live Camera Stage */
.camera-stage {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #111827;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.camera-stage video,
.camera-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fb-icon-tab {
  width: 46px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  border-bottom: none;
}

.fb-icon-tab.active {
  background: var(--pink-soft);
  color: var(--pink-text);
}

.notice-class-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-text);
  border: 1px solid var(--pink-border);
}

.class-group-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.class-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.class-group-title {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-group-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
}

/* ---------- 2-Column Feed + Compact Right Flashes Sidebar ---------- */
.main-container.fb-two-col-container {
  max-width: 1040px;
}

.feed-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
}

.feed-main-col {
  min-width: 0;
}

.flashes-sidebar {
  position: sticky;
  top: 74px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compact-flashes {
  padding: 10px 11px;
  margin-bottom: 0;
}

.square-flashes {
  width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vertical-flashes {
  flex: 1;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 8px;
  padding-right: 2px;
}

.vertical-flashes .flash-chip {
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 8px 9px;
}

.vertical-flashes .flash-chip-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 140px;
}

/* ---------- Sponsored / Campus Ads Sidebar Card ---------- */
.ads-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 11px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ads-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ads-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.ad-slot {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-muted);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.ad-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.ad-banner {
  padding: 12px;
  color: #ffffff;
}

.ad-slot.ad-pink .ad-banner {
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
}

.ad-slot.ad-indigo .ad-banner {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
}

.ad-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.ad-banner-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.ad-body {
  padding: 9px 11px 10px;
  background: var(--surface);
}

.ad-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 5px;
}

.ad-meta {
  font-size: 0.7rem;
  color: var(--muted-light);
}

.ad-footer-note {
  text-align: center;
  font-size: 0.71rem;
  color: var(--muted-light);
  padding-top: 2px;
}

/* Keep Notice Board & Stories slightly tighter so Posts appear higher up */
.fb-stories-wrap {
  padding: 12px 14px;
  margin-bottom: 14px;
}

.fb-story-card {
  width: 96px;
  height: 136px;
}

.notice-board-card {
  padding: 13px 16px;
  margin-bottom: 14px;
}

@media (max-width: 920px) {
  .feed-two-col {
    grid-template-columns: 1fr;
  }
  .flashes-sidebar {
    position: static;
  }
  .square-flashes {
    width: 100%;
    height: auto;
  }
  .vertical-flashes {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
  }
  .vertical-flashes .flash-chip {
    min-width: 160px;
    max-width: 185px;
  }
}

/* ---------- Color Polish & Vibrant Accents ---------- */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
    linear-gradient(90deg, #f466a8, #a855f7, #6366f1, #fbbf24);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.topbar-brand {
  background: linear-gradient(90deg, #db2777, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#fb-tab-home:hover,
#fb-tab-home.active {
  background: #fdf2f8;
  color: #db2777;
}

#nav-messages-btn:hover,
#nav-messages-btn.active {
  background: #eff6ff;
  color: #2563eb;
}

#nav-close-friends-btn:hover,
#nav-close-friends-btn.active {
  background: #f0fdf4;
  color: #16a34a;
}

#nav-flash-btn:hover,
#nav-flash-btn.active {
  background: #fefce8;
  color: #d97706;
}

.fb-stories-wrap {
  background: linear-gradient(160deg, #ffffff 0%, #fdf4ff 65%, #eff6ff 100%);
  border-color: #f3e8ff;
}

.fb-story-avatar-ring {
  border-color: #ec4899;
}

.square-flashes {
  background: linear-gradient(155deg, #fffbeb 0%, #fff1f7 65%, #f5f3ff 100%);
  border-color: #fde68a;
}

.ads-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border-color: #e0e7ff;
}

.post-card {
  border-color: #ede9fe;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.post-card:hover {
  border-color: #fbcfe8;
  box-shadow: 0 10px 26px rgba(236, 72, 153, 0.1);
}

/* ---------- Chat Silent Edit & Delete ---------- */
.msg-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.msg-actions {
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.msg-bubble.mine:hover .msg-actions,
.msg-bubble.mine:focus-within .msg-actions {
  opacity: 1;
}

.msg-act-btn {
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.msg-act-btn:hover {
  background: rgba(255, 255, 255, 0.36);
}

.msg-edit-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.msg-edit-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.85rem;
  outline: none;
}

/* ---------- Story Interactive Dock & Drawers ---------- */
.repost-viewer-badge {
  background: rgba(99, 102, 241, 0.9);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.story-viewer-caption {
  bottom: 58px;
}

.sv-dock {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sv-dock-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.sv-dock-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.sv-dock-btn.liked {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  border-color: transparent;
}

.sv-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62%;
  z-index: 10;
  background: #ffffff;
  color: var(--text);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}

.sv-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.sv-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sv-viewer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sv-comment-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

.sv-comment-form input {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.85rem;
  outline: none;
}

.sv-comment-form input:focus {
  border-color: var(--pink-start);
}

/* ---------- Primus Insta & Primus Tube (YouTube / Shorts) ---------- */
#nav-insta-btn:hover,
#nav-insta-btn.active {
  background: #fdf2f8;
  color: #e1306c;
}

#nav-tube-btn:hover,
#nav-tube-btn.active {
  background: #fef2f2;
  color: #ef4444;
}

.mode-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.mode-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

/* Instagram-Style Vertical Photo Feed */
.insta-feed {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.insta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.insta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.insta-media-wrap {
  position: relative;
  background: #0f172a;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.insta-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insta-heart-burst {
  position: absolute;
  font-size: 4.2rem;
  color: #ffffff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  animation: instaBurst 0.65s ease forwards;
}

@keyframes instaBurst {
  0% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.5); }
}

.insta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 6px;
}

.insta-caption-box {
  padding: 0 14px 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.insta-caption-box strong {
  color: var(--text);
  margin-right: 6px;
}

/* YouTube-Style Cinema Video Grid */
.tube-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tube-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.tube-player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.tube-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tube-info {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
}

.tube-title {
  margin: 0 0 4px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.tube-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.tube-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
}

/* YouTube Shorts Vertical Snap-Scroll */
.tube-shorts-scroller {
  max-width: 410px;
  height: 76vh;
  margin: 0 auto;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: var(--shadow);
  scrollbar-width: none;
}

.tube-shorts-scroller::-webkit-scrollbar {
  display: none;
}

.short-slide {
  position: relative;
  width: 100%;
  height: 76vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.short-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.short-overlay-bottom {
  position: absolute;
  left: 0;
  right: 68px;
  bottom: 0;
  padding: 28px 16px 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  color: #ffffff;
  pointer-events: none;
}

.short-overlay-right {
  position: absolute;
  right: 12px;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

.short-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.short-fab.liked {
  background: linear-gradient(135deg, var(--pink-start), var(--pink-end));
}

.short-fab span {
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 2px;
}

@media (max-width: 760px) {
  .tube-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- iCarly-Style Pink, Baby Blue & White Portal Layout ---------- */
.portal-outer {
  min-height: 100vh;
  padding: 18px 14px 48px;
  background:
    radial-gradient(circle at 10% 12%, rgba(244, 114, 182, 0.24), transparent 42%),
    radial-gradient(circle at 90% 14%, rgba(137, 207, 240, 0.42), transparent 46%),
    radial-gradient(circle at 80% 85%, rgba(168, 218, 255, 0.34), transparent 46%),
    linear-gradient(155deg, #fce7f3 0%, #eef8ff 52%, #dff2ff 100%);
}

.portal-frame {
  max-width: 1020px;
  margin: 0 auto;
  background: #ffffff;
  border: 5px solid #ffffff;
  border-radius: 28px;
  box-shadow:
    0 22px 60px rgba(100, 175, 235, 0.2),
    0 0 0 1px #c3e6ff;
  overflow: hidden;
}

.portal-header {
  background: linear-gradient(135deg, #fff5f9 0%, #ffffff 50%, #eef8ff 100%);
  padding: 16px 20px 14px;
  border-bottom: 1px solid #d6eeff;
}

.portal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.portal-logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.portal-wordmark {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1;
}

.portal-wordmark span {
  background: linear-gradient(90deg, #ec4899, #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-wordmark small {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6366f1;
  margin-left: 2px;
}

.portal-date {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--pink-text);
  margin-top: 3px;
}

.portal-search-wrap {
  flex: 1;
  min-width: 180px;
  max-width: 310px;
}

.portal-search-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #be185d;
  margin-bottom: 3px;
}

.portal-search-wrap input {
  width: 100%;
  background: #ffffff;
  border: 2px solid #fbcfe8;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  outline: none;
}

.portal-search-wrap input:focus {
  border-color: #f472b6;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.24);
}

.portal-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fdf2f8;
  border: 1.5px solid #fbcfe8;
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #be185d;
  cursor: pointer;
  font-family: inherit;
}

.portal-avatar-pill:hover {
  background: #fce7f3;
}

/* Solid Baby Pink Nav Ribbon (no multi-color transition) */
.portal-nav-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #f472b6;
  padding: 7px 10px;
  border-radius: 16px;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 6px 16px rgba(244, 114, 182, 0.28);
}

.ribbon-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 7px 11px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.14s ease;
}

.ribbon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.ribbon-btn.active {
  background: #ffffff;
  color: #be185d;
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.ribbon-btn.ribbon-cta {
  margin-left: auto;
  background: #fef08a;
  color: #854d0e;
  border-color: #fde047;
}

.ribbon-btn.ribbon-cta:hover {
  background: #fde047;
}

.portal-body {
  padding: 18px 20px 32px;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 48%, #fdf2f8 100%);
}

/* Top Hero Row: Campus TV + Notice Board */
.portal-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.campus-tv-bezel {
  height: 100%;
  background: linear-gradient(145deg, #c7e8ff, #89cff0, #6cc2f5);
  padding: 10px 10px 8px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(108, 194, 245, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campus-tv-screen {
  flex: 1;
  min-height: 225px;
  max-height: 260px;
  background: #111827;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.campus-tv-screen img,
.campus-tv-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tv-empty-state {
  color: #ffffff;
  text-align: center;
  padding: 20px;
}

.tv-overlay-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
}

.campus-tv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 12px;
  padding: 6px 10px;
}

.tv-brand-tag {
  font-size: 0.78rem;
  font-weight: 900;
  color: #2b6cb0;
  letter-spacing: -0.01em;
}

.tv-controls {
  display: flex;
  gap: 6px;
}

.tv-ctrl-btn {
  background: #eaf6ff;
  border: 1px solid #b9e2ff;
  color: #2b6cb0;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.tv-ctrl-btn:hover {
  background: #d6eeff;
}

.portal-hero-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-notice-panel {
  flex: 1;
  margin-bottom: 0 !important;
  max-height: 215px;
  overflow-y: auto;
  background: linear-gradient(155deg, #ffffff 0%, #fdf2f8 100%) !important;
  border-color: #fbcfe8 !important;
}

.signpost-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.signpost-tag {
  border: 2px solid #ffffff;
  border-radius: 12px;
  padding: 8px 6px;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.14s ease;
}

.signpost-tag:hover {
  transform: translateY(-2px);
}

.signpost-tag.sp-pink { background: #dff2ff; color: #2b6cb0; }
.signpost-tag.sp-blue { background: #fce7f3; color: #be185d; }
.signpost-tag.sp-yellow { background: #fef9c3; color: #854d0e; }

.portal-stories-box {
  margin-bottom: 16px;
}

/* Lower 2-Column Portal Grid */
.portal-lower-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portal-left-widgets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-square-flashes {
  width: 270px !important;
  height: 235px !important;
}

/* Primus Poll Box (Baby Blue) */
.ivote-card {
  background: #ffffff;
  border: 2px solid #b9e2ff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ivote-head {
  background: #6cc2f5;
  color: #ffffff;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ivote-logo {
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.ivote-sub {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.24);
  padding: 2px 8px;
  border-radius: 999px;
}

.ivote-body {
  padding: 12px 13px;
}

.ivote-q {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.ivote-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ivote-opt-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #b9e2ff;
  background: #f0f8ff;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ivote-opt-btn:hover {
  border-color: #6cc2f5;
}

.ivote-opt-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(137, 207, 240, 0.3);
  pointer-events: none;
}

/* Stacked iCarly-style Left-Border Highlight Post Cards */
.portal-right-feed .post-card {
  border-left: 6px solid #f472b6;
}

.portal-right-feed .post-card:nth-child(3n+2) {
  border-left-color: #7cc6fe;
}

.portal-right-feed .post-card:nth-child(3n+3) {
  border-left-color: #fbbf24;
}

/* ---------- Custom Avatar Maker Studio ---------- */
.avatar-studio-grid {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 18px;
  align-items: start;
}

.avatar-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.avatar-svg-stage {
  width: 176px;
  height: 176px;
  border-radius: 26px;
  border: 3px solid #fbcfe8;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.18);
  background: #fce7f3;
}

.avatar-svg-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-controls-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.av-ctrl-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 5px;
}

.av-swatches {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.av-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d1d5db;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.av-swatch.active {
  box-shadow: 0 0 0 2.5px #db2777;
  transform: scale(1.12);
}

.av-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.av-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.av-pill.active {
  background: linear-gradient(90deg, var(--pink-start), var(--pink-end));
  border-color: transparent;
  color: #ffffff;
}

@media (max-width: 860px) {
  .portal-hero-grid,
  .portal-lower-grid,
  .avatar-studio-grid {
    grid-template-columns: 1fr;
  }
  .portal-square-flashes {
    width: 100% !important;
    height: auto !important;
  }
  .signpost-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Upgraded Avatar Studio & Drawable Outfit Canvas ---------- */
.avatar-studio-modal {
  max-width: 680px;
}

.avatar-studio-grid.wide-studio {
  grid-template-columns: 230px 1fr;
  gap: 20px;
}

.avatar-canvas-wrap {
  position: relative;
  width: 224px;
  height: 224px;
  border-radius: 26px;
  overflow: hidden;
  border: 3px solid #bae6fd;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.16);
}

.avatar-canvas-wrap .avatar-svg-stage {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.outfit-draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.draw-mode-banner {
  width: 100%;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 5px 8px;
  border-radius: 10px;
}

.studio-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.studio-tab {
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.studio-tab.active {
  background: linear-gradient(90deg, #ec4899, #38bdf8);
  border-color: transparent;
  color: #ffffff;
}

.studio-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

@media (max-width: 720px) {
  .avatar-studio-grid.wide-studio {
    grid-template-columns: 1fr;
  }
  .studio-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Multi-Class Announcement Chips ---------- */
.multi-class-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.class-select-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.14s ease;
}

.class-select-chip:hover {
  border-color: #f472b6;
}

.class-select-chip.selected {
  background: #f472b6;
  border-color: #f472b6;
  color: #ffffff;
}

.class-select-chip.all-chip.selected {
  background: #6cc2f5;
  border-color: #6cc2f5;
  color: #ffffff;
}

/* ---------- Dedicated Close Friends Page ---------- */
.cf-page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 65%, #fdf2f8 100%);
  border-color: #bbf7d0;
}

.cf-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.cf-page-main {
  min-width: 0;
}

.cf-panel-green {
  border-color: #bbf7d0 !important;
  background: linear-gradient(160deg, #ffffff 0%, #f0fdf4 100%) !important;
}

.cf-manage-card {
  background: var(--surface);
  border: 1.5px solid #bbf7d0;
  border-radius: 16px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
}

.cf-search-input {
  width: 100%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.84rem;
  outline: none;
  font-family: inherit;
}

.cf-search-input:focus {
  border-color: #22c55e;
  background: #ffffff;
}

@media (max-width: 860px) {
  .cf-page-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .hub-left,
  .hub-right {
    position: static;
  }
}

@media (max-width: 760px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-post-actions,
  .quick-post-actions.five-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .topbar-search {
    display: none;
  }
  .hide-sm {
    display: none;
  }
  .identity-pill-box {
    grid-template-columns: 1fr;
  }
  .chat-shell {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   DARK MODE — Dark Grey Background + Navy Blue & Purple Accents
   ===================================================================== */
.theme-toggle-btn {
  border: 1.5px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
  border-radius: 999px !important;
  padding: 6px 10px !important;
  width: 90px !important;
  min-width: 90px !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.theme-toggle-btn:hover {
  border-color: #7c3aed !important;
  color: #6d28d9 !important;
}

body.dark-mode {
  --bg: #16181d;
  --surface: #222631;
  --surface-muted: #2a2f3d;
  --border: #363d52;
  --border-soft: #2e3446;

  --text: #f3f4f6;
  --text-secondary: #d1d5db;
  --muted: #9ca3af;
  --muted-light: #6b7280;

  --pink-start: #1e3a8a;
  --pink-end: #7c3aed;
  --pink-soft: rgba(124, 58, 237, 0.16);
  --pink-border: rgba(139, 92, 246, 0.45);
  --pink-text: #c4b5fd;

  --indigo-soft: rgba(30, 58, 138, 0.35);
  --indigo: #60a5fa;
  --indigo-icon: #818cf8;

  --yellow-soft: rgba(30, 58, 138, 0.28);
  --yellow-border: rgba(96, 165, 250, 0.35);
  --yellow-icon-bg: rgba(37, 99, 235, 0.25);
  --yellow-text: #bfdbfe;

  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.32);

  background-color: #16181d !important;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(30, 58, 138, 0.34) 0%, transparent 42%),
    radial-gradient(circle at 90% 12%, rgba(124, 58, 237, 0.28) 0%, transparent 44%),
    radial-gradient(circle at 50% 90%, rgba(59, 130, 246, 0.14) 0%, transparent 48%) !important;
  color: var(--text) !important;
}

body.dark-mode .theme-toggle-btn {
  background: #2a2f3d !important;
  border-color: #4c3f7a !important;
  color: #e9d5ff !important;
}

body.dark-mode .theme-toggle-btn:hover {
  background: #353b4d !important;
  border-color: #8b5cf6 !important;
  color: #ffffff !important;
}

/* Auth & Pending Cards */
body.dark-mode .auth-card,
body.dark-mode .modal-card,
body.dark-mode .portal-frame,
body.dark-mode .topbar {
  background: #1d2028 !important;
  border-color: #363d52 !important;
  color: var(--text) !important;
}

body.dark-mode .portal-frame {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55) !important;
}

/* Portal Header & Wordmark */
body.dark-mode .portal-header {
  background: linear-gradient(180deg, #1f2433 0%, #1a1e29 100%) !important;
  border-bottom-color: #363d52 !important;
}

body.dark-mode .brand-logo {
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35) !important;
}

body.dark-mode .portal-wordmark,
body.dark-mode .brand-title {
  color: #f8fafc !important;
}

body.dark-mode .portal-wordmark span {
  color: #a855f7 !important;
}

body.dark-mode .portal-date,
body.dark-mode .portal-search-label,
body.dark-mode .brand-sub,
body.dark-mode .auth-footer {
  color: #9ca3af !important;
}

/* Solid Purple Nav Ribbon with Navy Blue Active/Hover */
body.dark-mode .portal-nav-ribbon {
  background: #6d28d9 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .ribbon-btn {
  color: #f3e8ff !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.dark-mode .ribbon-btn:hover {
  background: rgba(30, 58, 138, 0.72) !important;
  color: #ffffff !important;
}

body.dark-mode .ribbon-btn.active {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 3px 10px rgba(30, 58, 138, 0.55) !important;
}

body.dark-mode .ribbon-btn.ribbon-cta {
  background: linear-gradient(135deg, #1d4ed8 0%, #9333ea 100%) !important;
  color: #ffffff !important;
  border-color: #a855f7 !important;
}

/* Cards, Panels, Feed, Sidebar, Profile, Admin */
body.dark-mode .portal-panel,
body.dark-mode .portal-box,
body.dark-mode .post-card,
body.dark-mode .feed-card,
body.dark-mode .story-strip,
body.dark-mode .stories-bar,
body.dark-mode .profile-banner,
body.dark-mode .admin-card,
body.dark-mode .admin-row-card,
body.dark-mode .admin-stat-card,
body.dark-mode .class-group-box,
body.dark-mode .cf-manage-card,
body.dark-mode .cf-page-header,
body.dark-mode .cf-panel-green,
body.dark-mode .identity-pill-box,
body.dark-mode .notice-item,
body.dark-mode .poll-card,
body.dark-mode .tube-card,
body.dark-mode .flash-card,
body.dark-mode .insta-card,
body.dark-mode .comment-item {
  background: #222631 !important;
  border-color: #363d52 !important;
  color: #f3f4f6 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
}

/* Navy Blue Accented Panels (PrimusTV & Primus Poll) */
body.dark-mode .portal-tv-box,
body.dark-mode .portal-poll-box,
body.dark-mode .blue-box,
body.dark-mode .panel-blue {
  background: linear-gradient(165deg, #1b2540 0%, #222631 100%) !important;
  border-color: #2563eb !important;
}

body.dark-mode .portal-tv-box .portal-box-header,
body.dark-mode .portal-poll-box .portal-box-header,
body.dark-mode .panel-blue .portal-box-header {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-bottom-color: #3b82f6 !important;
}

/* Purple Accented Panels (Notice Board & Feed/Stories Headers) */
body.dark-mode .portal-notice-box,
body.dark-mode .pink-box,
body.dark-mode .panel-pink {
  background: linear-gradient(165deg, #271e3f 0%, #222631 100%) !important;
  border-color: #7c3aed !important;
}

body.dark-mode .portal-notice-box .portal-box-header,
body.dark-mode .panel-pink .portal-box-header,
body.dark-mode .class-group-header {
  background: #6d28d9 !important;
  color: #ffffff !important;
  border-bottom-color: #8b5cf6 !important;
}

body.dark-mode .portal-box-header,
body.dark-mode .modal-header {
  background: #262b38 !important;
  color: #f3f4f6 !important;
  border-bottom-color: #363d52 !important;
}

/* Inputs, Textareas, Selects */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .portal-search-wrap input,
body.dark-mode .cf-search-input {
  background: #181b22 !important;
  border-color: #3b4259 !important;
  color: #f3f4f6 !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #6b7280 !important;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25) !important;
}

/* Buttons */
body.dark-mode .btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%) !important;
  border-color: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35) !important;
}

body.dark-mode .btn-primary:hover {
  filter: brightness(1.12);
}

body.dark-mode .btn-secondary,
body.dark-mode .btn-admin-soft,
body.dark-mode .portal-avatar-pill {
  background: #2a2f3d !important;
  border-color: #434b66 !important;
  color: #e5e7eb !important;
}

body.dark-mode .btn-secondary:hover,
body.dark-mode .btn-admin-soft:hover,
body.dark-mode .portal-avatar-pill:hover {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

body.dark-mode .btn-ghost {
  color: #cbd5e1 !important;
}

body.dark-mode .btn-ghost:hover {
  background: rgba(124, 58, 237, 0.2) !important;
  color: #ffffff !important;
}

/* Pills, Badges, Filter Tabs, Poll Options */
body.dark-mode .fpill,
body.dark-mode .hub-badge,
body.dark-mode .filter-pill,
body.dark-mode .tab-btn,
body.dark-mode .class-select-chip,
body.dark-mode .poll-option-btn,
body.dark-mode .stat-box {
  background: #2a2f3d !important;
  border-color: #3d455e !important;
  color: #e2e8f0 !important;
}

body.dark-mode .filter-pill.active,
body.dark-mode .tab-btn.active,
body.dark-mode .class-select-chip.selected {
  background: #7c3aed !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
}

body.dark-mode .class-select-chip.all-chip.selected,
body.dark-mode .poll-option-btn.voted {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

body.dark-mode .poll-bar-fill {
  background: linear-gradient(90deg, #1d4ed8 0%, #7c3aed 100%) !important;
}

body.dark-mode .story-ring,
body.dark-mode .story-avatar-ring {
  background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%) !important;
}

body.dark-mode .avatar-chip,
body.dark-mode .avatar-lg,
body.dark-mode .avatar-sm {
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
}

body.dark-mode .divider span {
  background: #1d2028 !important;
  color: #9ca3af !important;
}

body.dark-mode .divider::before {
  background: #363d52 !important;
}

body.dark-mode .toast {
  background: #222631 !important;
  color: #f3f4f6 !important;
  border-color: #4c3f7a !important;
}


/* Complete Portal Dark Mode Overrides (Black/Dark Grey + Purple for Pink + Navy Blue for Baby Blue) */
body.dark-mode .portal-outer {
  background: #0d0f14 !important;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(109, 40, 217, 0.22), transparent 40%),
    radial-gradient(circle at 90% 14%, rgba(30, 58, 138, 0.3), transparent 44%) !important;
}

body.dark-mode .portal-frame {
  background: #14171f !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px #1e3a8a !important;
}

body.dark-mode .portal-header {
  background: #14171f !important;
  border-bottom-color: #272d3d !important;
}

body.dark-mode .portal-body {
  background: #111319 !important;
}

body.dark-mode .portal-wordmark span {
  background: linear-gradient(90deg, #a855f7, #7c3aed) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-mode .portal-date,
body.dark-mode .portal-search-label {
  color: #c4b5fd !important;
}

body.dark-mode .portal-search-wrap input {
  background: #0d0f14 !important;
  border-color: #6d28d9 !important;
  color: #f3f4f6 !important;
}

body.dark-mode .portal-avatar-pill {
  background: #1e1633 !important;
  border-color: #7c3aed !important;
  color: #e9d5ff !important;
}

/* PrimusTV (Baby Blue -> Navy Blue) */
body.dark-mode .campus-tv-bezel {
  background: linear-gradient(145deg, #0f172a, #172554, #1e3a8a) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.65) !important;
}

body.dark-mode .campus-tv-screen {
  border-color: #1e3a8a !important;
  background: #090b10 !important;
}

body.dark-mode .campus-tv-bar {
  background: #14171f !important;
  box-shadow: inset 0 0 0 1px #1e3a8a !important;
}

body.dark-mode .tv-brand-tag {
  color: #93c5fd !important;
}

body.dark-mode .tv-ctrl-btn {
  background: #172554 !important;
  border-color: #2563eb !important;
  color: #dbeafe !important;
}

body.dark-mode .tv-ctrl-btn:hover {
  background: #1e3a8a !important;
}

/* Notice Board (Baby Pink -> Purple on Black/Dark Grey) */
body.dark-mode .notice-board-card,
body.dark-mode .portal-notice-panel {
  background: #181b23 !important;
  border-color: #7c3aed !important;
  color: #f3f4f6 !important;
}

body.dark-mode .notice-board-header,
body.dark-mode .notice-board-title-row h3 {
  color: #f3f4f6 !important;
}

body.dark-mode .notice-official-pill {
  background: #6d28d9 !important;
  color: #f3e8ff !important;
  border-color: #8b5cf6 !important;
}

/* Signpost Tags (Baby Blue -> Navy Blue, Baby Pink -> Purple) */
body.dark-mode .signpost-tag {
  border-color: #272d3d !important;
}

body.dark-mode .signpost-tag.sp-pink {
  background: #1e3a8a !important;
  color: #dbeafe !important;
  border-color: #2563eb !important;
}

body.dark-mode .signpost-tag.sp-blue {
  background: #6d28d9 !important;
  color: #f3e8ff !important;
  border-color: #8b5cf6 !important;
}

/* 24h Campus Stories Box (White/Pink -> Black/Dark Grey + Purple Border) */
body.dark-mode .fb-stories-wrap,
body.dark-mode .portal-stories-box {
  background: #181b23 !important;
  border-color: #7c3aed !important;
  color: #f3f4f6 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .fb-stories-header,
body.dark-mode .fb-stories-header span,
body.dark-mode .fb-stories-header h3 {
  color: #f3f4f6 !important;
}

body.dark-mode .fb-story-card,
body.dark-mode .story-card {
  background: #111319 !important;
  border-color: #6d28d9 !important;
  color: #f3f4f6 !important;
}

/* Primus Poll (Baby Blue -> Navy Blue on Black/Dark Grey) */
body.dark-mode .ivote-card {
  background: #181b23 !important;
  border-color: #1e3a8a !important;
  color: #f3f4f6 !important;
}

body.dark-mode .ivote-head {
  background: #1e3a8a !important;
  color: #ffffff !important;
}

body.dark-mode .ivote-q {
  color: #f3f4f6 !important;
}

body.dark-mode .ivote-opt-btn {
  background: #121829 !important;
  border-color: #1e3a8a !important;
  color: #e2e8f0 !important;
}

body.dark-mode .ivote-opt-btn:hover {
  border-color: #3b82f6 !important;
  background: #172554 !important;
}

body.dark-mode .ivote-opt-fill {
  background: rgba(37, 99, 235, 0.35) !important;
}

/* Feed Controls & Stacked Post Cards (Alternating Purple & Navy Blue Borders) */
body.dark-mode .feed-controls,
body.dark-mode .section-header,
body.dark-mode .gate-notice {
  background: #181b23 !important;
  border-color: #2e3446 !important;
  color: #f3f4f6 !important;
}

body.dark-mode .portal-right-feed .post-card {
  background: #181b23 !important;
  border-color: #2e3446 !important;
  border-left-color: #7c3aed !important;
}

body.dark-mode .portal-right-feed .post-card:nth-child(2n) {
  border-left-color: #1e3a8a !important;
}

body.dark-mode .portal-right-feed .post-card:nth-child(3n+3) {
  border-left-color: #6d28d9 !important;
}


/* Full-Page & High-Specificity Dark Mode Polish (0 white/light leaks anywhere) */
html.dark-mode,
body.dark-mode {
  background: #0d0f14 !important;
  color: #f3f4f6 !important;
}

body.dark-mode #fb-tab-home.active,
body.dark-mode #nav-insta-btn.active,
body.dark-mode #nav-tube-btn.active,
body.dark-mode #nav-flash-btn.active {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

body.dark-mode #nav-close-friends-btn.active {
  background: #15803d !important;
  color: #ffffff !important;
  border-color: #4ade80 !important;
}

body.dark-mode .square-flashes,
body.dark-mode .ads-card,
body.dark-mode .admin-row-card.pending-highlight,
body.dark-mode .notice-item.urgent,
body.dark-mode .comments-section,
body.dark-mode .comment-box,
body.dark-mode .insta-section-head,
body.dark-mode .tube-section-head,
body.dark-mode .flash-section-head,
body.dark-mode .admin-tabs,
body.dark-mode .admin-panel-box,
body.dark-mode .composer-tabs,
body.dark-mode .dropzone {
  background: #181b23 !important;
  border-color: #363d52 !important;
  color: #f3f4f6 !important;
}

body.dark-mode .notice-item.urgent {
  border-color: #7c3aed !important;
  background: #231836 !important;
}

body.dark-mode .story-ring.add-ring {
  background: linear-gradient(135deg, #1e3a8a, #7c3aed) !important;
}

/* Close Friends — Keep Signature Green Accents in Dark Mode */
body.dark-mode .cf-page-header,
body.dark-mode .cf-panel-green,
body.dark-mode .cf-manage-card {
  background: linear-gradient(155deg, #161c1a 0%, #181b23 100%) !important;
  border-color: #22c55e !important;
  color: #f3f4f6 !important;
}

body.dark-mode .cf-search-input:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25) !important;
}

body.dark-mode #stories-manage-cf-btn,
body.dark-mode .cf-pill,
body.dark-mode .cf-badge {
  background: rgba(22, 163, 74, 0.2) !important;
  border-color: #22c55e !important;
  color: #86efac !important;
}

body.dark-mode #stories-manage-cf-btn:hover {
  background: #15803d !important;
  color: #ffffff !important;
}

body.dark-mode .story-ring.cf-ring,
body.dark-mode .cf-story-ring {
  background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%) !important;
}

body.dark-mode .sv-comment-form input {
  background: #111319 !important;
  border-color: #6d28d9 !important;
  color: #f3f4f6 !important;
}

body.dark-mode .auth-shell,
body.dark-mode .app-shell,
body.dark-mode .admin-main {
  background: transparent !important;
  color: #f3f4f6 !important;
}


/* Custom Primus Pix Logo Image (Light & Dark Auto-Swap) */
.brand-logo.logo-img-wrap,
body.dark-mode .brand-logo.logo-img-wrap {
  background: transparent !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16) !important;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-logo-img.logo-dark {
  display: none;
}

body.dark-mode .brand-logo-img.logo-light {
  display: none;
}

body.dark-mode .brand-logo-img.logo-dark {
  display: block;
}
