/* ═════════════════════════════════════════════════════════════════════════
   OPPORTUNITY INTELLIGENCE - BIDDERS & VENDORS (op-directory.css)

   Only new selectors, every one prefixed .dir-. The rail, strip, alerts,
   chips, pills, drawer and activity list are the workspace's own ws-* and
   op-* classes and are not restyled here. Same tokens, same greens, ambers
   and blues, and a light pass for every colour set below.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── The bar above the directory ─────────────────────────────────────── */
.dir-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin: 4px 0 16px;
}
.dir-bar-l h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--white); }
.dir-bar-l span { display: block; margin-top: 3px; font-size: 12px; color: var(--gray-light); }
.dir-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dir-bar-r .up-btn { padding: 8px 16px; font-size: 12.5px; }
.dir-filter {
    font: inherit; font-size: 12.5px; padding: 8px 12px; min-width: 200px; border-radius: 9px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--white);
}
.dir-filter:focus { outline: none; border-color: rgba(196,23,23,.6); box-shadow: 0 0 0 3px rgba(196,23,23,.15); }
.dir-strip { margin-bottom: 22px; }
.dir-strip .ws-kpi { cursor: default; }
.dir-strip .ws-kpi:hover { transform: none; border-color: var(--border); }

.dir-sec { margin-bottom: 26px; }
.dir-sec-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.dir-sec-h h2 {
    margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gray-light);
}
.dir-sec-s { font-size: 12px; color: var(--gray-light); opacity: .85; }
.dir-pick { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 11px; color: var(--gray-light); }
.dir-pick select {
    font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px; max-width: 320px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--white);
}
.dir-quiet {
    padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--border);
    font-size: 12.5px; line-height: 1.6; color: var(--gray-light);
}

/* ── In bidding: coverage cards ──────────────────────────────────────── */
.dir-cov { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dir-cov-c {
    position: relative; overflow: hidden; cursor: pointer; font: inherit; text-align: left; color: inherit;
    display: flex; flex-direction: column; gap: 7px;
    padding: 12px 14px 11px; border-radius: 13px;
    border: 1px solid var(--border); border-left: 3px solid rgba(255,255,255,.14);
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
    transition: transform .16s var(--ease-out, ease), border-color .16s ease;
}
.dir-cov-c:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); }
.dir-cov-c.is-warn { border-left-color: #e0a03b; }
.dir-cov-c.is-bad { border-left-color: #ff6b6b; }
.dir-cov-c.is-stop { border-left-color: var(--red); }
.dir-cov-t { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--gray-light); }
.dir-cov-t .op-chip { margin-left: auto; }
.dir-cov-c h4 { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--white); }
.dir-trs { display: flex; flex-wrap: wrap; gap: 5px; }
.dir-tr {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10.5px; font-weight: 650; padding: 3px 9px; border-radius: 100px;
    background: rgba(255,255,255,.07); color: var(--gray-light);
}
.dir-tr i { font-style: normal; font-weight: 500; opacity: .8; }
.dir-tr.is-carried { background: rgba(20,168,106,.18); color: #2fc07d; }
.dir-tr.is-quoted { background: rgba(56,132,255,.18); color: #6ba6ff; }
.dir-tr.is-waiting { background: rgba(224,160,59,.16); color: #e0a03b; }
.dir-tr.is-uncovered { background: rgba(255,107,107,.16); color: #ff8f8f; }
.dir-tr.is-none { background: transparent; border: 1px dashed var(--border); font-weight: 500; }
.dir-cov-f { font-size: 11px; color: var(--gray-light); padding-top: 7px; border-top: 1px solid var(--border); }

/* ── By trade: the directory ─────────────────────────────────────────── */
.dir-grp { margin-bottom: 18px; }
.dir-grp-h { display: flex; align-items: baseline; gap: 9px; padding: 0 2px 8px; }
.dir-grp-h > span { font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--white); }
.dir-grp-h > b {
    font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
    padding: 0 7px; border-radius: 100px; background: rgba(255,255,255,.09); color: var(--gray-light);
}
.dir-grp-h > i.is-hot { font-style: normal; font-size: 10.5px; font-weight: 700; color: #ff8f8f; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.dir-card {
    position: relative; overflow: hidden; cursor: pointer; font: inherit; text-align: left; color: inherit;
    display: flex; flex-direction: column;
    padding: 12px 14px 10px; border-radius: 13px;
    border: 1px solid var(--border); border-left: 3px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.04);
    transition: transform .16s var(--ease-out, ease), border-color .16s ease, background .16s ease;
}
.dir-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.dir-card.is-warn { border-left-color: #e0a03b; }
.dir-card.is-bad { border-left-color: #ff6b6b; }
.dir-card.is-stop { border-left-color: var(--red); box-shadow: -6px 0 18px -10px rgba(196,23,23,.8); }
.dir-card-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--gray-light); }
.dir-stars { font-size: 10px; letter-spacing: .06em; color: #e0a03b; }
.dir-card h4 { margin: 4px 0 8px; font-size: 13.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--white); }
.dir-card .ws-card-f { margin-top: 9px; }
.dir-card-f {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border);
    font-size: 10.5px; color: var(--gray-light);
}
.dir-carried { margin-left: auto; font-weight: 700; color: #2fc07d; }
.dir-pq.is-ok { background: rgba(20,168,106,.16); color: #2fc07d; }

/* ── Coverage for one pursuit ────────────────────────────────────────── */
.dir-cov-v { display: flex; flex-direction: column; gap: 14px; }
.dir-cov-h { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.dir-cov-h > .sr-act { flex: 0 0 auto; margin-top: 4px; }
.dir-cov-id { flex: 1; min-width: 240px; }
.dir-cov-id h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--white); }
.dir-cov-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dir-cov-fl { padding: 2px 4px; }
.dir-cov-ok { padding: 14px 16px; }
.dir-tr-blk {
    border: 1px solid var(--border); border-left: 3px solid rgba(255,255,255,.14); border-radius: 13px;
    background: rgba(255,255,255,.03); overflow: hidden;
}
.dir-tr-blk.is-uncovered { border-left-color: #ff6b6b; }
.dir-tr-blk.is-waiting { border-left-color: #e0a03b; }
.dir-tr-blk.is-quoted { border-left-color: #6ba6ff; }
.dir-tr-blk.is-carried { border-left-color: #2fc07d; }
.dir-tr-h {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.dir-tr-h > span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--white); }
.dir-tr-st { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 100px; background: rgba(255,255,255,.08); color: var(--gray-light); }
.dir-tr-blk.is-uncovered .dir-tr-st { background: rgba(255,107,107,.16); color: #ff8f8f; }
.dir-tr-blk.is-waiting .dir-tr-st { background: rgba(224,160,59,.16); color: #e0a03b; }
.dir-tr-blk.is-quoted .dir-tr-st { background: rgba(56,132,255,.18); color: #6ba6ff; }
.dir-tr-blk.is-carried .dir-tr-st { background: rgba(20,168,106,.18); color: #2fc07d; }
.dir-tr-h > em { font-style: normal; font-size: 11px; color: var(--gray-light); }
.dir-tr-h > .sr-act { margin-left: auto; }
.dir-tr-blk .dir-quiet { margin: 10px 12px; }
.dir-hint { margin: 4px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--gray-light); max-width: 78ch; }
.dir-hint code, .dir-cov-v code { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--white); }

/* ── A bid row, in the coverage view and in the vendor drawer ────────── */
.dir-bid {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--gray-light);
}
.dir-tr-blk .dir-bid:first-of-type { border-top: 0; }
.dir-bid.is-declined, .dir-bid.is-not_selected { opacity: .7; }
.dir-bid-v, .dir-bid-n {
    appearance: none; cursor: pointer; font: inherit; padding: 0; border: 0; background: none;
    font-weight: 700; color: var(--white);
}
.dir-bid-v:hover, .dir-bid-n:hover { color: #ff8f6b; }
.dir-bid-n { font-size: 11.5px; }
.dir-bid-gone { opacity: .6; }
.dir-bid-t { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-bid-tr { font-size: 10.5px; padding: 2px 8px; border-radius: 100px; background: rgba(255,255,255,.07); }
.dir-bid-a { font-variant-numeric: tabular-nums; color: var(--white); }
.dir-bid-a.is-none { font-weight: 500; color: var(--gray-light); opacity: .7; }
.dir-bid-acts { display: flex; gap: 6px; margin-left: auto; }
.op-pill.dir-pill-quoted { background: rgba(56,132,255,.18); color: #6ba6ff; }
.dir-bids { padding: 18px 24px 0; }
.dir-bids h4 {
    display: flex; align-items: center; gap: 9px; margin: 0 0 4px;
    font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--white);
}
.dir-bids h4::before { content: ""; width: 14px; height: 2px; border-radius: 100px; background: var(--red); }
.dir-bids h4.dir-bids-past { margin-top: 16px; }
.dir-bids .dir-bid { padding-left: 0; padding-right: 0; }
.dir-bids .dir-bid:first-of-type { border-top: 0; }
.dir-bids .dir-quiet { margin-top: 4px; }
.dir-rc-ok { padding: 12px 24px 0; font-size: 12.5px; color: #2fc07d; }
.dir-err { margin: 12px 24px 0; }

/* ── Light theme, every colour above ─────────────────────────────────── */
html.light .dir-bar-l h2, html.light .dir-cov-c h4, html.light .dir-card h4, html.light .dir-grp-h > span,
html.light .dir-cov-id h2, html.light .dir-tr-h > span, html.light .dir-bid-v, html.light .dir-bid-n,
html.light .dir-bid-a, html.light .dir-bids h4, html.light .dir-hint code, html.light .dir-cov-v code { color: var(--black); }
html.light .dir-bar-l span, html.light .dir-sec-h h2, html.light .dir-sec-s, html.light .dir-pick, html.light .dir-quiet,
html.light .dir-cov-t, html.light .dir-tr, html.light .dir-cov-f, html.light .dir-grp-h > b, html.light .dir-card-t,
html.light .dir-card-f, html.light .dir-tr-st, html.light .dir-tr-h > em, html.light .dir-hint, html.light .dir-bid,
html.light .dir-bid-a.is-none { color: var(--gray-mid); }
html.light .dir-filter, html.light .dir-pick select { background: #fff; border-color: rgba(0,0,0,.13); color: var(--black); }
html.light .dir-strip .ws-kpi:hover { border-color: rgba(0,0,0,.1); }
html.light .dir-quiet { border-color: rgba(0,0,0,.14); }
html.light .dir-cov-c, html.light .dir-card { background: #fafbfc; border-color: rgba(0,0,0,.09); border-left-color: rgba(0,0,0,.18); }
html.light .dir-cov-c:hover, html.light .dir-card:hover { background: #fff; border-color: rgba(0,0,0,.2); }
html.light .dir-cov-c.is-warn, html.light .dir-card.is-warn { border-left-color: #a8690f; }
html.light .dir-cov-c.is-bad, html.light .dir-cov-c.is-stop, html.light .dir-card.is-bad, html.light .dir-card.is-stop { border-left-color: #c41717; }
html.light .dir-card.is-stop { box-shadow: -6px 0 18px -12px rgba(196,23,23,.5); }
html.light .dir-tr { background: rgba(0,0,0,.06); }
html.light .dir-tr.is-carried, html.light .dir-tr-blk.is-carried .dir-tr-st, html.light .dir-carried, html.light .dir-rc-ok { color: #0f7a4b; }
html.light .dir-tr.is-carried, html.light .dir-tr-blk.is-carried .dir-tr-st { background: rgba(20,168,106,.14); }
html.light .dir-tr.is-quoted, html.light .dir-tr-blk.is-quoted .dir-tr-st, html.light .op-pill.dir-pill-quoted { background: rgba(43,95,184,.14); color: #2b5fb8; }
html.light .dir-tr.is-waiting, html.light .dir-tr-blk.is-waiting .dir-tr-st { background: rgba(168,105,15,.12); color: #a8690f; }
html.light .dir-tr.is-uncovered, html.light .dir-tr-blk.is-uncovered .dir-tr-st { background: rgba(196,23,23,.1); color: #c41717; }
html.light .dir-tr.is-none { background: transparent; border-color: rgba(0,0,0,.14); }
html.light .dir-cov-f, html.light .dir-card-f, html.light .dir-cov-h, html.light .dir-tr-h, html.light .dir-bid { border-color: rgba(0,0,0,.08); }
html.light .dir-grp-h > b, html.light .dir-tr-st, html.light .dir-bid-tr, html.light .dir-hint code, html.light .dir-cov-v code { background: rgba(0,0,0,.06); }
html.light .dir-grp-h > i.is-hot { color: #c41717; }
html.light .dir-stars { color: #a8690f; }
html.light .dir-pq.is-ok { background: rgba(20,168,106,.14); color: #0f7a4b; }
html.light .dir-tr-blk { background: #fff; border-color: rgba(0,0,0,.1); border-left-color: rgba(0,0,0,.18); }
html.light .dir-tr-blk.is-uncovered { border-left-color: #c41717; }
html.light .dir-tr-blk.is-waiting { border-left-color: #a8690f; }
html.light .dir-tr-blk.is-quoted { border-left-color: #2b5fb8; }
html.light .dir-tr-blk.is-carried { border-left-color: #0f7a4b; }
html.light .dir-bid-v:hover, html.light .dir-bid-n:hover { color: #c2410c; }

@media (max-width: 720px) {
    .dir-bar-r { width: 100%; }
    .dir-filter { flex: 1; min-width: 0; }
    .dir-bid-t { white-space: normal; }
    .dir-bid-acts { margin-left: 0; width: 100%; }
    .dir-pick { margin-left: 0; }
}
