/* Team-Flow «next» features (2026-10-05): ветки, закреплённые, боты, ивенты, временные комнаты.
   Classic = variables from style.css; Glass = html[data-theme="glass"] overrides at the end. */
.fx-hbtn { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.fx-hbtn.hidden { display: none !important; }
.fx-hcount { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 0; }
.fx-hcount:empty { display: none; }
.fx-hbtn.fx-has-unread .fx-hcount { color: #fff; background: var(--danger); border-radius: 99px; padding: 0 5px; line-height: 16px; }
.fx-hbtn.fx-live .fx-hcount { color: #fff; background: #ed4245; border-radius: 99px; padding: 0 5px; line-height: 16px; animation: fxPulse 1.6s ease-in-out infinite; }
@keyframes fxPulse { 50% { box-shadow: 0 0 0 4px rgba(237, 66, 69, .25); } }

/* popovers, context menu, modal */
.fx-pop { position: fixed; z-index: 9000; max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--sidebar); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; box-shadow: var(--elev); overflow: hidden; animation: fxIn .12s ease-out; }
@keyframes fxIn { from { opacity: 0; transform: translateY(-4px); } }
.fx-pop-head { padding: 12px 14px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.fx-pop-body { overflow: auto; padding: 8px; }
.fx-empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: 13px; line-height: 1.5; }
.fx-empty-ico { font-size: 34px; margin-bottom: 6px; opacity: .85; }
.fx-hint { color: var(--muted); font-size: 12px; line-height: 1.45; }
.fx-ctx { position: fixed; z-index: 9100; width: 210px; padding: 6px; background: #111219; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; box-shadow: var(--elev); }
.fx-ctx button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fx-ctx button span { width: 18px; text-align: center; }
.fx-ctx button:hover { background: var(--accent); color: #fff; }
.fx-ctx button.danger { color: var(--danger); }
.fx-ctx button.danger:hover { background: var(--danger); color: #fff; }
.fx-modal { position: fixed; inset: 0; z-index: 8000; background: rgba(5,6,10,.62); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; }
.fx-modal.hidden { display: none; }
.fx-modal-card { width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; box-shadow: var(--elev); overflow: hidden; animation: fxIn .14s ease-out; }
.fx-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 17px; }
.fx-x { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.fx-x:hover { background: var(--hover); color: var(--text); }
.fx-modal-body { overflow: auto; padding: 16px 18px 20px; }
.fx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: var(--hover); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.fx-btn:hover { background: var(--active); }
.fx-btn-primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.fx-btn-primary:hover { background: var(--accent-2); }
.fx-btn-ghost { background: transparent; }
.fx-inline { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.fx-inline input { flex: 1; min-width: 0; }
.fx-inline input, .fx-form input, .fx-form textarea, .fx-form select, .fx-temp-pop input { background: var(--input); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
.fx-inline button { white-space: nowrap; }
.fx-flash { animation: fxFlash 1.6s ease-out; }
@keyframes fxFlash { 0%, 30% { background: rgba(250, 200, 60, .18); } 100% { background: transparent; } }

/* messages: bot tag, embeds, sys pin, ephemeral, thread summary */
.fx-bot-tag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin: 0 6px 0 4px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px; }
.fx-embeds { display: grid; gap: 6px; margin-top: 6px; max-width: 520px; }
.fx-embed { position: relative; border-left: 4px solid var(--accent); background: rgba(255,255,255,.035); border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.45; overflow: hidden; }
.fx-em-author { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.fx-em-title { display: block; font-weight: 700; color: var(--text); margin-bottom: 4px; text-decoration: none; }
a.fx-em-title { color: #00a8fc; }
a.fx-em-title:hover { text-decoration: underline; }
.fx-em-desc { color: #d6d9e4; word-break: break-word; }
.fx-em-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.fx-em-field { flex: 1 1 100%; font-size: 13px; }
.fx-em-field.inline { flex: 1 1 140px; }
.fx-em-field b { display: block; font-size: 12px; margin-bottom: 2px; }
.fx-em-img { display: block; max-width: 100%; max-height: 300px; border-radius: 6px; margin-top: 8px; }
.fx-em-thumb { float: right; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; margin: 0 0 6px 10px; }
.fx-em-foot { clear: both; font-size: 11px; color: var(--muted); margin-top: 8px; }
.msg.fx-sys-msg { display: flex; align-items: flex-start; gap: 12px; padding: 6px 16px 6px 22px; min-height: 0; color: var(--muted); font-size: 14px; }
.fx-sys-ico { width: 28px; text-align: center; font-size: 15px; flex: 0 0 auto; padding-top: 1px; }
.fx-sys-body b { color: var(--text); font-weight: 600; }
.fx-sys-body a { color: var(--text); font-weight: 600; text-decoration: none; }
.fx-sys-body a:hover { text-decoration: underline; }
.fx-sys-quote { color: var(--muted); font-style: italic; margin-left: 4px; }
.fx-sys-body .time { font-size: 11px; margin-left: 6px; }
.msg.fx-ephemeral { background: rgba(88, 101, 242, .07); border-left: 2px solid var(--accent); }
.fx-eph-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fx-eph-note a { color: #00a8fc; }
.fx-ts-wrap { margin-top: 6px; }
.fx-thread-sum { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; max-width: 100%; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.fx-thread-sum:hover { background: var(--hover); border-color: rgba(124,108,255,.45); }
.fx-thread-sum b { font-weight: 700; }
.fx-ts-n { color: #00a8fc; font-weight: 600; }
.fx-ts-last { color: var(--muted); font-size: 12px; }
.fx-ts-go { color: var(--muted); font-size: 16px; line-height: 1; }
.fx-thread-sum.unread { border-color: var(--danger); }
.fx-thread-sum.unread .fx-ts-ico::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 3px; border-radius: 50%; background: var(--danger); vertical-align: 6px; }

/* pins / thread list */
.fx-pin { display: flex; gap: 10px; padding: 10px; border-radius: 10px; position: relative; }
.fx-pin + .fx-pin { border-top: 1px solid rgba(255,255,255,.05); }
.fx-pin:hover { background: rgba(255,255,255,.03); }
.fx-pin > img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.fx-pin-main { flex: 1; min-width: 0; font-size: 14px; }
.fx-pin-meta { display: flex; align-items: center; gap: 4px; }
.fx-pin-meta .time { color: var(--muted); font-size: 11px; margin-left: 4px; }
.fx-pin-text { margin-top: 2px; word-break: break-word; color: #dfe2ec; }
.fx-pin-img { display: block; max-width: 220px; max-height: 120px; border-radius: 6px; margin-top: 4px; }
.fx-pin-by { font-size: 11px; color: var(--muted); margin-top: 4px; }
.fx-pin-acts { display: flex; gap: 4px; align-items: flex-start; opacity: .6; }
.fx-pin:hover .fx-pin-acts { opacity: 1; }
.fx-pin-acts button, .fx-th-b, .fx-tmsg-acts button, .fx-ev-own button { border: 0; background: var(--hover); color: var(--text); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.fx-pin-acts button:hover, .fx-th-b:hover, .fx-tmsg-acts button:hover, .fx-ev-own button:hover { background: var(--active); }
.fx-tl { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; padding: 10px; border-radius: 10px; cursor: pointer; }
.fx-tl + .fx-tl { margin-top: 2px; }
.fx-tl:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
.fx-tl-top { display: flex; gap: 6px; align-items: baseline; }
.fx-tl-top .time { margin-left: auto; color: var(--muted); font-size: 11px; }
.fx-tl.unread .fx-tl-top b::before { content: '● '; color: var(--danger); }
.fx-tl-sub { font-size: 12px; color: #00a8fc; margin-top: 2px; }
.fx-tl-parent { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.fx-tl-parent img { width: 18px; height: 18px; border-radius: 50%; }
.fx-tl-parent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* thread side panel */
.fx-thread { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 7000; display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid rgba(255,255,255,.07); box-shadow: -18px 0 40px rgba(0,0,0,.35); animation: fxSlide .16s ease-out; }
.fx-thread.hidden { display: none; }
@keyframes fxSlide { from { transform: translateX(24px); opacity: 0; } }
.fx-th-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; min-height: 56px; border-bottom: 1px solid rgba(255,255,255,.06); background: var(--header); }
.fx-th-ico { font-size: 20px; }
.fx-th-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fx-th-ttl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.fx-th-ttl small { color: var(--muted); font-size: 12px; }
.fx-th-b.hidden { display: none; }
.fx-th-scroll { flex: 1; overflow: auto; padding: 12px 0; }
.fx-th-parent { padding: 0 12px 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.fx-tparent { background: rgba(124,108,255,.07); border-radius: 10px; }
.fx-th-sep { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 12px 16px 4px; }
.fx-tmsg { display: flex; gap: 10px; padding: 8px 12px; position: relative; }
.fx-tmsg:hover { background: rgba(255,255,255,.025); }
.fx-tmsg > img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.fx-tmsg-main { flex: 1; min-width: 0; }
.fx-tmsg .meta { display: flex; align-items: baseline; gap: 6px; font-weight: 600; }
.fx-tmsg .meta .time { color: var(--muted); font-size: 11px; font-weight: 400; }
.fx-tmsg .body { word-break: break-word; line-height: 1.45; font-size: 15px; }
.fx-tmsg .msg-img img { max-width: 100%; max-height: 260px; border-radius: 8px; margin-top: 4px; }
.fx-tmsg-acts { position: absolute; right: 10px; top: 4px; display: none; gap: 4px; }
.fx-tmsg:hover .fx-tmsg-acts { display: flex; }
.fx-th-locked { padding: 10px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid rgba(255,255,255,.06); }
.fx-th-locked.hidden, .fx-th-form.hidden { display: none; }
.fx-th-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.fx-th-form textarea { flex: 1; resize: none; background: var(--input); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; max-height: 140px; }
.fx-th-form button { width: 42px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; }
@media (min-width: 1100px) { body.fx-thread-on #app { padding-right: 440px; } body.fx-thread-on .members { display: none !important; } }

/* events */
.fx-ev-top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.fx-ev-list { display: grid; gap: 12px; }
.fx-ev { display: flex; gap: 0; border-radius: 14px; overflow: hidden; background: var(--sidebar); border: 1px solid rgba(255,255,255,.06); }
.fx-ev-badge-live { color: #fff; background: #ed4245; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 700; animation: fxPulse 1.6s ease-in-out infinite; }
.fx-ev.fx-ev-live { border-color: rgba(237,66,69,.6); box-shadow: 0 0 0 1px rgba(237,66,69,.25), 0 8px 26px rgba(237,66,69,.12); }
.fx-ev-soon { color: #111; background: #fbbf24; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.fx-ev-past { color: var(--muted); background: var(--hover); border-radius: 99px; padding: 2px 9px; font-size: 12px; }
.fx-ev.fx-ev-past { opacity: .7; }
.fx-ev-cover { flex: 0 0 190px; min-height: 150px; background: center / cover no-repeat; }
.fx-ev-cover-def { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(124,108,255,.45), rgba(91,140,255,.25)); color: #fff; }
.fx-ev-day { font-size: 44px; font-weight: 800; line-height: 1; }
.fx-ev-mon { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .85; margin-top: 4px; }
.fx-ev-live .fx-ev-cover-def { background: linear-gradient(135deg, rgba(237,66,69,.55), rgba(124,108,255,.35)); }
.fx-ev-main { flex: 1; min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.fx-ev-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #c9b8ff; font-weight: 600; }
.fx-ev-tz { font-size: 11px; color: var(--muted); font-weight: 400; text-transform: none; }
.fx-ev-title { font-size: 18px; font-weight: 800; }
.fx-ev-desc { font-size: 14px; color: #d3d6e1; line-height: 1.45; max-height: 64px; overflow: hidden; }
.fx-ev-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.fx-ev-loc { color: var(--text); background: var(--hover); border: 0; border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 13px; }
button.fx-ev-voice { cursor: pointer; }
button.fx-ev-voice:hover { background: var(--accent); color: #fff; }
.fx-ev-rsvp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.fx-rsvp { border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.fx-rsvp b { margin-left: 4px; }
.fx-rsvp:hover { background: var(--hover); }
.fx-rsvp.on { background: var(--green); border-color: var(--green); color: #06221a; font-weight: 700; }
.fx-rsvp.on[data-st="interested"] { background: #fbbf24; border-color: #fbbf24; color: #2b1d00; }
.fx-avs { display: inline-flex; margin-left: 4px; }
.fx-avs img { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sidebar); margin-left: -8px; object-fit: cover; }
.fx-avs img:first-child { margin-left: 0; }
.fx-ev-own { margin-left: auto; display: flex; gap: 4px; }
.fx-form { display: grid; gap: 12px; }
.fx-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fx-f > label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fx-f-row { display: grid; grid-template-columns: 1fr 180px; gap: 12px; }
.fx-seg { display: flex; gap: 14px; font-size: 14px; }
.fx-seg label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.fx-form .hidden { display: none !important; }
.fx-cover-row { display: flex; align-items: center; gap: 10px; }
.fx-cover-prev { width: 120px; height: 64px; border-radius: 8px; background: var(--input) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.fx-actions { display: flex; gap: 8px; }

/* lists (bots, webhooks) */
.fx-list { display: grid; gap: 8px; margin-top: 8px; }
.fx-li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.fx-li > img { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.fx-li-main { flex: 1; min-width: 0; }
.fx-li-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.fx-li-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fx-li > .fx-li-acts { margin-top: 0; }
.fx-li-sm { padding: 6px 8px; align-items: center; }
.fx-li-sm > img { width: 26px; height: 26px; }
.fx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5c6070; vertical-align: 1px; }
.fx-dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.fx-token { margin: 10px 0; padding: 12px 14px; border-radius: 10px; background: rgba(45,212,160,.08); border: 1px solid rgba(45,212,160,.4); display: flex; flex-direction: column; gap: 4px; }
.fx-token.hidden { display: none; }
.fx-token small { color: var(--muted); }
.fx-token input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.fx-chan-extra:empty { display: none; }
.fx-chan-extra { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.fx-sub-head { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; }
.fx-sub-head small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.fx-sub-head a { color: #00a8fc; }
.fx-hook .fx-inline input { font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.fx-bots-intro a { color: #00a8fc; }

/* temp rooms */
#voiceChannelList .ch.fx-hub { opacity: .92; border: 1px dashed rgba(124,108,255,.45); }
#voiceChannelList .ch.fx-hub .ch-name { color: #c9b8ff; font-weight: 600; }
#voiceChannelList .ch.fx-temp .ch-name { font-style: normal; }
.fx-temp-badges { display: inline-flex; gap: 3px; margin-left: 4px; font-size: 11px; opacity: .85; }
.fx-temp-ctl { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 0 5px; font-size: 13px; line-height: 22px; }
.fx-temp-ctl:hover { background: var(--active); color: var(--text); }
.fx-temp-pop { display: grid; gap: 10px; }
.fx-switch { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }

/* mobile */
@media (max-width: 760px) {
  .fx-thread { width: 100vw; border-left: 0; }
  .fx-modal { padding: 0; align-items: stretch; }
  .fx-modal-card { max-height: 100vh; height: 100%; border-radius: 0; }
  .fx-ev { flex-direction: column; }
  .fx-ev-cover { flex: 0 0 auto; min-height: 110px; }
  .fx-f-row { grid-template-columns: 1fr; }
  .fx-pop { left: 8px !important; right: 8px; width: auto !important; }
  .fx-hbtn .fx-hcount { display: none; }
  .fx-hbtn.fx-live .fx-hcount, .fx-hbtn.fx-has-unread .fx-hcount { display: inline; }
  .fx-embeds { max-width: 100%; }
}

/* ===== Glass theme ===== */
html[data-theme="glass"] .fx-pop,
html[data-theme="glass"] .fx-ctx,
html[data-theme="glass"] .fx-modal-card,
html[data-theme="glass"] .fx-thread { background: var(--g-panel); border-color: var(--g-border); border-radius: var(--g-radius); box-shadow: 0 0 0 1px rgba(46,230,255,.08), 0 18px 50px rgba(0,0,0,.55), 0 0 30px rgba(139,124,255,.18); }
html[data-theme="glass"] .fx-thread { top: 12px; right: 12px; bottom: 12px; border: 1px solid var(--g-border); }
html[data-theme="glass"] .fx-th-head { background: transparent; }
html[data-theme="glass"] .fx-modal { background: rgba(3,4,10,.55); }
html[data-theme="glass"] .fx-ev,
html[data-theme="glass"] .fx-li,
html[data-theme="glass"] .fx-embed,
html[data-theme="glass"] .fx-thread-sum { background: rgba(255,255,255,.04); border-color: rgba(140,120,255,.22); border-radius: var(--g-radius-sm); }
html[data-theme="glass"] .fx-embed { border-left-width: 4px; }
html[data-theme="glass"] .fx-thread-sum:hover { border-color: var(--g-cyan); box-shadow: 0 0 12px rgba(46,230,255,.18); }
html[data-theme="glass"] .fx-bot-tag { background: linear-gradient(90deg, var(--g-purple), var(--g-cyan)); color: #06070c; }
html[data-theme="glass"] .fx-btn-primary, html[data-theme="glass"] .fx-th-form button { background: linear-gradient(90deg, #8b7cff, #2ee6ff); color: #06070c; }
html[data-theme="glass"] .fx-ev-when { color: var(--g-cyan); }
html[data-theme="glass"] .fx-ctx button:hover { background: linear-gradient(90deg, rgba(139,124,255,.6), rgba(46,230,255,.45)); }
html[data-theme="glass"] #voiceChannelList .ch.fx-hub { border-color: rgba(46,230,255,.45); }
html[data-theme="glass"] .fx-inline input, html[data-theme="glass"] .fx-form input, html[data-theme="glass"] .fx-form textarea, html[data-theme="glass"] .fx-form select, html[data-theme="glass"] .fx-th-form textarea { background: rgba(6,7,12,.6); border-color: rgba(140,120,255,.28); }
@media (min-width: 1100px) { html[data-theme="glass"] body.fx-thread-on #app { padding-right: 464px; } }
@media (max-width: 760px) { html[data-theme="glass"] .fx-thread { inset: 0; border-radius: 0; } }

/* pins: the header 📌 popover replaces the old always-open pinned bar; label moved next to the time
   (the core ::before label became a flex item and pushed the avatar aside) */
#pinnedBar { display: none !important; }
.msg.is-pinned::before { content: none !important; display: none !important; }
.msg.is-pinned .meta .time::after { content: "📌 закреплено"; margin-left: 8px; font-size: 11px; font-weight: 700; color: #a9a4ff; letter-spacing: 0; }

/* channel settings modal: its generic full-width input/button rules must not stretch the webhook rows */
#chanModal .fx-chan-extra .fx-inline { display: flex; flex-wrap: nowrap; }
#chanModal .fx-chan-extra .fx-inline input { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; height: 36px; }
#chanModal .fx-chan-extra button { width: auto; flex: 0 0 auto; margin: 0; padding: 8px 14px; min-height: 0; height: 36px; font-size: 13px; line-height: 1; }
#chanModal .fx-chan-extra .fx-li-acts button { height: 30px; padding: 6px 12px; font-size: 12px; }
#chanModal .fx-chan-extra .fx-hook { align-items: flex-start; }
#chanModal .fx-chan-extra .fx-hook > img { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px; }
#chanModal .fx-chan-extra .fx-li-main { flex: 1; min-width: 0; }

.fx-ev-cover { background-position: left center; }
html[data-theme="glass"] .fx-pop, html[data-theme="glass"] .fx-temp-pop, html[data-theme="glass"] .fx-temp-popw, html[data-theme="glass"] #fxCtxMenu { background: rgba(12,13,24,.97) !important; backdrop-filter: blur(18px); }

/* mobile header: keep the channel title visible next to the extra buttons */
@media (max-width: 760px) {
  #channelHeader .ch-head-main { min-width: 92px; flex: 1 1 92px; }
  .header-util-btns .fx-hbtn { min-width: 32px; width: auto; padding: 0 6px; }
  #fxThreadsBtn:not(.fx-has-unread) { display: none; }
  #fxEventsBtn .fx-hcount { display: none; }
  #fxEventsBtn.fx-live .fx-hcount { display: inline; }
}
@media (max-width: 760px) { html[data-theme="glass"] .fx-thread, html[data-theme="glass"] .fx-modal-card { background: #0b0c16 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; } }

/* DM list (2026-10-05): real conversations; online status = dot only */
#dmList .dm-row { display: flex; align-items: center; gap: 8px; }
#dmList .dm-row .badge { margin-left: auto; }
.dm-ava { position: relative; display: inline-flex; flex: 0 0 auto; }
.dm-dot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: #80848e; box-shadow: 0 0 0 2px var(--panel, #2b2d31); }
.dm-dot.on { background: #23a55a; }
.dm-new-head { margin: 10px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #949ba4); }
.dm-empty { margin: 8px 10px; font-size: 12px; color: var(--muted, #949ba4); line-height: 1.4; }
html[data-theme="glass"] .dm-dot { box-shadow: 0 0 0 2px rgba(14,16,28,.9); }
html[data-theme="glass"] .dm-dot.on { background: var(--g-cyan, #2ee6ff); }

/* «Модерация» (automod) studio page */
.fx-am-hero { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px; background: rgba(59,165,93,.08); border: 1px solid rgba(59,165,93,.25); margin: 0 0 14px; }
.fx-am-hero img { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px; }
.fx-am-hero b { font-size: 15px; }
.fx-am-hero small { display: block; margin-top: 4px; color: var(--muted, #9aa0b4); font-size: 12.5px; line-height: 1.45; }
.fx-am-state { margin: 0 0 12px; font-size: 13px; color: var(--muted, #9aa0b4); }
.fx-am-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12.5px; background: rgba(255,255,255,.06); color: #c9ccd8; margin-right: 6px; }
.fx-am-pill.on { background: rgba(45,212,160,.16); color: #2dd4a0; }
.fx-am-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; margin: 8px 0 6px; }
.fx-am-num { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: #b5bac8; }
#srvStudio .fx-am-num input { padding: 8px 10px; font-size: 14px; }
.fx-am-trusted { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fx-am-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.fx-am-warns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.fx-am-warns .fx-sub-head { width: 100%; }
.fx-am-warn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(240,178,50,.12); border: 1px solid rgba(240,178,50,.3); font-size: 13px; }
#srvStudio .fx-am-warn .tfs-btn { min-height: 26px; padding: 3px 10px; font-size: 12px; border-radius: 999px; }
.fx-am-entry .fx-am-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(59,165,93,.14); flex: 0 0 32px; }
.fx-am-rule { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: rgba(240,178,50,.16); color: #f0b232; margin-left: 4px; }
.fx-am-meta { display: block; color: var(--muted, #9aa0b4); margin-top: 3px; }
.fx-am-ex { margin-top: 6px; font-size: 13px; color: #c9ccd8; overflow-wrap: anywhere; padding: 6px 10px; border-left: 3px solid rgba(240,178,50,.5); background: rgba(255,255,255,.03); border-radius: 0 6px 6px 0; }
.fx-am-undone { opacity: .55; }
.fx-am-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(transparent, var(--bg, #1a1b26) 40%); }
.fx-sys-dm { opacity: .7; }
html[data-theme="glass"] .fx-am-hero { background: rgba(46,230,255,.06); border-color: rgba(46,230,255,.25); border-radius: var(--g-radius-sm, 12px); }
html[data-theme="glass"] .fx-am-pill.on { background: rgba(46,230,255,.14); color: var(--g-cyan, #2ee6ff); }
html[data-theme="glass"] .fx-am-save { background: linear-gradient(transparent, rgba(10,11,22,.92) 40%); }
@media (max-width: 760px) {
  .fx-am-nums { grid-template-columns: 1fr 1fr; }
  #srvStudio .fx-am .tfs-grid2 { grid-template-columns: 1fr; }
  .fx-am-hero { padding: 12px; }
  .fx-am-entry { flex-wrap: wrap; }
}

/* site admins: support@ notification */
.fx-sup-toast { position: fixed; right: 18px; bottom: 90px; z-index: 9999; display: flex; flex-direction: column; gap: 3px; max-width: 340px; padding: 12px 14px; border-radius: 12px; background: #1e2130; border: 1px solid rgba(108,124,255,.45); color: #eef0f6; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fxSupIn .2s ease; }
.fx-sup-toast small { color: #a3a9bd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fxSupIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html[data-theme="glass"] .fx-sup-toast { background: rgba(14,16,30,.86); border-color: rgba(46,230,255,.45); backdrop-filter: blur(12px); box-shadow: 0 0 24px rgba(46,230,255,.18); }

/* 2026-10-05 registration: terms + personal-data consent (two separate, not pre-ticked checkboxes) */
.legal-checks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.legal-check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; color: var(--muted, #a3a9bd); cursor: pointer; text-align: left; border-radius: 8px; padding: 2px; }
.legal-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: #7c6cff; cursor: pointer; }
.legal-check a { color: #a99cff; text-decoration: underline; text-underline-offset: 2px; }
.legal-check.flash { animation: legalFlash .9s ease 2; }
@keyframes legalFlash { 50% { background: rgba(237,66,69,.18); box-shadow: 0 0 0 1px rgba(237,66,69,.5); } }
html[data-theme="glass"] .legal-check a { color: #2ee6ff; }
html[data-theme="glass"] .legal-check input { accent-color: #2ee6ff; }
.seo-foot .seo-legal { margin-top: 6px; font-size: 12px; opacity: .85; }
.seo-foot .seo-legal a { color: inherit; }
.tfs-legal-links { font-size: 11.5px; padding: 2px 12px 10px; color: var(--muted, #8e94a8); }
.tfs-legal-links a { color: inherit; }
.tfs-legal a { color: #a99cff; }
html[data-theme="glass"] .tfs-legal a { color: #2ee6ff; }

/* ===== 2026-10-05 «Доступна новая версия» banner (graphite, small purple accent) ===== */
.fx-upd { position: fixed; left: 50%; top: 14px; z-index: 2147482000; transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: max-content; max-width: min(620px, calc(100vw - 24px));
  padding: 12px 12px 12px 14px; border-radius: 14px; background: #1b1c22; color: #d9dae3; border: 1px solid #2c2e37;
  box-shadow: 0 12px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03); font-size: 13px; line-height: 1.35;
  transition: opacity .18s ease, transform .18s ease; }
.fx-upd.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
html.tf-desktop .fx-upd { top: 44px; }
.fx-upd::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: #8b5cf6; }
.fx-upd-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(139,92,246,.14); color: #b9a4ff; }
.fx-upd-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fx-upd-title { color: #f2f2f6; font-weight: 700; font-size: 13.5px; }
.fx-upd-note { color: #c4b5fd; }
.fx-upd-sub { color: #8d8f9c; font-size: 12px; }
.fx-upd .hidden { display: none !important; }
.fx-upd-acts { display: flex; align-items: center; gap: 6px; }
.fx-upd-go { border: 0; border-radius: 10px; padding: 9px 14px; background: #8b5cf6; color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.fx-upd-go:hover { background: #7c4dee; }
.fx-upd-go:focus-visible, .fx-upd-x:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.fx-upd-x { border: 0; width: 28px; height: 28px; border-radius: 8px; background: transparent; color: #8d8f9c; cursor: pointer; font-size: 13px; }
.fx-upd-x:hover { background: #262833; color: #e6e6ee; }
.fx-upd-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: #262833; overflow: hidden; }
.fx-upd-bar i { display: block; height: 100%; width: 3%; border-radius: 4px; background: linear-gradient(90deg, #7c4dee, #a78bfa); transition: width .3s ease; }
html[data-theme="glass"] .fx-upd { background: rgba(18,16,30,.86); border-color: rgba(167,139,250,.22); backdrop-filter: blur(14px); }
@media (max-width: 560px) { .fx-upd { grid-template-columns: auto 1fr; top: 8px; } .fx-upd-acts { grid-column: 1 / -1; justify-content: flex-end; } }

/* 2026-10-07: Студия → Модерация → «Сообщения в каналах» */
.fx-chmsg-list { display: flex; flex-direction: column; gap: 6px; }
.fx-chmsg-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.fx-chmsg-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-chmsg-slow { display: flex; align-items: center; gap: 6px; margin: 0; }
.fx-chmsg-slow select { width: auto; min-width: 130px; margin: 0; }
.fx-chmsg-ro { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; white-space: nowrap; font-size: 13px; }
@media (max-width: 640px) { .fx-chmsg-row { grid-template-columns: 1fr; gap: 6px; } }
