.recipe-tab-panel {
  display: none;
}

.recipe-tab-panel.is-active {
  display: block;
}

.recipe-workspace {
  padding-top: 16px;
}

.recipe-list-panel {
  border: 1px solid rgba(221, 226, 238, 0.92);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.recipe-main-layout,
.recipe-trace-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
}

.recipe-station-panel,
.recipe-trace-tree,
.recipe-detail-panel,
.recipe-trace-content {
  border: 1px solid rgba(221, 226, 238, 0.92);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.recipe-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f7;
  background: #f7f9ff;
}

.recipe-panel-head h1,
.recipe-detail-head h2,
.recipe-record-toolbar h2 {
  margin: 0;
  color: #34405c;
  font-size: 16px;
  font-weight: 700;
}

.recipe-count,
.recipe-record-toolbar p,
.recipe-detail-head p {
  margin: 4px 0 0;
  color: var(--color-text-subtle);
  font-size: 13px;
}

.recipe-station-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: calc(100vh - 258px);
  overflow: auto;
}

.recipe-station-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.recipe-station-item:hover,
.recipe-station-item.is-active {
  border-color: rgba(85, 118, 255, 0.45);
  background: #f4f7ff;
}

.recipe-station-item__name {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.recipe-station-item__meta {
  color: var(--color-text-subtle);
  font-size: 12px;
}

.recipe-detail-head,
.recipe-record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f7;
  background: #fff;
}

.recipe-detail-actions,
.recipe-section__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recipe-toolbar-search {
  min-width: 220px;
}

.recipe-toolbar-search input {
  width: 100%;
}

.recipe-record-toolbar--main {
  background: #fff;
}

.recipe-managed-table-shell {
  max-height: calc(100vh - 230px);
}

.recipe-managed-station-table thead th:nth-child(1),
.recipe-managed-station-table thead th:nth-child(2) {
  min-width: 120px;
}

.recipe-managed-station-table thead th:nth-child(4),
.recipe-managed-station-table thead th:nth-child(5) {
  min-width: 168px;
}

.recipe-managed-station-table thead th:nth-child(6) {
  min-width: 360px;
}

.recipe-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-section {
  border: 1px solid rgba(221, 226, 238, 0.92);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.recipe-section--wide {
  margin: 14px;
}

.recipe-section--inline {
  margin: 14px 14px 0;
}

.recipe-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f7;
  background: #f7f9ff;
}

.recipe-section__head h3,
.recipe-confirm-grid h4 {
  margin: 0;
  color: #394564;
  font-size: 14px;
  font-weight: 700;
}

.recipe-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 5px;
  border-radius: 50%;
  background: #e8edff;
  color: var(--color-primary-ink);
  font-size: 11px;
  cursor: default;
}

.recipe-help__bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  display: none;
  width: 260px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #2f3850;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  transform: translateX(-50%);
  box-shadow: 0 12px 24px rgba(47, 56, 80, 0.24);
  z-index: 5;
}

.recipe-help:hover .recipe-help__bubble,
.recipe-help:focus .recipe-help__bubble {
  display: block;
}

.recipe-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.recipe-signal-field {
  min-height: 74px;
  padding: 10px;
  border: 1px solid #e4e8f1;
  border-radius: 8px;
  background: #fbfcff;
}

.recipe-signal-field__label {
  color: var(--color-text-subtle);
  font-size: 12px;
}

.recipe-signal-field__value {
  margin-top: 8px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}

.recipe-table-shell {
  border: 0;
  border-radius: 0;
  max-height: 430px;
}

.recipe-table-shell--pool {
  max-height: 190px;
}

.recipe-record-table-shell {
  border: 0;
  border-radius: 0;
  max-height: calc(100vh - 230px);
}

.recipe-param-table thead th:nth-child(1),
.recipe-param-table thead th:nth-child(2) {
  min-width: 150px;
}

.recipe-param-table thead th:nth-child(4),
.recipe-param-table thead th:nth-child(5) {
  min-width: 210px;
}

.recipe-param-table thead th:nth-child(3),
.recipe-param-table thead th:nth-child(6) {
  min-width: 110px;
}

.recipe-pool-table thead th:nth-child(1) {
  min-width: 140px;
}

.recipe-pool-table thead th:nth-child(2) {
  min-width: 280px;
}

.recipe-pool-table thead th:nth-child(3),
.recipe-pool-table thead th:nth-child(4),
.recipe-pool-table thead th:nth-child(5) {
  min-width: 100px;
}

.recipe-form {
  display: grid;
  gap: 14px;
}

.recipe-form-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.recipe-form-row span {
  color: #586179;
  font-size: 14px;
}

.recipe-form-row b {
  color: var(--color-danger);
  font-weight: 700;
}

.recipe-form-row input,
.recipe-form-row select {
  min-height: 38px;
}

.recipe-form-row input:disabled {
  background: #f4f6fa;
  color: #8d98ad;
  cursor: not-allowed;
}

.recipe-station-picker,
.recipe-variable-picker {
  width: 100%;
}

.recipe-station-picker .readonly-chip-input,
.recipe-variable-picker .readonly-chip-input {
  min-height: 38px;
}

.recipe-station-picker .readonly-chip-input.is-placeholder,
.recipe-variable-picker .readonly-chip-input.is-placeholder {
  color: var(--color-text-subtle);
}

.recipe-selector-table thead th:nth-child(1),
.recipe-selector-table thead th:nth-child(2) {
  min-width: 150px;
}

.recipe-empty-cell {
  padding: 28px 12px;
  color: var(--color-text-subtle);
  text-align: center;
}

.recipe-param-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e4e8f1;
  border-radius: 8px;
  background: #fbfcff;
}

.recipe-param-config-head p {
  margin: 0;
  color: var(--color-text-subtle);
  font-size: 13px;
}

.recipe-field-label {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text-subtle);
  font-size: 12px;
}

.recipe-param-config-head strong {
  color: #34405c;
  font-size: 15px;
}

.recipe-param-variable-table-shell {
  max-height: 470px;
}

.recipe-param-config-table thead th:nth-child(1) {
  min-width: 110px;
}

.recipe-param-config-table thead th:nth-child(2) {
  min-width: 220px;
}

.recipe-param-config-table thead th:nth-child(3),
.recipe-param-config-table thead th:nth-child(6) {
  min-width: 80px;
}

.recipe-param-config-table thead th:nth-child(4),
.recipe-param-config-table thead th:nth-child(5) {
  min-width: 210px;
}

.recipe-param-config-table b {
  color: var(--color-danger);
}

.recipe-table-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d7deec;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--color-text);
  background: #fff;
  font-size: 13px;
}

.recipe-table-input:disabled {
  background: #f4f6fa;
  color: #9aa5ba;
}

.recipe-inline-variable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.recipe-inline-variable span {
  color: var(--color-text);
  word-break: break-all;
}

.recipe-inline-variable span.is-placeholder {
  color: var(--color-text-subtle);
}

.recipe-add-param-table thead th:nth-child(1) {
  min-width: 70px;
}

.recipe-add-param-table thead th:nth-child(2) {
  min-width: 130px;
}

.recipe-add-param-table thead th:nth-child(3) {
  min-width: 320px;
}

.recipe-add-param-table thead th:nth-child(4) {
  min-width: 90px;
}

.recipe-issue-filter {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(330px, 1.2fr) minmax(240px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.recipe-version-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.recipe-record-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.recipe-version-filter .search-shell,
.recipe-record-filter .search-shell {
  min-width: 226px;
}

.recipe-date-range {
  min-width: 330px;
}

.recipe-station-search {
  margin: 10px 12px 0;
}

.recipe-station-search .search-shell__icon {
  left: 10px;
}

.recipe-station-search input {
  width: 100%;
}

.recipe-date-range__inputs {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) auto minmax(118px, 1fr);
  align-items: center;
  gap: 8px;
}

.recipe-date-range__inputs span {
  color: var(--color-text-subtle);
  font-size: 13px;
}

.recipe-form-row--compact {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
}

.recipe-form-row--compact select,
.recipe-form-row--compact input {
  min-height: 36px;
}

.recipe-import-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #cfd7e8;
  border-radius: 8px;
  background: #fbfcff;
}

.recipe-import-box strong {
  color: #34405c;
  font-size: 15px;
}

.recipe-import-box p,
.recipe-import-box span {
  margin: 0;
  color: var(--color-text-subtle);
  font-size: 13px;
}

.recipe-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.recipe-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #dde5f2;
  border-radius: 6px;
  background: #f8faff;
  color: #586179;
  font-size: 13px;
}

.recipe-meta-label {
  color: var(--color-text-subtle);
  font-weight: 400;
}

.recipe-meta-item strong {
  color: #34405c;
  font-weight: 700;
}

.recipe-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.recipe-status--ok {
  background: rgba(38, 168, 109, 0.12);
  color: var(--color-success);
}

.recipe-status--idle {
  background: #edf1f8;
  color: #60708d;
}

.recipe-status--warn {
  background: rgba(240, 162, 60, 0.14);
  color: #b56d13;
}

.recipe-link {
  color: var(--color-primary);
  text-decoration: underline dotted rgba(85, 118, 255, 0.34);
  text-underline-offset: 4px;
}

.recipe-modal {
  z-index: 90;
}

.recipe-modal--top {
  z-index: 98;
}

#variable-picker-modal {
  z-index: 120;
}

.recipe-modal__panel {
  width: min(760px, calc(100vw - 36px));
  margin-top: 52px;
  border-radius: 12px;
}

.recipe-modal__panel--wide {
  width: min(980px, calc(100vw - 44px));
}

.recipe-modal__panel--xl {
  width: min(1280px, calc(100vw - 44px));
}

.recipe-modal-table {
  border-radius: 8px;
  max-height: 450px;
}

.recipe-modal-table--tall {
  max-height: 520px;
}

.recipe-record-toolbar--compact {
  padding: 0 0 12px;
  border-bottom: 0;
}

.recipe-confirm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.recipe-confirm-card {
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid #e2e7f1;
  border-radius: 8px;
  background: #fbfcff;
}

.recipe-confirm-card__label {
  color: var(--color-text-subtle);
  font-size: 12px;
}

.recipe-confirm-card__value {
  margin-top: 7px;
  color: #34405c;
  font-size: 15px;
  font-weight: 700;
}

.recipe-confirm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.recipe-confirm-grid h4 {
  margin-bottom: 8px;
}

.selection-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #d5dbea;
  border-radius: 4px;
  background: #fff;
  color: #a5afc6;
  font-size: 12px;
}

.selection-mark--selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

@media (max-width: 1180px) {
  .recipe-confirm-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-main-layout,
  .recipe-trace-layout,
  .recipe-confirm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .recipe-signal-grid,
  .recipe-confirm-summary {
    grid-template-columns: 1fr;
  }

  .recipe-detail-head,
  .recipe-record-toolbar,
  .recipe-issue-filter,
  .recipe-version-filter,
  .recipe-record-filter {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .recipe-detail-head,
  .recipe-record-toolbar {
    flex-direction: column;
  }

  .recipe-version-filter {
    justify-content: flex-start;
  }

  .recipe-record-filter {
    justify-content: flex-start;
  }

  .recipe-date-range {
    min-width: 0;
  }

  .recipe-date-range__inputs {
    grid-template-columns: 1fr;
  }
}
