/* ── Terminal / Instrument filter theme ─────────────────────────────────────
   A purpose-built "trading-desk instrument" look for the filter surfaces only.
   Everything is scoped under .flt (added to the filter panels) so the rest of
   the app keeps the base design system untouched. Semantic phase-chip colours
   still win (their rules are more specific / later in source).                */

:root{
    /* Accent reuses the product's existing blue design tokens (--sg-accent #2f7bff / the #7fb3ff active blue),
       NOT a new colour — the earlier cyan-teal read as foreign against the blue/purple UI. */
    --flt-accent:        #2f7bff;
    --flt-accent-strong: #7fb3ff;
    --flt-accent-soft:   rgba(47,123,255,0.14);
    --flt-accent-line:   rgba(47,123,255,0.55);
    --flt-field:         rgba(0,0,0,0.34);
    --flt-line:          rgba(255,255,255,0.075);
    --flt-mono:          ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* Panel: a faint instrument rail across the top anchors the theme. */
.flt{ position: relative; }
.ts-filters.flt::before{
    content: "";
    position: absolute; left: 16px; right: 16px; top: 0; height: 2px;
    background: linear-gradient(90deg, var(--flt-accent-line), rgba(47,123,255,0.06) 55%, transparent);
    border-radius: 0 0 2px 2px;
}

/* Panel titles read like instrument headers. */
.flt .pas-title,
.flt .ts-adv-title{
    font-family: var(--flt-mono);
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: 13px;
}

/* Micro-labels: mono caps with a small diamond tick, like a labelled gauge. */
.flt .ts-filter-label{
    font-family: var(--flt-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.flt .ts-filter-label::before{
    content: "";
    width: 6px; height: 6px;
    border: 1px solid var(--flt-accent-line);
    background: var(--flt-accent-soft);
    transform: rotate(45deg);
    flex: none;
}
/* The dim "(optional…)" note inside a label keeps normal case — don't tick it twice. */
.flt .ts-filter-label .sfp-dim,
.flt .ts-filter-label .scr-dim{ text-transform: none; letter-spacing: 0; }

/* Fields: recessed instrument wells, mono tabular numerals, a cyan focus underline
   instead of the default blue glow. */
.flt .sg-input{
    background: var(--flt-field);
    border: 1px solid var(--flt-line);
    border-radius: 7px;
    font-family: var(--flt-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    padding: 9px 11px;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.35);
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.flt .sg-input:hover{ border-color: rgba(255,255,255,0.16); }
.flt .sg-input:focus{
    border-color: var(--flt-accent-line);
    box-shadow: inset 0 -2px 0 var(--flt-accent-line), 0 0 0 1px rgba(47,123,255,0.12);
    background: rgba(0,0,0,0.42);
}
.flt .sg-input::placeholder{ color: rgba(255,255,255,0.30); letter-spacing: .03em; }

/* Chips as tactile keys: squared, outlined when idle; "pressed" with a coloured
   base-edge when on. currentColor makes the edge match each chip (cyan for plain,
   the phase's own colour for phase chips). */
.flt .ts-chips{ gap: 6px; }
.flt .ts-chip{
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--flt-line);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    color: rgba(255,255,255,0.66);
    transition: transform .1s ease, border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.flt .ts-chip:hover{
    border-color: rgba(255,255,255,0.22);
    color: var(--sg-text);
    transform: translateY(-1px);
}
.flt .ts-chip--on{
    border-color: var(--flt-accent-line);
    background: var(--flt-accent-soft);
    color: var(--flt-accent-strong);
    box-shadow: inset 0 -2px 0 currentColor;   /* the "pressed key" base-edge */
    transform: translateY(0);
}
.flt .ts-chip--on:hover{ transform: translateY(0); }   /* an engaged key doesn't lift */

/* Primary action (Search / Create alert) adopts the signal accent so the whole
   instrument reads as one system. */
.flt .sg-btn-primary{
    border-color: var(--flt-accent-line);
    background: linear-gradient(180deg, rgba(47,123,255,0.20), rgba(47,123,255,0.10));
    color: #dafff8;
    font-weight: 600;
    letter-spacing: .02em;
}
.flt .sg-btn-primary:hover{
    border-color: var(--flt-accent-strong);
    background: linear-gradient(180deg, rgba(47,123,255,0.28), rgba(47,123,255,0.15));
}
.flt .sg-btn-primary:disabled{ background: rgba(47,123,255,0.08); }

/* Checkboxes pick up the accent so toggles feel part of the console. */
.flt input[type="checkbox"]{ accent-color: var(--flt-accent); }
