/* ── Pipelines Panel ────────────────────────────────────────────────────── */
.cc-pipelines {
  background: #040c18;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.cc-pipelines-title {
  font-size: .75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
}
.cc-pipelines-section {
  margin-bottom: 12px;
}
.cc-pipelines-section-label {
  font-size: .6rem;
  font-weight: 700;
  color: #1e3a5f;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
  padding-left: 2px;
}
.cc-pipeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #030d1a;
  border: 1px solid #0d2035;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: border-color .15s;
}
.cc-pipeline-item:hover { border-color: #1e3a5f; }
.cc-pipeline-info { flex: 1; min-width: 0; }
.cc-pipeline-label {
  font-size: .72rem;
  color: #94a3b8;
  margin-bottom: 1px;
}
.cc-pipeline-desc {
  font-size: .6rem;
  color: #1e3a5f;
  line-height: 1.4;
}
.cc-pipeline-threshold {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.cc-pipeline-threshold-label {
  font-size: .6rem;
  color: #475569;
  white-space: nowrap;
}
.cc-pipeline-threshold-input {
  width: 56px;
  background: #071828;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #e2e8f0;
  font-size: .7rem;
  padding: 2px 6px;
  text-align: center;
}
.cc-pipeline-threshold-input:focus { outline: none; border-color: #06b6d4; }

/* ── CSS Toggle Switch ──────────────────────────────────────────────────── */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #1e3a5f;
  border-radius: 10px;
  transition: background .2s;
}
.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  bottom: 3px;
  background: #475569;
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.cc-toggle input:checked + .cc-toggle-slider { background: #22c55e; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(16px); background: #fff; }
.cc-toggle input:disabled + .cc-toggle-slider { opacity: .5; cursor: not-allowed; }
.cc-pipelines-loading {
  font-size: .7rem;
  color: #475569;
  text-align: center;
  padding: 12px 0;
}

/* ── Blocked Notice ─────────────────────────────────────────────────────── */
.cc-blocked-notice {
  background: #1a0505;
  border: 1px solid #f87171;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: .72rem;
  color: #fca5a5;
  line-height: 1.5;
}
.cc-blocked-notice strong { color: #f87171; display: block; margin-bottom: 2px; }

/* ── Trade Journal ──────────────────────────────────────────────────────── */
.cc-journal-row {
  background: #030d1a;
  border: 1px solid #0d2035;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 10px 12px;
  margin-bottom: 2px;
}
.cc-journal-entries { margin-bottom: 8px; }
.cc-journal-entry {
  padding: 6px 0;
  border-bottom: 1px solid #0d2035;
  font-size: .68rem;
  color: #94a3b8;
  line-height: 1.5;
}
.cc-journal-entry:last-child { border-bottom: none; }
.cc-journal-entry-meta {
  font-size: .6rem;
  color: #1e3a5f;
  margin-top: 2px;
}
.cc-journal-form textarea {
  width: 100%;
  background: #040c18;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: .7rem;
  padding: 7px 10px;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  box-sizing: border-box;
}
.cc-journal-form textarea:focus { outline: none; border-color: #06b6d4; }
.cc-journal-form-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.cc-journal-mood-stamp {
  font-size: .6rem;
  color: #475569;
  flex: 1;
}

/* ── Pipelines Modal ─────────────────────────────────────────────────────── */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.cc-modal {
  background: #071525;
  border: 1px solid rgba(6,182,212,.2);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(6,182,212,.125);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
}

.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #1e3a5f;
}

.cc-modal-title {
  color: #06b6d4;
  font-size: .9rem;
  font-weight: 700;
}

.cc-modal-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0b1e35;
  border: 1px solid #1e3a5f;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.cc-modal-close:hover { border-color: #06b6d4; color: #06b6d4; }

.cc-modal .cc-pipelines { padding: 16px 18px; }

/* Pipelines modal scroll fix: the shared .cc-modal is overflow:hidden (for
   corner-clipping) and capped at max-height:80vh, so the header must stay
   pinned while the body owns the scroll — otherwise tall content is clipped
   and unreachable. Scoped to the pipelines modal only. */
#cc-pipelines-modal .cc-modal { display: flex; flex-direction: column; }
#cc-pipelines-modal .cc-modal-header { flex-shrink: 0; }
#cc-pipelines-modal .cc-pipelines { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* ── Health Settings Button ──────────────────────────────────────────────── */
.cc-health-settings-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0b1e35;
  border: 1px solid #1e3a5f;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: border-color .15s, color .15s;
}
.cc-health-settings-btn:hover { border-color: #06b6d4; color: #06b6d4; }
