/* FURA — підбір перевізників під запит */
.cm-open { white-space: nowrap; }
.cm-panel { background: #fff; border: 1px solid var(--f-line, #e4e8ef); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.cm-panel[hidden] { display: none; }
.cm-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.cm-head b { font-size: 15px; color: #0f172a; }
.cm-sub { font-size: 12px; color: #64748b; }
.cm-close { margin-left: auto; border: none; background: none; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; }
.cm-close:hover { color: #0f172a; }
.cm-form { display: grid; grid-template-columns: 170px 1fr 1fr 140px 140px 170px auto; gap: 10px; align-items: end; }
.cm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #475569; }
.cm-form label i { color: #dc2626; font-style: normal; }
.cm-form select, .cm-form input { height: 38px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; background: #fff; }
.cm-form .btn { height: 38px; }
.cm-results { margin-top: 12px; max-height: 60vh; overflow-y: auto; }
.cm-results:empty { display: none; }
.cm-empty { padding: 14px; color: #64748b; font-size: 13.5px; text-align: center; }
.cm-count { font-size: 12.5px; color: #64748b; margin: 0 0 8px; }
.cm-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 220px; gap: 12px; padding: 10px 6px; border-top: 1px solid #f1f5f9; align-items: start; }
.cm-rank { width: 26px; height: 26px; border-radius: 50%; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: #0f172a; }
.cm-name a { color: #0f172a; text-decoration: none; }
.cm-name a:hover { color: #1d4ed8; text-decoration: underline; }
.cm-name code { font-size: 11.5px; font-weight: 500; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; color: #475569; }
.cm-unknown { color: #94a3b8; font-weight: 600; }
.cm-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; }
.cm-active { background: #dcfce7; color: #15803d; }
.cm-ours { background: #ede9fe; color: #6d28d9; }
.cm-stars { color: #f59e0b; font-size: 12px; letter-spacing: 1px; }
.cm-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #334155; margin-top: 4px; }
.cm-light { color: #64748b; font-size: 12.5px; }
.cm-trailer { background: #fff7ed; color: #c2410c; font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.cm-contact { font-size: 13px; text-align: right; }
.cm-contact a { color: #2563eb; text-decoration: none; }
.cm-person { font-weight: 600; color: #0f172a; }
.cm-routes { display: flex; flex-direction: column; gap: 6px; }
.cm-route { display: grid; grid-template-columns: 52px 150px 1fr; gap: 2px 10px; align-items: baseline; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #eef1f5; }
.cm-route .cm-sub:last-child { grid-column: 2 / -1; }
.cm-dir { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; text-align: center; }
.cm-dir.imp { background: #dcfce7; color: #15803d; }
.cm-dir.exp { background: #dbeafe; color: #1d4ed8; }
.cm-cities { color: #0f172a; }
.cm-cities b { font-weight: 600; }
.cm-more { margin-top: 6px; border: 1px solid #e2e8f0; background: #f8fafc; color: #1d4ed8; font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 8px; cursor: pointer; }
.cm-more:hover { background: #eff6ff; }
.cm-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; }
.cm-modal[hidden] { display: none; }
.cm-modal-box { background: #f8fafc; border-radius: 14px; width: min(1200px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); }
.cm-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; background: #fff; border-bottom: 1px solid #e4e8ef; border-radius: 14px 14px 0 0; }
.cm-modal-title { flex: 1; min-width: 0; }
.cm-modal-name { font-size: 17px; font-weight: 800; color: #0f172a; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-modal-name code { font-size: 12px; font-weight: 500; background: #f1f5f9; padding: 1px 6px; border-radius: 4px; color: #475569; }
.cm-modal-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; color: #334155; margin-top: 4px; }
.cm-modal-sub a { color: #2563eb; text-decoration: none; }
.cm-modal-sub .cm-more { margin-top: 0; }
.cm-modal-x { border: none; background: none; font-size: 28px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 4px; }
.cm-modal-x:hover { color: #0f172a; }
.cm-modal-body { padding: 14px 18px 18px; overflow-y: auto; }
body.cm-modal-open { overflow: hidden; }
.cm-dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.cm-dcard { border: 1px solid #e4e8ef; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 13px; }
.cm-dcard.cm-focus { border-color: #93c5fd; box-shadow: 0 0 0 2px #dbeafe; }
.cm-dcards { align-items: start; }
.cm-dhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; user-select: none; }
.cm-dhead::-webkit-details-marker { display: none; }
.cm-dhead::before { content: "▸"; color: #94a3b8; font-size: 12px; }
.cm-dcard[open] > .cm-dhead::before { content: "▾"; }
.cm-dcard[open] > .cm-dhead { margin-bottom: 8px; }
.cm-dcard:not([open]):hover { border-color: #93c5fd; }
.cm-dtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cm-dtools .cm-sub { margin-right: auto; }
.cm-dtools .cm-more { margin-top: 0; }
.cm-dhead b { font-size: 14px; color: #0f172a; }
.cm-dcard dl { display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px; margin: 0; }
.cm-dcard dt { color: #64748b; font-size: 12px; }
.cm-dcard dd { margin: 0; color: #0f172a; }
.cm-pl { margin-top: 8px; border-top: 1px dashed #e4e8ef; padding-top: 6px; }
.cm-pl summary { cursor: pointer; font-size: 12.5px; color: #1d4ed8; font-weight: 600; list-style: none; user-select: none; }
.cm-pl summary::-webkit-details-marker { display: none; }
.cm-pl summary::before { content: "▸ "; }
.cm-pl[open] summary::before { content: "▾ "; }
.cm-pl[open] summary { margin-bottom: 6px; }
.cm-list { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #0f172a; max-height: 220px; overflow-y: auto; }
.cm-pl + .cm-pl { margin-top: 4px; border-top: none; padding-top: 2px; }
.cm-plates { display: flex; flex-wrap: wrap; gap: 4px; max-height: 220px; overflow-y: auto; }
.cm-plates span { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: #334155; background: #f1f5f9; border-radius: 5px; padding: 1px 6px; }
@media (max-width: 1000px) {
    .cm-form { grid-template-columns: 1fr 1fr; }
    .cm-row { grid-template-columns: 28px minmax(0, 1fr); }
    .cm-contact { grid-column: 2; text-align: left; }
}
.cm-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 8px; }
.cm-topbar .cm-count { margin: 0; flex: 1; min-width: 240px; }
.cm-sort { font-size: 12.5px; color: #475569; display: flex; align-items: center; gap: 6px; }
.cm-sort select { height: 30px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; }
.cm-pager { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; padding: 12px 0 4px; }
.cm-pager[hidden] { display: none; }
.cm-pg { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #1e293b; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cm-pg:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; }
.cm-pg:disabled { opacity: .4; cursor: default; }
.cm-pg.cm-pg-on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.cm-pg-gap { color: #94a3b8; padding: 0 4px; }
.cm-hit { background: #fef08a; color: #0f172a; border-radius: 3px; padding: 0 2px; }

/* кілька країн */
.cm-ms { position: relative; }
.cm-ms-btn { box-sizing: border-box; width: 100%; height: 38px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 30px 0 10px; font: inherit; font-size: 14px; font-weight: 600; color: #0f172a; background: #fff; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.cm-ms-btn::after { content: "▾"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #64748b; }
.cm-ms-btn.cm-ms-empty { color: #94a3b8; font-weight: 500; }
.cm-ms-pop { position: absolute; z-index: 50; top: 42px; left: 0; width: max(100%, 280px); background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.15); padding: 8px; }
.cm-ms-pop[hidden] { display: none; }
.cm-ms-q { box-sizing: border-box; width: 100%; height: 34px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13.5px; margin-bottom: 6px; }
.cm-ms-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.cm-ms-item { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13.5px !important; font-weight: 500 !important; color: #0f172a !important; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cm-ms-item:hover { background: #f1f5f9; }
.cm-ms-item[hidden] { display: none !important; }
.cm-ms-item input { width: 16px; height: 16px; margin: 0; }
.cm-ms-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #f1f5f9; }
.cm-ms-foot .cm-more { margin-top: 0; }
.cm-ms-done { height: 30px !important; padding: 0 14px; font-size: 13px; }
/* посилання на Lardi / профіль */
.cm-lardi { font-size: 11.5px; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 8px; padding: 1px 8px; text-decoration: none; white-space: nowrap; }
.cm-lardi:hover { background: #bbf7d0; }

/* компактніше по вертикалі (сторінка «Перевізники») */
.main-content .top-bar { margin-bottom: 10px; }
.main-content .filters-bar { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.main-content .filters-bar .search-input { flex: 1; }
.cm-open { flex-shrink: 0; }
.cm-panel { padding: 10px 14px; margin-bottom: 10px; }
.cm-head { margin-bottom: 6px; }
.cm-results { margin-top: 8px; max-height: 68vh; }
.cm-row { padding: 6px 4px; gap: 10px; }
.cm-facts { margin-top: 2px; gap: 2px 12px; }
.cm-more { margin-top: 3px; padding: 2px 9px; }
.cm-count, .cm-topbar { margin-bottom: 4px; }
.cm-pager { padding: 8px 0 2px; }

/* розділи картки перевізника: згортаються кліком по заголовку */
.cm-coll > .card-section-title, .cm-coll > .ch-title { cursor: pointer; user-select: none; position: relative; padding-right: 34px; }
.cm-coll > .card-section-title::after, .cm-coll > .ch-title::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 13px; }
.cm-coll.cm-collapsed > .card-section-title::after, .cm-coll.cm-collapsed > .ch-title::after { content: "▸"; }
.cm-coll.cm-collapsed > :not(.card-section-title):not(.ch-title):not(.eqc-title):not(.regc-title):not(.pa-title) { display: none !important; }
.cm-coll > .card-section-title:hover, .cm-coll > .ch-title:hover { filter: brightness(.97); }
/* тягачі в картці */
.cm-fleet-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cm-fleet-sum > div { background: #f8fafc; border: 1px solid #e4e8ef; border-radius: 8px; padding: 6px 12px; display: flex; flex-direction: column; min-width: 80px; }
.cm-fleet-sum b { font-size: 18px; color: #0f172a; }
.cm-fleet-sum span { font-size: 11.5px; color: #64748b; }
.cm-fleet-total { background: #eff6ff !important; border-color: #bfdbfe !important; }
.cm-fleet-total b { color: #1d4ed8 !important; }
.cm-fleet-q { box-sizing: border-box; width: 100%; height: 32px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; margin-bottom: 6px; }
.cm-fleet-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.cm-fleet-row { display: grid; grid-template-columns: 100px 120px 1fr; gap: 8px; align-items: baseline; padding: 3px 4px; border-bottom: 1px dashed #eef1f5; font-size: 12.5px; }
.cm-fleet-row[hidden] { display: none; }
.cm-fleet-row code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 600; color: #0f172a; }
.cm-row-last { background: #fffbeb; box-shadow: inset 3px 0 0 #f59e0b; border-radius: 6px; }

/* «Не підходить» */
.cm-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-hide { color: #1d4ed8 !important; }
.cm-unhide { color: #15803d !important; }
.cm-hidden-tag { background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: 11.5px; padding: 1px 8px; border-radius: 8px; }
.cm-hidden-toggle { margin-top: 0 !important; }
.cm-note { color: #92400e; font-size: 12.5px; }
.cm-hide-box { margin-top: 6px; }
.cm-hide-box[hidden] { display: none; }
.cm-hide-form { border: 1px solid #fecaca; background: #fff7f7; border-radius: 8px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.cm-hide-reasons { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cm-hide-reasons label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.cm-hide-other { height: 26px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0 6px; font: inherit; font-size: 12.5px; }
.cm-hide-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-hide-period select { height: 28px; border: 1px solid #e2e8f0; border-radius: 6px; font: inherit; font-size: 13px; }
.cm-hide-save { height: 28px !important; padding: 0 12px; font-size: 13px; }
.cm-hide-period .cm-more { margin-top: 0; }

/* відгук після дзвінка */
.cm-fb-outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-fb-o { border: 1px solid #e2e8f0; background: #fff; border-radius: 16px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.cm-fb-o:hover { border-color: #93c5fd; }
.cm-fb-o.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.cm-fb-comment { width: 100%; box-sizing: border-box; height: 30px !important; }
.cm-hide-period label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.cm-hide-save:disabled { opacity: .5; }
.cm-fb:empty { display: none; }
.cm-fb-last { font-size: 12.5px; background: #eef2ff; color: #1e293b; border-radius: 8px; padding: 1px 8px; }
.cm-fb-list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cm-fb-item { padding: 3px 0; border-bottom: 1px dashed #eef1f5; }
/* Номери сторінок прилипають до низу списку — їх видно без прокрутки до кінця */
.cm-results .cm-pager { position: sticky; bottom: 0; z-index: 2; background: #fff; box-shadow: 0 -8px 12px -10px rgba(15, 23, 42, .25); margin: 0 -4px; padding: 8px 4px 6px; }
/* Згортаються й блоки «Зараз у черзі», «Реєстр перевізників», «Кабінет перевізника» */
.cm-coll > .eqc-title, .cm-coll > .regc-title, .cm-coll > .pa-title { cursor: pointer; user-select: none; position: relative; padding-right: 30px; }
.cm-coll > .eqc-title::after, .cm-coll > .regc-title::after, .cm-coll > .pa-title::after { content: "▾"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 13px; font-weight: 400; }
.cm-coll.cm-collapsed > .eqc-title::after, .cm-coll.cm-collapsed > .regc-title::after, .cm-coll.cm-collapsed > .pa-title::after { content: "▸"; }
.cm-coll.cm-collapsed > :not(.card-section-title):not(.ch-title):not(.eqc-title):not(.regc-title):not(.pa-title) { display: none !important; }
.cm-coll.cm-collapsed > .eqc-title, .cm-coll.cm-collapsed > .regc-title, .cm-coll.cm-collapsed > .pa-title { margin-bottom: 0; }
.cm-coll-all { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #334155; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.cm-coll-all:hover { background: #f8fafc; border-color: #cbd5e1; }
.cm-coll-all[hidden] { display: none; }
.cm-coll-all i { font-size: 16px; }
