/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-green: #22c55e;
  --accent-blue: #3b82f6;
  --border-color: rgba(255, 255, 255, 0.1);
  --sidebar-width: 260px;
}

[data-bs-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

/* Page Header Gradients & Buttons */
.text-gradient-primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-gradient-primary {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.25s ease;
}

.btn-gradient-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  color: #ffffff;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Button Micro-interactions & Loading State */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:hover { box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.btn-success:hover { box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4); }
.btn-danger:hover { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4); }
.btn-warning:hover { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }
.btn-info:hover { box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4); }

.btn.btn-loading {
  pointer-events: none !important;
  opacity: 0.85;
}

/* Enhanced Glassmorphism Centered Modals */
.modal-content, .modal-glass-content {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.15) !important;
  color: #ffffff;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
}

.modal-header .modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
}

/* Input Form Validation Styling */
.form-control, .form-select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-control.is-invalid, .form-select.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
  background-image: none !important;
}

.invalid-feedback {
  color: #f87171 !important;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

.form-control.is-valid, .form-select.is-valid {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25) !important;
  background-image: none !important;
}

.valid-feedback {
  color: #4ade80 !important;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 211, 102, 0.5);
}

.sidebar .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  border-radius: 8px;
  margin: 4px 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Main Content Wrapper */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 24px;
}

/* Cards & Components */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.15);
}

.badge-connected {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.badge-connecting {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
  border: 1px solid #eab308;
}

.badge-disconnected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* QR Code Container */
.qr-container {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  display: inline-block;
}

.pairing-code-box {
  font-family: monospace;
  font-size: 1.8rem;
  letter-spacing: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: #22c55e;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px dashed #22c55e;
}

/* Mobile Header Bar */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  z-index: 1040;
}

@media (min-width: 992px) {
  .mobile-header {
    display: none !important;
  }
}

/* Sidebar Responsive Overlay & Toggle */
@media (max-width: 991.98px) {
  .sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
    z-index: 1050;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }
  .sidebar.show {
    margin-left: 0;
  }
  .main-content {
    margin-left: 0;
    padding-top: 76px;
  }
}

/* Sidebar Backdrop Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1045;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Toast Notification System */
.toast-container-custom {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.custom-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px 18px 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #ffffff;
  animation: toastSlideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.custom-toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
}

.custom-toast.toast-success {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
}
.custom-toast.toast-success::before { background: linear-gradient(180deg, #22c55e, #16a34a); }

.custom-toast.toast-error {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}
.custom-toast.toast-error::before { background: linear-gradient(180deg, #ef4444, #dc2626); }

.custom-toast.toast-info {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}
.custom-toast.toast-info::before { background: linear-gradient(180deg, #3b82f6, #2563eb); }

.custom-toast.toast-warning {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.3);
}
.custom-toast.toast-warning::before { background: linear-gradient(180deg, #f59e0b, #d97706); }

.custom-toast .toast-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.custom-toast.toast-success .toast-icon { color: #22c55e; filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.5)); }
.custom-toast.toast-error .toast-icon { color: #ef4444; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5)); }
.custom-toast.toast-info .toast-icon { color: #3b82f6; filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5)); }
.custom-toast.toast-warning .toast-icon { color: #f59e0b; filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5)); }

.custom-toast .toast-body {
  flex-grow: 1;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.custom-toast .toast-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  margin-bottom: 2px;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.custom-toast .toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px;
  margin-left: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.custom-toast .toast-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.custom-toast .toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  border-radius: 0 0 14px 14px;
  animation: toastProgressBar 3s linear forwards;
}

.custom-toast:hover .toast-progress-bar {
  animation-play-state: paused;
}

.custom-toast.toast-success .toast-progress-bar { background: #22c55e; }
.custom-toast.toast-error .toast-progress-bar { background: #ef4444; }
.custom-toast.toast-info .toast-progress-bar { background: #3b82f6; }
.custom-toast.toast-warning .toast-progress-bar { background: #f59e0b; }

.custom-toast.hide {
  animation: toastSlideOutRight 0.35s ease forwards;
}

@keyframes toastSlideInRight {
  from {
    opacity: 0;
    transform: translateX(110%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOutRight {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(110%) scale(0.85);
  }
}

@keyframes toastProgressBar {
  from { width: 100%; }
  to { width: 0%; }
}

/* Enhanced Stat Cards with Glowing Icon Badges */
.stat-card-pro {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.stat-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-icon-info {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.stat-icon-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.stat-icon-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Search Box Professional Styling */
.search-box-group {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box-group:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-box-group .input-group-text {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding-left: 12px;
}

.search-box-group .form-control {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 0.88rem;
  padding-left: 6px;
}

.search-box-group .form-control:focus {
  box-shadow: none;
  background: transparent;
}

.search-box-group .btn-clear {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0 10px;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.search-box-group .btn-clear:hover {
  color: #f8fafc;
}

/* Segmented Status Pill Filter Nav */
.filter-pills-nav {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 3px;
  display: inline-flex;
  gap: 2px;
}

.filter-pills-nav .btn-filter {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.filter-pills-nav .btn-filter:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-pills-nav .btn-filter.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Table Professional Styling */
.table-pro {
  color: var(--text-main);
  border-collapse: separate;
  border-spacing: 0;
}

.table-pro th {
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.table-pro td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.table-pro tbody tr {
  transition: background 0.2s ease;
}

.table-pro tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* File Badge Pill */
.file-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.file-badge-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.file-badge-image {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Empty State Professional Box */
.empty-state-box {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-box .empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: #64748b;
}

/* Floating Bulk Actions Bar */
.bulk-bar-pro {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.25s ease forwards;
}

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

/* Dashboard Pulse Status & Terminal Logs */
.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseAnimation 1.6s infinite;
}

.pulse-dot.pulse-offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseOfflineAnimation 1.6s infinite;
}

@keyframes pulseAnimation {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulseOfflineAnimation {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.terminal-logs-box {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  font-family: monospace;
  font-size: 0.82rem;
  max-height: 240px;
  overflow-y: auto;
  color: #a7f3d0;
}

.terminal-logs-box::-webkit-scrollbar {
  width: 4px;
}
.terminal-logs-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Premium Dashboard UI Elements */
.stat-card-pro {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.stat-card-pro:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(59, 130, 246, 0.15);
}

.stat-card-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card-pro:hover::before {
  opacity: 1;
}

.icon-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.icon-avatar-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.icon-avatar-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.icon-avatar-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.icon-avatar-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.icon-avatar-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.icon-avatar-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-pill-status {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Live Real-Time QR & Pairing Modal Aesthetics */
.modal-glass-content {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
}

.modal-nav-pills {
  background: rgba(30, 41, 59, 0.6);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-nav-pills .nav-link {
  color: #94a3b8;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.modal-nav-pills .nav-link.active {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.qr-box-wrapper {
  position: relative;
  background: #ffffff;
  padding: 14px;
  border-radius: 16px;
  display: inline-block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.qr-box-wrapper img {
  border-radius: 8px;
  display: block;
}

.pairing-code-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.pairing-code-char {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-family: 'Outfit', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  width: 42px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.pairing-code-hyphen {
  font-size: 1.5rem;
  color: #94a3b8;
  align-self: center;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulse-ring 1.5s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 1; }
}

.status-connecting {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-waiting {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-scanning {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-connected {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

