::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
.sk{background:linear-gradient(90deg,#f0f4f8 25%,#e2e8f0 50%,#f0f4f8 75%);background-size:200% 100%;animation:sk 1.4s infinite}
@keyframes sk{0%{background-position:-200% 0}100%{background-position:200% 0}}
.tin{animation:tin .25s ease}
@keyframes tin{from{transform:translateX(110%);opacity:0}to{transform:none;opacity:1}}
@media (max-width: 767px) {
  .desktop-sidebar { display: none !important; }
  .mobile-nav { display: flex !important; }
  .mobile-main { padding-bottom: 64px; }
  .inbox-wrap { position: relative; }
  .inbox-list { transition: transform .25s ease; }
  .inbox-list.slide-out { transform: translateX(-100%); position: absolute; width: 100%; height: 100%; }
  .inbox-chat { transition: transform .25s ease; }
  .inbox-chat.slide-in { transform: translateX(0); }
  .inbox-chat.slide-out-right { transform: translateX(100%); position: absolute; width: 100%; height: 100%; }
  input, textarea, select { font-size: 16px !important; }
  button { min-height: 36px; }
}
.mobile-nav { display: none; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* ── Dark Mode ── */
:root {
  --v1:#7c3aed;--v2:#a855f7;--v3:#ec4899;
  --grad-primary:linear-gradient(135deg,#7c3aed,#ec4899);
}
.dark body { background:#07030f; color:#e2e2f0; }
.dark .bg-white { background:#0f0a1e !important; }
.dark .bg-gray-50 { background:#07030f !important; }
.dark .bg-gray-100 { background:#1a1a2e !important; }
.dark .border-gray-100 { border-color:rgba(255,255,255,0.07) !important; }
.dark .border-gray-200 { border-color:rgba(255,255,255,0.1) !important; }
.dark .text-gray-900 { color:#e2e2f0 !important; }
.dark .text-gray-700 { color:rgba(255,255,255,0.65) !important; }
.dark .text-gray-600 { color:rgba(255,255,255,0.5) !important; }
.dark .text-gray-500 { color:rgba(255,255,255,0.4) !important; }
.dark .text-gray-400 { color:rgba(255,255,255,0.3) !important; }
.dark .text-gray-300 { color:rgba(255,255,255,0.25) !important; }
.dark .hover\:bg-gray-50:hover { background:rgba(255,255,255,0.04) !important; }
.dark .hover\:bg-gray-100:hover { background:rgba(255,255,255,0.06) !important; }
.dark .bg-gradient-to-br.from-blue-600 { background:var(--grad-primary) !important; }
.dark .bg-blue-600 { background:#7c3aed !important; }
.dark .hover\:bg-blue-700:hover { background:#6d28d9 !important; }
.dark .text-blue-600 { color:#a78bfa !important; }
.dark .bg-blue-100 { background:rgba(124,58,237,0.15) !important; }
.dark .text-blue-700 { color:#c4b5fd !important; }
.dark input, .dark textarea, .dark select {
  background:rgba(255,255,255,0.06) !important;
  border-color:rgba(255,255,255,0.1) !important;
  color:#e2e2f0 !important;
}
.dark input::placeholder, .dark textarea::placeholder { color:rgba(255,255,255,0.25) !important; }
.dark input:focus, .dark textarea:focus {
  border-color:rgba(124,58,237,0.5) !important;
  box-shadow:0 0 0 3px rgba(124,58,237,0.15) !important;
}
.dark .bg-gray-800 { background:#1a1a2e !important; }
.dark .hover\:bg-gray-900:hover { background:#0f0a1e !important; }
.dark .bg-gray-100.text-gray-600 { background:rgba(255,255,255,0.08) !important; color:rgba(255,255,255,0.5) !important; }
.dark .border-b.border-gray-100 { border-color:rgba(255,255,255,0.06) !important; }
.dark .border-t.border-gray-100 { border-color:rgba(255,255,255,0.06) !important; }
.dark .border-b.border-gray-50 { border-color:rgba(255,255,255,0.04) !important; }
.dark .bg-red-50 { background:rgba(239,68,68,0.1) !important; }
.dark .text-red-600 { color:#fca5a5 !important; }
.dark .hover\:bg-red-100:hover { background:rgba(239,68,68,0.15) !important; }
.dark .sk { background:linear-gradient(90deg,rgba(255,255,255,0.05) 25%,rgba(255,255,255,0.09) 50%,rgba(255,255,255,0.05) 75%) !important; background-size:200% 100% !important; }
.dark .shadow-sm { box-shadow:0 1px 4px rgba(0,0,0,0.4) !important; }
.dark ::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.15) !important; }

/* Dark mode switch toggle */
.dm-switch { position:relative; width:44px; height:24px; flex-shrink:0; }
.dm-switch input { opacity:0; width:0; height:0; }
.dm-slider { position:absolute; cursor:pointer; inset:0; background:rgba(103,58,183,0.62); border-radius:24px; transition:.3s; border:1px solid rgba(255,255,255,0.1); }
.dm-slider:before { content:''; position:absolute; height:18px; width:18px; left:2px; bottom:2px; background:white; border-radius:50%; transition:.3s; }
input:checked + .dm-slider { background:var(--grad-primary); border-color:transparent; }
input:checked + .dm-slider:before { transform:translateX(20px); }

/* Nav items */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  color: #374151;
  cursor: pointer;
  border: none;
  background: none;
  margin-bottom: 1px;
}
.nav-item:hover { background: #f3f4f6; }
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Inbox: override bg-blue-50 */
.dark .inbox-wrap .bg-blue-50 {
  background-color: #23194a !important;
}

/* All: override bg-blue-50 */
.dark .bg-blue-50 {
  background-color: #23194a !important;
}
