body {
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.bulletin-stat {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.5rem 0.8rem;
}

.stat-strip {
  align-items: center;
}

.stat-label {
  line-height: 1;
  max-width: none;
  white-space: nowrap;
}

.stat-value {
  margin-top: 0 !important;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.icon-button,
.action-button,
.menu-item {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  line-height: 1;
}

.icon-button:hover,
.menu-item:hover,
.action-button:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.icon-button:focus-visible,
.action-button:focus-visible,
.menu-item:focus-visible,
.composer-send:focus-visible,
.composer-textarea:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 2px;
}

.composer-shell {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.composer-textarea {
  color: inherit;
}

.composer-textarea::placeholder {
  color: #64748b;
}

.composer-send {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.menu-panel {
  backdrop-filter: blur(14px);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e2e8f0;
}

.mention-pill,
.seen-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.mention-suggest {
  backdrop-filter: blur(14px);
}

.reaction-chip {
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.reaction-chip:hover {
  transform: translateY(-1px);
}

.notification-row,
.dashboard-post {
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.notification-row:hover,
.dashboard-post:hover {
  border-color: rgba(100, 116, 139, 0.95);
  transform: translateY(-1px);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.85);
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
}

.attachment-chip button {
  color: inherit;
}

.post-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover {
  border-color: rgba(100, 116, 139, 0.95);
}

.post-summary-trigger {
  cursor: pointer;
}

.avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.9);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.thread-comment {
  position: relative;
}

.thread-comment::before {
  content: "";
  position: absolute;
  left: -0.625rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: rgba(71, 85, 105, 0.55);
}

.thread-comment.depth-0::before {
  display: none;
}

.post-action-row,
.comment-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.overview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.85);
  background: rgba(15, 23, 42, 0.55);
  padding: 0.35rem 0.7rem;
  color: #cbd5e1;
  max-width: 100%;
}

.overview-pill-warning {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

.overview-pill-success {
  border-color: rgba(52, 211, 153, 0.45);
  color: #bbf7d0;
}

.subtle-meta {
  color: #94a3b8;
}

.details-panel {
  border-top: 1px solid rgba(51, 65, 85, 0.95);
}

.summary-photo img,
.attachment-image {
  display: block;
}

details > summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 767px) {
  .bulletin-stat {
    width: calc(50% - 0.25rem);
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
  }

  .stat-label {
    font-size: 0.7rem;
    white-space: normal;
    line-height: 1.15;
  }

  .stat-value {
    font-size: 0.95rem;
  }

  .stat-strip {
    gap: 0.5rem;
  }

  .avatar-badge {
    width: 2rem;
    height: 2rem;
    font-size: 0.6875rem;
  }

  .thread-comment {
    margin-left: 0 !important;
  }

  .thread-comment::before {
    left: -0.4rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════════ */

/* 1. Root body */
body[data-theme="light"] {
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%) !important;
  color: #0f172a !important;
}

/* 2. Background surfaces */
body[data-theme="light"] .bg-slate-950,
body[data-theme="light"] .bg-slate-900,
body[data-theme="light"] .bg-slate-900\/40,
body[data-theme="light"] .bg-slate-900\/60,
body[data-theme="light"] .bg-slate-900\/70,
body[data-theme="light"] .bg-slate-900\/80,
body[data-theme="light"] .bg-slate-900\/95,
body[data-theme="light"] .bg-slate-950\/30,
body[data-theme="light"] .bg-slate-950\/50,
body[data-theme="light"] .bg-slate-950\/55,
body[data-theme="light"] .bg-slate-950\/60,
body[data-theme="light"] .bg-slate-950\/70,
body[data-theme="light"] .bg-slate-950\/80 {
  background-color: rgba(248, 250, 252, 0.94) !important;
}

body[data-theme="light"] .bg-slate-800 {
  background-color: #e2e8f0 !important;
}

body[data-theme="light"] .hover\:bg-slate-800\/60:hover,
body[data-theme="light"] .hover\:bg-slate-800\/80:hover {
  background-color: rgba(226, 232, 240, 0.7) !important;
}

body[data-theme="light"] .bg-emerald-500\/10 {
  background-color: rgba(16, 185, 129, 0.12) !important;
}

body[data-theme="light"] .bg-white\/15,
body[data-theme="light"] .hover\:bg-white\/10:hover {
  background-color: rgba(15, 23, 42, 0.08) !important;
}

/* 3. Borders */
body[data-theme="light"] .border-slate-800,
body[data-theme="light"] .border-slate-800\/50,
body[data-theme="light"] .border-slate-700,
body[data-theme="light"] .border-slate-600 {
  border-color: #cbd5e1 !important;
}

/* 4. Shadows — use CSS custom properties to preserve Tailwind ring composition */
body[data-theme="light"] .shadow-slate-950\/30,
body[data-theme="light"] .shadow-slate-950\/40,
body[data-theme="light"] .shadow-slate-950\/50 {
  --tw-shadow-color: rgba(15, 23, 42, 0.07) !important;
  --tw-shadow: var(--tw-shadow-colored) !important;
}

/* 5. Text colors — base slate */
body[data-theme="light"] .text-slate-100,
body[data-theme="light"] .text-slate-200,
body[data-theme="light"] .text-slate-300,
body[data-theme="light"] .text-white {
  color: #0f172a !important;
}

body[data-theme="light"] .text-slate-400,
body[data-theme="light"] .text-slate-500,
body[data-theme="light"] .subtle-meta {
  color: #475569 !important;
}

body[data-theme="light"] .text-slate-600 {
  color: #64748b !important;
}

/* 5b. Text colors — pastel badges/labels → readable on white */
body[data-theme="light"] .text-sky-300 {
  color: #0369a1 !important;
}

body[data-theme="light"] .text-sky-400 {
  color: #0284c7 !important;
}

body[data-theme="light"] .text-emerald-200,
body[data-theme="light"] .text-emerald-300 {
  color: #065f46 !important;
}

body[data-theme="light"] .text-rose-300 {
  color: #be123c !important;
}

body[data-theme="light"] .text-cyan-300 {
  color: #0e7490 !important;
}

body[data-theme="light"] .text-indigo-300 {
  color: #4338ca !important;
}

body[data-theme="light"] .text-amber-300 {
  color: #b45309 !important;
}

/* 6. Custom components */
body[data-theme="light"] .mention-pill,
body[data-theme="light"] .seen-pill {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #065f46 !important;
}

body[data-theme="light"] .details-panel {
  border-top-color: #cbd5e1 !important;
}

body[data-theme="light"] .composer-shell {
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04) !important;
}

body[data-theme="light"] .post-card:hover,
body[data-theme="light"] .notification-row:hover,
body[data-theme="light"] .dashboard-post:hover {
  border-color: rgba(148, 163, 184, 0.8) !important;
}

body[data-theme="light"] .overview-pill {
  background: rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
  color: #334155;
}

body[data-theme="light"] .overview-pill-warning {
  border-color: rgba(244, 63, 94, 0.4);
  color: #be123c;
}

body[data-theme="light"] .overview-pill-success {
  border-color: rgba(16, 185, 129, 0.4);
  color: #065f46;
}

body[data-theme="light"] .attachment-chip {
  background: rgba(15, 23, 42, 0.05);
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .avatar-badge {
  background: rgba(226, 232, 240, 0.95);
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .thread-comment::before {
  background: rgba(148, 163, 184, 0.9);
}

/* 7. Forms + buttons + hover states */
body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select,
body[data-theme="light"] .composer-textarea {
  color: #0f172a;
}

body[data-theme="light"] .menu-item {
  color: #0f172a;
}

body[data-theme="light"] button {
  background-color: transparent;
}

body[data-theme="light"] .icon-button:hover,
body[data-theme="light"] .action-button:hover,
body[data-theme="light"] .menu-item:hover {
  background-color: rgba(15, 23, 42, 0.07);
}
