/* TE-SIM 3.0 Styles (scoped) */
.te-sim-wrap * {
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}
.te-sim-wrap {
  background: #1e2b3c;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 20px;
  width: 100%;
}
.te-sim-container {
  max-width: 1600px;
  width: 100%;
  background: #0f1a2f;
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.te-sim-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}
.te-sim-title{
  color:#8db4c2;
  font-size:1.8rem;
  font-weight:600;
}
.te-lab-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.te-lab-btn {
  background: #1e3b4a;
  border: none;
  color: #b0d0e0;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  border-bottom: 4px solid #0f1a2f;
  transition: 0.06s;
}
.te-lab-btn.active {
  background: #3c6e71;
  color: white;
  border-bottom: 4px solid #284b4d;
}
.te-main-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.te-canvas-area {
  flex: 2;
  min-width: 700px;
  background: #1b2a41;
  border-radius: 20px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px #3e5a7a;
}
.te-control-panel {
  flex: 1;
  min-width: 300px;
  background: #0f1a2f;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid #3c6e71;
}
.te-sim-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #1e3b4a;
  border-radius: 12px;
  border: 2px solid #2e5e6e;
  box-shadow: 0 8px 0 #0e1a24;
}
.te-stats-grid {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: #b0e0e6;
  font-weight: 500;
  flex-wrap: wrap;
}
.te-metric-card {
  background: #0e1a26;
  padding: 12px 18px;
  border-radius: 40px;
  border-left: 6px solid #4c9fbf;
  box-shadow: 0 2px 0 #0a121c;
  margin: 4px;
}
.te-control-panel h2 {
  color: #c1d9f0;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px dashed #3c6e71;
  padding-bottom: 10px;
}
.te-slider-label {
  display: flex;
  justify-content: space-between;
  color: #bbd1ea;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.te-sim-wrap input[type=range] {
  width: 100%;
  accent-color: #4c9fbf;
  height: 8px;
  background: #1e3b4a;
  border-radius: 10px;
}
.te-sim-wrap button {
  background: #3c6e71;
  border: none;
  color: white;
  padding: 14px 24px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 24px;
  width: 100%;
  cursor: pointer;
  border-bottom: 6px solid #284b4d;
  transition: 0.06s;
}
.te-sim-wrap button:active {
  border-bottom-width: 2px;
  transform: translateY(4px);
  background: #4c9fbf;
}
.te-sim-wrap button.small-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  margin-top: 8px;
  background: #1e4057;
}
.te-diagram-box {
  margin-top: 24px;
  background: #0e1a26;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #3a5a6c;
}
.te-eqn {
  font-family: 'Courier New', monospace;
  background: #111e2b;
  padding: 8px 14px;
  border-radius: 40px;
  color: #aad8e6;
  text-align: center;
  border: 1px solid #3c6e71;
  margin: 20px 0 0 0;
  font-size: 1.1rem;
}
.te-badge {
  background: #1e4057;
  color: #e0f2fe;
  border-radius: 60px;
  padding: 6px 18px;
  font-size: 0.9rem;
}
.te-export-btn {
  background: #2e5c4b !important;
  border-bottom-color: #1d3a2f !important;
  margin-top: 12px !important;
}
.te-data-preview {
  background: #0b141e;
  border-radius: 12px;
  padding: 10px;
  margin-top: 16px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #b0d0d0;
  max-height: 100px;
  overflow-y: auto;
}

/* Mobile tweaks */
@media (max-width: 900px){
  .te-canvas-area{ min-width: 100%; }
  .te-control-panel{ min-width: 100%; }
}
