/**
 * CarAssist Engineer Panel - Industrial Automotive Premium Theme
 *
 * Design Philosophy: "Cockpit Control Center"
 * - Dark industrial background like a mechanic's workshop
 * - Orange accent (racing/safety) for key actions
 * - Steel/carbon fiber textures
 * - Clean instrument cluster styling
 * - Professional, no-nonsense interface
 */

/* ============================================
   ROOT VARIABLES - COCKPIT COLOR PALETTE
   ============================================ */
:root {
  /* Primary - Dark industrial palette */
  --cockpit-bg-deep: #0a0e14;
  --cockpit-bg-main: #0d1117;
  --cockpit-bg-panel: #151b23;
  --cockpit-bg-card: #1c232d;
  --cockpit-bg-elevated: #252d38;

  /* Borders - subtle steel lines */
  --cockpit-border: rgba(56, 68, 83, 0.5);
  --cockpit-border-light: rgba(56, 68, 83, 0.3);
  --cockpit-border-accent: rgba(249, 115, 22, 0.3);

  /* Text hierarchy */
  --cockpit-text-primary: #f0f4f8;
  --cockpit-text-secondary: #8b98a8;
  --cockpit-text-muted: #5c6b7a;
  --cockpit-text-dim: #3d4a58;

  /* Accent - Racing Orange */
  --cockpit-accent: #f97316;
  --cockpit-accent-hover: #fb923c;
  --cockpit-accent-muted: rgba(249, 115, 22, 0.15);
  --cockpit-accent-glow: rgba(249, 115, 22, 0.4);

  /* Status colors - instrument cluster style */
  --cockpit-success: #22c55e;
  --cockpit-success-muted: rgba(34, 197, 94, 0.15);
  --cockpit-warning: #eab308;
  --cockpit-warning-muted: rgba(234, 179, 8, 0.15);
  --cockpit-danger: #ef4444;
  --cockpit-danger-muted: rgba(239, 68, 68, 0.15);
  --cockpit-info: #3b82f6;
  --cockpit-info-muted: rgba(59, 130, 246, 0.15);

  /* Channel colors */
  --channel-web: #3b82f6;
  --channel-telegram: #2aabee;
  --channel-viber: #7360f2;
  --channel-whatsapp: #25d366;

  /* Shadows - depth */
  --cockpit-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --cockpit-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --cockpit-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --cockpit-shadow-glow: 0 0 20px var(--cockpit-accent-glow);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   GLOBAL COCKPIT STYLES
   ============================================ */
.cockpit-theme {
  background: var(--cockpit-bg-deep);
  color: var(--cockpit-text-primary);
  font-family: var(--font-display);
}

.cockpit-theme * {
  scrollbar-width: thin;
  scrollbar-color: var(--cockpit-bg-elevated) var(--cockpit-bg-panel);
}

.cockpit-theme ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.cockpit-theme ::-webkit-scrollbar-track {
  background: var(--cockpit-bg-panel);
}

.cockpit-theme ::-webkit-scrollbar-thumb {
  background: var(--cockpit-bg-elevated);
  border-radius: 3px;
}

.cockpit-theme ::-webkit-scrollbar-thumb:hover {
  background: var(--cockpit-text-muted);
}

/* ============================================
   SIDEBAR - COMMAND CENTER
   ============================================ */
.cockpit-sidebar {
  background: linear-gradient(180deg, var(--cockpit-bg-main) 0%, var(--cockpit-bg-deep) 100%);
  border-right: 1px solid var(--cockpit-border);
  display: flex;
  flex-direction: column;
}

.cockpit-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cockpit-border);
}

.cockpit-sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--cockpit-shadow-glow);
}

.cockpit-sidebar-logo-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.cockpit-sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.cockpit-sidebar-logo-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--cockpit-text-primary);
  letter-spacing: -0.02em;
}

.cockpit-sidebar-logo-subtitle {
  font-size: 11px;
  color: var(--cockpit-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Navigation Items */
.cockpit-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.cockpit-nav-section {
  margin-bottom: 24px;
}

.cockpit-nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--cockpit-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 12px 8px;
}

.cockpit-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--cockpit-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.15s ease,
              color 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.cockpit-nav-item:hover {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-primary);
}

.cockpit-nav-item:active {
  transform: scale(0.98);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

.cockpit-nav-item.active {
  background: var(--cockpit-accent-muted);
  color: var(--cockpit-accent);
  border-left: 3px solid var(--cockpit-accent);
  margin-left: -3px;
  padding-left: 19px;
}

.cockpit-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--cockpit-accent);
  border-radius: 0 3px 3px 0;
}

.cockpit-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cockpit-nav-item .badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-nav-item .badge-orange {
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.cockpit-nav-item .badge-blue {
  background: linear-gradient(135deg, var(--cockpit-info) 0%, #2563eb 100%);
  color: white;
}

/* User Section */
.cockpit-user-section {
  padding: 16px 20px;
  border-top: 1px solid var(--cockpit-border);
  background: var(--cockpit-bg-panel);
}

.cockpit-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cockpit-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.cockpit-user-info {
  flex: 1;
  min-width: 0;
}

.cockpit-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cockpit-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-user-role {
  font-size: 12px;
  color: var(--cockpit-text-muted);
}

.cockpit-logout-btn {
  padding: 8px;
  border-radius: 8px;
  color: var(--cockpit-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cockpit-logout-btn:hover {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-danger);
}

/* ============================================
   HEADER - INSTRUMENT PANEL
   ============================================ */
.cockpit-header {
  height: 64px;
  background: var(--cockpit-bg-panel);
  border-bottom: 1px solid var(--cockpit-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.cockpit-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cockpit-text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cockpit-header-title svg {
  width: 24px;
  height: 24px;
  color: var(--cockpit-accent);
}

.cockpit-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.cockpit-main {
  background: var(--cockpit-bg-deep);
  min-height: 100vh;
  padding: 24px;
}

.cockpit-container {
  max-width: 1600px;
  margin: 0 auto;
}

/* ============================================
   GAUGE CARDS - INSTRUMENT CLUSTER
   ============================================ */
.cockpit-gauges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .cockpit-gauges {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cockpit-gauge {
  background: var(--cockpit-bg-card);
  border: 1px solid var(--cockpit-border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.15s ease,
              box-shadow 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.cockpit-gauge:hover {
  transform: translateY(-3px);
  border-color: var(--cockpit-border-accent);
  box-shadow: var(--cockpit-shadow-md), 0 0 30px rgba(249, 115, 22, 0.15);
}

.cockpit-gauge:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

.cockpit-gauge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gauge-color, var(--cockpit-accent));
  opacity: 0.8;
}

.cockpit-gauge-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cockpit-gauge-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gauge-bg, var(--cockpit-accent-muted));
}

.cockpit-gauge-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gauge-color, var(--cockpit-accent));
}

.cockpit-gauge-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gauge-color, var(--cockpit-accent));
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 var(--gauge-glow, rgba(249, 115, 22, 0.5));
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 10px 5px var(--gauge-glow, rgba(249, 115, 22, 0.3));
  }
}

.cockpit-gauge-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--cockpit-text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
}

.cockpit-gauge-label {
  font-size: 13px;
  color: var(--cockpit-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gauge color variants */
.cockpit-gauge--open {
  --gauge-color: var(--cockpit-warning);
  --gauge-bg: var(--cockpit-warning-muted);
  --gauge-glow: rgba(234, 179, 8, 0.5);
}

.cockpit-gauge--progress {
  --gauge-color: var(--cockpit-info);
  --gauge-bg: var(--cockpit-info-muted);
  --gauge-glow: rgba(59, 130, 246, 0.5);
}

.cockpit-gauge--closed {
  --gauge-color: var(--cockpit-success);
  --gauge-bg: var(--cockpit-success-muted);
  --gauge-glow: rgba(34, 197, 94, 0.5);
}

.cockpit-gauge--queue {
  --gauge-color: #8b5cf6;
  --gauge-bg: rgba(139, 92, 246, 0.15);
  --gauge-glow: rgba(139, 92, 246, 0.5);
}

/* ============================================
   PANEL CARDS - INFORMATION DISPLAYS
   ============================================ */
.cockpit-panel {
  background: var(--cockpit-bg-card);
  border: 1px solid var(--cockpit-border);
  border-radius: 16px;
  overflow: hidden;
}

.cockpit-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--cockpit-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--cockpit-bg-elevated) 0%, var(--cockpit-bg-card) 100%);
}

.cockpit-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cockpit-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cockpit-panel-title svg {
  width: 20px;
  height: 20px;
  color: var(--cockpit-accent);
}

.cockpit-panel-action {
  font-size: 13px;
  color: var(--cockpit-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.cockpit-panel-action:hover {
  color: var(--cockpit-accent-hover);
}

.cockpit-panel-body {
  padding: 0;
}

/* ============================================
   STATS GRID
   ============================================ */
.cockpit-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px;
}

@media (max-width: 768px) {
  .cockpit-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cockpit-stat {
  background: var(--cockpit-bg-elevated);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}

.cockpit-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--stat-color, var(--cockpit-accent));
}

.cockpit-stat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cockpit-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stat-bg, var(--cockpit-accent-muted));
}

.cockpit-stat-icon svg {
  width: 16px;
  height: 16px;
  color: var(--stat-color, var(--cockpit-accent));
}

.cockpit-stat-label {
  font-size: 12px;
  color: var(--cockpit-text-muted);
}

.cockpit-stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--stat-color, var(--cockpit-accent));
}

.cockpit-stat--blue {
  --stat-color: var(--cockpit-info);
  --stat-bg: var(--cockpit-info-muted);
}

.cockpit-stat--green {
  --stat-color: var(--cockpit-success);
  --stat-bg: var(--cockpit-success-muted);
}

.cockpit-stat--purple {
  --stat-color: #8b5cf6;
  --stat-bg: rgba(139, 92, 246, 0.15);
}

.cockpit-stat--amber {
  --stat-color: var(--cockpit-warning);
  --stat-bg: var(--cockpit-warning-muted);
}

/* ============================================
   CONVERSATION LIST
   ============================================ */
.cockpit-conversation-list {
  display: flex;
  flex-direction: column;
}

.cockpit-conversation-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cockpit-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cockpit-conversation-row:last-child {
  border-bottom: none;
}

.cockpit-conversation-row:hover {
  background: var(--cockpit-bg-elevated);
}

.cockpit-conversation-row:active {
  transform: scale(0.995);
  background: var(--cockpit-bg-panel);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), background 0.08s ease;
}

.cockpit-conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--cockpit-shadow-sm);
}

.cockpit-conversation-avatar svg {
  width: 22px;
  height: 22px;
}

.cockpit-conversation-content {
  flex: 1;
  min-width: 0;
}

.cockpit-conversation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.cockpit-conversation-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cockpit-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-conversation-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cockpit-conversation-status--open {
  background: var(--cockpit-success-muted);
  color: var(--cockpit-success);
}

.cockpit-conversation-status--closed {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-muted);
}

.cockpit-conversation-preview {
  font-size: 13px;
  color: var(--cockpit-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-conversation-preview strong {
  color: var(--cockpit-text-muted);
  font-weight: 500;
}

.cockpit-conversation-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--cockpit-text-muted);
}

.cockpit-conversation-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cockpit-conversation-meta-item svg {
  width: 14px;
  height: 14px;
}

.cockpit-conversation-arrow {
  width: 20px;
  height: 20px;
  color: var(--cockpit-text-dim);
  flex-shrink: 0;
}

/* ============================================
   SYSTEM STATUS
   ============================================ */
.cockpit-status-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cockpit-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--cockpit-bg-elevated);
  border-radius: 10px;
}

.cockpit-status-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cockpit-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.cockpit-status-dot--active {
  background: var(--cockpit-success);
}

.cockpit-status-dot--active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--cockpit-success);
  opacity: 0.3;
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0; }
}

.cockpit-status-dot--inactive {
  background: var(--cockpit-text-muted);
}

.cockpit-status-label {
  font-size: 14px;
  color: var(--cockpit-text-secondary);
}

.cockpit-status-value {
  font-size: 13px;
  font-weight: 600;
}

.cockpit-status-value--active {
  color: var(--cockpit-success);
}

.cockpit-status-value--inactive {
  color: var(--cockpit-text-muted);
}

/* ============================================
   ROLE BADGES
   ============================================ */
.cockpit-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cockpit-role-badge--tech_specialist {
  background: linear-gradient(135deg, var(--cockpit-info) 0%, #2563eb 100%);
  color: white;
}

.cockpit-role-badge--supervisor {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.cockpit-role-badge--manager {
  background: linear-gradient(135deg, var(--cockpit-success) 0%, #16a34a 100%);
  color: white;
}

.cockpit-role-badge--director {
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  color: white;
}

.cockpit-role-badge--admin {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* ============================================
   ONLINE STATUS INDICATOR
   ============================================ */
.cockpit-online-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.cockpit-online-status--online {
  background: var(--cockpit-success-muted);
  color: var(--cockpit-success);
}

.cockpit-online-status--online .cockpit-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cockpit-success);
  position: relative;
}

.cockpit-online-status--online .cockpit-online-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cockpit-success);
  animation: ping 1.5s infinite;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.cockpit-online-status--offline {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-muted);
}

.cockpit-online-status--offline .cockpit-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cockpit-text-muted);
}

/* ============================================
   BUTTONS - With tactile feedback
   ============================================ */
.cockpit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.15s ease,
              background 0.15s ease,
              border-color 0.15s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Ripple effect base */
.cockpit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
              rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0);
  transition: transform 0.4s ease-out, opacity 0.3s ease-out;
  pointer-events: none;
}

.cockpit-btn:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 0.1s ease-out, opacity 0s;
}

/* Primary button */
.cockpit-btn--primary {
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.cockpit-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
}

.cockpit-btn--primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Secondary button */
.cockpit-btn--secondary {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-secondary);
  border: 1px solid var(--cockpit-border);
}

.cockpit-btn--secondary::after {
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
              rgba(249, 115, 22, 0.2) 0%, transparent 60%);
}

.cockpit-btn--secondary:hover {
  background: var(--cockpit-bg-panel);
  color: var(--cockpit-text-primary);
  border-color: var(--cockpit-border-accent);
  transform: translateY(-1px);
}

.cockpit-btn--secondary:active {
  transform: translateY(0) scale(0.97);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Danger button */
.cockpit-btn--danger {
  background: linear-gradient(135deg, var(--cockpit-danger) 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cockpit-btn--danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.cockpit-btn--danger:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Success button */
.cockpit-btn--success {
  background: linear-gradient(135deg, var(--cockpit-success) 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.cockpit-btn--success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.cockpit-btn--success:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Ghost/Icon-only button */
.cockpit-btn--ghost {
  background: transparent;
  color: var(--cockpit-text-secondary);
  padding: 8px;
}

.cockpit-btn--ghost:hover {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-primary);
}

.cockpit-btn--ghost:active {
  transform: scale(0.92);
  background: var(--cockpit-bg-panel);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

.cockpit-btn svg {
  width: 18px;
  height: 18px;
}

/* Button sizes */
.cockpit-btn--sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.cockpit-btn--lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

/* Disabled state */
.cockpit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.cockpit-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.cockpit-empty {
  text-align: center;
  padding: 60px 20px;
}

.cockpit-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--cockpit-bg-elevated);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-empty-icon svg {
  width: 32px;
  height: 32px;
  color: var(--cockpit-text-muted);
}

.cockpit-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--cockpit-text-secondary);
  margin-bottom: 8px;
}

.cockpit-empty-text {
  font-size: 14px;
  color: var(--cockpit-text-muted);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.cockpit-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cockpit-grid-3 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .cockpit-grid-2,
  .cockpit-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MOBILE HEADER
   ============================================ */
.cockpit-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--cockpit-bg-panel);
  border-bottom: 1px solid var(--cockpit-border);
}

@media (max-width: 1024px) {
  .cockpit-mobile-header {
    display: block;
  }

  .cockpit-sidebar {
    display: none;
  }

  .cockpit-main {
    padding-top: 80px;
  }
}

.cockpit-mobile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
}

.cockpit-mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cockpit-mobile-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-mobile-logo-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.cockpit-mobile-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--cockpit-text-primary);
}

.cockpit-mobile-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cockpit-mobile-nav-item {
  padding: 8px;
  border-radius: 8px;
  color: var(--cockpit-text-muted);
  position: relative;
}

.cockpit-mobile-nav-item.active {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-accent);
}

.cockpit-mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

.cockpit-mobile-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cockpit-bg-panel);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.cockpit-theme-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--cockpit-bg-elevated);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

.cockpit-theme-toggle.active {
  background: var(--cockpit-accent);
}

.cockpit-theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: white;
  box-shadow: var(--cockpit-shadow-sm);
  transition: transform 0.2s ease;
}

.cockpit-theme-toggle.active .cockpit-theme-toggle-knob {
  transform: translateX(20px);
}

/* ============================================
   LANGUAGE TOGGLE
   ============================================ */
.cockpit-lang-toggle {
  display: flex;
  gap: 6px;
}

.cockpit-lang-btn {
  width: 32px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-lang-btn--inactive {
  background: var(--cockpit-bg-elevated);
  color: var(--cockpit-text-muted);
}

.cockpit-lang-btn--inactive:hover {
  background: var(--cockpit-bg-panel);
  color: var(--cockpit-text-secondary);
}

.cockpit-lang-btn--ua {
  background: #005bbb;
  color: white;
}

.cockpit-lang-btn--ru {
  background: #d52b1e;
  color: white;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.cockpit-flash {
  margin: 24px 24px 0;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cockpit-flash--success {
  background: var(--cockpit-success-muted);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.cockpit-flash--success svg {
  color: var(--cockpit-success);
}

.cockpit-flash--success p {
  color: var(--cockpit-success);
}

.cockpit-flash--error {
  background: var(--cockpit-danger-muted);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cockpit-flash--error svg {
  color: var(--cockpit-danger);
}

.cockpit-flash--error p {
  color: var(--cockpit-danger);
}

.cockpit-flash svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cockpit-flash p {
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   TEAM STATS CARD
   ============================================ */
.cockpit-team-stats {
  padding: 20px;
}

.cockpit-team-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--cockpit-border-light);
}

.cockpit-team-stat-row:last-child {
  border-bottom: none;
}

.cockpit-team-stat-label {
  font-size: 14px;
  color: var(--cockpit-text-secondary);
}

.cockpit-team-stat-value {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.cockpit-team-stat-value--green {
  color: var(--cockpit-success);
}

.cockpit-team-stat-value--default {
  color: var(--cockpit-text-primary);
}

.cockpit-team-stat-value--amber {
  color: var(--cockpit-warning);
}

/* ============================================
   SETTINGS FOOTER (Language/Theme)
   ============================================ */
.cockpit-settings-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--cockpit-border);
  background: var(--cockpit-bg-panel);
}

.cockpit-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.cockpit-settings-label {
  font-size: 12px;
  color: var(--cockpit-text-muted);
}

/* ============================================
   GLOBAL TACTILE FEEDBACK FOR ALL BUTTONS
   Applies to Tailwind buttons within cockpit
   ============================================ */

/* All clickable buttons in cockpit theme */
.cockpit-theme button:not(.cockpit-btn):not([disabled]),
.cockpit-theme [role="button"]:not(.cockpit-btn) {
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.15s ease,
              box-shadow 0.15s ease,
              opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cockpit-theme button:not(.cockpit-btn):not([disabled]):active,
.cockpit-theme [role="button"]:not(.cockpit-btn):active {
  transform: scale(0.96);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tailwind rounded buttons (common pattern) */
.cockpit-theme .rounded-xl:active,
.cockpit-theme .rounded-lg:active,
.cockpit-theme .rounded-full:active {
  transform: scale(0.97);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon buttons (small square buttons) */
.cockpit-theme button[class*="w-8"][class*="h-8"]:active,
.cockpit-theme button[class*="w-9"][class*="h-9"]:active,
.cockpit-theme button[class*="w-10"][class*="h-10"]:active {
  transform: scale(0.9);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Primary action buttons (orange bg) */
.cockpit-theme button[class*="bg-orange"]:not([disabled]):hover,
.cockpit-theme a[class*="bg-orange"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}

.cockpit-theme button[class*="bg-orange"]:not([disabled]):active,
.cockpit-theme a[class*="bg-orange"]:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Success buttons (green bg) */
.cockpit-theme button[class*="bg-emerald"]:not([disabled]):hover,
.cockpit-theme button[class*="bg-green"]:not([disabled]):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.cockpit-theme button[class*="bg-emerald"]:not([disabled]):active,
.cockpit-theme button[class*="bg-green"]:not([disabled]):active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Danger buttons (red bg) */
.cockpit-theme button[class*="bg-red"]:not([disabled]):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.cockpit-theme button[class*="bg-red"]:not([disabled]):active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.08s ease;
}

/* Secondary/Ghost buttons (slate bg) */
.cockpit-theme button[class*="bg-slate"]:not([disabled]):hover {
  transform: translateY(-1px);
}

.cockpit-theme button[class*="bg-slate"]:not([disabled]):active {
  transform: translateY(0) scale(0.97);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Links as buttons */
.cockpit-theme a[class*="rounded"]:not([class*="no-click"]):hover {
  transform: translateY(-1px);
}

.cockpit-theme a[class*="rounded"]:not([class*="no-click"]):active {
  transform: translateY(0) scale(0.98);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile nav items */
.cockpit-mobile-nav-item:active {
  transform: scale(0.9);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CONVERSATION/QUEUE ROW TACTILE FEEDBACK
   ============================================ */

/* Conversation rows in list - the long clickable strips */
.cockpit-theme .conversation-row,
.cockpit-theme [data-assignment-id],
.cockpit-theme .queue-item {
  position: relative;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Hover effect - subtle lift and glow */
.cockpit-theme .conversation-row:hover,
.cockpit-theme [data-assignment-id]:hover,
.cockpit-theme .queue-item:hover {
  transform: translateX(4px);
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Dark mode hover */
.dark .cockpit-theme .conversation-row:hover,
.dark .cockpit-theme [data-assignment-id]:hover,
.dark .cockpit-theme .queue-item:hover {
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Active/pressed effect - compress and darker */
.cockpit-theme .conversation-row:active,
.cockpit-theme [data-assignment-id]:active,
.cockpit-theme .queue-item:active {
  transform: translateX(2px) scale(0.995);
  background-color: rgba(249, 115, 22, 0.08) !important;
  box-shadow: inset 4px 0 0 0 #ea580c,
              0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.08s ease,
              box-shadow 0.08s ease;
}

/* Dark mode active */
.dark .cockpit-theme .conversation-row:active,
.dark .cockpit-theme [data-assignment-id]:active,
.dark .cockpit-theme .queue-item:active {
  background-color: rgba(249, 115, 22, 0.15) !important;
  box-shadow: inset 4px 0 0 0 #ea580c,
              0 1px 6px rgba(0, 0, 0, 0.25);
}

/* Hover state for divs with hover:bg-slate classes (queue items) */
.cockpit-theme div[class*="hover:bg-slate"]:not(button):not(a) {
  position: relative;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.cockpit-theme div[class*="hover:bg-slate"]:not(button):not(a):hover {
  transform: translateX(4px);
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 8px rgba(0, 0, 0, 0.06);
}

.dark .cockpit-theme div[class*="hover:bg-slate"]:not(button):not(a):hover {
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 12px rgba(0, 0, 0, 0.2);
}

.cockpit-theme div[class*="hover:bg-slate"]:not(button):not(a):active {
  transform: translateX(2px) scale(0.995);
  background-color: rgba(249, 115, 22, 0.08) !important;
  box-shadow: inset 4px 0 0 0 #ea580c,
              0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.08s ease,
              box-shadow 0.08s ease;
}

.dark .cockpit-theme div[class*="hover:bg-slate"]:not(button):not(a):active {
  background-color: rgba(249, 115, 22, 0.15) !important;
}

/* Links that look like rows (block p-4, etc) */
.cockpit-theme a[class*="block"][class*="p-"]:not([class*="no-row-effect"]) {
  position: relative;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.cockpit-theme a[class*="block"][class*="p-"]:not([class*="no-row-effect"]):hover {
  transform: translateX(4px);
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 8px rgba(0, 0, 0, 0.06);
}

.dark .cockpit-theme a[class*="block"][class*="p-"]:not([class*="no-row-effect"]):hover {
  box-shadow: inset 4px 0 0 0 #f97316,
              0 2px 12px rgba(0, 0, 0, 0.2);
}

.cockpit-theme a[class*="block"][class*="p-"]:not([class*="no-row-effect"]):active {
  transform: translateX(2px) scale(0.995);
  background-color: rgba(249, 115, 22, 0.08) !important;
  box-shadow: inset 4px 0 0 0 #ea580c;
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.08s ease,
              box-shadow 0.08s ease;
}

/* Logout button */
.cockpit-logout-btn:active {
  transform: scale(0.92);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel action links */
.cockpit-panel-action:active {
  transform: scale(0.97);
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
.cockpit-theme button:focus-visible,
.cockpit-theme a:focus-visible,
.cockpit-theme [role="button"]:focus-visible {
  outline: 2px solid var(--cockpit-accent);
  outline-offset: 2px;
}

/* ============================================
   MICRO-ANIMATIONS
   ============================================ */

/* Message slide-in animation */
@keyframes message-slide-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-message-in {
  animation: message-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* New message highlight pulse */
@keyframes message-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

.animate-message-new {
  animation: message-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             message-highlight 0.6s ease-out 0.2s;
}

/* Bounce animation for new ticket */
@keyframes ticket-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  15% {
    transform: translateY(-12px);
  }
  30% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-2px);
  }
}

.animate-ticket-bounce {
  animation: ticket-bounce 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

/* Ticket pop-in animation */
@keyframes ticket-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.8) translateX(-20px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateX(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.animate-ticket-new {
  animation: ticket-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             ticket-bounce 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) 0.4s;
}

/* Success checkmark animation */
@keyframes checkmark-draw {
  0% {
    stroke-dashoffset: 24;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.animate-checkmark {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkmark-draw 0.4s ease-out forwards;
}

/* Fade in up */
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.3s ease-out forwards;
}

/* Fade in scale */
@keyframes fade-in-scale {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-scale {
  animation: fade-in-scale 0.25s ease-out forwards;
}

/* Shake animation for errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Badge pulse for notifications */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
  }
}

.animate-badge-pulse {
  animation: badge-pulse 1.5s ease-in-out infinite;
}

/* Typing indicator dots */
@keyframes typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  background: var(--cockpit-bg-elevated);
  border-radius: 16px;
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  background: var(--cockpit-text-muted);
  border-radius: 50%;
  animation: typing-dot 1.4s ease-in-out infinite;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */

.glass-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Modal glassmorphism */
.glass-modal {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html:not(.dark) .glass-modal {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Glass backdrop for modals */
.glass-backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ============================================
   CONTEXTUAL CHANNEL COLORS
   ============================================ */

/* Telegram theme */
.channel-context-telegram {
  --channel-primary: #2aabee;
  --channel-primary-muted: rgba(42, 171, 238, 0.15);
  --channel-primary-glow: rgba(42, 171, 238, 0.3);
  --channel-gradient: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
}

.channel-context-telegram .cockpit-gauge--open,
.channel-context-telegram .kpi-card:first-child {
  --gauge-color: var(--channel-primary);
  --gauge-bg: var(--channel-primary-muted);
}

.channel-context-telegram .message-bubble-client {
  background: var(--channel-gradient) !important;
}

/* Viber theme */
.channel-context-viber {
  --channel-primary: #7360f2;
  --channel-primary-muted: rgba(115, 96, 242, 0.15);
  --channel-primary-glow: rgba(115, 96, 242, 0.3);
  --channel-gradient: linear-gradient(135deg, #7360f2 0%, #665ae0 100%);
}

.channel-context-viber .cockpit-gauge--open,
.channel-context-viber .kpi-card:first-child {
  --gauge-color: var(--channel-primary);
  --gauge-bg: var(--channel-primary-muted);
}

.channel-context-viber .message-bubble-client {
  background: var(--channel-gradient) !important;
}

/* WhatsApp theme */
.channel-context-whatsapp {
  --channel-primary: #25d366;
  --channel-primary-muted: rgba(37, 211, 102, 0.15);
  --channel-primary-glow: rgba(37, 211, 102, 0.3);
  --channel-gradient: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.channel-context-whatsapp .cockpit-gauge--open,
.channel-context-whatsapp .kpi-card:first-child {
  --gauge-color: var(--channel-primary);
  --gauge-bg: var(--channel-primary-muted);
}

.channel-context-whatsapp .message-bubble-client {
  background: var(--channel-gradient) !important;
}

/* Web theme (default/neutral) */
.channel-context-web {
  --channel-primary: #3b82f6;
  --channel-primary-muted: rgba(59, 130, 246, 0.15);
  --channel-primary-glow: rgba(59, 130, 246, 0.3);
  --channel-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Channel header accent line */
.channel-accent-line {
  height: 3px;
  background: var(--channel-gradient, linear-gradient(135deg, var(--cockpit-accent) 0%, #ea580c 100%));
  border-radius: 0 0 3px 3px;
}

/* Channel glow effect on conversation header */
.channel-header-glow {
  position: relative;
}

.channel-header-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: radial-gradient(ellipse at top, var(--channel-primary-glow, rgba(249, 115, 22, 0.1)) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   CONFETTI EFFECT (CSS-only simple version)
   ============================================ */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes confetti-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(15px); }
  75% { transform: translateX(-15px); }
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 3s ease-in-out forwards,
             confetti-shake 0.5s ease-in-out infinite;
}

.confetti-piece:nth-child(odd) {
  border-radius: 50%;
}

.confetti-piece:nth-child(1) { left: 10%; background: #f97316; animation-delay: 0s; }
.confetti-piece:nth-child(2) { left: 20%; background: #22c55e; animation-delay: 0.1s; }
.confetti-piece:nth-child(3) { left: 30%; background: #3b82f6; animation-delay: 0.2s; }
.confetti-piece:nth-child(4) { left: 40%; background: #eab308; animation-delay: 0.15s; }
.confetti-piece:nth-child(5) { left: 50%; background: #8b5cf6; animation-delay: 0.25s; }
.confetti-piece:nth-child(6) { left: 60%; background: #ef4444; animation-delay: 0.05s; }
.confetti-piece:nth-child(7) { left: 70%; background: #06b6d4; animation-delay: 0.3s; }
.confetti-piece:nth-child(8) { left: 80%; background: #f97316; animation-delay: 0.12s; }
.confetti-piece:nth-child(9) { left: 90%; background: #22c55e; animation-delay: 0.22s; }
.confetti-piece:nth-child(10) { left: 15%; background: #ec4899; animation-delay: 0.18s; }
.confetti-piece:nth-child(11) { left: 25%; background: #14b8a6; animation-delay: 0.08s; }
.confetti-piece:nth-child(12) { left: 35%; background: #f59e0b; animation-delay: 0.28s; }
.confetti-piece:nth-child(13) { left: 45%; background: #6366f1; animation-delay: 0.13s; }
.confetti-piece:nth-child(14) { left: 55%; background: #10b981; animation-delay: 0.23s; }
.confetti-piece:nth-child(15) { left: 65%; background: #f43f5e; animation-delay: 0.03s; }
.confetti-piece:nth-child(16) { left: 75%; background: #0ea5e9; animation-delay: 0.33s; }
.confetti-piece:nth-child(17) { left: 85%; background: #a855f7; animation-delay: 0.17s; }
.confetti-piece:nth-child(18) { left: 95%; background: #84cc16; animation-delay: 0.27s; }
.confetti-piece:nth-child(19) { left: 5%; background: #fb923c; animation-delay: 0.07s; }
.confetti-piece:nth-child(20) { left: 50%; background: #2dd4bf; animation-delay: 0.35s; }

/* ============================================
   SKELETON LOADING STATES
   ============================================ */

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--cockpit-bg-elevated) 0%,
    var(--cockpit-bg-panel) 20%,
    var(--cockpit-bg-elevated) 40%,
    var(--cockpit-bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

html:not(.dark) .skeleton {
  background: linear-gradient(
    90deg,
    #e2e8f0 0%,
    #f1f5f9 20%,
    #e2e8f0 40%,
    #e2e8f0 100%
  );
  background-size: 200% 100%;
}

.skeleton-text {
  height: 14px;
  border-radius: 4px;
}

.skeleton-text-sm {
  height: 10px;
  border-radius: 3px;
}

.skeleton-text-lg {
  height: 20px;
  border-radius: 5px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.skeleton-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.skeleton-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.skeleton-button {
  height: 40px;
  border-radius: 10px;
}

.skeleton-card {
  border-radius: 16px;
  padding: 20px;
}

/* Skeleton message bubble */
.skeleton-message {
  display: flex;
  gap: 12px;
  padding: 12px 0;
}

.skeleton-message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Skeleton conversation row */
.skeleton-conversation-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cockpit-border);
}

.skeleton-conversation-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
