/* ТП Desk — оформление в стиле Telegram Desktop / Web */
:root {
  --accent: #3390ec;
  --accent-soft: rgba(51, 144, 236, .12);
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --hover: #f4f4f5;
  --active: #3390ec;
  --line: #e7e7e9;
  --text: #000000;
  --muted: #707579;
  --faint: #a2acb4;
  --rail: #2c3e50;
  --rail-text: #b9c4cf;
  --rail-active: #ffffff;
  --chat-bg: #c9d9bb;
  --chat-dots: rgba(255, 255, 255, .28);
  --in: #ffffff;
  --out: #eeffde;
  --out-meta: #4fae4e;
  --in-meta: #a2acb4;
  --quote-in: rgba(51, 144, 236, .08);
  --quote-out: rgba(79, 174, 78, .12);
  --red: #e53935;
  --red-soft: #fde8e8;
  --yellow: #e5900b;
  --yellow-soft: #fdf1dc;
  --green: #4fae4e;
  --green-soft: #e3f5e3;
  --violet: #8e5bd8;
  --violet-soft: #efe7fb;
  --shadow: 0 1px 2px rgba(16, 35, 47, .15);
  --menu-shadow: 0 4px 24px rgba(0, 0, 0, .18);
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
[data-theme="dark"] {
  --accent: #5eb5f7;
  --accent-soft: rgba(94, 181, 247, .14);
  --bg: #17212b;
  --bg-2: #232e3c;
  --hover: #202b36;
  --active: #2b5278;
  --line: #101921;
  --text: #f5f5f5;
  --muted: #708499;
  --faint: #6c7883;
  --rail: #0e1621;
  --rail-text: #6d7f8f;
  --chat-bg: #0e1621;
  --chat-dots: rgba(255, 255, 255, .025);
  --in: #182533;
  --out: #2b5278;
  --out-meta: #7cb6e8;
  --in-meta: #6d7f8f;
  --quote-in: rgba(94, 181, 247, .1);
  --quote-out: rgba(255, 255, 255, .08);
  --red-soft: rgba(229, 57, 53, .18);
  --yellow-soft: rgba(229, 144, 11, .18);
  --green-soft: rgba(79, 174, 78, .18);
  --violet-soft: rgba(142, 91, 216, .2);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hidden { display: none !important; }

/* ---------- controls ---------- */
.btn { border: 0; background: var(--bg-2); border-radius: 8px; padding: 7px 12px; cursor: pointer; white-space: nowrap; line-height: 1.25; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { filter: brightness(.96); }
[data-theme="dark"] .btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); filter: none; }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.icon-btn { border: 0; background: transparent; color: var(--muted); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
input[type=text], input[type=password], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--bg); width: 100%; outline: none;
}
[data-theme="dark"] input[type=text], [data-theme="dark"] input[type=password], [data-theme="dark"] input[type=search], [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--bg-2); border-color: transparent; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 60px; }
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 18px; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.yellow { background: var(--yellow-soft); color: var(--yellow); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.gray { background: var(--bg-2); color: var(--muted); }
.wait-badge { color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.wait-badge.green { background: var(--green); }
.wait-badge.yellow { background: var(--yellow); }
.wait-badge.red { background: var(--red); }

/* ---------- app grid ---------- */
.app { display: grid; grid-template-columns: 72px 340px minmax(0, 1fr) auto; height: 100vh; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: stretch; padding: 6px 0; overflow-y: auto; }
.rail a { color: var(--rail-text); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; font-size: 11px; position: relative; text-align: center; line-height: 1.1; }
.rail a:hover { color: #fff; }
.rail a.on { color: var(--rail-active); }
.rail a.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rail .badge { position: absolute; top: 4px; left: 41px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.rail .badge.red { background: var(--red); }
.unread-b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; margin-left: 6px; flex: none; } .rail .badge.yellow { background: var(--yellow); }
.rail .spacer { flex: 1; }
/* прогресс сотрудника за сегодня — внизу левой панели */
.rail .my-prog { gap: 6px; padding: 8px 2px 10px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; flex: none; }
.rail .my-prog > span { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.rail .my-prog b { font-size: 15px; color: #fff; font-weight: 600; }
.rail .my-prog i { font-style: normal; font-size: 10px; opacity: .75; }
.dm-day .row { gap: 14px; margin-top: 4px; } .dm-day b { font-size: 16px; }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tg-dot.ok { background: var(--green); } .tg-dot.warn { background: var(--yellow); } .tg-dot.bad { background: var(--red); }

.side { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side-head { padding: 10px 12px 8px; }
.side-title { font-weight: 600; font-size: 15px; margin: 2px 4px 8px; display: flex; align-items: center; gap: 8px; }
.search { background: var(--bg-2) !important; border-color: transparent !important; border-radius: 22px !important; padding-left: 14px !important; }
.search:focus { border-color: var(--accent) !important; background: var(--bg) !important; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 0; background: var(--bg-2); color: var(--muted); border-radius: 14px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; }
.list { flex: 1; overflow-y: auto; padding: 0 6px 8px; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); line-height: 1.5; }

/* chat list item */
.ci { display: flex; gap: 10px; padding: 7px 9px; border-radius: 10px; color: inherit; align-items: center; cursor: pointer; }
.ci:hover { background: var(--hover); }
.ci.on { background: var(--active); color: #fff; }
.ci .top { display: flex; gap: 6px; align-items: center; }
.ci .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ci .time { font-size: 12px; color: var(--muted); }
.ci .bot { display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.ci .prev { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ci .prev b { font-weight: 400; color: var(--text); }
.ci .typing { color: var(--accent); }
.ci.on .time, .ci.on .prev, .ci.on .prev b, .ci.on .typing { color: rgba(255,255,255,.85); }
.ci .tk { font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 18px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.ci.on .tk { background: rgba(255,255,255,.25); color: #fff; }
.ci .ign { font-size: 11px; color: var(--faint); }

.av { border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; overflow: hidden; background-size: cover; background-position: center; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- main / chat ---------- */
.main { min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--chat-bg); background-image: radial-gradient(var(--chat-dots) 1.2px, transparent 1.2px); background-size: 22px 22px; position: relative; }
.main.plain { background: var(--bg-2); background-image: none; }
.placeholder { margin: auto; background: rgba(0,0,0,.18); color: #fff; padding: 5px 14px; border-radius: 14px; font-size: 14px; }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 16px; background: var(--bg); border-bottom: 1px solid var(--line); min-height: 56px; }
.chat-top .t1 { font-weight: 600; font-size: 15px; }
.chat-top .t2 { font-size: 13px; color: var(--muted); }
.chat-top .t2 .typing { color: var(--accent); }
.pins { background: var(--bg); border-bottom: 1px solid var(--line); }
.pin { display: flex; align-items: center; gap: 10px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.pin:hover { background: var(--hover); }
.pin .bar { width: 2px; align-self: stretch; background: var(--accent); border-radius: 1px; }
.pin .pt { color: var(--accent); font-weight: 600; }
.pin + .pin { border-top: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 8px 0 6px; min-height: 0; }
.msgs-inner { max-width: 760px; margin: 0 auto; padding: 0 14px; }
.older-loading { text-align: center; color: var(--muted); font-size: 12px; padding: 6px 0 10px; }
.to-bottom { position: absolute; right: 22px; bottom: 90px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.to-bottom .n { position: absolute; top: -6px; right: -2px; background: var(--accent); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; }

.day { text-align: center; margin: 10px 0 6px; }
.day span { background: rgba(0, 0, 0, .22); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 12px; font-weight: 500; }
.svc { text-align: center; margin: 6px 0; }
.svc span { background: rgba(0, 0, 0, .22); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 12px; display: inline-block; max-width: 80%; }

.mr { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; }
.mr.first { margin-top: 8px; }
.mr.out { justify-content: flex-end; }
.mr .av-slot { width: 34px; flex: none; }
.bubble.pending { opacity: .75; }
.bubble { position: relative; max-width: min(520px, 78%); background: var(--in); border-radius: var(--radius); padding: 5px 9px 6px; box-shadow: var(--shadow); word-wrap: break-word; overflow-wrap: anywhere; }
.mr.out .bubble { background: var(--out); }
.mr.in.last .bubble { border-bottom-left-radius: 4px; }
.mr.out.last .bubble { border-bottom-right-radius: 4px; }
.wdot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; }
.bubble.deleted { opacity: .55; }
.bubble.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }
.b-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.staff-tag { font-weight: 500; font-size: 11px; color: var(--muted); background: var(--bg-2); border-radius: 6px; padding: 0 6px; }
.b-text { white-space: pre-wrap; line-height: 1.38; }
.b-meta { float: right; margin: 6px -2px -4px 12px; font-size: 12px; color: var(--in-meta); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; position: relative; top: 2px; }
.mr.out .b-meta { color: var(--out-meta); }
.b-meta .tag { color: var(--accent); font-weight: 600; cursor: pointer; }
.b-meta .sales { color: var(--violet); font-weight: 500; }
.b-meta svg { width: 16px; height: 16px; }
.b-quote { border-left: 3px solid var(--accent); background: var(--quote-in); border-radius: 4px; padding: 3px 8px; margin: 2px 0 4px; font-size: 13px; cursor: pointer; }
.mr.out .b-quote { border-color: var(--out-meta); background: var(--quote-out); }
.b-quote .qn { font-weight: 600; color: var(--accent); }
.mr.out .b-quote .qn { color: var(--out-meta); }
.b-quote .qt { color: var(--text); opacity: .8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-media { margin: 0 -9px 4px; border-radius: 0; overflow: hidden; position: relative; background-size: cover; background-position: center; cursor: zoom-in; }
.bubble.media-first .b-media { margin-top: -5px; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.bubble.media-only { padding: 0; background: transparent !important; box-shadow: none !important; }
.bubble.media-only .b-media { margin: 0; border-radius: var(--radius); }
.bubble.media-only .b-meta { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.4); color: #fff; padding: 1px 6px; border-radius: 10px; margin: 0; top: auto; float: none; }
.b-media img, .b-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.b-media .mini { position: absolute; inset: 0; background-size: cover; filter: blur(8px); transform: scale(1.1); }
.b-media img { position: relative; }
.b-media.round { border-radius: 50% !important; }
.b-file { display: flex; gap: 10px; align-items: center; padding: 3px 0 4px; min-width: 220px; }
.b-file .fi { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.mr.out .b-file .fi { background: var(--out-meta); }
.b-file .fn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.b-file .fs { font-size: 12px; color: var(--muted); }
.b-sticker { width: 160px; height: 160px; object-fit: contain; display: block; }
.b-emoji { font-size: 64px; line-height: 1.1; }
audio { height: 36px; max-width: 280px; display: block; margin: 2px 0 4px; }

/* ---------- composer ---------- */
.composer { padding: 6px 14px 12px; }
.composer-inner { max-width: 760px; margin: 0 auto; }
.cbox { background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); }
.cbar { display: flex; align-items: center; gap: 10px; padding: 7px 10px 0 14px; font-size: 13px; }
.cbar .bar { width: 2px; align-self: stretch; background: var(--accent); }
.cbar .ct { color: var(--accent); font-weight: 600; }
.cfiles { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px 0; }
.cfile { position: relative; width: 84px; height: 84px; border-radius: 8px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; font-size: 11px; text-align: center; padding: 4px; color: var(--muted); }
.cfile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cfile .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 12px; z-index: 2; }
.cfile .prog { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); z-index: 2; }
.crow { display: flex; align-items: flex-end; gap: 4px; padding: 4px 6px; }
.crow textarea { border: 0 !important; background: transparent !important; resize: none; min-height: 40px; max-height: 220px; padding: 10px 6px; line-height: 1.35; box-shadow: none; }
.send-btn { color: var(--accent); }
.drop { position: absolute; inset: 0; background: rgba(51, 144, 236, .18); border: 3px dashed var(--accent); display: grid; place-items: center; font-size: 20px; color: var(--accent); font-weight: 600; z-index: 20; pointer-events: none; }

/* ---------- info panel ---------- */
.info { width: 360px; background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.info-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; min-height: 56px; border-bottom: 1px solid var(--line); }
.info-body { flex: 1; overflow-y: auto; padding: 0 16px 20px; }
.info-hero { text-align: center; padding: 18px 0 10px; }
.info-hero .t1 { font-size: 17px; font-weight: 600; margin-top: 10px; }
.sec { border-bottom: 8px solid var(--bg-2); margin: 0 -16px; padding: 4px 16px 14px; }
.sec:last-child { border-bottom: 0; }
.tcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
[data-theme="dark"] .tcard { border-color: var(--bg-2); }
.tcard.focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tcard .th { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.tcard .tn { font-weight: 600; }
.tcard .tm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tcard .tb { margin-top: 10px; }
.kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 8px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.kv > span { color: var(--muted); }
.note { background: var(--yellow-soft); border-radius: 8px; padding: 6px 9px; margin-bottom: 6px; font-size: 13px; white-space: pre-wrap; }
.ev { font-size: 12px; color: var(--muted); padding: 2px 0; }
.member { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.member:hover { background: var(--hover); }

/* ---------- tickets / incidents list ---------- */
.ti { display: flex; gap: 10px; padding: 9px; border-radius: 10px; cursor: pointer; color: inherit; }
.ti:hover { background: var(--hover); }
.ti.on { background: var(--active); color: #fff; }
.ti.on .muted, .ti.on .faint { color: rgba(255,255,255,.8); }
.ti .tt { font-weight: 600; }

/* ---------- pages ---------- */
.page { flex: 1; overflow: auto; padding: 22px 26px; }
.card { background: var(--bg); border-radius: 14px; padding: 18px; margin-bottom: 16px; max-width: 1080px; }
.hint { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--hover); }
.progress { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }

/* ---------- menus, modals ---------- */
.ctx { position: fixed; z-index: 70; background: var(--bg); border-radius: 12px; box-shadow: var(--menu-shadow); padding: 6px 0; min-width: 220px; max-width: 320px; }
.ctx button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 8px 16px; cursor: pointer; text-align: left; font-size: 14px; }
.ctx button:hover { background: var(--hover); }
.ctx button svg { color: var(--muted); }
.ctx .sep { height: 1px; background: var(--line); margin: 5px 0; }
.ctx .lbl { padding: 4px 16px; font-size: 12px; color: var(--muted); }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 50; }
.modal { background: var(--bg); border-radius: 14px; width: min(520px, 94vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--menu-shadow); }
.modal.wide { width: min(820px, 96vw); }
.modal-head { padding: 14px 18px 6px; display: flex; align-items: center; }
.modal-body { padding: 8px 18px 14px; overflow: auto; }
.modal-foot { padding: 10px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 80; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 90; align-items: center; }
.toast { background: rgba(0,0,0,.8); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 14px; max-width: 460px; }
.toast.error { background: var(--red); }
.pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list label { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg-2); }
.login .box { width: 340px; background: var(--bg); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); text-align: center; }
.login .logo { width: 88px; height: 88px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; margin: 0 auto 16px; color: #fff; }
.login .logo svg { width: 46px; height: 46px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 3px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.av { position: relative; }
.av img { position: absolute; inset: 0; }

.sec-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 10px 4px; text-transform: none; }
.ci .tkline { color: var(--accent); }
.ci.on .tkline { color: #fff; }

/* широкий режим (отчёты, журнал, канбан) — без списка чатов */
.app.wide { grid-template-columns: 72px minmax(0, 1fr) auto; }
.app.wide .side { display: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.kpi.warn { box-shadow: inset 0 0 0 1.5px var(--yellow); }
.kv-big { font-size: 26px; font-weight: 600; margin: 4px 0 2px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.cols2 .card { max-width: none; }
svg.i.xs { width: 13px; height: 13px; vertical-align: -2px; }
.kb-page { padding: 14px 16px 0; display: flex; flex-direction: column; overflow: hidden; }
.kb-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-top h2 { font-size: 20px; margin-right: 6px; }
.kb-quick { margin: 0; }
.kb-quick .chip b { font-weight: 600; margin-left: 2px; }
.kb-agents { display: flex; }
.kb-av { border: 2px solid var(--bg-2); background: none; padding: 0; border-radius: 50%; margin-left: -6px; cursor: pointer; transition: transform .1s; }
.kb-av:first-child { margin-left: 0; }
.kb-av:hover { transform: translateY(-2px); z-index: 2; }
.kb-av.on { border-color: var(--accent); z-index: 3; }
.board { flex: 1; min-height: 0; display: flex; gap: 12px; align-items: stretch; overflow-x: auto; padding-bottom: 14px; }
.kcol { flex: 1 0 215px; max-width: 360px; background: rgba(0,0,0,.035); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; min-height: 0; transition: box-shadow .15s, background .15s; }
[data-theme="dark"] .kcol { background: rgba(255,255,255,.03); }
.kcol.collapsed { flex: 0 0 170px; }
.kcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.khead { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 8px 8px 10px; font-size: 14px; }
.kdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kcount { background: var(--bg); color: var(--muted); border-radius: 10px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.kattn { color: var(--red); font-size: 12px; font-weight: 600; }
.kbody { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 8px; min-height: 60px; }
.kempty { border: 2px dashed var(--line); border-radius: 12px; padding: 18px 8px; text-align: center; color: var(--faint); font-size: 12px; }
.kcard { position: relative; background: var(--bg); border-radius: 12px; padding: 10px 12px; cursor: pointer; box-shadow: 0 1px 2px rgba(16,35,47,.08), 0 1px 1px rgba(16,35,47,.04); border-left: 3px solid transparent; transition: box-shadow .12s, transform .12s; }
.kcard:hover { box-shadow: 0 4px 14px rgba(16,35,47,.12); transform: translateY(-1px); }
.kcard.att { border-left-color: var(--red); }
.kcard.sel { box-shadow: 0 0 0 2px var(--accent); }
.kcard.drag { opacity: .4; }
.kc-top { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 4px; }
.kc-id { color: var(--muted); font-weight: 600; font-size: 12px; }
.kc-age { color: var(--faint); font-size: 12px; }
.kc-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-chat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 6px; min-width: 0; }
.kc-partner { display: block; font-size: 12px; color: #e0701b; margin-top: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kc-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 24px; }
.kc-chip { font-size: 11px; background: var(--bg-2); color: var(--muted); border-radius: 6px; padding: 1px 7px; }
.kc-meta { font-size: 11px; color: var(--faint); }
.kc-none { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed var(--faint); color: var(--faint); display: grid; place-items: center; font-size: 12px; }
.kc-actions { display: none; gap: 6px; margin-top: 8px; }
.kcard:hover .kc-actions { display: flex; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 460px; max-width: 92%; background: var(--bg); box-shadow: -8px 0 30px rgba(0,0,0,.12); display: flex; flex-direction: column; z-index: 30; }
.dr-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); min-height: 56px; }
.dr-body { flex: 1; overflow-y: auto; padding: 14px 18px 24px; }
.dr-title { font-size: 17px; font-weight: 600; border: 1px solid transparent !important; padding: 4px 6px !important; margin: 0 -6px 8px; resize: none; min-height: 0 !important; background: transparent !important; }
.dr-title:hover, .dr-title:focus { border-color: var(--line) !important; }
.dr-chat { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg-2); color: inherit; margin-bottom: 12px; }
.dr-kv { grid-template-columns: 100px minmax(0, 1fr); margin-bottom: 12px; }
.dr-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; background: var(--chat-bg); border-radius: 10px; padding: 8px; }
.dr-msg { background: var(--in); border-radius: 10px; padding: 5px 9px; max-width: 88%; box-shadow: var(--shadow); }
.dr-msg.out { background: var(--out); align-self: flex-end; }
.dr-mt { white-space: pre-wrap; font-size: 13px; }
.dr-reply { margin-top: 8px; }

.pill.orange { background: rgba(240, 120, 40, .14); color: #e0701b; }

/* ---------- поиск */
mark { background: #ffe066; color: inherit; border-radius: 3px; padding: 0 1px; }
[data-theme="dark"] mark { background: #b8860b; color: #fff; }
.ci.on mark { background: rgba(255,255,255,.35); color: #fff; }
.ci.kb { box-shadow: inset 0 0 0 2px var(--accent); }
.ci .why { color: var(--accent); }
.ci.on .why { color: #fff; }
.sr-note { font-size: 12px; color: var(--muted); padding: 8px 10px 0; }
.csearch { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.csearch.hidden { display: none; }
.csearch input { flex: 1; border: 0 !important; background: transparent !important; outline: none; box-shadow: none !important; padding: 6px 0 !important; font-size: 14px; }
.csearch .i { color: var(--muted); }
.csearch #cs-n { white-space: nowrap; }

/* ---------- быстрый ответ по инциденту над полем ввода */
.cinc { display: flex; align-items: center; gap: 10px; margin: 8px 10px 0; padding: 6px 8px 6px 10px; border-radius: 10px; background: var(--yellow-soft); font-size: 13px; }
.cinc .zap { font-size: 15px; }
.cinc.done { background: var(--bg-2); }
.cinc.on { box-shadow: inset 0 0 0 2px var(--yellow); }
.cinc .btn.sm { white-space: nowrap; }
.ci .tk.inc { background: var(--yellow-soft); color: var(--yellow); }

/* ---------- группы чуть отличаются от личных чатов (едва заметный оттенок) */
.ci.grp:not(.on):not(:hover):not(.kb) { background: var(--grp-tint); }
:root { --grp-tint: rgba(51, 144, 236, .055); }
[data-theme="dark"] { --grp-tint: rgba(255, 255, 255, .035); }

/* ---------- пересланное сообщение */
.b-fwd { font-size: 13px; color: var(--accent); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.mr.out .b-fwd { color: var(--out-accent, var(--accent)); }
.b-fwd b { font-weight: 600; }

/* ---------- выделение сообщений */
.mr.selmode { cursor: pointer; position: relative; padding-left: 34px; border-radius: 8px; }
.mr.selmode:hover { background: rgba(0,0,0,.04); }
.mr.picked { background: rgba(51, 144, 236, .12); }
.mr.picked:hover { background: rgba(51, 144, 236, .16); }
.selbox { position: absolute; left: 6px; bottom: 8px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; }
.selbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.composer.selecting #cinc, .composer.selecting #cbars, .composer.selecting .cfiles, .composer.selecting .crow { display: none !important; }
.csel { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.csel.hidden { display: none; }

/* ---------- окно «Переслать» */
.fw-list { max-height: 340px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.fw-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.fw-row:hover { background: var(--hover); }
.fw-row.grp { background: var(--grp-tint); }
.fw-row.grp:hover { background: var(--hover); }
.fw-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fw-picked:empty { display: none; }
.fw-picked .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.fw-picked .chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.bc-text { color: var(--muted); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* ---------- статус сотрудника */
.rail #st-btn { position: relative; }
.st-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); vertical-align: middle; }
.st-dot.on, .st-dot.online { background: var(--green); }
.st-dot.away { background: var(--yellow); }
.st-dot.break { background: var(--violet); }
.st-dot.offline { background: var(--faint); }
.rail #st-btn .st-dot { position: absolute; top: 9px; left: 42px; box-shadow: 0 0 0 2px var(--rail); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--bg-2); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.stat b { font-size: 24px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.team-alert { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--yellow-soft); font-size: 13px; }
.team-tbl tr.warn td { background: var(--yellow-soft); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }

/* ---------- язык клиента */
.lang-b { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 1px 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.lang-sw { display: inline-flex; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); }
.lang-sw button { border: 0; background: transparent; padding: 1px 8px; font-size: 11px; cursor: pointer; color: var(--muted); }
.lang-sw button.on { background: var(--accent); color: #fff; }
.bi { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
.bi textarea { flex: 1; }
.bi-l { font-size: 10px; font-weight: 700; color: var(--muted); width: 20px; padding-top: 9px; }

/* ---------- ждём партнёра */
.pw-chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; align-self: center; }
.pw-chip.on { background: var(--yellow-soft); border-color: var(--yellow); color: var(--text); }

/* ---------- правки и удаления */
.hist-link { cursor: pointer; text-decoration: underline dotted; }
.bubble.deleted .b-text { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); }
.hist-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist-old { background: var(--red-soft, #fdecec); padding: 6px 10px; border-radius: 8px; white-space: pre-wrap; margin-top: 4px; font-size: 14px; }
.hist-new { background: var(--green-soft, #e7f6ea); padding: 6px 10px; border-radius: 8px; white-space: pre-wrap; font-size: 14px; }
.hist-arrow { text-align: center; color: var(--muted); font-size: 12px; }
.offhours { margin: 4px 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 12.5px; }
.disabled-box { opacity: .45; pointer-events: none; }

/* ---------- приоритетные чаты */
.prio { color: #f5a623; margin-right: 4px; font-size: 14px; }
.ci.on .prio { color: #fff !important; }
.prio-pill { background: rgba(245, 166, 35, .15); color: #c77c00; }
[data-theme="dark"] .prio-pill { color: #f5c26b; }

/* ---------- закреплённый диалог */
.dlg { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); color: var(--muted); white-space: nowrap; margin-left: 4px; }
.dlg.mine { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dlg.lost { background: var(--yellow-soft); color: #a86b00; }
.dlg.draft { background: var(--accent-soft); color: var(--accent); }
.ci.on .dlg { background: rgba(255,255,255,.2); color: #fff; }
.dlg-pill { background: var(--accent-soft); color: var(--accent); }
.dlg-bar { background: var(--bg-2); font-size: 13px; }
.toast.click { cursor: pointer; }

/* ================================================================ ТЕЛЕФОН */
.m-only, .m-back-fab, .m-menu-fab { display: none; }
.top-acts { display: contents; }
@media (max-width: 820px) {
  .rail .my-prog { display: none; }
  html, body { height: 100%; overflow: hidden; }
  body { -webkit-text-size-adjust: 100%; }
  input, textarea, select { font-size: 16px !important; } /* иначе iPhone приближает поле при вводе */
  .m-only { display: inline-flex; }

  .app, .app.wide { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100dvh; }
  .app .side { display: flex; grid-row: 1; grid-column: 1; border-right: 0; }
  .app .main { display: none; grid-row: 1; grid-column: 1; }
  .app.m-main .side { display: none; }
  .app.m-main .main { display: flex; }

  /* на телефоне колонки папок нет: папки — вкладками над списком, остальное — в меню ☰ */
  .rail { display: none !important; }
  .side-head { padding-top: calc(10px + env(safe-area-inset-top)); }
  .chat-top { padding: calc(6px + env(safe-area-inset-top)) 6px 6px 2px; gap: 6px; flex-wrap: wrap; min-height: 52px; }
  .chat-top .t1 { font-size: 16px; }
  .chat-top .grow { min-width: 0; flex: 1 1 0; }
  .chat-top.has-acts .top-acts { display: flex; order: 10; flex: 0 0 100%; gap: 6px; overflow-x: auto; padding: 4px 4px 2px; scrollbar-width: none; align-items: center; }
  .top-acts::-webkit-scrollbar { display: none; }
  .top-acts > * { flex: 0 0 auto; }
  .chat-top .av { width: 38px !important; height: 38px !important; }

  .msgs-inner { padding: 8px 6px; }
  .bubble { max-width: 86vw; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .b-media { max-width: 72vw !important; }
  .b-media img, .b-media video { max-width: 72vw; height: auto !important; }
  .composer { padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
  .crow { gap: 2px; }
  .pw-chip { padding: 3px 7px; }

  .info { position: fixed; inset: 0; width: auto; z-index: 60; padding-top: env(safe-area-inset-top); }
  .page { padding: 12px 10px calc(20px + env(safe-area-inset-bottom)); }
  .app.m-page .page, .app.m-page .kb-page { padding-top: calc(56px + env(safe-area-inset-top)); }
  .app.m-sub .page { padding-top: calc(52px + env(safe-area-inset-top)); }
  .cols, .cols2 { grid-template-columns: minmax(0, 1fr); }
  .card { overflow-x: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .app.m-page .m-menu-fab { display: grid; place-items: center; position: fixed; z-index: 40; top: calc(8px + env(safe-area-inset-top)); left: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); box-shadow: var(--shadow); color: var(--text); }
  .app.m-sub .m-back-fab { display: grid; place-items: center; position: fixed; z-index: 40; top: calc(8px + env(safe-area-inset-top)); left: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); box-shadow: var(--shadow); color: var(--text); }

  /* меню сообщения и окна — снизу, как на iPhone */
  .ctx { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); max-width: none; max-height: 70vh; overflow-y: auto; border-radius: 14px; }
  .ctx button { padding: 12px 16px; font-size: 16px; }
  .overlay { place-items: end center !important; }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .modal, .modal.wide { width: 100vw; max-height: 92dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .toast { max-width: 92vw; }
  .drawer { width: 100vw !important; }
  .kb-page { padding: 10px 6px 0; }
  .csearch { padding-left: 8px; }
}


/* ================================================================ НАВИГАЦИЯ КАК В TELEGRAM */
/* колонка папок слева */
.rail { padding: 0 0 8px; }
.rail .menu-btn { height: 56px; padding: 0; justify-content: center; position: relative; flex: none; }
.rail .menu-btn .i { width: 24px; height: 24px; }
.rail a[data-f] { padding: 10px 2px 9px; margin: 0; }
.rail a[data-f] .i { width: 26px; height: 26px; }
.rail a[data-f].on { background: rgba(255, 255, 255, .07); }
.rail a.on::before { display: none; }
.rail .badge { top: 5px; left: calc(50% + 4px); border: 2px solid var(--rail); height: 20px; min-width: 20px; border-radius: 10px; }
.rail a[data-f]:not(.on) .badge:not(.red):not(.yellow) { background: #5b6b7c; }
.mdot { position: absolute; top: 15px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--rail); }
.mdot.red { background: var(--red); } .mdot.yellow { background: var(--yellow); }

/* ☰ и папки-вкладки в шапке списка — только на телефоне */
.sh-menu { display: none; position: relative; margin-left: -6px; }
.sh-menu .mdot { top: 6px; left: 22px; box-shadow: 0 0 0 2px var(--bg); }
.ftabs { display: none; }

/* выезжающее меню */
.drawer-ov { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .4); animation: fadeIn .18s; }
.drawer-menu { position: fixed; z-index: 81; top: 0; bottom: 0; left: 0; width: 300px; background: var(--bg); box-shadow: 4px 0 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-100%); transition: transform .18s ease-out; padding-bottom: env(safe-area-inset-bottom); }
.drawer-menu.open { transform: translateX(0); }
@keyframes fadeIn { from { opacity: 0; } }
.dm-head { padding: calc(20px + env(safe-area-inset-top)) 20px 14px; }
.dm-av { position: relative; width: 64px; }
.dm-av .st-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; box-shadow: 0 0 0 3px var(--bg); }
.dm-name { font-weight: 600; font-size: 16px; margin-top: 12px; }
.dm-status { border: 0; background: none; padding: 0; margin-top: 3px; color: var(--accent); font-size: 14px; cursor: pointer; text-align: left; }
.dm-sec { border-top: 1px solid var(--line); padding: 6px 0; }
.dm-acc { display: flex; align-items: center; gap: 14px; padding: 8px 20px; color: var(--text); }
.dm-acc:hover { background: var(--hover); }
.dm-item { display: flex; align-items: center; gap: 20px; width: 100%; padding: 11px 20px; border: 0; background: none; color: var(--text); font-size: 15px; cursor: pointer; text-align: left; }
.dm-item:hover { background: var(--hover); }
.dm-item .i { color: var(--muted); width: 22px; height: 22px; }
.dm-item.on { color: var(--accent); } .dm-item.on .i { color: var(--accent); }
.dm-item .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; }
.dm-item .badge.red { background: var(--red); }
.sw { width: 34px; height: 20px; border-radius: 10px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.sw.on { background: var(--accent); } .sw.on::after { left: 16px; }
.dm-foot { margin-top: auto; padding: 14px 20px; font-size: 12px; color: var(--muted); }

@media (max-width: 820px) {
  .sh-menu { display: inline-flex; }
  .side-title { font-size: 18px; margin: 0 4px 8px; }
  .ftabs { display: flex; gap: 2px; overflow-x: auto; margin: 6px -12px -8px; padding: 0 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; order: 10; }
  .ftabs::-webkit-scrollbar { display: none; }
  .ft { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 10px 10px 9px; color: var(--muted); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
  .ft.on { color: var(--accent); border-bottom-color: var(--accent); }
  .ft .badge { position: static; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #8e99a5; color: #fff; font-size: 11px; display: grid; place-items: center; }
  .ft .badge.red { background: var(--red); } .ft .badge.yellow { background: var(--yellow); }
  .ft.on .badge:not(.red):not(.yellow) { background: var(--accent); }
  .drawer-menu { width: min(84vw, 320px); }
}
