/* Builder shell — 전략편집기(se-page)와 동일한 3열 + 하단 패널 레이아웃 */

.bps-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100vh - var(--tmb-h, 44px));
  min-height: 0;
  background: var(--se-bg);
  color: var(--se-text);
  overflow: hidden;
  position: relative;
}

.bps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--se-header-border);
  background: var(--se-header-bg);
  flex-shrink: 0;
}

.bps-header-left { display: flex; align-items: baseline; gap: 10px; }

.bps-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--se-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bps-subtitle { font-size: 0.72rem; color: var(--se-text-muted); }

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

.bps-btn {
  border: 1px solid var(--se-border);
  background: var(--se-btn-bg);
  color: var(--se-text);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.bps-btn:hover { border-color: color-mix(in srgb, var(--se-accent) 50%, transparent); }
.bps-btn--ghost { background: transparent; }
.bps-btn--gold {
  background: var(--se-btn-gold-bg);
  border-color: var(--se-btn-gold-border);
  color: var(--se-btn-gold-text);
  font-weight: 700;
}
.bps-btn--danger { border-color: color-mix(in srgb, var(--se-danger) 50%, transparent); color: var(--se-danger); }
.bps-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.bps-banner {
  flex-shrink: 0;
  margin: 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
}
.bps-banner--warn {
  background: color-mix(in srgb, #fbbf24 12%, transparent);
  border: 1px solid color-mix(in srgb, #fbbf24 35%, transparent);
  color: #fbbf24;
}

.bps-body {
  flex: 1;
  min-height: 0;
  display: flex;
  min-width: 0;
}

.bps-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--se-panel-shell-bg);
  padding: 10px;
}

.bps-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: var(--se-panel-card-bg);
  border: 1px solid var(--se-panel-card-border);
  box-shadow: var(--se-panel-card-shadow), inset 0 1px 0 color-mix(in srgb, var(--se-text) 4%, transparent);
}

.bps-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--se-border);
  flex-shrink: 0;
}

.bps-panel-title {
  margin: 0;
  flex: 1;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--se-text);
}

.bps-panel-actions { display: flex; gap: 4px; flex-shrink: 0; }

.bps-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bps-splitter {
  flex-shrink: 0;
  background: var(--se-splitter-bg);
  transition: background 0.12s, box-shadow 0.12s;
  touch-action: none;
  z-index: 6;
}
.bps-splitter:hover,
.bps-splitter.bps-splitter--active {
  background: var(--se-splitter-active);
  box-shadow: 0 0 10px color-mix(in srgb, var(--se-accent) 20%, transparent);
}
.bps-splitter--v { width: 5px; cursor: col-resize; }
.bps-splitter--h {
  height: 5px;
  margin: 0 10px;
  border-radius: 3px;
  cursor: row-resize;
  flex-shrink: 0;
}

.bps-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--se-center-bg);
}

.bps-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  padding-bottom: 10px;
}

.bps-main-row {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  overflow: hidden;
}

.bps-center-work {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bps-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 0;
  flex-shrink: 0;
  gap: 10px;
}

.bps-center-head-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--se-text-muted);
}

.bps-center-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
}

.bps-right {
  flex: 0 0 280px;
  width: 280px;
  border-left: 1px solid var(--se-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
  background: var(--se-palette-bg);
  overflow: hidden;
}

.bps-right-tabs {
  display: flex;
  border-bottom: 1px solid var(--se-border);
  flex-shrink: 0;
}

.bps-left-tabs {
  display: flex;
  border-bottom: 1px solid var(--se-border);
  flex-shrink: 0;
  margin: -14px -12px 0;
  padding: 0 4px;
}

.bps-left-tab,
.bps-right-tab {
  flex: 1;
  padding: 10px 6px;
  border: none;
  background: transparent;
  color: var(--se-text-muted);
  font-size: 0.76rem;
  cursor: pointer;
}
.bps-left-tab--on,
.bps-right-tab--on {
  color: var(--se-tab-active);
  box-shadow: inset 0 -2px 0 var(--se-tab-active);
}

.bps-panel-body--tabs {
  padding-top: 10px;
}

.bps-right-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.bps-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  margin: 0 12px 0;
  border: 1px solid var(--se-terminal-border);
  border-radius: 10px;
  background: var(--se-terminal-bg);
  overflow: hidden;
  min-height: 88px;
}

.bps-footer-label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--se-terminal-label);
  padding: 6px 12px;
  border-bottom: 1px solid var(--se-border);
}

.bps-footer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
}

.bps-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--se-strat-item-border);
  background: var(--se-strat-item-bg);
  box-shadow: var(--se-strat-item-shadow);
  color: var(--se-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.bps-list-item:hover {
  box-shadow: var(--se-strat-item-hover-shadow);
  background: var(--se-item-hover-bg);
}
.bps-list-item--sel {
  background: var(--se-item-selected-bg);
  border-color: var(--se-item-selected-border);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--se-gold) 20%, transparent);
}
.bps-list-item-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bps-list-item--sel .bps-list-item-name { color: var(--se-item-selected-text); }
.bps-list-item-meta { font-size: 0.68rem; color: var(--se-text-muted); }
.bps-list-item-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}
.bps-list-item-badge.up { color: var(--se-up); background: color-mix(in srgb, var(--se-up) 12%, transparent); }
.bps-list-item-badge.down { color: var(--se-down); background: color-mix(in srgb, var(--se-down) 12%, transparent); }

.bps-empty {
  font-size: 0.78rem;
  color: var(--se-text-dim);
  text-align: center;
  padding: 24px 12px;
  line-height: 1.6;
}

.bps-card {
  border: 1px solid var(--se-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--se-bg-elevated) 88%, transparent);
  overflow: hidden;
}
.bps-card-head {
  padding: 8px 10px 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--se-text-muted);
}
.bps-card-body { padding: 8px 10px 10px; }

.bps-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--se-text-muted);
  font-size: 0.85rem;
}
