/* «Поддержка» for the setters (16.11.2026): the list of clients on the left, the conversation on the right; on a phone -
   one of them at a time. Grey statuses, one accent, no coloured plates (as the rest of the admin). */
.inbox-root { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-side, .inbox-main { padding: 0; overflow: hidden; }
.inbox-tools { display: grid; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.inbox-tools .seg-filter { width: max-content; }
.inbox-tools select, .inbox-tools input { width: 100%; }
.inbox-list { max-height: calc(100dvh - 260px); overflow-y: auto; }
.inbox-row { display: grid; gap: 4px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); text-align: left; cursor: pointer; font: 13px/1.4 var(--f-body); }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row.is-open { background: var(--accent-soft); }
.inbox-row-top, .inbox-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inbox-row-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row small, .inbox-row-who { color: var(--muted); font-size: 12px; }
.inbox-row.is-waiting .inbox-row-top small { color: var(--ink); }
.inbox-row-text { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inbox-row-text em { font-style: normal; color: var(--faint); }
.inbox-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent, #fff); font: 600 11px/1 var(--f-body); }
.inbox-empty { display: grid; place-items: center; min-height: 320px; }
.inbox-thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.inbox-thread-head > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.inbox-thread-head small { color: var(--muted); font-size: 12px; }
.inbox-back { display: none; place-items: center; width: 32px; height: 32px; margin-left: -6px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; flex: none; }
.inbox-back:hover { background: var(--surface-2); color: var(--ink); }
.inbox-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inbox-assign { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.inbox-msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: calc(100dvh - 380px); min-height: 240px; overflow-y: auto; }
.inbox-msg { max-width: min(78%, 560px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.inbox-msg.is-staff { align-self: flex-end; background: var(--surface-2); }
.inbox-msg-meta { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.inbox-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.45; }
.inbox-photo { display: block; color: var(--muted); font-size: 12px; }
.inbox-photo img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin-bottom: 6px; }
.inbox-reply { display: grid; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.inbox-main { min-width: 0; }
.inbox-reply textarea { width: 100%; max-width: 100%; box-sizing: border-box; resize: vertical; }
.inbox-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inbox-note { padding: 14px 16px; border-top: 1px solid var(--line); margin: 0; }
.inbox-nav-count { margin-left: auto; min-width: 18px; padding: 2px 6px; border-radius: 9px; background: var(--line-strong); color: var(--ink);
  font: 600 11px/1.2 var(--f-body); text-align: center; }
.inbox-nav-count[hidden] { display: none !important; }
[data-side-collapsed="true"] .inbox-nav-count { position: absolute; top: 1px; right: 0; min-width: 14px; padding: 1px 3px; font-size: 9px; }
@media (max-width: 860px) {
  .inbox-root { grid-template-columns: minmax(0, 1fr); }
  .inbox-root.has-open .inbox-side, .inbox-root:not(.has-open) .inbox-main { display: none; }
  .inbox-back { display: inline-grid; }
  .inbox-list { max-height: none; }
  .inbox-msgs { max-height: none; }
  .inbox-msg { max-width: 88%; }
  .inbox-thread-head { flex-wrap: wrap; }
  .inbox-reply textarea, .inbox-tools input, .inbox-tools select { font-size: 16px; }
}

/* files (16.11.2026): attach to the answer, download from the conversation */
.inbox-reply-foot small { flex: 1; }
.inbox-attach { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; flex: none; }
.inbox-attach:hover { color: var(--ink); }
.inbox-attach svg, .inbox-file svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.inbox-attached:empty { display: none; }
.inbox-attached { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inbox-attached-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-attached-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.inbox-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 0; border: 0; background: none; color: var(--ink);
  font: 600 13px/1.4 var(--f-body); cursor: pointer; }
.inbox-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.inbox-file + .inbox-msg-text { margin-top: 6px; }
@media (max-width: 860px) {
  .inbox-reply-foot { flex-wrap: wrap; }
  .inbox-reply-foot small { order: 3; flex-basis: 100%; }
}

/* 16.11.2026 (developer): the client's head and the line to write stay, only the conversation scrolls; the line is one row
   as in Telegram and grows with the text */
.inbox-main { display: flex; flex-direction: column; height: calc(100dvh - 150px); min-height: 360px; position: relative; }
.inbox-main > .inbox-empty { flex: 1; }
.inbox-thread-head { flex: none; }
.inbox-msgs { flex: 1; max-height: none; min-height: 0; }
.inbox-reply { flex: none; gap: 8px; padding: 10px 12px; }
.inbox-compose { display: flex; align-items: flex-end; gap: 6px; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); }
.inbox-compose:focus-within { border-color: var(--accent); }
.inbox-compose textarea { flex: 1; min-height: 36px; max-height: 180px; padding: 8px 4px; border: 0; outline: 0; background: none; box-shadow: none;
  color: var(--ink); font: 14px/1.4 var(--f-body); resize: none; overflow-y: auto; }
.inbox-compose .inbox-attach, .inbox-send { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; }
.inbox-compose .inbox-attach:hover { background: var(--surface-2); }
.inbox-compose .inbox-attach svg { width: 20px; height: 20px; }
.inbox-send { padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; }
.inbox-send:hover { background: var(--accent-soft); }
.inbox-send:disabled { color: var(--faint); cursor: default; }
.inbox-send svg { width: 22px; height: 22px; fill: currentColor; }
.inbox-attached { padding: 0 4px; }
@media (max-width: 860px) {
  .inbox-compose textarea { font-size: 16px; }
}

/* as in Telegram (developer 16.11): days between the messages, the time inside the bubble, «вниз» to the last message */
.inbox-msgs { gap: 6px; }
.inbox-msg { position: relative; padding: 8px 12px 18px; min-width: 120px; }
.inbox-msg-meta { margin-bottom: 2px; }
.inbox-msg:not(.is-staff) .inbox-msg-meta { color: var(--faint); }
.inbox-msg-time { position: absolute; right: 10px; bottom: 4px; color: var(--faint); font-size: 11px; }
.inbox-day { display: flex; justify-content: center; margin: 8px 0 4px; }
.inbox-day span { padding: 3px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font: 600 12px/1.4 var(--f-body); }
.inbox-down { position: absolute; right: 18px; bottom: 76px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer;
  box-shadow: var(--shadow, 0 4px 14px rgba(0,0,0,.25)); }
.inbox-down:hover { color: var(--ink); }
.inbox-down[hidden] { display: none; }
.inbox-down svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the two conversations as tabs (16.11.2026) */
.inbox-tabs-row { flex: none; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.inbox-tabs .seg small { color: var(--faint); font-weight: 500; }
.inbox-none { margin: auto; text-align: center; }
.inbox-msg { padding-top: 10px; }
@media (max-width: 860px) {
  .inbox-tabs { display: flex; width: 100%; }
  .inbox-tabs .seg { flex: 1; justify-content: center; padding: 0 8px; }
}
/* the open tab with the notch, as the menu and the buttons (developer 16.11) */
.inbox-tabs .seg.active, .inbox-tools .seg.active { --notch: 9px; clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); }
.inbox-tabs .seg.active small { color: inherit; opacity: .8; }
.inbox-reply.is-off .inbox-compose { opacity: .5; }
.inbox-reply.is-off textarea { cursor: not-allowed; }

/* «Ждёт ответа» + «Ответ не нужен» over the line to write (16.11.2026: «кнопка не заметна» in the head) */
.inbox-wait { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px;
  border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 13px; }
#inboxWait:not(:empty) + #inboxComposer .inbox-reply { border-top: 0; }
/* 23.11.2026: the conversation's parts (admin-inbox.js inboxThreadParts) are updated apart, the layout stays as it was */
.inbox-part { display: contents; }
.inbox-skip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--accent);
  border-radius: 9px; background: none; color: var(--accent-text); font: 600 13px/1 var(--f-body); cursor: pointer; }
.inbox-skip:hover { background: var(--accent-soft); }
.inbox-skip:disabled { opacity: .5; cursor: default; }
.inbox-skip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* 16.11.2026: both panels start on one line (the admin's «.panel + .panel» gave the right one a top margin) */
.inbox-root > .panel { margin-top: 0; }
/* no page scroll (16.11.2026): the list scrolls inside its panel, as the conversation */
.inbox-side { display: flex; flex-direction: column; }
.inbox-side .inbox-tools { flex: none; }
.inbox-side .inbox-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
/* the client's voice, audio and video play in the thread (17.11.2026) */
.inbox-player.is-audio { display: block; width: min(280px, 100%); height: 40px; }
.inbox-player.is-video { display: block; max-width: min(280px, 100%); max-height: 360px; border-radius: 10px; }
/* what the client has open, under his name (18.11.2026) */
.inbox-thread-head .inbox-products { display: block; color: var(--muted); }
/* 27.11.2026: the same person's second cabinet («второй кабинет: вход через тг · №12») */
.inbox-thread-head .inbox-twin { display: block; color: var(--ink); }
@media (max-width: 860px) {
  /* on a phone «Настройщик» goes under the name, the name and the products take the whole width */
  .inbox-thread-head > div { flex-basis: calc(100% - 56px); }
  .inbox-thread-head .inbox-assign { flex-basis: 100%; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
}
/* the setter's notices in Telegram (19.11.2026) */
.inbox-notify { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.inbox-notify button { background: none; border: 0; padding: 0; border-radius: 0; font: 600 12px/1.4 var(--f-body); color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.inbox-notify button:hover { color: var(--ink); }
/* 23.11.2026 (Тим): «Пуши настройщиков по всем клиентам» for an administrator */
.inbox-notify .inbox-notify-all { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0; padding: 0; color: var(--muted); font: 400 12px/1.4 var(--f-body); cursor: pointer; }
.inbox-notify .inbox-notify-all input[type=checkbox] { flex: none; width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; }
