body { background-color: #000000; 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: #000000; 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(7, 7, 12, .94) !important; border-color: #1c1c27 !important; }
.layout { display: flex; gap: 16px; padding: 16px; }
.panel { background: rgba(7, 7, 12, .94) !important; border-color: #1c1c27 !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: #2a2a38; box-shadow: none; }
.filter-trigger:focus, .filter-trigger:focus-visible { outline: none; border-color: #3a3a4a; box-shadow: none; }
.filter-menu { width: max-content; min-width: 100%; max-width: min(320px, calc(calc(100vw / var(--ui-zoom, 1)) - 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 #2a2a38; background: #0c0c12; 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: #3a3a4a; }
.ticket-item.active { background: #101018; border-color: #3a3a4a; 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: #2a2a38; }
.chat-head { background: rgba(7, 7, 12, .55); }
.messages { background: transparent; }
.composer { background: rgba(0, 0, 0, .45); }
.composer-box { border-color: #1c1c27; background: #000000; }
.composer-box:focus-within { border-color: #2a2a38; 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 #1c1c27; }
.info-section { border-color: #1c1c27; }
.admin-view, .settings-view, .status-view { background-color: #000000 !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(7, 7, 12, .94) !important; border-color: #1c1c27; }
.settings-panel { background: rgba(7, 7, 12, .94) !important; border-color: #1c1c27; }
.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(7, 7, 12, .86) !important; border-color: #1c1c27; }
.admin-nav button.active, .settings-nav button.active { background: rgba(123, 124, 246, .10); color: #c7c9ff; }
.filter-menu, .assignment-menu, .quick-panel, .emoji-panel { background: #0a0a10 !important; border-color: #1c1c27 !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: #000000;
  --panel: #0a0a10;
  --panel-solid: #0a0a10;
  --raised: #14141d;
  --modal: #0a0a10;
  --border: #1c1c27;
  --border-2: #262633;
  --text: #e9eaf0;
  --muted: #9496a3;
  --soft: #c8cad3;
  --accent: #7b7cf6;
  --accent-2: #9a9bff;
  --accent-soft: rgba(123, 124, 246, .14);
  --accent-line: rgba(123, 124, 246, .34);
  --accent-text: #e4e4ff;
}
body {
  background-color: #000000;
  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(4, 4, 8, .94) !important; border-color: #1c1c27 !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: #14141d; }
.layout { gap: 12px; padding: 12px; }
.panel { background: #0a0a10 !important; border-color: #1c1c27 !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 #23232f; border-radius: 12px; background: #0d0d14; color: #e9eaf0; }
.sidebar > .input:focus { border-color: #7b7cf6; }
.filter-trigger { min-height: 44px; height: 44px; padding: 10px 16px; border: 1px solid rgba(28, 28, 39,.4); border-radius: 9999px; background: rgba(16, 16, 24,.7); color: #e9eaf0; font-weight: 500; }
.filter-trigger:hover, .filter-trigger[aria-expanded="true"] { border-color: #7b7cf6; background: #14141d; }
.filter-menu { background: #0a0a10 !important; border-color: #262633 !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 #1c1c27; border-radius: 0; background: transparent; box-shadow: none; }
.ticket-item:hover { background: rgba(29, 31, 38, .55); border-color: #1c1c27; }
.ticket-item.active { background: #14141d; border: 0; border-left: 3px solid #7b7cf6; 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: #0a0a10; border-color: #1c1c27; }
.chat-status { color: #9496a3; }
.assignment-trigger { border-color: #262633; border-radius: 10px; background: #14141d; }
.messages { padding: 20px; gap: 14px; }
.msg-bubble { border-radius: 12px; }
.msg.user .msg-bubble { background: #14141d; border: 1px solid #1c1c27; box-shadow: none; }
.msg.staff .msg-bubble { background: #2a2a55; border-color: rgba(132,129,245,.45); }
.composer { padding: 12px 16px; border-color: #1c1c27; background: #0a0a10; }
.composer-box { min-height: 48px; border-color: #262633; border-radius: 14px; background: #0d0d14; }
.composer-box:focus-within { border-color: #7b7cf6; box-shadow: 0 0 0 2px rgba(123, 124, 246,.12); }
.primary-btn, .login-btn { border-radius: 12px; background: #7b7cf6; font-weight: 800; }
.primary-btn:hover, .login-btn:hover { background: #8d8ef8; filter: none; }
.info { width: 360px; padding: 20px; background: #0a0a10 !important; }
.info-profile { border-color: #1c1c27; }
.info-section { border-color: #1c1c27; }
.admin-view, .settings-view, .status-view { background-color: #000000 !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: #0a0a10 !important; border-color: #1c1c27; }
.admin-nav button.active, .settings-nav button.active { background: rgba(123, 124, 246,.15); color: #9a9bff; }
.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: #0a0a10 !important; border-color: #1c1c27; }
.site-notification { background: #0a0a10; border-color: #262633; }
.boot-screen { background-color: #000000; 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 #7b7cf6; outline-offset: 2px; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
.login {
  min-height: calc(100vh / var(--ui-zoom, 1));
  padding: 40px 16px;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  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: #7b7cf6; 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 #262633;
  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: #0a0a10; color: #fff; }
.login-discord.is-disabled, .login-discord.is-disabled:hover { cursor: not-allowed; border-color: #262633; 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: #7b7cf6;
  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: #8d8ef8; filter: none; }
.primary-btn:disabled { cursor: not-allowed; opacity: .55; }
.ghost-btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #262633;
  border-radius: 10px;
  background: #0a0a10;
  color: #9496a3;
  font-weight: 700;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ghost-btn:hover { border-color: #3a3a4a; background: #14141d; 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: #14141d; 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(16, 16, 24,.38);
  color: #71717a;
  text-align: center;
}
.history-event strong { font-size: 10px; font-weight: 600; }
.history-event span { color: #3a3a4a; 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 #262633; background: #14141d; color: #9496a3; }
.replies-list .reply-row > .icon-btn:hover { border-color: #3a3a4a; 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: #9a9bff; box-shadow: inset 2px 0 #7b7cf6; }
.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 #262633; border-radius: 50%; color: #7b7cf6; 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(28, 28, 39,.4); background: rgba(16, 16, 24,.7); }
.ticket-item.active { border-color: #7b7cf6; background: rgba(16, 16, 24,.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(28, 28, 39,.4); background: rgba(16, 16, 24,.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(16, 16, 24,.7); border-color: rgba(28, 28, 39,.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(28, 28, 39,.4); background: rgba(16, 16, 24,.7); box-shadow: none; }
.assignment-menu { width: 230px; padding: 5px; border: 1px solid rgba(28, 28, 39,.8); border-radius: 16px; background: #101018 !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 #2a2a38; border-radius: 10px; background: #0a0a10; color: #f4f4f5; outline: none; font: inherit; font-size: 12px; }
.assignment-search:focus { border-color: #7b7cf6; box-shadow: 0 0 0 1px #7b7cf6; }
.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(calc(100vw / var(--ui-zoom, 1)) - 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(16, 16, 24,.7); border-color: rgba(28, 28, 39,.4); }
.filters .filter-trigger:hover, .filters .filter-trigger[aria-expanded="true"], .filters .filter-trigger:focus, .filters .filter-trigger:focus-visible { background: rgba(16, 16, 24,.7); border-color: rgba(28, 28, 39,.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: #101018 !important; border: 1px solid rgba(28, 28, 39,.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: #1c1c27; }
.assignment-option { min-height: 40px; padding: 8px 10px; border-radius: 10px; }
.assignment-option:hover, .assignment-option.selected { background: #1c1c27; }
.assignment-free { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid #3a3a4a; border-radius: 50%; color: #9496a3; font-size: 14px; line-height: 1; }
.assignment-free::before { content: '+'; }

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

/* Current FearSupport dropdown treatment: roomy, readable and quiet. */
.filter-menu {
  min-width: 184px;
  padding: 6px;
  border: 1px solid rgba(28, 28, 39,.9) !important;
  border-radius: 16px;
  background: #101018 !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: #1c1c27; color: #e9eaf0; }
.filter-menu button.selected { background: rgba(123, 124, 246,.12); color: #e4e4ff; }
.filter-option-icon { width: 22px; height: 22px; border: 0; background: #1c1c27; color: #9496a3; font-size: 12px; }
.filter-option-all { background: rgba(123, 124, 246,.16); color: #9a9bff; }
.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(28, 28, 39,.6); color: #f4f4f5; }
.notes-list { display: flex; flex-direction: column; gap: 8px; }
.notes-empty { color: #71717a; font-size: 12px; }
.notes-skeleton { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }
.notes-skeleton span { display: block; height: 13px; border-radius: 6px; background: linear-gradient(90deg, rgba(28, 28, 39,.85), rgba(63,63,70,.75), rgba(28, 28, 39,.85)); background-size: 200% 100%; animation: notes-shimmer 1.2s linear infinite; }
.notes-skeleton span:first-child { width: 78%; }
.notes-skeleton span:last-child { width: 46%; }
@keyframes notes-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.note-item { padding: 11px 13px; border: 1px solid rgba(28, 28, 39,.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(28, 28, 39,.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: #7b7cf6; }
.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(28, 28, 39,.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: #9a9bff; }
.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(16, 16, 24,.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; }

.quick-row { display: flex; align-items: stretch; gap: 4px; }
.quick-row .quick-item { flex: 1; }
.quick-pin { flex: 0 0 32px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; opacity: .55; }
.quick-pin svg { width: 16px; height: 16px; }
.quick-row:hover .quick-pin, .quick-pin:focus-visible { opacity: 1; }
.quick-pin:hover { background: var(--raised); color: var(--text); }
.quick-pin.active { opacity: 1; color: var(--accent, #8b7cf6); }
.quick-pin.active svg { fill: currentColor; }

/* Full-size UI; vh/vw sizes still divide by --ui-zoom so a zoom can be re-enabled in one place. */
:root { --ui-zoom: 1; }
/* Resizable columns: narrower side panels, wider chat, tighter gaps. */
.layout-splitter { display: none; }
@media (min-width: 1101px) {
  .layout { gap: 0; }
  .layout > .sidebar { width: var(--sidebar-w, 370px); }
  .layout > .info { width: var(--info-w, 330px); }
  .layout-splitter { display: block; position: relative; flex: 0 0 8px; width: 8px; cursor: col-resize; touch-action: none; outline: none; }
  .layout-splitter::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; border-radius: 2px; background: transparent; transition: background .15s ease; }
  .layout-splitter::after { content: ''; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; }
  .layout-splitter:hover::before, .layout-splitter:focus-visible::before, .layout-splitter.dragging::before { background: #7b7cf6; }
  body.layout-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
  body.layout-resizing iframe { pointer-events: none; }
}

/* Top bar: softer bottom corners, smaller than the panels (16px). */
.topbar { border-radius: 0 0 12px 12px; }

/* Ticket filters under the search box: status dropdown + list of people with access. */
.ticket-filters { display: flex; align-items: stretch; gap: 8px; }
.tf-dropdown { position: relative; min-width: 0; }
.tf-dropdown:first-child { flex: 1; }
.tf-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; color: #e9eaf0; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.tf-trigger:hover, .tf-trigger[aria-expanded="true"] { border-color: #2a2a38; background: #1a1b20; }
.tf-trigger:focus-visible { outline: none; border-color: #7b7cf6; }
.tf-trigger svg { width: 16px; height: 16px; flex: 0 0 16px; color: #9496a3; }
.tf-trigger > svg:last-child { width: 14px; flex-basis: 14px; transition: transform .15s ease; }
.tf-trigger[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
.tf-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tf-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(123, 124, 246,.16); color: #aeb0ff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.tf-people .tf-trigger { width: auto; gap: 6px; padding: 0 10px; }
.tf-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: 300px; padding: 6px; border: 1px solid #1c1c27; border-radius: 14px; background: #101018; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.tf-menu-right { left: auto; right: 0; width: 290px; }
#ticket-tabs button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: #d4d4d8; font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
#ticket-tabs button > span { flex: 1; min-width: 0; }
#ticket-tabs button svg { width: 16px; height: 16px; flex: 0 0 16px; color: #8b8b94; }
#ticket-tabs button:hover { background: #222227; }
#ticket-tabs button.on { background: #14141d; color: #fff; }
#ticket-tabs button.on svg { color: #aeb0ff; }
.tf-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; color: #8b8b94; font-size: 12px; }
.tf-menu-head strong { color: #e9eaf0; font-size: 13px; font-weight: 700; }
.tf-search { width: 100%; box-sizing: border-box; height: 34px; margin-bottom: 6px; padding: 0 10px; border: 1px solid #2f3037; border-radius: 10px; background: #0a0a10; color: #f4f4f5; font: inherit; font-size: 13px; outline: none; }
.tf-search:focus { border-color: #7b7cf6; }
.people-list { max-height: 280px; overflow-y: auto; }
.people-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.people-row:hover { background: #222227; }
.people-row .avatar { flex: 0 0 28px; }
.people-row > span:nth-child(2) { min-width: 0; flex: 1; }
.people-row b, .people-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-row b { color: #f4f4f5; font-size: 13px; font-weight: 600; }
.people-row small { margin-top: 1px; color: #8b8b94; font-size: 11px; }
.people-you { padding: 2px 8px; border-radius: 999px; background: rgba(123, 124, 246,.16); color: #aeb0ff; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.people-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px 20px; text-align: center; }
.people-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; border: 1px solid #2f3037; border-radius: 50%; background: #0d0d14; color: #6b6d78; }
.people-empty-icon svg { width: 20px; height: 20px; }
.people-empty strong { color: #e9eaf0; font-size: 13px; font-weight: 700; }
.people-empty span { color: #8b8b94; font-size: 12px; line-height: 1.45; }

/* Search toggle next to the "Тикеты" title: magnifier <-> cross. */
.sidebar-head { min-height: 32px; }
.search-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #9496a3; cursor: pointer; transition: background .15s ease, color .15s ease; }
.search-toggle:hover, .search-toggle.is-open { background: #14141d; color: #f4f4f5; }
.search-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(123, 124, 246,.5); }
.search-toggle svg { width: 17px; height: 17px; grid-area: 1 / 1; }
.search-toggle .icon-close { display: none; }
.search-toggle.is-open .icon-search { display: none; }
.search-toggle.is-open .icon-close { display: block; }
.brand[role="button"] { cursor: pointer; border-radius: 10px; outline: none; transition: opacity .15s ease; }
.brand[role="button"]:hover { opacity: .85; }
.brand[role="button"]:focus-visible { box-shadow: 0 0 0 2px rgba(123, 124, 246,.5); }
.ban-list-page { max-height: none; padding-top: 0; }
.ban-form-card .ban-form { padding: 0; }
.admin-page-actions .admin-search { width: 280px; }

/* Top bar: same surface as the three panels below, no glow or accents. */
.topbar {
  height: 56px;
  margin: 12px 12px 0;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(28, 28, 39, .55) !important;
  border-radius: 16px;
  background: transparent !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar-left, .topbar-right { gap: 12px; }
.brand[role="button"] { gap: 10px; padding: 4px 10px 4px 4px; border-radius: 12px; font-size: 14px; font-weight: 800; transition: background .15s ease; }
.brand[role="button"]:hover { opacity: 1; background: rgba(255, 255, 255, .04); }
.brand img { width: 32px; height: 32px; padding: 0; border-radius: 9px; background: none; box-shadow: none; }
.online { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 500; }
.online i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: none; }
.top-nav { gap: 2px; padding: 0; border: 0; border-radius: 0; background: none; }
.topbar .top-tab { min-height: 34px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; transition: background .15s ease, color .15s ease; }
.topbar .top-tab:hover, .topbar .top-tab:focus-visible { background: rgba(255, 255, 255, .05) !important; color: var(--text) !important; outline: none; }
.topbar .account-trigger, .topbar .account-trigger:hover, .topbar .account-trigger[aria-expanded="true"] { min-height: 40px; gap: 9px; padding: 4px 10px 4px 4px; border: 0 !important; border-radius: 12px; background: transparent !important; box-shadow: none !important; transition: background .15s ease; }
.topbar .account-trigger:hover, .topbar .account-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .05) !important; }
.account-trigger img { width: 30px; height: 30px; box-shadow: none; }
#me-name { font-size: 13px; font-weight: 700; }
.workspace-mode .admin-view, .workspace-mode .settings-view { inset: 68px 0 0; }
@media (max-width: 760px) {
  .topbar { height: 56px; margin: 8px 8px 0; padding: 0 8px; }
}

/* Spacing between the quick replies / attachment previews and the reply input. */
.composer .quick-inline { padding: 0 2px; margin-bottom: 12px; }
.composer .attachment-previews { padding: 0; margin-bottom: 12px; }

/* Chat system lines ("Диалог принят…"): larger, readable time/date. */
.history-event { gap: 5px; padding: 5px 12px; border-color: #1b1b20; background: rgba(16, 16, 24, .38); color: #71717a; }
.history-event strong { font-size: 11px; font-weight: 600; color: #71717a; }
.history-event span { font-size: 11px; color: #a1a3b3; opacity: 1; }

/* Composer buttons (emoji / quick replies) as rounded tiles; the active one is highlighted. */
.composer-box .composer-tools .icon-btn, .composer-box > .emoji-toggle, .composer-box > .quick-toggle { width: 36px; height: 36px; border-radius: 12px; }
.composer-box > .emoji-toggle, .composer-box > .quick-toggle { display: inline-grid; place-items: center; flex: 0 0 36px; padding: 0; color: #9496a3; transition: background .15s ease, color .15s ease; }
.composer-box > .emoji-toggle:hover, .composer-box > .quick-toggle:hover { background: rgba(255, 255, 255, .06); color: #e9eaf0; }
.composer-box > .quick-toggle.is-active, .composer-box > .emoji-toggle.is-active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #aeb0ff; }
.composer-box > .quick-toggle svg { width: 18px; height: 18px; }

/* Quick replies panel: tabs + search toggle on one row, search field like the tickets search. */
.quick-bar { display: flex; align-items: stretch; gap: 8px; }
.quick-bar .quick-tabs { flex: 1; min-width: 0; }
.quick-search-toggle { display: inline-grid; place-items: center; flex: 0 0 38px; width: 38px; padding: 0; border: 1px solid #1c1c27; border-radius: 10px; background: #0d0d14; color: #9496a3; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.quick-search-toggle:hover, .quick-search-toggle.is-open { background: #14141d; color: #f4f4f5; border-color: #262633; }
.quick-search-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(123, 124, 246, .5); }
.quick-search-toggle svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.quick-search-toggle .icon-close { display: none; }
.quick-search-toggle.is-open .icon-search { display: none; }
.quick-search-toggle.is-open .icon-close { display: block; }
.quick-search { width: 100%; height: 40px; flex: 0 0 auto; padding: 0 14px; border: 1px solid #23232f; border-radius: 12px; background: #0d0d14; color: #e9eaf0; font: inherit; font-size: 13px; outline: none; }
.quick-search.hidden { display: none; }
.quick-search:focus { border-color: #7b7cf6; box-shadow: 0 0 0 2px rgba(123, 124, 246, .2); }
.quick-search::placeholder { color: #6b6d78; }
.quick-list { display: flex; flex-direction: column; gap: 4px; }
.quick-empty-search { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 8px; }
.quick-empty-search strong { color: #e9eaf0; font-size: 13px; }
.quick-empty-search span { color: #8b8b94; font-size: 12px; }

/* Staff messages: Discord avatar on the right, nickname only (no role). Mirrors the player layout. */
.msg.staff { display: grid; grid-template-columns: minmax(0, 1fr) 28px; column-gap: 8px; row-gap: 3px; align-items: start; justify-items: end; max-width: min(760px, 82%); }
.msg.staff > .avatar { grid-column: 2; grid-row: 1 / span 5; width: 28px; height: 28px; margin: 0; }
.msg.staff .msg-author, .msg.staff .msg-bubble, .msg.staff .attachments, .msg.staff .delivery, .msg.staff .msg-time { grid-column: 1; }

/* Edit / delete: beside the bubble, vertically centred, transparent (no card). */
.msg-line { display: flex; align-items: center; justify-content: flex-end; gap: 6px; max-width: 100%; }
.msg.user .msg-line { justify-content: flex-start; }
.msg-line .msg-actions { position: static; top: auto; right: auto; order: -1; flex: 0 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; opacity: 0; transition: opacity .12s ease; }
.msg.staff:hover .msg-line .msg-actions, .msg-line .msg-actions:focus-within { opacity: 1; }
.msg-line .msg-action { padding: 4px 7px; background: transparent; color: #8b8d9b; }
.msg-line .msg-action:hover { background: rgba(255, 255, 255, .06); color: #e9eaf0; }
.msg-line .msg-action.delete:hover { color: #f87171; }

/* "Закрыть тикет": calm dark pill like the other controls; red only as an accent. */
#close-btn.danger-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; min-height: 38px; padding: 0 16px 0 12px; border: 1px solid #23232f; border-radius: 12px; background: #0d0d14; color: #d4d5df; font-size: 13px; font-weight: 600; letter-spacing: .01em; box-shadow: none; transition: background .15s ease, border-color .15s ease, color .15s ease; }
#close-btn.danger-btn::before { content: ''; width: 16px; height: 16px; flex: 0 0 16px; background: #f87171; opacity: .85; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: opacity .15s ease; }
#close-btn.danger-btn:hover:not(:disabled) { border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); color: #fee2e2; }
#close-btn.danger-btn:hover:not(:disabled)::before { opacity: 1; }
#close-btn.danger-btn:focus-visible { outline: none; border-color: rgba(248, 113, 113, .55); box-shadow: 0 0 0 2px rgba(248, 113, 113, .18); }
#close-btn.danger-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Ticket status in the profile card: quiet pill, colour only in the dot. */
.info-profile .badge { gap: 8px; margin-top: 2px; padding: 6px 12px; border: 1px solid #1c1c27; background: rgba(255, 255, 255, .03); color: #c8cad3; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.info-profile .badge::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a1a1aa; }
.info-profile .badge.open::before { background: #4ade80; }
.info-profile .badge.pending::before { background: #facc15; }
.info-profile .badge.escalation::before { background: #fb923c; }
.info-profile .badge.overdue::before { background: #f87171; }
.info-profile .badge.closed::before { background: #71717a; }
.info-profile .badge.open, .info-profile .badge.pending, .info-profile .badge.escalation, .info-profile .badge.overdue, .info-profile .badge.closed { background: rgba(255, 255, 255, .03); }

/* Closed tickets in the list: a quiet "Закрыт" line under the preview, no background. */
.ticket-main .ticket-closed { display: block; margin-top: 1px; background: none; border: 0; padding: 0; color: #6b6d7a; font-size: 12px; font-weight: 500; line-height: 16px; }

/* Our design wins over fear-theme-extra.css (it uses !important): keep these after it. */
html:root .history-event span { color: #a1a3b3 !important; font-size: 11px; }
html:root .history-event strong { color: #71717a; }
html:root .msg.staff .msg-bubble > .msg-actions, html:root .msg-actions { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html:root .msg-actions .msg-action { background: transparent; color: #8b8d9b; }
html:root .msg-actions .msg-action:hover { background: rgba(255, 255, 255, .06); color: #e9eaf0; }
html:root .history-event strong { font-size: 11px !important; }
