/* ==========================================================================
   WAudience (waudience.in) — Design System & Stylesheet
   ========================================================================== */

:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #10b981;
  
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: var(--radius-lg);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.connected {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.status-badge.disconnected {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

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

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

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

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.form-group input,
.form-group textarea,
.select-filter,
.input-search {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.select-filter:focus,
.input-search:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.otp-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem !important;
  letter-spacing: 0.5rem;
  text-align: center;
  font-weight: 700;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

/* ==========================================================================
   Auth Section
   ========================================================================== */

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.auth-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.auth-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.otp-banner {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ==========================================================================
   Dashboard Layout & Hub Banner
   ========================================================================== */

.main-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 2rem;
}

.connection-hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.hub-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.hub-info p {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.hub-badges {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-phone {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.tag-status {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.panel-header h3,
.panel-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.export-group {
  display: flex;
  gap: 0.4rem;
}

/* ==========================================================================
   Groups List
   ========================================================================== */

.groups-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.selected-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.groups-list {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.25rem;
}

.group-item-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

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

.group-item-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}

.group-radio-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: #ffffff;
}

.group-item-card:hover .group-radio-indicator {
  border-color: var(--primary);
}

.group-item-card.selected .group-radio-indicator {
  border-color: var(--primary);
  background: var(--primary);
}

.group-item-card.selected .group-radio-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.selected-group-banner {
  padding: 0.45rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #065f46;
  margin-bottom: 0.65rem;
}

.group-info-col {
  flex: 1;
  overflow: hidden;
}

.group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tag-channel {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tag-extractable {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

.panel-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.table-toolbar .input-search {
  flex: 1;
}

.table-container {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.small-table {
  max-height: 300px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: #1e293b;
}

.data-table tr:hover {
  background: #f8fafc;
}

.empty-table-row td,
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Number Validator Stats & Output
   ========================================================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.active-card .stat-number { color: var(--primary); }
.business-card .stat-number { color: #3b82f6; }
.inactive-card .stat-number { color: var(--danger); }

.filter-result-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.filter-tab-btn {
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.filter-tab-btn.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* ==========================================================================
   Modal Overlay (QR Code)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  text-align: center;
}

.qr-box {
  width: 250px;
  height: 250px;
  margin: 0 auto 1.5rem auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  position: relative;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-loading {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.qr-instructions {
  text-align: left;
  font-size: 0.85rem;
  color: #334155;
}

.qr-instructions ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.qr-instructions li {
  margin-bottom: 0.35rem;
}

.qr-warning {
  padding: 0.65rem 0.85rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: #92400e;
}

/* ==========================================================================
   Modern Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 3rem);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-hide {
  opacity: 0 !important;
  transform: translateY(-10px) scale(0.95) !important;
  pointer-events: none;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.toast-msg {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.4;
  white-space: pre-line;
}

.toast-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.2rem;
  transition: color 0.15s;
}

.toast-close:hover {
  color: var(--text-main);
}

.toast-success {
  border-left: 4px solid var(--primary);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

/* Modals sizing and actions */
.modal-card-sm {
  max-width: 420px;
}

.dialog-msg {
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.modal-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.text-left {
  text-align: left !important;
}

.input-block {
  width: 100%;
}

/* ==========================================================================
   Background Queue Worker, File Upload & History Styles
   ========================================================================== */

/* File Dropzone */
.dropzone-container {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
  position: relative;
}

.dropzone-container:hover,
.dropzone-container.drag-over {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dropzone-file-selected {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

/* Checkbox Toggle */
.option-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0 1.25rem 0;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.option-checkbox-row input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Live Queue Progress Box */
.queue-progress-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.queue-progress-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.queue-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.queue-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.queue-main-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.queue-percent-large {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: #38bdf8;
  font-feature-settings: 'tnum';
}

.queue-task-label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.queue-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
}

.queue-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.queue-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.queue-metric {
  text-align: center;
}

.queue-metric-val {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
}

.queue-metric-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.queue-metric-val.active-txt { color: #34d399; }
.queue-metric-val.biz-txt { color: #60a5fa; }
.queue-metric-val.dead-txt { color: #f87171; }

.queue-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-tip {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* History Badges & Actions */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.processing {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
  animation: pulseDot 2s infinite;
}

.status-badge.cancelled {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-badge.interrupted,
.status-badge.failed {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-group-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-action-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s;
}

.btn-action-sm:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-action-sm.btn-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Compact App Dashboard Footer */
.app-compact-footer {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.footer-compact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-compact-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-compact-left strong {
  color: var(--text-main);
}

.footer-divider {
  color: #cbd5e1;
}

.footer-meta {
  color: #64748b;
  font-size: 0.78rem;
}

.footer-compact-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-compact-links a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-compact-links a:hover {
  color: var(--primary);
}

