/* Раздел «Клиенты»: карточка клиента (макет dtQSU) и «Дубли» (макет omNhM). Цвета — var(--ive-*). */

/* Шапка карточки */
.cus-head { align-items: center; flex-wrap: nowrap; }
@media (max-width: 1100px) { .cus-head { flex-wrap: wrap; } }
.cus-head .cus-head__who { flex: 1 1 auto; }
.cus-head__who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cus-ava { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--ive-pink-soft); color: var(--ive-pink); font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cus-head__text { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cus-head__name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cus-head__phone { font-size: 17px; font-weight: 500; color: var(--ive-ink-2); white-space: nowrap; }
.cus-head__phone.is-full { font-variant-numeric: tabular-nums; color: var(--ive-ink); }
.cus-head__reveal .fi-link { font-size: 13px; font-weight: 600; color: var(--ive-pink); }
.cus-head__reveal .fi-link .fi-icon { color: var(--ive-pink); }
.cus-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cus-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; white-space: nowrap; border-radius: 999px; background: var(--ive-bg); font-size: 13px; font-weight: 600; color: var(--ive-ink-2); }
.cus-chip svg { width: 14px; height: 14px; }
.cus-chip--ok { background: var(--ive-green-soft); color: var(--ive-green-dark); }
.cus-chip--pink { background: var(--ive-pink-soft); color: var(--ive-pink); }
.cus-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ive-bg-2); color: var(--ive-ink-2); white-space: nowrap; }
.cus-pill--ok { background: var(--ive-green-soft); color: var(--ive-green-dark); }
.cus-pill--warn { background: var(--ive-late-soft); color: var(--ive-warn-text); }
.cus-pill--bad { background: var(--ive-bad-soft); color: var(--ive-bad-text); }
.cus-pill--pink { background: var(--ive-pink); color: #fff; }

/* Колонки карточки */
.cus-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.cus-main, .cus-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1180px) { .cus-cols { grid-template-columns: minmax(0, 1fr); } }
.cus-panel-head { display: flex; flex-direction: column; gap: 3px; padding-bottom: 10px; }
.cus-panel-head p { margin: 0; font-size: 13px; color: var(--ive-ink-2); }
.cus-seg { background: var(--ive-bg-2); }
.cus-seg button { padding: 6px 12px; font-size: 13px; }
.cus-muted { margin: 0; font-size: 13px; color: var(--ive-ink-3); }
.cus-link { font-size: 13px; font-weight: 600; color: var(--ive-pink) !important; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }

/* Таблицы в панелях */
.cus-table-wrap { overflow-x: auto; }
.cus-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cus-table th { padding: 10px 7px; font-size: 12px; font-weight: 600; color: var(--ive-ink-3); text-align: left; border-bottom: 1px solid var(--ive-line); white-space: nowrap; }
.cus-table--head th { background: var(--ive-bg-2); border-bottom: 0; font-weight: 700; padding: 9px 10px; }
.cus-table--head th:first-child { border-radius: 10px 0 0 10px; }
.cus-table--head th:last-child { border-radius: 0 10px 10px 0; }
.cus-table td { padding: 11px 7px; border-bottom: 1px solid var(--ive-line); vertical-align: middle; color: var(--ive-ink); }
.cus-table--head td { padding: 10px; }
.cus-table tbody tr:last-child td { border-bottom: 0; }
.cus-table .num { text-align: right; white-space: nowrap; }
.cus-table .muted { color: var(--ive-ink-2); white-space: nowrap; }
.cus-table .w-date { width: 96px; }
.cus-table .w-op { width: 160px; }
.cus-table .w-pct { width: 48px; }
.cus-table .w-sum { width: 84px; }
.cus-op { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.cus-op i { width: 8px; height: 8px; border-radius: 50%; background: var(--ive-green); flex: none; }
.cus-op--minus i { background: var(--ive-pink); }
.cus-op--expire i { background: var(--ive-late); }
.cus-basis { font-size: 14px; color: var(--ive-ink); }
.cus-by { display: block; font-size: 12px; color: var(--ive-ink-3); }
.cus-sum { font-weight: 700; }
.cus-sum.is-plus { color: var(--ive-green-dark); }
.cus-sum.is-minus { color: var(--ive-ink); }
.cus-id { display: block; margin-top: 4px; max-width: 150px; font-size: 11px; line-height: 1.3; color: var(--ive-ink-3); word-break: break-all; font-variant-numeric: tabular-nums; }

/* Профиль */
.cus-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 760px) { .cus-profile { grid-template-columns: 1fr; } }
.cus-kv { margin: 0; display: flex; flex-direction: column; }
.cus-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ive-line); font-size: 13px; }
.cus-kv dt { color: var(--ive-ink-3); }
.cus-kv dd { margin: 0; font-weight: 600; color: var(--ive-ink); text-align: right; }
.cus-kv dd.is-muted { color: var(--ive-ink-3); font-weight: 500; }
.cus-refs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.cus-ref { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--ive-bg-2); }
.cus-ref b { font-size: 13px; font-weight: 600; color: var(--ive-ink); }
.cus-ref small { font-size: 12px; color: var(--ive-ink-3); }

/* Правая колонка */
.cus-balance { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 20px; background: #141418; color: #fff; }
.cus-balance__cap { font-size: 14px; color: #A9A9B4; }
.cus-balance__sum { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.cus-balance__sum small { font-size: 16px; font-weight: 600; color: #A9A9B4; letter-spacing: 0; }
.cus-balance__none { font-size: 16px; font-weight: 600; color: #D4D4DA; }
.cus-balance__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cus-balance__tiles div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.cus-balance__tiles small { font-size: 11px; color: #A9A9B4; }
.cus-balance__tiles b { font-size: 15px; font-weight: 700; }
.cus-balance__note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(248,7,92,.16); font-size: 12px; color: #FFD2E1; }
.cus-balance__note svg { flex: none; width: 16px; height: 16px; color: var(--ive-pink); }
.cus-balance__rules summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #FFD2E1; }
.cus-balance__rules div { margin-top: 8px; max-height: 14rem; overflow: auto; white-space: pre-line; font-size: 12px; color: #D4D4DA; }
.cus-side-panel { padding: 16px 18px; }
.cus-side-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 6px; }
.cus-side-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ive-ink); }
.cus-side-head .cus-side-title { margin: 0; }
.cus-exp { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--ive-ink-2); }
.cus-exp b { color: var(--ive-ink); font-weight: 700; }
.cus-order { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--ive-line); }
.cus-order > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cus-order b { font-size: 14px; font-weight: 700; color: var(--ive-ink); }
.cus-order small { font-size: 12px; color: var(--ive-ink-2); }
.cus-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ive-ink-2); text-align: right; }
.cus-status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ive-ink-3); }
.cus-status.is-ready i { background: var(--ive-green); }

/* ---------- Дубли ---------- */
.dup-cols { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1180px) { .dup-cols { grid-template-columns: minmax(0, 1fr); } }
.dup-list { padding: 14px 16px; display: flex; flex-direction: column; gap: 0; }
.dup-list__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; }
.dup-list__head span { font-size: 13px; color: var(--ive-ink-3); }
.dup-search { margin-bottom: 8px; }
.dup-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border: 0; border-bottom: 1px solid var(--ive-line); border-radius: 0; background: transparent; text-align: left; cursor: pointer; }
.dup-item:last-child { border-bottom: 0; }
.dup-item.is-on { background: var(--ive-pink-soft); border-radius: 12px; border-bottom-color: transparent; }
.dup-item__ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--ive-bg-2); color: var(--ive-ink-2); display: flex; align-items: center; justify-content: center; }
.dup-item.is-on .dup-item__ico { background: var(--ive-bg); color: var(--ive-pink); }
.dup-item__ico svg { width: 17px; height: 17px; }
.dup-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dup-item__text b { font-size: 13px; font-weight: 700; color: var(--ive-ink); }
.dup-item__text small { font-size: 12px; color: var(--ive-ink-3); }
.dup-st { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dup-st svg { width: 13px; height: 13px; }
.dup-st--new { background: var(--ive-late-soft); color: var(--ive-warn-text); }
.dup-st--linked { background: var(--ive-green-soft); color: var(--ive-green-dark); }
.dup-st--different { background: var(--ive-bg-2); color: var(--ive-ink-2); }
.dup-cmp { display: flex; flex-direction: column; gap: 14px; }
.dup-cmp__head { display: flex; flex-direction: column; gap: 6px; }
.dup-cmp__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dup-cmp__row h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ive-ink); }
.dup-cmp__head p { margin: 0; font-size: 13px; color: var(--ive-ink-2); }
.dup-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dup-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 20px; background: var(--ive-bg); border: 1px solid var(--ive-line); }
.dup-card.is-main { border: 1.5px solid var(--ive-pink); }
.dup-card.is-off { opacity: .6; }
.dup-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 2px; flex-wrap: wrap; }
.dup-card__top small { font-size: 12px; font-weight: 600; color: var(--ive-ink-3); }
.dup-card__name { font-size: 16px; font-weight: 700; color: var(--ive-ink); word-break: break-word; }
.dup-card .cus-kv { padding: 4px 0 6px; }
.dup-card .cus-kv div:last-child { border-bottom: 0; }
.dup-card__btns { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.dup-card__btns .fi-btn { width: 100%; justify-content: center; border-radius: 10px !important; }
.dup-btn-off { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 0; border-radius: 10px; background: var(--ive-bg-2); font-size: 13px; font-weight: 600; color: var(--ive-ink-3); }
.dup-btn-off svg { width: 15px; height: 15px; }
.dup-card__ls { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--ive-pink) !important; }
.dup-card__ls svg { width: 14px; height: 14px; }
.dup-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--ive-blue-soft); color: var(--ive-blue); font-size: 13px; }
.dup-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.dup-foot { display: flex; justify-content: flex-end; }
