/* tech.css — Technical signals widget (window.TechPanel) */
.dash-tech-card { margin-top: 14px; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-title { display: flex; align-items: baseline; gap: 10px; }
.tp-title h2 { margin: 0; font-size: 14px; color: var(--text-strong); }
.tp-co { color: var(--muted-2); font-size: 11px; font-family: var(--mono); }
.tp-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-symbox { display: flex; gap: 6px; }
.tp-symbox input { height: 32px; width: 110px; padding: 0 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-strong); font-weight: 700; font-size: 13px; }
.tp-symbox .dash-btn { height: 32px; padding: 0 12px; }
.tp-tf button { height: 30px; }

/* summary lean bar */
.tp-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; min-height: 0; }
.tp-summary:empty { display: none; }
.tp-sum-lean { font-weight: 800; font-size: 13px; letter-spacing: .04em; padding: 5px 12px; border-radius: 8px; }
.tp-bullish { color: var(--up); background: var(--green-soft, rgba(38,166,154,.12)); }
.tp-bearish { color: var(--down); background: var(--red-soft, rgba(239,83,80,.12)); }
.tp-balanced { color: var(--muted); background: var(--panel-2); }
.tp-sum-bars { flex: 1; min-width: 180px; }
.tp-sum-row { display: flex; gap: 14px; font-size: 11px; margin-bottom: 4px; font-weight: 600; }
.tp-sum-row .up { color: var(--up); } .tp-sum-row .down { color: var(--down); } .tp-neu { color: var(--muted-2); }
.tp-sum-track { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.tp-sum-bull { background: var(--up); } .tp-sum-bear { background: var(--down); }
.tp-sum-meta { color: var(--muted-2); font-size: 11px; font-family: var(--mono); }

/* filters row */
.tp-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tp-select, .tp-search { height: 30px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 12px; padding: 0 10px; }
.tp-search { flex: 0 1 220px; }
.tp-flex { flex: 1; }
.tp-pager { display: flex; align-items: center; gap: 6px; }
.tp-pagelbl { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 64px; text-align: center; }

/* indicator table */
.tp-table { width: 100%; border-collapse: collapse; }
.tp-row td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tp-row:hover td { background: var(--accent-soft); }
.tp-name { color: var(--text-strong); font-size: 12.5px; font-weight: 600; }
.tp-cat { display: block; color: var(--muted-2); font-size: 10px; font-weight: 500; margin-top: 1px; }
.tp-author { color: var(--accent); font-style: normal; font-size: 10px; font-weight: 700; }
.tp-spark { width: 84px; }
.tp-spark-svg { width: 80px; height: 22px; display: block; }
.tp-spark-up { fill: none; stroke: var(--up); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.tp-spark-dn { fill: none; stroke: var(--down); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.tp-nospark { color: var(--muted-2); }
.tp-val { font-family: var(--mono); font-size: 12.5px; color: var(--text-strong); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-val .up { color: var(--up); } .tp-val .down { color: var(--down); } .tp-flat { color: var(--muted-2); }
.tp-read { font-size: 12px; color: var(--text); white-space: nowrap; }
.tp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--muted-2); }
.tp-dot.up { background: var(--up); } .tp-dot.down { background: var(--down); }
.tp-read .up { color: var(--up); } .tp-read .down { color: var(--down); }

.tp-disc { margin: 10px 2px 0; color: var(--muted-2); font-size: 10.5px; line-height: 1.5; }

@media (max-width: 680px) {
  .tp-spark { display: none; }
}

/* custom-indicator editor (window.CustomIndicators.openEditor) */
.ci-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; }
.ci-box { width: min(1000px, 96vw); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.ci-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ci-head h2 { margin: 0; font-size: 15px; color: var(--text-strong); }
.ci-head-sub { font-size: 11px; color: var(--accent); font-weight: 600; margin-left: 6px; }
.ci-x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.ci-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; }
.ci-left { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.ci-right { padding: 16px 18px; border-left: 1px solid var(--border); min-width: 0; }
.ci-right h3 { margin: 14px 0 6px; font-size: 12px; color: var(--text-strong); }
.ci-right h3:first-child { margin-top: 0; }
.ci-l { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.ci-l input { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text-strong); padding: 8px 10px; font-size: 13px; }
.ci-row { display: flex; gap: 12px; }
.ci-row .ci-l { flex: 1; }
.ci-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ci-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-ex { height: 30px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 12px; padding: 0 8px; }
.ci-status { font-size: 11.5px; font-family: var(--mono); }
.ci-ok { color: var(--up); } .ci-err { color: var(--down); }

/* code editor: gutter + highlight layer behind a transparent textarea */
.ci-editor { display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--panel-2); height: 230px; }
.ci-gutter { flex: 0 0 38px; padding: 10px 6px 10px 0; text-align: right; color: var(--muted-2); background: var(--panel-3); font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre; overflow: hidden; user-select: none; }
.ci-codewrap { position: relative; flex: 1; min-width: 0; }
.ci-hl, .ci-ta { margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre; tab-size: 2; border: 0; }
.ci-hl { position: absolute; inset: 0; overflow: auto; pointer-events: none; color: var(--text); }
.ci-ta { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; background: transparent; color: transparent; caret-color: var(--text-strong); outline: none; overflow: auto; }
.ci-cm { color: var(--muted-2); font-style: italic; }
.ci-str { color: var(--green); }
.ci-num { color: var(--orange); }
.ci-kw { color: var(--purple); font-weight: 700; }
.ci-fn { color: var(--blue, #2962ff); }
.ci-src { color: var(--amber); }

.ci-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 132px; overflow: auto; }
.ci-chip { font-family: var(--mono); font-size: 10.5px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--blue, #2962ff); cursor: pointer; }
.ci-chip-src { color: var(--amber); }
.ci-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* live preview */
.ci-prev-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-prev-sym { width: 84px; height: 26px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-strong); font-weight: 700; font-size: 12px; padding: 0 8px; }
.ci-prev { height: 124px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.ci-prev-svg { width: 100%; height: 100%; display: block; }
.ci-prev-empty { display: grid; place-items: center; height: 100%; color: var(--muted-2); font-size: 11px; }
.ci-prev-line { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.ci-prev-price { fill: none; stroke: var(--muted-2); stroke-width: 1; opacity: .5; vector-effect: non-scaling-stroke; }
.ci-prev-zero { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }

.ci-mine-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 12px; color: var(--text); border-bottom: 1px solid var(--border-soft); }
.ci-mine-row button { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--accent); font-size: 11px; padding: 2px 8px; cursor: pointer; }
.tp-newbtn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; cursor: pointer; }
@media (max-width: 760px) { .ci-grid { grid-template-columns: 1fr; } .ci-right { border-left: 0; border-top: 1px solid var(--border); } }
