/* v3-clients.css — «Клиенты» по design-canvas/Clients.dc.html (1 в 1). */
.v3c { display: flex; gap: 14px; height: 100%; min-height: 0; }

/* ── Список ── */
.v3c-list { width: clamp(288px, 32%, 340px); flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden;
  container: v3clist / inline-size; }
.v3c-lin { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex-grow: 1; }
.v3c-lhead { display: flex; align-items: center; gap: 10px; padding: 0 4px 0 8px; }
.v3c-total { font-size: 13px; font-weight: 650; color: var(--t-ink-3); font-variant-numeric: tabular-nums; }
.v3c-new { display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; height: 32px;
  padding: 0 16px 0 12px; border: 0; border-radius: 16px; background: var(--t-blue-grad); color: #fff; font: inherit;
  font-size: 13px; font-weight: 650; cursor: pointer; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -6px rgba(10,95,208,.85); }
.v3c-new:hover { background: linear-gradient(180deg, #5cb0ff, #1a7cea); }
.v3c-search { display: flex; align-items: center; gap: 8px; height: 40px; width: 100%; box-sizing: border-box; padding: 0 14px;
  border-radius: 20px; background: var(--t-nested); border: 1px solid var(--t-line); flex-shrink: 0; }
.v3c-search input { border: 0; outline: none; background: transparent; flex-grow: 1; min-width: 0; font: inherit;
  font-size: 14px; color: var(--t-ink); }
.v3c-filters { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.v3c-seg { display: flex; gap: 3px; padding: 3px; border-radius: 17px; background: var(--t-nested); border: 1px solid var(--t-line); }
.v3c-seg button { white-space: nowrap; border: 0; padding: 7px 12px; border-radius: 14px; font: inherit; font-size: 13.5px;
  font-weight: 650; background: transparent; color: var(--t-ink-2); cursor: pointer; }
.v3c-seg button.on { background: var(--t-surface); color: var(--t-blue-ink); box-shadow: 0 1px 3px rgba(22,26,36,.16); }
.v3c-mgr { min-width: 0; flex: 1 1 110px; }   /* рядом с юрлицами, пока влезает хотя бы «Все менедж…»; иначе — строкой ниже */
.v3c-mbtn { display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; height: 38px; padding: 0 12px 0 14px; border-radius: 19px; width: 100%;
  border: 1px solid var(--t-line); background: var(--t-nested); color: var(--t-ink); font: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; min-width: 0; max-width: 100%; }
.v3c-mbtn span { overflow: hidden; text-overflow: ellipsis; }
.v3c-mbtn svg { color: var(--t-ink-3); flex-shrink: 0; }
/* список менеджеров — у правого края панели, чтобы не обрезался */
.v3c-mgr .dd-menu { left: auto !important; right: 0 !important; min-width: 190px !important; }
.v3c-rows { flex-grow: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; scrollbar-width: none; }
.v3c-rows::-webkit-scrollbar { display: none; }
.v3c-row { flex-shrink: 0; width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: 20px;
  text-align: left; color: var(--t-ink); background: var(--t-surface); border: 1px solid var(--t-line); margin: 1px;
  box-sizing: border-box; cursor: pointer; font: inherit; }
.v3c-row:hover { background: var(--t-row); }
.v3c-row.on { background: var(--t-blue-soft); border: 2px solid var(--t-blue); margin: 0; }
.v3c-r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v3c-tag { font-size: 11.5px; font-weight: 750; padding: 2px 7px; border-radius: 8px; background: var(--t-nested);
  color: var(--t-ink-2); flex-shrink: 0; }
.v3c-name { font-size: 15px; font-weight: 700; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3c-flag { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
.v3c-flag.debt { background: rgba(224,49,63,.12); color: #b3202e; }
.v3c-flag.new { background: rgba(10,95,208,.1); color: var(--t-blue-ink); }
.v3c-r2 { display: flex; gap: 6px; font-size: 12.5px; color: var(--t-ink-3); min-width: 0; white-space: nowrap; }
.v3c-r2 .grow { overflow: hidden; text-overflow: ellipsis; }
.v3c-more { flex-shrink: 0; height: 38px; border-radius: 19px; border: 1px dashed var(--t-line-2); background: transparent;
  color: var(--t-blue); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; margin: 4px 1px; }
.v3c-empty { color: var(--t-ink-3); padding: 18px 8px; text-align: center; }

/* ── Карточка ── */
.v3c-card { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  container: v3ccard / inline-size; }
.v3c-cempty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--t-ink-3); }
.v3c-chead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 22px 22px 18px 28px;
  border-bottom: 1px solid rgba(60,66,78,.1); }
/* заголовок не сжимается в столбик: при нехватке места кнопки уходят строкой ниже */
.v3c-ctitle { display: flex; flex-direction: column; gap: 5px; flex: 1 1 240px; min-width: 0; }
.v3c-cacts { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.v3c-cpills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.v3c-corg { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--t-nested); color: var(--t-ink-2);
  white-space: nowrap; }
.v3c-cmeta { font-size: 13px; color: var(--t-ink-3); min-width: 0; }
.v3c-ctitle h2 { margin: 2px 0 0; font-size: clamp(22px, 4.4cqi, 30px); line-height: 1.15; font-weight: 750; letter-spacing: -.03em;
  overflow-wrap: break-word; }
.v3c-creq { font-size: 14px; color: var(--t-ink-2); }
.v3c-creq > span { white-space: nowrap; }
.v3c-sec { display: flex; align-items: center; gap: 7px; white-space: nowrap; height: 40px; padding: 0 18px 0 14px; border-radius: 20px;
  border: 1px solid var(--t-line); background: var(--t-surface); color: var(--t-ink); font: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(22,26,36,.06); cursor: pointer; flex-shrink: 0; }
.v3c-sec:hover, .v3c-dots:hover { background: var(--t-row); }
.v3c-ddmore { position: relative; flex-shrink: 0; }
.v3c-dots { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--t-line); background: var(--t-surface);
  color: var(--t-ink-2); box-shadow: 0 1px 2px rgba(22,26,36,.06); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; }
.v3c-ddmore .dd-menu { left: auto !important; right: 0 !important; min-width: 280px !important; }

.v3c-cbody { flex-grow: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 28px 26px; }
/* плитки: 4 в ряд, в узкой карточке — 2; сумма не режется, а чуть уменьшается под ширину плитки */
.v3c-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.v3c-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v3c-tile { min-width: 0; padding: 14px 16px; border-radius: 22px; border: 1px solid var(--t-line);
  display: flex; flex-direction: column; gap: 3px; container-type: inline-size; }
.v3c-tile .k { font-size: 12.5px; font-weight: 700; color: var(--t-ink-3); }
.v3c-tile .v { font-size: clamp(17px, 18.2cqi, 26px); line-height: 1.25; font-weight: 760; letter-spacing: -.03em; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.v3c-tile .n { font-size: 12.5px; color: var(--t-ink-3); }
.v3c-tile .v.long { font-size: clamp(15px, 14cqi, 24px); }
.v3c-tile.acc { background: var(--t-blue-tint); border: 1.5px solid rgba(10,95,208,.35); }
.v3c-tile.acc .k { color: var(--t-blue-ink); }
.v3c-tile.bad { background: rgba(224,49,63,.07); border: 1.5px solid rgba(224,49,63,.3); }
.v3c-tile.bad .k { color: #b3202e; }

.v3c-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.v3c-sect { display: flex; flex-direction: column; gap: 10px; }
.v3c-sh { display: flex; align-items: baseline; gap: 10px; }
.v3c-sh h3 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -.015em; flex-grow: 1; }
.v3c-sh a { font-size: 13.5px; font-weight: 650; color: var(--t-blue); text-decoration: none; white-space: nowrap; }
.v3c-shn { font-size: 13px; color: var(--t-ink-3); }
.v3c-tbl { border-radius: 20px; border: 1px solid var(--t-line); overflow: hidden; display: flex; flex-direction: column; }
.v3c-orow, .v3c-prow { width: 100%; display: grid; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid rgba(60,66,78,.08);
  background: transparent; color: var(--t-ink); font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.v3c-orow:hover, .v3c-prow:hover { background: var(--t-row); }
.v3c-orow { grid-template-columns: 70px minmax(0, 1fr) 170px 64px 96px 16px; padding: 12px 16px; }
.v3c-num { font-size: 12px; font-weight: 750; padding: 2px 8px; border-radius: 8px; background: #1c1c1e; color: #fff;
  justify-self: start; white-space: nowrap; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.v3c-ot { display: flex; flex-direction: column; min-width: 0; }
.v3c-ot b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3c-ot span { font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3c-ocab { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3c-mc { font-size: 11.5px; padding: 2px 8px; }
.v3c-noko { font-size: 11.5px; font-weight: 750; padding: 2px 8px; border-radius: 8px; white-space: nowrap;
  background: rgba(224,49,63,.12); color: #b3202e; }
.v3c-osum, .v3c-psum { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v3c-prow { grid-template-columns: 70px minmax(0, 1fr) 150px 100px; padding: 11px 16px; }
.v3c-pd { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.v3c-pt { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.v3c-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.v3c-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 22px; background: var(--t-nested); min-width: 0; }
.v3c-bl { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-ink-3); }
.v3c-contact { display: flex; flex-direction: column; padding: 9px 11px; border-radius: 14px; background: var(--t-surface);
  color: var(--t-ink); text-decoration: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.v3c-contact span { font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3c-contact b { font-weight: 700; color: var(--t-blue); font-variant-numeric: tabular-nums; }
.v3c-doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--t-surface);
  border: 0; color: var(--t-ink); font: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box; }
.v3c-dico { width: 34px; height: 40px; border-radius: 8px; background: #d22b39; color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; box-sizing: border-box; flex-shrink: 0; }
.v3c-dico.draft { background: #8a8f98; }
.v3c-dt { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.v3c-dt b { font-weight: 650; font-size: 13.5px; }
.v3c-dt span { font-size: 12px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .v3c-num { background: #3a3d45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .v3c-num { background: #3a3d45; } }

/* ── Карточка подстраивается под свою ширину (справа от списка на 950px и во всю ширину на 1920px) ── */
@container v3ccard (max-width: 779px) {
  .v3c-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3c-orow { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 120px) 64px auto 16px; }
  .v3c-prow { grid-template-columns: 56px minmax(0, 1fr) auto auto; }
}
/* узкая карточка: у объекта и оплаты второстепенное уходит второй строкой */
@container v3ccard (max-width: 639px) {
  .v3c-orow { grid-template-columns: auto minmax(0, 1fr) auto 16px; row-gap: 6px;
    grid-template-areas: "ot ot sum arr" "num cab mc arr"; }
  .v3c-orow > .v3c-num { grid-area: num; }
  .v3c-orow > .v3c-ot { grid-area: ot; }
  .v3c-orow > .v3c-ocab { grid-area: cab; font-size: 12.5px; color: var(--t-ink-3); }
  .v3c-orow > .v3c-omc { grid-area: mc; justify-self: end; }
  .v3c-orow > .v3c-osum { grid-area: sum; }
  .v3c-orow > svg { grid-area: arr; }
  .v3c-prow { grid-template-columns: 48px minmax(0, 1fr) auto; row-gap: 4px;
    grid-template-areas: "pd pt psum" "pd pp psum"; }
  .v3c-prow > .v3c-pd { grid-area: pd; }
  .v3c-prow > .v3c-pt { grid-area: pt; }
  .v3c-prow > .v3c-ppill { grid-area: pp; justify-self: start; }
  .v3c-prow > .v3c-psum { grid-area: psum; }
}
@container v3ccard (max-width: 559px) {
  .v3c-chead { padding: 18px 18px 16px 22px; }
  .v3c-cbody { padding: 18px 20px 22px; gap: 20px; }
  .v3c-boxes { grid-template-columns: minmax(0, 1fr); }
}
/* очень широкая карточка (1920): контакты и документы — колонкой справа, строки не тянутся на 1300px */
@container v3ccard (min-width: 1150px) {
  .v3c-cbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-content: start; gap: 22px 24px; }
  .v3c-tiles { grid-column: 1 / -1; }
  .v3c-main { grid-column: 1; }
  .v3c-boxes { grid-column: 2; grid-template-columns: minmax(0, 1fr); align-self: start; }
}

/* ══ Телефон: MobClients.dc.html (список) и MobClient.dc.html (карточка), 1 в 1 ══ */
@media (max-width: 860px) {
  .v3xc { display: flex; flex-direction: column; color: var(--t-ink); font-size: 15px; }
  .v3xc-top { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 8px; }
  .v3xc-bar { display: flex; align-items: center; gap: 10px; min-height: 40px; }
  .v3xc-cnt { font-size: 14px; font-weight: 650; color: var(--t-ink-3); font-variant-numeric: tabular-nums; }
  .v3xc-title { font-size: 30px; font-weight: 760; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
  .v3xc-new { width: 40px; height: 40px; border-radius: 20px; border: 0; padding: 0; flex-shrink: 0; cursor: pointer;
    background: var(--t-blue-grad); color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -6px rgba(10,95,208,.85); }
  .v3xc-ic { width: 40px; height: 40px; border-radius: 20px; border: 0; padding: 0; flex-shrink: 0; cursor: pointer;
    background: var(--t-surface); color: var(--t-ink); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 2px rgba(22,26,36,.08); }
  /* касание 44: круглые кнопки 40 — с невидимым запасом вокруг */
  .v3xc-new, .v3xc-ic { position: relative; }
  .v3xc-new::after, .v3xc-ic::after { content: ''; position: absolute; inset: -2px; }
  .v3xc-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }

  /* ── Список ── */
  .v3xc-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; box-sizing: border-box;
    border-radius: 22px; background: var(--t-surface); border: 1px solid var(--t-line); flex-shrink: 0; }
  .v3xc-search input { border: 0; outline: none; background: transparent; flex-grow: 1; min-width: 0; font: inherit;
    font-size: 16px; color: var(--t-ink); padding: 0; height: 100%; }
  .v3xc-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
  .v3xc-chips::-webkit-scrollbar { display: none; }
  .v3xc-chips button { flex-shrink: 0; white-space: nowrap; height: 36px; padding: 0 13px; border-radius: 18px; font: inherit;
    font-size: 14px; font-weight: 650; background: var(--t-surface); border: 1px solid var(--t-line); color: var(--t-ink); cursor: pointer; }
  .v3xc-chips button.on { background: var(--t-blue); color: #fff; border: 0; }
  /* широкий телефон и планшет (600–860): карточки клиентов в две колонки, а не растянутые на всю ширину */
  .v3xc-rows, .v3xc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
  .v3xc-rows > .v3xc-more, .v3xc-rows > .v3-empty, .v3xc-rows > .v3xc-wait { grid-column: 1 / -1; }
  .v3xc-row { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border-radius: 20px; background: var(--t-surface);
    color: var(--t-ink); border: 0; font: inherit; text-align: left; width: 100%; box-sizing: border-box; cursor: pointer; }
  .v3xc-row:active, .v3xc-item:active, .v3xc-act:active { background: var(--t-row); }
  .v3xc-r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .v3xc-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 9px; white-space: nowrap; flex-shrink: 0;
    background: var(--t-nested); color: var(--t-ink-2); }
  .v3xc-name { font-size: 16px; font-weight: 700; flex-grow: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v3xc-flag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 9px; white-space: nowrap; flex-shrink: 0; }
  .v3xc-flag.debt { background: rgba(224,49,63,.12); color: #b3202e; }
  .v3xc-flag.new { background: rgba(10,95,208,.1); color: var(--t-blue-ink); }
  .v3xc-r2 { display: flex; gap: 8px; font-size: 13.5px; color: var(--t-ink-3); min-width: 0; white-space: nowrap; }
  .v3xc-r2 .grow { overflow: hidden; text-overflow: ellipsis; }
  .v3xc-more { height: 44px; border-radius: 22px; border: 1px dashed var(--t-line-2); background: transparent; color: var(--t-blue);
    font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
  .v3xc-wait { color: var(--t-ink-3); padding: 18px 8px; text-align: center; }

  /* ── Карточка ── */
  .v3xc-line { font-size: 13.5px; color: var(--t-ink-3); padding: 0 4px; }
  .v3xc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .v3xc-tile { padding: 13px 14px; border-radius: 20px; background: var(--t-surface); border: 1px solid var(--t-line);
    display: flex; flex-direction: column; gap: 2px; min-width: 0; container-type: inline-size; }
  .v3xc-tile .k { font-size: 13px; font-weight: 700; color: var(--t-ink-3); }
  .v3xc-tile .v { font-size: clamp(17px, 20cqi, 24px); line-height: 1.25; font-weight: 760; letter-spacing: -.03em; white-space: nowrap;
    font-variant-numeric: tabular-nums; }
  .v3xc-tile .v.long { font-size: clamp(15px, 15cqi, 22px); }
  .v3xc-tile .n { font-size: 12.5px; color: var(--t-ink-2); }
  .v3xc-tile.acc { background: var(--t-blue-tint); border: 1.5px solid rgba(10,95,208,.35); }
  .v3xc-tile.acc .k { color: var(--t-blue-ink); }
  .v3xc-debt { font-size: 14px; }
  .v3xc-sh { display: flex; align-items: center; gap: 8px; padding: 6px 4px 0; min-height: 24px; }
  .v3xc-sh span { font-size: 18px; font-weight: 750; flex-grow: 1; }
  .v3xc-sh button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 650; color: var(--t-blue);
    padding: 12px 4px; margin: -12px -4px; cursor: pointer; white-space: nowrap; }
  .v3xc-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 20px; background: var(--t-surface);
    color: var(--t-ink); text-decoration: none; border: 0; font: inherit; text-align: left; width: 100%; box-sizing: border-box; cursor: pointer; }
  .v3xc-it { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
  .v3xc-it b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v3xc-it span { font-size: 13.5px; color: var(--t-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-variant-numeric: tabular-nums; }
  .v3xc-mc { font-size: 12px; padding: 2px 8px; flex-shrink: 0; }
  .v3xc-noko { font-size: 12px; font-weight: 750; padding: 2px 8px; border-radius: 8px; white-space: nowrap; flex-shrink: 0;
    background: rgba(224,49,63,.12); color: #b3202e; }
  .v3xc-tel { color: var(--t-blue); display: flex; flex-shrink: 0; }
  .v3xc-chev { color: #8a8f98; flex-shrink: 0; }
  .v3xc-note { font-size: 13px; color: var(--t-ink-3); padding: 0 4px; }

  /* ── Шторка «⋯» ── */
  .v3xc-acts { display: flex; flex-direction: column; border-radius: 20px; background: var(--t-nested); overflow: hidden; }
  .v3xc-act { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 0;
    border-bottom: 1px solid var(--t-line); background: none; color: var(--t-ink); font: inherit; font-size: 16px;
    font-weight: 600; text-align: left; cursor: pointer; justify-content: space-between; }
  .v3xc-act:last-child { border-bottom: 0; }
}
[data-theme="dark"] .v3xc-flag.debt, [data-theme="dark"] .v3xc-noko { background: rgba(255,90,100,.18); color: #ff9aa2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .v3xc-flag.debt, :root:not([data-theme]) .v3xc-noko { background: rgba(255,90,100,.18); color: #ff9aa2; }
}

/* Узкий список (содержимое уже 316px; на 1440 — 322, как в макете): имя получает всю первую строку,
   «долг / новый» уходит вправо второй строки — иначе имена режутся до «ЧЛ Андрей К…». */
@container v3clist (max-width: 315px) {
  .v3c-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 4px;
    grid-template-areas: "tag name name name" "sub sub mgr flag"; align-items: center; }
  .v3c-r1, .v3c-r2 { display: contents; }
  .v3c-row .v3c-tag { grid-area: tag; }
  .v3c-row .v3c-name { grid-area: name; }
  .v3c-row .v3c-flag { grid-area: flag; }
  .v3c-row .v3c-r2 > .grow { grid-area: sub; min-width: 0; font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; }
  .v3c-row .v3c-r2 > span:not(.grow) { grid-area: mgr; font-size: 12.5px; color: var(--t-ink-3); white-space: nowrap; }
}
/* Карточка средней ширины: плитки компактно в один ряд, а не огромные 2×2 */
@container v3ccard (min-width: 520px) and (max-width: 779px) {
  .v3c-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .v3c-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v3c-tile { padding: 11px 12px; border-radius: 18px; }
  .v3c-tile .k { font-size: 11.5px; }
  .v3c-tile .v { font-size: clamp(15px, 17cqi, 22px); }
  .v3c-tile .v.long { font-size: clamp(13px, 13cqi, 20px); }
  .v3c-tile .n { font-size: 11.5px; line-height: 1.3; }
}

/* Название клиента в списке — всегда полностью: переносится по словам, без «…».
   Остальное в строке (метка, «долг», менеджер) держится у верхней строки. */
.v3c-name, .v3xc-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word;
  line-height: 1.25; text-wrap: pretty; }
.v3c-r1, .v3xc-r1 { align-items: flex-start; }
.v3c-r1 > .v3c-tag, .v3c-r1 > .v3c-flag, .v3xc-r1 > :not(.v3xc-name) { margin-top: 1px; }
.v3c-r2, .v3xc-r2 { white-space: normal; }
.v3c-r2 .grow, .v3xc-r2 .grow { white-space: normal; overflow: visible; text-overflow: clip; }
.v3c-r2 > span:not(.grow), .v3xc-r2 > span:not(.grow) { white-space: nowrap; }
@container v3clist (max-width: 315px) {
  .v3c-row { align-items: start; }
  .v3c-row .v3c-r2 > .grow { white-space: normal; }
}
