/* Event Hedge Lab — dark product surface, same family as event-edge.css */

.lab-shell {
  min-height: 100vh;
  background: #0b0f14;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  padding-top: 64px;
}

.lab-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40vh;
  color: #8b949e;
  font-size: 14px;
  text-align: center;
}

.lab-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #30363d;
  border-top-color: #ea580c;
  border-radius: 50%;
  animation: lab-spin 0.9s linear infinite;
}

@keyframes lab-spin { to { transform: rotate(360deg); } }

.lab-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 64px;
}

/* Rail */
.lab-rail {
  background: #0f141b;
  border: 1px solid #1c232b;
  border-radius: 12px;
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 84px;
}

.lab-product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.lab-product-name i {
  font-size: 22px;
  color: #ea580c;
}

.lab-product-name strong {
  display: block;
  font-size: 15px;
}

.lab-product-name span {
  display: block;
  font-size: 11px;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rail-label {
  font-size: 11px;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: #0b0f14;
  border: 1px solid #1c232b;
  border-radius: 10px;
  padding: 10px 12px;
  color: #e6edf3;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.event-row:hover { border-color: #30363d; }

.event-row.active { border-color: #ea580c; background: #150f0a; }

.event-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.event-row-top .odds { color: #3fb950; font-weight: 700; }

.event-row-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #8b949e;
}

.rail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: #ea580c;
  text-decoration: none;
}

.rail-link:hover { text-decoration: underline; }

/* Workspace */
.lab-workspace { min-width: 0; }

.lab-head h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #8b949e;
}

.meta-line .accent { color: #3fb950; }

.live-tag { color: #3fb950; font-weight: 600; }

.model-tag { color: #8b949e; }

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.control {
  background: #0f141b;
  border: 1px solid #1c232b;
  border-radius: 12px;
  padding: 12px 14px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.control-label strong { color: #e6edf3; }

.outcome-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.outcome-button {
  background: #0b0f14;
  border: 1px solid #1c232b;
  border-radius: 10px;
  padding: 10px;
  color: #e6edf3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.outcome-button:hover { border-color: #30363d; }

.outcome-button.active { border-color: #ea580c; background: #150f0a; }

.outcome-button strong { display: block; font-size: 13px; margin-bottom: 2px; }

.outcome-button span { font-size: 11px; color: #8b949e; }

.control input[type='range'] { width: 100%; accent-color: #ea580c; }

.notional-input {
  width: 100%;
  background: #0b0f14;
  border: 1px solid #1c232b;
  border-radius: 8px;
  color: #e6edf3;
  font-size: 14px;
  padding: 8px 10px;
}

.control small { display: block; margin-top: 6px; font-size: 11px; color: #6e7681; }

/* Sections */
.section {
  background: #0f141b;
  border: 1px solid #1c232b;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

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

.section-head h2 { font-size: 15px; margin: 0; }

.section-head small { font-size: 12px; color: #8b949e; }

.legs-table,
.payoff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.legs-table th,
.payoff-table th {
  text-align: left;
  font-size: 11px;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-bottom: 1px solid #1c232b;
}

.legs-table td,
.payoff-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #161b22;
}

.legs-table tr:last-child td,
.payoff-table tr:last-child td { border-bottom: none; }

.positive { color: #3fb950; }

.negative { color: #f85149; }

.empty-note { font-size: 13px; color: #8b949e; margin: 4px 0; }

.assumption-note {
  font-size: 11px;
  color: #6e7681;
  margin: 10px 0 0;
  line-height: 1.5;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat {
  background: #0b0f14;
  border: 1px solid #1c232b;
  border-radius: 10px;
  padding: 10px 12px;
}

.stat span { display: block; font-size: 11px; color: #8b949e; margin-bottom: 4px; }

.stat strong { font-size: 15px; }

.trim-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.trim-item {
  background: #0b0f14;
  border: 1px solid #1c232b;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.trim-item strong { font-size: 14px; }

.trim-item span:last-child { color: #6e7681; font-size: 11px; }

/* Actions */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.lab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f141b;
  border: 1px solid #30363d;
  border-radius: 10px;
  color: #e6edf3;
  font-size: 13px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lab-button:hover:not(:disabled) { border-color: #ea580c; }

.lab-button.primary { background: #ea580c; border-color: #ea580c; color: #fff; font-weight: 600; }

.lab-button.primary:hover:not(:disabled) { background: #c2410c; }

.lab-button:disabled { opacity: 0.45; cursor: not-allowed; }

/* Toast */
.lab-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  color: #e6edf3;
  font-size: 13px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.lab-toast.show { opacity: 1; transform: translate(-50%, 0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* Responsive */
@media (max-width: 820px) {
  .lab-layout {
    grid-template-columns: 1fr;
    padding: 14px 14px 48px;
  }

  .lab-rail { position: static; }

  .control-grid { grid-template-columns: 1fr; }

  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .lab-head h1 { font-size: 18px; }

  .legs-table th:nth-child(2),
  .legs-table td:nth-child(2) { display: none; }

  .stat-strip { grid-template-columns: 1fr; }

  .action-row .lab-button { flex: 1 1 100%; justify-content: center; }
}
