/* ==========================================================================
   Biopunk Theme — Job Automation Dashboard
   Wet lab at 3am: bioluminescent green, biosafety pink, DNA watermarks
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Biopunk palette */
  --bio-primary: #39FF14;
  --bio-primary-dim: #2ACC10;
  --bio-secondary: #4A6A44;
  --bio-accent: #FF4D6A;
  --bio-bg: #0A0E0A;
  --bio-bg-secondary: #111611;
  --bio-text: #A8C4A0;
  --bio-text-bright: #D4E8CF;
  --bio-border: #1E2B1E;
  --bio-border-glow: rgba(57, 255, 20, 0.15);
  --bio-radius: 12px;
  --bio-font: 'IBM Plex Sans', 'DM Sans', 'Inter', sans-serif;

  /* Glow presets */
  --bio-glow-sm: 0 0 4px rgba(57, 255, 20, 0.3);
  --bio-glow-md: 0 0 8px rgba(57, 255, 20, 0.25), 0 0 20px rgba(57, 255, 20, 0.1);
  --bio-glow-lg: 0 0 12px rgba(57, 255, 20, 0.4), 0 0 30px rgba(57, 255, 20, 0.15);
  --bio-glow-accent: 0 0 8px rgba(255, 77, 106, 0.3), 0 0 20px rgba(255, 77, 106, 0.1);

  /* Bootstrap overrides */
  --bs-body-bg: #0A0E0A;
  --bs-secondary-bg: #111611;
  --bs-body-color: #A8C4A0;
  --bs-border-color: #1E2B1E;
  --accent-gradient: linear-gradient(135deg, #39FF14 0%, #4A6A44 100%);

  /* DNA watermark pattern */
  --bio-dna-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ctext x='10' y='20' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.03'%3EATCGATCG%3C/text%3E%3Ctext x='60' y='50' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.02'%3EGCTAGCTA%3C/text%3E%3Ctext x='20' y='80' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.03'%3ETAGCTAGC%3C/text%3E%3Ctext x='80' y='110' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.02'%3ECGATCGAT%3C/text%3E%3Ctext x='30' y='140' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.03'%3EATCGATCG%3C/text%3E%3Ctext x='90' y='170' font-family='monospace' font-size='14' fill='%2339FF14' opacity='0.02'%3EGCTAGCTA%3C/text%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: var(--bio-bg);
  background-image: var(--bio-dna-pattern),
    repeating-linear-gradient(transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
  color: var(--bio-text);
  font-family: var(--bio-font);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--bio-text-bright);
}

a {
  color: var(--bio-primary);
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
  color: #5FFF4A;
  text-shadow: var(--bio-glow-sm);
}

::selection {
  background: rgba(57, 255, 20, 0.25);
  color: var(--bio-text-bright);
}

code {
  color: var(--bio-primary);
  background: rgba(57, 255, 20, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}
pre code {
  display: block;
  padding: 1rem;
  background: rgba(10, 14, 10, 0.8);
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
}

.text-muted {
  color: rgba(168, 196, 160, 0.6) !important;
}
.text-danger {
  color: var(--bio-accent) !important;
}

/* ---------- Focus Rings ---------- */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(57, 255, 20, 0.3);
}
.form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(57, 255, 20, 0.2);
}

/* ---------- Form Floating Placeholder ---------- */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------- Navbar ---------- */
.navbar {
  background: var(--bio-bg-secondary) !important;
  border-bottom: 1px solid var(--bio-border);
  box-shadow: 0 1px 0 var(--bio-border-glow);
}

.navbar-brand {
  font-weight: 700;
  color: var(--bio-primary) !important;
  text-shadow: var(--bio-glow-md);
  background: none !important;
  -webkit-text-fill-color: var(--bio-primary) !important;
  -webkit-background-clip: unset !important;
}

.navbar .nav-link {
  color: var(--bio-text) !important;
  transition: color 0.2s, text-shadow 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--bio-primary) !important;
  text-shadow: var(--bio-glow-sm);
}

.navbar .dropdown-menu {
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  box-shadow: var(--bio-glow-md);
}
.navbar .dropdown-item {
  color: var(--bio-text);
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background: rgba(57, 255, 20, 0.08);
  color: var(--bio-primary);
}
.navbar .dropdown-divider {
  border-color: var(--bio-border);
}

.navbar-toggler {
  border-color: var(--bio-border);
}
.navbar-toggler-icon {
  filter: invert(0.6) sepia(1) saturate(3) hue-rotate(80deg);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
  color: var(--bio-text);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: var(--bio-glow-md);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--bio-border);
  color: var(--bio-text-bright);
}
.card-body {
  color: var(--bio-text);
}
.card-title {
  color: var(--bio-text-bright);
}

/* Stat cards (dashboard) */
.stat-card {
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--bio-primary);
  box-shadow: var(--bio-glow-lg);
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-md);
  background: none;
  -webkit-text-fill-color: var(--bio-primary);
  -webkit-background-clip: unset;
  background-clip: unset;
}
.stat-label {
  color: var(--bio-text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--bio-primary) !important;
  border: none !important;
  color: #0A0E0A !important;
  font-weight: 600;
  box-shadow: var(--bio-glow-sm);
  border-radius: var(--bio-radius);
}
.btn-primary:hover {
  background: #5FFF4A !important;
  color: #0A0E0A !important;
  box-shadow: var(--bio-glow-lg);
}

.btn-outline-primary {
  border-color: var(--bio-primary) !important;
  color: var(--bio-primary) !important;
}
.btn-outline-primary:hover {
  background: rgba(57, 255, 20, 0.12) !important;
  border-color: var(--bio-primary) !important;
  color: var(--bio-primary) !important;
  box-shadow: var(--bio-glow-sm);
}
.btn-outline-primary.active,
.btn-outline-primary:active {
  background: var(--bio-primary) !important;
  color: #0A0E0A !important;
  box-shadow: var(--bio-glow-md);
}

.btn-success {
  background: var(--bio-secondary) !important;
  border-color: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
  box-shadow: 0 0 6px rgba(74, 106, 68, 0.4);
}
.btn-success:hover {
  background: #5A7A54 !important;
  border-color: #5A7A54 !important;
}
.btn-outline-success {
  border-color: var(--bio-secondary) !important;
  color: var(--bio-secondary) !important;
}
.btn-outline-success:hover {
  background: rgba(74, 106, 68, 0.15) !important;
  border-color: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
}

.btn-danger {
  background: var(--bio-accent) !important;
  border-color: var(--bio-accent) !important;
  color: #fff !important;
  box-shadow: var(--bio-glow-accent);
}
.btn-danger:hover {
  background: #FF6B83 !important;
  border-color: #FF6B83 !important;
  box-shadow: 0 0 12px rgba(255, 77, 106, 0.5);
}
.btn-outline-danger {
  border-color: var(--bio-accent) !important;
  color: var(--bio-accent) !important;
}
.btn-outline-danger:hover {
  background: rgba(255, 77, 106, 0.12) !important;
  border-color: var(--bio-accent) !important;
  color: var(--bio-accent) !important;
  box-shadow: var(--bio-glow-accent);
}

.btn-secondary {
  background: var(--bio-secondary) !important;
  border-color: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
}
.btn-secondary:hover {
  background: #5A7A54 !important;
  border-color: #5A7A54 !important;
}
.btn-outline-secondary {
  border-color: var(--bio-border) !important;
  color: var(--bio-text) !important;
}
.btn-outline-secondary:hover {
  background: rgba(74, 106, 68, 0.15) !important;
  border-color: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
}

.btn-info {
  background: rgba(57, 255, 20, 0.15) !important;
  border-color: rgba(57, 255, 20, 0.3) !important;
  color: var(--bio-primary) !important;
}
.btn-info:hover {
  background: rgba(57, 255, 20, 0.25) !important;
}

/* ---------- Form Controls ---------- */
.form-control, .form-select {
  background: var(--bio-bg) !important;
  border: 1px solid var(--bio-border);
  color: var(--bio-text-bright) !important;
  border-radius: var(--bio-radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus, .form-select:focus {
  background: var(--bio-bg) !important;
  border-color: var(--bio-primary);
  color: var(--bio-text-bright) !important;
  box-shadow: 0 0 0 0.15rem rgba(57, 255, 20, 0.2);
}
.form-control::placeholder {
  color: rgba(168, 196, 160, 0.4) !important;
}
.form-label {
  color: var(--bio-text);
  font-weight: 500;
}
.form-text {
  color: rgba(168, 196, 160, 0.6) !important;
}
.form-check-input {
  background-color: var(--bio-bg);
  border-color: var(--bio-border);
}
.form-check-input:checked {
  background-color: var(--bio-primary);
  border-color: var(--bio-primary);
}

.input-group-text {
  background: var(--bio-bg-secondary) !important;
  border: 1px solid var(--bio-border);
  color: var(--bio-primary);
}

/* ---------- Tables ---------- */
.table {
  --bs-table-bg: var(--bio-bg-secondary);
  --bs-table-border-color: var(--bio-border);
  --bs-table-color: var(--bio-text);
  --bs-table-hover-bg: rgba(57, 255, 20, 0.05);
  --bs-table-hover-color: var(--bio-text-bright);
}
.table-dark {
  --bs-table-bg: var(--bio-bg-secondary);
  --bs-table-border-color: var(--bio-border);
}
.table thead th {
  color: var(--bio-primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(57, 255, 20, 0.2) !important;
}

/* ---------- Badges ---------- */
.badge {
  border-radius: 999px;
  font-weight: 500;
}
.badge.bg-primary {
  background: var(--bio-primary) !important;
  color: #0A0E0A !important;
  box-shadow: var(--bio-glow-sm);
}
.badge.bg-danger {
  background: var(--bio-accent) !important;
  color: #fff !important;
  box-shadow: var(--bio-glow-accent);
}
.badge.bg-success {
  background: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
}
.badge.bg-secondary {
  background: rgba(74, 106, 68, 0.3) !important;
  color: var(--bio-text) !important;
}
.badge.bg-info {
  background: rgba(57, 255, 20, 0.15) !important;
  color: var(--bio-primary) !important;
}
.badge.bg-warning {
  background: rgba(255, 193, 7, 0.2) !important;
  color: #FFC107 !important;
}

/* Old gradient badges — remap to biopunk */
.badge-new { background: linear-gradient(135deg, var(--bio-primary) 0%, var(--bio-secondary) 100%) !important; color: #0A0E0A !important; }
.badge-applied { background: linear-gradient(135deg, var(--bio-secondary) 0%, #6A9A64 100%) !important; }
.badge-ignored { background: linear-gradient(135deg, #2A3A2A 0%, #3A4A3A 100%) !important; }
.badge-responded { background: linear-gradient(135deg, var(--bio-accent) 0%, #FF8DA0 100%) !important; }

/* ---------- Alerts ---------- */
.alert-success {
  background: rgba(57, 255, 20, 0.08) !important;
  border-color: rgba(57, 255, 20, 0.2) !important;
  color: var(--bio-primary) !important;
}
.alert-danger {
  background: rgba(255, 77, 106, 0.08) !important;
  border-color: rgba(255, 77, 106, 0.2) !important;
  color: var(--bio-accent) !important;
}
.alert-info {
  background: rgba(57, 255, 20, 0.05) !important;
  border-color: rgba(57, 255, 20, 0.15) !important;
  color: var(--bio-text-bright) !important;
}
.alert-warning {
  background: rgba(255, 193, 7, 0.08) !important;
  border-color: rgba(255, 193, 7, 0.2) !important;
  color: #FFC107 !important;
}
.btn-close {
  filter: invert(0.6) sepia(1) saturate(5) hue-rotate(80deg);
}

/* ---------- Modals ---------- */
.modal-content {
  background: var(--bio-bg-secondary) !important;
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
  box-shadow: var(--bio-glow-lg);
  color: var(--bio-text);
}
.modal-header {
  border-bottom-color: var(--bio-border);
  color: var(--bio-text-bright);
}
.modal-footer {
  border-top-color: var(--bio-border);
}

/* ---------- Footer ---------- */
footer {
  background: var(--bio-bg-secondary);
  border-top: 1px solid var(--bio-border);
  color: rgba(168, 196, 160, 0.5);
  position: relative;
  overflow: hidden;
}
footer::before {
  content: 'ATCG GCTA TAGC CGAT ATCG GCTA TAGC CGAT ATCG GCTA TAGC CGAT ATCG GCTA TAGC CGAT';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  font-family: monospace;
  font-size: 10px;
  color: rgba(57, 255, 20, 0.04);
  letter-spacing: 4px;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Nav Tabs ---------- */
.nav-tabs {
  border-bottom-color: var(--bio-border);
}
.nav-tabs .nav-link {
  color: var(--bio-text);
  border: none;
  border-bottom: 2px solid transparent;
}
.nav-tabs .nav-link:hover {
  color: var(--bio-primary);
  border-bottom-color: rgba(57, 255, 20, 0.3);
  isolation: auto;
}
.nav-tabs .nav-link.active {
  color: var(--bio-primary) !important;
  background: transparent !important;
  border-color: transparent !important;
  border-bottom: 2px solid var(--bio-primary) !important;
  text-shadow: var(--bio-glow-sm);
}

/* ---------- List Groups ---------- */
.list-group-item {
  background: transparent;
  border-color: var(--bio-border);
  color: var(--bio-text);
}
.list-group-item:hover {
  background: rgba(57, 255, 20, 0.03);
}

/* ---------- Backgrounds (Bootstrap utility overrides) ---------- */
.bg-dark {
  background-color: var(--bio-bg) !important;
}
.bg-secondary {
  background-color: var(--bio-secondary) !important;
}
.bg-primary {
  background-color: var(--bio-primary) !important;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bio-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--bio-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bio-secondary);
}

/* ---------- Pagination ---------- */
.page-link {
  background: var(--bio-bg-secondary);
  border-color: var(--bio-border);
  color: var(--bio-text);
}
.page-link:hover {
  background: rgba(57, 255, 20, 0.08);
  border-color: rgba(57, 255, 20, 0.2);
  color: var(--bio-primary);
}
.page-item.active .page-link {
  background: var(--bio-primary);
  border-color: var(--bio-primary);
  color: #0A0E0A;
  box-shadow: var(--bio-glow-sm);
}

/* ---------- Utility Classes ---------- */
.bio-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bio-primary);
  box-shadow: var(--bio-glow-md);
  animation: bio-pulse 2s ease-in-out infinite;
}
.bio-status-dot--danger {
  background: var(--bio-accent);
  box-shadow: var(--bio-glow-accent);
}

@keyframes bio-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.bio-section-marker::before {
  content: '\25CF';
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-sm);
  margin-right: 8px;
  font-size: 0.6em;
  vertical-align: middle;
}

/* ---------- Login Page (standalone) ---------- */
.login-page {
  background: var(--bio-bg);
  background-image: var(--bio-dna-pattern);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bio-font);
  color: var(--bio-text);
}
.login-container {
  position: relative;
  z-index: 1;
  background: var(--bio-bg-secondary);
  border-radius: var(--bio-radius);
  border: 1px solid rgba(57, 255, 20, 0.15);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), var(--bio-glow-md);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.login-header h1 {
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-md);
  font-size: 28px;
  margin-bottom: 10px;
  font-family: var(--bio-font);
}
.login-header p {
  color: var(--bio-text);
  font-size: 14px;
}
.login-page .form-group {
  margin-bottom: 20px;
}
.login-page .form-group label {
  display: block;
  color: var(--bio-text);
  font-weight: 500;
  margin-bottom: 8px;
}
.login-page .form-control {
  width: 100%;
  padding: 12px;
  background: var(--bio-bg) !important;
  border: 2px solid var(--bio-border);
  color: var(--bio-text-bright) !important;
  border-radius: var(--bio-radius);
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.login-page .form-control:focus {
  outline: none;
  border-color: var(--bio-primary);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.15);
}
.login-page .text-danger {
  color: var(--bio-accent) !important;
  font-size: 12px;
  margin-top: 5px;
}
.login-page .checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--bio-text);
}
.login-page .checkbox-group input[type="checkbox"] {
  accent-color: var(--bio-primary);
  margin-right: 8px;
}
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--bio-primary);
  color: #0A0E0A;
  border: none;
  border-radius: var(--bio-radius);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--bio-font);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--bio-glow-sm);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--bio-glow-lg);
  background: #5FFF4A;
}
.btn-passkey {
  margin-top: 15px;
  background: var(--bio-secondary) !important;
  color: var(--bio-text-bright) !important;
  box-shadow: 0 0 6px rgba(74, 106, 68, 0.4);
}
.btn-passkey:hover {
  background: #5A7A54 !important;
  box-shadow: 0 0 10px rgba(74, 106, 68, 0.5);
}
.login-page .validation-summary-errors {
  background: rgba(255, 77, 106, 0.08);
  border: 1px solid rgba(255, 77, 106, 0.3);
  border-radius: var(--bio-radius);
  padding: 15px;
  margin-bottom: 20px;
  color: var(--bio-accent);
}
.login-page .validation-summary-errors ul {
  margin: 0;
  padding-left: 20px;
}
.bio-link {
  color: var(--bio-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.bio-link:hover {
  color: #5FFF4A;
  text-shadow: var(--bio-glow-sm);
}

/* ---------- Standalone Error Pages ---------- */
.error-page {
  background: var(--bio-bg);
  background-image: var(--bio-dna-pattern);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bio-font);
  color: var(--bio-text);
}
.error-container {
  background: var(--bio-bg-secondary);
  border-radius: var(--bio-radius);
  border: 1px solid rgba(255, 77, 106, 0.2);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), var(--bio-glow-accent);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}
.error-container .error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--bio-accent);
  text-shadow: var(--bio-glow-accent);
  margin-bottom: 0;
}
.error-container h2 {
  color: var(--bio-text-bright);
  margin-bottom: 15px;
}
.error-container p {
  color: var(--bio-text);
}

/* ---------- Device Verify Page ---------- */
.verify-page {
  background: var(--bio-bg);
  background-image: var(--bio-dna-pattern);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bio-font);
  color: var(--bio-text);
}
.verify-container {
  background: var(--bio-bg-secondary);
  border-radius: var(--bio-radius);
  border: 1px solid rgba(57, 255, 20, 0.15);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), var(--bio-glow-md);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}
.verify-container h1 {
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-md);
}
.verify-container .info-box {
  background: rgba(57, 255, 20, 0.05);
  border-left: 4px solid var(--bio-primary);
  border-radius: 0 var(--bio-radius) var(--bio-radius) 0;
  padding: 15px;
  margin: 20px 0;
  text-align: left;
  color: var(--bio-text);
}

/* ==========================================================================
   BIOPUNK LAB INTERFACE v2
   ========================================================================== */

/* ---------- Sidebar ---------- */
.bio-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  background: var(--bio-bg-secondary);
  border-right: 1px solid var(--bio-border);
  box-shadow: 1px 0 12px rgba(57, 255, 20, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

.bio-sidebar-brand {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--bio-border);
}
.bio-sidebar-brand a {
  text-decoration: none;
  display: block;
}
.bio-sidebar-brand-name {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-md);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bio-sidebar-brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: rgba(168, 196, 160, 0.5);
  letter-spacing: 2px;
  margin-top: 4px;
}

.bio-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bio-primary);
  box-shadow: var(--bio-glow-md);
  animation: bio-glow-pulse 2s ease-in-out infinite;
}
.bio-led--accent {
  background: var(--bio-accent);
  box-shadow: var(--bio-glow-accent);
}

.bio-sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.bio-sidebar-section {
  padding: 16px 16px 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bio-sidebar-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bio-border);
}

.bio-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 20px;
  color: var(--bio-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.bio-sidebar-link:hover {
  color: var(--bio-primary);
  background: rgba(57, 255, 20, 0.04);
  border-left-color: rgba(57, 255, 20, 0.3);
}
.bio-sidebar-link.active {
  color: var(--bio-primary);
  background: rgba(57, 255, 20, 0.06);
  border-left-color: var(--bio-primary);
  text-shadow: var(--bio-glow-sm);
  box-shadow: inset 3px 0 8px rgba(57, 255, 20, 0.1);
}
.bio-sidebar-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.bio-sidebar-user {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--bio-border);
  background: rgba(10, 14, 10, 0.5);
}
.bio-sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bio-text-bright);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0; /* Allow flex children to shrink */
}
.bio-sidebar-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.bio-sidebar-user-name .badge {
  font-size: 0.6rem;
  flex-shrink: 0;
  padding: 0.2em 0.5em;
}
.bio-sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.bio-sidebar-user-actions a {
  font-size: 0.75rem;
  color: var(--bio-accent);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.bio-sidebar-user-actions a:hover {
  color: #FF6B83;
  text-shadow: var(--bio-glow-accent);
}

/* Sidebar responsive: offcanvas on mobile */
@media (max-width: 991.98px) {
  .bio-sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .bio-sidebar.show {
    transform: translateX(0);
  }
  .bio-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1039;
    display: none;
  }
  .bio-sidebar-backdrop.show {
    display: block;
  }
}

/* ---------- Main Content Wrapper ---------- */
.bio-main {
  margin-left: 220px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bio-main > main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
@media (max-width: 991.98px) {
  .bio-main {
    margin-left: 0;
    padding-top: 48px; /* Clear the fixed hamburger button */
  }
}

/* Mobile hamburger */
.bio-mobile-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1038;
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--bio-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  box-shadow: var(--bio-glow-sm);
  transition: box-shadow 0.2s;
}
.bio-mobile-toggle:hover {
  box-shadow: var(--bio-glow-md);
}
@media (max-width: 991.98px) {
  .bio-mobile-toggle {
    display: block;
  }
}

/* Scanlines merged into body background-image — no overlay needed */

/* ---------- Atmospheric: Floating Particles ---------- */
.bio-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.bio-particles::before,
.bio-particles::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  animation: bio-particle-float 20s linear infinite;
}
.bio-particles::before {
  box-shadow:
    100px 800px 0 rgba(57, 255, 20, 0.3),
    300px 600px 0 rgba(57, 255, 20, 0.2),
    500px 900px 0 rgba(57, 255, 20, 0.15),
    700px 700px 0 rgba(57, 255, 20, 0.25),
    200px 500px 0 rgba(57, 255, 20, 0.1),
    900px 800px 0 rgba(57, 255, 20, 0.2),
    50px 300px 0 rgba(57, 255, 20, 0.15),
    650px 400px 0 rgba(57, 255, 20, 0.2),
    400px 100px 0 rgba(57, 255, 20, 0.1),
    800px 200px 0 rgba(57, 255, 20, 0.15);
  animation-duration: 25s;
}
.bio-particles::after {
  box-shadow:
    150px 750px 0 rgba(255, 77, 106, 0.15),
    450px 550px 0 rgba(57, 255, 20, 0.2),
    350px 850px 0 rgba(57, 255, 20, 0.1),
    750px 650px 0 rgba(255, 77, 106, 0.1),
    550px 350px 0 rgba(57, 255, 20, 0.15),
    850px 450px 0 rgba(57, 255, 20, 0.2),
    250px 950px 0 rgba(57, 255, 20, 0.1);
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes bio-particle-float {
  from { transform: translateY(0); }
  to { transform: translateY(-100vh); }
}

/* ---------- Atmospheric: Glow Pulse ---------- */
@keyframes bio-glow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Gel Electrophoresis Loader ---------- */
.bio-gel-loader {
  height: 3px;
  background: var(--bio-bg);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.bio-gel-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(57, 255, 20, 0.4) 20%,
    var(--bio-primary) 40%,
    rgba(57, 255, 20, 0.6) 50%,
    var(--bio-primary) 60%,
    rgba(57, 255, 20, 0.4) 80%,
    transparent
  );
  animation: bio-gel-migrate 1.8s ease-in-out infinite;
}

@keyframes bio-gel-migrate {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ---------- Specimen Cards ---------- */
.bio-specimen-card {
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
  padding: 0;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bio-specimen-card:hover {
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: var(--bio-glow-md);
  transform: translateY(-2px);
}
.bio-specimen-card.is-default {
  border-color: rgba(57, 255, 20, 0.3);
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.1);
}

.bio-specimen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px 0;
}

.bio-specimen-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.bio-specimen-body {
  padding: 8px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bio-specimen-title {
  font-weight: 600;
  color: var(--bio-text-bright);
  font-size: 1rem;
  margin-bottom: 2px;
}
.bio-specimen-subtitle {
  font-size: 0.75rem;
  color: rgba(168, 196, 160, 0.5);
}

.bio-card-divider {
  border: none;
  border-bottom: 1px dashed var(--bio-border);
  margin: 8px 0;
}

.bio-reagent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 56px;
  overflow: hidden;
}
.bio-reagent-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px 2px 10px;
  border-radius: 999px;
  background: rgba(74, 106, 68, 0.2);
  color: var(--bio-text);
  border-left: 3px solid var(--bio-secondary);
}
.bio-reagent-tag--primary {
  background: rgba(57, 255, 20, 0.08);
  border-left-color: var(--bio-primary);
  color: var(--bio-primary);
}
.bio-reagent-tag--accent {
  background: rgba(255, 77, 106, 0.08);
  border-left-color: var(--bio-accent);
  color: var(--bio-accent);
}

.bio-specimen-desc {
  font-size: 0.8rem;
  color: var(--bio-text);
  opacity: 0.8;
  flex-grow: 1;
}

.bio-specimen-meta {
  font-size: 0.75rem;
  color: rgba(168, 196, 160, 0.5);
  display: flex;
  gap: 12px;
}
.bio-specimen-meta i {
  color: var(--bio-primary);
}

.bio-specimen-actions {
  padding: 0 16px 14px;
  margin-top: auto;
}
.bio-specimen-actions .btn-group {
  width: 100%;
}

/* ---------- Section Header ---------- */
.bio-section-header {
  margin-bottom: 20px;
}
.bio-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bio-font);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--bio-text-bright);
  margin: 0;
}
.bio-section-title::before {
  content: '\25C6';
  color: var(--bio-primary);
  text-shadow: var(--bio-glow-sm);
  font-size: 0.6em;
}
.bio-section-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.bio-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bio-border);
}
.bio-section-subtitle {
  font-size: 0.8rem;
  color: rgba(168, 196, 160, 0.5);
  margin-top: 4px;
  padding-left: 22px;
}

/* ---------- Search Bar ---------- */
.bio-search {
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  border-radius: var(--bio-radius);
  padding: 10px 14px;
  margin-bottom: 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.bio-search:focus-within {
  border-color: rgba(57, 255, 20, 0.3);
  box-shadow: var(--bio-glow-sm);
}
.bio-search-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
.bio-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bio-search-input-wrap .form-control {
  border: none !important;
  background: transparent !important;
  padding: 4px 0;
  font-size: 0.9rem;
  box-shadow: none !important;
}
.bio-search-input-wrap .form-control:focus {
  box-shadow: none !important;
}
.bio-search-input-wrap i {
  color: var(--bio-primary);
}
.bio-search-clear {
  background: none;
  border: none;
  color: var(--bio-accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.bio-search-clear:hover {
  background: rgba(255, 77, 106, 0.1);
}
.bio-search-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 1px;
  margin-top: 6px;
}
.bio-search-loader {
  margin-top: 6px;
}

/* ---------- Empty State ---------- */
.bio-empty-state {
  text-align: center;
  padding: 60px 20px;
}
.bio-empty-icon {
  font-size: 3rem;
  color: rgba(168, 196, 160, 0.2);
  margin-bottom: 16px;
}
.bio-empty-icon::before {
  content: '\25CE';
}
.bio-empty-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--bio-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bio-empty-desc {
  font-size: 0.85rem;
  color: rgba(168, 196, 160, 0.5);
  margin-bottom: 20px;
}

/* ---------- Bio Alert ---------- */
.bio-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--bio-radius);
  background: var(--bio-bg-secondary);
  border: 1px solid var(--bio-border);
  margin-bottom: 16px;
  position: relative;
}
.bio-alert--success {
  border-left: 4px solid var(--bio-primary);
  box-shadow: -2px 0 8px rgba(57, 255, 20, 0.1);
}
.bio-alert--danger {
  border-left: 4px solid var(--bio-accent);
  box-shadow: -2px 0 8px rgba(255, 77, 106, 0.1);
}
.bio-alert--info {
  border-left: 4px solid rgba(57, 255, 20, 0.5);
  box-shadow: -2px 0 8px rgba(57, 255, 20, 0.06);
}
.bio-alert--warning {
  border-left: 4px solid #FFC107;
  box-shadow: -2px 0 8px rgba(255, 193, 7, 0.1);
}
.bio-alert-prefix {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.bio-alert--success .bio-alert-prefix { color: var(--bio-primary); }
.bio-alert--danger .bio-alert-prefix { color: var(--bio-accent); }
.bio-alert--info .bio-alert-prefix { color: var(--bio-primary); }
.bio-alert--warning .bio-alert-prefix { color: #FFC107; }
.bio-alert-message {
  flex: 1;
  font-size: 0.9rem;
  color: var(--bio-text-bright);
}
.bio-alert .btn-close {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
}

/* ---------- Status Bar Footer ---------- */
.bio-status-bar {
  background: var(--bio-bg-secondary);
  border-top: 1px solid var(--bio-border);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.bio-status-bar::before {
  content: 'ATCG GCTA TAGC CGAT ATCG GCTA TAGC CGAT ATCG GCTA';
  position: absolute;
  inset: 0;
  font-family: monospace;
  font-size: 10px;
  color: rgba(57, 255, 20, 0.03);
  letter-spacing: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  white-space: nowrap;
}
.bio-status-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: rgba(168, 196, 160, 0.4);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.bio-status-separator {
  color: rgba(168, 196, 160, 0.15);
  font-family: monospace;
}

/* ---------- Terminal Code Block ---------- */
.bio-terminal {
  background: rgba(10, 14, 10, 0.9);
  border: 1px solid var(--bio-border);
  border-left: 4px solid var(--bio-primary);
  border-radius: var(--bio-radius);
  box-shadow: -2px 0 8px rgba(57, 255, 20, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
}
.bio-terminal-header {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bio-primary);
  padding: 8px 14px;
  border-bottom: 1px solid var(--bio-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bio-terminal-body {
  padding: 14px;
  font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.8rem;
  color: var(--bio-primary);
  line-height: 1.6;
  overflow-x: auto;
}
.bio-terminal-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: inherit;
  background: transparent;
  border: none;
  padding: 0;
}
.bio-terminal-body code {
  color: inherit;
  background: transparent;
  padding: 0;
  font-size: inherit;
}
.bio-terminal-copy {
  background: none;
  border: 1px solid var(--bio-border);
  color: var(--bio-text);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.bio-terminal-copy:hover {
  border-color: var(--bio-primary);
  color: var(--bio-primary);
}

@keyframes bio-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.bio-terminal-cursor::after {
  content: '\2588';
  animation: bio-cursor-blink 1s step-end infinite;
  color: var(--bio-primary);
}

/* ---------- Login: Lab Access Terminal ---------- */
.bio-helix-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.bio-helix-strand {
  position: absolute;
  width: 300px;
  height: 600px;
  opacity: 0.15;
  animation: bio-helix-drift 30s linear infinite;
}
.bio-helix-strand:nth-child(1) { left: 5%; animation-delay: 0s; }
.bio-helix-strand:nth-child(2) { left: 30%; animation-delay: -8s; }
.bio-helix-strand:nth-child(3) { left: 60%; animation-delay: -16s; }
.bio-helix-strand:nth-child(4) { left: 85%; animation-delay: -24s; }

.bio-helix-strand svg {
  width: 100%;
  height: 100%;
}

@keyframes bio-helix-drift {
  from { transform: translateY(100vh) rotate(0deg); }
  to { transform: translateY(-100%) rotate(360deg); }
}

.bio-access-terminal .login-header h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.bio-access-terminal .login-header p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(168, 196, 160, 0.4);
}
.bio-field-label {
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.7rem !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bio-text) !important;
}
.bio-access-granted {
  animation: bio-access-flash 0.5s ease-out;
}
@keyframes bio-access-flash {
  0% { box-shadow: 0 0 0 rgba(57, 255, 20, 0); }
  50% { box-shadow: 0 0 40px rgba(57, 255, 20, 0.4), inset 0 0 30px rgba(57, 255, 20, 0.1); }
  100% { box-shadow: 0 0 0 rgba(57, 255, 20, 0); }
}

/* ---------- Modal: Containment Dialogs ---------- */
.modal-content {
  border: 1px solid var(--bio-border) !important;
}
.modal-header {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.5px;
}
.modal-header .modal-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Destructive modal variant */
.modal-danger .modal-header {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255, 77, 106, 0.05) 10px,
    rgba(255, 77, 106, 0.05) 20px
  );
  border-bottom-color: rgba(255, 77, 106, 0.2);
}
.modal-danger .modal-content {
  border-color: rgba(255, 77, 106, 0.2) !important;
  box-shadow: 0 0 20px rgba(255, 77, 106, 0.1), 0 10px 40px rgba(0,0,0,0.5) !important;
}

/* ---------- Error: Containment Breach ---------- */
.bio-containment-breach .error-code {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 8px;
}
.bio-containment-breach h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bio-accent);
}

/* ---------- Bootstrap Override Gap-Fill (v3) ---------- */

/* bg-light used in ServiceAccounts permission cards and UiStyles color picker card */
.bg-light {
  background: var(--bio-bg) !important;
  color: var(--bio-text) !important;
}

/* card-header bg-primary used in ScraperDebug and Users/Create */
.card-header.bg-primary {
  background: rgba(57, 255, 20, 0.08) !important;
  border-bottom: 1px solid var(--bio-border) !important;
  color: var(--bio-primary) !important;
}
.card-header.bg-primary .card-title,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5 {
  color: var(--bio-primary) !important;
}

/* text-dark override for badge legibility on dark backgrounds */
.text-dark {
  color: var(--bio-text-bright) !important;
}

/* form-floating labels (Register page) */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--bio-primary);
}
.form-floating > label {
  color: rgba(168, 196, 160, 0.5);
}

/* form-control-color (UiStyles color pickers) */
.form-control-color {
  background: var(--bio-bg) !important;
  border-color: var(--bio-border);
}
.form-control-color:focus {
  border-color: var(--bio-primary);
  box-shadow: 0 0 0 0.15rem rgba(57, 255, 20, 0.2);
}

/* Description lists (Manage/Index) */
dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(168, 196, 160, 0.6);
}
dd {
  color: var(--bio-text-bright);
}

/* display-* headings */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  color: var(--bio-text-bright);
}

/* dropdown-menu dark theme */
.dropdown-menu {
  background: var(--bio-bg-secondary);
  border-color: var(--bio-border);
}
.dropdown-item {
  color: var(--bio-text);
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(57, 255, 20, 0.08);
  color: var(--bio-text-bright);
}
.dropdown-divider {
  border-color: var(--bio-border);
}

/* card border-0 override — give it a subtle bio border */
.card.border-0 {
  border: 1px solid var(--bio-border) !important;
}

/* card shadow-sm override — use bio glow */
.card.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 4px rgba(57, 255, 20, 0.03) !important;
}

/* text-primary override for consistency */
.text-primary {
  color: var(--bio-primary) !important;
}

/* btn-outline-secondary for consistent border on dark theme */
.btn-outline-secondary {
  border-color: var(--bio-border);
  color: var(--bio-text);
}
.btn-outline-secondary:hover {
  background: rgba(168, 196, 160, 0.1);
  border-color: var(--bio-text);
  color: var(--bio-text-bright);
}

/* card-header without explicit bg class */
.card-header {
  background: rgba(57, 255, 20, 0.04);
  border-bottom-color: var(--bio-border);
  color: var(--bio-text-bright);
}

/* thead bg-light override for tables */
thead.bg-light, thead.bg-light th {
  background: var(--bio-bg) !important;
  color: var(--bio-primary) !important;
}

/* ---------- Agent Chat ---------- */
#blazor-chat-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 -1.5rem -3rem;
    min-height: 0;
}
.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 0;
    flex: 1;
    min-height: 0;
    position: relative;
}
.chat-layout.topology-collapsed {
    grid-template-columns: 280px 1fr;
}

/* Conversation sidebar */
.chat-conversations {
    background: var(--bio-bg-secondary);
    border-right: 1px solid var(--bio-border);
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}
.chat-conv-item {
    display: block;
    padding: 0.75rem;
    border-radius: var(--bio-radius);
    color: var(--bio-text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.chat-conv-item:hover,
.chat-conv-item.active {
    background: rgba(57, 255, 20, 0.08);
    color: var(--bio-text-bright);
}

/* Main chat area */
.chat-main {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bio-bg);
    min-height: 0;
}
.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--bio-border);
    background: var(--bio-bg-secondary);
}
.chat-input-area textarea {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    color: var(--bio-text-bright);
    border-radius: var(--bio-radius);
    resize: none;
    font-family: var(--bio-font);
    overflow-y: auto;
    max-height: 150px;
    scrollbar-width: thin;
    scrollbar-color: var(--bio-border) transparent;
}
.chat-input-area textarea::-webkit-scrollbar {
    width: 4px;
}
.chat-input-area textarea::-webkit-scrollbar-track {
    background: transparent;
}
.chat-input-area textarea::-webkit-scrollbar-thumb {
    background: var(--bio-border);
    border-radius: 2px;
}
.chat-input-area textarea:focus {
    border-color: var(--bio-primary);
    box-shadow: var(--bio-glow-sm);
    outline: none;
}

/* Message bubbles */
.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: chatFadeIn 0.3s ease;
}
@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.chat-message-content {
    flex: 1;
    min-width: 0;
}
.chat-message-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.chat-message-text {
    background: var(--bio-bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--bio-radius);
    border: 1px solid var(--bio-border);
    line-height: 1.6;
}
.chat-message-text p:last-child { margin-bottom: 0; }

.chat-message.user-message .chat-message-text {
    background: rgba(57, 255, 20, 0.06);
    border-color: rgba(57, 255, 20, 0.15);
}

/* Thinking indicator */
.chat-thinking {
    display: inline-flex;
    gap: 4px;
    padding: 0.5rem 1rem;
}
.chat-thinking-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bio-primary);
    animation: chatPulse 1.4s ease-in-out infinite;
}
.chat-thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ── Tool Call Cards ─────────────────────────── */
.tool-calls-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.tool-call-card {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-left: 3px solid var(--bio-primary-dim);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.82rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.tool-call-card.started {
    border-left-color: var(--bio-accent);
    box-shadow: var(--bio-glow-accent);
}
.tool-call-card.completed {
    border-left-color: var(--bio-primary);
    box-shadow: var(--bio-glow-sm);
}
.tool-call-card.failed {
    border-left-color: #ff4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}
.tool-call-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-call-icon {
    font-size: 0.9rem;
    line-height: 1;
}
.tool-call-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--bio-border);
    border-top-color: var(--bio-accent);
    border-radius: 50%;
    animation: toolSpin 0.8s linear infinite;
}
@keyframes toolSpin {
    to { transform: rotate(360deg); }
}
.tool-call-name {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--bio-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tool-call-duration {
    margin-left: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bio-text);
    background: var(--bio-bg-secondary);
    padding: 1px 6px;
    border-radius: 4px;
}
.tool-call-details {
    margin-top: 6px;
}
.tool-call-details summary {
    font-size: 0.75rem;
    color: var(--bio-text);
    cursor: pointer;
    user-select: none;
}
.tool-call-details summary:hover {
    color: var(--bio-text-bright);
}
.tool-call-args,
.tool-call-result {
    margin: 4px 0 0 0;
    padding: 6px 8px;
    background: var(--bio-bg-secondary);
    border: 1px solid var(--bio-border);
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bio-text);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 150px;
    overflow-y: auto;
}

/* Round separator */
.chat-round-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
    animation: chatFadeIn 0.3s ease;
}
.chat-round-separator::before,
.chat-round-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--bio-border), transparent);
}
.chat-round-separator span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--bio-text-muted, #6b8a63);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Auto-continue toggle */
.chat-autocontinue-toggle {
    color: var(--bio-text-muted, #6b8a63);
    border: 1px solid var(--bio-border);
    background: transparent;
    font-size: 1rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--bio-radius);
    transition: all 0.2s ease;
}
.chat-autocontinue-toggle:hover:not(:disabled) {
    color: var(--bio-primary);
    border-color: var(--bio-primary);
}
.chat-autocontinue-toggle.active {
    color: var(--bio-primary);
    border-color: var(--bio-primary);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: var(--bio-glow-sm);
}
.chat-autocontinue-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Topology panel */
.chat-topology {
    background: var(--bio-bg-secondary);
    border-left: 1px solid var(--bio-border);
    padding: 1rem;
    overflow-y: auto;
}
.chat-topology-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    color: var(--bio-text-muted);
    border: 1px solid var(--bio-border);
    background: var(--bio-bg-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--bio-radius);
    transition: color 0.15s, border-color 0.15s;
}
.chat-topology-toggle:hover {
    color: var(--bio-primary);
    border-color: var(--bio-primary);
}

/* ---------- Topology Live Animations ---------- */
.topology-node-idle {
    transition: opacity 0.4s, stroke-width 0.4s;
}
.topology-node-pulse {
    animation: topology-pulse 1.8s ease-in-out infinite;
}
@keyframes topology-pulse {
    0%, 100% { r: 20; opacity: 0.4; stroke-width: 2; }
    50% { r: 26; opacity: 0; stroke-width: 1; }
}
.topology-edge-flow {
    animation: topology-flow 0.8s linear infinite;
}
@keyframes topology-flow {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
}
.topology-edge-glow {
    animation: topology-edge-glow-pulse 1.5s ease-in-out infinite;
}
@keyframes topology-edge-glow-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.25; }
}
.topology-agent-dot-active {
    animation: topology-dot-blink 1s ease-in-out infinite;
}
@keyframes topology-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Inline agent composer in topology panel */
.chat-topology-composer .agent-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}
.chat-topology-composer .agent-card .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}
.chat-topology-composer .agent-card .form-control,
.chat-topology-composer .agent-card .form-select {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
}

/* Agent cards in composer */
.agent-card {
    background: var(--bio-bg-secondary);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.agent-card:hover {
    border-color: var(--bio-border-glow);
}

/* Topology matrix */
.topology-matrix {
    display: grid;
    gap: 2px;
    font-size: 0.75rem;
}
.topology-matrix-cell {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    transition: all 0.2s;
}
.topology-matrix-cell.active {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--bio-primary);
    box-shadow: var(--bio-glow-sm);
}

/* ---------- Chat Mobile Header ---------- */
.chat-mobile-header {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bio-border);
    background: var(--bio-bg-secondary);
}

/* ---------- Biopunk Color Picker ---------- */
.bio-color-picker {
    position: relative;
    display: inline-block;
}
.bio-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid var(--bio-border);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bio-color-swatch:hover {
    border-color: var(--bio-primary);
    box-shadow: var(--bio-glow-sm);
}
.bio-color-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}
.bio-color-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background: var(--bio-bg-secondary);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius);
    box-shadow: var(--bio-glow-md), 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 12px;
    min-width: 220px;
}
.bio-color-presets {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.bio-color-preset {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
}
.bio-color-preset:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.3);
}
.bio-color-preset.active {
    border-color: #fff;
    box-shadow: var(--bio-glow-sm);
}
.bio-color-custom-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bio-bg) !important;
    border: 1px dashed var(--bio-border) !important;
    position: relative;
    color: var(--bio-text);
    margin: 0;
}
.bio-color-custom-trigger:hover {
    border-color: var(--bio-primary) !important;
    color: var(--bio-primary);
}
.bio-color-custom-trigger input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.bio-color-hex-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--bio-border);
}
.bio-color-hash {
    color: var(--bio-primary);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 0.85rem;
}
.bio-color-hex {
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.8rem !important;
    letter-spacing: 1px;
}

/* ---------- Searchable Select ---------- */
.bio-searchable-select {
    position: relative;
}
.bio-searchable-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bio-bg-secondary);
    border: 1px solid var(--bio-border);
    border-top: none;
    border-radius: 0 0 var(--bio-radius) var(--bio-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    max-height: 200px;
    overflow-y: auto;
}
.bio-searchable-option {
    padding: 6px 10px;
    font-size: 0.8rem;
    color: var(--bio-text);
    cursor: pointer;
    transition: background 0.15s;
}
.bio-searchable-option:hover {
    background: rgba(57, 255, 20, 0.08);
    color: var(--bio-text-bright);
}
.bio-searchable-option.active {
    background: rgba(57, 255, 20, 0.12);
    color: var(--bio-primary);
}

.bio-searchable-subtitle {
    font-size: 0.7rem;
    color: var(--bio-text-muted);
    margin-top: 1px;
}

.bio-detail-strip {
    font-size: 0.75rem;
    color: var(--bio-text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bio-info-tabs {
    display: flex;
    gap: 2px;
    margin-top: 6px;
    border-bottom: 1px solid var(--bio-border);
}
.bio-info-tab {
    padding: 3px 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bio-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.bio-info-tab:hover {
    color: var(--bio-text-bright);
}
.bio-info-tab.active {
    color: var(--bio-primary);
    border-bottom-color: var(--bio-primary);
}
.bio-info-content {
    font-size: 0.75rem;
    color: var(--bio-text-muted);
    padding: 6px 0;
    max-height: 80px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Chat Mobile Conversation Overlay ---------- */
.chat-conv-backdrop {
    display: none;
}

/* Responsive: collapse to single column on mobile */
@media (max-width: 992px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }
    .chat-mobile-header {
        display: flex;
    }
    .chat-conversations {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        z-index: 1050;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--bio-border);
    }
    .chat-conversations.show {
        display: block;
    }
    .chat-conv-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
    }
    .chat-conv-backdrop.show {
        display: block;
    }
    .chat-topology {
        display: none;
    }
}

/* ---------- Reconnection Modal ---------- */
#components-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 10000; /* Above all other UI (max existing: 1050) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 10, 0.85);
    background-image: var(--bio-dna-pattern);
    backdrop-filter: blur(4px);
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

.bio-reconnect-card {
    background: var(--bio-bg-secondary);
    border: 1px solid var(--bio-border);
    border-radius: var(--bio-radius);
    box-shadow: var(--bio-glow-sm);
    max-width: 420px;
    width: 90%;
    padding: 0;
    text-align: center;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.bio-reconnect-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--bio-border);
    transition: background 0.5s ease, border-color 0.5s ease;
}

.bio-reconnect-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bio-primary);
    transition: color 0.5s ease;
}

/* Reconnection animation — concentric ring pulse */
.bio-reconnect-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 24px auto;
}

.bio-reconnect-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--bio-primary);
    border-radius: 50%;
    opacity: 0;
}

.bio-reconnect-ring--1 {
    animation: bio-ring-pulse 2s ease-out infinite;
}

.bio-reconnect-ring--2 {
    animation: bio-ring-pulse 2s ease-out 1s infinite;
}

@keyframes bio-ring-pulse {
    0% { transform: scale(0.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0; }
}

.bio-reconnect-led {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--bio-primary);
    box-shadow: var(--bio-glow-md);
    animation: bio-pulse 2s ease-in-out infinite;
}

/* Reconnection status text */
.bio-reconnect-status {
    padding: 0 24px 16px;
}

.bio-reconnect-subtitle {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--bio-text);
    margin-bottom: 8px;
}

.bio-reconnect-live {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bio-text);
    opacity: 0.7;
    letter-spacing: 1px;
}

/* Diagnostic panel — hidden during reconnecting, shown on fail/reject */
.bio-reconnect-diagnostic {
    display: none;
    padding: 0 24px 16px;
}

.bio-reconnect-message {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--bio-text);
    margin: 0 0 12px;
}

.bio-reconnect-terminal {
    background: var(--bio-bg);
    border: 1px solid var(--bio-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--bio-primary);
    text-align: left;
    line-height: 1.8;
}

/* Reconnect button — hidden during reconnecting, shown on fail/reject */
.bio-reconnect-btn {
    display: none;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 14px;
    background: var(--bio-primary);
    color: #0A0E0A;
    border: none;
    border-radius: var(--bio-radius);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--bio-glow-sm);
}

.bio-reconnect-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--bio-glow-lg);
    background: #5FFF4A;
}

/* --- Failed state: escalated alert --- */
#components-reconnect-modal.components-reconnect-failed .bio-reconnect-card {
    border-color: rgba(255, 77, 106, 0.3);
    box-shadow: var(--bio-glow-accent);
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-header {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(255, 77, 106, 0.05) 10px,
        rgba(255, 77, 106, 0.05) 20px
    );
    border-bottom-color: rgba(255, 77, 106, 0.2);
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-title,
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-title {
    color: var(--bio-accent);
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-animation,
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-status,
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-status {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-diagnostic,
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-diagnostic {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .bio-reconnect-btn,
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-btn {
    display: block;
}

/* --- Rejected state: biosafety alert --- */
#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-card {
    border-color: rgba(255, 77, 106, 0.4);
    box-shadow: 0 0 12px rgba(255, 77, 106, 0.4), 0 0 30px rgba(255, 77, 106, 0.15);
}

#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-header {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(255, 77, 106, 0.08) 10px,
        rgba(255, 77, 106, 0.08) 20px
    );
    border-bottom-color: rgba(255, 77, 106, 0.3);
}

#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-terminal {
    border-color: rgba(255, 77, 106, 0.2);
}

#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-btn {
    background: var(--bio-accent);
    box-shadow: var(--bio-glow-accent);
}

#components-reconnect-modal.components-reconnect-rejected .bio-reconnect-btn:hover {
    background: #FF7A90;
    box-shadow: 0 0 12px rgba(255, 77, 106, 0.5), 0 0 30px rgba(255, 77, 106, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .bio-reconnect-ring {
        animation: none;
    }
    .bio-reconnect-ring--1 {
        opacity: 0.4;
        transform: scale(0.7);
    }
    .bio-reconnect-led {
        animation: none;
        opacity: 1;
    }
}
