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

:root {
  --panel-ink: #0B0D12;
  --panel-slate: #14171F;
  --panel-slate-hover: #1C202B;
  --panel-border: #262B38;
  --teal: #2DD4BF;
  --teal-dim: #1C5C56;
  --coral: #FB7185;
  --paper: #F6F5F2;
  --paper-dim: #ECEAE4;
  --ink: #1B1D23;
  --ink-soft: #6B7280;
}

* { font-family: 'Inter', sans-serif; box-sizing: border-box; }
.font-mono-ui { font-family: 'IBM Plex Mono', monospace; }

body { background: var(--paper); }

/* ── Scrollbars ── */
.rail-scroll::-webkit-scrollbar { width: 4px; }
.rail-scroll::-webkit-scrollbar-track { background: transparent; }
.rail-scroll::-webkit-scrollbar-thumb { background: #2A2F3D; border-radius: 999px; }

.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: #D8D5CC; border-radius: 999px; }

/* ── Unread pulsing dot ── */
@keyframes ticket-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(251, 113, 133, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); }
}
.unread-dot { animation: ticket-pulse 2s infinite; }

/* ── Connection status dot ── */
@keyframes status-breathe {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.status-live { animation: status-breathe 2.2s ease-in-out infinite; }

/* ── Category caret ── */
.category-caret { transition: transform 0.18s ease; }
.category-caret.is-open { transform: rotate(90deg); }

/* ── Ticket row ── */
.ticket-row { transition: background-color 0.12s ease, border-color 0.12s ease; }
.ticket-row:hover { background: rgba(255,255,255,0.05) !important; }

/* ── Message bubble animation ── */
.bubble-in { animation: bubble-rise 0.18s ease-out; }
@keyframes bubble-rise {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Category drag ── */
.category-wrap {
  border-radius: 8px;
  transition: outline 0.12s ease, opacity 0.15s ease;
}

/* ── Stats card ── */
.stat-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* ── Toast ── */
.toast-notif { transition: opacity 0.25s ease, transform 0.25s ease; }

/* ── Modal backdrop fade ── */
#profile-modal,
#dm-modal,
#embed-modal,
#lightbox {
  animation: modal-fade 0.18s ease;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Lightbox image ── */
#lightbox-img {
  cursor: default;
  user-select: none;
  transition: transform 0.2s ease;
}

/* ── Attachment image hover ── */
.group:hover img { opacity: 0.88; }


/* ── Sidebar tabs ── */
.sidebar-tab {
  color: #6B7280;
}
.sidebar-tab.tab-active {
  background: rgba(45,212,191,0.12);
  color: var(--teal);
  border: 1px solid rgba(45,212,191,0.2);
}
.sidebar-tab:not(.tab-active):hover {
  background: rgba(255,255,255,0.05);
  color: #C6CBD6;
}

/* ── DM conversation row ── */
.dm-row {
  transition: background-color 0.12s ease;
}
.dm-row:hover { background: rgba(255,255,255,0.05) !important; }

/* ── Profile banner ── */
#profile-banner {
  background-size: cover;
  background-position: center;
}

/* ── Avatar hover ring ── */
img[alt][title] { transition: box-shadow 0.15s ease; }
img[alt][title]:hover { box-shadow: 0 0 0 2px var(--teal); }

/* ── Composer auto-grow textarea ── */
#composer-input,
#dm-text,
#eb-description,
#dm-embed-desc {
  min-height: 40px;
  max-height: 160px;
  overflow-y: auto;
}
