/* Omnichannel Support Panel - shared styles (used alongside Tailwind utilities) */
:root {
  --sidebar-bg: #0f172a;
  --accent: #6366f1;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
}

.sidebar {
  background: var(--sidebar-bg);
}

.sidebar a {
  color: #cbd5e1;
  transition: background 0.15s ease;
}
.sidebar a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar a.active { background: var(--accent); color: #fff; }

/* Messenger badges */
.badge-messenger { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 9999px; font-weight: 600; }
.badge-telegram { background: #e0f2fe; color: #0369a1; }
.badge-viber { background: #ede9fe; color: #6d28d9; }
.badge-whatsapp { background: #dcfce7; color: #15803d; }

.chat-item { border-left: 3px solid transparent; }
.chat-item.unread { background: #fef3c7; }
.chat-item.critical { border-left-color: #ef4444; background: #fee2e2; }
.chat-item.active { background: #e0e7ff; border-left-color: #6366f1; }

.message-bubble { max-width: 70%; }
.message-incoming { background: #fff; }
.message-outgoing { background: #dbeafe; align-self: flex-end; }
.message-bot { background: #e2e8f0; opacity: 0.8; }
.message-system { align-self: center; background: #e2e8f0; font-size: 0.75rem; color: #475569; }

.audio-player { width: 220px; }

button { cursor: pointer; }
.emoji-btn { cursor: pointer; user-select: none; }

/* Chat composer / conversation polish */
#emoji-picker { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15); }

.card { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

#menu-list>div:hover{background-color:#f6f6f6}

/* ===== Loading indicators ===== */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: -0.15em;
}
.spinner-sm { width: 0.85em; height: 0.85em; }
.spinner-lg { width: 1.5em; height: 1.5em; border-width: 3px; }

@keyframes skeleton-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.45; }
  100% { opacity: 1; }
}
.skeleton {
  background: #e2e8f0;
  border-radius: 0.375rem;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.skeleton-avatar { width: 2.25rem; height: 2.25rem; border-radius: 9999px; flex-shrink: 0; }
.skeleton-line { height: 0.8rem; margin-bottom: 0.5rem; }
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-line.sm { height: 0.6rem; }
.skeleton-line.title { height: 1rem; }

/* Global top progress bar (indeterminate) */
.global-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.global-progress.active { opacity: 1; }
.global-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #a5b4fc, #6366f1);
  background-size: 200% 100%;
  animation: progress-slide 1s linear infinite;
}
@keyframes progress-slide {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.btn-loading { opacity: 0.65; cursor: progress; pointer-events: none; }

.fade-in { animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.message-bot-in-chat{
  background-color: #c0c7d1 !important;
}

/* Full-screen app loader shown until auth resolves (prevents admin-panel flash
   before the login redirect). Removed by auth.js once the session is valid. */
#app-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}
.app-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: #475569;
}
.app-loader-logo { font-size: 2.5rem; line-height: 1; }
.app-loader-text { font-size: 0.875rem; letter-spacing: 0.02em; }