/* RU: План «Карточка клиента» (КК1–КК3): карточка человека и список «Клиенты» в пульте и в шторке TermitChat. Цвета и размеры —
       из tokens.css; состояния различаются словами, а не только цветом.
   EN: The "Client card" plan: the person card and the client list in the panel and the TermitChat sheet. Tokens from tokens.css. */
.ccard2 { font-size: var(--fs-sm); min-width: 0; }
.cc-head { display: flex; gap: 10px; align-items: center; }
.cc-av { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-lg); }
.cc-who { min-width: 0; }
.cc-name { font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; overflow-wrap: anywhere; }
.cc-sub { color: var(--muted); font-size: var(--fs-xs); }
.cc-tag { display: inline-block; border-radius: var(--r-s); padding: 0 6px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.cc-tag.wait { background: var(--warn-soft); color: var(--warn); }
.cc-tag.bad { background: var(--bad-soft); color: var(--bad); }
.cc-muted { color: var(--muted); font-size: var(--fs-xs); margin: 4px 0; }
.cc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.cc-nums div { background: var(--surface-2); border-radius: var(--r-s); padding: 6px 4px; text-align: center; min-width: 0; }
.cc-nums b { display: block; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.cc-nums span { font-size: var(--fs-xs); color: var(--muted); }
.cc-stop { background: var(--bad-soft); color: var(--bad); border-radius: var(--r-s); padding: 6px 8px; margin: 6px 0; font-size: var(--fs-xs); }
.cc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cc-sec { border-top: 1px solid var(--line); padding: 4px 0; }
.cc-sec > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 6px 0; min-height: 32px; }
.cc-sec > summary::-webkit-details-marker { display: none; }
.cc-sec > summary::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.cc-sec[open] > summary::after { transform: rotate(90deg); }
.cc-cnt { color: var(--muted); font-weight: 400; font-size: var(--fs-xs); }
.cc-body { padding: 0 0 6px; }
.cc-cases { list-style: none; margin: 0; padding: 0; }
.cc-cases li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cc-cases li:last-child { border-bottom: 0; }
.cc-cases li > :first-child { overflow-wrap: anywhere; }
.cc-cases li .cc-muted { grid-column: 1 / -1; margin: 0; }
.cc-st { font-size: var(--fs-xs); border-radius: var(--r-s); padding: 1px 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; align-self: start; }
.cc-st.ok { background: var(--ok-soft); color: var(--ok); }
.cc-st.wait { background: var(--warn-soft); color: var(--warn); }
.cc-st.bad { background: var(--bad-soft); color: var(--bad); }
.cc-st.acc { background: var(--acc-soft); color: var(--acc-soft-ink); }
.cc-facts { margin: 0; }
.cc-fact { display: grid; grid-template-columns: minmax(90px, 40%) minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.cc-fact dt { color: var(--muted); }
.cc-fact dd { margin: 0; overflow-wrap: anywhere; }
.cc-from { font-size: 11px; color: var(--warn); background: var(--warn-soft); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.cc-link { background: none; border: 0; padding: 0; color: var(--acc); cursor: pointer; font: inherit; font-size: var(--fs-xs); text-decoration: underline; text-underline-offset: 3px; }
.cc-note { background: var(--surface-2); border-radius: var(--r-s); padding: 6px 8px; margin: 4px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.cc-note small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.cc-noteform { margin-top: 6px; }
.cc-lab { display: block; font-size: var(--fs-xs); color: var(--muted); }
.cc-lab textarea, .cc-lab input { display: block; width: 100%; margin: 4px 0 6px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-field); border-radius: var(--r-s); padding: 7px 9px; }
.cc-btn { font: inherit; font-size: var(--fs-sm); border: 1px solid var(--line-field); background: var(--surface); color: var(--ink); border-radius: var(--r-s); padding: 6px 12px; cursor: pointer; min-height: var(--btn-h-s); }
.cc-btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.cc-btn.danger { color: var(--bad); border-color: var(--bad); }
.cc-btn:focus-visible, .cc-link:focus-visible, .cc-sec > summary:focus-visible { outline: none; box-shadow: var(--focus); }
.cc-tl { list-style: none; margin: 0; padding: 0; }
.cc-tl li { position: relative; padding: 0 0 10px 16px; margin-left: 5px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.cc-tl li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.cc-tl li.money::before { background: var(--ok-fill); }
.cc-tl li.miss::before { background: var(--bad-fill); }
.cc-tl li.note::before { background: var(--warn-fill); }
.cc-tl small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.cc-empty { text-align: center; padding: 24px 8px; color: var(--muted); }
.cc-empty b { color: var(--ink); display: block; }
.cc-sk { height: 14px; margin: 10px 0; border-radius: var(--r-s); background: var(--surface-2); }
.cc-sk.w60 { width: 60%; } .cc-sk.w80 { width: 80%; }
@media (prefers-reduced-motion: no-preference) { .cc-sk { animation: ccpulse 1.2s ease-in-out infinite alternate; } }
@keyframes ccpulse { to { opacity: .45; } }
/* RU: Экран клиента #client и список «Клиенты». EN: The #client screen and the client list. */
.cl-full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 14px; align-items: start; }
.cl-full .card { margin: 0; }
.cl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.cl-tools .inp { flex: 1 1 220px; min-width: 0; }
.cl-rows { list-style: none; margin: 0; padding: 0; }
.cl-rows li { border-bottom: 1px solid var(--line); }
.cl-rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
.cl-rows a:hover { background: var(--surface-2); }
.cl-rows a:focus-visible { outline: none; box-shadow: var(--focus); }
.cl-rows .nm { font-weight: 600; overflow-wrap: anywhere; }
.cl-rows .meta { color: var(--muted); font-size: var(--fs-xs); grid-column: 1 / -1; overflow-wrap: anywhere; }
.cl-rows .num { font-size: var(--fs-xs); color: var(--ink-2); text-align: right; white-space: nowrap; }
@media (max-width: 900px) { .cl-full { grid-template-columns: 1fr; } }
/* RU: Шторка TermitChat: ссылка «Открыть в пульте» — такой же кнопкой, как «Вернуться в чат». EN: The sheet link looks like a button. */
.actions a.cc-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; min-height: var(--btn-h); font-weight: 600; }
