/* ========================================================
   fLcOnX Lab - Päävalikko / Mode Hub (Kertaus vs Virtuaali)
   ======================================================== */

body:has(#screen-virtuallab.active) .main-content,
body.vlab-active .main-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

body.vlab-active,
html:has(body.vlab-active) {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

body:has(#screen-hub.active) .main-content {
  max-width: 1140px !important;
}

.screen-hub {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 0.5rem 3rem 0.5rem;
}

.hub-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Hero Section */
.hub-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hub-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.hub-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.hub-title .text-cyan {
  color: var(--cyan);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.hub-title .text-purple {
  color: #c084fc;
  text-shadow: 0 0 25px rgba(192, 132, 252, 0.4);
}

.hub-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.55;
  max-width: 660px;
}

/* 2-Column Cards Grid */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 880px) {
  .hub-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Hub Card */
.hub-card {
  position: relative;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.6rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.15);
}

.hub-card-vlab:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.2);
}

.hub-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.hub-card-glow.vlab-glow {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, transparent 70%);
}

.hub-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hub-card-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.quiz-badge {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.vlab-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.hub-card-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.quiz-icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(0, 240, 255, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.vlab-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(0, 240, 255, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.hub-card-icon {
  font-size: 2.2rem;
}

.hub-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.hub-card-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
}

/* Features List */
.hub-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(10, 16, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.hub-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.hub-features-list li strong {
  color: #f1f5f9;
}

.feat-icon {
  font-size: 1.05rem;
  line-height: 1.2;
}

/* Action Buttons */
.hub-card-footer {
  margin-top: auto;
}

.btn-hub-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.95rem 1.4rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.quiz-action {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: 1px solid #38bdf8;
  color: #fff;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.quiz-action:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.55);
  transform: translateY(-2px);
}

.vlab-action {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.vlab-action:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.55);
  transform: translateY(-2px);
}

.btn-hub-action .arrow {
  transition: transform 0.2s ease;
}

.btn-hub-action:hover .arrow {
  transform: translateX(4px);
}

/* Footer Highlights Bar */
.hub-footer-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.4rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.hub-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hub-highlight-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* Back to Hub Button in Wizard Screen */
.btn-back-to-hub {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-back-to-hub:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ========================================================
   fLcOnX Lab - Virtuaalilaboratorio (Virtual Physics Lab)
   Interaktiiviset fysiikan simulaatiokokeet & mittausdatakeskus
   ======================================================== */

.screen-virtuallab {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.75rem 0.5rem 3rem 0.5rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Lab Header */
.vlab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.vlab-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vlab-header-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(168, 85, 247, 0.25));
  border: 1px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.vlab-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0 0 0.15rem 0;
}

.vlab-title span {
  color: var(--cyan);
}

.vlab-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.vlab-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-vlab-back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-vlab-back:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.btn-vlab-app-link {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-vlab-app-link:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.45));
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

/* Layout toggle button */
.btn-vlab-layout-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-vlab-layout-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--cyan);
}

/* ========================================================
   Scientific Data Analysis -malliset pudotusvalikot (Navbar)
   ======================================================== */

.vlab-menubar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 50;
  flex-wrap: wrap;
}

.vlab-menubar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vlab-menubar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vlab-menu-dropdown {
  position: relative;
  display: inline-block;
}

.vlab-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(10, 16, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.vlab-menu-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.vlab-menu-btn.open {
  background: rgba(15, 23, 42, 0.98);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.vlab-menu-btn .menu-icon {
  font-size: 1rem;
  line-height: 1;
}

.vlab-menu-btn .menu-chevron {
  font-size: 0.62rem;
  color: #94a3b8;
  transition: transform 0.22s ease, color 0.2s ease;
  margin-left: 0.15rem;
}

.vlab-menu-btn.open .menu-chevron {
  transform: rotate(180deg);
  color: var(--cyan);
}

.vlab-menu-pill {
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
}

.vlab-menu-pill.chem {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

/* Dropdown Panel - Identtinen Scientific Data Analysisin mallin kanssa */
.vlab-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  width: 320px;
  max-width: 92vw;
  max-height: min(78vh, 520px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.18);
  backdrop-filter: blur(16px);
  padding: 0.35rem 0;
  animation: vlabMenuFadeIn 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
}

.vlab-dropdown-panel.right-aligned {
  left: auto;
  right: 0;
}

.vlab-dropdown-wide {
  width: 360px;
}

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

/* Category Section Header */
.vlab-menu-section-header {
  padding: 0.45rem 0.85rem 0.25rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  background: rgba(10, 16, 32, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vlab-menu-section-header:first-child {
  margin-top: 0;
  border-top: none;
}

/* Menu Item */
.vlab-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #e2e8f0;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  gap: 0.6rem;
}

.vlab-menu-item:hover {
  background: rgba(0, 240, 255, 0.09);
  color: #fff;
  border-left-color: var(--cyan);
}

.vlab-menu-item.active {
  background: rgba(0, 240, 255, 0.16);
  color: #fff;
  border-left-color: var(--cyan);
  font-weight: 700;
}

.vlab-menu-item .item-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.vlab-menu-item .item-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.vlab-menu-item .item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vlab-menu-item .item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vlab-menu-item .item-desc {
  font-size: 0.68rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vlab-menu-item:hover .item-desc {
  color: #94a3b8;
}

.vlab-menu-item.active .item-desc {
  color: var(--cyan);
}

.vlab-menu-item .item-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.vlab-menu-item .item-check {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--cyan);
  min-width: 14px;
  text-align: center;
}

/* Search Box inside "Kaikki työt" dropdown */
.vlab-menu-search-box {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 16, 32, 0.4);
}

.vlab-menu-search-input {
  width: 100%;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  color: #fff;
  font-size: 0.78rem;
  outline: none;
  transition: all 0.2s ease;
}

.vlab-menu-search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.vlab-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.35rem 0;
}

/* Stepper Pill on the right */
.vlab-nav-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-vlab-step-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 0.38rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-vlab-step-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: var(--cyan);
}

.vlab-active-exp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.vlab-active-exp-pill:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.vlab-active-exp-pill .active-icon {
  font-size: 1.05rem;
}

.vlab-active-exp-pill .active-title {
  color: #fff;
}

.vlab-active-exp-pill .active-module {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  background: var(--cyan);
  color: #0b1120;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.vlab-active-exp-pill .active-module.chem {
  background: #34d399;
}

/* Category Filter Bar */
.vlab-category-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.btn-vlab-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-vlab-cat:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-vlab-cat.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(16, 185, 129, 0.25));
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

.vlab-cat-pill {
  background: rgba(0, 240, 255, 0.15);
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
}

.btn-vlab-cat.active .vlab-cat-pill {
  background: var(--cyan);
  color: #0b1120;
  font-weight: 800;
}

/* Experiment Selection Tabs */
.vlab-tabs-bar {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
  max-width: 100%;
}

.btn-vlab-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.btn-vlab-tab:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.btn-vlab-tab.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(14, 116, 144, 0.3));
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
}

.btn-vlab-tab .tab-icon {
  font-size: 1.15rem;
}

.vlab-module-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.25);
  margin-left: 0.15rem;
}

.vlab-module-tag.chem {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
}

.btn-vlab-tab.active .vlab-module-tag {
  background: var(--cyan);
  color: #0b1120;
  border-color: var(--cyan);
}

.btn-vlab-tab.active .vlab-module-tag.chem {
  background: #34d399;
  color: #0b1120;
  border-color: #34d399;
}

/* 2-Column Main Workspace */
.vlab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vlab-grid.vlab-stacked {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 1180px) {
  .vlab-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.vlab-col-sim,
.vlab-col-data {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Simulation Column */
.vlab-col-sim {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vlab-canvas-card {
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.vlab-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vlab-exp-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.vlab-physics-badge {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.vlab-canvas-wrap {
  position: relative;
  width: 100%;
  height: 380px;
  background: radial-gradient(circle at 50% 30%, #0d1933 0%, #060b17 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vlab-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Canvas HUD Overlay */
.vlab-canvas-hud {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.vlab-hud-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.vlab-hud-pill strong {
  color: var(--cyan);
}

/* Simulation Toolbar */
.vlab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.6rem;
}

.vlab-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-vlab-tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

.btn-vlab-tool.primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.3);
}

.btn-vlab-tool.primary:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
}

.btn-vlab-tool.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan);
  color: #fff;
}

/* Parameter Controls Card */
.vlab-params-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.vlab-params-header {
  font-size: 0.88rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vlab-params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.vlab-control-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vlab-control-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.vlab-control-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 700;
}

.vlab-slider {
  width: 100%;
  accent-color: var(--cyan);
  cursor: pointer;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.vlab-presets-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.vlab-preset-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.btn-vlab-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-vlab-preset:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan);
  color: #fff;
}

/* Data Column (Right) */
.vlab-col-data {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vlab-data-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.vlab-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vlab-data-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.vlab-rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
}

.vlab-rec-indicator.recording {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  animation: pulseRec 1.5s infinite;
}

@keyframes pulseRec {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.vlab-rec-indicator.paused {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

/* Mini Chart Preview & Scalable Scientific Graph */
.vlab-mini-chart-card {
  background: rgba(10, 16, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
  position: relative;
  transition: all 0.2s ease;
}

.vlab-mini-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 0.45rem;
  padding: 0 0.15rem;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vlab-chart-title-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chart-title-icon {
  font-size: 0.95rem;
}

.vlab-chart-main-title {
  font-weight: 800;
  color: #e2e8f0;
  font-size: 0.82rem;
}

.vlab-chart-stats-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.vlab-chart-stats-pill:empty {
  display: none;
}

.vlab-chart-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.vlab-axis-select {
  background: #0b1120;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.vlab-axis-select:hover,
.vlab-axis-select:focus {
  border-color: var(--cyan);
  color: #fff;
}

.axis-arrow {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

.vlab-chart-canvas-wrap {
  position: relative;
  width: 100%;
}

.vlab-chart-canvas {
  width: 100%;
  height: 165px;
  display: block;
  cursor: crosshair;
}

.vlab-chart-hover-hud {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.45);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: #f8fafc;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

/* Sampling Toolbar */
.vlab-sampling-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Header Right Groups & Card Expand Buttons */
.vlab-canvas-header-right,
.vlab-data-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-vlab-card-expand {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 0.22rem 0.48rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1;
}

.btn-vlab-card-expand:hover {
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.btn-vlab-card-expand.is-expanded {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.vlab-sim-points-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #cbd5e1;
  background: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
}

.vlab-sim-points-badge strong {
  color: var(--cyan);
}

/* ========================================================
   Workspace View Switcher (Näkymätilojen pikavalitsin)
   ======================================================== */

.vlab-view-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(6, 11, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 0.2rem;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.btn-vlab-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.68rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-vlab-view:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.btn-vlab-view.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(16, 185, 129, 0.22));
  border-color: rgba(0, 240, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22);
}

.btn-vlab-view .view-icon {
  font-size: 0.88rem;
  line-height: 1;
}

/* ========================================================
   Sticky Mini-Transport Bar (Kuvaaja- ja Data-keskitystiloihin)
   ======================================================== */

.vlab-mini-transport {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.vlab-mini-transport-left,
.vlab-mini-transport-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.vlab-mini-exp-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.vlab-mini-exp-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.vlab-mini-btn-group {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.vlab-mini-hud {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.vlab-mini-hud .vlab-hud-pill {
  padding: 0.22rem 0.5rem;
  font-size: 0.73rem;
  background: rgba(6, 11, 23, 0.85);
}

.vlab-mini-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #e2e8f0;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}

.vlab-mini-points-pill strong {
  color: var(--cyan);
}

/* ========================================================
   5 Workspace View Modes (all | sim | sim_chart | chart | data)
   ======================================================== */

/* 2. SIMULAATIO-TILA (Pelkkä suuri simulaatio + parametrit) */
.vlab-grid.view-mode-sim {
  grid-template-columns: minmax(0, 1fr) !important;
}

.vlab-grid.view-mode-sim .vlab-col-data {
  display: none !important;
}

.vlab-grid.view-mode-sim .vlab-canvas-wrap {
  height: 490px;
}

/* 3. SIMULAATIO + KUVAAJA -TILA (50/50 rinnastus ilman taulukkoa) */
.vlab-grid.view-mode-sim-chart {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

@media (max-width: 1024px) {
  .vlab-grid.view-mode-sim-chart {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.vlab-grid.view-mode-sim-chart .vlab-table-section,
.vlab-grid.view-mode-sim-chart .vlab-instructions-box,
.vlab-grid.view-mode-sim-chart .vlab-secondary-exports {
  display: none !important;
}

.vlab-grid.view-mode-sim-chart .vlab-chart-canvas {
  height: 360px !important;
}

/* 4. KUVAAJA-TILA (Koko leveyden suuri reaaliaikainen analyysikuvaaja) */
.vlab-grid.view-mode-chart {
  grid-template-columns: minmax(0, 1fr) !important;
}

.vlab-grid.view-mode-chart .vlab-canvas-card {
  display: none !important;
}

.vlab-grid.view-mode-chart:not(.show-focus-params) .vlab-col-sim {
  display: none !important;
}

.vlab-grid.view-mode-chart .vlab-table-section,
.vlab-grid.view-mode-chart .vlab-data-header,
.vlab-grid.view-mode-chart .vlab-instructions-box {
  display: none !important;
}

.vlab-grid.view-mode-chart .vlab-mini-chart-card {
  padding: 0.9rem 1rem;
  border-color: rgba(0, 240, 255, 0.3);
  background: rgba(10, 16, 32, 0.92);
}

.vlab-grid.view-mode-chart .vlab-chart-canvas {
  height: 460px !important;
}

.vlab-grid.view-mode-chart .vlab-export-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  align-items: center;
}

/* 5. DATA-TILA (Koko leveyden mittauspöytäkirja & vienti) */
.vlab-grid.view-mode-data {
  grid-template-columns: minmax(0, 1fr) !important;
}

.vlab-grid.view-mode-data .vlab-canvas-card {
  display: none !important;
}

.vlab-grid.view-mode-data:not(.show-focus-params) .vlab-col-sim {
  display: none !important;
}

.vlab-grid.view-mode-data .vlab-mini-chart-card {
  display: none !important;
}

.vlab-grid.view-mode-data .vlab-table-container {
  max-height: 460px !important;
}

.vlab-grid.view-mode-data .vlab-export-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
  align-items: center;
}

/* Taulukon rivinumerot ja rivin poistonappi */
.vlab-table th.col-idx,
.vlab-table td.col-idx {
  text-align: center;
  color: #64748b;
  width: 44px;
  font-size: 0.7rem;
}

.vlab-table th.col-act,
.vlab-table td.col-act {
  text-align: center;
  width: 36px;
  padding: 0.2rem 0.35rem;
}

.btn-vlab-del-row {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-vlab-del-row:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Scrollable Data Table */
.vlab-table-container {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(10, 16, 32, 0.6);
  margin-bottom: 1rem;
}

.vlab-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  text-align: right;
}

.vlab-table th {
  position: sticky;
  top: 0;
  background: #0f172a;
  color: var(--cyan);
  padding: 0.45rem 0.65rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.vlab-table td {
  padding: 0.35rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  white-space: nowrap;
}

.vlab-table tr:hover td {
  background: rgba(0, 240, 255, 0.05);
}

.vlab-table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 0.82rem;
  font-style: italic;
}

/* Export Actions Bar */
.vlab-export-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-export-flab {
  width: 100%;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: 1px solid #38bdf8;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.btn-export-flab:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 6px 26px rgba(14, 165, 233, 0.55);
  transform: translateY(-1px);
}

.vlab-secondary-exports {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-vlab-sec-export {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-vlab-sec-export:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.vlab-instructions-box {
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #93c5fd;
  margin-top: 0.5rem;
}

.vlab-instructions-box strong {
  color: #fff;
}

/* Nav Header Pill Button */
.btn-vlab-nav-pill {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(14, 116, 144, 0.25)) !important;
  border: 1px solid rgba(0, 240, 255, 0.4) !important;
  color: #a5f3fc !important;
  font-weight: 700;
}

.btn-vlab-nav-pill:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(14, 116, 144, 0.4)) !important;
  color: #fff !important;
  border-color: var(--cyan) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

/* ========================================================
   VAALEA TEEMA (LIGHT THEME - HUB & VIRTUAALILABORATORIO)
   ======================================================== */

body.light-theme .btn-vlab-nav-pill {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd) !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

body.light-theme .btn-vlab-nav-pill:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Hub Screen Light Theme */
body.light-theme .hub-hero-badge {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

body.light-theme .hub-title {
  color: #0f172a;
}

body.light-theme .hub-title .text-cyan {
  color: #0284c7;
  text-shadow: none;
}

body.light-theme .hub-title .text-purple {
  color: #7c3aed;
  text-shadow: none;
}

body.light-theme .hub-subtitle {
  color: #475569;
}

body.light-theme .hub-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body.light-theme .hub-card:hover {
  border-color: #0284c7;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 0 20px rgba(2, 132, 199, 0.12);
}

body.light-theme .hub-card-vlab:hover {
  border-color: #059669;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 0 20px rgba(5, 150, 105, 0.14);
}

body.light-theme .quiz-badge {
  background: #f3e8ff;
  border-color: #c084fc;
  color: #6b21a8;
}

body.light-theme .vlab-badge {
  background: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}

body.light-theme .hub-card-title {
  color: #0f172a;
}

body.light-theme .hub-card-desc {
  color: #334155;
}

body.light-theme .hub-features-list {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .hub-features-list li {
  color: #475569;
}

body.light-theme .hub-features-list li strong {
  color: #0f172a;
}

body.light-theme .hub-footer-highlights {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

body.light-theme .hub-highlight-sep {
  color: #cbd5e1;
}

body.light-theme .btn-back-to-hub {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-back-to-hub:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Virtual Lab Header & Menubar (Scientific Data Analysis Light Style) */
body.light-theme .vlab-header {
  background: rgba(255, 255, 255, 0.96);
  border-color: #cbd5e1;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

body.light-theme .vlab-header-badge {
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
  border-color: #0284c7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.15);
}

body.light-theme .vlab-title {
  color: #0f172a;
}

body.light-theme .vlab-title span {
  color: #0284c7;
}

body.light-theme .btn-vlab-back,
body.light-theme .btn-vlab-layout-toggle {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-theme .btn-vlab-back:hover,
body.light-theme .btn-vlab-layout-toggle:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .btn-vlab-app-link {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #10b981;
  color: #065f46;
}

body.light-theme .btn-vlab-app-link:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

body.light-theme .vlab-menubar {
  background: rgba(255, 255, 255, 0.96);
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

body.light-theme .vlab-menu-btn {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-theme .vlab-menu-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

body.light-theme .vlab-menu-btn.open {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.15);
}

body.light-theme .vlab-menu-pill {
  background: #e0f2fe;
  color: #0369a1;
}

body.light-theme .vlab-menu-pill.chem {
  background: #d1fae5;
  color: #065f46;
}

body.light-theme .vlab-dropdown-panel {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(2, 132, 199, 0.1);
}

body.light-theme .vlab-menu-section-header {
  background: #f1f5f9;
  color: #475569;
  border-top-color: #e2e8f0;
}

body.light-theme .vlab-menu-item {
  color: #1e293b;
}

body.light-theme .vlab-menu-item .item-title {
  color: #0f172a;
}

body.light-theme .vlab-menu-item .item-desc {
  color: #64748b;
}

body.light-theme .vlab-menu-item:hover {
  background: #f0f9ff;
  color: #0369a1;
  border-left-color: #0284c7;
}

body.light-theme .vlab-menu-item:hover .item-title {
  color: #0369a1;
}

body.light-theme .vlab-menu-item.active {
  background: #e0f2fe;
  color: #0369a1;
  border-left-color: #0284c7;
}

body.light-theme .vlab-menu-item.active .item-title {
  color: #0369a1;
}

body.light-theme .vlab-menu-item.active .item-desc {
  color: #0284c7;
}

body.light-theme #menu-act-sda,
body.light-theme #menu-act-sda .item-title {
  color: #059669 !important;
}

body.light-theme .vlab-menu-search-box {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body.light-theme .vlab-menu-search-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .vlab-menu-divider {
  background: #e2e8f0;
}

body.light-theme .btn-vlab-step-nav {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-vlab-step-nav:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .vlab-active-exp-pill {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0f172a;
}

body.light-theme .vlab-active-exp-pill:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

body.light-theme .vlab-active-exp-pill .active-title {
  color: #0f172a;
}

body.light-theme .vlab-active-exp-pill .active-module {
  background: #0284c7;
  color: #ffffff;
}

body.light-theme .vlab-active-exp-pill .active-module.chem {
  background: #059669;
  color: #ffffff;
}

/* Workspace View Switcher & Sticky Mini-Transport in Light Theme */
body.light-theme .vlab-view-switcher {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-theme .btn-vlab-view {
  color: #475569;
}

body.light-theme .btn-vlab-view:hover {
  color: #0f172a;
  background: #e2e8f0;
}

body.light-theme .btn-vlab-view.active {
  background: #ffffff;
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 1px 5px rgba(2, 132, 199, 0.18);
}

body.light-theme .vlab-mini-transport {
  background: rgba(255, 255, 255, 0.96);
  border-color: #7dd3fc;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

body.light-theme .vlab-mini-exp-info {
  border-right-color: #e2e8f0;
}

body.light-theme .vlab-mini-exp-title {
  color: #0f172a;
}

body.light-theme .vlab-mini-hud .vlab-hud-pill {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .vlab-mini-points-pill {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0f172a;
}

/* Simulation Canvas Card, Toolbar & Params in Light Theme */
body.light-theme .vlab-canvas-card,
body.light-theme .vlab-params-card,
body.light-theme .vlab-data-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
}

body.light-theme .vlab-canvas-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body.light-theme .vlab-exp-title,
body.light-theme .vlab-data-title {
  color: #0f172a;
}

body.light-theme .vlab-physics-badge {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

body.light-theme .vlab-canvas-wrap {
  background: radial-gradient(circle at 50% 30%, #f8fafc 0%, #e2e8f0 100%);
}

body.light-theme .vlab-hud-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

body.light-theme .vlab-hud-pill strong {
  color: #0284c7;
}

body.light-theme .vlab-toolbar {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.light-theme .btn-vlab-tool {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-theme .btn-vlab-tool:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

body.light-theme .btn-vlab-tool.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .btn-vlab-tool.primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #0284c7;
  color: #ffffff;
}

body.light-theme .vlab-sim-points-badge {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .vlab-toolbar-label {
  color: #475569 !important;
}

body.light-theme .vlab-toolbar-select,
body.light-theme .vlab-select {
  background: #ffffff !important;
  color: #0369a1 !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .vlab-params-header {
  color: #475569;
}

body.light-theme .vlab-control-label {
  color: #1e293b;
}

body.light-theme .vlab-control-val {
  color: #0284c7;
}

body.light-theme .vlab-slider {
  background: #e2e8f0;
}

body.light-theme .btn-vlab-preset {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-vlab-preset:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

/* Real-time Graph Card, Data Table & Exports in Light Theme */
body.light-theme .vlab-rec-indicator.recording {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

body.light-theme .vlab-rec-indicator.paused {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #b45309;
}

body.light-theme .btn-vlab-card-expand {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-vlab-card-expand:hover,
body.light-theme .btn-vlab-card-expand.is-expanded {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .vlab-mini-chart-card,
body.light-theme .vlab-grid.view-mode-chart .vlab-mini-chart-card {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.light-theme .vlab-chart-main-title {
  color: #0f172a;
}

body.light-theme .vlab-chart-stats-pill {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

body.light-theme .vlab-axis-select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-theme .vlab-axis-select:hover,
body.light-theme .vlab-axis-select:focus {
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .vlab-chart-hover-hud {
  background: rgba(255, 255, 255, 0.96);
  border-color: #0284c7;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

body.light-theme .vlab-table-container {
  background: #ffffff;
  border-color: #cbd5e1;
}

body.light-theme .vlab-table th {
  background: #f1f5f9;
  color: #0369a1;
  border-bottom-color: #cbd5e1;
}

body.light-theme .vlab-table td {
  color: #1e293b;
  border-bottom-color: #f1f5f9;
}

body.light-theme .vlab-table tr:hover td {
  background: #f0f9ff;
}

body.light-theme .btn-vlab-del-row:hover {
  background: #fee2e2;
  color: #dc2626;
}

body.light-theme .btn-export-flab-secondary {
  background: #f0f9ff !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
}

body.light-theme .btn-export-flab-secondary:hover {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #075985 !important;
}

body.light-theme .btn-vlab-sec-export {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.light-theme .btn-vlab-sec-export:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

body.light-theme .vlab-instructions-box {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

body.light-theme .vlab-instructions-box strong {
  color: #0f172a;
}

