/* Kontakty: rozbalovací filtr, obory a oddělený seznam vyřazených. */
.cf { position: relative; }
.cf-btn { gap: 6px; }
.cf-btn.open { border-color: var(--sky); }
.cf-n { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--sky); color: #fff; font-size: 11px; font-weight: 700; }
.cf-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 380px; max-width: calc(100vw - 40px); padding: 14px; background: var(--card); border: 1px solid var(--border2); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.cf-lab { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.cf-lab:first-child { margin-top: 0; }
.cf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-opts .chip { padding: 5px 10px; font-size: 13px; }
.cf-opts .chip:disabled { opacity: .4; cursor: default; }
.cf-hint { font-size: 13px; color: var(--muted); }
.cf-clear { display: block; margin-top: 14px; padding: 0; background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--text2); text-decoration: underline; cursor: pointer; }
.cf-active { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.cf-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; background: var(--card); border: 1px solid var(--border2); border-radius: 14px; font: inherit; font-size: 13px; font-weight: 550; color: var(--text); cursor: pointer; }
.cf-chip:hover { background: var(--hover); }
.cf-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cf-banner { display: flex; align-items: center; gap: 10px; background: var(--brownbg); border-color: color-mix(in srgb, var(--brown) 35%, var(--border)); color: var(--brown); font-weight: 550; }
.cf-banner span { flex: 1; min-width: 0; color: var(--text); }
.cf-archive { display: block; margin-top: 12px; padding: 0; background: none; border: 0; font: inherit; font-size: 13px; font-weight: 550; color: var(--text2); cursor: pointer; }
.cf-archive:hover { color: var(--red); text-decoration: underline; }
.cf-list { display: grid; gap: 12px; }
.cf-firm { display: flex; flex-direction: column; gap: 4px; }
.cf-fhead { display: flex; align-items: center; gap: 12px; cursor: pointer; padding-bottom: 6px; }
.cf-pm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cf-pm b { font-weight: 600; }
.cf-pm small { font-size: 12.5px; color: var(--text2); }
.cf-row { display: flex; align-items: center; gap: 10px; }
.cf-row .cf-person { flex: 1; min-width: 0; }
.cf-person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.cf-person:hover { background: var(--hover); }
.pill.cf-tag { background: var(--segment); color: var(--text); }
button.cf-tag { display: inline-flex; align-items: center; gap: 4px; border: 0; font-family: inherit; cursor: pointer; }
.cf-edit { align-items: center; margin-top: 8px; }
.cf-tagadd { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; background: none; border: 1px solid var(--sky); border-radius: 15px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--skytext); cursor: pointer; }
.cf-tagadd:hover { background: color-mix(in srgb, var(--sky) 10%, transparent); }
.cf-tagbox { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--border2); border-radius: 10px; }
.cf-tagbox input, .cf-name input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; background: var(--card); border: 1px solid var(--border2); border-radius: 8px; font: inherit; font-size: 13px; color: var(--text); }
.cf-foot { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.cf-foot .cf-clear { margin-top: 0; }
.cf-name { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.cf-err { margin-top: 8px; font-size: 13px; color: var(--red); }
.cf-edit button.cf-tag { height: 30px; padding: 0 11px; border-radius: 15px; font-size: 13.5px; font-weight: 550; gap: 6px; }
.cf-edit { gap: 6px; }
.cf-field { margin-top: 2px; }
.cf-field .cf-lab { margin: 0 0 5px; }
/* Boxík pro přidání vlastního filtru */
.fb-add { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--skytext); background: none; border: 1px dashed var(--sky); border-radius: 16px; }
.fb-add:hover { background: color-mix(in srgb, var(--sky) 10%, transparent); }
.fb-foot { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 9px 8px 7px; border-top: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--skytext); text-align: left; }
.fb-foot:hover { text-decoration: underline; }
/* Box kontaktu a firmy */
.ct-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ct-chips .cf-tags { margin-top: 0; }
.ct-chips:empty { display: none; }
.ochip { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }
.cav.tint { background: color-mix(in srgb, var(--c) 13%, var(--card)); color: var(--c); }
.acase { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left; background: color-mix(in srgb, var(--c) 9%, var(--card)); }
.acase:hover { background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.ac-i { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; color: #fff; background: var(--c); }
.ac-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-k { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--c); }
.ac-t { font-size: 14px; font-weight: 650; color: var(--text); line-height: 1.3; }
.ac-more { font-size: 12px; font-weight: 500; color: var(--text2); }
.pstack { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.pstack-b { display: inline-flex; flex: none; }
.pb { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -7px; border-radius: 50%; font-size: 10.5px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 13%, var(--card)); box-shadow: 0 0 0 2px var(--card); }
.pb:first-child { margin-left: 0; }
.pb.more { color: var(--text2); background: var(--segment); }
.pstack-t { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tchips { display: flex; flex-wrap: wrap; gap: 4px; }
.tchip { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }
/* Ztracená zakázka */
.chip.lost.on { background: var(--red); border-color: var(--red); }
.ob-lost { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--red); }
.ob-lost::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.lostbar { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 9px 10px; border-radius: 11px; text-align: left; color: var(--text2); background: color-mix(in srgb, var(--red) 8%, var(--card)); }
.lostbar:hover { background: color-mix(in srgb, var(--red) 12%, var(--card)); }
.lb-i { flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--red); }
.lb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-t b { font-size: 13.5px; color: var(--red); }
.lb-t small { font-size: 12.5px; color: var(--text2); }
.pr-more { font-size: 12.5px; font-weight: 600; color: var(--brown); }
/* Zakázky firmy: odkud kam */
.fo { margin-top: 10px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ctitle + .fo { margin-top: 0; }
.fo:hover { border-color: var(--border2); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.fo-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fo-title { font-size: 15px; font-weight: 700; letter-spacing: -.1px; line-height: 1.3; }
.fo .ob-more { margin-top: 1px; }
.fo-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; font-size: 13px; color: var(--text2); }
.fo-mat { margin-top: 10px; font-size: 12.5px; font-weight: 650; color: var(--text2); }
.fo-way { --c: var(--muted); display: grid; grid-template-columns: minmax(0, 1fr) minmax(84px, 130px) minmax(0, 1.25fr); gap: 12px; align-items: center; margin-top: 10px; padding: 10px 12px; background: var(--subtle); border-radius: 10px; }
.fo-mat + .fo-way { margin-top: 4px; }
.fo-way.paired { --c: var(--teal); background: color-mix(in srgb, var(--teal) 7%, var(--card)); }
.fo-way.offered { --c: var(--brown); background: color-mix(in srgb, var(--brown) 6%, var(--card)); }
.fo-end { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fo-end small { font-size: 11px; font-weight: 650; color: var(--text2); }
.fo-end b, .fo-end a { font-size: 14px; font-weight: 650; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.fo-end a:hover { text-decoration: underline; }
.fo-end span { font-size: 12.5px; color: var(--text2); overflow-wrap: anywhere; }
.fo-end.none b { font-weight: 550; color: var(--text2); }
.fo-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 40px; justify-content: center; font-size: 12px; font-weight: 600; color: var(--c); text-align: center; }
.fo-line { position: relative; display: block; width: 100%; border-top: 2px solid var(--c); }
.fo-way:not(.paired) .fo-line { border-top-style: dashed; }
.fo-line::after { content: ""; position: absolute; right: 0; top: -6px; width: 8px; height: 8px; border-top: 2px solid var(--c); border-right: 2px solid var(--c); transform: rotate(45deg); }
.fo-submatch { margin-top: 10px; }
.fo-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text); }
.fo-fact { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fo-fact .ico { flex: none; color: var(--text2); }
.fo-fact b { font-weight: 650; }
.fo-bar { flex: none; width: 70px; height: 5px; overflow: hidden; background: var(--segment); border-radius: 3px; }
.fo-bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.fo-money { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.fo .ob-next { margin-top: 10px; }
@media (max-width: 640px) {
  .fo-way { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fo-mid { align-items: flex-start; min-height: 0; text-align: left; }
  .fo-line { display: none; }
}
