:root, [data-bs-theme=light] {
  --app-bg: #f8fafc;
  --app-surface-1: #ffffff;
  --app-surface-2: #f1f5f9;
  --app-surface-3: #e2e8f0;
  --app-border: #e2e8f0;
  --app-border-hover: rgba(59, 130, 246, 0.4);
  --app-text-primary: #0f172a;
  --app-text-secondary: #475569;
  --app-text-muted: #64748b;
  --app-primary: #3b82f6;
  --app-primary-hover: #2563eb;
  --app-primary-glow: rgba(59, 130, 246, 0.35);
  --app-card-bg: #ffffff;
  --app-glass-bg: rgba(255, 255, 255, 0.95);
  --app-glass-border: #e2e8f0;
  --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --app-radar-bg: #ffffff;
  --app-radar-grid: rgba(59, 130, 246, 0.12);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--app-bg);
  color: var(--app-text-primary);
  min-height: 100vh;
  padding-bottom: 0;
  background-image: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.08) 0%, transparent 60%), radial-gradient(circle at 10% 40%, rgba(59, 130, 246, 0.03) 0%, transparent 45%), radial-gradient(circle at 90% 70%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container,
.app-main-layout {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 576px) {
  .container,
  .app-main-layout {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container,
  .app-main-layout {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container,
  .app-main-layout {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container,
  .app-main-layout {
    max-width: 1140px;
  }
}
@media (min-width: 1400px) {
  .container,
  .app-main-layout {
    max-width: 1180px;
  }
}

.app-main-layout {
  padding-top: 1.25rem !important;
  padding-bottom: 3rem !important;
}

.gb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
}
.gb-btn--primary {
  background: var(--app-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}
.gb-btn--primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  color: #ffffff !important;
  transform: translateY(-1px);
}
.gb-btn--outline {
  background: transparent;
  border: 1.5px solid var(--app-primary);
  color: var(--app-primary) !important;
}
.gb-btn--outline:hover {
  background: var(--app-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.gb-btn--sm {
  padding: 6px 14px;
  font-size: 13px;
}

.gb-brand-pill {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: inline-block;
  white-space: nowrap;
}

.navbar-center-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 1020;
}
@media (max-width: 991.98px) {
  .navbar-center-label {
    top: 22px;
  }
}
@media (max-width: 575.98px) {
  .navbar-center-label .gb-brand-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
    letter-spacing: 0.06em;
  }
}
@media (max-width: 379.98px) {
  .navbar-center-label .gb-brand-pill {
    font-size: 0.58rem;
    padding: 2px 6px;
  }
}

.gb-eyebrow-badge {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 9999px;
  padding: 5px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
}
.gb-eyebrow-badge .badge-dot {
  font-size: 0.7rem;
  color: #2563eb;
}

.navbar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--app-glass-bg) !important;
  border-bottom: 1px solid var(--app-border);
  padding: 0.65rem 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1030;
  position: sticky;
  top: 0;
}
.navbar .container {
  position: relative;
}
.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--app-text-primary) !important;
  text-decoration: none;
}
.navbar .navbar-brand img {
  max-height: 34px;
  width: auto;
  object-fit: contain;
}
.navbar .nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--app-text-secondary) !important;
  border-radius: 10px;
  padding: 0.45rem 0.85rem !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar .nav-link:hover {
  color: var(--app-text-primary) !important;
  background-color: rgba(0, 0, 0, 0.04);
}
@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  }
}
.navbar .dropdown-menu {
  background-color: #ffffff;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}
.navbar .dropdown-menu .dropdown-item {
  border-radius: 6px;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  color: var(--app-text-secondary);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar .dropdown-menu .dropdown-item:hover, .navbar .dropdown-menu .dropdown-item:focus {
  background-color: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  color: var(--app-text-muted);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.connection-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
  display: inline-block;
}
.connection-pill.is-connected {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}
.connection-pill.is-connected .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
.card {
  background-color: var(--app-card-bg) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--app-shadow) !important;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.card .card-header {
  background-color: #f8fafc !important;
  border-bottom: 1px solid var(--app-border) !important;
  padding: 0.85rem 1.15rem !important;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--app-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card .card-header i, .card .card-header svg {
  color: #2563eb;
}
.card .card-body {
  padding: 1.15rem;
}

.hero-offline-container {
  padding: 2.5rem 1rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.hero-offline-card {
  background: #ffffff;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}
.hero-offline-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}
.hero-offline-card .hero-glow-ring {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 2.2rem;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
}
.hero-offline-card .hero-glow-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(59, 130, 246, 0.3);
  animation: rotate-ring 25s linear infinite;
}
.hero-offline-card .hero-title {
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #0f172a 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-offline-card .hero-subtitle {
  color: var(--app-text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-offline-card .hero-connect-btn {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.85rem 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-offline-card .hero-connect-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
}
.hero-offline-card .hero-connect-btn:active {
  transform: translateY(1px);
}

@keyframes rotate-ring {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.setup-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.setup-steps-grid .step-card {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.setup-steps-grid .step-card:hover {
  border-color: var(--app-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--app-shadow);
  background: #ffffff;
}
.setup-steps-grid .step-card .step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.setup-steps-grid .step-card .step-title {
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: var(--app-text-primary);
}
.setup-steps-grid .step-card .step-desc {
  font-size: 0.85rem;
  color: var(--app-text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

.supported-hardware-bar {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.supported-hardware-bar .hardware-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid var(--app-border);
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.supported-hardware-bar .hardware-pill i {
  color: #2563eb;
}
.supported-hardware-bar .hardware-pill:hover {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--app-text-primary);
  background: #ffffff;
}

#onlinebar {
  background: #ffffff;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  padding: 1rem 1.5rem !important;
  margin-bottom: 1.5rem;
  box-shadow: var(--app-shadow);
}
#onlinebar .connected-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
#onlinebar .device-info-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
#onlinebar .device-info-left .controller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 1.25rem;
}
#onlinebar .device-info-left .device-title-wrap {
  display: flex;
  flex-direction: column;
}
#onlinebar .device-info-left .device-title-wrap .device-state-pill {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
#onlinebar .device-info-left .device-title-wrap #devname {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  color: var(--app-text-primary);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#onlinebar .device-meta-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
#onlinebar .device-meta-right #d-bat {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-text-primary);
  background: #f8fafc;
  border: 1px solid var(--app-border);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
}
#onlinebar .device-meta-right #d-bat i.fa-bolt {
  color: #f59e0b;
  animation: pulse 1s infinite;
}
#onlinebar .device-meta-right .btn-disconnect {
  border-radius: 9999px;
  padding: 0.45rem 1.15rem;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid #fecaca;
  color: #dc2626;
  background: #fef2f2;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
#onlinebar .device-meta-right .btn-disconnect:hover {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.nav-tabs {
  border-bottom: 1px solid var(--app-border) !important;
  gap: 0.5rem;
}
.nav-tabs .nav-item {
  margin-bottom: -1px;
}
.nav-tabs .nav-item .nav-link {
  border: none !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 0.65rem 1.25rem !important;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--app-text-secondary) !important;
  background: transparent !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav-tabs .nav-item .nav-link i {
  color: #64748b;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-tabs .nav-item .nav-link:hover {
  color: var(--app-text-primary) !important;
  background: rgba(0, 0, 0, 0.03) !important;
}
.nav-tabs .nav-item .nav-link:hover i {
  color: #2563eb;
}
.nav-tabs .nav-item .nav-link.active {
  color: #2563eb !important;
  background: #ffffff !important;
  border: 1px solid var(--app-border) !important;
  border-bottom-color: #ffffff !important;
}
.nav-tabs .nav-item .nav-link.active i {
  color: #2563eb;
}
.nav-tabs .nav-item .nav-link.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

#controller-svg-container {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  margin: 0;
  position: relative;
  overflow: hidden;
}
#controller-svg-container svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.08));
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-report-action {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff !important;
  border: 1px solid #2563eb;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.42rem 1.05rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-report-action:hover, .btn-report-action:focus {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}
.btn-report-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-quick-test {
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.42rem 1.15rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #2563eb;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-quick-test:hover, .btn-quick-test:focus {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}
.btn-quick-test:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.quick-test-action-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.quick-test-action-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
.quick-test-action-card .quick-test-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.quick-test-action-card .quick-test-left .test-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 1.1rem;
}
.quick-test-action-card .quick-test-left .test-title-wrap h6 {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e3a8a;
}
.quick-test-action-card .quick-test-left .test-title-wrap small {
  color: #3b82f6;
  font-size: 0.78rem;
}

.customer-report-card {
  border: 1.5px solid var(--app-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.customer-report-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 50%, #10b981 100%);
  z-index: 5;
}
.customer-report-card .customer-report-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--app-border);
  padding: 1rem 1.25rem;
}
.customer-report-card .customer-report-header .report-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.customer-report-card .customer-report-header .report-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.customer-report-card .customer-report-header .report-verified-badge {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
}
.customer-report-card .customer-report-header .btn-report-action {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid #2563eb;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.customer-report-card .customer-report-header .btn-report-action:hover {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.customer-report-card .customer-serial-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border-radius: 16px;
  padding: 0.9rem 1.15rem;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.customer-report-card .customer-serial-card .serial-card-top .serial-badge-label {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.customer-report-card .customer-serial-card .serial-card-top .serial-badge-type {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.customer-report-card .customer-serial-card .serial-val-text {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #38bdf8;
  word-break: break-all;
}
.customer-report-card .customer-serial-card .btn-serial-copy {
  color: #94a3b8;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.customer-report-card .customer-serial-card .btn-serial-copy:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.15);
}
.customer-report-card .report-specs-card {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}
.customer-report-card .report-specs-card .report-fwinfo-dl dt {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}
.customer-report-card .report-specs-card .report-fwinfo-dl dd {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
  text-align: right;
}
.customer-report-card .report-specs-card .report-fwinfo-dl dd:last-of-type, .customer-report-card .report-specs-card .report-fwinfo-dl dd dt:last-of-type {
  border-bottom: none;
}
.customer-report-card .report-card-footer-seal {
  font-size: 0.8rem;
}

.joystick-radar-card .radar-canvas-container, .customer-report-card .radar-canvas-container {
  background-color: var(--app-radar-bg);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 0.85rem 0.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.04);
}
.joystick-radar-card .radar-canvas-container::before, .customer-report-card .radar-canvas-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--app-radar-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.6;
}
.joystick-radar-card .radar-canvas-container canvas, .customer-report-card .radar-canvas-container canvas {
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}
.joystick-radar-card .telemetry-grid, .customer-report-card .telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 0.75rem 0 0;
}
.joystick-radar-card .telemetry-grid .telemetry-chip, .customer-report-card .telemetry-grid .telemetry-chip {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 0.4rem 0.3rem;
  text-align: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.joystick-radar-card .telemetry-grid .telemetry-chip .chip-axis, .customer-report-card .telemetry-grid .telemetry-chip .chip-axis {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.1rem;
  display: block;
}
.joystick-radar-card .telemetry-grid .telemetry-chip pre, .customer-report-card .telemetry-grid .telemetry-chip pre {
  margin: 0;
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-text-primary);
  font-variant-numeric: tabular-nums;
}
.joystick-radar-card .segmented-modes, .customer-report-card .segmented-modes {
  background: #f1f5f9;
  border: 1px solid var(--app-border);
  border-radius: 9999px;
  padding: 0.25rem;
  display: inline-flex;
  gap: 0.25rem;
}
.joystick-radar-card .segmented-modes .btn-mode, .customer-report-card .segmented-modes .btn-mode {
  border-radius: 9999px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.3rem 0.85rem !important;
  border: none !important;
  color: var(--app-text-secondary) !important;
  background: transparent !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.joystick-radar-card .segmented-modes .btn-mode:hover, .customer-report-card .segmented-modes .btn-mode:hover {
  color: var(--app-text-primary) !important;
}
.joystick-radar-card .segmented-modes .btn-check:checked + .btn-mode, .customer-report-card .segmented-modes .btn-check:checked + .btn-mode {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35) !important;
}

.calibration-actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.calibration-actions-container .btn-action-primary {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.15rem;
  background: #f8fafc;
  border: 1px solid var(--app-border);
  color: var(--app-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.calibration-actions-container .btn-action-primary:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
  transform: translateY(-1px);
}
.calibration-actions-container .btn-group {
  border-radius: 10px;
  overflow: hidden;
}
.calibration-actions-container .btn-group .btn {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  color: var(--app-text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.calibration-actions-container .btn-group .btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.calibration-actions-container #savechanges {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 1px solid #059669 !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.calibration-actions-container #savechanges:hover {
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}
.calibration-actions-container #restore-calibration-btn {
  background: #f8fafc;
  border: 1px solid var(--app-border);
  color: var(--app-text-secondary);
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.calibration-actions-container #restore-calibration-btn:hover {
  color: var(--app-text-primary);
  border-color: var(--app-border-hover);
}
.calibration-actions-container #resetBtn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.calibration-actions-container #resetBtn:hover {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.specs-table-card dl.row {
  margin: 0;
}
.specs-table-card dl.row dt {
  color: var(--app-text-muted);
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--app-border);
}
.specs-table-card dl.row dd {
  color: var(--app-text-primary);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 0;
}

.modal-backdrop.show {
  background-color: rgba(15, 23, 42, 0.4);
}

.modal-content {
  background: #ffffff !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden;
}
.modal-content .modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid var(--app-border) !important;
  padding: 1.15rem 1.5rem !important;
}
.modal-content .modal-header .modal-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--app-text-primary);
}
.modal-content .modal-body {
  padding: 1.5rem !important;
  color: var(--app-text-secondary);
}
.modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid var(--app-border) !important;
  padding: 1rem 1.5rem !important;
}

.progress {
  background-color: var(--app-surface-3) !important;
  border-radius: 9999px !important;
  height: 8px !important;
  overflow: hidden;
}
.progress .progress-bar {
  background: linear-gradient(90deg, #3b82f6, #2563eb) !important;
  border-radius: 9999px;
}

.drift-advisory-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.drift-advisory-card .advisory-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #b45309;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.65rem;
}
.drift-advisory-card p {
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.55;
  margin-bottom: 0.65rem;
}
.drift-advisory-card p:last-child {
  margin-bottom: 0;
}
.drift-advisory-card .drift-repair-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}
.drift-advisory-card .drift-repair-banner h6 {
  font-size: 0.95rem;
  color: #1e3a8a;
}
.drift-advisory-card .drift-repair-banner p {
  color: #3b82f6;
}

#alert-container .alert {
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: #ffffff;
  color: var(--app-text-primary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.site-footer {
  background: #f8fafc;
  border-top: 1px solid var(--app-border);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer .footer-wrap {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 991px) {
  .site-footer .footer-wrap {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
@media (max-width: 575px) {
  .site-footer .footer-wrap {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
.site-footer .footer-brand-col img {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}
.site-footer .footer-brand-col .footer-tagline {
  font-size: 0.88rem;
  color: var(--app-text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 320px;
}
.site-footer .footer-brand-col .footer-addr {
  font-size: 0.84rem;
  color: var(--app-text-muted);
  line-height: 1.6;
}
.site-footer .footer-brand-col .footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--app-text-secondary);
  font-size: 1rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.site-footer .footer-brand-col .footer-social-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.site-footer .footer-col h4 {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text-primary);
  margin-bottom: 1.15rem;
}
.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer .footer-col ul li {
  margin-bottom: 0.6rem;
}
.site-footer .footer-col ul li a {
  color: var(--app-text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}
.site-footer .footer-col ul li a:hover {
  color: #2563eb;
  transform: translateX(2px);
}
.site-footer .footer-bottom {
  border-top: 1px solid var(--app-border);
  padding-top: 1.5rem;
  color: var(--app-text-muted);
  font-size: 0.82rem;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-2px);
  }
}
@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(0, 112, 209, 0.5);
  }
  50% {
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.8), 0 0 25px rgba(0, 112, 209, 0.6);
  }
}
@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0.3;
  }
}
@keyframes pulse-text {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
dl.row dt {
  font-weight: 500;
}
dl.row dd {
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#left-stick-card {
  cursor: pointer;
  outline: none !important;
}

#right-stick-card {
  cursor: pointer;
  outline: none !important;
}

.stick-card-active {
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3) !important;
}
.stick-card-active .card-header {
  background-color: #3b82f6 !important;
  color: white !important;
}

.accordion-item {
  background-color: transparent !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 12px !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.accordion-item:has(.accordion-collapse.show) {
  border-color: rgba(56, 189, 248, 0.4) !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-usb {
  animation: pulse 1s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-buttons {
  animation: bounce 0.6s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-imu {
  animation: pulse 1s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-trackpad {
  animation: pulse 1s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-haptic {
  animation: shake 0.5s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-adaptive {
  animation: pulse 1s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-speaker {
  animation: bounce 0.6s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-microphone {
  animation: glow 1.5s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-lights {
  animation: glow 1.2s ease-in-out infinite !important;
}
.accordion-item:has(.accordion-collapse.show) i.fas.test-icon-headphone {
  animation: pulse 1s ease-in-out infinite !important;
}

#quickTestAccordion .accordion-button {
  padding: 0.75rem 1.15rem;
  background-color: var(--app-surface-1) !important;
  color: var(--app-text-primary) !important;
  font-weight: 600;
  font-size: 0.92rem;
}
#quickTestAccordion .accordion-button:not(.collapsed) {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #2563eb !important;
  box-shadow: none;
}
#quickTestAccordion .accordion-collapse .accordion-body {
  background-color: var(--app-surface-2);
  color: var(--app-text-secondary);
}

.skip-btn {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.accordion-header:hover .skip-btn {
  opacity: 1;
}

.blink-text {
  animation: blink 1s infinite;
}

.pulsing-text {
  animation: pulse-text 0.75s ease-in-out infinite;
}

/* Quick test check badges (IMU, trackpad): bold glyphs, stable pill width */
.test-check {
  font-weight: 900;
  font-size: 0.85em;
  min-width: 1.8em;
}

/* IMU test center-zero bar meters (Bootstrap vars follow data-bs-theme) */
.imu-bar {
  position: relative;
  height: 6px;
  margin-bottom: 6px;
  background: var(--app-surface-3);
  border-radius: 4px;
}
.imu-bar::before {
  /* center (zero) marker */
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #38bdf8;
}

.imu-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* VR2 button panel: pills light up light blue on capacitive touch and
   dark blue while clicked */
.vr2-btn {
  background-color: var(--app-surface-2);
  color: var(--app-text-secondary);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background-color 0.1s, color 0.1s;
}
.vr2-btn.touched {
  background-color: #bfdbfe;
  color: #1e3a8a;
  font-weight: 700;
}
.vr2-btn.pressed {
  background-color: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* VR2 raw input report: one cell per byte, recently changed bytes highlighted */
.vr2-raw-cell {
  display: inline-block;
  min-width: 2.6em;
  text-align: center;
  border-radius: 4px;
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.vr2-raw-hot {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-weight: 700;
}