/* =====================================================================
   Sender — визуальная система.
   Движок отрисовки: QtWebEngine 5.15 (Chromium 83) — поэтому без flex-gap,
   :is/:where, inset, aspect-ratio, :focus-visible. Раскладка — на grid.
   ===================================================================== */

@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-display: swap;
  font-weight: 100 900; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("fonts/inter-cyrillic.woff2") format("woff2"); font-display: swap;
  font-weight: 100 900; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JBM"; src: url("fonts/jbm-latin.woff2") format("woff2"); font-display: swap;
  font-weight: 100 800; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "JBM"; src: url("fonts/jbm-cyr.woff2") format("woff2"); font-display: swap;
  font-weight: 100 800; unicode-range: U+0400-045F, U+0490-0491, U+2116; }

:root {
  --bg: #07070c;
  --panel: rgba(18, 18, 28, 0.84);
  --panel-solid: #12121b;
  --panel-2: rgba(255, 255, 255, 0.028);
  --field: rgba(8, 8, 14, 0.62);
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.11);
  --text: #f3f2f8;
  --text-2: #a3a1b8;
  --text-3: #6d6b82;
  --accent: #8b5cf6;
  --accent-2: #d946ef;
  --grad: linear-gradient(135deg, #7c5cff 0%, #b14dff 52%, #e549c9 100%);
  --green: #34d399; --teal: #2dd4bf; --blue: #60a5fa;
  --amber: #fbbf24; --red: #f87171; --gray: #8f8da5;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -24px rgba(0,0,0,0.8);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 13.5px/1.45 "Inter", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased; overflow: hidden;
  user-select: none;
}
input, textarea, button, select { font: inherit; color: inherit; }
textarea, input { user-select: text; }
::selection { background: rgba(139, 92, 246, 0.42); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: "JBM", Consolas, monospace; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.16); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

/* ---------------------------- фон ---------------------------- */
.backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none; overflow: hidden; }
/* без filter:blur и анимации: градиент и так мягкий, а живое размытие на всё окно
   на встроенной графике давало лаги */
.glow { position: absolute; border-radius: 50%; opacity: .55; }
.glow.g1 { width: 620px; height: 620px; left: -160px; top: -260px; background: radial-gradient(closest-side, rgba(124,92,255,.55), transparent); }
.glow.g2 { width: 560px; height: 560px; right: -180px; bottom: -240px; background: radial-gradient(closest-side, rgba(229,73,201,.38), transparent); }
.glow.g3 { width: 420px; height: 420px; left: 45%; top: 30%; background: radial-gradient(closest-side, rgba(45,212,191,.10), transparent); }
.noise { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: .025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

#app { position: relative; z-index: 1; height: 100%; }

/* ---------------------------- каркас ---------------------------- */
.shell { display: grid; grid-template-columns: 252px 1fr; height: 100%; }
.sidebar {
  display: grid; grid-template-rows: auto 1fr auto; min-height: 0;
  background: linear-gradient(180deg, rgba(16,16,25,.82), rgba(12,12,19,.78));
  border-right: 1px solid var(--line);
}
.main { min-width: 0; min-height: 0; overflow: hidden; position: relative; }

.brand { display: grid; grid-template-columns: auto 1fr; align-items: center; grid-column-gap: 12px; padding: 22px 20px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(177, 77, 255, .8), inset 0 1px 0 rgba(255,255,255,.35); }
.brand-mark svg { width: 18px; height: 18px; color: #fff; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

.nav { overflow-y: auto; padding: 4px 12px 12px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 8px; }
.nav-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; grid-column-gap: 11px;
  padding: 8px 10px; border-radius: 12px; cursor: pointer; position: relative;
  transition: background .18s var(--ease), transform .18s var(--ease);
  margin-bottom: 3px;
}
.nav-item:hover { background: rgba(255,255,255,0.04); }
.nav-item.active { background: linear-gradient(90deg, rgba(139,92,246,.20), rgba(139,92,246,.06)); box-shadow: inset 0 0 0 1px rgba(139,92,246,.22); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-title { font-weight: 560; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.nav-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text-2); }
.nav-icon svg { width: 17px; height: 17px; }
.nav-add { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 10px; align-items: center; margin-top: 6px; padding: 9px 12px;
  border-radius: 12px; border: 1px dashed rgba(255,255,255,.12); color: var(--text-2); cursor: pointer; transition: all .18s var(--ease); }
.nav-add:hover { border-color: rgba(139,92,246,.6); color: var(--text); background: rgba(139,92,246,.06); }
.nav-add svg { width: 16px; height: 16px; }
.nav-add.busy { opacity: .6; pointer-events: none; }
.nav-foot { padding: 10px 12px 12px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 10px; align-items: center; font-size: 11.5px; color: var(--text-3); }
.nav-foot .btn.on { color: var(--violet, #a78bfa); }
.nav-foot-btns { display: grid; grid-auto-flow: column; grid-column-gap: 2px; }
.upbar { height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.upbar > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8b5cf6, #d946ef); transition: width .2s; }
.hint a { color: #c4b5fd; text-decoration: none; }
.hint a:hover { text-decoration: underline; }
.nav-foot-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count-badge { font-size: 11px; font-weight: 600; color: var(--text-2); background: rgba(255,255,255,.06); padding: 2px 7px; border-radius: 20px; }

/* ---------------------------- аватар / статус ---------------------------- */
.avatar { position: relative; border-radius: 50%; display: grid; place-items: center; font-weight: 650; color: #fff; flex: none; letter-spacing: .01em; }
.avatar .ring { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid #11111a; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; position: relative; flex: none; }
.dot.pulse::after { content: ""; position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px; border-radius: 50%; background: inherit; opacity: .45; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }
.c-green { background: var(--green); } .c-amber { background: var(--amber); } .c-red { background: var(--red); }
.c-gray { background: var(--gray); } .c-blue { background: var(--blue); } .c-teal { background: var(--teal); }

.pill { display: inline-grid; grid-auto-flow: column; grid-column-gap: 7px; align-items: center; padding: 4px 11px 4px 9px; border-radius: 30px;
  font-size: 12px; font-weight: 560; border: 1px solid; white-space: nowrap; }
.pill.green { color: var(--green); background: rgba(52,211,153,.09); border-color: rgba(52,211,153,.22); }
.pill.amber { color: var(--amber); background: rgba(251,191,36,.09); border-color: rgba(251,191,36,.24); }
.pill.red { color: var(--red); background: rgba(248,113,113,.09); border-color: rgba(248,113,113,.24); }
.pill.gray { color: var(--text-2); background: rgba(255,255,255,.04); border-color: var(--line-2); }
.pill.blue { color: var(--blue); background: rgba(96,165,250,.09); border-color: rgba(96,165,250,.24); }

/* ---------------------------- кнопки ---------------------------- */
.btn {
  display: inline-grid; grid-auto-flow: column; grid-column-gap: 8px; align-items: center; justify-content: center;
  height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 13px; white-space: nowrap; outline: none; position: relative;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s, opacity .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .38; cursor: default; transform: none; box-shadow: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 13.5px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.lg.icon { width: 42px; padding: 0; }
.btn.del-acc { color: var(--text-3); }
.btn.del-acc:hover { color: var(--red); background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.3); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -12px rgba(177,77,255,.9), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 14px 34px -12px rgba(177,77,255,1), inset 0 1px 0 rgba(255,255,255,.35); filter: brightness(1.06); }
.btn.go { background: linear-gradient(135deg, #10b981, #2dd4bf); color: #04130e; box-shadow: 0 10px 26px -12px rgba(45,212,191,.9), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.go:hover:not(:disabled) { filter: brightness(1.07); }
.btn.ghost { background: rgba(255,255,255,.045); border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.btn.soft-amber { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.28); color: var(--amber); }
.btn.soft-amber:hover:not(:disabled) { background: rgba(251,191,36,.16); }
.btn.soft-red { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: var(--red); }
.btn.soft-red:hover:not(:disabled) { background: rgba(248,113,113,.15); }
.btn.plain { background: transparent; color: var(--text-2); }
.btn.plain:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,.05); }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------- панели ---------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-height: 0; min-width: 0; }
.panel-head { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px 16px 0 16px; }
.panel-body { padding: 16px; }

.tabs { display: inline-grid; grid-auto-flow: column; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); position: relative; }
.tab { position: relative; z-index: 1; height: 30px; padding: 0 14px; border-radius: 9px; display: grid; grid-auto-flow: column; grid-column-gap: 7px; align-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer; transition: color .2s; white-space: nowrap; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text-2); }
.tab.on { color: var(--text); background: rgba(255,255,255,.08); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 4px 14px -6px rgba(0,0,0,.6); }
.tab .count-badge { padding: 1px 6px; font-size: 10.5px; }

/* ---------------------------- поля ---------------------------- */
.field { display: grid; grid-row-gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-top { display: grid; grid-template-columns: 1fr auto; align-items: end; grid-column-gap: 8px; min-height: 18px; }
.label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.hint { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.input, .textarea {
  width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: 11px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s; color: var(--text);
}
.input { height: 38px; padding: 0 12px; }
.textarea { padding: 10px 12px; resize: none; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover { border-color: rgba(255,255,255,.17); }
.input:focus, .textarea:focus { border-color: rgba(139,92,246,.75); box-shadow: 0 0 0 4px rgba(139,92,246,.16); background: rgba(10,10,18,.8); }
.input:disabled { opacity: .45; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 36px; }
.input-wrap .suffix { position: absolute; right: 12px; top: 0; height: 38px; display: grid; align-items: center; color: var(--text-3); font-size: 12px; pointer-events: none; }
.input-wrap .input.has-suffix { padding-right: 44px; }
.input-wrap .trail { position: absolute; right: 4px; top: 3px; }
.mono-area { font-family: "JBM", Consolas, monospace; font-size: 12.5px; }

.chip { display: inline-grid; grid-auto-flow: column; grid-column-gap: 5px; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,.05); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.violet { color: #c4b5fd; background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.28); }
.chip.amber { color: var(--amber); background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.22); }
.chip.green { color: var(--green); background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.22); }
.chips { display: grid; grid-auto-flow: column; grid-column-gap: 6px; justify-content: end; }

.example { margin-top: 2px; display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 8px; align-items: start; padding: 9px 11px;
  border-radius: 10px; background: rgba(139,92,246,.06); border: 1px dashed rgba(139,92,246,.22); font-size: 12.5px; color: var(--text-2); }
.example svg { width: 14px; height: 14px; color: #c4b5fd; margin-top: 2px; }
.example .txt { white-space: pre-wrap; word-break: break-word; color: var(--text); animation: fadeIn .35s var(--ease); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; grid-column-gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-column-gap: 12px; }
.range { display: grid; grid-template-columns: auto 88px auto 88px auto; justify-content: start; align-items: center; grid-column-gap: 10px; }
.range-word, .range-unit { font-size: 12.5px; color: var(--text-3); }
.range .input { text-align: center; min-width: 0; }
.input.bad { border-color: rgba(248,113,113,.6); }

/* toggle */
.toggle { width: 40px; height: 23px; border-radius: 20px; background: rgba(255,255,255,.1); position: relative; cursor: pointer; transition: background .22s var(--ease); flex: none; border: 1px solid var(--line-2); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); transition: transform .22s var(--ease); }
.toggle.on { background: var(--grad); border-color: transparent; }
.toggle.on::after { transform: translateX(17px); }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 11px; background: var(--field); border: 1px solid var(--line-2); }
.seg > div { height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); cursor: pointer; transition: all .18s; }
.seg > div.on { background: rgba(139,92,246,.22); color: #e9e3ff; box-shadow: inset 0 0 0 1px rgba(139,92,246,.4); }
.seg.disabled { opacity: .45; pointer-events: none; }

/* ---------------------------- страница аккаунта ---------------------------- */
.view { height: 100%; display: grid; grid-template-rows: auto auto 1fr; padding: 22px 26px 22px; grid-row-gap: 18px; animation: viewIn .4s var(--ease); min-height: 0; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.head { display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 16px; align-items: center; }
.head-title { font-size: 24px; font-weight: 720; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-sub { display: grid; grid-auto-flow: column; justify-content: start; grid-column-gap: 10px; align-items: center; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.actions { display: grid; grid-auto-flow: column; grid-column-gap: 8px; align-items: center; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-column-gap: 12px; }
.kpi { padding: 14px 16px 14px; border-radius: 16px; position: relative; overflow: hidden; }
.kpi-top { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 560; }
.kpi-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.kpi-ico svg { width: 15px; height: 15px; }
.kpi-val { font-size: 28px; font-weight: 720; letter-spacing: -.03em; margin-top: 6px; line-height: 1.1; }
.kpi-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -40px; width: 110px; height: 110px; border-radius: 50%; opacity: .3; background: radial-gradient(closest-side, var(--kc, #8b5cf6), transparent); }

.progress-card { padding: 12px 16px 14px; border-radius: 16px; margin-top: 12px; }
.progress-row { display: grid; grid-template-columns: 1fr auto; align-items: center; font-size: 12.5px; color: var(--text-2); margin-bottom: 9px; }
.progress-row b { color: var(--text); font-weight: 650; }
.stack { height: 8px; border-radius: 10px; background: rgba(255,255,255,.06); overflow: hidden; display: flex; position: relative; }
.stack > div { height: 100%; transition: width .6s var(--ease); }
.stack.running::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; left: -120px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: sheen 2.2s ease-in-out infinite; }
@keyframes sheen { to { left: 110%; } }
.legend { display: grid; grid-auto-flow: column; justify-content: start; grid-column-gap: 16px; margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.legend span { display: inline-grid; grid-auto-flow: column; grid-column-gap: 6px; align-items: center; }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.work { display: grid; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); grid-column-gap: 18px; min-height: 0; }
.col-panel { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.scroll { overflow-y: auto; min-height: 0; }

/* очередь */
.q-tools { display: grid; grid-template-columns: 1fr auto; grid-column-gap: 10px; align-items: center; padding: 14px 16px 10px; }
/* фильтры переносятся на новую строку, а не уезжают за правый край */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.fchip { height: 28px; padding: 0 11px; border-radius: 9px; display: inline-grid; grid-auto-flow: column; grid-column-gap: 6px; align-items: center; font-size: 12px; font-weight: 600;
  color: var(--text-3); border: 1px solid var(--line); cursor: pointer; white-space: nowrap; transition: all .16s; }
.fchip:hover { color: var(--text-2); border-color: var(--line-2); }
.fchip.on { color: var(--text); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.fchip .n { color: var(--text-3); font-weight: 600; }
.qhead, .qrow { display: grid; grid-template-columns: 46px minmax(0, 1fr) 170px 110px; align-items: center; padding: 0 16px; }
.qhead { height: 34px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(0,0,0,.12); }
.qrow { height: 46px; border-bottom: 1px solid rgba(255,255,255,.035); transition: background .12s; }
.qrow:hover { background: rgba(255,255,255,.025); }
.qrow .idx { color: var(--text-3); font-size: 12px; }
.quser { display: grid; grid-template-columns: auto minmax(0,1fr); grid-column-gap: 10px; align-items: center; }
.quser .name { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qtime { color: var(--text-3); font-size: 12px; text-align: right; }
.badge { display: inline-grid; grid-auto-flow: column; grid-column-gap: 6px; align-items: center; height: 24px; padding: 0 9px 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; justify-self: start; }
.badge svg { width: 13px; height: 13px; }
.b-gray { color: var(--text-2); background: rgba(255,255,255,.05); }
.b-blue { color: var(--blue); background: rgba(96,165,250,.11); }
.b-teal { color: var(--teal); background: rgba(45,212,191,.11); }
.b-green { color: var(--green); background: rgba(52,211,153,.11); }
.b-amber { color: var(--amber); background: rgba(251,191,36,.11); }
.b-red { color: var(--red); background: rgba(248,113,113,.11); }
.qlist { position: relative; overflow-y: auto; min-height: 0; }

/* журнал */
.log { padding: 10px 6px 10px 16px; overflow-y: auto; min-height: 0; font-family: "JBM", Consolas, monospace; font-size: 12px; line-height: 1.75; user-select: text; }
.log-line { display: grid; grid-template-columns: 14px 64px 1fr; align-items: baseline; color: var(--text-2); animation: fadeIn .3s; }
.log-line .t { color: var(--text-3); }
.log-line i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; transform: translateY(-1px); }
.log-line.error { color: #fca5a5; } .log-line.warn { color: #fcd34d; } .log-line.ok { color: #a7f3d0; }
.log-line.info i { background: var(--text-3); } .log-line.error i { background: var(--red); } .log-line.warn i { background: var(--amber); } .log-line.ok i { background: var(--green); }

/* пустые состояния */
.empty { display: grid; place-items: center; text-align: center; padding: 40px 24px; height: 100%; }
.empty-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(229,73,201,.14)); border: 1px solid rgba(139,92,246,.3); box-shadow: 0 16px 40px -18px rgba(177,77,255,.8); }
.empty-ico svg { width: 28px; height: 28px; color: #d8ccff; }
.empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 680; }
.empty p { margin: 0 auto; color: var(--text-3); max-width: 330px; font-size: 12.5px; }
.empty .btn { margin-top: 18px; }

/* блок подключения */
.conn-card { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 18px; }
.conn-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.conn-ico svg { width: 20px; height: 20px; }
.conn-title { font-weight: 650; }
.conn-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.section-title { display: grid; grid-template-columns: 1fr auto; align-items: center; font-size: 12px; font-weight: 650; color: var(--text); margin: 4px 0 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------------------------- меню / модалки / тосты ---------------------------- */
.menu { position: absolute; right: 0; top: 44px; min-width: 220px; z-index: 30; padding: 6px; border-radius: 14px; background: rgba(22,22,33,.96); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.9); animation: pop .16s var(--ease); transform-origin: top right; }
.menu-item { display: grid; grid-template-columns: 18px 1fr; grid-column-gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; font-size: 13px; cursor: pointer; color: var(--text); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-2); }
.menu-item:hover { background: rgba(255,255,255,.06); }
.menu-item.danger, .menu-item.danger svg { color: var(--red); }
.menu-item.danger:hover { background: rgba(248,113,113,.1); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-cap { font-size: 11px; color: var(--text-3); padding: 6px 10px 4px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }

.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(4,4,8,.6); backdrop-filter: blur(6px); display: grid; place-items: center; animation: fadeIn .18s; }
.modal { width: 440px; max-width: calc(100vw - 40px); border-radius: 22px; padding: 24px; background: linear-gradient(180deg, rgba(28,28,42,.97), rgba(19,19,29,.97));
  border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.95); animation: modalIn .26s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; }
.modal-ico svg { width: 22px; height: 22px; }
.modal h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.modal p { margin: 0; color: var(--text-2); white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.modal-actions { display: grid; grid-auto-flow: column; justify-content: end; grid-column-gap: 8px; margin-top: 22px; }
.ico-violet { background: rgba(139,92,246,.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,.3); }
.ico-amber { background: rgba(251,191,36,.12); color: var(--amber); border: 1px solid rgba(251,191,36,.28); }
.ico-red { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.28); }
.ico-green { background: rgba(52,211,153,.12); color: var(--green); border: 1px solid rgba(52,211,153,.28); }
.ico-blue { background: rgba(96,165,250,.12); color: var(--blue); border: 1px solid rgba(96,165,250,.28); }
.ico-gray { background: rgba(255,255,255,.05); color: var(--text-2); border: 1px solid var(--line-2); }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; pointer-events: none; /* уведомления не перехватывают клики по кнопкам под ними */ display: grid; grid-row-gap: 10px; justify-items: end; }
.toast { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 11px; align-items: center; min-width: 260px; max-width: 380px; padding: 12px 16px 12px 12px; border-radius: 14px;
  background: rgba(26,26,38,.95); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); animation: toastIn .32s var(--ease); font-size: 13px; }
.toast .ti { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.toast .ti svg { width: 15px; height: 15px; }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

.banner { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 70; padding: 9px 16px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  background: rgba(251,191,36,.12); color: var(--amber); border: 1px solid rgba(251,191,36,.3); display: grid; grid-auto-flow: column; grid-column-gap: 8px; align-items: center; animation: fadeIn .3s; }
.banner svg { width: 15px; height: 15px; }

/* ---------------------------- парсер ---------------------------- */
.pview { height: 100%; display: grid; grid-template-rows: auto 1fr; padding: 22px 26px; grid-row-gap: 18px; animation: viewIn .4s var(--ease); min-height: 0; }
.pgrid { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); grid-column-gap: 18px; min-height: 0; }
.select { position: relative; }
.select-btn { height: 40px; width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 10px; align-items: center; padding: 0 12px 0 8px; border-radius: 11px;
  background: var(--field); border: 1px solid var(--line-2); cursor: pointer; text-align: left; }
.select-btn:hover { border-color: rgba(255,255,255,.18); }
.select-btn > svg { width: 16px; height: 16px; color: var(--text-3); }
.select .menu { left: 0; right: 0; top: 46px; transform-origin: top; }
.pprog { margin-top: 18px; padding: 16px; border-radius: 14px; background: rgba(139,92,246,.06); border: 1px solid rgba(139,92,246,.2); }
.pprog-nums { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.pprog-nums .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pprog-nums .l { font-size: 11.5px; color: var(--text-3); }
.indet { height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; }
.indet::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%; border-radius: 6px; background: var(--grad); animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { to { left: 100%; } }
.ulist { padding: 6px 10px 10px 16px; overflow-y: auto; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: 36px; grid-gap: 6px; align-content: start; }
.uitem { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 8px; align-items: center; padding: 0 10px 0 6px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 12.5px; animation: fadeIn .3s; }
.uitem .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-actions { display: grid; grid-auto-flow: column; grid-column-gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); justify-content: end; align-items: center; }
.rel { position: relative; }
.muted { color: var(--text-3); }
.tip { position: relative; }

/* ---------------------------- правки раскладки ---------------------------- */
.tabs { justify-self: start; }
.tab { justify-content: center; }
.main { overflow-y: auto; }
.view, .pview { height: auto; min-height: 100%; }
.view { grid-template-rows: auto auto minmax(430px, 1fr); }
.pview { grid-template-rows: auto minmax(430px, 1fr); }

/* ноутбуки: невысокий экран — всё плотнее */
@media (max-height: 860px) {
  body { font-size: 13px; }
  .view, .pview { padding: 16px 20px 16px; grid-row-gap: 12px; }
  .head > .avatar { width: 44px !important; height: 44px !important; font-size: 16px !important; }
  .head-title { font-size: 20px; }
  .head-sub { margin-top: 4px; }
  .btn.lg { height: 38px; padding: 0 16px; font-size: 13px; }
  .btn.lg.icon { width: 38px; padding: 0; }
  .kpi { padding: 10px 14px; border-radius: 14px; }
  .kpi-ico { width: 24px; height: 24px; border-radius: 8px; }
  .kpi-ico svg { width: 13px; height: 13px; }
  .kpi-val { font-size: 22px; margin-top: 2px; }
  .kpi-sub { margin-top: 1px; }
  .progress-card { padding: 10px 14px 11px; margin-top: 10px; }
  .progress-row { margin-bottom: 7px; }
  .legend { display: none; }
  .brand { padding: 16px 18px 12px; }
  .nav-label { padding: 10px 10px 6px; }
  .panel-body { padding: 14px; }
  .field { margin-bottom: 12px; }
  .qrow { height: 42px; }
}
/* маленький экран (1366×768 / 1920×1080 при 150%): рабочая зона должна влезать
   без прокрутки всей страницы */
@media (max-height: 720px) {
  .view, .pview { padding: 12px 16px 12px; grid-row-gap: 10px; }
  .view { grid-template-rows: auto auto minmax(320px, 1fr); }
  .pview { grid-template-rows: auto minmax(320px, 1fr); }
  .head > .avatar { width: 38px !important; height: 38px !important; font-size: 14px !important; }
  .head-title { font-size: 18px; }
  .head-sub { margin-top: 2px; font-size: 12px; }
  .btn.lg { height: 34px; padding: 0 14px; }
  .btn.lg.icon { width: 34px; padding: 0; }
  .kpi { padding: 8px 12px; border-radius: 12px; }
  .kpi-val { font-size: 19px; margin-top: 0; }
  .kpi-sub { display: none; }
  .kpi-ico { width: 22px; height: 22px; }
  .progress-card { padding: 8px 12px 9px; margin-top: 8px; border-radius: 12px; }
  .progress-row { margin-bottom: 6px; font-size: 12px; }
  .panel-head { padding: 10px 12px 0 12px; }
  .panel-body { padding: 12px; }
  .field { margin-bottom: 10px; grid-row-gap: 5px; }
  .brand { padding: 12px 16px 8px; }
}
/* колонки не раздуваются под содержимое (иначе панели уезжают вправо) */
.view, .pview, .col-panel, .work > *, .pgrid > * { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.work, .pgrid { min-width: 0; }
.badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-filter { width: 220px; min-width: 0; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.q-tools > * { min-width: 0; }

@media (max-width: 1360px) {
  .shell { grid-template-columns: 224px 1fr; }
  .work { grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); grid-column-gap: 14px; }
  .kpis { grid-column-gap: 10px; }
  .qhead, .qrow { grid-template-columns: 40px minmax(0, 1fr) 160px 96px; }
}
/* узкое окно: таблица очереди и парсер плотнее */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 208px 1fr; }
  .work { grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); grid-column-gap: 12px; }
  .pgrid { grid-template-columns: minmax(290px, 340px) minmax(0, 1fr); grid-column-gap: 12px; }
  .qhead, .qrow { grid-template-columns: 32px minmax(0, 1fr) 140px 70px; padding: 0 12px; }
  .res-filter { width: 160px; }
  .res-actions .btn { padding: 0 12px; }
}
@media (max-width: 1000px) {
  .qhead, .qrow { grid-template-columns: 28px minmax(0, 1fr) 132px; grid-column-gap: 8px; }
  .qhead > :last-child, .qrow > .qtime { display: none; }
}

/* ---------------- настройка аккаунта (Инструменты) ---------------- */
.setup-head { grid-template-columns: auto minmax(0, 1fr) auto; }
.acc-switch { display: grid; grid-row-gap: 6px; }
.acc-switch-row { display: grid; grid-template-columns: 280px 40px; grid-column-gap: 8px; }
.acc-switch .select-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.acc-refresh { width: 40px; height: 40px; padding: 0; }
.menu-item.on { background: rgba(139,92,246,.12); }
.tg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-column-gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tg-row:first-of-type { border-top: 0; }
.tg-row.dim .toggle { opacity: .5; pointer-events: none; }
.tg-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.tg-row > svg { width: 18px; height: 18px; color: #c4b5fd; }
.setup-body { overflow: auto; min-height: 0; margin: 0 -6px; padding: 0 6px 6px; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); grid-gap: 18px; align-items: start; }
.card-title { display: grid; grid-auto-flow: column; justify-content: start; align-items: center; grid-column-gap: 8px; font-weight: 650; font-size: 14px; margin-bottom: 14px; }
.card-title svg { width: 16px; height: 16px; color: #c4b5fd; }
.ava-row { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 14px; align-items: center; margin-bottom: 16px; }
.ava-prev img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px rgba(139,92,246,.5); }
.ava-prev.sm img, .ava-prev.sm .ava-empty { width: 44px; height: 44px; }
.ava-empty { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--text-3); }
.ava-empty svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.counter { font-size: 11px; color: var(--text-3); }
.counter.over { color: var(--red); }
.ch-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: rgba(255,255,255,.02); }
.ch-head { display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 10px; align-items: center; }
.ch-title { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-link { font-size: 12px; color: #c4b5fd; cursor: pointer; display: inline-grid; grid-auto-flow: column; grid-column-gap: 4px; align-items: center; }
.ch-link:hover { text-decoration: underline; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ch-open { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.badge-mini { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 1px;
  background: rgba(52,211,153,.1); color: var(--green); border: 1px solid rgba(52,211,153,.25); }
.sess-list { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sess { display: grid; grid-template-columns: auto 1fr; grid-column-gap: 10px; align-items: center; font-size: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.sess:first-child { border-top: 0; }
.sess.cur { background: rgba(139,92,246,.06); }
.sess > svg { width: 16px; height: 16px; color: var(--text-3); }
.sess .muted { font-size: 11px; }

/* ===================== Чаты (встроенный Telegram) ===================== */
.chats-body { min-height: 0; }
.chats-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-column-gap: 14px; height: 100%; min-height: 0; }
.chats-left { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.chats-tools { padding: 12px; border-bottom: 1px solid var(--line); }
.chats-list { overflow-y: auto; flex: 1; min-height: 0; padding: 6px; }
.chat-row { display: flex; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .15s var(--ease); }
.chat-row:hover { background: rgba(255,255,255,.04); }
.chat-row.on { background: rgba(139,92,246,.16); box-shadow: inset 0 0 0 1px rgba(139,92,246,.22); }
.peer-ava { position: relative; flex: none; }
.peer-kind { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  background: #2a2140; color: #d8ccff; border: 2px solid #12121b; }
.chat-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chat-name { font-weight: 620; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-time { font-size: 11px; color: var(--text-3); flex: none; display: inline-flex; gap: 4px; align-items: center; }
.chat-row-bot { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 3px; }
.chat-prev { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-prev b { color: var(--text-2); font-weight: 560; }
.chat-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 20px; padding: 1px 7px; min-width: 20px; text-align: center; flex: none; }
.found-sec { padding: 2px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.found-cap { font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 4px; }
.found-hint { font-size: 12px; color: var(--text-3); padding: 10px; }
.invite-card { display: grid; grid-template-columns: auto 1fr auto; grid-column-gap: 10px; align-items: center; margin: 4px 6px; padding: 10px 12px;
  border-radius: 12px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.25); font-size: 13px; }
.invite-card > svg { width: 16px; height: 16px; color: #c4b5fd; }
.chats-conv { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.conv-head { display: flex; gap: 11px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.conv-body { overflow-y: auto; min-height: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.conv-more { display: flex; justify-content: center; padding: 2px 0 8px; }
.day-sep { display: flex; justify-content: center; margin: 8px 0 4px; }
.day-sep span { font-size: 11px; color: var(--text-2); background: rgba(255,255,255,.06); padding: 3px 10px; border-radius: 20px; }
.bubble { max-width: 72%; padding: 7px 11px 5px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.in { align-self: flex-start; background: var(--panel-solid); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.out { align-self: flex-end; background: linear-gradient(135deg, #6d3bd6, #7c3aed); color: #fff; border-bottom-right-radius: 5px; }
.bubble-sender { font-size: 11.5px; font-weight: 650; color: #c4b5fd; margin-bottom: 2px; }
.bubble-time { font-size: 10px; opacity: .6; text-align: right; margin-top: 2px; }
.conv-send { display: grid; grid-template-columns: 1fr auto; grid-column-gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: end; }
.conv-send textarea { resize: none; min-height: 40px; max-height: 140px; height: 40px; padding-top: 10px; }
.conv-note { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.conv-err { display: grid; justify-items: center; grid-row-gap: 10px; margin: auto; text-align: center; color: #fecaca; font-size: 13px; max-width: 360px; }
.conv-err > svg { width: 22px; height: 22px; }
.conv-err.sm { margin: 14px auto; }
@media (max-width: 900px) { .chats-grid { grid-template-columns: 1fr; } }

/* Чаты: экран ровно по высоте окна; листаются только список диалогов и лента
   сообщений, а не вся страница (общее правило выше разрешает странице расти) */
.pview.chats { height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
.chats-body { min-height: 0; display: grid; }
.chats-grid { height: auto; min-height: 0; }
.chats-conv.conv-empty { display: grid; grid-template-rows: 1fr; place-items: center; }
.chats-conv.conv-empty .empty { height: auto; }
.chat-row.unread .chat-name { font-weight: 720; }
.chat-row.unread .chat-prev { color: var(--text-2); }
.saved-ava { border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.bubble { margin-top: 4px; }
.bubble.cont { margin-top: -2px; }
.bubble.in.cont { border-top-left-radius: 5px; }
.bubble.out.cont { border-top-right-radius: 5px; }
.conv-send .btn.icon { width: 40px; height: 40px; }
.nav-item .chat-badge { align-self: center; }
