/* Fit labels on the front screen (replaces the /matches page). Light + dark in one file. */
.fit-panel { padding: 12px 14px; }
.fit-panel .filters { margin-top: 0; border-top: 0; padding-top: 0; }
.fit-panel .filters > summary { cursor: pointer; }
.fit-profile[open] .fit-profile-sum { display: none; }
.fit-profile-body { margin-top: 10px; }
.fit-profile-form { display: flex; flex-direction: column; gap: 10px; }
.fit-profile-form label { font-size: .84rem; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fit-profile-form select, .fit-profile-form input[type="number"] { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; width: 100%; box-sizing: border-box; }
.fit-profile-form .hint-block, .fit-panel .hint-block { margin: 0; font-size: .85rem; color: var(--muted); }
.fit-regions { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; }
.fit-regions legend { font-weight: 700; font-size: .86rem; padding: 0 4px; }
.fit-region-actions { display: flex; align-items: center; gap: 6px; font-size: .86rem; margin-bottom: 4px; }
.fit-region-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.fit-region-list label.check { flex-direction: row; align-items: center; gap: 6px; }
.fit-profile-form .filter-actions { margin-top: 0; }
.fit-profile-msg:empty { display: none; }

.nc-fit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 8px; }
.nc-fit[hidden] { display: none; }
.fitb { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .01em; border: 1px solid transparent; }
.fitb-pursue { background: #0d7a5f; color: #fff; }
.fitb-watch { background: #fff0d1; color: #6e4c00; border-color: #e9cf96; }
.fitb-unclear { background: #e6effa; color: #1c4672; border-color: #bfd3ea; }
.nc-fit .band { font-size: .76rem; }
.fit-mismatch { font-size: .76rem; color: #8a1f1b; font-weight: 600; }
.fit-mismatch::before { content: "⚠ "; }
.fit-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #eef6f2; border: 1px solid #cfe5da; font-size: .86rem; color: #234; }
.fit-note[hidden] { display: none; }
.fit-detail { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.fit-detail h3 { margin: 0 0 6px; }
.fit-detail .fit-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; }
.fit-detail .factor-mismatch b { color: #8a1f1b; }

html[data-theme="dark"] .fit-profile-form select, html[data-theme="dark"] .fit-profile-form input[type="number"] { background: #1c1c1c; color: #e8eaed; border-color: #3a434c; }
html[data-theme="dark"] .fit-regions { border-color: #343d46; }
html[data-theme="dark"] .fit-regions legend { color: var(--dk-heading, #e8eaed); }
html[data-theme="dark"] .fitb-pursue { background: #1f8a6c; color: #fff; }
html[data-theme="dark"] .fitb-watch { background: #2e271b; color: #eddbc5; border-color: #5b4d38; }
html[data-theme="dark"] .fitb-unclear { background: #19222b; color: #c5deed; border-color: #334553; }
html[data-theme="dark"] .fit-high { background: #1b2e24; color: #bfe6cc; }
html[data-theme="dark"] .fit-medium { background: #2e271b; color: #eddbc5; }
html[data-theme="dark"] .fit-low { background: #34201f; color: #f1c9c6; }
html[data-theme="dark"] .fit-mismatch, html[data-theme="dark"] .fit-detail .factor-mismatch b { color: #f0a6a0; }
html[data-theme="dark"] .fit-note { background: #1a2b23; border-color: #3d5c4e; color: #d5e6dc; }
html[data-theme="dark"] .fit-detail { border-color: #343d46; }

/* Left-panel placement: after the market hero, before Filters. Phones/tablets: lives in "Dashboard & filters". */
@media (min-width: 1200px) { .dash .fit-panel { order: 2; } }
@media (max-width: 1199.98px) {
  .split-shell .fit-panel { order: 3; margin-bottom: 12px; }
  .split-shell[data-view="tenders"] .fit-panel { display: none; }
}

/* Free/signed-out Sort by fit note: inline upgrade link */
#fit-note .fit-note-cta { font-weight: 600; }

.fit-empty-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #ecd7a3;
  color: #5c3d00;
  font-size: .9rem;
  line-height: 1.45;
}
.fit-empty-banner a { color: inherit; font-weight: 650; }
.fit-empty-banner[hidden] { display: none; }
html[data-theme="dark"] .fit-empty-banner {
  background: #3a2e14;
  border-color: #6b5420;
  color: #f3e3b8;
}
@media (max-width: 1199.98px) {
  .split-shell[data-view="tenders"].show-fit-editor .fit-panel {
    display: block;
    order: 2;
    margin: 0 0 12px;
  }
}
