/* OBBCO Probe Wizard v0.7 - dark control-panel layout */
body .obbco-probe-wrap {
  max-width: 940px !important;
  margin: 24px auto !important;
  padding: 22px !important;
  border: 1px solid #334155 !important;
  border-radius: 18px !important;
  background: #0f172a !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42) !important;
  font-family: inherit !important;
  color: #e5e7eb !important;
}

body .obbco-probe-wrap * {
  box-sizing: border-box;
}

body .obbco-probe-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

body .obbco-probe-header h2,
body .obbco-output-title h3 {
  margin: 0;
  color: #f8fafc !important;
}

body .obbco-probe-header p {
  margin: 6px 0 0;
  color: #cbd5e1 !important;
}

body .obbco-probe-badge {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #2563eb !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
}

body .obbco-step-card,
body .obbco-output-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #111827 !important;
  border: 1px solid #334155 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  color: #e5e7eb !important;
}

body .obbco-section-title {
  color: #93c5fd !important;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

body .obbco-operation-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body .obbco-op-btn {
  min-height: 112px;
  border-radius: 16px;
  border: 1px solid #475569 !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  cursor: pointer;
  padding: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

body .obbco-op-btn:hover {
  transform: translateY(-1px);
  border-color: #94a3b8 !important;
}

body .obbco-op-btn.active {
  border-width: 2px !important;
  transform: translateY(-1px);
}

body .obbco-op-btn.z.active {
  background: linear-gradient(145deg, #312e81, #1e1b4b) !important;
  border-color: #a78bfa !important;
}

body .obbco-op-btn.web.active {
  background: linear-gradient(145deg, #7c2d12, #431407) !important;
  border-color: #fb923c !important;
}

body .obbco-op-btn.pocket.active {
  background: linear-gradient(145deg, #1d4ed8, #172554) !important;
  border-color: #60a5fa !important;
}

body .obbco-op-btn.bore.active {
  background: linear-gradient(145deg, #166534, #052e16) !important;
  border-color: #4ade80 !important;
}

body .obbco-op-name {
  display: block;
  font-size: 17px;
  font-weight: 950;
  color: #fff !important;
}

body .obbco-op-code {
  display: block;
  margin-top: 4px;
  color: #dbeafe !important;
  font-size: 13px;
  font-weight: 800;
}

body .obbco-op-diagram {
  display: block;
  margin-top: 10px;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  color: #f8fafc !important;
  font-size: 24px;
  line-height: 1;
}

body .obbco-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

body .obbco-field label,
body .obbco-probe-wrap label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 900;
  color: #e2e8f0 !important;
}

body .obbco-input,
body .obbco-output,
body .obbco-probe-wrap input,
body .obbco-probe-wrap select,
body .obbco-probe-wrap textarea {
  width: 100%;
  border: 1px solid #475569 !important;
  border-radius: 12px !important;
  padding: 11px 12px !important;
  background: #1e293b !important;
  color: #f8fafc !important;
  font-size: 15px !important;
}

body .obbco-input:focus,
body .obbco-output:focus,
body .obbco-probe-wrap input:focus,
body .obbco-probe-wrap select:focus,
body .obbco-probe-wrap textarea:focus {
  outline: 2px solid #38bdf8 !important;
  border-color: #38bdf8 !important;
}

body .obbco-input::placeholder,
body .obbco-output::placeholder {
  color: #94a3b8 !important;
}

body .obbco-help,
body .obbco-small-note {
  margin-top: 10px;
  color: #cbd5e1 !important;
  font-size: 13px;
  line-height: 1.4;
}

body .obbco-static-code {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #334155 !important;
  border-radius: 12px;
  background: #020617 !important;
  color: #22c55e !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

body .obbco-output-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

body #obbco-status,
body #obbco-mcode-status {
  color: #93c5fd !important;
  font-size: 13px;
  font-weight: 900;
}

body .obbco-output {
  min-height: 86px;
  font-family: Consolas, Monaco, 'Courier New', monospace !important;
  line-height: 1.45;
  resize: vertical;
  background: #020617 !important;
  color: #22c55e !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  border-color: #1e40af !important;
  text-align: center;
}

body .obbco-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

body .obbco-btn {
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 900 !important;
  cursor: pointer;
}

body .obbco-btn:hover {
  background: #1d4ed8 !important;
}

body .obbco-btn.secondary {
  background: #0891b2 !important;
  border-color: rgba(103, 232, 249, 0.35) !important;
}

body .obbco-btn.secondary:hover {
  background: #0e7490 !important;
}

body .obbco-btn.ghost {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body .obbco-btn.ghost:hover {
  background: #475569 !important;
}

body .obbco-program-preview {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid #334155 !important;
  background: #0b1120 !important;
  color: #e5e7eb !important;
  padding: 10px 12px;
}

body .obbco-program-preview summary,
body .obbco-mcode-summary {
  cursor: pointer;
  font-weight: 900;
  color: #f8fafc !important;
}

body .obbco-program-preview pre {
  margin: 10px 0 0;
  color: #22c55e !important;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  white-space: pre-wrap;
}

body .obbco-mcode-card {
  overflow: hidden;
}

body .obbco-mcode-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

body .obbco-mcode-summary::-webkit-details-marker {
  display: none;
}

body .obbco-mcode-summary::before {
  content: '▶';
  margin-right: 8px;
  color: #93c5fd;
}

body .obbco-mcode-card[open] .obbco-mcode-summary::before {
  content: '▼';
}

body .obbco-mcode-list {
  min-height: 180px;
  font-size: 14px !important;
  text-align: left;
  color: #e5e7eb !important;
}

body .obbco-actions.compact {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  body .obbco-probe-header,
  body .obbco-output-title {
    display: grid;
    grid-template-columns: 1fr;
  }

  body .obbco-operation-buttons,
  body .obbco-form-grid {
    grid-template-columns: 1fr;
  }

  body .obbco-probe-badge {
    white-space: normal;
    width: max-content;
  }

  body .obbco-output {
    font-size: 18px !important;
    text-align: left;
  }
}

/* v0.8 machine selector and tabs */
body .obbco-machine-card {
  margin-bottom: 14px;
}

body .obbco-machine-select {
  max-width: 520px;
}

body .obbco-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

body .obbco-tab {
  border: 1px solid #475569 !important;
  border-radius: 14px !important;
  padding: 13px 16px !important;
  background: #1e293b !important;
  color: #e5e7eb !important;
  font-weight: 950 !important;
  cursor: pointer;
}

body .obbco-tab.active {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #93c5fd !important;
}

body .obbco-tab-panel {
  display: none;
}

body .obbco-tab-panel.active {
  display: block;
}

body .obbco-tool-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body .obbco-op-btn.tool-center.active {
  background: linear-gradient(145deg, #065f46, #022c22) !important;
  border-color: #34d399 !important;
}

body .obbco-op-btn.tool-offcenter.active {
  background: linear-gradient(145deg, #7c2d12, #431407) !important;
  border-color: #fb923c !important;
}

@media (max-width: 760px) {
  body .obbco-tabs,
  body .obbco-tool-buttons {
    grid-template-columns: 1fr;
  }
}
