body { background-color: #050507; background-image: radial-gradient(ellipse 70% 55% at 0 0, rgba(77, 46, 101, .08), transparent 70%), radial-gradient(ellipse 60% 55% at 100% 100%, rgba(45, 57, 130, .05), transparent 72%); background-attachment: fixed; }
.boot-screen { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #050507; color: #f4f4f5; }
.boot-screen.hidden { display: none; }
.boot-mark { width: 48px; height: 48px; margin-bottom: 6px; border-radius: 13px; overflow: hidden; }
.boot-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.boot-screen strong { font-size: 16px; }
.boot-screen span { color: #8b8b94; font-size: 12px; }
.app { background: transparent; }
.topbar { background: rgba(11, 11, 13, .94) !important; border-color: #27272a !important; }
.layout { display: flex; gap: 16px; padding: 16px; }
.panel { background: rgba(11, 11, 13, .94) !important; border-color: #27272a !important; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.sidebar { width: 390px; padding: 20px 8px 20px 20px; gap: 14px; overflow: visible; }
.info { width: 360px; padding: 22px; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.filter-dropdown { min-width: 0; }.filter-trigger { width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.filter-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#status-trigger > span { overflow: visible; text-overflow: clip; }
.filter-trigger .filter-option-icon, .filter-trigger .avatar { width: 18px; height: 18px; flex: 0 0 18px; font-size: 10px; }
.filter-trigger, .filter-trigger:hover, .filter-trigger[aria-expanded="true"] { border-color: #3f3f46; box-shadow: none; }
.filter-trigger:focus, .filter-trigger:focus-visible { outline: none; border-color: #52525b; box-shadow: none; }
.filter-menu { width: max-content; min-width: 100%; max-width: min(320px, calc(100vw - 32px)); overflow: visible; }
.filter-menu button { width: max-content; min-width: 100%; white-space: nowrap; }
#status-dropdown .filter-menu { min-width: 150px; }
#staff-dropdown .filter-menu { left: 0; right: auto; width: 100%; min-width: 0; max-width: none; }
#staff-dropdown .filter-menu button { box-sizing: border-box; width: 100%; min-width: 0; padding-right: 12px; }
#source-dropdown .filter-menu { min-width: 160px; left: auto; right: 0; }
#source-dropdown .filter-menu button { min-height: 30px; padding: 6px 10px; }
.ticket-item { flex: 0 0 auto; min-height: 58px; padding: 8px 10px; border: 1px solid #3f3f46; background: #111113; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.ticket-list { gap: 8px !important; }
.ticket-item { position: relative; z-index: 0; }
.ticket-item:hover, .ticket-item.active { z-index: 1; }
.ticket-item:hover { background: #141416; border-color: #52525b; }
.ticket-item.active { background: #181818; border-color: #52525b; box-shadow: 0 5px 16px rgba(0, 0, 0, .2); }
.ticket-top { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; }
.ticket-top .avatar { width: 32px; height: 32px; }
.ticket-name { font-size: 13px; font-weight: 700; }
.ticket-main .ticket-preview { color: #a1a1aa; }
.ticket-time { color: #a1a1aa; }
.ticket-meta-line { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: max-content; align-self: start; padding-top: 1px; }
.ticket-source-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 14px; height: 14px; color: #8b8b94; opacity: .82; }
.ticket-source-icon svg { display: block; width: 14px; height: 14px; }
.ticket-source-icon.discord { color: #8b8b94; }
.ticket-source-icon.site { color: #a1a1aa; }
.ticket-top { align-items: start; }
.ticket-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; align-self: start; }
.ticket-main .ticket-preview { min-height: 20px; max-height: none; line-height: 20px; }
.ticket-time { align-self: start; padding-top: 2px; }
.ticket-time { font-size: 11px; }
.ticket-preview { min-height: 15px; max-height: 15px; line-height: 15px; }
.ticket-list::-webkit-scrollbar { width: 6px; }
.ticket-list::-webkit-scrollbar-thumb { background: #3f3f46; }
.chat-head { background: rgba(11, 11, 13, .55); }
.messages { background: transparent; }
.composer { background: rgba(5, 5, 7, .45); }
.composer-box { border-color: #27272a; background: #050507; }
.composer-box:focus-within { border-color: #3f3f46; box-shadow: none; }
#composer-text { scrollbar-width: none; }
#composer-text::-webkit-scrollbar { width: 0; height: 0; }
.info-profile { padding-bottom: 14px; border-bottom: 1px solid #27272a; }
.info-section { border-color: #27272a; }
.admin-view, .settings-view, .status-view { background-color: #050507 !important; background-image: radial-gradient(ellipse 70% 55% at 0 0, rgba(77, 46, 101, .08), transparent 70%), radial-gradient(ellipse 60% 55% at 100% 100%, rgba(45, 57, 130, .05), transparent 72%) !important; }
.admin-sidebar, .settings-nav { background: rgba(11, 11, 13, .94) !important; border-color: #27272a; }
.settings-panel { background: rgba(11, 11, 13, .94) !important; border-color: #27272a; }
.admin-stat, .admin-card, .staff-stats-select, .stats-table, .admin-list-row, .ban-row, .settings-card, .settings-profile-card, .token-note, .bind-row, .personal-row, .session-row { background: rgba(11, 11, 13, .86) !important; border-color: #27272a; }
.admin-nav button.active, .settings-nav button.active { background: rgba(99, 102, 241, .10); color: #c7c9ff; }
.filter-menu, .assignment-menu, .quick-panel, .emoji-panel { background: #101012 !important; border-color: #27272a !important; }
.settings-content { padding: 40px 36px 48px; gap: 28px; }
.settings-narrow { gap: 24px; }
.settings-stack { gap: 26px; }
.customization-grid { gap: 28px; }
.choice-grid { gap: 12px; }
.settings-card, .settings-profile-card { padding: 22px; }
.personal-row { min-height: 64px; align-items: center; padding: 14px 16px; }
.personal-row .admin-remove { width: 34px; height: 34px; flex: 0 0 34px; margin: 0; display: grid; place-items: center; }
.personal-row > div { min-width: 0; }
.composer-box.drag-over::after { content: 'Отпустите изображение'; }
.filter-menu:not(.hidden), .account-menu:not(.hidden), .assignment-menu:not(.hidden), .quick-panel:not(.hidden), .emoji-panel:not(.hidden) { animation: support-pop .14s ease-out both; transform-origin: top left; }
@keyframes support-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
#reply-form textarea, .admin-form textarea, .settings-form textarea, textarea, .textarea { min-height: 86px; max-height: 140px; resize: none !important; overflow-y: auto; }
.site-notifications { left: 20px; right: auto; align-items: flex-start; }.site-notification { max-width: 340px; }
@media (max-width: 1100px) {
  .sidebar { width: 340px; padding-right: 8px; }
}
@media (max-width: 760px) {
  .layout { display: flex; }
  .sidebar { width: 100%; padding-right: 12px; }
  .settings-content { padding: 24px 14px 32px; }
  .settings-card, .settings-profile-card { padding: 18px; }
  .site-notifications { left: 12px; right: auto; }
}

/* Beta visual language: dense rail, quiet surfaces, thin lines, brand violet. */
:root {
  --bg: #0e0f13;
  --panel: #15161b;
  --panel-solid: #15161b;
  --raised: #1d1f26;
  --modal: #15161b;
  --border: #262830;
  --border-2: #34353c;
  --text: #e9eaf0;
  --muted: #9496a3;
  --soft: #c8cad3;
  --accent: #6e6af0;
  --accent-2: #8481f5;
  --accent-soft: rgba(110, 106, 240, .14);
  --accent-line: rgba(110, 106, 240, .34);
  --accent-text: #e4e4ff;
}
body {
  background-color: #08080a;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 4px 4px;
  color: #e9eaf0;
  font-family: "Manrope", Inter, system-ui, sans-serif;
}
.app { background: transparent; }
.topbar { height: 56px; background: rgba(10, 11, 14, .94) !important; border-color: #262830 !important; }
.brand { font-weight: 800; letter-spacing: -.02em; }
.online { color: #9496a3; }
.top-tab { color: #9496a3; font-weight: 700; letter-spacing: .08em; }
.top-tab:hover, .top-tab.active { color: #e9eaf0; background: #1d1f26; }
.layout { gap: 12px; padding: 12px; }
.panel { background: #15161b !important; border-color: #262830 !important; border-radius: 16px; box-shadow: none; }
.sidebar { width: 390px; padding: 16px 8px 16px 16px; gap: 12px; }
.panel-title { font-size: 15px; font-weight: 800; }
.sidebar > .input { height: 40px; border: 1px solid #2a2b31; border-radius: 12px; background: #141518; color: #e9eaf0; }
.sidebar > .input:focus { border-color: #6e6af0; }
.filter-trigger { min-height: 44px; height: 44px; padding: 10px 16px; border: 1px solid rgba(39,39,42,.4); border-radius: 9999px; background: rgba(24,24,27,.7); color: #e9eaf0; font-weight: 500; }
.filter-trigger:hover, .filter-trigger[aria-expanded="true"] { border-color: #6e6af0; background: #1d1f26; }
.filter-menu { background: #15161b !important; border-color: #34353c !important; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.filter-menu button { border-radius: 8px; color: #e9eaf0; }
.filter-menu button:hover, .filter-menu button:focus-visible { background: #23252d; }
.ticket-list { gap: 0 !important; }
.ticket-item { min-height: 68px; padding: 11px 12px; border: 0; border-bottom: 1px solid #262830; border-radius: 0; background: transparent; box-shadow: none; }
.ticket-item:hover { background: rgba(29, 31, 38, .55); border-color: #262830; }
.ticket-item.active { background: #1d1f26; border: 0; border-left: 3px solid #6e6af0; box-shadow: none; }
.ticket-top { grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; }
.ticket-top .avatar { width: 40px; height: 40px; }
.ticket-name { font-size: 14px; font-weight: 800; }
.ticket-preview { color: #9496a3; }
.ticket-time { color: #626470; font-size: 11px; }
.ticket-source-icon { border-radius: 4px; width: 18px; height: 18px; opacity: 1; }
.ticket-source-icon svg { width: 12px; height: 12px; }
.ticket-source-icon.discord { background: #5865f2; color: #fff; }
.ticket-source-icon.site { background: #f2994a; color: #fff; }
.chat-head { height: 56px; background: #15161b; border-color: #262830; }
.chat-status { color: #9496a3; }
.assignment-trigger { border-color: #34353c; border-radius: 10px; background: #1d1f26; }
.messages { padding: 20px; gap: 14px; }
.msg-bubble { border-radius: 12px; }
.msg.user .msg-bubble { background: #1d1f26; border: 1px solid #262830; box-shadow: none; }
.msg.staff .msg-bubble { background: #2a2a55; border-color: rgba(132,129,245,.45); }
.composer { padding: 12px 16px; border-color: #262830; background: #15161b; }
.composer-box { min-height: 48px; border-color: #34353c; border-radius: 14px; background: #141518; }
.composer-box:focus-within { border-color: #6e6af0; box-shadow: 0 0 0 2px rgba(110,106,240,.12); }
.primary-btn, .login-btn { border-radius: 12px; background: #2f5bea; font-weight: 800; }
.primary-btn:hover, .login-btn:hover { background: #3d68f2; filter: none; }
.info { width: 360px; padding: 20px; background: #15161b !important; }
.info-profile { border-color: #262830; }
.info-section { border-color: #262830; }
.admin-view, .settings-view, .status-view { background-color: #0e0f13 !important; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px) !important; background-size: 4px 4px !important; }
.admin-sidebar, .settings-nav, .settings-panel { background: #15161b !important; border-color: #262830; }
.admin-nav button.active, .settings-nav button.active { background: rgba(110,106,240,.15); color: #8481f5; }
.admin-stat, .admin-card, .staff-stats-select, .stats-table, .admin-list-row, .ban-row, .settings-card, .settings-profile-card, .token-note, .bind-row, .personal-row, .session-row { background: #15161b !important; border-color: #262830; }
.site-notification { background: #15161b; border-color: #34353c; }
.boot-screen { background-color: #08080a; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 4px 4px; }
.login { align-items: center; }
.login-card { max-width: 420px; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; text-align: left; align-items: flex-start; }
.login-logo { width: 44px; height: 44px; margin-bottom: 12px; }
.login-title { font-family: Unbounded, "Manrope", sans-serif; font-size: 30px; letter-spacing: -.04em; }
.login-sub { color: #9496a3; }
.login-copy { margin-top: 8px; }
.login-hello { font-size: 15px; }
.login-btn { margin-top: 8px; text-align: center; }
.login-terms { width: 100%; margin-top: 4px; text-align: center; color: #626470; }
@media (max-width: 1100px) { .sidebar { width: 340px; } }
@media (max-width: 760px) { .sidebar { width: 100%; padding: 12px; } }

/* Beta auth geometry and the quieter control language used throughout the panel. */
:focus-visible { outline: 2px solid #6e6af0; outline-offset: 2px; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
.login {
  min-height: 100vh;
  padding: 40px 16px;
  align-items: center;
  justify-content: center;
  background-color: #08080a;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 4px 4px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-items: stretch;
  text-align: left;
}
.login-logo {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 0 24px;
  border-radius: 22%;
  object-fit: cover;
}
.login-title {
  margin: 0;
  color: #e9eaf0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.04em;
}
.login-greeting { position: relative; display: inline-block; }
.login-greeting svg { position: absolute; left: 0; bottom: -10px; width: 100%; height: 16px; color: #2f5bea; pointer-events: none; }
.login-description { margin: 16px 0 0; color: #9496a3; font-size: 15px; line-height: 1.625; }
.login-discord {
  display: flex;
  width: 100%;
  height: 48px;
  margin-top: 28px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #34353c;
  border-radius: 16px;
  background: #111215;
  color: #e9eaf0;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.login-discord:hover { border-color: #5865f2; background: #15161b; color: #fff; }
.login-discord.is-disabled, .login-discord.is-disabled:hover { cursor: not-allowed; border-color: #34353c; background: #111215; color: #626470; opacity: .55; }
.login-discord svg { width: 20px; height: 20px; fill: #5865f2; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: #626470; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.login-divider span { height: 1px; flex: 1; background: #25262c; }
.login-note { margin: 0; color: #9496a3; font-size: 13px; line-height: 1.6; }
.login-terms { width: 100%; margin: 18px 0 0; color: #626470; font-size: 13px; line-height: 1.6; text-align: center; }
.login-terms a { color: #9496a3; text-decoration: underline; text-underline-offset: 4px; }
.login-terms a:hover { color: #e9eaf0; }
.login-developer { margin: 12px 0 0; color: #626470; font-size: 13px; text-align: center; }
.login-brand, .login-copy, .login-btn { display: none; }

.primary-btn, .login-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: #2f5bea;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.primary-btn:hover, .login-btn:hover { background: #3d68f2; filter: none; }
.primary-btn:disabled { cursor: not-allowed; opacity: .55; }
.ghost-btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #34353c;
  border-radius: 10px;
  background: #15161b;
  color: #9496a3;
  font-weight: 700;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ghost-btn:hover { border-color: #52545e; background: #1d1f26; color: #e9eaf0; }
.danger-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(239,68,68,.35);
  border-radius: 10px;
  background: rgba(239,68,68,.1);
  color: #fca5a5;
  font-weight: 700;
}
.danger-btn:hover { border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.16); color: #fecaca; }
.icon-btn { border: 0; border-radius: 10px; background: transparent; color: #9496a3; box-shadow: none; }
.icon-btn:hover { background: #1d1f26; color: #e9eaf0; }
.top-tab { border-radius: 10px; }
.account-trigger { border-radius: 10px; }
.assignment-trigger { min-height: 36px; border-radius: 10px; }
.filter-trigger { box-shadow: none; }
.filter-trigger:hover, .filter-trigger[aria-expanded="true"] { box-shadow: none; }

/* Chat audit events and the admin quick-reply editor. */
.history-event {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: 90%;
  margin: 2px auto;
  padding: 4px 10px;
  border: 1px solid #1b1b20;
  border-radius: 999px;
  background: rgba(24,24,27,.38);
  color: #71717a;
  text-align: center;
}
.history-event strong { font-size: 10px; font-weight: 600; }
.history-event span { color: #52525b; font-size: 10px; }
#reply-form { gap: 12px; }
#reply-form .admin-card-head { margin: 0 0 2px; }
#reply-form .admin-card-head > div { display: flex; flex-direction: column; gap: 4px; }
#reply-form .admin-form label { gap: 7px; }
#reply-form .admin-form input, #reply-form input, #reply-form textarea { border-radius: 12px; }
#reply-form textarea { min-height: 104px; }
#reply-form > .primary-btn { align-self: flex-start; min-width: 148px; }
.replies-list { max-width: none; gap: 8px; }
.replies-list .reply-row { min-height: 72px; padding: 14px 18px; }
.replies-list .reply-row .admin-list-main { gap: 5px; }
.replies-list .reply-row .admin-list-main strong { font-size: 13px; }
.replies-list .reply-row .admin-list-main small { color: #9496a3; }
.replies-list .reply-row > .icon-btn { width: 32px; height: 32px; border: 1px solid #34353c; background: #1d1f26; color: #9496a3; }
.replies-list .reply-row > .icon-btn:hover { border-color: #52545e; color: #e9eaf0; }
.replies-list .reply-row > .admin-remove { border-color: rgba(239,68,68,.3); color: #fca5a5; }

/* Quiet navigation and compact admin controls. */
.top-tab, .top-tab:hover, .top-tab.active { background: transparent !important; color: #9496a3; }
.top-tab:hover, .top-tab.active { color: #e9eaf0; }
.admin-nav button.active, .settings-nav button.active { background: transparent; color: #8481f5; box-shadow: inset 2px 0 #6e6af0; }
.admin-two-col > .admin-card { padding: 16px; }
.admin-two-col .admin-list { gap: 6px; }
.admin-two-col .admin-list-row { padding: 10px 12px; border-radius: 12px; gap: 10px; }
.admin-two-col .admin-list-row .ghost-btn, .admin-two-col .admin-list-row .admin-remove { min-height: 30px; }
.reply-actions { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.replies-list .reply-row .reply-actions > .icon-btn { margin: 0; }
.chart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; height: 100%; min-height: 170px; color: #9496a3; }
.chart-empty-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #34353c; border-radius: 50%; color: #6e6af0; font-size: 18px; }
.chart-empty strong { color: #c8cad3; font-size: 13px; }
.chart-empty small { color: #626470; font-size: 11px; }

/* Ticket rows follow the compact beta card: avatar, name/time, preview, source. */
.ticket-list { gap: 4px !important; }
.ticket-item {
  min-height: 0;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease;
}
.ticket-item:hover { border-color: rgba(39,39,42,.4); background: rgba(24,24,27,.7); }
.ticket-item.active { border-color: #6366f1; background: rgba(24,24,27,.7); box-shadow: none; }
.ticket-top { grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: start; }
.ticket-top .avatar, .ticket-top .avatar.avatar-40 { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.ticket-main { gap: 5px; }
.ticket-name-line { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.ticket-time { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; color: #626470; font-size: 11px; font-weight: 500; white-space: nowrap; }
.ticket-clock { width: 12px; height: 12px; }
.ticket-preview { display: block; min-height: 18px; max-height: 18px; overflow: hidden; color: #9496a3; font-size: 13px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-source-line { display: flex; min-height: 14px; align-items: center; }
.ticket-source-icon { width: 14px; height: 14px; border-radius: 4px; opacity: .78; }
.ticket-source-icon svg { width: 10px; height: 10px; }
.account-trigger, .account-trigger:hover, .account-trigger[aria-expanded="true"] { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.filter-trigger:hover, .filter-trigger[aria-expanded="true"], .filter-trigger:focus, .filter-trigger:focus-visible { border-color: rgba(39,39,42,.4); background: rgba(24,24,27,.7); box-shadow: none; }
.assignment-trigger { min-width: 112px; max-width: 190px; min-height: 36px; height: 36px; padding: 6px 10px; border-radius: 9999px; background: rgba(24,24,27,.7); border-color: rgba(39,39,42,.4); font-size: 12px; }
.assignment-trigger > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.assignment-trigger .avatar { width: 24px; height: 24px; flex: 0 0 24px; }
.assignment-trigger:hover, .assignment-trigger[aria-expanded="true"], .assignment-trigger:focus, .assignment-trigger:focus-visible { border-color: rgba(39,39,42,.4); background: rgba(24,24,27,.7); box-shadow: none; }
.assignment-menu { width: 230px; padding: 5px; border: 1px solid rgba(39,39,42,.8); border-radius: 16px; background: #18181b !important; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.assignment-search { width: 100%; height: 34px; margin-bottom: 5px; padding: 0 10px; border: 1px solid #3f3f46; border-radius: 10px; background: #101012; color: #f4f4f5; outline: none; font: inherit; font-size: 12px; }
.assignment-search:focus { border-color: #6366f1; box-shadow: 0 0 0 1px #6366f1; }
.chat-who { gap: 8px; }
.chat-head { position: relative; }
.chat-head { justify-content: flex-start; }
.chat-head .chat-actions { margin-left: auto; }
.chat-head .back-btn { display: none !important; }
.chat-who { flex: 0 0 auto; }
.chat-who > #chat-avatar, .chat-who > #chat-name { display: none; }
.chat-who .assignment-control { position: static; margin-left: 0; flex: 0 0 auto; }
.chat-who .assignment-trigger { width: auto; min-width: 0; max-width: 230px; height: 44px; min-height: 44px; padding: 6px 8px; gap: 8px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 14px; line-height: 20px; }
.chat-who .assignment-trigger:hover, .chat-who .assignment-trigger[aria-expanded="true"], .chat-who .assignment-trigger:focus, .chat-who .assignment-trigger:focus-visible { border-color: transparent; background: transparent; box-shadow: none; outline: none; }
.chat-who .assignment-trigger > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.chat-who .assignment-trigger > span > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who .assignment-trigger svg { width: 12px; height: 12px; }
.chat-who .assignment-trigger .avatar { width: 32px; height: 32px; flex-basis: 32px; }
.chat-who .assignment-menu { top: calc(100% + 4px); left: 20px; right: auto; width: 216px; max-width: calc(100vw - 28px); max-height: 280px; box-sizing: border-box; }
.chat-who .assignment-menu .assignment-option { min-height: 38px; padding: 7px 8px; gap: 8px; }
.chat-who .assignment-menu .assignment-option small { font-size: 10px; }
.filters { gap: 6px; }
.filters .filter-trigger { min-height: 44px; height: 44px; padding: 10px 16px; font-size: 14px; border-radius: 9999px; background: rgba(24,24,27,.7); border-color: rgba(39,39,42,.4); }
.filters .filter-trigger:hover, .filters .filter-trigger[aria-expanded="true"], .filters .filter-trigger:focus, .filters .filter-trigger:focus-visible { background: rgba(24,24,27,.7); border-color: rgba(39,39,42,.4); box-shadow: none; outline: none; }
.filters .filter-trigger svg { width: 14px; height: 14px; flex: 0 0 14px; }
.filters .filter-trigger .avatar { width: 24px; height: 24px; flex-basis: 24px; }
.filters .filter-menu { padding: 5px; border-radius: 16px; background: #18181b !important; border: 1px solid rgba(39,39,42,.8); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.filters .filter-menu button { min-height: 40px; height: 40px; padding: 8px 10px; border-radius: 10px; gap: 9px; font-size: 14px; }
.filters .filter-menu button:hover, .filters .filter-menu button.selected { background: #27272a; }
.assignment-option { min-height: 40px; padding: 8px 10px; border-radius: 10px; }
.assignment-option:hover, .assignment-option.selected { background: #27272a; }
.assignment-free { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid #52545e; border-radius: 50%; color: #9496a3; font-size: 14px; line-height: 1; }
.assignment-free::before { content: '+'; }

/* Exact current FearSupport base: flat #050507, without the dot/colored glow layer. */
body, .login, .boot-screen, .admin-view, .settings-view, .status-view {
  background-color: #050507 !important;
  background-image: none !important;
}
.layout > .panel { background: transparent !important; border-color: rgba(39,39,42,.55) !important; border-radius: 0; box-shadow: none; }
.sidebar, .chat, .info { background: transparent !important; }
.chat-head { background: rgba(15,15,17,.4) !important; }
.messages { background: transparent !important; }
.composer { background: #050507 !important; }

/* Current FearSupport dropdown treatment: roomy, readable and quiet. */
.filter-menu {
  min-width: 184px;
  padding: 6px;
  border: 1px solid rgba(39,39,42,.9) !important;
  border-radius: 16px;
  background: #18181b !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
#status-dropdown .filter-menu { min-width: 168px; }
#staff-dropdown .filter-menu { width: max-content; min-width: 184px; max-width: 260px; }
.filter-menu button {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #c8cad3;
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}
.filter-menu button:hover, .filter-menu button:focus-visible { background: #27272a; color: #e9eaf0; }
.filter-menu button.selected { background: rgba(99,102,241,.12); color: #e4e4ff; }
.filter-option-icon { width: 22px; height: 22px; border: 0; background: #27272a; color: #9496a3; font-size: 12px; }
.filter-option-all { background: rgba(99,102,241,.16); color: #8481f5; }
.filter-option-free { color: #34c759; }
.filter-option-open { color: #f2994a; }
.filter-option-closed { color: #9496a3; }

/* User notes in the info panel */
.notes-section { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes-head-title { display: inline-flex; align-items: center; gap: 8px; color: #e4e4e7; font-size: 13px; font-weight: 600; }
.notes-head-title svg { width: 17px; height: 17px; color: #a1a1aa; flex: 0 0 17px; }
.notes-add { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #a1a1aa; font-size: 19px; font-weight: 400; line-height: 1; cursor: pointer; }
.notes-add:hover { background: rgba(39,39,42,.6); color: #f4f4f5; }
.notes-list { display: flex; flex-direction: column; gap: 8px; }
.notes-empty { color: #71717a; font-size: 12px; }
.note-item { padding: 11px 13px; border: 1px solid rgba(39,39,42,.5); border-radius: 10px; background: #17171a; }
.note-text { color: #f4f4f5; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.note-author { color: #71717a; font-size: 12px; font-style: italic; }
.note-actions { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.note-action { width: 24px; height: 24px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #71717a; cursor: pointer; }
.note-action svg { width: 15px; height: 15px; }
.note-action:hover { background: rgba(39,39,42,.7); color: #e4e4e7; }
.note-form { display: flex; flex-direction: column; gap: 10px; }
.note-form.hidden, .notes-list.hidden { display: none; }
.note-form textarea { width: 100%; box-sizing: border-box; min-height: 70px; max-height: 140px; padding: 10px 12px; border: 1px solid rgba(63,63,70,.9); border-radius: 8px; background: #101013; color: #f4f4f5; font: inherit; font-size: 13px; line-height: 1.45; resize: none; outline: none; }
.note-form textarea:focus { border-color: #6366f1; }
.note-form-actions { display: flex; align-items: center; gap: 10px; }
.note-save { flex: 0 0 auto; padding: 8px 18px; border: 1px solid rgba(63,63,70,.9); border-radius: 999px; background: transparent; color: #e4e4e7; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.note-save:hover { background: rgba(39,39,42,.7); }
.note-cancel { padding: 8px 6px; border: 0; background: transparent; color: #71717a; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.note-cancel:hover { color: #d4d4d8; }

/* Ticket tabs: Свободные / Мои / Закрытые (/ Все для руководства) */
.ticket-tabs { display: flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.ticket-tabs button { flex: 1 1 0; min-width: 0; height: 38px; padding: 0 2px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-family: inherit; font-size: clamp(10px, 0.8vw, 12px); font-weight: 600; cursor: pointer; white-space: nowrap; }
.ticket-tabs button:hover { color: var(--text); background: var(--raised); }
.ticket-tabs button.on { background: var(--raised); color: var(--text); }
.ticket-tabs button:focus-visible, .quick-inline-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ticket-tabs button.hidden { display: none; }
.ticket-tabs b { font-size: 12px; font-weight: 700; color: #8ea4ff; }
.ticket-filters { display: flex; gap: 8px; }
.ticket-filters label { flex: 1; min-width: 0; }
.ticket-filters select { width: 100%; height: 40px; padding: 0 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.ticket-filters .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.styled-select { position: relative; width: 100%; min-width: 0; }
.styled-select-trigger { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.styled-select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.styled-select-trigger:hover, .styled-select-trigger[aria-expanded="true"] { border-color: var(--accent); }
.styled-select-trigger:focus-visible, .styled-select-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.styled-select-arrow { color: var(--muted); font-size: 16px; }
.ticket-filters .styled-select-arrow { display: none; }
.ticket-filters .styled-select-trigger { justify-content: center; text-align: center; }
.styled-select-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(260px, 85vw); max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: #111114; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.styled-select-menu.hidden { display: none; }
.styled-select-option { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.styled-select-option:hover, .styled-select-option[aria-selected="true"] { background: var(--raised); }
.styled-select-option[aria-selected="true"]::after { content: '✓'; float: right; margin-left: 10px; color: var(--accent); }
.ticket-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ticket-tags > span { padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.current-ticket-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.current-ticket-tags.hidden { display: none; }
.current-ticket-tag { padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.current-ticket-tag button { border: 0; background: transparent; color: inherit; cursor: pointer; }
#section-dialog, #section-dialog .section-card, #section-dialog .ban-list { scrollbar-width: none; }
#section-dialog::-webkit-scrollbar, #section-dialog .section-card::-webkit-scrollbar, #section-dialog .ban-list::-webkit-scrollbar { display: none; }
#composer-box > button[type="submit"] { min-height: 34px; padding: 7px 13px; font-size: 12px; }

/* Inline quick replies above the composer */
.quick-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px; margin-bottom: 16px; }
.quick-inline.hidden { display: none; }
.quick-inline-label { flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }
.quick-inline-item { min-height: 34px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer; }
.quick-inline-item:hover { color: var(--text); background: rgba(24,24,27,.7); }

/* Status page */
.status-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.status-top h1 { margin: 0; font-size: 24px; font-weight: 800; }
.status-top p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.status-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(248,113,113,.12); color: #f87171; }
.status-chip.ok { background: rgba(74,222,128,.12); color: #4ade80; }
.status-uptime { align-items: center; }

/* Website messages and ephemeral operator-only preview. */
.fear-profile-link { color: inherit; text-decoration: none; }
.fear-profile-link:hover { color: #8daaff; text-decoration: underline; }
.info-profile > .fear-profile-link { display: inline-block; margin-top: 8px; font-size: 12px; color: #8daaff; }
.msg.user.from-site .msg-bubble { background: #171719; border: 0; border-radius: 5px 20px 20px 20px; line-height: 1.55; }
.msg.user.live-draft { margin-top: 10px; }
.msg.user.live-draft .msg-bubble { background: transparent; border: 1px dashed #333338; border-radius: 20px; color: #a1a1aa; font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user.live-draft .draft-label { grid-column: 2; color: #5594ff; font-size: 10px; line-height: 1.4; }

/* The avatar badge identifies the channel, not online presence. */
.ticket-avatar { position: relative; display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; }
.ticket-avatar > .ticket-source-icon { position: absolute; right: -2px; bottom: -2px; display: inline-flex; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 3px #111114; opacity: 1; z-index: 1; }
.ticket-avatar > .ticket-source-icon.discord { background: #5865f2; color: #fff; }
.ticket-avatar > .ticket-source-icon.site { background: #e5993f; color: #fff; }
.ticket-avatar > .ticket-source-icon svg { width: 11px; height: 11px; }
.ticket-name-line { justify-content: flex-start; text-align: left; }
.ticket-name-line .ticket-name { order: 0; flex: 0 1 auto; text-align: left; }
.ticket-name-line .ticket-source-icon { display: none; }
.ticket-name-line .ticket-time { order: 2; margin-left: auto; }
.chat-head { padding-left: 8px; padding-right: 12px; }
.chat-who .assignment-trigger { padding-left: 0; }
.chat-who .assignment-menu { left: 8px; }
.messages { padding: 12px 10px; gap: 10px; }
.msg.user { column-gap: 6px; row-gap: 2px; }
.msg.user .msg-bubble { justify-self: start; width: fit-content; min-width: 0; max-width: 100%; padding: 8px 11px; }
.msg.user .msg-author { font-size: 11px; }
.msg.user .msg-time { font-size: 10px; }

/* One avatar fallback for the React list, chat and user card; no external placeholder requests. */
.avatar { position: relative; isolation: isolate; background: hsl(var(--avatar-hue, 230) 28% 24%); color: #e7ecff; }
.avatar-initials { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: inherit; font-weight: 650; line-height: 1; user-select: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center; }
.avatar img[hidden] { display: none !important; }
.ticket-avatar > .avatar { width: 40px; height: 40px; flex: 0 0 40px; aspect-ratio: 1; border-radius: 50%; font-size: 13px; }
