﻿/* Hide mobile-only elements on desktop */
.mobile-detail-tabs {
  display: none;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   CENTRALIZED THEME VARIABLES
   All colors should reference these variables
   ============================================ */
:root {
  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #f3f4f6;
  --bg-active: #e5e7eb;
  --bg-page: #fafbfc;

  /* Border Colors */
  --border-color: #e5e7eb;
  --border-secondary: #d1d5db;
  --border-light: #f3f4f6;

  /* Brand/Accent Colors (same in both themes) */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --accent-warning: #f59e0b;
  --accent-warning-hover: #d97706;
  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body.dark-theme {
  /* Text Colors */
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #111827;

  /* Background Colors */
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --bg-tertiary: #374151;
  --bg-hover: #374151;
  --bg-active: #4b5563;
  --bg-page: #111827;

  /* Border Colors */
  --border-color: #374151;
  --border-secondary: #4b5563;
  --border-light: #374151;

  /* Shadows (darker for dark mode) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Loading Button Styles */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: btn-spin 1s linear infinite;
  color: inherit;
}

.btn-loading.action-btn::after,
.btn-loading.messaging-action-btn::after {
  border-top-color: #ffffff;
}

.btn-loading.messaging-action-btn.secondary::after {
  border-top-color: #000000;
}

.dark-theme .btn-loading.messaging-action-btn.secondary::after {
  border-top-color: #ffffff;
}

.btn-loading.action-btn.secondary::after {
  border-top-color: #000000;
}

.btn-loading.action-btn.danger::after {
  border-top-color: #ffffff;
}

.btn-loading.action-btn.cancel::after {
  border-top-color: #000000;
}

.dark-theme .btn-loading.action-btn.secondary::after,
.dark-theme .btn-loading.action-btn.cancel::after {
  border-top-color: #ffffff;
}

/* Loading spinner for different button types */
.btn-loading.new-ticket-btn::after,
.btn-loading.export-btn::after {
  border-top-color: #ffffff;
}

.btn-loading.btn-primary::after {
  border-top-color: #ffffff;
}

.btn-loading.quick-action-btn::after,
.btn-loading.tool-btn::after {
  border-top-color: #3b82f6;
}

.btn-loading.send-button::after,
.btn-loading.ai-send-button::after {
  border-top-color: #ffffff;
}

.btn-loading.feedback-submit-btn::after {
  border-top-color: #ffffff;
}

@keyframes btn-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Container loading overlay */
.container-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
  min-height: 60px;
}

.container-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border: 3px solid transparent;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: btn-spin 1s linear infinite;
  z-index: 10;
}

/* Accordion styles for Bot Sets */
.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-set {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.15s ease;
}

.accordion-set:hover {
  border-color: var(--border-secondary);
}

.accordion-set.expanded {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.accordion-set-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  gap: 12px;
  user-select: none;
}

.accordion-set-header:hover {
  background: var(--bg-secondary);
}

.accordion-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion-set.expanded .accordion-toggle {
  transform: rotate(90deg);
}

.accordion-set-info {
  flex: 1;
  min-width: 0;
}

.accordion-set-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.accordion-set-summary {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
}

.accordion-set-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.accordion-set-content {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-color);
}

.accordion-set.expanded .accordion-set-content {
  display: block;
}

.accordion-channels-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 8px;
}

.accordion-channels-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.accordion-channels-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 12px;
}

.accordion-channel-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.accordion-channel-item:last-child {
  border-bottom: none;
}

.accordion-channel-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.accordion-channel-name {
  flex: 1;
  color: var(--text-primary);
}

.accordion-channel-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.accordion-set-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Dark theme accordion now handled by CSS variables */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-page);
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Dashboard Body */
.dashboard-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  height: 100vh;
  background: var(--bg-page);
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

/* Collapsed sidebar state */
body.sidebar-collapsed .sidebar {
  width: 72px;
}

body.sidebar-collapsed .sidebar .brand-text,
body.sidebar-collapsed .sidebar .nav-text,
body.sidebar-collapsed .sidebar .sidebar-footer .user-info,
body.sidebar-collapsed .sidebar .logout-btn span:last-child {
  display: none;
}

body.sidebar-collapsed .sidebar .logo-wrapper {
  width: 40px;
  height: 20px;
}

body.sidebar-collapsed .sidebar .sidebar-logo {
  width: 100%;
  height: auto;
}

/* Keep nav items compact when collapsed - same height as expanded */
body.sidebar-collapsed .sidebar .nav-item {
  justify-content: center;
  padding: 12px 20px;
  margin: 2px 12px;
}

/* Hover circle background on icons when collapsed */
body.sidebar-collapsed .sidebar .nav-item .nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
/* Remove full-row hover/active background when collapsed */
body.sidebar-collapsed .sidebar .nav-item:hover,
body.sidebar-collapsed .sidebar .nav-item.active {
  background: transparent;
}
body.sidebar-collapsed .sidebar .nav-item:hover .nav-icon {
  background: var(--bg-tertiary);
}
/* Active state indicator on icon when collapsed */
body.sidebar-collapsed .sidebar .nav-item.active .nav-icon {
  background: var(--bg-active);
}

/* Keep icon graphic same size when collapsed */
body.sidebar-collapsed .sidebar .nav-icon-img {
  width: 24px;
  height: 24px;
  position: relative;
}

/* Adjust footer layout when collapsed */
body.sidebar-collapsed .sidebar .user-profile {
  justify-content: center;
}

/* Shift main content when collapsed */
/* If layout relies on flex, we just allow the aside to shrink; keep content fluid */

.sidebar-header {
  padding: 12px 64px 16px 12px; /* reserve space on right for toggle */
  border-bottom: 1px solid var(--border-light);
  position: relative; /* anchor for absolute toggle */
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* center contents in expanded */
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center; /* center logo regardless of toggle */
  gap: 8px;
}

.logo-wrapper {
  position: relative;
  width: 110px; /* larger logo in expanded */
  height: 96px; /* slightly shorter to close vertical gap */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible; /* allow full logo */
  z-index: 1;
}

.sidebar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  position: static;
  transform: none;
  display: block;
}

.sidebar-logo.dark-logo {
  display: none;
}

body.dark-theme .sidebar-logo.light-logo {
  display: none;
}

body.dark-theme .sidebar-logo.dark-logo {
  display: block;
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.025em;
  text-align: center;
  margin-top: -10px; /* pull closer to logo */
  line-height: 1.1;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 2px 12px;
  border-radius: 8px;
  font-size: 14px;
  flex-direction: row !important;
}

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

.nav-item.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0.8;
  flex-shrink: 0;
}

.nav-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
}

/* Light/Dark icon switching for dashboard only */
.nav-icon-img.dark-icon {
  display: none;
}

body.dark-theme .nav-icon-img.light-icon {
  display: none;
}

body.dark-theme .nav-icon-img.dark-icon {
  display: block;
}

/* Dark mode icon filter for light icons */
body.dark-theme .nav-icon-img:not(.light-icon):not(.dark-icon) {
  filter: brightness(0) invert(1);
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-text {
  font-size: 14px;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 16px 20px 20px 20px;
  border-top: 1px solid var(--border-light);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1px;
}

.user-role {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.logout-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-secondary);
  color: var(--text-primary);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-page);
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

/* Sidebar toggle inside sidebar header */
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 3; /* above logo */
}
.sidebar-toggle:hover { background: var(--bg-tertiary); border-color: var(--border-secondary); }

/* Switch collapse/expand icon visibility based on state */
.icon-expand { display: none; }
body.sidebar-collapsed .icon-collapse { display: none; }
body.sidebar-collapsed .icon-expand { display: inline; }

/* Collapsed header layout: center toggle and hide logo/text */
body.sidebar-collapsed .sidebar-header { padding: 12px; }
body.sidebar-collapsed .sidebar .logo-wrapper { display: none; }
body.sidebar-collapsed .sidebar .brand-text { display: none; }
body.sidebar-collapsed .sidebar .sidebar-toggle {
  position: static;
  margin: 0 auto; /* center within header */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.header-left h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.025em;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
}

.header-right {
  display: flex;
  gap: 8px;
}

.export-btn,
.new-ticket-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.export-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.export-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
}

.new-ticket-btn {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.new-ticket-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Dashboard Sections */
.dashboard-section {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  scrollbar-gutter: stable; /* Prevent layout shift when scrollbar appears */
  display: none;
}

.dashboard-section.active {
  display: block;
}

/* Ticket Detail Page (inline replacement for messaging modal) */
.ticket-detail-page {
  display: none;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.ticket-detail-page.active {
  display: flex;
}

.ticket-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f8fafc);
  flex-shrink: 0;
}

.ticket-detail-header .back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-primary, #fff);
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.ticket-detail-header .back-btn:hover {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-primary, #1e293b);
  border-color: var(--accent-primary, #2563eb);
}

.ticket-detail-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.ticket-detail-title-area .messaging-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-detail-page .messaging-body {
  flex: 1;
  overflow: hidden;
  min-height: 0; /* Allow flex item to shrink below content size */
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.stat-card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-sm);
}

.stat-content {
  text-align: left;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-container {
  background: var(--bg-primary);
  padding: 24px 24px 60px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.chart-container > div {
  max-height: 350px;
}

/* ApexCharts custom styling */
.chart-container .apexcharts-canvas {
  max-height: 350px;
}

.chart-container .apexcharts-svg {
  background: transparent;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.chart-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-header select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
  padding-right: 26px;
}

.chart-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  text-align: center;
  padding: 5px;
  border-bottom: 1px solid var(--border-color);
}

.chart-subtitle span {
  font-weight: 500;
  color: var(--text-primary);
}

.quick-stats {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.quick-stats h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.quick-action-btn:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--border-secondary, #d1d5db);
  transform: translateY(-1px);
}

.quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-primary, #2563eb);
  color: white;
  flex-shrink: 0;
}

.action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin-bottom: 2px;
}

.action-desc {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
}

.ticket-types-chart {
  border-top: 1px solid var(--border-light, #f3f4f6);
  padding-top: 20px;
}

.ticket-types-chart > div {
  max-height: 180px;
}

/* ApexCharts custom styling for ticket types chart */
.ticket-types-chart .apexcharts-canvas {
  max-height: 180px;
}

.ticket-types-chart h4 {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

/* Recent Tickets */
.recent-tickets {
  background: var(--bg-primary, white);
  border-radius: 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.view-all-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-all-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-secondary);
}

/* Section Controls */
.filter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-controls select,
.filter-controls input {
  padding: 8px 12px;
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-page);
  color: var(--text-primary);
}

.filter-controls select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
  padding-right: 26px;
  cursor: pointer;
}

/* Filter controls use unified styling - no override needed */

.filter-controls input {
  min-width: 200px;
}

/* Filter checkbox label */
.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  background: var(--bg-page);
  user-select: none;
}

.filter-checkbox-label:hover {
  background: var(--bg-tertiary);
}

.filter-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* Sorting controls use unified styling with specific width */
#sort-filter,
#all-sort-filter {
  min-width: 160px;
}

/* Multi-Select Server Filter */
.server-filter-container {
  position: relative;
  display: inline-block;
}

.server-filter-button {
  display: flex;
  align-items: center;
  padding: 8px 26px 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  min-width: 150px;
  transition: all 0.2s ease;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
}

.server-filter-button:hover { border-color: var(--border-secondary); }

.server-filter-button.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.server-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 350px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.server-filter-dropdown.active {
  display: block;
}

.server-filter-header {
  background: var(--bg-tertiary);
}

.server-filter-divider {
  height: 1px;
  background: var(--bg-tertiary);
}

.server-filter-list {
  padding: 0;
}

.server-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 13px;
  color: var(--text-primary);
}

.server-checkbox-item:hover {
  background: var(--bg-tertiary);
}

.server-checkbox-item:last-child {
  border-bottom: none;
}

.server-checkbox-item input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.server-checkbox-item input[type="checkbox"]:checked + .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.server-checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.server-name {
  flex: 1;
  word-break: break-word;
}

.server-count {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* Dark theme styles for server filter */
.dark-theme .server-filter-button {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
  background-image: url("../images/dark-dropdown-arrow.svg");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
}

.dark-theme .server-filter-button:hover { border-color: #4b5563; }

.dark-theme .server-filter-header {
  background: #111827;
  border-color: #374151;
}

.dark-theme .server-filter-divider {
  background: #374151;
}

.dark-theme .server-checkbox-item {
  color: #f3f4f6;
}

.dark-theme .server-checkbox-item:hover {
  background: #374151;
}

.dark-theme .checkmark {
  border-color: #6b7280;
}

.dark-theme .server-checkbox-item input[type="checkbox"]:checked + .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.dark-theme .server-count {
  background: #374151;
  color: #9ca3af;
}

/* Tables */
.tickets-table-container {
  overflow-x: auto;
}

.tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tickets-table th,
.tickets-table td {
  text-align: left;
  padding: 12px; /* reduce horizontal padding to tighten column spacing */
  border-bottom: 1px solid var(--border-light);
}

.tickets-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.6;
  padding: 14px 12px;
  white-space: nowrap;
}

.tickets-table td {
  color: var(--text-secondary);
}

.tickets-table tr:hover {
  background: var(--bg-hover);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-open {
  background: #fef3c7;
  color: #92400e;
}
.status-closed {
  background: #d1fae5;
  color: #065f46;
}
.status-claimed {
  background: #dbeafe;
  color: #1e40af;
}
.status-active {
  background: #d1fae5;
  color: #065f46;
}
.status-inactive {
  background: #fecaca;
  color: #b91c1c;
}

/* Priority badges */
.priority-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  min-width: 60px;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.priority-low {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.priority-medium {
  background: #fef3c7;
  color: #92400e;
}
.priority-high {
  background: #fed7aa;
  color: #c2410c;
}
.priority-urgent {
  background: #fecaca;
  color: #dc2626;
}

/* Action Buttons */
.action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 100px;
  width: 100px;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.action-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-secondary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.action-btn.primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: 1px solid var(--accent-primary);
}

.action-btn.primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

.action-btn.secondary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: 1px solid var(--accent-primary);
}

.action-btn.secondary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

/* Cancel (grey) button */
.action-btn.cancel {
  background: var(--bg-active);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  height: 40px;
}

.action-btn.cancel:hover {
  background: var(--border-secondary);
  border-color: var(--text-muted);
}

.action-btn.success {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

.action-btn.success:hover {
  background: #047857;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.5);
}

.action-btn.warning {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

.action-btn.warning:hover {
  background: #b45309;
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.5);
}

.action-btn.danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.action-btn.danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.5);
}

/* Action buttons container */
.ticket-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Button icons (if added later) */
.action-btn .icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.action-btn:hover .icon {
  opacity: 1;
}

/* Priority Selection Modal */
.priority-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.priority-option {
  padding: 12px 16px !important;
  width: 100% !important;
  min-width: auto !important;
  text-transform: capitalize;
  font-weight: 600;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
}

.priority-option:hover {
  border-color: var(--accent-primary);
  background: #f0f9ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
  cursor: pointer;
}

.priority-option.selected {
  border-color: var(--accent-primary) !important;
  background: #dbeafe !important;
  color: #1e40af !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.priority-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-page), var(--bg-active));
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
  border-radius: 8px 8px 0 0;
}

.priority-modal-content {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: 0 0 8px 8px;
}

.priority-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-modal-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 16px 0 24px 0;
  font-weight: 500;
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.analytics-grid .chart-container {
  height: 320px;
  max-height: 320px;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Tools Stack */
.tools-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tool-card {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.tool-card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-sm);
}

/* Selected tool card highlight (e.g., chosen bot set) */
.tool-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.tool-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-btn {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.tool-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
}

/* Admin Sub-Tabs */
.admin-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  gap: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.03);
}

.admin-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

body.dark-theme .admin-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.setting-card {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.setting-card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-sm);
}

.setting-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.setting-item {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-item label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.theme-dropdown {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-size: 12px;
  background-position: right 10px center;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.theme-dropdown:hover {
  border-color: var(--border-secondary);
}

.theme-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

/* Notification Settings */
.notification-setting {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.setting-label {
  flex: 1;
}

.setting-help {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: normal;
  margin-top: 4px;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Permission Status Badge */
.permission-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.permission-status.enabled {
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
}

.permission-status.blocked {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Modals */
.modal,
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 8px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.modal-content.large {
  max-width: 720px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

/* Allow stacking a modal above another */
.modal.stack-top {
  z-index: 1200;
}

/* Generic modal body spacing */
.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* Reusable modal form elements */
.modal-form-body {
  padding: 20px 24px;
}

.modal-form-group {
  margin-bottom: 20px;
}

.modal-form-group:last-of-type {
  margin-bottom: 24px;
}

.modal-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.modal-input:disabled {
  background: var(--bg-secondary);
}

.modal-helper {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.modal-helper a {
  color: var(--accent-primary);
}

.modal-status {
  font-weight: normal;
  font-size: 12px;
}

.modal-status.success {
  color: var(--accent-success, #059669);
}

.modal-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.modal-actions-bar.spread {
  justify-content: space-between;
  align-items: center;
}

.modal-btn-cancel {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.modal-btn-cancel:hover {
  background: var(--bg-secondary);
}

.modal-btn-submit {
  padding: 10px 20px;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.modal-btn-submit:hover {
  filter: brightness(0.9);
}

/* Bot Sets modal helpers */
.cards-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Danger variant for small tool buttons */
.tool-btn.danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.tool-btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Allow server channel assignment to use radio inputs too */
.server-checkbox-item input[type="radio"] {
  display: none;
}

.server-checkbox-item input[type="radio"]:checked + .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.server-checkbox-item input[type="radio"]:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

/* Dark theme parity for danger tool button */
.dark-theme .tool-btn.danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.dark-theme .tool-btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Form Styles */
.form-group {
  margin: 12px 0 12px 0;
  padding: 0 24px;
}

.form-group:first-child {
  padding-top: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.15s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 12px;
  padding-right: 30px;
  cursor: pointer;
}

/* Form group selects inherit from unified select styling above */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.checkbox-list {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.checkbox-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid #f0f0f0;
}

.checkbox-list-item:last-child {
  border-bottom: none;
}

.checkbox-list-item:hover {
  background: var(--bg-tertiary, #f8fafc);
}

.checkbox-list-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.checkbox-list-empty {
  padding: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.dark-theme .checkbox-list {
  border-color: #374151;
}

.dark-theme .checkbox-list-item {
  border-bottom-color: #374151;
}

.dark-theme .checkbox-list-item:hover {
  background: #374151;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
}

.btn-primary,
.btn-secondary {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 240px;
  }

  /* AI Assistant tablet sizing */
  .ai-chat-container {
    height: calc(100vh - 160px);
    min-height: 550px;
  }
}

@media (max-width: 768px) {
  .dashboard-body {
    flex-direction: column;
  }

  .ai-chat-container {
    height: calc(100vh - 180px);
    min-height: 500px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .ai-chat-container {
    height: calc(100vh - 160px);
    min-height: 450px;
  }

  .dashboard-section {
    padding: 16px;
  }

  .main-header {
    padding: 16px;
  }
}

/* Top Logo - keeping original login styles for index page */
.top-logo {
  position: absolute;
  top: 30px;
  left: 60px;
}

.top-logo .logo-icon {
  position: relative;
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  z-index: 1000;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-image.dark-logo {
  display: none;
}

body.dark-theme .logo-image.light-logo {
  display: none;
}

body.dark-theme .logo-image.dark-logo {
  display: block;
}

/* Main login wrapper */
.login-wrapper {
  display: flex;
  height: calc(100vh - 40px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Left Branding Section */
.branding-section {
  flex: 1;
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 60px;
  overflow: hidden;
}

.branding-content {
  position: relative;
  z-index: 2;
  color: white;
}

.welcome-text h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  color: white;
  letter-spacing: -0.02em;
}

/* Decorative Elements */
.curve-decoration {
  position: absolute;
  right: -100px;
  top: 25%;
  transform: translateY(-50%);
  width: 300px;
  height: 600px;
  background: linear-gradient(45deg, #718096 0%, #a0aec0 100%);
  border-radius: 50%;
  opacity: 0.6;
}

.circle-decoration {
  position: absolute;
  right: -50px;
  bottom: -120px;
  width: 500px;
  height: 500px;
  background: #e2e8f0;
  border-radius: 50%;
  opacity: 0.8;
}

/* Right Login Section */
.login-section {
  flex: 1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 36px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 12px;
  text-align: left;
}

.login-subtitle {
  color: #718096;
  font-size: 16px;
  margin-bottom: 40px;
  line-height: 1.5;
}

.login-form {
  width: 100%;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: #5865f2;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  margin-bottom: 30px;
}

.discord-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.discord-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #718096;
  font-size: 14px;
  margin-bottom: 20px;
}

.shield-icon {
  width: 16px;
  height: 16px;
  color: #10b981;
}

.support-note {
  text-align: center;
  font-size: 13px;
  color: #718096;
  line-height: 1.5;
}

.support-note p {
  margin-bottom: 4px;
}

.support-email {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
}

.support-email:hover {
  text-decoration: underline;
}

/* Error Message Styles */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.error-text {
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
}

/* Context Tabs (My / All toggle for staff) */
.tickets-context-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  background: var(--bg-secondary, #f3f4f6);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
}

.context-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-tab.active {
  background: var(--bg-primary, white);
  color: var(--text-primary, #111827);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.context-tab:hover:not(.active) {
  color: var(--text-primary, #374151);
}

.context-tab .tab-count {
  background: var(--bg-tertiary, #e5e7eb);
  color: var(--text-secondary, #6b7280);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.context-tab.active .tab-count {
  background: #dbeafe;
  color: #1e40af;
}

/* Ticket Stats Badges */
.ticket-stats-badges {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

/* Dark Mode Styles */
body.dark-theme {
  color: #f9fafb;
}

/* Keep login page background light even in dark mode */
body.dark-theme .login-wrapper {
  background: #f8f9fa;
}

/* Apply dark background to dashboard body when in dark theme */
.dark-theme .dashboard-body {
  background: #111827;
}

/* Sidebar Dark Mode */
.dark-theme .sidebar {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .sidebar-header {
  border-color: #374151;
}

.dark-theme .brand-text {
  color: #f9fafb;
  text-align: center;
}

.dark-theme .nav-item {
  color: #9ca3af;
}

.dark-theme .nav-item:hover {
  background: #374151;
  color: #f3f4f6;
}

.dark-theme .nav-item.active {
  background: #374151;
  color: #f9fafb;
}

.dark-theme .sidebar-footer {
  border-color: #374151;
}

.dark-theme .user-name {
  color: #f9fafb;
}

.dark-theme .user-role {
  color: #9ca3af;
}

.dark-theme .logout-btn {
  border-color: #4b5563;
  color: #9ca3af;
}

.dark-theme .logout-btn:hover {
  background: #374151;
  border-color: #6b7280;
  color: #f3f4f6;
}

/* Main Content Dark Mode */
.dark-theme .main-content {
  background: #111827;
}

.dark-theme .main-header {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .page-title {
  color: #f9fafb;
}

.dark-theme .page-subtitle {
  color: #9ca3af;
}

.dark-theme .export-btn {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

.dark-theme .export-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
}

.dark-theme .new-ticket-btn {
  border-color: #4b5563;
  color: #f3f4f6;
}

.dark-theme .new-ticket-btn {
  background: #3b82f6;
}

.dark-theme .new-ticket-btn:hover {
  background: #2563eb;
}

/* Cards and Content Dark Mode - handled by CSS variables */
/* Keep dropdown arrow image swap for selects */
.dark-theme .chart-header select {
  background-image: url("../images/dark-dropdown-arrow.svg");
}

/* Recent Tickets, Action Buttons, and Table Dark Mode - handled by CSS variables */

/* Table, Filter, Tools, and Settings Dark Mode - handled by CSS variables */
/* Keep dropdown arrow image swaps */
.dark-theme .filter-controls select {
  background-image: url("../images/dark-dropdown-arrow.svg");
}

.dark-theme .theme-dropdown {
  background-image: url("../images/dark-dropdown-arrow.svg");
}

/* Modal and Form Dark Mode - handled by CSS variables */
/* Keep dropdown arrow image swaps for selects */
.dark-theme .form-group select,
.dark-theme select {
  background-image: url("../images/dark-dropdown-arrow.svg");
}

/* Buttons and Tabs Dark Mode - handled by CSS variables */

/* Priority badges need different colors in dark mode for contrast */
.dark-theme .priority-medium {
  background: #92400e;
  color: #fef3c7;
}
.dark-theme .priority-high {
  background: #c2410c;
  color: #fed7aa;
}
.dark-theme .priority-urgent {
  background: #dc2626;
  color: #fecaca;
}

/* Priority Modal Dark Theme - handled by CSS variables */
.dark-theme .priority-option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: #4b5563;
}

.dark-theme .priority-option:hover {
  border-color: #3b82f6;
  background: #1e3a8a;
  color: #93c5fd;
}

.dark-theme .priority-option.selected {
  border-color: #3b82f6 !important;
  background: #1e3a8a !important;
  color: #dbeafe !important;
}

.dark-theme .priority-modal-header {
  background: linear-gradient(135deg, #1f2937, #374151);
  border-color: #4b5563;
}

.dark-theme .priority-modal-content {
  background: #1f2937;
}

.dark-theme .priority-modal-title {
  color: #f9fafb;
}

.dark-theme .priority-modal-subtitle {
  color: #9ca3af;
}

/* Login Page Dark Mode - Removed to keep login page always in light mode */

/* Larger modal action buttons */
.action-btn.modal-action {
  font-size: 14px;
  padding: 10px 20px;
  width: auto;
  min-width: 120px;
}

.dark-theme .action-btn.cancel {
  background: #4b5563;
  color: #f3f4f6;
  border-color: #6b7280;
}

.dark-theme .action-btn.cancel:hover {
  background: #374151;
  border-color: #6b7280;
}

/* Ticket Detail & Messaging Styles */
.messaging-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.messaging-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.messaging-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.messaging-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.conversation-panel {
  flex: 2;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
}

/* Create a scrollable wrapper for messages and feedback */
.conversation-scroll-area {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-page);
}

.messages-container {
  padding: 20px;
  min-height: 0; /* Allow container to shrink */
}

.message {
  margin-bottom: 16px;
  max-width: 80%;
  animation: fadeInUp 0.3s ease;
}

.message.outgoing {
  margin-left: auto;
  text-align: right;
}

.message.incoming {
  margin-right: auto;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.message.outgoing .message-header {
  justify-content: flex-end;
}

.message-author {
  font-weight: 600;
  color: var(--text-primary);
}

.message-time {
  color: var(--text-muted);
}

.message-source {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message-source.discord {
  background: #5865f2;
  color: white;
}

.message-source.webapp {
  background: #10b981;
  color: white;
}

.message-source.email {
  background: #f59e0b;
  color: #78350f;
}

.message-source.ai-agent {
  background: #8b5cf6;
  color: white;
}

/* Email conversation banner */
.email-conversation-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 8px 0 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
}

.email-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.email-banner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-banner-label {
  font-weight: 600;
  color: var(--text-primary);
}

.email-banner-from,
.email-banner-subject {
  color: var(--text-secondary);
  font-size: 12px;
}

.email-banner-subject {
  font-style: italic;
}

/* Email message metadata */
.email-message-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 0 4px;
}

/* Email delivery status badges */
.email-delivery-status {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 6px;
}

.email-delivery-status.status-sent,
.email-delivery-status.status-delivered {
  background: #d1fae5;
  color: #065f46;
}

.email-delivery-status.status-queued {
  background: #dbeafe;
  color: #1e40af;
}

.email-delivery-status.status-bounced,
.email-delivery-status.status-failed {
  background: #fecaca;
  color: #b91c1c;
}

/* Email subject input */
.email-subject-wrapper {
  padding: 8px 16px 0;
  border-top: 1px solid var(--border-color);
}

.email-subject-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-subject-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.email-subject-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.email-subject-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Channel source badges in ticket lists */
.channel-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

.channel-source-badge.email {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.channel-source-badge.webapp {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* Email config modal z-index (above bot-sets-modal) */
#email-config-modal {
  z-index: 1200;
}

/* Email config status in BotSet accordion */
.email-config-status {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.email-config-status.active {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.email-config-status.inactive {
  color: var(--text-muted);
}

/* Domain verification */
.email-domain-status {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.domain-check {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
}

.domain-check.ok {
  background: #d1fae5;
  color: #065f46;
}

.domain-check.pending {
  background: #fef3c7;
  color: #92400e;
}

/* DNS Records table */
.dns-records-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  margin-top: 8px;
}

.dns-records-table th,
.dns-records-table td {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.dns-records-table th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.dns-records-table .dns-value {
  word-break: break-all;
  font-family: monospace;
  font-size: 10px;
}

/* Dark theme overrides for email features */
body.dark-theme .email-conversation-banner {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

body.dark-theme .email-delivery-status.status-sent,
body.dark-theme .email-delivery-status.status-delivered {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

body.dark-theme .email-delivery-status.status-bounced,
body.dark-theme .email-delivery-status.status-failed {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

body.dark-theme .channel-source-badge.email {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

body.dark-theme .channel-source-badge.webapp {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

body.dark-theme .domain-check.ok {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

body.dark-theme .domain-check.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.message-content {
  background: var(--bg-primary);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
  line-height: 1.5;
}

.message.outgoing .message-content {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.message.system .message-content {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-secondary);
  font-style: italic;
  text-align: center;
}

/* Message translation button */
.message-translate-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  border-radius: 4px;
}

.message-translate-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.message-translate-btn:disabled {
  cursor: wait;
}

/* Message translation display */
.message-translation {
  margin-top: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 8px;
  border-left: 3px solid #0ea5e9;
  font-size: 13px;
}

.message-translation .translation-label {
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message-translation .translation-text {
  color: #0c4a6e;
  line-height: 1.5;
}

.message.outgoing .message-translation {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.message-input-area {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
}

.message-input-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 22px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.15s ease;
  background: var(--bg-secondary);
  color: var(--text-primary);
  overflow: hidden;
}

.message-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.message-input::placeholder {
  color: var(--text-muted);
}

.send-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.send-button:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.send-button:disabled {
  background: var(--border-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.info-panel {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.ticket-info-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.ticket-info-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.info-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-value {
  color: var(--text-primary);
  font-weight: 600;
}

.ticket-actions-panel {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.messaging-action-btn {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messaging-action-btn.primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.messaging-action-btn.primary:hover {
  background: var(--accent-primary-hover);
}

.messaging-action-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
}

.messaging-action-btn.secondary:hover {
  background: var(--bg-active);
}

.messaging-action-btn.danger {
  background: var(--accent-danger);
  color: #ffffff;
}

.messaging-action-btn.danger:hover {
  background: var(--accent-danger-hover);
}

/* Channel deleted notice */
.channel-deleted-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.channel-deleted-notice .icon {
  font-size: 14px;
}

.dark-theme .channel-deleted-notice {
  background: #451a03;
  color: #fde68a;
  border-color: #78350f;
}

.typing-indicator {
  display: none;
  padding: 12px 20px;
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

.typing-indicator.active {
  display: block;
}

.typing-dots {
  display: inline-block;
  margin-left: 8px;
}

.typing-dots::after {
  content: "";
  animation: typingDots 1.5s infinite;
}

@keyframes typingDots {
  0%,
  60% {
    content: "";
  }
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60% {
    content: "...";
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optimistic message styling */
.message.optimistic .message-content {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.message.optimistic .message-header {
  opacity: 0.6;
}

/* Dark Mode for Ticket Detail & Messaging */
.dark-theme .ticket-detail-header {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .ticket-detail-header .back-btn {
  background: #374151;
  border-color: #4b5563;
  color: #9ca3af;
}

.dark-theme .ticket-detail-header .back-btn:hover {
  background: #4b5563;
  color: #f9fafb;
}

/* Dark-mode overrides only for elements that need a different shade than CSS variables provide */
.dark-theme .message-content {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
  color: #f3f4f6;
}

.dark-theme .message-input {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
  color: #f3f4f6;
}

.dark-theme .message-input:focus {
  background: var(--bg-active);
  border-color: var(--accent-primary);
}

.dark-theme .message-input::placeholder {
  color: var(--text-secondary);
}

.dark-theme .typing-indicator {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* Responsive Design for Messaging */
@media (max-width: 768px) {
  .messaging-body {
    flex-direction: column;
  }

  .conversation-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    flex: 2;
  }

  .conversation-scroll-area {
    flex: 1;
  }

  .info-panel {
    flex: 1;
    min-height: 300px;
  }

  .action-buttons-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .message {
    max-width: 90%;
  }
}

/* Hide dashboard during initial load to prevent flicker */
body.loading .sidebar,
body.loading .main-content {
  visibility: hidden;
}
body.loading {
  overflow: hidden;
}

/* Unread message indicator */
.unread-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444; /* red */
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

/* New ticket indicator */
.new-ticket-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444; /* red */
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Ticket stats small counter */
.ticket-stats {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

body.dark-theme .ticket-stats {
  color: #d1d5db;
}

/* Ticket statistics badges */
.ticket-stats-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.ticket-badge.open {
  background: #dcfce7;
  color: #166534;
}

.ticket-badge.closed {
  background: #f3f4f6;
  color: #6b7280;
}

.ticket-badge.total {
  background: #dbeafe;
  color: #1e40af;
}

/* Dark theme ticket badges */
body.dark-theme .ticket-badge.open {
  background: #064e3b;
  color: #6ee7b7;
}

body.dark-theme .ticket-badge.closed {
  background: #374151;
  color: #d1d5db;
}

body.dark-theme .ticket-badge.total {
  background: #1e3a5f;
  color: #93c5fd;
}

/* Dark theme context tabs */
body.dark-theme .context-tab.active .tab-count {
  background: #1e3a5f;
  color: #93c5fd;
}

/* Make section controls flex to position badges on right */
.section-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.unread-row td {
  font-weight: 700;
}

body.dark-theme .unread-row td {
  font-weight: 700;
}

.new-ticket-row td {
  font-weight: 700;
}

body.dark-theme .new-ticket-row td {
  font-weight: 700;
}

/* Transfer staff select uses unified styling - no override needed */

/* Unified dropdown styling - consistent with sort dropdowns */
select {
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  min-height: 32px;
  line-height: 1.3;
  background-image: url("../images/light-dropdown-arrow.svg");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
  padding-right: 28px;
  box-sizing: border-box;
}

select:hover {
  border-color: var(--text-muted);
}

select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Better option styling for dropdown visibility */
select option {
  padding: 8px 12px;
  background: white;
  color: #374151;
  border: none; /* avoid inconsistent native borders */
  font-size: 14px;
  line-height: 1.4;
  /* draw right and bottom borders via background images for consistency */
  background-image:
    linear-gradient(to right, var(--border-color), var(--border-color)), /* right */
    linear-gradient(var(--border-color), var(--border-color)); /* bottom */
  background-position: right top, left bottom;
  background-size: 1px 100%, 100% 1px;
  background-repeat: no-repeat;
}

/* Add a top border for the first option to complete the frame */
select option:first-child {
  background-image:
    linear-gradient(to right, var(--border-color), var(--border-color)), /* right */
    linear-gradient(var(--border-color), var(--border-color)), /* bottom */
    linear-gradient(var(--border-color), var(--border-color)); /* top */
  background-position: right top, left bottom, left top;
  background-size: 1px 100%, 100% 1px, 100% 1px;
  background-repeat: no-repeat;
}

/* Ensure options have proper contrast and borders */
select option:hover,
select option:focus {
  background: #f8fafc !important;
  color: #1f2937 !important;
}

select option:checked,
select option:selected {
  background: #3b82f6 !important;
  color: white !important;
}

/* Remove italic styling for ticket info messages */
.message.ticket-info {
  max-width: 100%;
  padding-bottom: 0;
  margin-bottom: 0;
}

.message.ticket-info .message-content {
  font-style: normal;
  background: transparent;
  color: #374151;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Dark mode styles for ticket info */
.dark-theme .message.ticket-info {
  border-bottom: 1px solid #4b5563;
}

.dark-theme .message.ticket-info .message-content {
  color: #d1d5db;
}

/* Divider under ticket info with centered text */
.ticket-info-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
  height: 1px;
  background: #e5e7eb;
}

.ticket-info-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary, #fff);
  color: #9ca3af;
  padding: 0 15px;
  font-size: 12px;
  white-space: nowrap;
}

.dark-theme .ticket-info-divider {
  background: #4b5563;
}

.dark-theme .ticket-info-divider span {
  background: #181e29;
  color: #6b7280;
}

/* Attachment button and preview */
.attachment-button {
  background: transparent;
  border: none;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  transition: background-color 0.2s ease, color 0.2s ease;
  height: 44px;
  width: 44px;
  flex-shrink: 0;
}

.attachment-button:hover {
  background: #f3f4f6;
  color: #111827;
}

.dark-theme .attachment-button:hover {
  background: #4b5563;
  color: #d1d5db;
}

.attachment-preview {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.attachment-preview:not(:empty) {
  display: flex;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.attachment-name {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.attachment-size {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.attachment-remove {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  border-radius: 3px;
  margin-left: 8px;
}

.attachment-remove:hover {
  background: #f3f4f6;
  color: #ef4444;
}

.attachment-chip {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #374151;
}

body.dark-theme .attachment-chip {
  background: #374151;
  color: #d1d5db;
}

.message-attachments {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-attachment {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-image-attachment {
  max-width: 250px;
  max-height: 200px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease;
}

.message-image-attachment:hover {
  transform: scale(1.02);
}

.message-file-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
  max-width: 300px;
}

.message-file-attachment:hover {
  background: #e5e7eb;
  text-decoration: none;
}

.attachment-name {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  word-break: break-all;
}

body.dark-theme .message-image-attachment {
  border-color: #4b5563;
}

body.dark-theme .message-file-attachment {
  background: #374151;
  color: #d1d5db;
  border-color: #4b5563;
}

body.dark-theme .message-file-attachment:hover {
  background: #4b5563;
}

body.dark-theme .attachment-name {
  color: #9ca3af;
}

/* Dark theme attachment preview */
.dark-theme .attachment-preview {
  background: #374151;
  border-color: #4b5563;
}

.dark-theme .attachment-item {
  background: #1f2937;
  border-color: #4b5563;
}

.dark-theme .attachment-name {
  color: #d1d5db;
}

.dark-theme .attachment-size {
  color: #9ca3af;
}

.dark-theme .attachment-remove {
  color: #9ca3af;
}

.dark-theme .attachment-remove:hover {
  background: #4b5563;
  color: #ef4444;
}

.action-buttons-grid .ai-summary {
  grid-column: 1 / -1;
  font-size: 14px;
}

.ai-btn-icon {
  display: inline-flex;
  margin-right: 6px;
}

.ai-btn-icon img {
  width: 16px;
  height: 16px;
}

.dark-theme .ai-icon-img {
  filter: invert(1) brightness(1.2);
}

/* AI Chat Styles */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 83vh;
  min-height: 600px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-avatar-img {
  width: 24px;
  height: 24px;
  filter: invert(1) brightness(1.2);
}

.ai-chat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-chat-subtitle {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-primary);
  scroll-behavior: smooth;
}

.ai-message {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message.assistant {
  flex-direction: row;
}

.ai-message .msg-box {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.ai-message.user .msg-box {
  background: #3b82f6;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ai-message.assistant .msg-box {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.ai-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.ai-input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 8px 12px;
  transition: border-color 0.2s ease;
}

.ai-input-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-input-field {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  padding: 8px 0;
  max-height: 120px;
  min-height: 20px;
  line-height: 1.4;
}

.ai-input-field::placeholder {
  color: var(--text-secondary);
}

.ai-attachment-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-attachment-button:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.ai-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-send-button:hover {
  background: #2563eb;
  transform: scale(1.05);
}

.ai-send-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.ai-attachment-preview {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-attachment-preview:empty {
  display: none;
}

.ai-attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.ai-attachment-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  margin-left: 4px;
  font-size: 16px;
  line-height: 1;
}

.ai-attachment-remove:hover {
  background: #f3f4f6;
  color: #ef4444;
}

/* AI Attachment thumbnail styles */
.ai-attachment-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-attachment-thumb.ai-attachment-loading {
  background: linear-gradient(90deg, var(--bg-tertiary, #f3f4f6) 0%, var(--bg-secondary, #e5e7eb) 50%, var(--bg-tertiary, #f3f4f6) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.ai-attachment-thumb.ai-attachment-file {
  background: var(--bg-tertiary, #f3f4f6);
}

.ai-attachment-thumb .file-icon {
  font-size: 24px;
}

.ai-attachment-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

/* Dark theme styles */
.dark-theme .ai-chat-header {
  background: #1f2937;
  border-bottom-color: #374151;
}

.dark-theme .ai-chat-title {
  color: #f9fafb;
}

.dark-theme .ai-chat-subtitle {
  color: #9ca3af;
}

.dark-theme .ai-messages {
  background: #111827;
}

.dark-theme .ai-message.assistant .msg-box {
  background: #1f2937;
  color: #f9fafb;
  border-color: #374151;
}

.dark-theme .ai-input-area {
  background: #111827;
  border-top-color: #374151;
}

.dark-theme .ai-input-container {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .ai-input-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark-theme .ai-input-field {
  color: #f9fafb;
}

.dark-theme .ai-input-field::placeholder {
  color: #6b7280;
}

.dark-theme .ai-attachment-button:hover {
  background: #374151;
  color: #f9fafb;
}

.dark-theme .ai-attachment-item {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.dark-theme .ai-attachment-remove:hover {
  background: #374151;
  color: #ef4444;
}

/* AI Chart Styles */
.ai-chart-container {
  margin-top: 12px;
  background: var(--bg-secondary, white);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color, #e5e7eb);
}

.dark-theme .ai-chart-container {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .ai-input-area {
  border-top: 1px solid #374151;
  background: #1f2937;
}

/* ApexCharts Professional Styling */
.apexcharts-canvas {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif !important;
}

.apexcharts-tooltip {
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.apexcharts-tooltip-title {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  font-weight: 600 !important;
}

.apexcharts-legend {
  color: var(--text-secondary) !important;
}

.apexcharts-legend-text {
  color: var(--text-secondary) !important;
}

.apexcharts-gridline {
  stroke: var(--border-color) !important;
}

.apexcharts-text {
  fill: var(--text-secondary) !important;
}

.apexcharts-xaxistooltip {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.apexcharts-yaxistooltip {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Dark theme specific ApexCharts adjustments */
.dark-theme .apexcharts-tooltip {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

.dark-theme .apexcharts-tooltip-title {
  background: #111827 !important;
  border-color: #374151 !important;
}

.dark-theme .apexcharts-gridline {
  stroke: #374151 !important;
}

/* Chart container improvements */
.chart-container {
  position: relative;
  min-height: 300px;
}

.ticket-types-chart {
  position: relative;
  min-height: 180px;
}

/* Ensure charts are responsive */
.apexcharts-svg {
  width: 100% !important;
}

/* Ticket Type Management Styles */
.ticket-type-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.ticket-type-item input[type="text"] {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

.ticket-type-item input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.ticket-type-remove {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  min-width: 60px;
}

.ticket-type-remove:hover {
  background: #dc2626;
}

.dark-theme .ticket-type-item {
  background: #374151;
  border-color: #4b5563;
}

.dark-theme .ticket-type-item input[type="text"] {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark-theme .ticket-type-item input[type="text"]:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa;
}

/* Professional gradient animations */
@keyframes chartFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-container > div {
  animation: chartFadeIn 0.8s ease-out;
}

/* Feedback System Styles */
.feedback-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.feedback-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feedback-header {
  text-align: center;
  margin-bottom: 24px;
}

.feedback-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feedback-header p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rating-section {
  margin-bottom: 20px;
  text-align: center;
}

.rating-section label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.star {
  font-size: 32px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star:hover,
.star.active {
  color: #fbbf24;
  transform: scale(1.1);
}

.star.active {
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.feedback-message-section {
  margin-bottom: 24px;
}

.feedback-message-section label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feedback-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  resize: vertical;
  transition: border-color 0.2s ease;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feedback-textarea::placeholder {
  color: var(--text-secondary);
}

.feedback-submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feedback-submit-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.feedback-submit-btn:active {
  transform: translateY(0);
}

.feedback-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Feedback Submitted Styles */
.feedback-submitted {
  margin-top: 20px;
  padding-top: 20px;
}

.feedback-thank-you {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 24px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feedback-icon {
  width: 48px;
  height: 48px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0 auto 16px;
}

.feedback-thank-you h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feedback-thank-you p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.submitted-feedback {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.submitted-rating {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}

.submitted-rating .star {
  font-size: 20px;
  color: #fbbf24;
}

.submitted-message {
  font-size: 14px;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.5;
}

/* Conversation divider for end of conversation */
.conversation-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  position: relative;
}

.conversation-divider::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.conversation-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.conversation-divider span {
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dark theme adjustments */
.dark-theme .feedback-container,
.dark-theme .feedback-thank-you {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .feedback-textarea {
  background: #111827;
  border-color: #374151;
  color: #f9fafb;
}

.dark-theme .feedback-textarea:focus {
  border-color: #3b82f6;
}

.dark-theme .submitted-feedback {
  background: #111827;
}

.dark-theme .conversation-divider span {
  background: #1f2937;
}

/* Animation for feedback form */
@keyframes feedbackSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-section,
.feedback-submitted {
  animation: feedbackSlideIn 0.5s ease-out;
}

/* ApexCharts menu styling */
.apexcharts-menu {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.apexcharts-menu-item {
  color: var(--text-primary) !important;
}

.apexcharts-menu-item:hover {
  background: var(--bg-secondary) !important;
}

/* ApexCharts zoom controls */
.apexcharts-toolbar {
  color: var(--text-secondary) !important;
}

.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon,
.apexcharts-reset-icon {
  fill: var(--text-secondary) !important;
}

.apexcharts-zoom-icon:hover,
.apexcharts-zoomin-icon:hover,
.apexcharts-zoomout-icon:hover,
.apexcharts-reset-icon:hover {
  fill: var(--text-primary) !important;
}

/* Notes Management Styles */
.notes-container {
  padding: 24px;
}

.notes-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.notes-tab-btn {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.notes-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.notes-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.notes-tab-content {
  display: none;
}

.notes-tab-content.active {
  display: block;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.notes-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.notes-header .btn {
  margin-left: auto;
}

/* Dark theme adjustments for tabs */
body.dark-theme .notes-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.notes-list {
  max-height: 500px;
  overflow-y: auto;
}

.note-item {
  background: #f3f4f6; /* slightly darker background for light theme */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

body.dark-theme .note-item {
  background: #1f2937; /* darker card for dark theme */
}

/* Icon style buttons */
.btn-icon {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
}

.btn-icon.delete:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

body.dark-theme .btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.note-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.note-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  margin-right: 12px;
}

.note-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.note-content {
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.note-meta {
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.no-notes {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
}

/* Dark theme adjustments for notes */
body.dark-theme .btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Form styles for notes */
.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-group textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Generic button styles for modal actions and note tools */
.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn.primary {
  background: #3b82f6;
  color: #ffffff;
  border: none;
}

.btn.primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.btn.secondary {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Ensure svg icons within icon buttons size consistently */
.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Form actions for Add/Edit Note modal */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 32px;
  border-top: 1px solid #e5e7eb;
}

/* Disable outer scroll for Manage Notes modal */
#manage-notes-modal .modal-content {
  overflow-y: hidden;
}

/* Ensure notes list can grow to fit modal height and scroll */
#manage-notes-modal .notes-list {
  max-height: 60vh; /* adapt to viewport */
  overflow-y: auto;
}

.dark-theme select option:last-child {
  border-bottom: 1px solid var(--border-color);
}

/* Refresh Button */
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.refresh-btn:hover {
  background: rgba(107, 114, 128, 0.15);
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.refresh-btn:active {
  transform: translateY(0);
}

.refresh-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.refresh-btn.refreshing .refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Dark theme styles for refresh button */
.dark-theme .refresh-btn {
  background: rgba(156, 163, 175, 0.1);
  color: #f3f4f6;
  border-color: #4b5563;
}

.dark-theme .refresh-btn:hover {
  background: rgba(156, 163, 175, 0.15);
  border-color: #6b7280;
}

/* --- DARK MODE FIXES (2024-06) --- */

/* 1. Modal action button backgrounds (ensure contrast) */
.dark-theme .modal-actions {
  background: #232b38;
  border-top: 1px solid #374151;
}
.dark-theme .action-btn.modal-action {
  background: #2563eb;
  color: #fff;
  border: none;
}
.dark-theme .action-btn.modal-action:hover {
  background: #1d4ed8;
  color: #fff;
}

/* 3. Attachment icon should be white in dark mode */
.dark-theme .btn-icon svg,
.dark-theme .attachment-button svg {
  color: #fff !important;
  fill: #fff !important;
}
.dark-theme .attachment-button {
  color: #fff;
}

/* 4. Keep servers dropdown background white in dark mode */
.dark-theme .server-filter-dropdown {
  background: #fff !important;
  color: #232b38 !important;
  border-color: #374151;
}
.dark-theme .server-filter-dropdown * {
  color: #232b38 !important;
}

/* 5. Notes background and text color in dark mode */
body.dark-theme .note-item {
  background: #232b38 !important;
  color: #f3f4f6 !important;
}
body.dark-theme .note-title,
body.dark-theme .note-content,
body.dark-theme .note-meta {
  color: #f3f4f6 !important;
}
body.dark-theme .notes-tab-content {
  background: #1f2937 !important;
}

/* 6. Modal label/value color consistency in dark mode */
.dark-theme .form-group label,
.dark-theme .form-group input,
.dark-theme .form-group select,
.dark-theme .form-group textarea,
.dark-theme .form-group .info-label,
.dark-theme .form-group .info-value {
  color: #fff !important;
}
.dark-theme .form-group input,
.dark-theme .form-group select,
.dark-theme .form-group textarea {
  background: #232b38 !important;
  border-color: #4b5563;
}

/* Ensure all .info-label and .info-value in modals are white */
.dark-theme .info-label,
.dark-theme .info-value {
  color: #fff !important;
}

/* --- END DARK MODE FIXES --- */

/* 2. 'All Servers' option in server dropdown white in dark mode */
.dark-theme .server-filter-dropdown option[value="all"],
.dark-theme .server-filter-dropdown option:first-child {
  background: #fff !important;
  color: #232b38 !important;
}

/* 3. Modal table text (th, td) white in dark mode */
.dark-theme .modal-content th,
.dark-theme .modal-content td {
  color: #fff !important;
}

/* 4. Modal muted/secondary text white in dark mode */
.dark-theme .modal-content .text-muted,
.dark-theme .modal-content .text-secondary,
.dark-theme .modal-content .text-grey,
.dark-theme .modal-content .text-gray {
  color: #fff !important;
  opacity: 0.85;
}

/* --- DARK MODE PATCH 4: Manage Notes Modal --- */
body.dark-theme .notes-tab-content,
body.dark-theme .note-item,
body.dark-theme textarea,
.dark-theme .modal-content textarea {
  background: #232b38 !important;
  color: #f3f4f6 !important;
  border-color: #374151 !important;
}
body.dark-theme textarea::placeholder,
.dark-theme .modal-content textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}
/* --- END PATCH 4 --- */

/* --- DARK MODE PATCH 5: Notes Display Card --- */
body.dark-theme .note-item,
body.dark-theme .notes-list,
body.dark-theme .notes-tab-content,
body.dark-theme .notes-container,
.dark-theme .modal-content .note-item,
.dark-theme .modal-content .notes-list,
.dark-theme .modal-content .notes-tab-content,
.dark-theme .modal-content .notes-container,
.dark-theme .modal-content .note-content,
.dark-theme .modal-content .note-title {
  background: #232b38 !important;
  color: #f3f4f6 !important;
  border-color: #374151 !important;
}
.dark-theme .modal-content .note-meta {
  color: #9ca3af !important;
}
/* --- END PATCH 5 --- */

/* --- DARK MODE PATCH 6: Scrollbar Styling --- */
.dark-theme ::-webkit-scrollbar,
body.dark-theme ::-webkit-scrollbar {
  width: 10px;
  background: #232b38;
}
.dark-theme ::-webkit-scrollbar-thumb,
body.dark-theme ::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 8px;
  border: 2px solid #232b38;
}
.dark-theme ::-webkit-scrollbar-thumb:hover,
body.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}
.dark-theme ::-webkit-scrollbar-corner,
body.dark-theme ::-webkit-scrollbar-corner {
  background: #232b38;
}

/* Firefox */
.dark-theme,
body.dark-theme {
  scrollbar-color: #374151 #232b38;
  scrollbar-width: thin;
}
/* --- END PATCH 6 --- */

/* --- DARK MODE PATCH 7: Note Card Separation --- */
.dark-theme .modal-content .note-item,
body.dark-theme .note-item {
  background: #283347 !important; /* lighter than modal bg */
  border: 1px solid #374151 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
/* --- END PATCH 7 --- */

/* --- DARK MODE PATCH 8: Note Card Child Background Consistency --- */
.dark-theme .modal-content .note-item *,
body.dark-theme .note-item * {
  background: #283347 !important;
}
/* --- END PATCH 8 --- */

/* --- MODERN SQUARE STAT ICON --- */
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e5edfa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stat-icon svg,
.stat-icon img {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  display: block;
}
.dark-theme .stat-icon {
  background: #393b4d;
}
.stat-icon:focus,
.stat-icon:active {
  outline: none;
  box-shadow: none;
}
/* --- END MODERN SQUARE STAT ICON --- */

/* --- DARK MODE: STAT ICONS BLACK --- */
.dark-theme .stat-icon svg,
.dark-theme .stat-icon img {
  color: #111827 !important;
  fill: #111827 !important;
  filter: none !important;
}
/* --- END DARK MODE: STAT ICONS BLACK --- */

/* --- THEME ICON SWITCHING FOR STAT CARDS (STRONG) --- */
.light-icon {
  display: inline !important;
}
.dark-icon {
  display: none !important;
}
body.dark-theme .light-icon {
  display: none !important;
}
body.dark-theme .dark-icon {
  display: inline !important;
}
/* --- END THEME ICON SWITCHING (STRONG) --- */

/* --- DARK MODE: ATTACHMENT ICONS WHITE --- */
.dark-theme .attachment-button svg,
.dark-theme .attachment-button img,
.dark-theme .ai-attachment-button svg,
.dark-theme .ai-attachment-button img {
  color: #fff !important;
  fill: #fff !important;
  filter: none !important;
}
/* --- END DARK MODE: ATTACHMENT ICONS WHITE --- */

/* --- MOBILE-FIRST UX IMPROVEMENTS --- */

/* Touch targets - minimum 44px for mobile */
@media (max-width: 768px) {
  .btn-primary, .btn-secondary, .action-btn, button {
    min-height: 44px;
    padding: 12px 16px;
  }

  /* Modal close button */
  .modal-close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Checkboxes and inputs */
  .checkbox-container .checkmark {
    width: 24px;
    height: 24px;
  }

  select, input[type="text"], input[type="number"], textarea {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Navigation items */
  .nav-item {
    min-height: 44px;
    padding: 12px;
  }
}

/* Fullscreen modals on small screens */
@media (max-width: 480px) {
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
  }

  .modal-actions {
    position: sticky;
    bottom: 0;
    background: inherit;
    padding: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
  }
}

/* Hide less important columns on mobile */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Pagination controls */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border-light, #e5e7eb);
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 6px;
  background: var(--bg-primary, #ffffff);
  color: var(--text-primary, #374151);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-secondary, #f3f4f6);
  border-color: var(--accent-primary, #3b82f6);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
}

/* NOTE: Mobile navigation handled by mobile-redesign.css (.mobile-bottom-nav) */

/* NOTE: Old more-menu styles removed — replaced by BottomSheet component in mobile-redesign.css (.bs-*) */

/* Filter controls optimization for mobile */
@media (max-width: 768px) {
  .filter-controls {
    flex-direction: column;
    gap: 12px;
  }

  .filter-controls select,
  .filter-controls input,
  .server-filter-button {
    width: 100%;
    min-width: auto;
  }

  /* Sticky search/filter header */
  .tickets-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary, #f9fafb);
    z-index: 100;
    padding: 12px 0;
  }
}

/* Messaging UI optimization for mobile */
@media (max-width: 768px) {
  .ticket-detail-header {
    padding: 12px 16px;
    gap: 10px;
  }

  .ticket-detail-header .back-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .ticket-detail-title-area .messaging-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Info panel as slide-in panel */
  .info-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    transition: right 0.3s ease;
    z-index: 1001;
    background: var(--bg-primary, #ffffff);
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  }

  .info-panel.visible {
    right: 0;
  }

  /* Message input at bottom */
  .message-input-container {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary, #ffffff);
    padding: 12px;
    border-top: 1px solid var(--border-color, #e5e7eb);
  }

  /* Action buttons grid */
  .action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .messaging-action-btn {
    padding: 12px;
    font-size: 13px;
  }
}

/* --- END MOBILE-FIRST UX IMPROVEMENTS --- */

/* --- SWIPE GESTURES STYLES --- */

/* Swipeable card container */
.swipeable-card {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.swipeable-card-content {
    position: relative;
    z-index: 2;
    background: var(--bg-primary, #ffffff);
    transition: transform 0.2s ease-out;
    will-change: transform;
    width: 100%;
    box-sizing: border-box;
}

/* Swipe action containers */
.swipe-actions-left,
.swipe-actions-right {
    position: absolute;
    top: 0;
    bottom: 0;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1;
}

/* Show swipe actions when card is being swiped */
.swipeable-card.swiping .swipe-actions-left,
.swipeable-card.swiping .swipe-actions-right,
.swipeable-card.swipe-open .swipe-actions-left,
.swipeable-card.swipe-open .swipe-actions-right {
    display: flex;
    visibility: visible;
    pointer-events: auto;
}

.swipe-actions-left {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.swipe-actions-right {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

/* Action buttons in swipe reveal */
.swipe-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.swipe-action-btn:active {
    transform: scale(0.92);
    background: #ffffff;
}

.swipe-action-btn.claim {
    color: #059669;
}

.swipe-action-btn.close-ticket {
    color: #dc2626;
}

.swipe-action-btn.priority {
    color: #f59e0b;
}

/* Open state indicator */
.swipeable-card.swipe-open {
    z-index: 10;
}

/* Mobile ticket cards with swipe support */
@media (max-width: 768px) {
    .tickets-table tbody tr.swipeable-card {
        display: block;
        margin-bottom: 12px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .tickets-table tbody tr.swipeable-card .swipeable-card-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
        border-radius: 12px;
    }

    /* Swipe hint animation */
    .swipeable-card::after {
        content: '';
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 24px;
        background: var(--border-color, #e5e7eb);
        border-radius: 2px;
        opacity: 0.6;
        transition: opacity 0.3s ease;
    }

    .swipeable-card.swipe-open::after {
        opacity: 0;
    }

    /* Touch feedback on cards */
    .swipeable-card:active:not(.swipe-open) .swipeable-card-content {
        background: var(--bg-hover, #f3f4f6);
    }

    /* Improved action buttons for mobile */
    .swipe-actions-left,
    .swipe-actions-right {
        padding: 0 16px;
    }

    .swipe-action-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Dark theme adjustments for swipe */
body.dark-theme .swipeable-card-content {
    background: var(--bg-primary, #1f2937);
}

body.dark-theme .swipe-action-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-theme .swipe-action-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

body.dark-theme .swipe-action-btn.claim {
    color: #34d399;
}

body.dark-theme .swipe-action-btn.close-ticket {
    color: #f87171;
}

body.dark-theme .swipe-action-btn.priority {
    color: #fbbf24;
}

/* Haptic feedback simulation via visual feedback */
@keyframes haptic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.swipe-action-btn.haptic {
    animation: haptic-pulse 0.15s ease;
}
/* --- END SWIPE GESTURES STYLES --- */

/* --- PULL TO REFRESH STYLES --- */

.ptr-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(0);
    opacity: 0;
}

.ptr-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-primary, #ffffff);
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.ptr-spinner {
    width: 24px;
    height: 24px;
}

.ptr-spinner svg {
    animation: none;
}

.ptr-indicator.refreshing .ptr-spinner svg {
    animation: ptr-spin 1s linear infinite;
}

@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ptr-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    white-space: nowrap;
}

.ptr-indicator.ready .ptr-text {
    color: var(--accent-primary, #2563eb);
}

/* Dark theme adjustments */
body.dark-theme .ptr-content {
    background: var(--bg-primary, #1f2937);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .ptr-text {
    color: var(--text-primary, #e5e7eb);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .ptr-indicator {
        top: env(safe-area-inset-top, 0);
    }

    .ptr-content {
        padding: 10px 16px;
    }
}
/* --- END PULL TO REFRESH STYLES --- */

/* --- PHASE 4-5: MOBILE NAVIGATION & CARD ENHANCEMENTS --- */

/* Tab Slide Animations */
@keyframes slide-in-left {
    from { transform: translateX(-30px); opacity: 0.5; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
    from { transform: translateX(30px); opacity: 0.5; }
    to { transform: translateX(0); opacity: 1; }
}


/* NOTE: FAB styles moved to mobile-redesign.css */

/* Selected row styling */
@media (max-width: 768px) {
    tr.selected {
        background: rgba(37, 99, 235, 0.1) !important;
        border-left: 3px solid #2563eb;
    }

    tr.selected .swipeable-card-content {
        background: rgba(37, 99, 235, 0.05);
    }

    body.dark-theme tr.selected {
        background: rgba(59, 130, 246, 0.15) !important;
    }

    body.dark-theme tr.selected .swipeable-card-content {
        background: rgba(59, 130, 246, 0.1);
    }
}

/* Multi-Select Toolbar */
.multi-select-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-primary, #ffffff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.multi-select-toolbar.visible {
    transform: translateY(0);
}

.multi-select-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.multi-select-cancel {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary, #1f2937);
}

.multi-select-cancel:active {
    background: var(--bg-hover, #f3f4f6);
}

.selected-count {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.multi-select-actions {
    display: flex;
    gap: 8px;
}

.multi-action-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--accent-primary, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.multi-action-btn:active {
    transform: scale(0.92);
}

.multi-action-btn.danger {
    background: #dc2626;
}

/* Dark theme multi-select */
body.dark-theme .multi-select-toolbar {
    background: var(--bg-primary, #1f2937);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .multi-select-cancel {
    color: var(--text-primary, #e5e7eb);
}

body.dark-theme .selected-count {
    color: var(--text-primary, #e5e7eb);
}

/* NOTE: Old enhanced card design & dark theme card enhancements removed
   — replaced by .mobile-ticket-card in mobile-redesign.css */

/* --- LOGIN PAGE MOBILE STYLES --- */
@media (max-width: 768px) {
    /* Stack login sections vertically */
    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }

    /* Compact branding section on mobile */
    .branding-section {
        flex: none;
        min-height: 200px;
        padding: 40px 24px;
        align-items: center;
        justify-content: center;
    }

    .branding-content {
        text-align: center;
    }

    .branding-content .welcome-text h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .top-logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 20px;
        text-align: center;
    }

    .top-logo .logo-icon {
        margin: 0 auto;
    }

    /* Decorative elements - hide on mobile */
    .curve-decoration,
    .circle-decoration {
        display: none;
    }

    /* Login section full width */
    .login-section {
        flex: 1;
        padding: 40px 24px;
        min-height: auto;
    }

    .login-form-container {
        max-width: 100%;
        padding: 0;
    }

    .login-title {
        font-size: 28px;
        text-align: center;
    }

    .login-subtitle {
        text-align: center;
        font-size: 14px;
    }

    /* Discord button full width */
    .discord-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 12px;
    }

    .auth-info {
        justify-content: center;
        text-align: center;
    }

    .support-note {
        text-align: center;
        padding: 20px 0;
    }

    /* Error message styling */
    .error-message {
        margin-bottom: 20px;
    }

    .error-content {
        padding: 12px 16px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .branding-section {
        min-height: 160px;
        padding: 30px 16px;
    }

    .branding-content .welcome-text h1 {
        font-size: 24px;
    }

    .login-section {
        padding: 30px 16px;
    }

    .login-title {
        font-size: 24px;
    }

    .discord-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Dark theme login mobile */
@media (max-width: 768px) {
    body.dark-theme .login-section {
        background: var(--bg-primary, #1f2937);
    }

    body.dark-theme .login-title,
    body.dark-theme .login-subtitle {
        color: var(--text-primary, #e5e7eb);
    }
}
/* --- END LOGIN PAGE MOBILE STYLES --- */

/* NOTE: Mobile overview and quick nav styles moved to mobile-redesign.css */

/* ============================================
   UNCLAIMED TICKETS ALERT BOX
   ============================================ */
.unclaimed-alert-box {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.unclaimed-alert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.unclaimed-alert-icon {
  font-size: 28px;
  line-height: 1;
}

.unclaimed-alert-title {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
}

.unclaimed-alert-title #unclaimed-count {
  font-size: 24px;
  color: #b45309;
}

.unclaimed-filter-container {
  margin-left: auto;
}

.unclaimed-filter-container select {
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  color: #92400e;
  font-size: 13px;
  cursor: pointer;
  min-width: 140px;
}

.unclaimed-filter-container select:focus {
  outline: none;
  border-color: #f59e0b;
}

.dark-theme .unclaimed-filter-container select {
  background: rgba(30, 30, 30, 0.8);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

/* ============================================
   MULTI-SELECT FILTER COMPONENT
   ============================================ */

/* Wrapper */
.multiselect-wrapper {
  position: relative;
  min-width: 200px;
  max-width: 350px;
}

/* Trigger button */
.multiselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  min-height: 36px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.multiselect-trigger:hover,
.multiselect-wrapper.open .multiselect-trigger {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.multiselect-trigger:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Chips container */
.multiselect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.multiselect-placeholder {
  color: #92400e;
  font-size: 13px;
}

/* Arrow indicator */
.multiselect-arrow {
  color: #92400e;
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.multiselect-wrapper.open .multiselect-arrow {
  transform: rotate(180deg);
}

/* Dropdown panel */
.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: min(320px, 90vw);
  width: max-content;
  max-width: min(450px, 90vw);
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  max-height: 400px;
  overflow: hidden;
}

.multiselect-dropdown.open {
  display: block;
  animation: multiselect-dropdown-show 0.15s ease;
}

@keyframes multiselect-dropdown-show {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Action buttons (Select All / Clear All) */
.multiselect-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.multiselect-actions button {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}

.multiselect-actions button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Options container inside dropdown */
.multiselect-options {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

/* Each option (label with checkbox) */
.multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.1s ease;
  border-bottom: 1px solid #f3f4f6;
}

.multiselect-option:last-child {
  border-bottom: none;
}

.multiselect-option:hover {
  background: #fef3c7;
}

.multiselect-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f59e0b;
  cursor: pointer;
  flex-shrink: 0;
}

.multiselect-option-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
  word-break: break-word;
}

/* Server category headers */
.multiselect-category {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.multiselect-category-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  transition: background-color 0.15s ease;
}

.multiselect-category-toggle:hover {
  background: #f3f4f6;
}

.category-arrow {
  font-size: 10px;
  color: #6b7280;
  transition: transform 0.2s ease;
  width: 12px;
}

.category-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
}

/* Sets container within category */
.multiselect-category-sets {
  overflow: hidden;
  transition: max-height 0.2s ease;
  max-height: 500px;
}

.multiselect-category-sets.collapsed {
  max-height: 0;
}

.multiselect-category-sets .multiselect-option {
  padding-left: 34px;
  background: #ffffff;
}

.multiselect-category-sets .multiselect-option:hover {
  background: #fef3c7;
}

/* Dark theme for categories */
.dark-theme .multiselect-category {
  background: #111827;
  border-bottom-color: #374151;
}

.dark-theme .multiselect-category-toggle {
  color: #f3f4f6;
}

.dark-theme .multiselect-category-toggle:hover {
  background: #1f2937;
}

.dark-theme .category-arrow {
  color: #9ca3af;
}

.dark-theme .category-count {
  color: #6b7280;
}

.dark-theme .multiselect-category-sets .multiselect-option {
  background: #1f2937;
}

.dark-theme .multiselect-category-sets .multiselect-option:hover {
  background: #374151;
}

/* Filter chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  font-size: 12px;
  color: #92400e;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: #b45309;
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.chip-remove:hover {
  background: rgba(180, 83, 9, 0.2);
  color: #92400e;
}

.filter-chip-overflow {
  padding: 2px 8px;
  background: #f59e0b;
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Dark theme */
.dark-theme .multiselect-trigger {
  background: rgba(30, 30, 30, 0.8);
  border-color: rgba(245, 158, 11, 0.4);
}

.dark-theme .multiselect-placeholder,
.dark-theme .multiselect-arrow {
  color: #fbbf24;
}

.dark-theme .multiselect-dropdown {
  background: #1f2937;
  border-color: #374151;
}

.dark-theme .multiselect-actions {
  background: #111827;
  border-bottom-color: #374151;
}

.dark-theme .multiselect-actions button {
  background: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}

.dark-theme .multiselect-actions button:hover {
  background: #374151;
  border-color: #6b7280;
}

.dark-theme .multiselect-option:hover {
  background: #374151;
}

.dark-theme .multiselect-option {
  border-bottom-color: #374151;
}

.dark-theme .multiselect-option-text {
  color: #e5e7eb;
}

.dark-theme .filter-chip {
  background: #451a03;
  border-color: #78350f;
  color: #fde68a;
}

.dark-theme .chip-remove {
  color: #fcd34d;
}

.dark-theme .chip-remove:hover {
  background: rgba(252, 211, 77, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .multiselect-wrapper {
    min-width: 140px;
    max-width: 200px;
  }

  .multiselect-trigger {
    min-height: 40px;
    padding: 8px 10px;
  }

  .multiselect-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  .multiselect-dropdown.open {
    animation: multiselect-mobile-show 0.25s ease;
  }

  @keyframes multiselect-mobile-show {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .multiselect-dropdown .checkbox-list {
    max-height: calc(60vh - 60px);
  }

  .multiselect-dropdown .checkbox-list-item {
    min-height: 48px;
    padding: 12px 16px;
  }

  .multiselect-actions {
    padding: 12px 16px;
  }

  .multiselect-actions button {
    min-height: 40px;
    font-size: 14px;
  }
}

/* Backdrop for mobile */
.multiselect-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.multiselect-backdrop.open {
  display: block;
}

/* End Multi-Select Component */

.unclaimed-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.unclaimed-empty-message {
  text-align: center;
  padding: 20px;
  color: #92400e;
  font-size: 14px;
}

.dark-theme .unclaimed-empty-message {
  color: #fbbf24;
}

.unclaimed-ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.unclaimed-ticket-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unclaimed-ticket-id {
  font-weight: 600;
  color: #92400e;
  font-size: 14px;
}

.unclaimed-ticket-subject {
  color: #78350f;
  font-size: 13px;
}

.unclaimed-ticket-preview {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unclaimed-ticket-time {
  font-size: 12px;
  color: #a16207;
}

.unclaimed-claim-btn {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unclaimed-claim-btn:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.unclaimed-alert-footer {
  display: flex;
  justify-content: flex-end;
}

.unclaimed-view-all-btn {
  background: transparent;
  color: #92400e;
  border: 2px solid #92400e;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unclaimed-view-all-btn:hover {
  background: #92400e;
  color: white;
}

/* Dark theme for unclaimed alert */
body.dark-theme .unclaimed-alert-box {
  background: linear-gradient(135deg, #451a03, #78350f);
  border-color: #f59e0b;
}

body.dark-theme .unclaimed-alert-title {
  color: #fde68a;
}

body.dark-theme .unclaimed-alert-title #unclaimed-count {
  color: #fbbf24;
}

body.dark-theme .unclaimed-ticket-item {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(245, 158, 11, 0.4);
}

body.dark-theme .unclaimed-ticket-id {
  color: #fde68a;
}

body.dark-theme .unclaimed-ticket-subject {
  color: #fcd34d;
}

body.dark-theme .unclaimed-ticket-preview {
  color: #9ca3af;
}

body.dark-theme .unclaimed-ticket-time {
  color: #fbbf24;
}

body.dark-theme .unclaimed-view-all-btn {
  color: #fde68a;
  border-color: #fde68a;
}

body.dark-theme .unclaimed-view-all-btn:hover {
  background: #fde68a;
  color: #451a03;
}

/* No unclaimed tickets state - neutral/white styling */
.unclaimed-alert-box.no-unclaimed {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.unclaimed-alert-box.no-unclaimed .unclaimed-alert-title {
  color: #6b7280;
}

.unclaimed-alert-box.no-unclaimed .unclaimed-alert-title #unclaimed-count {
  color: #10b981;
  font-size: 20px;
}

.unclaimed-alert-box.no-unclaimed .unclaimed-empty-message {
  color: #9ca3af;
}

body.dark-theme .unclaimed-alert-box.no-unclaimed {
  background: #1f2937;
  border-color: #374151;
}

body.dark-theme .unclaimed-alert-box.no-unclaimed .unclaimed-alert-title {
  color: #9ca3af;
}

body.dark-theme .unclaimed-alert-box.no-unclaimed .unclaimed-alert-title #unclaimed-count {
  color: #34d399;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .unclaimed-alert-box {
    padding: 16px;
    margin: 0 16px 20px 16px;
  }

  .unclaimed-ticket-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .unclaimed-ticket-preview {
    max-width: 100%;
    white-space: normal;
  }

  .unclaimed-claim-btn {
    width: 100%;
  }
}

/* ============================================
   HELP CENTER STYLES
   ============================================ */

/* Help Navigation Icon */
.nav-icon-svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  transition: stroke 0.15s ease;
}

.nav-item:hover .nav-icon-svg,
.nav-item.active .nav-icon-svg {
  stroke: var(--accent-primary);
}

/* Help Center Container */
.help-center {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Help Search */
.help-search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto 32px auto;
}

.help-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.help-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.help-search-input::placeholder {
  color: var(--text-muted);
}

.help-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  pointer-events: none;
}

/* Help Categories Grid */
.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Help Category Card */
.help-category-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.help-category-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.help-category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.help-category-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
}

.help-category-card:hover .help-category-icon {
  background: var(--accent-primary);
}

.help-category-card:hover .help-category-icon svg {
  stroke: white;
}

.help-category-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.help-category-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Help Content Area */
.help-content-area {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

/* Help Back Button */
/* Help Content Section */
.help-content-section h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* Help Accordion */
.help-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.help-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.help-accordion-header:hover {
  background: var(--bg-hover);
}

.help-accordion-header .accordion-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.help-accordion-item.active .help-accordion-header .accordion-arrow {
  transform: rotate(180deg);
}

.help-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}

.help-accordion-item.active .help-accordion-content {
  /* max-height is set dynamically by JavaScript */
}

.help-accordion-content > * {
  padding: 0 20px;
}

.help-accordion-content > *:first-child {
  padding-top: 16px;
}

.help-accordion-content > *:last-child {
  padding-bottom: 16px;
}

.help-accordion-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.help-accordion-content ul,
.help-accordion-content ol {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 40px;
  margin-bottom: 12px;
}

.help-accordion-content li {
  margin-bottom: 8px;
}

.help-accordion-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Monaco', 'Menlo', monospace;
  color: var(--accent-primary);
}

.help-code-list {
  list-style: none;
  padding-left: 20px !important;
}

.help-code-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Keyboard Shortcuts */
.help-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.help-shortcut-category h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.help-shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.help-shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
}

.help-shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--border-color);
}

.help-shortcut-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .help-center {
    padding: 16px;
  }

  .help-search-container {
    margin-bottom: 24px;
  }

  .help-search-input {
    padding: 12px 16px 12px 44px;
    font-size: 14px;
  }

  .help-categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .help-category-card {
    padding: 20px;
  }

  .help-content-area {
    padding: 16px;
  }

  .help-content-section h2 {
    font-size: 20px;
  }

  .help-accordion-header {
    padding: 14px 16px;
    font-size: 14px;
  }

  .help-accordion-content > * {
    padding: 0 16px;
  }

  .help-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .help-shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ====================================
   Avatar Preview in BotSet Form
   ==================================== */

.avatar-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar-input-group input {
  flex: 1;
}

.avatar-preview {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 600;
}

/* Dark mode support */
body.dark-theme .avatar-preview {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

body.dark-theme .avatar-placeholder {
  color: var(--text-secondary);
}

/* ============================================================
   Knowledge Base Styles
   ============================================================ */

.kb-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.kb-toolbar-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.kb-toolbar-right {
  display: flex;
  gap: 8px;
}

.kb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.kb-articles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-article-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kb-article-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kb-article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.kb-article-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.kb-article-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.kb-article-category {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.kb-article-tags {
  display: flex;
  gap: 4px;
}

.kb-article-tags .tag {
  background: var(--accent-primary);
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
}

.kb-article-summary {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.kb-url-import {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}

.kb-url-import label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.kb-url-import-row {
  display: flex;
  gap: 8px;
}

.kb-url-import-row .form-input {
  flex: 1;
}

.kb-url-import-row .btn {
  flex-shrink: 0;
}

.kb-url-import-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.kb-url-import-status.loading {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.kb-url-import-status.success {
  background: #d4edda;
  color: #155724;
}

.kb-url-import-status.error {
  background: #f8d7da;
  color: #721c24;
}

.dark-theme .kb-url-import-status.success {
  background: rgba(40, 167, 69, 0.15);
  color: #6dd695;
}

.dark-theme .kb-url-import-status.error {
  background: rgba(220, 53, 69, 0.15);
  color: #f5a0a8;
}

.kb-category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.kb-category-name {
  font-weight: 500;
  flex: 0 0 auto;
}

.kb-category-desc {
  flex: 1;
  color: var(--text-secondary);
  font-size: 13px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-danger {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-danger:hover {
  background: #c0392b;
}

.modal-large {
  max-width: 800px;
  width: 90%;
}

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Knowledge Base responsive breakpoints */
@media (max-width: 768px) {
  .kb-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .kb-toolbar-left {
    width: 100%;
  }
  .kb-toolbar-left .filter-select,
  .kb-toolbar-left .search-input {
    width: 100%;
  }
  .kb-toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }
  .kb-article-header {
    flex-wrap: wrap;
  }
  .kb-url-import-row {
    flex-direction: column;
  }
  .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
  }
}

@media (max-width: 480px) {
  .kb-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    flex-direction: column;
  }
}

/* ============================================
   AI Copilot Panel
   ============================================ */

.copilot-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.copilot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.copilot-icon {
  width: 18px;
  height: 18px;
}

.copilot-action-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  background: transparent;
  color: var(--accent-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 10px;
}

.copilot-action-btn:hover {
  background: var(--accent-primary);
  color: #fff;
}

.copilot-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.copilot-section {
  margin-bottom: 12px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.copilot-section h5 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.copilot-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.copilot-use-btn {
  margin-top: 8px;
  padding: 5px 12px;
  border: none;
  border-radius: 4px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.copilot-use-btn:hover {
  opacity: 0.85;
}

.copilot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.copilot-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-primary);
}

.copilot-list li:last-child {
  border-bottom: none;
}

.copilot-list li .copilot-list-title {
  font-weight: 500;
}

.copilot-list li .copilot-list-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.copilot-ask {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.copilot-ask input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
}

.copilot-ask button {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.copilot-ask button:hover {
  opacity: 0.85;
}

/* --- ANALYTICS FILTER CONTROLS --- */
.analytics-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- KB SUPPLEMENTARY CLASSES --- */
.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  min-width: 180px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.loading-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.kb-category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-details-content {
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
}

/* --- HELP CENTER --- */
.help-center {
  max-width: 900px;
  margin: 0 auto;
}

.help-search-container {
  position: relative;
  margin-bottom: 24px;
}

.help-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.help-search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.help-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.help-category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-align: center;
}

.help-category-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.help-category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-category-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.help-category-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.help-category-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.help-content-area {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.help-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: border-color 0.15s, background 0.15s;
}

.help-back-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary, var(--bg-secondary));
}

.help-back-btn svg {
  width: 16px;
  height: 16px;
}

.help-content-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.help-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.help-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.help-accordion-header:hover {
  background: var(--bg-tertiary, rgba(0, 0, 0, 0.03));
}

.accordion-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.help-accordion-item.active .accordion-arrow {
  transform: rotate(180deg);
}

.help-accordion-content {
  display: none;
  padding: 0 16px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.help-accordion-item.active .help-accordion-content {
  display: block;
}

.help-accordion-content p {
  margin: 0 0 10px;
}

.help-accordion-content ul,
.help-accordion-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.help-accordion-content li {
  margin-bottom: 6px;
}

.help-code-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.help-code-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.help-code-list li:last-child {
  border-bottom: none;
}

.help-code-list code {
  background: var(--bg-tertiary, rgba(0, 0, 0, 0.05));
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
}

.help-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.help-shortcut-category h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-primary);
}

.help-shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.help-shortcut-keys {
  display: flex;
  gap: 4px;
  align-items: center;
}

.help-shortcut-keys kbd {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-family: monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  min-width: 24px;
  text-align: center;
}

.help-shortcut-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Dark theme adjustments for Help section */
body.dark-theme .help-category-icon {
  background: rgba(129, 120, 255, 0.15);
}

body.dark-theme .help-shortcut-keys kbd {
  background: var(--bg-tertiary, #374151);
  border-color: #4b5563;
}

body.dark-theme .help-code-list code {
  background: var(--bg-tertiary, #374151);
}
/* --- END HELP CENTER --- */

/* --- INLINE FORM VALIDATION --- */
.field-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-top: 4px;
}

.field-hint.error {
  color: #ef4444;
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ef4444;
}

.form-group input.valid,
.form-group textarea.valid {
  border-color: #10b981;
}

/* --- WEBSOCKET STATUS INDICATOR --- */
.ws-status {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.ws-status.connected {
  background-color: #10b981;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.5);
}

.ws-status.disconnected {
  background-color: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}
