/**
 * EDesk - AnyDesk Interface with Infinity SupportDESK 2.0 Color Theme
 * Exact AnyDesk v7/v8 layout (Sidebar, Tabs, This Desk + Remote Desk Dual Cards, Recent Tiles)
 * with Infinity SupportDESK 2.0 Royal Blue & Cerulean Palette.
 */

:root {
  /* L-Blue Official Design System Palette */
  --l-blue-100: #174082;
  --l-blue-80: #2252A0;
  --l-blue-60: #3566B6;
  --l-blue-20: #B6CFF7;
  --l-blue-15: #CADEFC;
  --l-blue-10: #E0ECFF;

  /* Surfaces & Page Layout */
  --bg-page: radial-gradient(ellipse at 50% 12%, #174082 0%, #102e5f 45%, #091a38 100%);
  --bg-shell: rgba(16, 46, 95, 0.94);
  --bg-workspace: transparent;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-card-header: #E0ECFF;
  --bg-card-tint: #E0ECFF;
  --bg-input: #f8fafc;
  --border-subtle: rgba(182, 207, 247, 0.22);
  --border-card: #CADEFC;
  --border-card-hover: #B6CFF7;
  
  /* Primary Action Blues */
  --accent-blue: #2252A0;
  --accent-blue-hover: #174082;
  --accent-blue-active: #3566B6;
  --accent-blue-gradient: linear-gradient(135deg, #174082 0%, #2252A0 50%, #3566B6 100%);
  --accent-blue-glow: rgba(34, 82, 160, 0.38);
  --accent-green: #10b981;
  --accent-red: #ef4444;

  /* Typography */
  --text-dark: #0f172a;
  --text-dark-secondary: #174082;
  --text-dark-muted: #475569;
  --text-light: #ffffff;
  --text-light-secondary: #E0ECFF;
  --text-light-muted: #B6CFF7;

  /* Geometry & Shadows */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 30px;
  --shadow-card: 0 16px 36px -8px rgba(16, 46, 95, 0.45), 0 0 1px rgba(182, 207, 247, 0.3);
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Segoe UI Mono', monospace;
}

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

body.infinity-anydesk-theme {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-light);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.anydesk-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* ==========================================
   Top Header & Modern Frameless Titlebar
   ========================================== */
.anydesk-titlebar {
  height: 44px;
  background: rgba(16, 46, 95, 0.96);
  border-bottom: 1px solid rgba(182, 207, 247, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  -webkit-app-region: drag;
  user-select: none;
}

.titlebar-left,
.titlebar-right,
.app-menu-wrapper,
.btn-app-menu,
.app-menu-dropdown,
.anydesk-logo-wrap,
.anydesk-tabs,
.anydesk-tab,
.btn-icon-titlebar,
.status-pill,
.window-controls,
.win-control-btn {
  -webkit-app-region: no-drag;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

/* Modern App Menu Dropdown */
.app-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-app-menu {
  background: rgba(224, 236, 255, 0.08);
  border: 1px solid rgba(182, 207, 247, 0.25);
  color: #E0ECFF;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-app-menu:hover {
  background: rgba(182, 207, 247, 0.22);
  border-color: #B6CFF7;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(34, 82, 160, 0.4);
}

.btn-app-menu:active {
  transform: scale(0.95);
}

.app-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: rgba(16, 46, 95, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.7), 0 0 24px rgba(34, 82, 160, 0.35);
  padding: 8px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: menuSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top left;
}

.hidden,
.app-menu-dropdown.hidden,
.menu-item.hidden,
.sidebar-btn.hidden,
.server-offline-banner.hidden {
  display: none !important;
}

/* ==========================================
   Red Animated Server Offline / Reconnect Banner
   ========================================== */
.server-offline-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 45%, #b91c1c 80%, #7f1d1d 100%);
  border-bottom: 1px solid rgba(254, 202, 202, 0.4);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 900;
  animation: serverBannerPulse 2.4s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

@keyframes serverBannerPulse {
  0%, 100% {
    opacity: 0.92;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.45);
  }
  50% {
    opacity: 1;
    box-shadow: 0 6px 28px rgba(239, 68, 68, 0.75);
  }
}

.server-offline-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: bannerShimmer 2.6s infinite linear;
  pointer-events: none;
}

@keyframes bannerShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.server-offline-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.server-offline-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.server-offline-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #fee2e2;
  flex-shrink: 0;
}

.server-offline-text-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.server-offline-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.server-offline-sub {
  font-size: 11.5px;
  color: #fee2e2;
  font-weight: 500;
  opacity: 0.92;
}

.server-offline-sub strong {
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.22);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.server-offline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.btn-server-retry {
  background: #ffffff;
  color: #b91c1c;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 14px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-server-retry:hover {
  background: #fef2f2;
  color: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

.btn-server-settings {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 14px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-server-settings:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================
   Sapphire / Emerald Animated Application Auto-Update Banner
   ========================================== */
.app-update-banner.hidden {
  display: none !important;
}

.app-update-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 45%, #0284c7 80%, #0d9488 100%);
  border-bottom: 1px solid rgba(191, 219, 254, 0.4);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 901;
  animation: updateBannerPulse 3s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

@keyframes updateBannerPulse {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 6px 28px rgba(14, 165, 233, 0.7);
  }
}

.app-update-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: bannerShimmer 2.8s infinite linear;
  pointer-events: none;
}

.app-update-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.app-update-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #a5f3fc;
  flex-shrink: 0;
}

.app-update-text-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.app-update-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.update-version-tag {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  margin-left: 4px;
}

.app-update-sub {
  font-size: 11.5px;
  color: #e0f2fe;
}

.app-update-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.btn-update-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.btn-update-primary:hover {
  background: #f0fdf4;
  color: #15803d;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-update-secondary {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-update-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.app-update-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  position: relative;
  z-index: 2;
}

.app-update-progress-wrap.hidden {
  display: none !important;
}

.app-update-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.app-update-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.app-update-progress-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-header {
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.menu-logo-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-app-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.menu-version-tag {
  font-size: 10px;
  font-weight: 700;
  color: #B6CFF7;
  background: rgba(53, 102, 182, 0.20);
  border: 1px solid rgba(182, 207, 247, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

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

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.menu-item svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.menu-item span:first-of-type {
  flex: 1;
}

.menu-shortcut {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #64748b;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-item:hover {
  background: rgba(53, 102, 182, 0.17);
  color: #ffffff;
  transform: translateX(2px);
}

.menu-item:hover svg {
  transform: scale(1.1);
}

.menu-item:hover .menu-shortcut {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.12);
}

.menu-item-danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 4px;
}

.anydesk-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
}

.edesk-logo-icon,
.infinity-circle-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 82, 160, 0.35), rgba(23, 64, 130, 0.7));
  border: 1px solid rgba(182, 207, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(34, 82, 160, 0.4);
  padding: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.edesk-logo-icon:hover,
.infinity-circle-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(182, 207, 247, 0.6);
}

.edesk-logo-icon img,
.infinity-circle-icon img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: contain;
  display: block;
}

.edesk-logo-icon svg,
.infinity-circle-icon svg {
  width: 24px;
  height: 24px;
}

.app-title-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.4px;
  color: #ffffff;
  background: linear-gradient(90deg, #ffffff 30%, #B6CFF7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-version-badge {
  display: none !important;
}

/* AnyDesk Tabs */
.anydesk-tabs {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 4px;
}

.anydesk-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: transparent;
  color: var(--text-light-secondary);
  font-size: 12px;
  font-weight: 600;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.15s ease;
}

.anydesk-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.anydesk-tab.active {
  background: rgba(224, 236, 255, 0.14);
  color: #ffffff;
  border-color: rgba(182, 207, 247, 0.25);
  border-top: 2.5px solid var(--accent-blue-active);
  backdrop-filter: blur(8px);
}

.tab-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* Titlebar Right */
.titlebar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.status-pill.offline .status-dot {
  background: var(--accent-red);
}

.btn-icon-titlebar {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-light-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon-titlebar:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Custom Frameless Window Controls */
.window-controls {
  display: flex;
  align-items: center;
  height: 44px;
  margin-left: 8px;
}

.win-control-btn {
  width: 46px;
  height: 44px;
  background: transparent;
  border: none;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  outline: none;
  user-select: none;
  -webkit-app-region: no-drag;
}

.win-control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.win-control-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.win-control-btn.win-close:hover {
  background: #e81123;
  color: #ffffff;
}

.win-control-btn.win-close:active {
  background: #bf101f;
  color: #ffffff;
}

/* Host Active Sharing Banner */
.host-active-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(23, 64, 130, 0.95));
  border: 1px solid rgba(53, 102, 182, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 20px rgba(53, 102, 182, 0.35);
  backdrop-filter: blur(12px);
  animation: slideDown 0.3s ease-out;
}

.host-active-banner.hidden {
  display: none !important;
}

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

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

.host-active-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.host-active-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.host-active-sub {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}

.host-active-sub strong {
  color: #B6CFF7;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.host-banner-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.host-session-timer {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   AnyDesk Main Layout: Sidebar + Workspace
   ========================================== */
.anydesk-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.anydesk-sidebar {
  width: 60px;
  background: var(--bg-shell);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  backdrop-filter: blur(12px);
}

.sidebar-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-light-muted);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-btn span {
  font-size: 9px;
  font-weight: 600;
}

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

.sidebar-btn:hover {
  background: rgba(224, 236, 255, 0.12);
  color: #ffffff;
}

.sidebar-btn.active {
  background: rgba(182, 207, 247, 0.22);
  color: #E0ECFF;
  border-left: 3px solid var(--l-blue-60);
  border-radius: 0 8px 8px 0;
}

.anydesk-workspace {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 60px;
}

/* ==========================================
   Dual Hero Grid: This Desk + Remote Desk
   ========================================== */
.anydesk-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 24px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .anydesk-hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.anydesk-white-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  color: var(--text-dark);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
  height: 100%;
}

.card-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  min-width: 0;
}

.card-title-bar h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--l-blue-100);
}

.card-title-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--l-blue-100);
  background: var(--l-blue-10);
  border: 1px solid var(--l-blue-20);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* This Desk Address Display */
.this-desk-box {
  background: linear-gradient(135deg, var(--l-blue-10) 0%, var(--l-blue-15) 100%);
  border: 1.5px solid var(--l-blue-20);
  border-left: 5px solid var(--l-blue-80);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  min-width: 0;
}

.desk-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.desk-id-text {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 800;
  color: var(--l-blue-100);
  letter-spacing: clamp(0.5px, 0.12vw, 1.4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.btn-copy-id {
  background: #ffffff;
  border: 1.5px solid var(--l-blue-20);
  color: var(--l-blue-80);
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 82, 160, 0.15);
  position: relative;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-copy-id:hover {
  background: var(--l-blue-80);
  color: #ffffff;
  border-color: var(--l-blue-80);
}

.btn-copy-id svg {
  width: 17px;
  height: 17px;
}

.copy-tooltip {
  position: absolute;
  top: -30px;
  background: var(--l-blue-100);
  color: #fff;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.copy-tooltip.show { opacity: 1; }

.this-desk-help {
  font-size: 12px;
  color: var(--text-dark-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Dropdown settings */
.options-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  min-width: 0;
}

.select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--l-blue-100);
  gap: 10px;
  min-width: 0;
}

.select-row label {
  white-space: nowrap;
  flex-shrink: 0;
}

.styled-select {
  background: var(--bg-input);
  border: 1.5px solid var(--border-card);
  color: var(--text-dark);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  flex: 1;
  max-width: 58%;
  min-width: 0;
  text-overflow: ellipsis;
}

.styled-select:focus {
  border-color: var(--l-blue-60);
}

/* Remote Desk Card: Address Bar + Arrow Button */
.remote-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  min-width: 0;
}

.address-bar-input {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 3px 5px 3px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
  position: relative;
}

.address-bar-input:focus-within {
  border-color: var(--l-blue-60);
  box-shadow: 0 0 0 3px rgba(53, 102, 182, 0.25);
  background: #ffffff;
}

.input-lead-icon {
  width: 18px;
  height: 18px;
  color: var(--l-blue-80);
  margin-right: 8px;
  flex-shrink: 0;
}

.remote-address-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.6px;
  min-width: 0;
}

.btn-arrow-connect {
  background: linear-gradient(135deg, var(--l-blue-100) 0%, var(--l-blue-80) 50%, var(--l-blue-60) 100%);
  color: #ffffff;
  border: none;
  min-width: fit-content;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34, 82, 160, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  flex-shrink: 0;
}

.btn-arrow-connect:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 82, 160, 0.6);
  background: linear-gradient(135deg, var(--l-blue-80) 0%, var(--l-blue-60) 100%);
}

.btn-arrow-connect:hover:not(:disabled) .btn-arrow-icon {
  transform: translateX(3px);
}

.btn-arrow-connect:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.btn-arrow-connect .btn-arrow-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-arrow-connect .btn-connect-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Connecting Animated State */
.btn-arrow-connect.connecting,
.btn-arrow-connect:disabled {
  position: relative;
  overflow: hidden;
  background: #2252A0;
  cursor: wait;
  box-shadow: 0 0 18px rgba(182, 207, 247, 0.6);
  opacity: 1 !important;
}

.btn-arrow-connect.connecting::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: bannerShimmer 1.5s infinite linear;
  pointer-events: none;
}

@keyframes connectGlowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(34, 82, 160, 0.35); }
  50% { box-shadow: 0 0 22px rgba(182, 207, 247, 0.85); }
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2.2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpinnerRotate 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes btnSpinnerRotate {
  to { transform: rotate(360deg); }
}

.connecting-dots {
  display: inline-flex;
  margin-left: 2px;
}

.connecting-dots span {
  display: inline-block;
  animation: dotBlinkAnim 1.2s infinite ease-in-out;
}

.connecting-dots span:nth-child(1) { animation-delay: 0s; }
.connecting-dots span:nth-child(2) { animation-delay: 0.2s; }
.connecting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlinkAnim {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2.5px); }
}

/* Checkbox Grid */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  min-width: 0;
}

.anydesk-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dark-secondary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.anydesk-check input {
  accent-color: var(--accent-blue);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Quick Action Strip */
.quick-action-strip {
  display: flex;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
}

.btn-ghost-action {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-dark-secondary);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1 0;
  white-space: nowrap;
  min-width: 0;
}

.btn-ghost-action:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

.btn-ghost-action svg {
  width: 13px;
  height: 13px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.btn-ghost-favorite {
  background: rgba(245, 158, 11, 0.09);
  border-color: rgba(245, 158, 11, 0.25);
  color: #b45309;
}

.btn-ghost-favorite svg {
  color: #d97706;
}

.btn-ghost-favorite:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #92400e;
  transform: translateY(-1px);
}

/* ==========================================
   Recent Sessions & History Section
   ========================================== */
.anydesk-bottom-section {
  max-width: 1100px;
  margin: 0 auto 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  color: var(--text-dark);
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-link-blue {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

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

.recent-empty {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  padding: 16px 0;
  text-align: center;
  grid-column: 1 / -1;
}

/* History Table */
.history-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.history-table th {
  background: #f1f5f9;
  padding: 10px 14px;
  color: var(--text-dark-secondary);
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
}

.history-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
}

/* Footer Badge */
.footer-badge-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.infinity-footer-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

/* ==========================================
   In-Session View & Translucent AnyDesk Bar
   ========================================== */
.session-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.anydesk-session-bar {
  height: 44px;
  min-height: 44px;
  flex-shrink: 0;
  background: rgba(1, 20, 48, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.session-bar-left, .session-bar-center, .session-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-remote-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.anydesk-stats-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #B6CFF7;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-res-badge {
  background: rgba(53, 102, 182, 0.25);
  color: #B6CFF7;
  border: 1px solid rgba(182, 207, 247, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.2px;
}

.anydesk-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.anydesk-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.anydesk-tool-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-blue-glow);
}

.anydesk-btn-disconnect {
  background: #dc2626;
  color: #fff;
  border: none;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.anydesk-btn-disconnect:hover {
  background: #b91c1c;
}

.anydesk-btn-panic {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #ef4444;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Remote Viewport - Strict Window Fit with zero overflow */
.remote-viewport {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  cursor: default;
  width: 100%;
  height: calc(100vh - 44px);
  max-height: calc(100vh - 44px);
  max-width: 100vw;
}

.remote-viewport.scrollable {
  overflow: auto;
}

#remoteVideo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  cursor: default;
  margin: auto;
  transition: object-fit 0.15s ease;
}

#remoteVideo.fit-original {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: none;
}

#remoteVideo.fit-stretch {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: fill;
}

/* Dropzone & PIP */
.dropzone-overlay {
  position: absolute;
  inset: 0;
  background: rgba(34, 82, 160, 0.35);
  backdrop-filter: blur(8px);
  border: 3px dashed var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.dropzone-box {
  background: #ffffff;
  color: var(--text-dark);
  padding: 30px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.dropzone-box svg {
  width: 44px;
  height: 44px;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.pip-webcam-container {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 220px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 25;
}

.pip-header {
  padding: 6px 10px;
  background: #174082;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.btn-pip-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
}

.pip-video {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: #000;
}

/* File Drawer */
.anydesk-file-drawer {
  position: absolute;
  top: 48px;
  right: 0;
  bottom: 0;
  width: 340px;
  background: #ffffff;
  color: var(--text-dark);
  border-left: 1px solid #e2e8f0;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 35;
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.drawer-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
}

.drawer-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transfers-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark-muted);
  margin-bottom: 8px;
}

.transfer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transfer-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.transfer-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-blue-gradient);
  width: 0%;
}

.transfer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dark-muted);
}

.transfer-empty {
  font-size: 12px;
  color: var(--text-dark-muted);
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}

/* ==========================================
   Incoming Approval Dialog
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 20, 48, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.anydesk-incoming-modal {
  width: 420px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  color: var(--text-dark);
}

.incoming-top-bar {
  background: var(--accent-blue-gradient);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.incoming-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.incoming-caller-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #E0ECFF;
  border: 1.5px solid #CADEFC;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.caller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.caller-address {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #174082;
}

.caller-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.caller-meta {
  font-size: 11px;
  color: var(--text-dark-muted);
}

.perm-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark-muted);
  margin-bottom: 8px;
}

.perm-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.countdown-bar-wrap {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.countdown-bar {
  height: 100%;
  background: var(--accent-blue);
  width: 100%;
  transition: width 1s linear;
}

.incoming-buttons {
  display: flex;
  gap: 12px;
}

.anydesk-btn-dismiss {
  flex: 1;
  background: #f1f5f9;
  color: var(--text-dark);
  border: 1px solid #cbd5e1;
  padding: 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.anydesk-btn-dismiss:hover {
  background: #e2e8f0;
}

.anydesk-btn-accept {
  flex: 1.6;
  background: linear-gradient(90deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.anydesk-btn-accept:hover {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
}

/* Settings Dialog & Modals */
.anydesk-settings-dialog {
  width: 780px;
  max-width: 95vw;
  max-height: 88vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 1px rgba(255, 255, 255, 0.2);
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  flex-shrink: 0;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(88vh - 120px);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.modal-body::-webkit-scrollbar {
  width: 7px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

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

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

/* 2x2 Settings Grid Layout */
.settings-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 680px) {
  .settings-grid-2x2 {
    grid-template-columns: 1fr;
  }
  .anydesk-settings-dialog {
    width: 95vw;
    max-height: 92vh;
  }
  .modal-body {
    max-height: calc(92vh - 120px);
  }
}

.settings-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.settings-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #2252A0;
}

.settings-card-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  margin: 0;
}

.settings-card-header svg {
  color: #2252A0;
  flex-shrink: 0;
}

.settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.settings-divider {
  height: 1px;
  background: #e2e8f0;
  width: 100%;
  margin: 2px 0;
}

.settings-help-text {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}

.settings-logs-info-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 4px;
}

/* Online Status Visibility Section in Settings */
.settings-status-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.settings-section-heading {
  font-size: 15px;
  font-weight: 700;
  color: #2252A0;
  margin: 0 0 6px 0;
  letter-spacing: -0.1px;
}

.settings-heading-divider {
  width: 100%;
  height: 1px;
  background: #e2e8f0;
  margin-bottom: 12px;
}

.settings-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.settings-red-checkbox {
  accent-color: #ef4444;
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 3px;
  flex-shrink: 0;
}

.settings-checkbox-text {
  font-size: 13px;
  color: #1e293b;
  font-weight: 600;
}

/* Screen Recording Path Radio & Controls */
.settings-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.settings-red-radio {
  accent-color: #ef4444;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.settings-radio-text {
  font-size: 12.5px;
  color: #1e293b;
  font-weight: 500;
}

.settings-path-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-recording-browse {
  align-self: flex-start;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-recording-browse:hover:not(:disabled) {
  background: #fecaca;
  color: #dc2626;
  border-color: #f87171;
  transform: translateY(-1px);
}

.btn-recording-browse:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.recording-path-link-wrap {
  margin-top: 2px;
}

.recording-path-link {
  color: #174082;
  text-decoration: underline;
  font-size: 12px;
  font-family: var(--font-mono, Consolas, monospace);
  word-break: break-all;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.recording-path-link:hover {
  color: #2252A0;
  text-decoration: underline;
}

/* Session Screen Recording Toolbar Button */
.btn-session-record {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  transition: all 0.2s ease;
}

.btn-session-record.recording {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-session-record.recording .record-dot {
  animation: recordPulseAnim 1s infinite alternate ease-in-out;
}

@keyframes recordPulseAnim {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 10px #ef4444; }
}

/* Side Menu Record Button */
.side-btn-record {
  color: #cbd5e1;
}

.side-btn-record:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #ef4444 !important;
}

.side-btn-record.recording {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  animation: sideRecordPulse 1.2s infinite alternate;
}

@keyframes sideRecordPulse {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); }
}

/* Toast Action Button */
.toast-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.15s ease;
}

.toast-action-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #ffffff;
}

/* Remote Clients Online Status Indicators */
.tile-online-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.6);
  z-index: 2;
}

.tile-online-status-dot.offline {
  background: #94a3b8;
  box-shadow: none;
}

.typeahead-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.6);
  flex-shrink: 0;
  display: inline-block;
  margin-right: 2px;
}

.typeahead-online-dot.offline {
  background: #64748b;
  box-shadow: none;
}

body.hide-remote-online-status .tile-online-status-dot,
body.hide-remote-online-status .typeahead-online-dot {
  display: none !important;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.btn-blue-solid {
  background: var(--accent-blue-gradient);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 400;
}

.toast {
  background: #0f172a;
  border-left: 4px solid var(--accent-blue);
  padding: 12px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.toast.success { border-left-color: var(--accent-green); }
.toast.error { border-left-color: var(--accent-red); }

/* ==========================================
   Live Session Chat Drawer & Bubbles
   ========================================== */
.anydesk-chat-drawer {
  position: absolute;
  top: 44px;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: #0f172a;
  color: #f1f5f9;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 36;
  backdrop-filter: blur(20px);
}

.host-chat-drawer {
  position: fixed;
  top: 48px;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 95vw;
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(182, 207, 247, 0.3);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 210;
}

.chat-header {
  padding: 14px 18px;
  background: rgba(2, 23, 56, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-title-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
}

.chat-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.chat-peer-pill {
  font-size: 11px;
  color: #B6CFF7;
  background: rgba(34, 82, 160, 0.35);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(182, 207, 247, 0.3);
}

.chat-messages-wrap {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-empty-state {
  margin: auto;
  text-align: center;
  color: #94a3b8;
  padding: 24px;
}

.chat-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.chat-empty-state h4 {
  font-size: 15px;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.chat-empty-state p {
  font-size: 12px;
  line-height: 1.5;
}

.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-msg-row.msg-self {
  align-self: flex-end;
}

.chat-msg-row.msg-peer {
  align-self: flex-start;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.msg-self .chat-msg-bubble {
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 14px rgba(34, 82, 160, 0.35);
}

.msg-peer .chat-msg-bubble {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 3px;
}

.chat-msg-sender {
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 3px;
  opacity: 0.85;
}

.chat-msg-time {
  font-size: 9.5px;
  margin-top: 4px;
  text-align: right;
  opacity: 0.75;
}

.chat-quick-replies {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.7);
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-quick-chip {
  background: rgba(34, 82, 160, 0.45);
  border: 1px solid rgba(182, 207, 247, 0.35);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
}

.chat-quick-chip:hover {
  background: rgba(53, 102, 182, 0.75);
  color: #ffffff;
  border-color: #B6CFF7;
  box-shadow: 0 0 10px rgba(53, 102, 182, 0.5);
  transform: translateY(-1px);
}

.chat-input-bar {
  padding: 12px 14px;
  background: rgba(2, 23, 56, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input-field {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-field:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(34, 82, 160, 0.35);
}

.btn-chat-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-chat-action:hover {
  background: rgba(34, 82, 160, 0.35);
  color: #B6CFF7;
  border-color: rgba(182, 207, 247, 0.4);
  transform: scale(1.05);
}

.btn-chat-action svg {
  width: 16px;
  height: 16px;
}

.btn-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-blue-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.btn-chat-send:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px var(--accent-blue-glow);
}

.btn-chat-send svg {
  width: 16px;
  height: 16px;
}

/* Voice Recording State Bar */
.chat-voice-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  gap: 10px;
  animation: pulseBg 2s infinite ease-in-out;
}

@keyframes pulseBg {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.voice-recording-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: recPulse 1s infinite alternate;
}

@keyframes recPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.voice-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fca5a5;
}

.voice-recording-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-voice-cancel {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-voice-cancel:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.btn-voice-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.btn-voice-send:hover {
  background: #059669;
  transform: scale(1.08);
}

/* Chat Voice Message Player Bubble */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  min-width: 180px;
}

.voice-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.voice-play-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.voice-play-btn svg {
  width: 14px;
  height: 14px;
}

.voice-wave-container {
  flex: 1;
  display: flex;
  align-items: center;
  height: 24px;
  position: relative;
  overflow: hidden;
}

.voice-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.w-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  min-height: 4px;
  transition: height 0.2s ease, background 0.2s ease;
}

.voice-wave-container.playing .w-bar {
  background: #B6CFF7;
  animation: waveAnimation 0.6s infinite alternate ease-in-out;
}

.voice-wave-container.playing .w-bar:nth-child(2n) { animation-delay: 0.1s; }
.voice-wave-container.playing .w-bar:nth-child(3n) { animation-delay: 0.2s; }
.voice-wave-container.playing .w-bar:nth-child(4n) { animation-delay: 0.3s; }

@keyframes waveAnimation {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

.voice-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  flex-shrink: 0;
}

/* Chat File Attachment Cards */
.chat-file-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.chat-img-preview {
  max-width: 220px;
  max-height: 180px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.chat-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-card-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
}

.file-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.file-card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-card-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-size {
  font-size: 10px;
  opacity: 0.75;
}

.btn-file-download {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}

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

.btn-file-download svg {
  width: 14px;
  height: 14px;
}

.file-transfer-pill {
  font-size: 10px;
  background: rgba(34, 82, 160, 0.35);
  color: #B6CFF7;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Chat Dropzone Overlay */
.chat-dropzone-overlay {
  position: absolute;
  top: 50px;
  left: 10px;
  right: 10px;
  bottom: 60px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px dashed #B6CFF7;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 50;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.chat-dropzone-overlay svg {
  width: 40px;
  height: 40px;
  color: #B6CFF7;
  animation: bounce 1.2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.chat-dropzone-overlay span {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.chat-badge,
.side-chat-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: badgePulse 1.4s infinite ease-in-out;
}

.chat-badge.hidden,
.side-chat-badge.hidden {
  display: none !important;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(239, 68, 68, 0.7); }
  50% { transform: scale(1.15); box-shadow: 0 0 14px rgba(239, 68, 68, 1); }
}

/* ==========================================
   FileZilla Dual-Pane File Manager
   ========================================== */
.filezilla-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.filezilla-window {
  width: 1100px;
  max-width: 96vw;
  height: 680px;
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-light);
}

.fz-top-bar {
  height: 48px;
  background: rgba(2, 23, 56, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.fz-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.fz-title-group svg {
  width: 22px;
  height: 22px;
  color: var(--accent-blue);
}

.dual-pane-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.site-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #091a38;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.site-pane:last-child {
  border-right: none;
}

.site-header {
  padding: 10px 14px;
  background: rgba(2, 23, 56, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #B6CFF7;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-drive-select {
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 140px;
}

.site-path-field {
  flex: 1;
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.btn-fz-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.btn-fz-icon:hover {
  background: rgba(34, 82, 160, 0.35);
  color: #fff;
}

.file-table-container {
  flex: 1;
  overflow-y: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.file-table th {
  position: sticky;
  top: 0;
  background: #102e5f;
  color: #94a3b8;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}

.file-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.file-row {
  cursor: pointer;
  transition: background 0.1s ease;
}

.file-row:hover {
  background: rgba(34, 82, 160, 0.35);
}

.file-row.selected {
  background: rgba(34, 82, 160, 0.35);
  color: #fff;
}

.col-icon { width: 28px; text-align: center; }
.col-name { font-weight: 500; }
.col-size { width: 85px; font-family: var(--font-mono); font-size: 11px; color: #94a3b8; }
.col-date { width: 130px; font-family: var(--font-mono); font-size: 11px; color: #94a3b8; }

.file-empty-row {
  padding: 30px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

/* Center Action Column */
.center-transfer-actions {
  width: 54px;
  background: rgba(2, 23, 56, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px;
}

.btn-transfer-arrow {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-blue-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 82, 160, 0.35);
  transition: transform 0.15s ease;
}

.btn-transfer-arrow:hover {
  transform: scale(1.08);
}

.btn-transfer-arrow svg {
  width: 20px;
  height: 20px;
}

/* Bottom Queue */
.fz-bottom-queue {
  height: 120px;
  background: #091a38;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.fz-queue-header {
  padding: 6px 14px;
  background: rgba(2, 23, 56, 0.9);
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.fz-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden { display: none !important; }
.view-panel { display: none; }
.view-panel.active { display: block; }

/* ==========================================
   Fullscreen Preview & Auto-Hide Toolbar
   ========================================== */
.session-view.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: #000 !important;
}

.session-view.fullscreen-mode .remote-viewport {
  height: 100vh !important;
  width: 100vw !important;
}

.session-view.fullscreen-mode .anydesk-session-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: auto;
  min-width: 780px;
  max-width: 95vw;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 82, 160, 0.35);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  z-index: 10000;
}

.session-view.fullscreen-mode .anydesk-session-bar.toolbar-autohidden {
  transform: translateX(-50%) translateY(-140%);
  opacity: 0;
  pointer-events: none;
}

/* Fullscreen Top Hover Detection Zone */
.session-view.fullscreen-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 25px;
  z-index: 9999;
  pointer-events: auto;
}

/* Fullscreen Notice Toast */
.fullscreen-notice-pill {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #B6CFF7;
  border: 1px solid rgba(182, 207, 247, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  z-index: 10002;
  backdrop-filter: blur(16px);
  pointer-events: none;
  animation: fadeInDown 0.4s ease forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================
   Live Voice & Audio Calling (UI & Widgets)
   ========================================== */
.btn-call-trigger {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-call-trigger:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.btn-call-trigger.call-in-progress {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  animation: callGlow 2s infinite ease-in-out;
}

.btn-call-trigger.call-ringing {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  animation: pulseRinging 1s infinite alternate;
}

@keyframes callGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

@keyframes pulseRinging {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 16px rgba(245, 158, 11, 0.8); }
}

/* Floating Active In-Call Widget */
.active-call-widget {
  position: fixed;
  top: 60px;
  right: 24px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10001;
  backdrop-filter: blur(24px);
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.call-widget-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: blinkLive 1.2s infinite ease-in-out;
}

@keyframes blinkLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.call-text-group {
  display: flex;
  flex-direction: column;
}

.call-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.call-duration {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.call-peer-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Call Audio Waveform Visualizer */
.call-wave-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 6px;
}

.call-wave-bar {
  width: 3px;
  height: 30%;
  min-height: 4px;
  max-height: 22px;
  background: #34d399;
  border-radius: 2px;
  transition: height 0.08s ease;
}

.call-widget-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-call-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-call-action:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.btn-call-action.active-mute {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-call-action svg {
  width: 16px;
  height: 16px;
}

.btn-call-hangup {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ef4444;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transition: all 0.15s ease;
}

.btn-call-hangup:hover {
  background: #dc2626;
  transform: scale(1.08);
}

.btn-call-hangup svg {
  width: 16px;
  height: 16px;
}

/* Outgoing Call Pill */
.outgoing-call-pill {
  position: fixed;
  top: 60px;
  right: 24px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 158, 11, 0.2);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  backdrop-filter: blur(24px);
  color: #fbbf24;
}

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

.outgoing-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.outgoing-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.btn-call-hangup-small {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ef4444;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-call-hangup-small:hover {
  transform: scale(1.1);
}

/* Incoming Call Modal Dialog */
.incoming-call-dialog {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  padding: 32px 28px;
  width: 380px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(28px);
  animation: zoomInPulse 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomInPulse {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.call-dialog-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
  animation: ringVibrate 1s infinite ease-in-out;
}

@keyframes ringVibrate {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.08) rotate(-8deg); }
  75% { transform: scale(1.08) rotate(8deg); }
}

.call-dialog-avatar svg {
  width: 34px;
  height: 34px;
}

.call-incoming-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #10b981;
  letter-spacing: 1px;
  margin: 0 0 6px 0;
}

.call-incoming-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.call-incoming-id {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 24px;
}

.call-dialog-actions {
  display: flex;
  gap: 14px;
  width: 100%;
}

.btn-call-decline {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-call-decline:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

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

.btn-call-accept {
  flex: 1.2;
  padding: 12px 18px;
  border-radius: 12px;
  background: #10b981;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  transition: all 0.15s ease;
}

.btn-call-accept:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6);
}

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

/* ==========================================
   Buzzer Attention Alert & Screen Shake
   ========================================== */
body.desk-buzzer-shake {
  animation: deskScreenVibrate 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) 2 both;
  box-shadow: inset 0 0 40px rgba(245, 158, 11, 0.7), 0 0 60px rgba(245, 158, 11, 0.5) !important;
}

@keyframes deskScreenVibrate {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.buzzer-alert-overlay {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid #f59e0b;
  border-radius: 30px;
  padding: 10px 22px;
  color: #fef3c7;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 28px rgba(245, 158, 11, 0.6);
  z-index: 10010;
  backdrop-filter: blur(16px);
  animation: buzzerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1), buzzerPulseGlow 1s infinite alternate;
}

.buzzer-alert-overlay.hidden {
  display: none !important;
}

@keyframes buzzerSlideDown {
  from { opacity: 0; transform: translate(-50%, -24px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes buzzerPulseGlow {
  from { box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 16px rgba(245, 158, 11, 0.4); }
  to { box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 32px rgba(245, 158, 11, 0.85); }
}

.buzzer-pulse-ring {
  position: absolute;
  inset: -6px;
  border: 2px solid #f59e0b;
  border-radius: 36px;
  animation: buzzerRingExpand 1.2s infinite ease-out;
  pointer-events: none;
}

@keyframes buzzerRingExpand {
  0% { transform: scale(0.96); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 0; }
}

.buzzer-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.buzzer-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.buzzer-sender {
  font-size: 11.5px;
  color: #e2e8f0;
  font-weight: 500;
}

.btn-buzzer-trigger:hover {
  background: rgba(245, 158, 11, 0.35) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

/* Host Banner Incoming Call Alert */
.host-banner-call-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid #10b981;
  border-radius: 18px;
  padding: 4px 10px;
  font-size: 12px;
  color: #a7f3d0;
  font-weight: 700;
  animation: callGlowPulse 1.2s infinite;
}

.host-banner-call-alert.hidden {
  display: none !important;
}

.call-pulse-icon {
  animation: ringSwing 0.8s infinite ease-in-out;
}

.btn-banner-accept {
  background: #10b981;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-banner-accept:hover {
  background: #059669;
}

.btn-banner-reject {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-banner-reject:hover {
  background: #dc2626;
}

/* ==========================================
   Quality & Resolution Dropdown Menu
   ========================================== */
.quality-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.quality-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quality-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 330px;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(182, 207, 247, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(53, 102, 182, 0.23);
  border-radius: 14px;
  padding: 12px;
  z-index: 1000;
  backdrop-filter: blur(24px);
  animation: qualityDropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quality-menu-panel.hidden {
  display: none !important;
}

@keyframes qualityDropdownIn {
  from { opacity: 0; transform: translate(-50%, -8px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.quality-menu-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  padding: 4px 6px 6px 6px;
}

.quality-menu-desc {
  font-size: 11px;
  color: #94a3b8;
  padding: 0 6px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.4;
}

.quality-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.quality-option {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quality-option:hover {
  background: rgba(53, 102, 182, 0.17);
  border-color: rgba(182, 207, 247, 0.4);
  transform: translateY(-1px);
}

.quality-option.active {
  background: linear-gradient(135deg, rgba(34, 82, 160, 0.35) 0%, rgba(23, 64, 130, 0.95) 100%);
  border-color: #B6CFF7;
  box-shadow: 0 0 14px rgba(182, 207, 247, 0.25);
}

.opt-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.opt-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.opt-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.opt-badge.best {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.opt-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.quality-option.active .opt-sub {
  color: #CADEFC;
}

/* ==========================================
   Auto-Reconnecting Dialog & Diagnostics
   ========================================== */
.anydesk-reconnect-dialog {
  position: relative;
  width: 460px;
  max-width: 92vw;
  background: rgba(11, 25, 52, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(34, 82, 160, 0.35);
  overflow: hidden;
  color: #f8fafc;
  animation: reconnectDialogIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes reconnectDialogIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.reconnect-dialog-glow {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #B6CFF7, #3566B6, transparent);
  box-shadow: 0 0 16px #B6CFF7;
}

.reconnect-radar-container {
  position: relative;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(34, 82, 160, 0.35) 0%, transparent 70%);
  margin-top: 10px;
}

.radar-pulse-ring {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1.5px solid rgba(182, 207, 247, 0.6);
  pointer-events: none;
  animation: radarWave 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.radar-pulse-ring.ring-1 {
  animation-delay: 0s;
}

.radar-pulse-ring.ring-2 {
  animation-delay: 0.8s;
}

.radar-pulse-ring.ring-3 {
  animation-delay: 1.6s;
}

@keyframes radarWave {
  0% {
    transform: scale(0.3);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.reconnect-center-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 24px rgba(182, 207, 247, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  z-index: 2;
  animation: rotateSpinner 3s linear infinite;
}

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

.reconnect-body {
  padding: 0 24px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.reconnect-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: #fde047;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
}

.reconnect-status-badge.restored {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.reconnect-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 8px #facc15;
  animation: pulseDot 1.2s ease-in-out infinite alternate;
}

.reconnect-status-badge.restored .reconnect-status-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: none;
}

@keyframes pulseDot {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.reconnect-heading {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.reconnect-subtitle {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 16px;
  max-width: 380px;
}

/* Diagnostics Tracker Card */
.reconnect-diagnostics-card {
  width: 100%;
  background: rgba(4, 14, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  text-align: left;
}

.diag-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diag-icon-col {
  width: 18px;
  display: flex;
  justify-content: center;
}

.diag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.diag-dot.status-ok {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.diag-dot.status-pending {
  background: #facc15;
  box-shadow: 0 0 8px #facc15;
  animation: pulseDot 1s infinite alternate;
}

.diag-dot.status-error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.diag-info-col {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diag-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.diag-value {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: #B6CFF7;
}

.reconnect-meta-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}

.reconnect-attempt-text {
  font-size: 11.5px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.reconnect-token-pill {
  font-size: 11px;
  font-weight: 600;
  color: #B6CFF7;
  background: rgba(53, 102, 182, 0.15);
  border: 1px solid rgba(182, 207, 247, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.reconnect-actions {
  width: 100%;
  display: flex;
  gap: 10px;
}

.btn-reconnect-cancel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reconnect-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-reconnect-retry {
  flex: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 82, 160, 0.35);
  transition: all 0.2s ease;
}

.btn-reconnect-retry:hover {
  box-shadow: 0 6px 20px rgba(182, 207, 247, 0.6);
  transform: translateY(-1px);
}

/* =========================================================================
   Interactive Typeahead Search Dropdown
   ========================================================================= */
#deskTypeaheadWrap {
  position: relative;
  width: 100%;
}

.btn-address-favorite {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-right: 2px;
}

.btn-address-favorite:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  transform: scale(1.12);
}

.btn-address-favorite.is-favorited {
  color: #fbbf24;
}

.btn-address-favorite.is-favorited svg {
  fill: #fbbf24;
  stroke: #d97706;
}

.btn-typeahead-arrow {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-typeahead-arrow:hover {
  color: #B6CFF7;
  background: rgba(53, 102, 182, 0.15);
}

.desk-typeahead-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(11, 21, 40, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 20px rgba(53, 102, 182, 0.20);
  z-index: 2000;
  padding: 6px 0;
  animation: typeaheadIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes typeaheadIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.typeahead-category-title {
  padding: 8px 14px 4px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #B6CFF7;
  display: flex;
  align-items: center;
  gap: 6px;
}

.typeahead-category-title:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.typeahead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.typeahead-row:hover,
.typeahead-row.selected {
  background: rgba(53, 102, 182, 0.17);
  border-left-color: #B6CFF7;
}

.typeahead-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.typeahead-star-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.typeahead-star-btn:hover,
.typeahead-star-btn.starred {
  color: #f59e0b;
  transform: scale(1.15);
}

.typeahead-flag {
  font-size: 16px;
  line-height: 1;
}

.typeahead-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.typeahead-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typeahead-id {
  font-size: 11.5px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  color: #94a3b8;
  letter-spacing: 0.4px;
}

.typeahead-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.typeahead-duration-pill {
  font-size: 11px;
  background: rgba(34, 82, 160, 0.35);
  border: 1px solid rgba(182, 207, 247, 0.3);
  color: #B6CFF7;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.typeahead-empty {
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: 12.5px;
}

/* Highlighted search match */
.typeahead-match {
  color: #B6CFF7;
  font-weight: 800;
  text-decoration: underline;
}

/* =========================================================================
   Dashboard Filter Tabs & Favorite Tiles
   ========================================================================= */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head-with-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.section-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.section-head-center {
  flex: 1;
  max-width: 380px;
  min-width: 220px;
  display: flex;
  justify-content: center;
}

.cards-search-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 2px 10px 2px 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cards-search-wrap:focus-within {
  border-color: #2252A0;
  box-shadow: 0 0 0 3.5px rgba(34, 82, 160, 0.35), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cards-search-icon {
  color: #94a3b8;
  margin-right: 8px;
  flex-shrink: 0;
  pointer-events: none;
  transition: color 0.2s ease;
}

.cards-search-wrap:focus-within .cards-search-icon {
  color: #2252A0;
}

.cards-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: #0f172a;
  padding: 5px 0;
  font-family: inherit;
}

.cards-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.btn-clear-cards-search {
  background: #e2e8f0;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 6px;
  flex-shrink: 0;
  padding: 0;
}

.btn-clear-cards-search:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-group-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.08);
  border: 1.5px solid rgba(168, 85, 247, 0.32);
  color: #9333ea;
  padding: 5px 13px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-group-action svg {
  color: inherit;
  stroke: currentColor;
}

.btn-group-action:hover {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.55);
  color: #7e22ce;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(168, 85, 247, 0.2);
}

/* Desk Group Filter Strip */
.desk-group-filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px 2px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.desk-group-filter-strip::-webkit-scrollbar {
  display: none;
}

.group-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 4px 11px;
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.group-filter-pill:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

.group-filter-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.group-pill-count {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
}

.group-filter-pill.active .group-pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Group Badge on Desk Cards */
.desk-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  padding: 1.5px 7px;
  border-radius: 12px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.tiles-filter-bar {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px;
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tiles-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tiles-tab svg {
  color: inherit;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.tiles-tab:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tiles-tab.active {
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 82, 160, 0.35);
}

.tiles-tab.active svg {
  stroke: #ffffff;
  color: #ffffff;
}

.btn-pill-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
  padding: 5px 14px;
  border-radius: 18px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill-action:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #92400e;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Professional LAN & Network Badge */
.lan-pill {
  display: none !important;
}

.country-flag-icon {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

/* =========================================================================
   Modern Desk Preview Cards Grid & Thumbnail UI
   ========================================================================= */
.recent-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.desk-preview-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.desk-preview-card:hover {
  border-color: #2252A0;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(34, 82, 160, 0.35), 0 3px 8px rgba(0, 0, 0, 0.04);
}

.desk-preview-card.favorite-tile {
  border-color: #fcd34d;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.desk-preview-card.favorite-tile:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.2);
}

/* 16:9 Screen Preview Viewport */
.desk-card-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #091a38;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desk-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.desk-preview-card:hover .desk-screenshot-img {
  transform: scale(1.06);
}

/* Fallback Mockup Graphic when no screenshot exists yet */
.desk-mockup-graphic {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #091a38 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.desk-mockup-graphic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
}

.mockup-header-dots {
  display: none !important;
}

.mockup-monitor-icon {
  color: #B6CFF7;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(182, 207, 247, 0.4));
  transition: transform 0.3s ease;
}

.desk-preview-card:hover .mockup-monitor-icon {
  transform: scale(1.1);
  color: #3566B6;
  filter: drop-shadow(0 0 14px rgba(53, 102, 182, 0.35));
}

.mockup-screen-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  max-width: 80%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Top bar over the preview */
.desk-screen-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.desk-screen-badges-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.desk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 2px 7px;
  border-radius: 12px;
}

.desk-status-pill.online .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.desk-net-pill {
  display: inline-flex;
}

.desk-net-pill .lan-pill {
  font-size: 9px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(182, 207, 247, 0.3);
  color: #B6CFF7;
  padding: 1.5px 6px;
  border-radius: 12px;
}

.desk-star-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f59e0b;
}

.desk-star-btn:hover {
  transform: scale(1.15);
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
}

.desk-star-btn.starred {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
}

/* Glass Action Overlay */
.desk-screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 4;
}

.desk-preview-card:hover .desk-screen-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-desk-connect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 82, 160, 0.35);
  transform: translateY(4px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.desk-preview-card:hover .btn-desk-connect {
  transform: translateY(0);
}

.btn-desk-connect:hover {
  background: linear-gradient(135deg, #174082 0%, #174082 100%);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(34, 82, 160, 0.35);
}

.desk-overlay-sub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(4px);
  transition: transform 0.2s ease 0.05s;
}

.desk-preview-card:hover .desk-overlay-sub-actions {
  transform: translateY(0);
}

.btn-desk-action-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-desk-action-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.15);
}

.btn-desk-action-icon.btn-remove-desk:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

/* Bottom Body Info Area */
.desk-card-body {
  padding: 10px 14px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desk-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.desk-card-id {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
}

.desk-card-time {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.desk-card-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.desk-card-alias {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-card-meta-right {
  display: inline-flex;
  align-items: center;
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(100, 116, 139, 0.15);
  color: inherit;
  margin-left: 2px;
  min-width: 16px;
}

.tiles-tab.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Empty state */
.desk-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  text-align: center;
  gap: 10px;
}

.desk-empty-icon {
  color: #94a3b8;
  opacity: 0.7;
}

.desk-empty-text {
  font-size: 13.5px;
  font-weight: 500;
  max-width: 360px;
  line-height: 1.5;
}

.history-flag {
  margin-right: 6px;
  display: inline-flex;
  vertical-align: middle;
}

.history-alias {
  color: #B6CFF7;
  font-weight: 600;
  font-size: 12px;
  margin-left: 4px;
}

.history-duration-pill {
  font-size: 11.5px;
  color: #B6CFF7;
  background: rgba(34, 82, 160, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(182, 207, 247, 0.25);
  font-weight: 600;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.role-tag.role-host {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #059669;
}

.role-tag.role-viewer {
  background: rgba(34, 82, 160, 0.35);
  border: 1px solid rgba(34, 82, 160, 0.35);
  color: #2252A0;
}

.status-active-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
}

/* =========================================================================
   Modals: Add/Edit Favorite & Saved Chat Transcripts
   ========================================================================= */
.modal-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-badge.fav-icon-badge {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.modal-icon-badge.chat-icon-badge {
  background: rgba(53, 102, 182, 0.21);
  border: 1px solid rgba(182, 207, 247, 0.4);
  color: #B6CFF7;
}

.modal-icon-badge.call-icon-badge {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

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

.favorite-dialog {
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  width: 440px;
  max-width: 90vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.fav-modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fav-modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fav-modal-form label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

.fav-modal-form .form-input {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #f1f5f9;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.fav-modal-form .form-input:focus {
  border-color: #B6CFF7;
  box-shadow: 0 0 10px rgba(53, 102, 182, 0.25);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

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

.btn-modal-primary {
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  border: 1px solid rgba(182, 207, 247, 0.4);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 82, 160, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  user-select: none;
}

.btn-modal-primary:hover {
  background: linear-gradient(135deg, #3566B6 0%, #2252A0 100%);
  border-color: rgba(182, 207, 247, 0.7);
  box-shadow: 0 6px 20px rgba(34, 82, 160, 0.35);
  transform: translateY(-1px);
}

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

.btn-modal-primary svg {
  color: #fbbf24;
  fill: #fbbf24;
}

.btn-modal-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-modal-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Group Management Dialog */
.group-manage-dialog {
  border-color: rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(168, 85, 247, 0.15) !important;
}

.group-modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.group-modal-help {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.group-modal-help em {
  color: #c084fc;
  font-style: normal;
  font-weight: 600;
}

.create-group-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.create-group-inline-form .form-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.create-group-inline-form .form-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.existing-groups-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.group-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin: 0;
}

.existing-groups-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
}

.existing-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.15s ease;
}

.existing-group-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.35);
}

.existing-group-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.existing-group-name svg {
  color: #c084fc;
  flex-shrink: 0;
}

.btn-delete-group {
  background: transparent;
  border: none;
  color: #ef4444;
  opacity: 0.7;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-delete-group:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

/* Empty State Add Desks Action Button */
.btn-empty-add-desks {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-empty-add-desks:hover {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.55);
}

.btn-empty-add-desks:active {
  transform: translateY(0);
}

/* Assign Group Modal Styles */
.target-desk-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
}

.desk-assign-id {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  color: #B6CFF7;
  letter-spacing: 0.5px;
}

.desk-assign-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.assign-group-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 4px;
}

.group-select-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.group-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.group-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.35);
}

.group-select-option.selected {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.group-select-option input[type="radio"] {
  accent-color: #a855f7;
  cursor: pointer;
}

.group-select-option .option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-select-option .option-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.group-select-option .option-hint {
  font-size: 11px;
  color: #94a3b8;
}

.group-select-new-row {
  margin-top: 4px;
}

/* Multi-Desk Selection Dialog Styles */
.group-desk-selection-dialog {
  border-color: rgba(168, 85, 247, 0.45) !important;
}

.group-desk-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.selection-count-label {
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
}

.selection-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-desk-selection-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
}

.group-desk-select-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.group-desk-select-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.3);
}

.group-desk-select-item.checked {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.5);
}

.select-item-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.desk-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #a855f7;
  cursor: pointer;
  flex-shrink: 0;
}

.select-item-icon {
  color: #B6CFF7;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.select-item-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.select-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-desk-id {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.select-desk-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-item-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selection-curr-group {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.3;
}

.selection-curr-group.target-group-match {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.selection-curr-group.other-group {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.selection-curr-group.unassigned-pill {
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.manual-add-desk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

/* Chat History Dialog */
.chat-history-dialog {
  background: rgba(11, 21, 40, 0.98);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 16px;
  width: 760px;
  max-width: 95vw;
  height: 540px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.chat-history-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.chat-history-sidebar {
  width: 240px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  padding: 8px;
  background: rgba(15, 23, 42, 0.5);
}

.chat-history-desk-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.chat-history-desk-item:hover,
.chat-history-desk-item.active {
  background: rgba(53, 102, 182, 0.20);
  border: 1px solid rgba(182, 207, 247, 0.3);
}

.chat-history-desk-name {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.chat-history-desk-id {
  font-size: 11px;
  font-family: monospace;
  color: #94a3b8;
}

.chat-history-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-history-head {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #B6CFF7;
}

.chat-history-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-history-empty {
  margin: auto;
  color: #64748b;
  font-size: 13px;
  text-align: center;
  max-width: 260px;
}

.btn-link-danger {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

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

/* ==========================================================================
   Call History Modal & Complete Table System
   ========================================================================== */
.call-history-dialog {
  background: linear-gradient(180deg, #0f172a 0%, #091a38 100%);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 16px;
  width: 860px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(34, 82, 160, 0.35);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

.call-filter-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.call-filter-tab,
.recent-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.call-filter-tab svg,
.recent-filter-tab svg {
  color: inherit;
}

.call-filter-tab:hover,
.recent-filter-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.call-filter-tab.active,
.recent-filter-tab.active {
  background: #2252A0;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(34, 82, 160, 0.35);
}

.btn-modal-star {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-modal-star:hover {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.btn-modal-star.starred {
  color: #f59e0b;
}

.btn-modal-star.starred svg {
  fill: #f59e0b;
  stroke: #d97706;
}

.call-history-body {
  flex: 1;
  overflow-y: auto;
  min-height: 240px;
  max-height: 480px;
  padding: 0;
}

.call-history-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.session-logs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  text-align: left;
}

.session-logs-table thead th {
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.session-logs-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: #e2e8f0;
}

.session-logs-table tbody tr {
  transition: background 0.15s ease;
}

.session-logs-table tbody tr:hover {
  background: rgba(53, 102, 182, 0.11);
}

.session-logs-table tbody tr.row-missed {
  background: rgba(239, 68, 68, 0.04);
}

.session-logs-table tbody tr.row-missed:hover {
  background: rgba(239, 68, 68, 0.09);
}

.call-dir-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.call-incoming {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.call-outgoing {
  background: rgba(53, 102, 182, 0.20);
  color: #B6CFF7;
  border: 1px solid rgba(182, 207, 247, 0.35);
}

.call-missed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.call-buzzer {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.call-desk-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-flag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.call-desk-info {
  display: flex;
  flex-direction: column;
}

.call-desk-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #f1f5f9;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.call-desk-name {
  font-size: 11px;
  color: #94a3b8;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  white-space: nowrap;
}

.status-completed {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.status-declined {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-cancelled {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

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

.status-buzzed {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.call-duration-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.call-time-col {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.btn-call-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-call-back:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Viewer Floating Right-Side Vertical Quick Action Menu
   ========================================================================== */
.viewer-side-menu {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  z-index: 120;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.viewer-side-menu.collapsed .side-menu-container {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.viewer-side-menu.collapsed .side-menu-toggle-btn svg {
  transform: rotate(180deg);
}

.side-menu-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(11, 21, 40, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(182, 207, 247, 0.28);
  border-radius: 16px;
  padding: 10px 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(34, 82, 160, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-menu-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-menu-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.side-menu-btn:hover {
  transform: scale(1.08) translateX(-2px);
  color: #ffffff;
}

.side-btn-call:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.side-btn-call.call-active,
.side-btn-call.call-ringing {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
  animation: callActivePulse 1.2s infinite;
}

@keyframes callActivePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(16, 185, 129, 0.85); transform: scale(1.06); }
}

.side-btn-chat:hover {
  background: rgba(53, 102, 182, 0.25);
  border-color: #B6CFF7;
  color: #B6CFF7;
  box-shadow: 0 0 16px rgba(182, 207, 247, 0.4);
}

.side-btn-buzzer:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}

.side-btn-buzzer svg {
  color: #fbbf24;
}

.side-btn-disconnect {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.side-btn-disconnect:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #f87171;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
}

.side-menu-divider {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 2px 0;
}

.side-menu-toggle-btn {
  position: absolute;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(182, 207, 247, 0.4);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
  z-index: 122;
}

.side-menu-toggle-btn svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.side-menu-toggle-btn:hover {
  color: #B6CFF7;
  border-color: #B6CFF7;
  transform: scale(1.15);
}

.side-menu-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(182, 207, 247, 0.35);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
}

.side-menu-btn:hover .side-menu-tooltip {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.side-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  border: 1.5px solid #0f172a;
}

.side-chat-badge.hidden {
  display: none !important;
}

/* ========================================================
   DeskDrop Shared Staging Area & Mirrored File Drop Window
   ======================================================== */

.side-btn-deskdrop {
  color: #B6CFF7;
  border-color: rgba(182, 207, 247, 0.28);
}

.side-btn-deskdrop:hover {
  background: rgba(53, 102, 182, 0.23);
  border-color: #B6CFF7;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(182, 207, 247, 0.45);
}

.btn-session-deskdrop {
  background: rgba(53, 102, 182, 0.17);
  border-color: rgba(182, 207, 247, 0.35);
  color: #B6CFF7;
}

.btn-session-deskdrop:hover {
  background: rgba(182, 207, 247, 0.25);
  border-color: #B6CFF7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(182, 207, 247, 0.4);
}

.deskdrop-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.65);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.deskdrop-modal.hidden {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.deskdrop-window {
  width: 520px;
  max-width: 95vw;
  height: 640px;
  max-height: 92vh;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 13, 26, 0.98) 100%);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(53, 102, 182, 0.20);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.deskdrop-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.deskdrop-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deskdrop-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(182, 207, 247, 0.25) 0%, rgba(34, 82, 160, 0.35) 100%);
  border: 1px solid rgba(182, 207, 247, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B6CFF7;
  box-shadow: 0 0 14px rgba(182, 207, 247, 0.3);
}

.deskdrop-header-icon svg {
  width: 20px;
  height: 20px;
}

.deskdrop-title-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.deskdrop-peer-pill {
  font-size: 11px;
  font-weight: 600;
  color: #B6CFF7;
  background: rgba(53, 102, 182, 0.17);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(182, 207, 247, 0.25);
  display: inline-block;
  margin-top: 2px;
}

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

.btn-deskdrop-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.15s ease;
}

.btn-deskdrop-icon:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

.deskdrop-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow: hidden;
  gap: 14px;
}

/* Interactive Drop & Paste Zone */
.deskdrop-dropzone {
  position: relative;
  background: rgba(15, 23, 42, 0.5);
  border: 2px dashed rgba(182, 207, 247, 0.4);
  border-radius: 14px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.deskdrop-dropzone:hover,
.deskdrop-dropzone.dragover {
  background: rgba(53, 102, 182, 0.13);
  border-color: #B6CFF7;
  box-shadow: 0 0 24px rgba(182, 207, 247, 0.25) inset, 0 0 20px rgba(182, 207, 247, 0.3);
  transform: translateY(-1px);
}

.dropzone-ambient-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(53, 102, 182, 0.25) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(25px);
  pointer-events: none;
}

.dropzone-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(53, 102, 182, 0.20);
  border: 1px solid rgba(182, 207, 247, 0.35);
  color: #B6CFF7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.dropzone-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.dropzone-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.dropzone-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.dropzone-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.deskdrop-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.deskdrop-action-btn.btn-browse {
  background: #2252A0;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 82, 160, 0.35);
}

.deskdrop-action-btn.btn-browse:hover {
  background: #174082;
  transform: scale(1.03);
}

.deskdrop-action-btn.btn-paste {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
}

.deskdrop-action-btn.btn-paste:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #B6CFF7;
  color: #B6CFF7;
  transform: scale(1.03);
}

/* Section Header */
.deskdrop-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.section-title {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
}

.section-badge {
  font-size: 11px;
  font-weight: 600;
  color: #B6CFF7;
  background: rgba(53, 102, 182, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Scrollable Mirrored File List */
.deskdrop-list-container {
  flex: 1;
  overflow-y: auto;
  min-height: 180px;
  background: rgba(8, 13, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px;
}

.deskdrop-empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #64748b;
  gap: 6px;
}

.deskdrop-empty-state.hidden {
  display: none !important;
}

.deskdrop-empty-state p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #94a3b8;
}

.deskdrop-empty-state span {
  font-size: 11.5px;
}

.deskdrop-file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 4px 2px;
}

.file-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.file-card:hover {
  background: rgba(22, 36, 62, 0.98);
  border-color: rgba(182, 207, 247, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 14px rgba(53, 102, 182, 0.25);
  transform: translateY(-2px);
}

.file-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.file-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.file-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.file-sub {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
}

.file-status {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.file-status.loading {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@keyframes spinLoader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin-loader-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spinLoader 0.75s linear infinite;
  vertical-align: middle;
}

.file-status.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.file-status.sending {
  background: rgba(34, 82, 160, 0.35);
  color: #B6CFF7;
  border: 1px solid rgba(182, 207, 247, 0.4);
}

.file-status.receiving {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.file-status.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.file-status.queued {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.file-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

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

.file-progress-bar {
  height: 100%;
  background: #B6CFF7;
  transition: width 0.15s;
}

.file-progress-bar.loading {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(53, 102, 182, 0.25) 0%, #B6CFF7 50%, rgba(53, 102, 182, 0.25) 100%);
  background-size: 200px 100%;
  animation: shimmerProgress 1.2s infinite linear;
}

.file-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 40, 0.95);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.file-card:hover .file-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-card-act {
  width: 100%;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-act:hover {
  background: #2252A0;
  border-color: #B6CFF7;
  color: #ffffff;
}

.deskdrop-footer {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deskdrop-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deskdrop-footer-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Remote Windows Lock Screen (Win + L) Overlay & HUD
   ========================================================================== */
.remote-lock-screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 17, 40, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: lockFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes lockFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lock-screen-card {
  max-width: 560px;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 32px rgba(34, 82, 160, 0.35);
}

.lock-screen-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.lock-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(53, 102, 182, 0.25);
  animation: lockPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes lockPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

.lock-screen-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(182, 207, 247, 0.5);
}

.lock-screen-icon svg {
  width: 26px;
  height: 26px;
}

.lock-screen-time {
  font-size: 52px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.lock-screen-date {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 4px;
  margin-bottom: 16px;
}

.lock-screen-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f87171;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.lock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.lock-screen-hint {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 24px;
  padding: 0 10px;
}

.lock-screen-hint strong {
  color: #B6CFF7;
}

.lock-screen-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.btn-unlock-cad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2252A0 0%, #174082 100%);
  border: 1px solid rgba(182, 207, 247, 0.5);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(34, 82, 160, 0.35);
}

.btn-unlock-cad:hover {
  background: linear-gradient(135deg, #174082 0%, #174082 100%);
  border-color: #B6CFF7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(182, 207, 247, 0.5);
}

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

.btn-lock-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lock-dismiss:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ========================================================
   Floating Live File Transfer Progress HUD
   ======================================================== */
.transfer-progress-hud {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 48px);
  pointer-events: auto;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.transfer-progress-hud.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  display: none !important;
}

.transfer-hud-card {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(182, 207, 247, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7), 0 0 24px rgba(53, 102, 182, 0.35);
  padding: 14px 16px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transfer-hud-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transfer-hud-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(53, 102, 182, 0.35);
  border: 1px solid rgba(182, 207, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B6CFF7;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.transfer-hud-icon-wrap.completed {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.5);
  color: #4ade80;
}

.transfer-hud-icon-wrap.error {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

.transfer-hud-icon {
  width: 18px;
  height: 18px;
}

.transfer-hud-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.transfer-hud-filename {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-hud-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-hud-btn-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.transfer-hud-btn-close:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.1);
}

.transfer-hud-progress-wrap {
  width: 100%;
}

.transfer-hud-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(51, 65, 85, 0.6);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.transfer-hud-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2252A0, #B6CFF7, #818cf8);
  border-radius: 4px;
  transition: width 0.12s ease-out;
  box-shadow: 0 0 10px rgba(182, 207, 247, 0.5);
}

.transfer-hud-progress-fill.indeterminate {
  width: 40% !important;
  animation: hudIndeterminate 1.4s infinite ease-in-out;
}

@keyframes hudIndeterminate {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(150%); }
  100% { transform: translateX(300%); }
}

.transfer-hud-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #cbd5e1;
}

.transfer-hud-stat-transferred {
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.transfer-hud-stat-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transfer-hud-speed {
  color: #B6CFF7;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.transfer-hud-percent {
  color: #f8fafc;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}






