/* BotInBlue Dashboard - Blue Theme */
:root {
  /* Dark base with blue undertones */
  --bg-primary: #0a0a12;
  --bg-secondary: #0f0f1a;
  --bg-card: #151522;
  --bg-card-hover: #1a1a2e;
  --border: #252538;
  --border-light: #32324a;

  /* Neutral text hierarchy */
  --text-primary: #fafafa;
  --text-secondary: #a1a1b8;
  --text-muted: #6b6b8a;

  /* Blue accent colors - primary */
  --accent: #2563eb;
  --accent-hover: #3b82f6;
  --accent-muted: rgba(37, 99, 235, 0.15);
  --accent-secondary: #1d4ed8;
  --accent-light: #60a5fa;

  /* Muted status colors */
  --success: #4ade80;
  --success-muted: rgba(74, 222, 128, 0.15);
  --warning: #fbbf24;
  --warning-muted: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-muted: rgba(248, 113, 113, 0.15);
  --info: #38bdf8;
  --info-muted: rgba(56, 189, 248, 0.15);

  /* Blue gradients */
  --gradient-purple: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-blue: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --gradient-blue-purple: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  --gradient-green: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --gradient-card: linear-gradient(180deg, rgba(37, 99, 235, 0.03) 0%, transparent 100%);

  /* Shadows with blue glow */
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --glow: 0 0 20px rgba(37, 99, 235, 0.2);
  --glow-accent: 0 0 30px rgba(37, 99, 235, 0.25);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-width: 260px;
}

/* Light Theme Override */
[data-theme="light"] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4f8;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-muted: rgba(37, 99, 235, 0.1);
  --success-muted: rgba(74, 222, 128, 0.12);
  --warning-muted: rgba(251, 191, 36, 0.12);
  --danger-muted: rgba(248, 113, 113, 0.12);
  --info-muted: rgba(56, 189, 248, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --glow: 0 0 20px rgba(37, 99, 235, 0.1);
  --gradient-card: linear-gradient(180deg, rgba(37, 99, 235, 0.02) 0%, transparent 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: width 0.3s ease;
}

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

.sidebar.collapsed:hover {
  width: var(--sidebar-width);
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .user-details {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed:hover .logo span,
.sidebar.collapsed:hover .nav-item span,
.sidebar.collapsed:hover .nav-label,
.sidebar.collapsed:hover .user-details {
  opacity: 1;
  width: auto;
}

/* Collapsed sidebar icons - centered with active box */
.sidebar.collapsed .nav-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px;
}

.sidebar.collapsed .nav-item {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 2px 0;
  gap: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.sidebar.collapsed .nav-item i {
  font-size: 18px;
  width: auto;
}

.sidebar.collapsed:hover .nav-section {
  align-items: stretch;
  padding: 0;
}

.sidebar.collapsed:hover .nav-item {
  width: auto;
  height: auto;
  gap: 12px;
  justify-content: flex-start;
  padding: 10px 12px;
  margin: 0 0 4px 0;
}

.sidebar.collapsed:hover .nav-item i {
  font-size: 15px;
  width: 20px;
}

/* Adjust main content when sidebar collapses */
.app.sidebar-collapsed .main-content {
  margin-left: 72px;
}

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

/* Sidebar toggle button */
.sidebar-toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 20px 12px;
}

.sidebar.collapsed .logo {
  gap: 0;
  justify-content: center;
}

.sidebar.collapsed .logo i {
  margin: 0 auto;
}

.sidebar.collapsed:hover .logo {
  gap: 12px;
  justify-content: flex-start;
}

.sidebar.collapsed:hover .sidebar-header {
  justify-content: space-between;
  padding: 20px 16px;
}

.sidebar.collapsed .sidebar-toggle {
  display: none;
}

.sidebar.collapsed:hover .sidebar-toggle {
  display: flex;
}

/* No-label section */
.nav-section.no-label {
  padding-top: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo i {
  font-size: 28px;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-section {
  padding: 0 16px;
  margin-bottom: 16px;
}

.nav-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-size: 14px;
  margin-bottom: 4px;
}

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

.nav-item.active {
  background: var(--accent);
  color: white;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

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

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

.avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 500;
  font-size: 14px;
}

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

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Mobile logo - hidden on desktop */
.mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-logo i {
  font-size: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 360px;
}

.search-box i {
  color: var(--text-muted);
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  outline: none;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

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

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-sm {
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-sm:hover {
  background: var(--bg-card-hover);
}

/* Pages */
.pages-container {
  padding: 32px;
}

.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card.gradient-purple::before {
  background: var(--gradient-purple);
}

.stat-card.gradient-blue::before {
  background: var(--gradient-blue);
}

.stat-card.gradient-green::before {
  background: var(--gradient-green);
}

.stat-card.gradient-orange::before {
  background: var(--gradient-orange);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.gradient-purple .stat-icon {
  background: var(--accent-muted);
  color: var(--accent-hover);
}

.gradient-blue .stat-icon {
  background: var(--info-muted);
  color: var(--info);
}

.gradient-green .stat-icon {
  background: var(--success-muted);
  color: var(--success);
}

.gradient-orange .stat-icon {
  background: var(--warning-muted);
  color: var(--warning);
}

.stat-content {
  flex: 1;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

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

.stat-trend {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.up {
  color: var(--success);
}

.stat-trend.down {
  color: var(--danger);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

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

/* Chart Placeholder */
.chart-placeholder {
  height: 240px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  padding: 20px 0;
}

.bar {
  flex: 1;
  margin: 0 8px;
  background: linear-gradient(to top, var(--accent), transparent);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.3s;
}

.bar:hover {
  background: linear-gradient(to top, var(--accent-hover), transparent);
}

.bar.active {
  background: var(--gradient-purple);
}

.bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
}

/* Activity */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.activity-icon.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.activity-icon.info {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-secondary);
}

.activity-icon.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.activity-content {
  flex: 1;
}

.activity-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Agents Grid */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-filter {
  display: flex;
  gap: 12px;
}

.search-filter input,
.search-filter select {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.view-toggle button {
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
}

.view-toggle button.active {
  background: var(--accent);
  color: white;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.agent-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.agent-status {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.agent-status.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.agent-status.offline {
  background: var(--text-muted);
}

.agent-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--gradient-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.agent-card h4 {
  font-size: 18px;
  margin-bottom: 4px;
}

.agent-type {
  font-size: 13px;
  color: var(--text-secondary);
}

.agent-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agent-stats div {
  font-size: 13px;
  color: var(--text-secondary);
}

.agent-stats strong {
  display: block;
  font-size: 16px;
  color: var(--text-primary);
}

.agent-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.agent-card.add-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-style: dashed;
  color: var(--text-muted);
}

.agent-card.add-new i {
  font-size: 32px;
  margin-bottom: 12px;
}

.agent-card.add-new:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Knowledge */
.knowledge-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active,
.tab:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.knowledge-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.knowledge-icon.website {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.knowledge-icon.doc {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.knowledge-icon.social {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.knowledge-content {
  flex: 1;
}

.knowledge-content h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.knowledge-content span {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--gradient-purple);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.status-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.knowledge-card.add-new {
  border-style: dashed;
  justify-content: center;
  flex-direction: column;
  min-height: 120px;
  color: var(--text-muted);
  cursor: pointer;
}

.knowledge-card.add-new:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.knowledge-card.add-new i {
  font-size: 24px;
  margin-bottom: 8px;
}

.global-knowledge-section .muted {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.global-preview {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.global-preview p {
  margin-bottom: 4px;
}

/* Campaigns */
.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.campaign-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.campaign-status.paused {
  background: var(--warning);
}

.campaign-info {
  flex: 1;
}

.campaign-info h4 {
  margin-bottom: 4px;
}

.campaign-info span {
  font-size: 13px;
  color: var(--text-muted);
}

.campaign-metrics {
  display: flex;
  gap: 32px;
}

.metric {
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 18px;
}

.metric span {
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-actions {
  display: flex;
  gap: 8px;
}

/* Workflow Canvas */
.workflow-canvas {
  display: flex;
  height: calc(100vh - 240px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.workflow-sidebar {
  width: 200px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px;
}

.workflow-sidebar h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.node-palette {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.palette-item {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.palette-item:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.canvas-area {
  flex: 1;
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 24px 24px;
}

.workflow-node {
  position: absolute;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: move;
  transition: all 0.2s;
}

.workflow-node:hover {
  border-color: var(--accent);
}

.workflow-node.trigger {
  border-color: var(--warning);
}

.workflow-node.condition {
  border-color: var(--accent-secondary);
}

.node-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
}

.trigger .node-icon {
  background: var(--warning);
}

.condition .node-icon {
  background: var(--accent-secondary);
}

.node-connector {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.node-connector.input {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.node-connector.output {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.node-connector.yes {
  right: -6px;
  top: 30%;
  background: var(--success);
}

.node-connector.no {
  right: -6px;
  top: 70%;
  background: var(--danger);
}

.connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Analytics */
.analytics-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.analytics-filters select {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

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

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.analytics-card h4 {
  margin-bottom: 20px;
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.funnel-stage {
  background: var(--gradient-purple);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  transition: all 0.3s;
}

.funnel-stage:nth-child(2) {
  background: linear-gradient(135deg, #6b4fd4 0%, #9850d4 100%);
}

.funnel-stage:nth-child(3) {
  background: linear-gradient(135deg, #5a43b0 0%, #8745b0 100%);
}

.funnel-stage:nth-child(4) {
  background: linear-gradient(135deg, #493790 0%, #6a3a90 100%);
}

.agent-ranking {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.rank-item span:first-child {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.rank-item strong {
  flex: 1;
}

.score {
  color: var(--success);
  font-weight: 600;
}

/* Integrations */
/* Integrations Page Styles */
.integrations-section {
  margin-bottom: 40px;
}

.integrations-section .section-header {
  margin-bottom: 20px;
}

.integrations-section .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.integrations-section .section-title i {
  font-size: 20px;
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.integration-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.integration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.integration-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.15);
}

.integration-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.integration-icon.google {
  background: rgba(255, 255, 255, 0.95);
}

.integration-icon.microsoft {
  background: rgba(255, 255, 255, 0.95);
}

.integration-icon.calendly {
  background: rgba(0, 107, 255, 0.1);
}

.integration-icon.hubspot {
  background: rgba(255, 122, 89, 0.1);
}

.integration-icon.gohighlevel {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  font-size: 22px;
  color: #a78bfa;
}

.integration-info {
  flex: 1;
  text-align: left;
}

.integration-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.integration-services {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.integration-email {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.integration-card .status {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.integration-card .status.connected {
  color: var(--success);
}

.btn-connect {
  padding: 10px 18px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-connect:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-disconnect {
  padding: 8px 14px;
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.integration-card.coming-soon {
  opacity: 0.55;
  cursor: not-allowed;
}

.integration-card.coming-soon:hover {
  transform: none;
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: none;
}

.coming-soon-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  color: #a78bfa;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.integration-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: 16px;
}

.integration-empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-empty-state .empty-icon i {
  font-size: 28px;
  color: #6366f1;
}

.integration-empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.integration-empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 3.7s;
  z-index: 9999;
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Data Table */
.data-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.customer-cell span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.plan-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.plan-badge.starter {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.plan-badge.pro {
  background: rgba(124, 92, 255, 0.2);
  color: #9175ff;
}

.plan-badge.enterprise {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

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

.status-dot.warning {
  background: var(--warning);
}

/* Billing */
.billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.plan-card .plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.plan-price {
  font-size: 32px;
  font-weight: 700;
}

.plan-price small {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.plan-features {
  list-style: none;
  margin-bottom: 24px;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-features i {
  color: var(--success);
}

.usage-card h4 {
  margin-bottom: 20px;
}

.usage-meters {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.meter-header span {
  color: var(--text-muted);
}

/* Modal Overlay - for login modal etc */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-overlay .modal {
  display: block;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 680px;
  max-height: 90vh;
  margin: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h2 {
  font-size: 18px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.form-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
}

.range-value {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

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

.select-sm {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
}

.search-input {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  min-width: 150px;
}

.date-input {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  width: 130px;
}

.nav-item.logout {
  color: var(--error);
  margin-top: auto;
}

.nav-item.logout:hover {
  background: rgba(255, 87, 87, 0.1);
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

/* =====================================================
   RILEY PAGES STYLES
   ===================================================== */

/* Riley Settings Layout */
.riley-settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card {
  padding: 0;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.settings-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.settings-icon.voice {
  background: #7c3aed20;
  color: #7c3aed;
}

.settings-icon.schedule {
  background: #f59e0b20;
  color: #f59e0b;
}

.settings-icon.persona {
  background: #ec489920;
  color: #ec4899;
}

.settings-icon.greetings {
  background: #10b98120;
  color: #10b981;
}

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

.settings-title span {
  font-size: 13px;
  color: var(--text-muted);
}

.settings-card-body {
  padding: 20px;
}

/* Voice Selector */
.voice-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.voice-option {
  cursor: pointer;
}

.voice-option input {
  display: none;
}

.voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.voice-card i {
  font-size: 24px;
  color: var(--text-muted);
}

.voice-card span {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.voice-card small {
  font-size: 11px;
  color: var(--text-muted);
}

.voice-option input:checked+.voice-card,
.voice-option.active .voice-card {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.voice-option input:checked+.voice-card i,
.voice-option.active .voice-card i {
  color: var(--accent);
}

.btn-full {
  width: 100%;
}

/* Time Range Selector */
.time-range {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.time-input {
  flex: 1;
}

.time-input label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.time-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.time-separator {
  padding-bottom: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Weekday Selector */
.weekday-selector {
  margin-top: 8px;
}

.weekday-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.weekday-grid {
  display: flex;
  gap: 8px;
}

.weekday-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.weekday-btn input {
  display: none;
}

.weekday-btn span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.weekday-btn:has(input:checked),
.weekday-btn.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.weekday-btn:has(input:checked) span,
.weekday-btn.checked span {
  color: white;
}

/* Greeting Tabs */
.greeting-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.greeting-tab {
  flex: 1;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.greeting-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.persona-textarea {
  min-height: 200px;
}

/* Donut Chart */
.donut-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
}

.circular-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
}

.circle.inbound {
  stroke: var(--success);
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-total {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.inbound {
  background: var(--success);
}

.legend-dot.outbound {
  background: var(--info);
}

.legend-info {
  display: flex;
  justify-content: space-between;
  flex: 1;
}

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

.legend-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.legend-value small {
  font-weight: 400;
  color: var(--text-muted);
}

/* Calendar Layout */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.calendar-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.calendar-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
}

.calendar-month {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-header-controls .calendar-filters {
  margin-bottom: 0;
}

/* Calendar Grid */
.calendar-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.calendar-weekdays span {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
  min-height: 80px;
  padding: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:hover {
  background: var(--bg-card-hover);
}

.calendar-day.other-month {
  opacity: 0.4;
}

.calendar-day.today span {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.calendar-day.selected {
  background: var(--accent-muted);
}

.calendar-day>span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.day-events {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.event-dot.source-voice {
  background: #7c3aed;
}

.event-dot.source-gmail {
  background: #ea4335;
}

.event-dot.source-outlook {
  background: #0078d4;
}

.event-dot.source-calendly {
  background: #006bff;
}

.event-dot.source-hubspot {
  background: #ff7a59;
}

.event-dot.source-ghl {
  background: #10b981;
}

/* Appointments Sidebar */
.appointments-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

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

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

.appointment-count {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.appointments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.appointment-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
}

.appointment-item.source-voice {
  border-left-color: #7c3aed;
}

.appointment-item.source-gmail {
  border-left-color: #ea4335;
}

.appointment-item.source-calendly {
  border-left-color: #006bff;
}

.appointment-item.source-hubspot {
  border-left-color: #ff7a59;
}

.appointment-time-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.appointment-time-slot .time {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.appointment-time-slot .duration {
  font-size: 11px;
  color: var(--text-muted);
}

.appointment-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.appointment-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.source-tag {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* Settings Grid (legacy) */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.settings-grid .card.full-width {
  grid-column: 1 / -1;
}

.page-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.data-table td {
  font-size: 14px;
  color: var(--text-primary);
}

.phone-number {
  font-family: monospace;
  font-weight: 600;
}

.inline-input,
.inline-select {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
  max-width: 180px;
}

.btn-sm.danger {
  color: var(--danger);
}

.btn-sm.danger:hover {
  background: var(--danger-muted);
}

/* Call List */
.call-list {
  display: flex;
  flex-direction: column;
}

.call-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.call-item:hover {
  background: var(--bg-card-hover);
}

.call-direction {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.call-direction.inbound {
  background: var(--success-muted);
  color: var(--success);
}

.call-direction.outbound {
  background: var(--info-muted);
  color: var(--info);
}

.call-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.call-number {
  font-weight: 600;
  color: var(--text-primary);
}

.call-agent {
  font-size: 13px;
  color: var(--text-muted);
}

.call-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.call-duration {
  font-weight: 600;
  color: var(--text-primary);
}

.call-time {
  font-size: 12px;
  color: var(--text-muted);
}

.expand-icon {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.call-item.expanded .expand-icon {
  transform: rotate(180deg);
}

.call-transcript {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.call-transcript.hidden {
  display: none;
}

.transcript-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transcript-line {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}

.transcript-line.bot {
  background: var(--accent-muted);
  margin-right: 20%;
}

.transcript-line.user {
  background: var(--bg-card);
  margin-left: 20%;
}

/* Direction Stats */
.direction-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.direction-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.direction-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.direction-icon.inbound {
  background: var(--success-muted);
  color: var(--success);
}

.direction-icon.outbound {
  background: var(--info-muted);
  color: var(--info);
}

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

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

.direction-value {
  font-size: 13px;
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  gap: 8px;
}

/* Calendar Filters */
.calendar-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.calendar-filter {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.calendar-filter:hover {
  background: var(--bg-card-hover);
}

.calendar-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Appointments Grid */
.appointments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.appointment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 4px solid var(--accent);
}

.appointment-card.source-voice {
  border-left-color: #7c3aed;
}

.appointment-card.source-gmail {
  border-left-color: #ea4335;
}

.appointment-card.source-outlook {
  border-left-color: #0078d4;
}

.appointment-card.source-calendly {
  border-left-color: #006bff;
}

.appointment-card.source-hubspot {
  border-left-color: #ff7a59;
}

.appointment-card.source-ghl {
  border-left-color: #10b981;
}

.appointment-source {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.source-voice .appointment-source {
  color: #7c3aed;
}

.source-gmail .appointment-source {
  color: #ea4335;
}

.source-outlook .appointment-source {
  color: #0078d4;
}

.source-calendly .appointment-source {
  color: #006bff;
}

.source-hubspot .appointment-source {
  color: #ff7a59;
}

.source-ghl .appointment-source {
  color: #10b981;
}

.appointment-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appointment-date {
  font-size: 13px;
  color: var(--text-muted);
}

.appointment-hour {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.appointment-details h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.appointment-details p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.appointment-type {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--accent-muted);
  border-radius: 20px;
  color: var(--accent);
}

.appointment-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Widget Layout */
.widget-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.widget-config {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget-type-selector {
  display: flex;
  gap: 16px;
}

.widget-type-option {
  flex: 1;
  cursor: pointer;
}

.widget-type-option input {
  display: none;
}

.widget-type-option .option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.widget-type-option .option-content i {
  font-size: 28px;
  color: var(--text-muted);
}

.widget-type-option .option-content span {
  font-weight: 600;
  color: var(--text-primary);
}

.widget-type-option .option-content small {
  font-size: 12px;
  color: var(--text-muted);
}

.widget-type-option.active .option-content,
.widget-type-option input:checked+.option-content {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.widget-type-option.active .option-content i,
.widget-type-option input:checked+.option-content i {
  color: var(--accent);
}

.color-picker {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-picker input[type="color"] {
  width: 48px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.color-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: monospace;
}

.embed-code {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.embed-code pre {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.embed-code code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.copy-btn {
  align-self: flex-start;
}

/* Widget Preview */
.preview-container {
  padding: 20px;
}

.preview-website {
  background: #1a1a2e;
  border-radius: var(--radius);
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.preview-header {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preview-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-placeholder {
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.preview-placeholder.short {
  width: 60%;
}

.widget-bubble {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 320px;
}

.widget-expanded {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--accent);
  color: white;
}

.widget-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.widget-title {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.widget-title span {
  font-weight: 600;
}

.widget-title small {
  font-size: 12px;
  opacity: 0.8;
}

.widget-close {
  background: none;
  border: none;
  color: white;
  opacity: 0.8;
  cursor: pointer;
}

.widget-body {
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-message {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
}

.widget-message.bot {
  background: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
}

.widget-message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
}

.widget-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.widget-input input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
}

.mic-btn,
.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.send-btn {
  background: var(--accent);
  color: white;
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

@media (max-width: 768px) {

  /* Mobile Hamburger Button */
  .mobile-menu-btn {
    display: flex !important;
  }

  /* Sidebar - Hidden by default, slides in */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Overlay when sidebar is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Main content full width - override sidebar-collapsed margin */
  .main-content {
    margin-left: 0 !important;
  }

  /* Top bar adjustments for mobile */
  .top-bar {
    padding: 12px 16px;
    justify-content: space-between;
  }

  /* Mobile logo - visible on mobile only */
  .mobile-logo {
    display: flex !important;
  }

  /* Hide search box on mobile */
  .search-box {
    display: none;
  }

  /* Hide elements with hide-mobile class */
  .hide-mobile {
    display: none !important;
  }

  /* Show hamburger in top-actions */
  .mobile-menu-btn {
    display: flex !important;
    order: 10;
  }

  /* Stats grid single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Page container */
  .pages-container {
    padding: 20px 16px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  /* Agent cards */
  .agents-grid {
    grid-template-columns: 1fr;
  }

  /* Knowledge grid */
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  /* Toolbar */
  .toolbar {
    flex-direction: column;
    gap: 12px;
  }

  .search-filter {
    width: 100%;
  }

  .search-filter input {
    flex: 1;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    margin: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Reset collapsed sidebar styles for mobile - always show full nav */
  .sidebar.collapsed {
    width: var(--sidebar-width);
  }

  .sidebar.collapsed .nav-section {
    align-items: stretch;
    padding: 0;
  }

  .sidebar.collapsed .nav-item {
    width: auto;
    height: auto;
    gap: 12px;
    justify-content: flex-start;
    padding: 10px 12px;
    margin: 0 0 4px 0;
  }

  .sidebar.collapsed .nav-item i {
    font-size: 15px;
    width: 20px;
  }

  .sidebar.collapsed .logo span,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .user-details {
    opacity: 1;
    width: auto;
  }

  .sidebar.collapsed .sidebar-toggle {
    display: flex;
  }

  /* Hide sidebar toggle on mobile - use hamburger instead */
  .sidebar-toggle {
    display: none !important;
  }
}

/* Hamburger button - hidden on desktop */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--bg-card-hover);
}

/* =====================================================
   ENHANCED RILEY UI ROUND 2
   ===================================================== */

/* Calendar Integration Options */
.calendar-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-option:hover {
  background: var(--bg-card-hover);
}

.calendar-option.selected {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.calendar-option .calendar-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.calendar-icon.google {
  background: #ea433510;
  color: #ea4335;
}

.calendar-icon.outlook {
  background: #0078d410;
  color: #0078d4;
}

.calendar-icon.calendly {
  background: #006bff10;
  color: #006bff;
}

.calendar-icon.hubspot {
  background: #ff7a5910;
  color: #ff7a59;
}

.calendar-option span {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-option .check {
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.calendar-option.selected .check {
  opacity: 1;
}

.settings-icon.calendar {
  background: #3b82f620;
  color: #3b82f6;
}

/* Weekday Buttons - Enhanced */
.weekday-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.weekday-btn span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.weekday-btn.active,
.weekday-btn:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
}

.weekday-btn.active span,
.weekday-btn:has(input:checked) span {
  color: white;
}

/* Calendar View Tabs */
.calendar-view-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.view-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.view-tab:hover {
  color: var(--text-primary);
}

.view-tab.active {
  background: var(--accent);
  color: white;
}

/* Call Tags */
.call-tags {
  display: flex;
  gap: 8px;
  flex: 1;
}

.call-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.call-tag.booked {
  background: var(--success-muted);
  color: var(--success);
}

/* Play Button */
.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.play-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* Appointment Tags */
.appointment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.apt-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}

.apt-tag.source {
  background: var(--bg-card);
  color: var(--text-muted);
}

.apt-tag.type {
  background: #3b82f620;
  color: #3b82f6;
}

.apt-tag.priority.high {
  background: #ef444420;
  color: #ef4444;
}

.apt-tag.reschedule {
  background: #f59e0b20;
  color: #f59e0b;
}

/* Voice Orb Widget */
.widget-orb {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.orb-container {
  position: relative;
  width: 70px;
  height: 70px;
  cursor: pointer;
}

.orb-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: orbPulse 2s infinite;
}

.orb-pulse.delay {
  animation-delay: 1s;
}

@keyframes orbPulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.orb-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.orb-container:hover .orb-core {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5);
}

.orb-label {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Voice Card Selected State */
.voice-card.selected {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.voice-card.selected i {
  color: var(--accent);
}

/* ==================== */
/* Goldmine Styles      */
/* ==================== */

/* Employee Cards Grid */
.goldmine-employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.goldmine-employee-card {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.goldmine-employee-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a855f7, #ec4899);
  opacity: 0;
  transition: opacity 0.3s;
}

.goldmine-employee-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow:
    0 12px 40px rgba(99, 102, 241, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.goldmine-employee-card:hover::before {
  opacity: 1;
}

.goldmine-employee-card.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(30, 30, 50, 0.98));
}

.goldmine-employee-card.selected::before {
  opacity: 1;
}

.goldmine-employee-card.add-new {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(20, 20, 35, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  color: var(--text-muted);
  gap: 16px;
  box-shadow: none;
}

.goldmine-employee-card.add-new::before {
  display: none;
}

.goldmine-employee-card.add-new:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

.goldmine-employee-card.add-new i {
  font-size: 40px;
  opacity: 0.8;
}

.goldmine-employee-card.add-new span {
  font-size: 16px;
  font-weight: 500;
}

/* Employee Status Indicator */
.employee-status {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.employee-status.active {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
  }

  50% {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.9);
  }
}

.employee-status.paused {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.employee-status.scheduled {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* Employee Avatar */
.employee-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.goldmine-employee-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.goldmine-employee-card .employee-type {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  font-weight: 500;
}

.goldmine-employee-card .employee-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  font-size: 14px;
}

.goldmine-employee-card .employee-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.goldmine-employee-card .employee-stats strong {
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.goldmine-employee-card .employee-stats span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.goldmine-employee-card .employee-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 0 4px;
}

.goldmine-employee-card .employee-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.goldmine-employee-card .employee-meta i {
  color: var(--text-muted);
  font-size: 14px;
}

.goldmine-employee-card .employee-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.goldmine-employee-card .employee-actions .btn-sm {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.goldmine-employee-card .employee-actions .btn-sm:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--accent);
}

/* ===================== */
/* Configuration Panel   */
/* ===================== */

.goldmine-config-panel {
  background: linear-gradient(180deg, rgba(25, 25, 40, 0.98), rgba(15, 15, 25, 0.99));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  margin-top: 32px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.config-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.config-panel-header h3 {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
}

.config-panel-header h3 i {
  color: var(--accent);
  font-size: 20px;
}

.btn-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 16px;
}

.btn-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.config-panel-body {
  padding: 32px;
  display: grid;
  gap: 32px;
  max-height: 72vh;
  overflow-y: auto;
}

/* Config Sections with Visual Cards */
.config-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
}

.config-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.config-section h4 i {
  color: var(--accent);
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Tools Grid */
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.tool-checkbox:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}

.tool-checkbox:has(input:checked) {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
}

.tool-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Expandable Selector (Customer List) */
.expandable-selector {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.selector-header:hover {
  background: rgba(99, 102, 241, 0.1);
}

.selector-header i {
  color: var(--text-muted);
  transition: transform 0.3s;
}

.expandable-selector.open .selector-header i {
  transform: rotate(180deg);
}

.selector-body {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 300px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.15);
}

.selector-search {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.selector-search input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
}

.selector-options {
  padding: 12px;
}

.list-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.list-option:hover {
  background: rgba(99, 102, 241, 0.15);
}

.list-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.list-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
}

.toggle-label input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

/* Schedule Tabs */
.schedule-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: 12px;
  width: fit-content;
}

.schedule-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 14px;
}

.schedule-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.schedule-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Day Selector */
.day-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.day-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.day-check:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.day-check:has(input:checked) {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: white;
}

.day-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Pre-planned Campaigns */
.preplanned-campaigns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.preplanned-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.2s;
}

.preplanned-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.preplanned-date {
  font-size: 14px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.preplanned-label {
  flex: 1;
  font-weight: 600;
  color: white;
}

.btn-sm.danger {
  color: #ef4444;
}

.btn-sm.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-full {
  width: 100%;
}

/* Config Panel Footer */
.config-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .goldmine-employees-grid {
    grid-template-columns: 1fr;
  }

  .config-panel-body {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==================== */
/* Customer Lists Styles */
/* ==================== */

.customer-lists-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  min-height: 600px;
}

/* Labels Sidebar */
.labels-sidebar {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 0;
  height: fit-content;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.labels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
}

.labels-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.labels-header .btn-sm {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--accent);
  border-radius: 10px;
}

.labels-header .btn-sm:hover {
  background: var(--accent);
  color: white;
}

.labels-list {
  padding: 16px 12px;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  color: var(--text-secondary);
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.label-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.label-item.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

.label-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.label-item .label-color {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}

.label-item span:not(.label-color):not(.label-count) {
  flex: 1;
  font-weight: 500;
}

.label-item .label-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* Customer Table Container */
.customer-table-container {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.customer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toolbar-right {
  display: flex;
  gap: 12px;
}

.select-all-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.select-all-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.bulk-actions {
  display: flex;
  gap: 10px;
}

.bulk-actions .btn-sm {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.customer-search {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  width: 280px;
  font-size: 14px;
  transition: all 0.2s;
}

.customer-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.customer-search::placeholder {
  color: var(--text-muted);
}

/* Customer Table */
.customer-table {
  width: 100%;
  border-collapse: collapse;
}

.customer-table thead {
  background: rgba(0, 0, 0, 0.25);
}

.customer-table th {
  text-align: left;
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.customer-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  color: var(--text-secondary);
}

.customer-table tbody tr {
  transition: all 0.2s;
}

.customer-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

.customer-table tbody tr:hover td {
  color: var(--text-primary);
}

.customer-phone {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-weight: 500;
  font-size: 13px;
}

.customer-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Table Action Buttons */
.customer-table .btn-sm {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 8px;
}

.customer-table .btn-sm:last-child {
  margin-right: 0;
}

.customer-table .btn-sm:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--accent);
}

/* Label Chips */
.label-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  border: 1px solid transparent;
}

.label-chip.hot {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.label-chip.past {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.label-chip.inactive {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.label-chip.vip {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.3);
}

.label-chip.dnc {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border-color: rgba(107, 114, 128, 0.3);
}

/* Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-indicator {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

.modal-lg {
  max-width: 640px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--accent);
}

.modal-body {
  padding: 24px;
}

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

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.upload-zone i {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 16px;
}

.upload-zone h4 {
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 13px;
  color: var(--text-muted);
}

.upload-preview {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.mapping-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.mapping-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.upload-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Color Picker */
.color-picker {
  display: flex;
  gap: 12px;
}

.color-option {
  cursor: pointer;
}

.color-option input {
  display: none;
}

.color-option span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.color-option input:checked+span {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-card);
}

/* Responsive */
@media (max-width: 900px) {
  .customer-lists-layout {
    grid-template-columns: 1fr;
  }

  .labels-sidebar {
    display: none;
  }
}

/* =================================
   App Modal (Alert/Confirm/Prompt)
   ================================= */
.app-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.app-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 380px;
  max-width: 480px;
  box-shadow: var(--shadow-lg), var(--glow);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.app-modal-close {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.app-modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.app-modal-body {
  padding: 24px;
}

.app-modal-body p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.app-modal-body .form-group {
  margin-top: 16px;
}

.app-modal-body input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.app-modal-body input:focus {
  border-color: var(--accent);
}

.app-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.app-modal-footer button {
  min-width: 100px;
}

/* Schedule Entries List */
.schedule-entries-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.schedule-entry-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.schedule-entry-item:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.schedule-entry-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.schedule-dates {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.schedule-dates i {
  color: var(--accent);
  margin-right: 6px;
}

.schedule-days {
  font-size: 12px;
  color: var(--text-muted);
}

.schedule-label {
  font-size: 12px;
  color: var(--accent-light);
  font-style: italic;
}

.schedule-entry-status {
  flex-shrink: 0;
}

.schedule-entry-actions {
  display: flex;
  gap: 6px;
}

.section-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Action Dropdown Menu */
.action-dropdown {
  position: relative;
  display: inline-block;
}

.action-dropdown .dropdown-toggle {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
}

.action-dropdown .dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 9999;
  display: none;
  animation: dropdownFade 0.15s ease;
}

.action-dropdown .dropdown-menu.show {
  display: block;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-dropdown .dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}

.action-dropdown .dropdown-menu a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.action-dropdown .dropdown-menu a i {
  width: 16px;
  font-size: 13px;
}

.action-dropdown .dropdown-menu a.danger {
  color: var(--danger);
}

.action-dropdown .dropdown-menu a.danger:hover {
  background: var(--danger-muted);
}

/* Fix dropdown clipping in tables */
.data-table,
.data-table tbody,
.data-table tr,
.data-table td {
  overflow: visible !important;
}

.card {
  overflow: visible;
}