/* Afills -> Mapping: палитра как в Statistics v2 (тёмная, акцент #ff4b5c) */
.afm { display: flex; flex-direction: column; gap: 12px; background: #141414; border-radius: var(--r-16); padding: 16px; color: #e5e5e5; }
.afm-counters { display: flex; flex-wrap: wrap; gap: 8px; }
.afm-pill { display: inline-flex; gap: 6px; align-items: baseline; background: #262a33; border: 1px solid #353b47; border-radius: var(--r-999); padding: 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.afm-pill b { color: #f5f5f5; }
.afm-pill.warn b { color: #fbbf24; }
.afm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.afm-toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8a8a8a; }
.afm .afm-toolbar label.afm-check { flex-direction: row; align-items: center; height: 38px; color: #d4d4d4; font-size: 13px; gap: 6px; }
.afm select.afm-ctl, .afm input.afm-ctl { height: 38px; padding: 0 10px; border-radius: var(--r-10); border: 1px solid #2c2c2c; background: var(--c-1f1f1f); color: #f5f5f5; font-size: 13px; }
.afm input.afm-ctl[type="search"] { min-width: 220px; }
.afm button.afm-btn { height: 38px; padding: 0 14px; border-radius: var(--r-10); border: 1px solid #2c2c2c; background: var(--c-1f1f1f); color: #e5e5e5; font-size: 13px; cursor: pointer; }
.afm button.afm-btn:hover:not(:disabled) { border-color: var(--sv2-red-strong); color: #fff; }
.afm button.afm-btn.primary { background: var(--sv2-red-strong); border-color: var(--sv2-red-strong); color: var(--sv2-on-red); font-weight: 700; }
.afm button.afm-btn:disabled { opacity: .5; cursor: default; }
.afm-msg { font-size: 13px; color: #a3a3a3; white-space: pre-wrap; }
.afm-msg.err { color: #f87171; }
.afm-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--c-3a3a3a); border-radius: var(--r-12); background: rgba(255,75,92,.06); font-size: 13px; }
.afm-bulk[hidden] { display: none; }
.afm-wrap { overflow-x: auto; }
.afm table.afm-table { border-collapse: collapse; width: 100%; font-size: 12px; background: #1b1b1b; border-radius: var(--r-10); font-variant-numeric: tabular-nums; }
.afm table.afm-table th, .afm table.afm-table td { padding: 6px 8px; border-bottom: 1px solid var(--c-2a2a2a); text-align: left; white-space: nowrap; color: #e5e5e5; }
.afm table.afm-table thead th { background: #232323; color: #a3a3a3; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; position: sticky; top: 0; }
.afm table.afm-table td.num, .afm table.afm-table th.num { text-align: right; }
.afm table.afm-table tbody tr:hover td { background: rgba(255,255,255,.03); }
.afm table.afm-table tr.unassigned td:nth-child(4) { box-shadow: inset 2px 0 0 #fbbf24; }
.afm table.afm-table select.afm-ctl { height: 30px; border-radius: var(--r-8); max-width: 220px; }
.afm-cid { color: #8a8a8a; margin-left: 4px; }
.afm-noname { color: #8a8a8a; font-style: italic; }
.afm button.afm-suggest { margin-left: 6px; border: 1px solid #ca8a04; background: rgba(202,138,4,.12); color: #fbbf24; border-radius: var(--r-999); font-size: 11px; padding: 2px 8px; cursor: pointer; }
.afm button.afm-suggest:disabled { opacity: .5; cursor: default; }
.afm-badge { display: inline-block; margin-left: 6px; border-radius: var(--r-999); font-size: 10px; padding: 1px 6px; border: 1px solid #ca8a04; color: #fbbf24; }
.afm-ok { color: #4ade80; }
.afm-err { color: #f87171; white-space: normal; max-width: 260px; display: inline-block; }
.afm-saving { color: #8a8a8a; }
@media (max-width: 520px) {
    .afm { padding: 10px; }
    .afm input.afm-ctl[type="search"] { min-width: 0; width: 100%; }
}
