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, 300px); }
  .layout > .info { width: var(--info-w, 280px); }
  .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; }

/* Compact columns, tight composer buttons, pill-shaped system line (as in the reference). */
html:root .composer-box { gap: 2px !important; }
html:root .composer-box > .emoji-toggle, html:root .composer-box > .quick-toggle { margin: 0 !important; }
html:root .composer-box > .quick-toggle { margin-right: 6px !important; }
html:root .history-event { display: inline-flex !important; flex-direction: row !important; align-items: center; align-self: center; width: fit-content; max-width: 90%; gap: 6px !important; padding: 5px 12px !important; border-radius: 999px !important; border: 1px solid #1b1b20 !important; background: rgba(16, 16, 24, .38) !important; color: #71717a !important; font-size: 11px !important; text-align: center; }
html:root .history-event strong { color: #71717a !important; font-size: 11px !important; font-weight: 500 !important; }
html:root .history-event span { color: #8a8a9a !important; font-size: 11px !important; opacity: 1 !important; white-space: nowrap; }

/* Tighter gaps: between panels and between composer buttons. */
@media (min-width: 1101px) { html:root .layout { padding: 8px 10px 10px !important; } }
html:root .composer-box { gap: 0 !important; padding-left: 8px !important; padding-right: 6px !important; }
html:root .composer-box > .quick-toggle { margin-right: 4px !important; }
html:root .topbar { margin: 8px 10px 0 !important; }

/* Theme cards (swatch preview, as in FearTask). */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-card { display: grid; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--border); border-radius: 14px; background: transparent; color: var(--text); text-align: left; font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.theme-card:hover { transform: translateY(-1px); }
.theme-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent); }
.theme-card .swatch { display: flex; align-items: flex-end; gap: 6px; height: 54px; padding: 8px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(128,128,128,.25); }
.theme-card .swatch i { flex: 1; height: 100%; border-radius: 6px; box-shadow: 0 0 0 1px rgba(128,128,128,.2); }
.theme-card .swatch i:last-child { flex: 0 0 34%; }
.theme-card > span { padding: 0 4px; font-size: 13px; }

/* Must beat fear-theme.css (nested `:root:not([data-theme=light]) & .panel`, !important): the only gap between panels is the 8px splitter; panels take the theme background, so Midnight is pure black like the reference. */
html:root:not([data-theme="light"]) body .layout { gap: 0 !important; padding: 10px 12px 12px !important; }
html:root:not([data-theme="light"]) body .layout > .panel, html:root:not([data-theme="light"]) body .layout > .sidebar, html:root:not([data-theme="light"]) body .layout > .chat, html:root:not([data-theme="light"]) body .layout > .info,
html:root:not([data-theme="light"]) body .panel { background: var(--bg) !important; background-color: var(--bg) !important; border: 1px solid var(--border) !important; }
html:root:not([data-theme="light"]) body .topbar { background: var(--bg) !important; border: 1px solid var(--border) !important; margin: 10px 12px 0 !important; }
html:root:not([data-theme="light"]) body .messages, html:root:not([data-theme="light"]) body .chat-head { background: transparent !important; }
@media (max-width: 1100px) { html:root:not([data-theme="light"]) body .layout { gap: 8px !important; padding: 8px !important; } }

/* Round 6: no "#" button, white nicknames, red actions with translucent hover, unread badge, narrower profile column. */
#ticket-add-tag { display: none !important; }
html:root .msg .msg-author, html:root .msg .msg-author b, html:root .msg.user .msg-author, html:root .msg.staff .msg-author,
html:root .ticket-name, html:root .chat-name, html:root .info-profile h3, html:root .info-profile .name { color: #ffffff !important; }
html:root .msg .msg-author { font-weight: 600; }
html:root #close-btn.danger-btn, html:root .info-ban.danger-outline, html:root #ban-user {
  background: transparent !important; border: 1px solid rgba(239, 68, 68, .22) !important; color: #f87171 !important; box-shadow: none !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
html:root #close-btn.danger-btn:hover:not(:disabled), html:root .info-ban.danger-outline:hover:not(:disabled), html:root #ban-user:hover:not(:disabled) {
  background: rgba(127, 29, 29, .26) !important; border-color: rgba(248, 113, 113, .55) !important; color: #ff8f8f !important;
}
html:root #close-btn.danger-btn::before { background: currentColor; opacity: 1; }
html:root .info-ban { padding: 8px 10px; font-size: 12px; }
html:root .ticket-time .ticket-check { width: 13px; height: 13px; color: #4ade80; }
html:root .ticket-unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent, #7b7cf6); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
@media (min-width: 1101px) { html:root .layout > .info { padding: 16px 14px; } html:root .info-profile .avatar { transform: scale(.85); } }
html:root .info-profile .badge.open, html:root .info-profile .badge.pending, html:root .info-profile .badge.escalation, html:root .info-profile .badge.overdue, html:root .info-profile .badge.closed { background: transparent !important; border: 1px solid #1c1c27 !important; color: #c8cad3 !important; font-weight: 500; }
html:root .info-profile .badge.pending { color: #e9c46a !important; }
html:root .info-profile .badge.pending::before { background: #facc15; box-shadow: 0 0 6px rgba(250, 204, 21, .45); }
html:root .info-profile .badge.open, html:root .info-profile .badge.pending, html:root .info-profile .badge.escalation, html:root .info-profile .badge.overdue, html:root .info-profile .badge.closed { color: #ffffff !important; border: 0 !important; }
html:root #close-btn.danger-btn, html:root .info-ban.danger-outline, html:root #ban-user { border: 1px solid transparent !important; color: #ffffff !important; }
html:root #close-btn.danger-btn::before, html:root #ban-user::before, html:root .info-ban.danger-outline::before { background: #f87171 !important; opacity: 1 !important; }
html:root #close-btn.danger-btn:hover:not(:disabled), html:root .info-ban.danger-outline:hover:not(:disabled), html:root #ban-user:hover:not(:disabled) { color: #ffffff !important; border-color: rgba(248, 113, 113, .5) !important; background: rgba(127, 29, 29, .3) !important; }
html:root .assignment-free, html:root .chat-who .assignment-trigger .assignment-free { display: none !important; }

/* Empty state: nothing selected -> no header line, centered placeholder. */
html:root #chat.no-ticket > .chat-head { display: none !important; }
html:root #chat.no-ticket > .messages { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; }
html:root .empty.empty-pick { margin: 0; gap: 6px; max-width: 280px; padding: 0 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
html:root .empty.empty-pick strong { color: #ffffff; font-size: 15px; font-weight: 600; letter-spacing: .01em; }
html:root .empty.empty-pick .empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 8px; border: 1px solid #1c1c27; border-radius: 16px; background: rgba(255, 255, 255, .02); color: var(--accent, #7b7cf6); }
html:root .empty.empty-pick .empty-icon svg { width: 26px; height: 26px; margin: 0; opacity: 1; }
html:root #info-body:has(.empty-pick) { display: flex; align-items: center; justify-content: center; min-height: 100%; }

/* Waiting for a moderator reply 24h+: red outline only, pinned to the top by the server. */
html:root .ticket-item.overdue { border: 1px solid rgba(239, 68, 68, .6) !important; background: rgba(127, 29, 29, .07) !important; box-shadow: none !important; }
html:root .ticket-item.overdue:hover, html:root .ticket-item.overdue.active { border-color: rgba(248, 113, 113, .85) !important; background: rgba(127, 29, 29, .13) !important; }

/* People list: rows open the employee page. */
html:root button.people-row.people-link { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
html:root .people-row.people-link:hover, html:root .people-row.people-link:focus-visible { background: rgba(255, 255, 255, .05); outline: none; }
html:root .people-row .people-go { width: 16px; height: 16px; margin-left: auto; flex: 0 0 16px; color: #6b6d7c; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
html:root .people-row.people-link:hover .people-go, html:root .people-row.people-link:focus-visible .people-go { opacity: 1; transform: translateX(2px); }
html:root .people-row .people-you + .people-go { margin-left: 8px; }
html:root .people-row.people-link.active { background: rgba(123, 124, 246, .14); }
html:root .people-row.people-link.active .people-go { opacity: 1; color: #aeb0ff; }
html:root #people-trigger.has-person { position: relative; border-color: rgba(123, 124, 246, .55) !important; color: #aeb0ff; }
html:root #people-trigger.has-person::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #7b7cf6; box-shadow: 0 0 0 2px #000; }

/* Right column: status pill and block button side by side, no divider lines, smaller pill. */
html:root .info-profile { border-bottom: 0 !important; padding-bottom: 0 !important; }
html:root .info-section { border-top: 0 !important; padding-top: 4px !important; }
html:root .info-actions { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 6px; }
html:root .info-actions .badge { margin: 0 !important; padding: 3px 9px !important; gap: 6px !important; font-size: 10px !important; font-weight: 600 !important; letter-spacing: .04em; line-height: 1.4; }
html:root .info-actions .badge::before { width: 6px !important; height: 6px !important; flex: 0 0 6px !important; }
html:root .info-actions .info-ban { width: auto !important; margin: 0 !important; padding: 5px 10px !important; font-size: 11px !important; font-weight: 600; border-radius: 10px; }
html:root .info-actions #ban-user::before { width: 13px !important; height: 13px !important; flex: 0 0 13px !important; }
html:root .info-actions #ban-user { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: auto !important; height: 28px !important; min-height: 0 !important; padding: 0 11px !important; font-size: 11px !important; border-radius: 10px; }

/* Right column: status pill and block button strictly in one row. */
html:root .info-actions { flex-direction: row !important; flex-wrap: nowrap !important; }

/* Ticket list: time on top, the mark (check or unread count) below it, both centered on the right edge. */
html:root .ticket-item { position: relative; }
html:root .ticket-item .ticket-time { position: absolute !important; right: 14px; top: 50%; transform: translateY(-50%); display: flex !important; flex-direction: column; align-items: flex-end; gap: 5px; margin: 0 !important; order: 0 !important; }
html:root .ticket-item .ticket-time-text { font-size: 11px; line-height: 1; color: #8a8a9a; }
html:root .ticket-item .ticket-main { padding-right: 50px; }
html:root .ticket-item .ticket-unread { min-width: 20px; height: 20px; font-size: 11px; }
html:root .ticket-item .ticket-time .ticket-check { width: 14px; height: 14px; }
/* Selected ticket: clean rounded outline instead of the inset left bar (it rendered as curved arcs on the corners). */
html:root:not([data-theme="light"]) .ticket-item.active { box-shadow: none !important; border: 1px solid rgba(123, 124, 246, .6) !important; background: rgba(123, 124, 246, .08) !important; }
html:root:not([data-theme="light"]) .ticket-item:not(.active):not(.overdue):hover { box-shadow: none !important; }

/* Admin area in the site theme: flat black panel with a thin border, like the ticket panels. */
html:root:not([data-theme="light"]) body .admin-view, html:root:not([data-theme="light"]) body .settings-view { background: var(--bg) !important; background-color: var(--bg) !important; background-image: none !important; border: 1px solid var(--border) !important; border-radius: 16px; }
html:root:not([data-theme="light"]) body .admin-sidebar, html:root:not([data-theme="light"]) body .settings-nav { background: transparent !important; border-color: var(--border) !important; }
html:root:not([data-theme="light"]) body .admin-main, html:root:not([data-theme="light"]) body .settings-content { background: transparent !important; }
html:root:not([data-theme="light"]) body .admin-nav button.active, html:root:not([data-theme="light"]) body .settings-nav button.active { background: rgba(123, 124, 246, .14) !important; box-shadow: none !important; color: #ffffff; border-radius: 12px; }
html:root:not([data-theme="light"]) body .admin-nav button:hover:not(.active), html:root:not([data-theme="light"]) body .settings-nav button:hover:not(.active) { background: rgba(255, 255, 255, .04); }
html:root:not([data-theme="light"]) body .admin-card, html:root:not([data-theme="light"]) body .admin-stat, html:root:not([data-theme="light"]) body .admin-list-row, html:root:not([data-theme="light"]) body .ban-table-wrap { background: transparent !important; border-color: var(--border) !important; }
html:root:not([data-theme="light"]) body .admin-nav button:focus-visible, html:root:not([data-theme="light"]) body .admin-back-link:focus-visible { outline: none; box-shadow: 0 0 0 1px rgba(123, 124, 246, .55) inset; }

/* Ban list page. */
.admin-page-actions .admin-search { height: 44px; box-sizing: border-box; border-radius: 12px; }
.admin-page-actions #ban-add { height: 44px; white-space: nowrap; }
.ban-form-card { padding: 14px; }
.ban-form-card .ban-form { grid-template-columns: 1.1fr 1.4fr 1fr auto; align-items: end; }
.ban-table td.ban-actions { text-align: right; white-space: nowrap; }
.ban-unban { height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #ffffff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.ban-unban:hover { background: rgba(127, 29, 29, .3); border-color: rgba(248, 113, 113, .5); }
.ban-past { color: var(--muted); }
@media (max-width: 900px) { .ban-form-card .ban-form { grid-template-columns: 1fr 1fr; } }

/* Ban form: term dropdown. */
.ban-form-card .ban-date { gap: 6px; }
.ban-form-card .ban-date > span { color: var(--muted); font-size: 11px; }
.ban-form-card .styled-select { width: 100%; }
.ban-form-card .styled-select-trigger { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; color: #fff; font: inherit; font-size: 14px; font-weight: 600; justify-content: space-between; }
.ban-form-card .styled-select-trigger:hover, .ban-form-card .styled-select-trigger[aria-expanded="true"] { border-color: #2a2a38; background: #1a1b20; }
.ban-form-card .styled-select-trigger:focus-visible { outline: none; border-color: #7b7cf6; }
.ban-form-card .ban-form input { height: 44px; box-sizing: border-box; }

/* Term dropdown (ban form): clean trigger, arrow exactly centered, left-aligned options with a check on the selected one. */
.ban-form-card .styled-select-trigger { padding: 0 12px 0 14px !important; justify-content: space-between !important; text-align: left; font-weight: 600 !important; }
.ban-form-card .styled-select-trigger > span:first-child { display: flex; align-items: center; min-width: 0; }
.ban-form-card .styled-select-arrow { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; margin-left: 8px; color: #8b8d9b; font-size: 0; line-height: 0; transition: transform .18s ease, color .15s ease; }
.ban-form-card .styled-select-arrow svg { width: 16px; height: 16px; display: block; }
.ban-form-card .styled-select-trigger[aria-expanded="true"] .styled-select-arrow { transform: rotate(180deg); color: #c7c9ff; }
.ban-form-card .styled-select-menu { margin-top: 0; padding: 6px !important; border: 1px solid #1c1c27; border-radius: 14px; background: #0f0f16 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.ban-form-card .styled-select-menu .styled-select-option { position: relative; display: flex; align-items: center; justify-content: flex-start !important; text-align: left !important; height: 36px !important; min-height: 36px !important; padding: 0 34px 0 12px !important; border-radius: 10px; color: #d7d8e2; font-size: 13px !important; font-weight: 500; }
.ban-form-card .styled-select-menu .styled-select-option + .styled-select-option { margin-top: 2px; }
.ban-form-card .styled-select-menu .styled-select-option:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.ban-form-card .styled-select-menu .styled-select-option[aria-selected="true"] { background: rgba(123, 124, 246, .14); color: #fff; font-weight: 600; }
.ban-form-card .styled-select-menu .styled-select-option[aria-selected="true"]::after { content: '' !important; display: block !important; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin: 0; transform: translateY(-50%); background: #aeb0ff; -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Term dropdown (ban dialog): clean trigger, arrow exactly centered, left-aligned options with a check on the selected one. */
.ban-dialog-form .styled-select-trigger { padding: 0 12px 0 14px !important; justify-content: space-between !important; text-align: left; font-weight: 600 !important; }
.ban-dialog-form .styled-select-trigger > span:first-child { display: flex; align-items: center; min-width: 0; }
.ban-dialog-form .styled-select-arrow { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; margin-left: 8px; color: #8b8d9b; font-size: 0; line-height: 0; transition: transform .18s ease, color .15s ease; }
.ban-dialog-form .styled-select-arrow svg { width: 16px; height: 16px; display: block; }
.ban-dialog-form .styled-select-trigger[aria-expanded="true"] .styled-select-arrow { transform: rotate(180deg); color: #c7c9ff; }
.ban-dialog-form .styled-select-menu { margin-top: 0; padding: 6px !important; border: 1px solid #1c1c27; border-radius: 14px; background: #0f0f16 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.ban-dialog-form .styled-select-menu .styled-select-option { position: relative; display: flex; align-items: center; justify-content: flex-start !important; text-align: left !important; height: 36px !important; min-height: 36px !important; padding: 0 34px 0 12px !important; border-radius: 10px; color: #d7d8e2; font-size: 13px !important; font-weight: 500; }
.ban-dialog-form .styled-select-menu .styled-select-option + .styled-select-option { margin-top: 2px; }
.ban-dialog-form .styled-select-menu .styled-select-option:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.ban-dialog-form .styled-select-menu .styled-select-option[aria-selected="true"] { background: rgba(123, 124, 246, .14); color: #fff; font-weight: 600; }
.ban-dialog-form .styled-select-menu .styled-select-option[aria-selected="true"]::after { content: '' !important; display: block !important; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin: 0; transform: translateY(-50%); background: #aeb0ff; -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Compact "Выдать наказание" dialog. */
#section-dialog:has(#ban-form) { width: min(400px, calc(100vw - 32px)) !important; }
#section-dialog:has(#ban-form) .section-card { padding: 18px 18px 16px; }
#section-dialog:has(#ban-form) .section-head { margin-bottom: 10px; }
#section-dialog:has(#ban-form) .modal-title { font-size: 16px; }
#ban-form.ban-dialog-form { gap: 10px; padding-top: 2px; }
#ban-form.ban-dialog-form .ban-target { gap: 10px; padding-bottom: 2px; }
#ban-form.ban-dialog-form .ban-target .avatar { width: 36px; height: 36px; }
#ban-form.ban-dialog-form > label { gap: 5px; font-size: 12px; }
#ban-form.ban-dialog-form input { height: 40px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
#ban-form.ban-dialog-form .styled-select-trigger { height: 40px; font-size: 13px; }
#ban-form.ban-dialog-form .ban-form-actions { margin-top: 4px; gap: 8px; }
#ban-form.ban-dialog-form .ban-form-actions button { height: 36px; padding: 0 14px; font-size: 12px; border-radius: 10px; }

/* Status pill moved out of .info-profile into .info-actions: restore its look (no fill, no border, white text, colored dot). */
html:root .info-actions .badge, html:root .info-actions .badge.open, html:root .info-actions .badge.pending, html:root .info-actions .badge.escalation, html:root .info-actions .badge.overdue, html:root .info-actions .badge.closed {
  display: inline-flex; align-items: center; background: transparent !important; border: 0 !important; color: #ffffff !important; text-transform: none !important; font-weight: 600 !important; box-shadow: none !important;
}
html:root .info-actions .badge::before { content: ''; display: block; border-radius: 50%; background: #a1a1aa; }
html:root .info-actions .badge.open::before { background: #4ade80; }
html:root .info-actions .badge.pending::before { background: #facc15; box-shadow: 0 0 6px rgba(250, 204, 21, .45); }
html:root .info-actions .badge.escalation::before { background: #fb923c; }
html:root .info-actions .badge.overdue::before { background: #f87171; }
html:root .info-actions .badge.closed::before { background: #71717a; }

/* Ban list: filters on the left, search + add on the same row on the right, one height. */
.ban-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 4px 0 14px; }
.ban-toolbar .ban-tabs { margin: 0; }
.ban-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ban-tools .admin-search { width: 260px; height: 34px; box-sizing: border-box; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.ban-tools #ban-add { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
@media (max-width: 760px) { .ban-tools { width: 100%; } .ban-tools .admin-search { flex: 1; width: auto; } }
.ban-tools #ban-add { min-height: 0 !important; height: 34px !important; }
.ban-toolbar .ban-tools { flex: 0 0 auto !important; width: auto !important; }
.ban-toolbar .ban-tools .admin-search { flex: 0 0 260px !important; width: 260px !important; max-width: 100%; }
.ban-toolbar .ban-tools #ban-add { flex: 0 0 auto !important; width: auto !important; }
@media (max-width: 760px) { .ban-toolbar .ban-tools { flex: 1 1 100% !important; width: 100% !important; } .ban-toolbar .ban-tools .admin-search { flex: 1 1 auto !important; width: auto !important; } }

/* Ban list: tighter vertical rhythm (the page adds a 20px gap between blocks on top of own margins). */
.admin-content > .ban-toolbar { margin: -8px 0 -10px; }
.admin-content > .ban-form-card { margin-bottom: -8px; }

/* Row action buttons (quick replies, personal replies, staff): real icons, bigger. */
html:root .reply-actions .icon-btn, html:root .reply-row > .icon-btn, html:root .personal-row .admin-remove, html:root .staff-row .admin-remove { display: inline-grid; place-items: center; width: 38px !important; height: 38px !important; padding: 0 !important; border-radius: 11px; line-height: 0; font-size: 0; }
html:root .reply-actions .icon-btn svg, html:root .reply-row > .icon-btn svg, html:root .personal-row .admin-remove svg, html:root .staff-row .admin-remove svg { width: 19px !important; height: 19px !important; display: block; }
html:root .reply-actions { gap: 8px; }
html:root .reply-actions .icon-btn:hover { color: #ffffff; border-color: #3a3a4a; }
html:root .reply-actions .admin-remove:hover, html:root .personal-row .admin-remove:hover, html:root .staff-row .admin-remove:hover { background: rgba(127, 29, 29, .3); border-color: rgba(248, 113, 113, .5); color: #ff9a9a; }
html:root .note-actions { gap: 4px; }
html:root .note-action { width: 34px !important; height: 34px !important; border-radius: 10px !important; }
html:root .note-action svg { width: 20px !important; height: 20px !important; }
html:root .note-action[data-note-remove]:hover { background: rgba(127, 29, 29, .3) !important; color: #ff9a9a !important; }

/* Quick replies: "+ Добавить" at the right of the title, same height as the other toolbar buttons. */
.admin-page-actions #reply-add { min-height: 0 !important; height: 38px !important; padding: 0 16px !important; font-size: 13px; border-radius: 12px; white-space: nowrap; }
.admin-page-head:has(#reply-add) { align-items: center; }

/* Modal dialogs: no browser focus outline around the whole window, in the site theme. */
dialog.modal, dialog.modal:focus, dialog.modal:focus-visible, dialog.modal:focus-within, #section-dialog, #section-dialog:focus, #section-dialog:focus-visible { outline: none !important; box-shadow: none !important; }
dialog.modal::backdrop { background: rgba(0, 0, 0, .62); }
dialog.modal .modal-card { outline: none !important; }
#section-dialog .section-head .icon-btn:focus, #section-dialog .section-head .icon-btn:focus-visible { outline: none !important; box-shadow: none !important; background: rgba(255, 255, 255, .06); }
html:root:not([data-theme="light"]) body #section-dialog .section-card { background: #0a0a10; border: 1px solid #1c1c27; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form input[name="reason"] { background: #000000; border: 1px solid #1c1c27; color: #f2f2f7; border-radius: 12px; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form input[name="reason"]:focus, html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form input[name="reason"]:focus-visible { border-color: rgba(123, 124, 246, .55) !important; box-shadow: none !important; outline: none !important; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .styled-select-trigger { background: #000000; border: 1px solid #1c1c27; border-radius: 12px; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .styled-select-trigger:hover, html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .styled-select-trigger[aria-expanded="true"] { background: #0d0d14; border-color: #2a2a38; }
html:root:not([data-theme="light"]) body #ban-form .ban-form-actions .ghost-btn { background: transparent; border: 1px solid transparent; color: #8a8a9a; }
html:root:not([data-theme="light"]) body #ban-form .ban-form-actions .ghost-btn:hover { background: rgba(255, 255, 255, .05); color: #ffffff; }
html:root:not([data-theme="light"]) body #ban-form .ban-form-actions .danger-btn { background: transparent; border: 1px solid transparent; color: #ffffff; }
html:root:not([data-theme="light"]) body #ban-form .ban-form-actions .danger-btn:hover { background: rgba(127, 29, 29, .3); border-color: rgba(248, 113, 113, .5); }

/* Close buttons and other controls inside dialogs: no focus ring (only the active field gets its own soft border). */
html:root dialog button:focus, html:root dialog button:focus-visible, html:root dialog .icon-btn:focus, html:root dialog .icon-btn:focus-visible,
html:root .section-head .icon-btn:focus, html:root .section-head .icon-btn:focus-visible, html:root .modal-card button:focus-visible { outline: none !important; box-shadow: none !important; }
html:root dialog .icon-btn:focus-visible { background: rgba(255, 255, 255, .06); }

/* Statistics: leaderboard of staff by closed tickets (site theme: flat black cards with thin borders). */
.lb-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1px solid #1c1c27; border-radius: 16px; background: transparent; }
.lb-total span { display: block; color: #8a8a9a; font-size: 13px; }
.lb-total b { display: block; margin-top: 4px; color: #ffffff; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.lb-trophy { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #1c1c27; border-radius: 15px; background: rgba(123, 124, 246, .1); color: #8b8cf7; flex: 0 0 52px; }
.lb-trophy svg { width: 26px; height: 26px; }
.lb-list { display: flex; flex-direction: column; gap: 10px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 14px; border: 1px solid #1c1c27; border-radius: 16px; background: transparent; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.lb-row:hover, .lb-row:focus-visible { background: rgba(255, 255, 255, .03); border-color: #2a2a38; outline: none; }
.lb-rank { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: rgba(255, 255, 255, .04); color: #71717a; font-size: 13px; font-weight: 700; }
.lb-rank-1 { background: rgba(250, 204, 21, .14); color: #facc15; }
.lb-rank-2 { background: rgba(161, 161, 170, .16); color: #d4d4d8; }
.lb-rank-3 { background: rgba(251, 146, 60, .15); color: #fb923c; }
.lb-row .avatar { flex: 0 0 40px; }
.lb-user { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lb-user b { color: #ffffff; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-user small { margin-top: 2px; color: #71717a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.lb-count b { color: #ffffff; font-size: 22px; font-weight: 800; line-height: 1.1; }
.lb-count small { color: #71717a; font-size: 11px; }
@media (max-width: 760px) { .lb-row { gap: 10px; padding: 10px 14px 10px 10px; } .lb-total b { font-size: 26px; } }

/* Statistics: period (from — to) on the right of the title, same height as other toolbar controls. */
.stats-period { display: flex; align-items: center; gap: 10px; }
.stats-period input[type="date"] { height: 40px; box-sizing: border-box; min-width: 150px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; color: #e9eaf0; color-scheme: dark; font: inherit; font-size: 13px; font-weight: 500; }
.stats-period input[type="date"]:hover { border-color: #2a2a38; }
.stats-period input[type="date"]:focus, .stats-period input[type="date"]:focus-visible { outline: none; border-color: rgba(123, 124, 246, .55); box-shadow: none; }
.stats-period input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; filter: invert(.85); }
.stats-period input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.stats-period-dash { color: #71717a; }
.stats-period .styled-select { width: 190px; flex: 0 0 auto; }
.stats-period .styled-select-trigger { height: 40px; border-radius: 12px; font-size: 13px; font-weight: 500; }
.stats-period .styled-select-menu { left: auto; right: 0; min-width: 190px; }
@media (max-width: 760px) { .stats-period { flex-wrap: wrap; } .stats-period .styled-select { width: 100%; } }
.stats-period-reset { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #8a8a9a; cursor: pointer; transition: background .15s ease, color .15s ease; }
.stats-period-reset svg { width: 18px; height: 18px; }
.stats-period-reset:hover { background: rgba(127, 29, 29, .3); color: #ffb0b0; }
.stats-period-reset:focus, .stats-period-reset:focus-visible { outline: none; }
.admin-page-head:has(.stats-period) { align-items: center; }
@media (max-width: 760px) { .stats-period { width: 100%; } .stats-period input[type="date"] { flex: 1; min-width: 0; } }

/* Statistics: "Сброс тикетов" at the bottom right. */
.lb-footer { display: flex; justify-content: flex-end; margin-top: 4px; padding-bottom: 8px; }
.lb-reset { height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #ffffff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.lb-reset:hover { background: rgba(127, 29, 29, .3); border-color: rgba(248, 113, 113, .5); }
.lb-reset:focus, .lb-reset:focus-visible { outline: none; }

/* Assignee dropdown in the chat header: same frame as the other dropdowns (12px radius, 1px border, even side padding). */
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger { height: 40px !important; padding: 0 12px 0 14px !important; border: 1px solid transparent !important; border-radius: 12px !important; background: transparent !important; gap: 8px; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger:hover, html:root:not([data-theme="light"]) body .chat-who .assignment-trigger[aria-expanded="true"] { border-color: #1c1c27 !important; background: #0d0d14 !important; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger:focus, html:root:not([data-theme="light"]) body .chat-who .assignment-trigger:focus-visible { outline: none !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger .avatar { margin-left: -4px; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger > svg { width: 14px; height: 14px; flex: 0 0 14px; color: #8b8d9b; transition: transform .18s ease; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger { min-height: 40px !important; max-height: 40px; }

/* Notes: flat card in the site theme, author and date separated, quiet actions. */
html:root:not([data-theme="light"]) body .note-item { padding: 12px 14px; border: 1px solid #1c1c27; border-radius: 14px; background: transparent; transition: border-color .15s ease, background .15s ease; }
html:root:not([data-theme="light"]) body .note-item:hover { border-color: #2a2a38; background: rgba(255, 255, 255, .02); }
html:root:not([data-theme="light"]) body .note-text { color: #ffffff; font-size: 14px; font-weight: 500; line-height: 1.45; }
html:root:not([data-theme="light"]) body .note-meta { align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px solid #14141d; gap: 8px; }
html:root:not([data-theme="light"]) body .note-author { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-style: normal; font-size: 12px; color: #71717a; }
html:root:not([data-theme="light"]) body .note-author b { color: #b4b6c4; font-weight: 600; }
html:root:not([data-theme="light"]) body .note-author i { font-style: normal; color: #71717a; }
html:root:not([data-theme="light"]) body .note-actions { gap: 2px; opacity: .55; transition: opacity .15s ease; }
html:root:not([data-theme="light"]) body .note-item:hover .note-actions, html:root:not([data-theme="light"]) body .note-actions:focus-within { opacity: 1; }
html:root:not([data-theme="light"]) body .note-action { color: #8b8d9b; }
html:root:not([data-theme="light"]) body .note-action:hover { background: rgba(255, 255, 255, .06) !important; color: #ffffff; }
html:root:not([data-theme="light"]) body .note-action[data-note-remove]:hover { background: rgba(127, 29, 29, .3) !important; color: #ff9a9a !important; }
html:root:not([data-theme="light"]) body .note-action:focus, html:root:not([data-theme="light"]) body .note-action:focus-visible { outline: none; box-shadow: none; }

/* Statistics: admin can change a staff member's number (pencil on each row). */
.lb-row { position: relative; }
.lb-edit { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; margin-left: 10px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #8a8a9a; cursor: pointer; opacity: .55; transition: opacity .15s ease, background .15s ease, color .15s ease, border-color .15s ease; }
.lb-edit svg { width: 16px; height: 16px; }
.lb-row:hover .lb-edit, .lb-edit:focus-visible { opacity: 1; }
.lb-edit:hover { background: rgba(255, 255, 255, .06); border-color: #1c1c27; color: #ffffff; }
.lb-edit:focus, .lb-edit:focus-visible { outline: none; }
.stats-edit-dialog .modal-card { width: 400px; max-width: calc(100vw - 32px); }
.stats-edit-field { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; color: #a1a1aa; font-size: 12px; font-weight: 600; }
.stats-edit-field input { height: 44px; box-sizing: border-box; padding: 0 14px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; color: #ffffff; font: inherit; font-size: 16px; font-weight: 700; }
.stats-edit-field input:focus, .stats-edit-field input:focus-visible { outline: none; border-color: rgba(123, 124, 246, .55); box-shadow: none; }

/* Overdue status in the profile: red pill with a clock and the real waiting time. */
html:root .info-actions .badge.overdue { height: 28px; padding: 0 11px 0 9px !important; gap: 6px !important; border: 1px solid rgba(248, 113, 113, .35) !important; border-radius: 10px !important; background: rgba(127, 29, 29, .28) !important; color: #fecaca !important; font-size: 11px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; white-space: nowrap; }
html:root .info-actions .badge.overdue::before { width: 13px !important; height: 13px !important; flex: 0 0 13px !important; border-radius: 0 !important; background: #f87171 !important; box-shadow: none !important; -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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Profile column: header, actions, details as a card with even 40px rows, everything centred vertically. */
html:root:not([data-theme="light"]) body #info-body { display: flex; flex-direction: column; gap: 14px; }
html:root:not([data-theme="light"]) body .info-profile { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0 !important; padding: 6px 0 2px !important; text-align: center; }
html:root:not([data-theme="light"]) body .info-profile .avatar { margin-bottom: 12px !important; }
html:root:not([data-theme="light"]) body .info-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px !important; font-weight: 800 !important; line-height: 1.25; }
html:root:not([data-theme="light"]) body .info-username { margin-top: 3px !important; color: #8a8a9a !important; font-size: 13px !important; line-height: 1.3; }
html:root:not([data-theme="light"]) body .info-id { display: inline-flex; align-items: center; height: 22px; margin-top: 10px !important; padding: 0 10px; border: 1px solid #1c1c27; border-radius: 999px; background: #0d0d14; color: #8a8a9a !important; font-size: 11px !important; font-weight: 500; line-height: 1; }
html:root:not([data-theme="light"]) body .fear-profile-link { margin-top: 8px !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body .info-actions { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; justify-content: center !important; gap: 8px !important; margin: 0 !important; }
html:root:not([data-theme="light"]) body .info-actions .badge, html:root:not([data-theme="light"]) body .info-actions #ban-user { height: 30px !important; box-sizing: border-box; margin: 0 !important; line-height: 1 !important; }
html:root:not([data-theme="light"]) body .info-actions .badge:not(.overdue) { padding: 0 12px 0 10px !important; border: 1px solid #1c1c27 !important; border-radius: 10px !important; background: #0d0d14 !important; font-size: 11px !important; letter-spacing: .03em; }
html:root:not([data-theme="light"]) body .info-actions .badge.overdue { height: 30px; border-radius: 10px !important; }
html:root:not([data-theme="light"]) body .info-actions #ban-user { padding: 0 12px !important; border: 1px solid transparent !important; border-radius: 10px !important; }
html:root:not([data-theme="light"]) body .info-section:not(.notes-section) { display: flex !important; flex-direction: column !important; gap: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
html:root:not([data-theme="light"]) body .info-row { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; min-height: 34px !important; margin: 0 !important; padding: 0 !important; border-bottom: 0 !important; }
html:root:not([data-theme="light"]) body .info-row:last-child { border-bottom: 0 !important; }
html:root:not([data-theme="light"]) body .info-row > span:first-child { flex: 0 0 auto; color: #8a8a9a !important; font-size: 13px !important; line-height: 1.3; }
html:root:not([data-theme="light"]) body .info-row > span:last-child { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; overflow: hidden; color: #ffffff !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.3; text-align: right; white-space: nowrap; }
html:root:not([data-theme="light"]) body .info-assignee > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .info-assignee .avatar { flex: 0 0 22px !important; width: 22px !important; height: 22px !important; }
html:root:not([data-theme="light"]) body .notes-section { margin: 4px 0 0 !important; }
html:root:not([data-theme="light"]) body .notes-section { gap: 10px !important; margin: 6px 0 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
html:root:not([data-theme="light"]) body .notes-head { min-height: 26px; }
html:root:not([data-theme="light"]) body .notes-empty { padding: 2px 0 0; }

/* Profile: ID as a quiet copy chip; status and ban as two equal halves; notes without the divider. */
html:root:not([data-theme="light"]) body .info-id { margin-top: 10px !important; }
html:root:not([data-theme="light"]) body .info-copy { display: inline-flex !important; align-items: center; gap: 6px; height: 26px; max-width: 100%; padding: 0 9px 0 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #8a8a9a; font: inherit; font-size: 12px !important; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .info-copy span { color: #6b6c7c; }
html:root:not([data-theme="light"]) body .info-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c4c5d4; font-weight: 600; font-variant-numeric: tabular-nums; }
html:root:not([data-theme="light"]) body .info-copy svg { width: 13px; height: 13px; flex: 0 0 13px; opacity: 0; transition: opacity .15s ease; }
html:root:not([data-theme="light"]) body .info-copy:hover { border-color: #1c1c27; background: #0d0d14; }
html:root:not([data-theme="light"]) body .info-copy:hover b { color: #ffffff; }
html:root:not([data-theme="light"]) body .info-copy:hover svg { opacity: .8; }
html:root:not([data-theme="light"]) body .info-copy:focus, html:root:not([data-theme="light"]) body .info-copy:focus-visible { outline: none; }
html:root:not([data-theme="light"]) body .note-item { padding: 10px 12px !important; }
html:root:not([data-theme="light"]) body .note-meta { margin-top: 4px !important; padding-top: 0 !important; border-top: 0 !important; }
/* Ban button alone under the profile: original look (transparent, white text, red icon, no border), full width. */
html:root:not([data-theme="light"]) body .info-actions { display: flex !important; width: 100%; }
html:root:not([data-theme="light"]) body .info-actions #ban-user { flex: 1 1 auto; justify-content: center !important; width: 100% !important; height: 38px !important; padding: 0 14px !important; border: 1px solid transparent !important; border-radius: 12px !important; background: transparent !important; color: #ffffff !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body .info-actions #ban-user:hover { border-color: rgba(248, 113, 113, .5) !important; background: rgba(127, 29, 29, .3) !important; }

/* "Тикеты" title as a source switcher: all / Discord / site. */
.sidebar-head .source-dropdown { flex: 0 0 auto; }
.source-trigger { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-left: -8px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: #ffffff; font-family: inherit; cursor: pointer; transition: background .15s ease; }
.source-trigger:hover, .source-trigger[aria-expanded="true"] { background: #14141d; }
.source-trigger:focus, .source-trigger:focus-visible { outline: none; }
.source-trigger svg { width: 14px; height: 14px; flex: 0 0 14px; color: #8a8a9a; transition: transform .15s ease, color .15s ease; }
.source-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.source-trigger.filtered svg { color: #aeb0ff; }
#source-menu { min-width: 190px; }
#source-menu 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; }
#source-menu button svg { width: 16px; height: 16px; flex: 0 0 16px; color: #8b8b94; }
#source-menu button:hover { background: #222227; }
#source-menu button.on { background: #14141d; color: #ffffff; }
#source-menu button.on svg { color: #aeb0ff; }

/* Narrower profile column; ID chip centred (copy icon no longer takes space). */
@media (min-width: 1101px) { html:root body:not(.info-hidden):not(.info-open) .layout > #info { width: var(--info-w, 300px) !important; max-width: none !important; } html:root body:not(.info-open):not(.info-hidden) .layout > #info > .info-body { width: var(--info-w, 300px) !important; } html:root body.layout-resizing .layout > #info { transition: none !important; } }
html:root:not([data-theme="light"]) body .info-copy { position: relative; padding: 0 11px !important; }
html:root:not([data-theme="light"]) body .info-copy svg { position: absolute; right: -12px; top: 50%; transform: translateY(-50%); }

/* Fear site data in the profile: roles, active punishments, admin freeze, balance, transactions. */
html:root:not([data-theme="light"]) body .fear-unlinked { display: inline-block; margin-top: 8px; color: #6b6c7c; font-size: 12px; }
html:root:not([data-theme="light"]) body .fear-profile { display: flex; flex-direction: column; gap: 10px; }
html:root:not([data-theme="light"]) body .fear-profile.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .fear-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
html:root:not([data-theme="light"]) body .fear-role { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid #1c1c27; border-radius: 999px; background: #0d0d14; color: #d4d4d8; font-size: 12px; font-weight: 600; }
html:root:not([data-theme="light"]) body .fear-role.admin { border-color: rgba(123, 124, 246, .35); background: rgba(123, 124, 246, .1); color: #c7c8ff; }
html:root:not([data-theme="light"]) body .fear-role.vip { border-color: rgba(250, 204, 21, .3); background: rgba(250, 204, 21, .08); color: #fde68a; }
html:root:not([data-theme="light"]) body .fear-alert { padding: 10px 12px; border: 1px solid rgba(248, 113, 113, .3); border-radius: 12px; background: rgba(127, 29, 29, .18); }
html:root:not([data-theme="light"]) body .fear-alert.mute { border-color: rgba(251, 146, 60, .3); background: rgba(124, 45, 18, .16); }
html:root:not([data-theme="light"]) body .fear-alert.freeze { border-color: rgba(96, 165, 250, .3); background: rgba(30, 58, 138, .18); }
html:root:not([data-theme="light"]) body .fear-alert-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
html:root:not([data-theme="light"]) body .fear-alert-top b { color: #fca5a5; font-weight: 700; }
html:root:not([data-theme="light"]) body .fear-alert.mute .fear-alert-top b { color: #fdba74; }
html:root:not([data-theme="light"]) body .fear-alert.freeze .fear-alert-top b { color: #93c5fd; }
html:root:not([data-theme="light"]) body .fear-alert-top span { color: #a1a1aa; font-size: 11px; white-space: nowrap; }
html:root:not([data-theme="light"]) body .fear-alert-text { margin-top: 4px; color: #ffffff; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
html:root:not([data-theme="light"]) body .fear-alert-meta { margin-top: 4px; color: #8a8a9a; font-size: 11px; }
html:root:not([data-theme="light"]) body .fear-freeze { gap: 7px !important; }
html:root:not([data-theme="light"]) body .fear-freeze i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
html:root:not([data-theme="light"]) body .fear-freeze.frozen i { background: #60a5fa; box-shadow: 0 0 6px rgba(96, 165, 250, .5); }
html:root:not([data-theme="light"]) body .fear-tx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; border: 1px solid #1c1c27; border-radius: 12px; background: transparent; color: #ffffff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
html:root:not([data-theme="light"]) body .fear-tx-btn svg { width: 15px; height: 15px; color: #aeb0ff; }
html:root:not([data-theme="light"]) body .fear-tx-btn:hover { border-color: #2a2a38; background: #14141d; }
html:root:not([data-theme="light"]) body .fear-tx-btn:focus, html:root:not([data-theme="light"]) body .fear-tx-btn:focus-visible { outline: none; }
.tx-dialog .modal-card { width: 520px; max-width: calc(100vw - 32px); max-height: min(640px, calc(100vh - 64px)); display: flex; flex-direction: column; }
.tx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tx-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: #8a8a9a; cursor: pointer; }
.tx-close:hover { background: #14141d; color: #ffffff; }
.tx-close:focus, .tx-close:focus-visible { outline: none; }
.tx-close svg { width: 16px; height: 16px; }
.tx-list { flex: 1 1 auto; min-height: 0; margin: 4px -6px 0; padding: 0 6px; overflow-y: auto; }
.tx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #14141d; }
.tx-row:last-child { border-bottom: 0; }
.tx-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffffff; font-size: 13px; font-weight: 600; }
.tx-main span { color: #8a8a9a; font-size: 11px; }
.tx-amount { flex: 0 0 auto; color: #d4d4d8; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-amount.plus { color: #4ade80; }
.tx-amount.minus { color: #f87171; }
.tx-empty { padding: 28px 0; color: #8a8a9a; font-size: 13px; text-align: center; }

/* Users without an avatar (or with a broken one) get the ghost instead of initials. */
html:root .avatar { background-image: url("/default-avatar.svg?v=1") !important; background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; }
html:root .avatar .avatar-initials { visibility: hidden !important; }
html:root .avatar img:not([hidden]) { background: #0a0a10; }

/* Roles under the name as solid pills: frozen staff = blue + snowflake, active staff = red, premium = blue. */
html:root:not([data-theme="light"]) body .info-profile .fear-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
html:root:not([data-theme="light"]) body .info-profile .fear-roles.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .fear-role { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px !important; border: 0 !important; border-radius: 999px; color: #ffffff !important; font-size: 11px !important; font-weight: 800 !important; letter-spacing: .02em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
html:root:not([data-theme="light"]) body .fear-role svg { width: 12px; height: 12px; flex: 0 0 12px; }
html:root:not([data-theme="light"]) body .fear-role.staff.active { background: #f0605f !important; }
html:root:not([data-theme="light"]) body .fear-role.staff.frozen { background: #3d9be9 !important; }
html:root:not([data-theme="light"]) body .fear-role.vip { background: #5b6cf0 !important; }

/* ID copy chip: one tidy pill, icon inside and always in place (no jump, no box appearing on hover). */
html:root:not([data-theme="light"]) body .info-copy { position: static !important; display: inline-flex !important; align-items: center; gap: 7px !important; height: 26px !important; padding: 0 9px 0 11px !important; border: 1px solid #1c1c27 !important; border-radius: 999px !important; background: #0d0d14 !important; font-size: 11px !important; }
html:root:not([data-theme="light"]) body .info-copy span { color: #6b6c7c !important; font-weight: 500; }
html:root:not([data-theme="light"]) body .info-copy b { color: #c4c5d4 !important; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
html:root:not([data-theme="light"]) body .info-copy svg { position: static !important; transform: none !important; width: 12px !important; height: 12px !important; flex: 0 0 12px !important; opacity: .45 !important; color: #8a8a9a; }
html:root:not([data-theme="light"]) body .info-copy:hover { border-color: #2a2a38 !important; background: #14141d !important; }
html:root:not([data-theme="light"]) body .info-copy:hover b { color: #ffffff !important; }
html:root:not([data-theme="light"]) body .info-copy:hover svg { opacity: 1 !important; color: #aeb0ff; }
html:root:not([data-theme="light"]) body .info-copy:active { transform: scale(.97); }

/* Role pills in the panel's own palette (not the main site's): gradients + soft inner highlight. */
html:root:not([data-theme="light"]) body .fear-role { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 8px rgba(0, 0, 0, .35) !important; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
html:root:not([data-theme="light"]) body .fear-role.staff.active { background: linear-gradient(135deg, #e5484d 0%, #b4233c 100%) !important; }
html:root:not([data-theme="light"]) body .fear-role.staff.frozen { background: linear-gradient(135deg, #38c6d9 0%, #1f7fa8 100%) !important; }
html:root:not([data-theme="light"]) body .fear-role.vip { background: linear-gradient(135deg, #8b8cf8 0%, #6a3fd6 100%) !important; }

/* Roles v3: quiet tinted tags (no solid fill, no gradient), normal case. */
html:root:not([data-theme="light"]) body .fear-role { gap: 5px !important; height: 22px !important; padding: 0 8px !important; border: 1px solid transparent !important; border-radius: 7px !important; box-shadow: none !important; text-shadow: none !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; }
html:root:not([data-theme="light"]) body .fear-role svg { width: 11px !important; height: 11px !important; flex-basis: 11px !important; }
html:root:not([data-theme="light"]) body .fear-role.staff.active { background: rgba(239, 68, 68, .12) !important; border-color: rgba(239, 68, 68, .28) !important; color: #fca5a5 !important; }
html:root:not([data-theme="light"]) body .fear-role.staff.frozen { background: rgba(56, 189, 248, .12) !important; border-color: rgba(56, 189, 248, .28) !important; color: #7dd3fc !important; }
html:root:not([data-theme="light"]) body .fear-role.vip { background: rgba(123, 124, 246, .14) !important; border-color: rgba(123, 124, 246, .3) !important; color: #c4c5ff !important; }

/* ID: plain text line, no pill; normal font. */
html:root:not([data-theme="light"]) body .info-copy { height: auto !important; padding: 2px 4px !important; border: 0 !important; border-radius: 6px !important; background: transparent !important; gap: 6px !important; font-family: Onest, system-ui, sans-serif !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body .info-copy span { color: #6b6c7c !important; font-weight: 400 !important; }
html:root:not([data-theme="light"]) body .info-copy b { color: #a1a1aa !important; font-family: Onest, system-ui, sans-serif !important; font-size: 12px !important; font-weight: 500 !important; letter-spacing: 0 !important; }
html:root:not([data-theme="light"]) body .info-copy svg { width: 12px !important; height: 12px !important; opacity: 0 !important; }
html:root:not([data-theme="light"]) body .info-copy:hover { background: transparent !important; }
html:root:not([data-theme="light"]) body .info-copy:hover b { color: #ffffff !important; }
html:root:not([data-theme="light"]) body .info-copy:hover svg { opacity: .8 !important; }

/* Topbar: avatar only, title in Onest, online text without the green dot. */
html:root:not([data-theme="light"]) body #me-name { display: none !important; }
html:root:not([data-theme="light"]) body .account-trigger { gap: 6px !important; }
html:root:not([data-theme="light"]) body .brand, html:root:not([data-theme="light"]) body .brand span { font-family: Onest, system-ui, sans-serif !important; font-size: 16px !important; font-weight: 700 !important; letter-spacing: -.01em !important; }
html:root:not([data-theme="light"]) body .online i { display: none !important; }
html:root:not([data-theme="light"]) body .online { gap: 0 !important; color: #6b6c7c !important; font-size: 12px !important; }

/* Ticket history dialog. */
html:root:not([data-theme="light"]) body #ticket-history-open em { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: #1c1c27; color: #c4c5d4; font-size: 11px; font-style: normal; font-weight: 600; }
html:root:not([data-theme="light"]) body #ticket-history-open em:empty { display: none; }
.th-dialog .modal-card { width: 600px; }
.th-item { border-bottom: 1px solid #14141d; }
.th-item:last-child { border-bottom: 0; }
.th-item summary { display: block; padding: 12px 4px; cursor: pointer; list-style: none; border-radius: 10px; }
.th-item summary::-webkit-details-marker { display: none; }
.th-item summary:hover { background: #0f0f17; }
.th-top { display: flex; align-items: center; gap: 8px; }
.th-top b { color: #ffffff; font-size: 14px; font-weight: 600; }
.th-top em { padding: 1px 7px; border-radius: 6px; background: rgba(123, 124, 246, .14); color: #c4c5ff; font-size: 11px; font-style: normal; font-weight: 600; }
.th-status { margin-left: auto; color: #8a8a9a; font-size: 12px; }
.th-status.open { color: #4ade80; }
.th-status.pending { color: #facc15; }
.th-meta { margin-top: 3px; color: #8a8a9a; font-size: 12px; }
.th-preview { margin-top: 6px; overflow: hidden; color: #c4c5d4; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.th-item[open] .th-preview { display: none; }
.th-body { display: flex; flex-direction: column; gap: 8px; margin: 0 4px 12px; padding: 10px 12px; border-radius: 12px; background: #0b0b12; }
.th-msg-head { display: flex; align-items: baseline; gap: 8px; }
.th-msg-head b { color: #e4e4e7; font-size: 12px; font-weight: 600; }
.th-msg.staff .th-msg-head b { color: #aeb0ff; }
.th-msg-head span { color: #6b6c7c; font-size: 11px; }
.th-msg-text { margin-top: 2px; color: #d4d4d8; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Roles as the first data row: label left, small tags right, same rhythm as the other rows. */
html:root:not([data-theme="light"]) body .fear-roles-row > span.fear-roles-inline { display: inline-flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 5px !important; overflow: visible !important; white-space: normal !important; }
html:root:not([data-theme="light"]) body .fear-roles-row { min-height: 34px !important; padding: 4px 0 !important; }
html:root:not([data-theme="light"]) body .fear-roles-inline .fear-role { height: 22px !important; padding: 0 8px !important; border-radius: 6px !important; font-size: 12px !important; font-weight: 600 !important; }

/* Profile collapse arrow in the profile's top-left corner; the chat header arrow only appears when the profile is hidden. */
html:root .layout > #info { position: relative; }
html:root .info-collapse { position: absolute; z-index: 5; top: 14px; left: 14px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #1c1c27; border-radius: 10px; background: #0d0d14; color: #8a8a9a; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
html:root .info-collapse:hover { border-color: #2a2a38; background: #14141d; color: #ffffff; }
html:root .info-collapse:focus, html:root .info-collapse:focus-visible { outline: none; }
html:root .info-collapse svg { width: 16px; height: 16px; }
html:root body.info-hidden .info-collapse { display: none; }
@media (min-width: 1101px) { html:root body:not(.info-hidden) #info-btn { display: none !important; } }
@media (max-width: 1100px) { html:root .info-collapse { display: none; } }

/* ID number in the same type as the "SteamID" label: no tabular/wide digits, same size and weight. */
html:root:not([data-theme="light"]) body .info-copy span, html:root:not([data-theme="light"]) body .info-copy b { font-family: Onest, system-ui, sans-serif !important; font-size: 12px !important; font-weight: 400 !important; font-variant-numeric: normal !important; font-feature-settings: normal !important; letter-spacing: 0 !important; line-height: 1.3 !important; }
html:root:not([data-theme="light"]) body .info-copy b { color: #8a8a9a !important; }

/* ID centred: the copy icon floats outside the text and takes no space. */
html:root:not([data-theme="light"]) body .info-copy { position: relative !important; padding: 2px 4px !important; }
html:root:not([data-theme="light"]) body .info-copy svg { position: absolute !important; left: 100% !important; top: 50% !important; margin-left: 2px; transform: translateY(-50%) !important; }

/* Ticket history v2: dialog sized as a whole (no clipping, no sideways scroll), cleaner cards; bigger profile buttons. */
dialog.tx-dialog { width: min(560px, calc(100vw - 32px)) !important; max-width: calc(100vw - 32px) !important; overflow: visible !important; }
dialog.tx-dialog .modal-card { width: 100% !important; max-width: none !important; box-sizing: border-box; overflow: hidden; gap: 12px !important; padding: 22px !important; border-radius: 18px !important; background: #0a0a10 !important; border-color: #1c1c27 !important; }
dialog.tx-dialog .modal-note { margin: -6px 0 0 !important; color: #8a8a9a; font-size: 13px; }
dialog.tx-dialog .tx-list { margin: 0 -8px !important; padding: 0 8px 2px !important; overflow-x: hidden !important; overflow-y: auto; }
.th-list-wrap { display: flex; flex-direction: column; gap: 8px; }
.th-item { border: 1px solid #1c1c27 !important; border-radius: 14px; background: #0d0d14; overflow: hidden; transition: border-color .15s ease; }
.th-item + .th-item { margin-top: 8px; }
.th-item:hover { border-color: #2a2a38 !important; }
.th-item.current { border-color: rgba(123, 124, 246, .35) !important; }
.th-item summary { position: relative; padding: 13px 40px 13px 14px !important; border-radius: 0 !important; }
.th-item summary:hover { background: transparent !important; }
.th-item summary::after { content: ""; position: absolute; top: 18px; right: 16px; width: 7px; height: 7px; border-right: 2px solid #6b6c7c; border-bottom: 2px solid #6b6c7c; transform: rotate(45deg); transition: transform .15s ease; }
.th-item[open] summary::after { top: 21px; transform: rotate(-135deg); }
.th-top { min-width: 0; }
.th-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-status { flex: 0 0 auto; padding: 2px 8px; border-radius: 6px; background: #14141d; font-size: 11px !important; font-weight: 600; }
.th-status.open { background: rgba(74, 222, 128, .1); }
.th-status.pending { background: rgba(250, 204, 21, .1); }
.th-meta { margin-top: 5px !important; line-height: 1.4; }
.th-preview { margin-top: 8px !important; }
.th-body { margin: 0 !important; padding: 12px 14px 14px !important; border-top: 1px solid #1c1c27; border-radius: 0 !important; background: #08080d !important; gap: 10px !important; }
html:root:not([data-theme="light"]) body .fear-tx-btn { height: 42px !important; border-radius: 12px !important; background: #0d0d14 !important; font-size: 13px !important; }
html:root:not([data-theme="light"]) body .fear-tx-btn svg { width: 16px !important; height: 16px !important; }
html:root:not([data-theme="light"]) body .fear-tx-btn:hover { background: #14141d !important; }

/* Transactions / ticket history dialogs: bigger window, larger rows, thin scrollbar. */
dialog.tx-dialog { width: min(760px, calc(100vw - 32px)) !important; }
dialog.tx-dialog .modal-card { max-height: min(820px, calc(100vh - 48px)) !important; padding: 26px !important; }
dialog.tx-dialog .modal-title { font-size: 20px !important; }
dialog.tx-dialog .modal-note { font-size: 14px !important; }
dialog.tx-dialog .tx-list { scrollbar-width: thin; scrollbar-color: #2a2a38 transparent; }
dialog.tx-dialog .tx-list::-webkit-scrollbar { width: 6px; }
dialog.tx-dialog .tx-list::-webkit-scrollbar-thumb { border-radius: 6px; background: #2a2a38; }
.tx-row { gap: 16px !important; padding: 14px 4px !important; }
.tx-main { gap: 4px !important; }
.tx-main b { font-size: 15px !important; }
.tx-main span { font-size: 12px !important; }
.tx-amount { font-size: 15px !important; }
.th-top b { font-size: 15px !important; }
.th-meta { font-size: 13px !important; }
.th-preview, .th-msg-text { font-size: 14px !important; }
html:root:not([data-theme="light"]) body #info-body > *, html:root:not([data-theme="light"]) body .fear-profile > * { flex-shrink: 0 !important; }
html:root:not([data-theme="light"]) body .fear-tx-btn { min-height: 42px !important; }

/* "Информация" dialog: block / admin / premium / balance / last seen. */
dialog.fi-dialog { width: min(520px, calc(100vw - 32px)) !important; }
.fi-list { display: flex; flex-direction: column; }
.fi-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 2px; border-bottom: 1px solid #14141d; }
.fi-row:last-child { border-bottom: 0; }
.fi-row > span { flex: 0 0 auto; padding-top: 1px; color: #8a8a9a; font-size: 14px; }
.fi-row > div { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; text-align: right; }
.fi-row b { display: inline-flex; align-items: center; color: #ffffff; font-size: 14px; font-weight: 600; }
.fi-row small { max-width: 300px; color: #8a8a9a; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.fi-row .fear-freeze { display: inline-flex; align-items: center; gap: 7px; }
.fi-row .fear-freeze i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.fi-row .fear-freeze.frozen i { background: #60a5fa; }
.fi-row .fear-freeze.banned i { background: #f87171; }
.fi-none { color: #6b6c7c; font-weight: 500; }
#fear-info-open + #fear-tx-open { margin-top: -2px; }
html:root:not([data-theme="light"]) body .fi-row .fear-freeze.banned i { background: #f87171 !important; }
html:root:not([data-theme="light"]) body .fi-row .fear-freeze.frozen i { background: #60a5fa !important; }
.ban-custom-reason.hidden { display: none !important; }

/* Info dialog: ban / freeze shown as their cards under a label. */
.fi-block { display: flex; flex-direction: column; gap: 8px; padding: 14px 2px; border-bottom: 1px solid #14141d; }
.fi-block > span { color: #8a8a9a; font-size: 14px; }
.fi-block .fear-alert + .fear-alert { margin-top: 0; }
.fi-block .fear-alert { padding: 11px 13px; border: 1px solid rgba(248, 113, 113, .3); border-radius: 12px; background: rgba(127, 29, 29, .18); }
.fi-block .fear-alert.mute { border-color: rgba(251, 146, 60, .3); background: rgba(124, 45, 18, .16); }
.fi-block .fear-alert.freeze { border-color: rgba(96, 165, 250, .3); background: rgba(30, 58, 138, .18); }
.fi-block .fear-alert-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.fi-block .fear-alert-top b { color: #fca5a5; font-weight: 700; }
.fi-block .fear-alert.mute .fear-alert-top b { color: #fdba74; }
.fi-block .fear-alert.freeze .fear-alert-top b { color: #93c5fd; }
.fi-block .fear-alert-top span { color: #a1a1aa; font-size: 12px; white-space: nowrap; }
.fi-block .fear-alert-text { margin-top: 4px; color: #ffffff; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.fi-block .fear-alert-meta { margin-top: 4px; color: #8a8a9a; font-size: 12px; }

/* Profile action buttons: one compact stack, small gaps. */
html:root:not([data-theme="light"]) body .profile-buttons, html:root:not([data-theme="light"]) body .fear-buttons { display: flex; flex-direction: column; gap: 6px; }
html:root:not([data-theme="light"]) body .fear-buttons:empty { display: none; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn { height: 36px !important; min-height: 36px !important; border-radius: 10px !important; font-size: 12px !important; gap: 7px !important; margin: 0 !important; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn svg { width: 14px !important; height: 14px !important; }
html:root:not([data-theme="light"]) body .fear-profile:empty, html:root:not([data-theme="light"]) body .fear-profile:not(:has(*)) { display: none !important; }

/* Profile buttons as a list: icon + label on the left edge, counter and chevron on the right. */
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn { position: relative; justify-content: flex-start !important; gap: 10px !important; padding: 0 34px 0 12px !important; text-align: left; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn svg { flex: 0 0 15px !important; width: 15px !important; height: 15px !important; color: #aeb0ff; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn::after { content: ''; position: absolute; right: 15px; top: 50%; width: 6px; height: 6px; border-top: 1.6px solid #6b6c7c; border-right: 1.6px solid #6b6c7c; transform: translateY(-50%) rotate(45deg); transition: border-color .15s ease, right .15s ease; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn:hover::after { right: 13px; border-color: #ffffff; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn em { margin-left: auto !important; }
html:root .info-collapse { border: 0 !important; background: transparent !important; }
html:root .info-collapse:hover { background: transparent !important; color: #ffffff !important; }

/* System events in chat (accepted / closed / transferred): brighter so they are noticed. */
html:root:not([data-theme="light"]) body .history-event { border-color: #26263a !important; background: #11111a !important; }
html:root:not([data-theme="light"]) body .history-event strong { color: #d4d4e0 !important; font-size: 12px !important; font-weight: 500 !important; }
html:root:not([data-theme="light"]) body .history-event span { color: #9a9bb0 !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body .msg-day { color: #b4b5c6 !important; }

/* Event pill: compact, panel colours (text unchanged). */
html:root:not([data-theme="light"]) body .history-event { gap: 6px !important; padding: 5px 12px !important; border: 1px solid #1b1b20 !important; border-radius: 999px !important; background: rgba(16, 16, 24, .38) !important; line-height: normal !important; }
html:root:not([data-theme="light"]) body .history-event strong { color: #d4d4e0 !important; font-size: 11px !important; font-weight: 500 !important; }
html:root:not([data-theme="light"]) body .history-event span { color: #a1a3b3 !important; font-size: 11px !important; }

/* Info dialog: no dividers between rows, no status dots. */
html:root .fi-row, html:root .fi-block { border-bottom: 0 !important; }
html:root .fi-row { padding: 10px 2px !important; }
html:root .fi-block { padding: 10px 2px !important; }
html:root .fi-row .fear-freeze i { display: none !important; }
html:root .fi-row .fear-freeze { gap: 0 !important; }

/* Info dialog: tighter spacing. */
html:root .fi-row { padding: 5px 2px !important; }
html:root .fi-block { gap: 6px !important; padding: 5px 2px 8px !important; }
html:root dialog.fi-dialog .modal-card { gap: 8px !important; }

/* Ticket history meta: who handled it (avatar + name) and small icon chips instead of one text line. */
.th-meta { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px !important; margin-top: 8px !important; }
.th-staff { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px 0 3px; border-radius: 999px; background: rgba(123, 124, 246, .12); color: #ffffff; font-size: 12px; font-weight: 600; }
.th-staff .avatar { width: 20px !important; height: 20px !important; flex: 0 0 20px; border-radius: 50%; font-size: 9px; }
.th-staff small { margin-right: 4px; color: #aeb0ff; font-size: 11px; font-weight: 500; }
.th-staff.none { padding: 0 10px; background: #14141d; color: #8a8a9a; font-weight: 500; }
.th-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: #14141d; color: #b4b5c6; font-size: 12px; white-space: nowrap; }
.th-chip svg { width: 12px; height: 12px; flex: 0 0 12px; color: #6b6c7c; }

/* Ban reason: one field you can type into; the chevron opens the preset list. */
html:root:not([data-theme="light"]) body .ban-reason-field { display: flex; flex-direction: column; gap: 6px; }
html:root:not([data-theme="light"]) body .ban-reason-field > span { color: #a1a1aa; font-size: 13px; }
html:root:not([data-theme="light"]) body .reason-combo { position: relative; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .reason-combo input[name="reason"] { width: 100%; height: 44px !important; padding: 0 44px 0 14px !important; border: 1px solid #1c1c27 !important; border-radius: 12px !important; background: #0d0d14 !important; color: #f2f2f7 !important; font-size: 14px !important; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .reason-combo input[name="reason"]::placeholder { color: #8a8a9a; }
html:root:not([data-theme="light"]) body #ban-form.ban-dialog-form .reason-combo input[name="reason"]:focus, html:root:not([data-theme="light"]) body .reason-combo.open input[name="reason"] { border-color: rgba(123, 124, 246, .55) !important; outline: none !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .reason-combo-toggle { position: absolute; top: 50%; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #8a8a9a; cursor: pointer; transform: translateY(-50%); }
html:root:not([data-theme="light"]) body .reason-combo-toggle:hover { color: #ffffff; }
html:root:not([data-theme="light"]) body .reason-combo-toggle:focus, html:root:not([data-theme="light"]) body .reason-combo-toggle:focus-visible { outline: none; }
html:root:not([data-theme="light"]) body .reason-combo-toggle svg { width: 16px; height: 16px; transition: transform .15s ease; }
html:root:not([data-theme="light"]) body .reason-combo.open .reason-combo-toggle svg { transform: rotate(180deg); }
html:root:not([data-theme="light"]) body .reason-combo-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; border: 1px solid #1c1c27; border-radius: 12px; background: #101018; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
html:root:not([data-theme="light"]) body .reason-combo-menu.hidden { display: none; }
html:root:not([data-theme="light"]) body .reason-combo-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #d4d4d8; font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
html:root:not([data-theme="light"]) body .reason-combo-menu button:hover { background: #1c1c27; color: #ffffff; }
html:root:not([data-theme="light"]) body .reason-combo-menu button:focus, html:root:not([data-theme="light"]) body .reason-combo-menu button:focus-visible { outline: none; background: #1c1c27; }

/* Online staff: overlapping avatars with a green ring; click shows who is online. */
html:root:not([data-theme="light"]) body #online-box { position: relative; display: inline-flex !important; align-items: center; gap: 0 !important; margin-left: 6px; padding: 3px 4px !important; border-radius: 999px; cursor: pointer; transition: background .15s ease; }
html:root:not([data-theme="light"]) body #online-box:hover { background: #0d0d14; }
html:root:not([data-theme="light"]) body .online-faces { display: inline-flex; align-items: center; }
html:root:not([data-theme="light"]) body .online-faces:empty { display: none; }
html:root:not([data-theme="light"]) body .online-faces > .avatar { width: 24px !important; height: 24px !important; flex: 0 0 24px; border-radius: 50%; box-shadow: 0 0 0 2px #000, 0 0 0 3.5px rgba(74, 222, 128, .8); font-size: 9px; }
html:root:not([data-theme="light"]) body .online-faces > .avatar + .avatar, html:root:not([data-theme="light"]) body .online-faces > .online-more { margin-left: -6px; }
html:root:not([data-theme="light"]) body .online-more { display: inline-grid; place-items: center; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 999px; background: #1c1c27; box-shadow: 0 0 0 2px #000; color: #d4d4e0; font-size: 11px; font-weight: 600; }
html:root:not([data-theme="light"]) body #online-count:empty { display: none; }
html:root:not([data-theme="light"]) body #online-count { padding: 0 6px; color: #8a8a9a; font-size: 12px; }
html:root:not([data-theme="light"]) body .online-pop { position: absolute; z-index: 80; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 8px; border: 1px solid #1c1c27; border-radius: 14px; background: #101018; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); cursor: default; }
html:root:not([data-theme="light"]) body .online-pop.hidden { display: none; }
html:root:not([data-theme="light"]) body .online-pop-title { padding: 4px 6px 8px; color: #8a8a9a; font-size: 12px; }
html:root:not([data-theme="light"]) body .online-pop-row { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 9px; color: #ffffff; font-size: 13px; font-weight: 600; }
html:root:not([data-theme="light"]) body .online-pop-row .avatar { width: 24px !important; height: 24px !important; flex: 0 0 24px; border-radius: 50%; font-size: 9px; }
html:root:not([data-theme="light"]) body .online-pop-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .online-pop-row em { margin-left: auto; padding: 1px 7px; border-radius: 6px; background: rgba(123, 124, 246, .14); color: #c4c5ff; font-size: 11px; font-style: normal; font-weight: 600; }
html:root:not([data-theme="light"]) body .online-faces > .avatar { box-shadow: 0 0 0 2px #000 !important; }
html:root:not([data-theme="light"]) body #online-count { padding: 0 8px 0 4px !important; color: #8a8a9a !important; font-size: 12px !important; white-space: nowrap; }

/* Info dialog cards v2: neutral card, coloured edge + icon, facts as a key/value list. */
.fi-card { position: relative; padding: 12px 14px 12px 16px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; overflow: hidden; }
.fi-card + .fi-card { margin-top: 6px; }
.fi-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: #f87171; }
.fi-card.mute::before { background: #fb923c; }
.fi-card.freeze::before { background: #60a5fa; }
.fi-card-head { display: flex; align-items: center; gap: 8px; }
.fi-card-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; background: rgba(248, 113, 113, .12); color: #f87171; }
.fi-card.mute .fi-card-icon { background: rgba(251, 146, 60, .12); color: #fb923c; }
.fi-card.freeze .fi-card-icon { background: rgba(96, 165, 250, .12); color: #60a5fa; }
.fi-card-icon svg { width: 14px; height: 14px; }
.fi-card-head b { color: #ffffff; font-size: 14px; font-weight: 700; }
.fi-card-head em { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: #14141d; color: #b4b5c6; font-size: 11px; font-style: normal; font-weight: 600; white-space: nowrap; }
.fi-facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 10px 0 0; }
.fi-facts dt { color: #6b6c7c; font-size: 12px; }
.fi-facts dd { margin: 0; color: #e4e4ea; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.fi-facts:empty { display: none; }

/* Login: compact centred card (ghost tile, title, two lines, white button). */
html:root body .login { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: #000 !important; background-image: none !important; }
html:root body .login.hidden { display: none !important; }
html:root body .login-card { display: flex; flex-direction: column; align-items: center; width: min(440px, 100%) !important; max-width: none !important; margin: 0 !important; padding: 36px 30px 30px !important; border: 1px solid #1f1f22 !important; border-radius: 18px !important; background: #111113 !important; box-shadow: none !important; text-align: center; }
html:root body .login-card::before, html:root body .login-card::after { display: none !important; }
html:root body .login-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 16px; background: #ffffff; color: #111113; }
html:root body .login-mark svg { width: 30px; height: 30px; }
html:root body .login-title { margin: 0 0 18px !important; color: #ffffff !important; font-family: Onest, system-ui, sans-serif !important; font-size: 30px !important; font-weight: 800 !important; letter-spacing: -.02em !important; line-height: 1.1 !important; }
html:root body .login-description { max-width: 330px; margin: 0 0 10px !important; color: #c4c4c8 !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.45 !important; }
html:root body .login-hint { margin: 0 0 22px; color: #77777d; font-size: 13px; }
html:root body .login-discord { display: flex !important; align-items: center; justify-content: center; width: 100% !important; height: 48px !important; padding: 0 16px !important; border: 0 !important; border-radius: 12px !important; background: #ffffff !important; color: #111113 !important; box-shadow: none !important; font-family: Onest, system-ui, sans-serif !important; font-size: 15px !important; font-weight: 700 !important; text-decoration: none !important; transition: background .15s ease, transform .1s ease; }
html:root body .login-discord:hover { background: #e9e9ec !important; }
html:root body .login-discord:active { transform: scale(.99); }
html:root body .login-discord svg { display: none !important; }
html:root body .login-terms { margin: 16px 0 0 !important; color: #5c5c62 !important; font-size: 11px !important; line-height: 1.5 !important; }
html:root body .login-terms a { color: #8a8a90 !important; }

/* Account avatar: never squeezed or clipped, in every theme; name hidden everywhere. */
html:root .topbar .account-trigger { overflow: visible !important; flex-shrink: 0 !important; }
html:root .topbar #me-avatar { display: block; flex: 0 0 30px !important; width: 30px !important; min-width: 30px !important; height: 30px !important; aspect-ratio: 1; border-radius: 50% !important; object-fit: cover !important; object-position: center !important; transform: none !important; }
html:root .topbar #me-name { display: none !important; }
html:root .topbar .topbar-right { flex-shrink: 0; }

/* Info dialog v3: ban / freeze as plain rows like the others; status in colour, reason and who/when in grey under it. */
html:root .fi-detail > div { max-width: 68%; gap: 3px !important; }
html:root .fi-status { font-weight: 700 !important; }
html:root .fi-status.ban { color: #f87171 !important; }
html:root .fi-status.mute { color: #fb923c !important; }
html:root .fi-status.freeze { color: #7cb7fb !important; }
html:root .fi-reason { margin: 0; color: #e4e4ea; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
html:root .fi-detail small { max-width: none !important; color: #77778a !important; font-size: 12px !important; }

/* Info dialog: nickname on the same line as the title. */
.fi-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.fi-title .modal-title { flex: 0 0 auto; }
.fi-name { overflow: hidden; color: #8a8a9a; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

/* Info dialog v4: label + coloured status tag on one line; reason and who/when left-aligned beneath, with a thin coloured guide. */
.fi-item { padding: 8px 2px; }
.fi-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fi-item-head > span { color: #8a8a9a; font-size: 14px; }
.fi-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; }
.fi-tag.ban { border-color: rgba(239, 68, 68, .28); background: rgba(239, 68, 68, .12); color: #fca5a5; }
.fi-tag.mute { border-color: rgba(251, 146, 60, .28); background: rgba(251, 146, 60, .12); color: #fdba74; }
.fi-tag.freeze { border-color: rgba(56, 189, 248, .28); background: rgba(56, 189, 248, .12); color: #7dd3fc; }
.fi-item .fi-reason { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid #26263a; color: #e4e4ea; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.fi-item .fi-meta { display: block; margin-top: 4px; padding-left: 12px; color: #6b6c7c; font-size: 12px; }
.fi-item + .fi-item { margin-top: 2px; }

/* Info dialog v5: ban / freeze as a small table: status row, then Причина / Выдал / Дата rows indented under it. */
.fi-group { padding: 2px 0 6px; }
.fi-group + .fi-group { margin-top: 4px; }
html:root .fi-row.fi-sub { padding: 3px 2px 3px 14px !important; }
html:root .fi-row.fi-sub > span { color: #6b6c7c !important; font-size: 13px !important; }
html:root .fi-row.fi-sub b { color: #d4d4de !important; font-size: 13px !important; font-weight: 500 !important; text-align: right; overflow-wrap: anywhere; }
html:root .fi-row.fi-sub > div { max-width: 70%; }

/* Info dialog v6: ban / freeze rows expand on click to show reason, who and date. */
.fi-group { padding: 0 !important; }
.fi-group + .fi-group { margin-top: 0 !important; }
.fi-group > summary { list-style: none; cursor: pointer; border-radius: 8px; }
.fi-group > summary::-webkit-details-marker { display: none; }
.fi-group > summary:hover { background: #111119; }
.fi-group > summary > div { flex-direction: row !important; align-items: center !important; gap: 8px !important; }
.fi-chevron { width: 6px; height: 6px; border-right: 1.6px solid #6b6c7c; border-bottom: 1.6px solid #6b6c7c; transform: rotate(-45deg); transition: transform .15s ease; }
.fi-group[open] .fi-chevron { transform: rotate(45deg); }
.fi-more { margin: 2px 0 6px 2px; padding: 4px 0 4px 2px; border-left: 2px solid #1f1f2c; }
html:root .fi-more .fi-row.fi-sub { padding: 3px 2px 3px 12px !important; }

/* Profile: tighter space around the ban button and before the roles. */
html:root:not([data-theme="light"]) body .info-actions { margin: -6px 0 -6px !important; }
html:root:not([data-theme="light"]) body .info-actions #ban-user { height: 32px !important; min-height: 32px !important; }
html:root:not([data-theme="light"]) body .fear-profile { margin-top: -2px; }

/* Avatars: perfectly round, no ring/border, and the ghost fallback never peeks out from under a real photo. */
html:root .avatar { border: 0 !important; box-shadow: none !important; overflow: hidden !important; border-radius: 50% !important; aspect-ratio: 1; }
html:root .avatar:has(img:not([hidden])) { background-image: none !important; background-color: transparent !important; }
html:root .avatar img { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: 50% !important; object-fit: cover !important; }
html:root:not([data-theme="light"]) body .online-faces > .avatar { box-shadow: 0 0 0 2px #000 !important; }

/* "Discord не привязан к сайту" / profile link sits right under the ID. */
html:root:not([data-theme="light"]) body .fear-unlinked { margin-top: 1px !important; line-height: 1.3; }
html:root:not([data-theme="light"]) body #fear-links .fear-profile-link { margin-top: 1px !important; }

/* Info dialog: label and first value line share one baseline. */
html:root #fi-list .fi-row { align-items: baseline !important; }
html:root #fi-list .fi-row > span { padding-top: 0 !important; line-height: 20px !important; }
html:root #fi-list .fi-row > div > b:first-child { line-height: 20px !important; }
html:root #fi-list .fi-row { align-items: flex-start !important; }
html:root #fi-list .fi-row > span { display: block !important; margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 20px !important; }
html:root #fi-list .fi-row > div { padding: 0 !important; margin: 0 !important; }
html:root #fi-list .fi-row > div > b:first-child { display: block !important; margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 20px !important; }

/* Ticket history: the whole card opens the ticket. */
.th-item.th-link { cursor: pointer; }
.th-item.th-link .th-summary { display: block; padding: 13px 14px; }
.th-item.th-link:hover { border-color: #2a2a38 !important; background: #10101a; }
.th-item.th-link:focus { outline: none; }

/* Closed ticket: header and composer stay in place, just inactive. */
html:root .assignment-control.is-closed .assignment-trigger { cursor: default; opacity: 1; }
html:root .assignment-control.is-closed .assignment-trigger svg { display: none; }
html:root .composer.is-closed .composer-box { opacity: .55; pointer-events: none; }

/* Header assignee avatar: no negative offset, so the label never clips it. */
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger .avatar { margin-left: 0 !important; flex: 0 0 32px !important; width: 32px !important; height: 32px !important; border-radius: 50% !important; }
html:root:not([data-theme="light"]) body .chat-who .assignment-trigger { padding-left: 10px !important; }
html:root:not([data-theme="light"]) body #assignment-label { overflow: visible !important; }

/* Closed tickets in the list: lock instead of the check, muted card, no extra "Закрыт" line. */
html:root .ticket-item .ticket-closed { display: none !important; }
html:root .ticket-item .ticket-time .ticket-lock { width: 13px !important; height: 13px !important; color: #6b6d7a !important; }
html:root .ticket-item.is-closed .ticket-avatar .avatar { filter: grayscale(.6); opacity: .7; }
html:root .ticket-item.is-closed .ticket-name { color: #a4a5b2 !important; }
html:root .ticket-item.is-closed .ticket-preview, html:root .ticket-item.is-closed .ticket-time-text { color: #5d5e6b !important; }

/* Ticket list: time on the same line as the nickname, status icon below it. */
html:root .ticket-item .ticket-time { top: 13px !important; transform: none !important; }

/* Chat images: just the photo, rounded, no frame, background or caption. */
html:root button.attachment-media { display: block !important; padding: 0 !important; margin: 0 !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 12px !important; overflow: hidden !important; cursor: zoom-in; line-height: 0; }
html:root button.attachment-media:hover, html:root button.attachment-media:focus, html:root button.attachment-media:focus-visible { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; }
html:root button.attachment-media > span { display: none !important; }
html:root button.attachment-media img { display: block !important; max-width: min(320px, 100%) !important; max-height: 320px !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important; box-shadow: none !important; background: transparent !important; object-fit: contain; }
html:root .attachments:has(> button.attachment-media) { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }

/* Image viewer: zoom - % + and close in one pill top-right, arrows on the sides, click closes. */
html:root .media-dialog .media-toolbar { position: absolute; top: 18px; right: 18px; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid #1c1c27; border-radius: 999px; background: rgba(10, 10, 16, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html:root .media-dialog .media-tool { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #d4d4e0; cursor: pointer; box-shadow: none !important; outline: none !important; transition: background .15s ease, color .15s ease; }
html:root .media-dialog .media-tool svg { width: 16px; height: 16px; }
html:root .media-dialog .media-tool:hover:not(:disabled) { background: rgba(255, 255, 255, .08) !important; color: #fff; }
html:root .media-dialog .media-tool:disabled { opacity: .35; cursor: default; }
html:root .media-dialog .media-toolbar .media-scale { position: static !important; min-width: 46px; padding: 0 4px !important; border: 0 !important; background: transparent !important; backdrop-filter: none !important; color: #d4d4e0 !important; font-size: 12px !important; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
html:root .media-dialog .media-tool-sep { width: 1px; height: 18px; margin: 0 4px; background: #2a2a38; }
html:root .media-dialog .media-toolbar .media-close { position: static !important; top: auto; right: auto; font-size: 0; }
html:root .media-dialog .media-nav { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 1px solid #1c1c27 !important; border-radius: 50% !important; background: rgba(10, 10, 16, .82) !important; color: #d4d4e0; cursor: pointer; box-shadow: none !important; outline: none !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .15s ease, color .15s ease; }
html:root .media-dialog .media-nav:hover { background: rgba(30, 30, 42, .92) !important; color: #fff; }
html:root .media-dialog .media-nav svg { width: 20px; height: 20px; }
html:root .media-dialog .media-prev { left: 18px; }
html:root .media-dialog .media-next { right: 18px; }
html:root .media-dialog .media-nav.hidden { display: none !important; }
html:root .media-dialog #media-image { cursor: default; }
html:root button.attachment-media { cursor: pointer !important; }

/* Image viewer toolbar: no pill, just the controls. */
html:root .media-dialog .media-toolbar { padding: 0 !important; border: 0 !important; background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
html:root .media-dialog .media-tool-sep { display: none !important; }

/* Image viewer: nothing selectable or draggable, so browsers do not show copy/search menus. */
html:root .media-dialog, html:root .media-dialog * { -webkit-user-select: none !important; user-select: none !important; -webkit-user-drag: none !important; -webkit-touch-callout: none !important; -webkit-tap-highlight-color: transparent; }
html:root .media-dialog ::selection { background: transparent; }

/* Chat images: every preview is the same square tile; the full photo opens on click. */
html:root button.attachment-media { width: 180px !important; height: 180px !important; flex: 0 0 auto; }
html:root button.attachment-media img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover !important; object-position: center; }
html:root .attachments:has(> button.attachment-media) { display: flex !important; flex-wrap: wrap; gap: 6px !important; }
html:root .msg.staff .attachments:has(> button.attachment-media) { justify-content: flex-end; }
@media (max-width: 760px) { html:root button.attachment-media { width: 160px !important; height: 160px !important; } }

/* Ticket list: status icon (lock / check / unread) centred on the preview line. */
html:root .ticket-item .ticket-time { gap: 10px !important; }
html:root .ticket-item .ticket-time .ticket-unread { margin-top: -3px !important; }

/* Chat images: same height for all, natural width, never cropped. */
html:root button.attachment-media { width: auto !important; height: auto !important; max-width: 100% !important; }
html:root button.attachment-media img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 180px !important; min-height: 0 !important; object-fit: contain !important; }
@media (max-width: 760px) { html:root button.attachment-media img { max-height: 140px !important; } }
html:root .ticket-item .ticket-time .ticket-check { transform: translateY(1.5px); }

/* Login: same look as the panel (black, #202026 borders, Fear logo, accent button). */
html:root #login { background: #000 !important; }
html:root #login .login-card { background: #000 !important; border: 1px solid #202026 !important; border-radius: 16px !important; box-shadow: none !important; padding: 34px 30px 26px !important; }
html:root #login .login-mark { display: none !important; }
html:root #login .login-logo { display: block; width: 56px; height: 56px; margin: 0 auto 16px; object-fit: contain; }
html:root #login .login-title { font-family: Onest, system-ui, sans-serif !important; font-size: 26px !important; font-weight: 800 !important; color: #f2f2f7 !important; }
html:root #login .login-description { color: #b4b4c2 !important; font-weight: 500 !important; }
html:root #login .login-hint { color: #6b6c7c !important; }
html:root #login .login-discord { display: flex !important; align-items: center; justify-content: center; gap: 10px; height: 46px !important; border: 0 !important; border-radius: 12px !important; background: #7b7cf6 !important; color: #fff !important; box-shadow: none !important; outline: none !important; transition: background .15s ease; }
html:root #login .login-discord:hover { background: #8d8ef8 !important; }
html:root #login .login-discord:focus, html:root #login .login-discord:focus-visible { outline: none !important; box-shadow: none !important; }
html:root #login .login-discord svg { display: block !important; width: 20px !important; height: 20px !important; flex: 0 0 20px; color: #fff !important; fill: #fff !important; }
html:root #login .login-terms { color: #5d5e6b !important; }
html:root #login .login-terms a { color: #8a8a9a !important; text-decoration-color: #2a2a38 !important; }
html:root #login .login-terms a:hover { color: #d4d4e0 !important; }
html:root #login .login-hint { margin-bottom: 0 !important; }
html:root #login .login-discord { margin-top: 20px !important; }
html:root #login .login-discord { height: 40px !important; min-height: 40px !important; border-radius: 10px !important; font-size: 14px !important; font-weight: 600 !important; gap: 8px !important; }
html:root #login .login-discord svg { width: 18px !important; height: 18px !important; flex-basis: 18px !important; }

/* Roles v2: label on top, roles as quiet rows with a colour dot. */
html:root:not([data-theme="light"]) body .fear-roles-block { display: flex; flex-direction: column; gap: 8px; }
html:root:not([data-theme="light"]) body .fear-roles-label { color: #6b6c7c; font-size: 12px; font-weight: 600; }
html:root:not([data-theme="light"]) body .fear-roles-list { display: flex; flex-wrap: wrap; gap: 6px; }
html:root:not([data-theme="light"]) body .fear-role-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 10px; border: 1px solid #1c1c27; border-radius: 999px; background: #0a0a10; color: #e6e6ee; font-size: 12.5px; line-height: 1; white-space: nowrap; }
html:root:not([data-theme="light"]) body .fear-role-chip b { font-weight: 600; }
html:root:not([data-theme="light"]) body .fear-role-chip i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
html:root:not([data-theme="light"]) body .fear-role-chip svg { width: 12px; height: 12px; flex: 0 0 12px; }
html:root:not([data-theme="light"]) body .fear-role-chip em { color: #6b6c7c; font-style: normal; font-size: 11.5px; font-weight: 500; }
html:root:not([data-theme="light"]) body .fear-role-chip.staff.active i { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .14); }
html:root:not([data-theme="light"]) body .fear-role-chip.staff.frozen svg { color: #7dd3fc; }
html:root:not([data-theme="light"]) body .fear-role-chip.vip i { background: #a5a6ff; box-shadow: 0 0 0 3px rgba(123, 124, 246, .16); }

/* Roles v3: no label, roles sit right under the name like a job title. */
html:root:not([data-theme="light"]) body .fear-role-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 2px; }
html:root:not([data-theme="light"]) body .fear-role-line.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .fear-role-line .fear-role-chip { height: 24px; padding: 0 10px 0 9px; font-size: 12px; }

/* Roles v4: a Fear tier crown next to the name instead of role chips. */
html:root:not([data-theme="light"]) body .info-profile .info-name { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; max-width: 100%; }
html:root:not([data-theme="light"]) body .info-profile .info-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .fear-crown { display: inline-grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; cursor: default; }
html:root:not([data-theme="light"]) body .fear-crown.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .fear-crown svg { display: block; width: 18px; height: 18px; }
html:root:not([data-theme="light"]) body .fear-crown.premium { color: #4d70ef; }
html:root:not([data-theme="light"]) body .fear-crown.admin { color: #dd4242; }
html:root:not([data-theme="light"]) body .fear-crown.adminplus { color: #f3b92f; }
html:root:not([data-theme="light"]) body .fear-crown.sponsor { color: #7a4deb; }
html:root:not([data-theme="light"]) body .fear-crown.frozen { color: #7dd3fc; }
html:root:not([data-theme="light"]) body .fear-role-line, html:root:not([data-theme="light"]) body .fear-roles-block { display: none !important; }
html:root:not([data-theme="light"]) body .fear-crown.staff { color: #22c55e; }
html:root:not([data-theme="light"]) body .fear-crown.staff.frozen { color: #7dd3fc; }
html:root:not([data-theme="light"]) body .fear-crown.media { color: #4d70ef; }
html:root:not([data-theme="light"]) body .fear-crown.media.frozen { color: #7dd3fc; }
html:root:not([data-theme="light"]) body .fear-crown.staff, html:root:not([data-theme="light"]) body .fear-crown.media { color: #6380ea; }
html:root:not([data-theme="light"]) body .fear-crown.staff.frozen, html:root:not([data-theme="light"]) body .fear-crown.media.frozen { color: #7dd3fc; }
html:root:not([data-theme="light"]) body .fear-crown { flex-basis: 16px; width: 16px; height: 16px; transform: translateY(-2px); }
html:root:not([data-theme="light"]) body .fear-crown svg { width: 16px; height: 16px; }

/* Ticket bans: red counter next to the ticket count, and a bans block in the ticket history. */
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts em { margin-left: 0 !important; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts em:empty { display: none; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn em.th-ban-count { background: rgba(239, 68, 68, .16) !important; color: #fca5a5 !important; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn em.th-ban-count.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .th-bans { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
html:root:not([data-theme="light"]) body .th-section-title { color: #8a8a9a; font-size: 12px; font-weight: 600; margin: 0 2px 2px; }
html:root:not([data-theme="light"]) body .th-ban { padding: 11px 13px; border: 1px solid rgba(239, 68, 68, .22); border-radius: 14px; background: rgba(239, 68, 68, .05); }
html:root:not([data-theme="light"]) body .th-ban-top { display: flex; align-items: center; gap: 8px; }
html:root:not([data-theme="light"]) body .th-ban-top b { color: #fca5a5; font-size: 13.5px; font-weight: 700; }
html:root:not([data-theme="light"]) body .th-ban-state { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: #14141d; color: #8a8a9a; font-size: 11px; font-weight: 600; white-space: nowrap; }
html:root:not([data-theme="light"]) body .th-ban-state.active { background: rgba(239, 68, 68, .14); color: #fca5a5; }
html:root:not([data-theme="light"]) body .th-ban-reason { margin-top: 6px; color: #e6e6ee; font-size: 13px; line-height: 1.4; }
html:root:not([data-theme="light"]) body .th-ban-meta { margin-top: 4px; color: #6b6c7c; font-size: 12px; }

/* Ticket bans in the history timeline: same card as a ticket, a bit tighter, red accent, not clickable. */
.th-item.th-ban-item { cursor: default; border-color: rgba(239, 68, 68, .2) !important; background: #0d0d14; }
.th-item.th-ban-item:hover { border-color: rgba(239, 68, 68, .32) !important; background: #0d0d14 !important; }
.th-item.th-ban-item .th-summary { padding: 9px 13px !important; }
.th-item.th-ban-item .th-top b { color: #fca5a5; font-size: 13px; }
.th-item.th-ban-item .th-meta { margin-top: 6px; gap: 5px; }
.th-item.th-ban-item .th-chip, .th-item.th-ban-item .th-staff { height: 22px; font-size: 11.5px; }
.th-item.th-ban-item .th-chip svg { width: 12px; height: 12px; }
.th-staff.ban { background: rgba(239, 68, 68, .12); }
.th-staff.ban small { color: #fca5a5; }
.th-status.ban.active { background: rgba(239, 68, 68, .14) !important; color: #fca5a5 !important; }
.th-status.ban.past { background: #14141d !important; color: #8a8a9a !important; }
.th-item.th-ban-item .th-ban-reason { margin-top: 6px; color: #d4d4e0; font-size: 12.5px; line-height: 1.4; }
.th-bans, .th-section-title { display: none !important; }
.th-item.th-ban-item .th-top { gap: 8px; min-width: 0; }
.th-item.th-ban-item .th-top b { flex: 0 0 auto; }
.th-item.th-ban-item .th-top .th-ban-reason { flex: 1 1 auto; min-width: 0; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b4b5c6; font-size: 12.5px; font-weight: 500; }
.th-item.th-ban-item .th-top .th-ban-reason::before { content: "·"; margin-right: 6px; color: #4b4c5a; }

/* Frozen admin: clickable snowflake next to the crown, opens the freeze history. */
html:root:not([data-theme="light"]) body .fear-freeze { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; margin: 0 0 0 -2px; padding: 0; border: 0 !important; border-radius: 6px !important; background: transparent !important; color: #7dd3fc; cursor: pointer; box-shadow: none !important; outline: none !important; transform: translateY(-2px); transition: background .15s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .fear-freeze:hover { background: rgba(125, 211, 252, .12) !important; color: #bae6fd; }
html:root:not([data-theme="light"]) body .fear-freeze.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .fear-freeze svg { width: 15px; height: 15px; }
.fz-item { cursor: default; }
.fz-item:hover { background: #0d0d14 !important; }
.fz-item.current-freeze { border-color: rgba(125, 211, 252, .35) !important; }
.fz-item .th-top b { color: #e6e6ee; }
.fz-item.current-freeze .th-top b { color: #7dd3fc; }
.th-status.fz.active { background: rgba(125, 211, 252, .14) !important; color: #7dd3fc !important; }
.th-status.fz.past { background: #14141d !important; color: #8a8a9a !important; }
.fz-item .fz-reason { margin-top: 6px; color: #d4d4e0; font-size: 13px; line-height: 1.4; }
.fz-item .th-meta { margin-top: 8px; }
.fz-item { border: 1px solid #1c1c27 !important; border-radius: 14px; background: #0d0d14; overflow: hidden; }
.fz-item + .fz-item { margin-top: 8px; }
.fz-item .th-summary { display: block; padding: 13px 14px !important; }
.fz-item .th-top { display: flex; align-items: center; gap: 8px; }
.fz-item .th-status { margin-left: auto; padding: 2px 8px; border-radius: 6px; font-size: 11px !important; font-weight: 600; }
.fz-item .th-meta { display: flex; flex-wrap: wrap; gap: 6px; }
/* Freeze cards: compact like ban cards, reason in the title line. */
.fz-item .th-summary { padding: 9px 13px !important; }
.fz-item .th-top { min-width: 0; }
.fz-item .th-top b { flex: 0 0 auto; font-size: 13px; }
.fz-item .th-top .fz-reason { flex: 1 1 auto; min-width: 0; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b4b5c6; font-size: 12.5px; font-weight: 500; }
.fz-item .th-top .fz-reason::before { content: "·"; margin-right: 6px; color: #4b4c5a; }
.fz-item .th-meta { margin-top: 6px !important; gap: 5px !important; }
.fz-item .th-chip { height: 22px; font-size: 11.5px; }
.fz-item .th-chip svg { width: 12px; height: 12px; }
html:root:not([data-theme="light"]) body .fear-freeze svg { width: 17px; height: 17px; filter: drop-shadow(0 0 3px rgba(125, 211, 252, .45)); }
html:root:not([data-theme="light"]) body .fear-freeze { color: #8fdcfd; }
.fz-item .th-chip b { margin-left: 3px; color: #e6e6ee; font-weight: 600; }
/* Every player message uses the same bubble as site messages. */
html:root:not([data-theme="light"]) body .msg.user .msg-bubble { background: #171719 !important; border-color: #202026 !important; }
/* Ticket list scrollbar sits in its own lane next to the cards, never over them. */
html:root:not([data-theme="light"]) body #ticket-list { scrollbar-gutter: stable; padding-right: 6px !important; margin-right: -4px !important; }
html:root:not([data-theme="light"]) body #ticket-list::-webkit-scrollbar { width: 4px; }
html:root:not([data-theme="light"]) body #ticket-list::-webkit-scrollbar-track { background: transparent; }
html:root:not([data-theme="light"]) body #ticket-list::-webkit-scrollbar-thumb { background: #2a2a38; border-radius: 4px; }

/* Punishment history: Bans / Mutes sub-tabs, compact cards like the ticket history. */
.ph-tabs { display: flex; gap: 4px; margin: 2px 0 12px; padding: 3px; border: 1px solid #1c1c27; border-radius: 12px; background: #0a0a10; }
.ph-tabs button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #8a8a9a; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: none !important; outline: none !important; transition: background .15s ease, color .15s ease; }
.ph-tabs button:hover { color: #e6e6ee; }
.ph-tabs button.active { background: #16161f !important; color: #fff; }
.ph-tabs button em { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #1c1c27; color: #b4b5c6; font-size: 11px; font-style: normal; font-weight: 600; line-height: 18px; text-align: center; }
.ph-tabs button em:empty { display: none; }
.ph-item { cursor: default; border: 1px solid #1c1c27 !important; border-radius: 14px; background: #0d0d14; overflow: hidden; }
.ph-item + .ph-item { margin-top: 8px; }
.ph-item:hover { background: #0d0d14 !important; }
.ph-item.active { border-color: rgba(239, 68, 68, .28) !important; }
.ph-item .th-summary { display: block; padding: 9px 13px !important; }
.ph-item .th-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ph-item .th-top b { flex: 0 0 auto; color: #e6e6ee; font-size: 13px; }
.ph-item.active .th-top b { color: #fca5a5; }
.ph-item .ph-reason { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b4b5c6; font-size: 12.5px; font-weight: 500; }
.ph-item .ph-reason::before { content: "·"; margin-right: 6px; color: #4b4c5a; }
.ph-item .th-status { flex: 0 0 auto; margin-left: auto; padding: 2px 8px; border-radius: 6px; font-size: 11px !important; font-weight: 600; }
.th-status.ph.active { background: rgba(239, 68, 68, .14) !important; color: #fca5a5 !important; }
.th-status.ph.expired, .th-status.ph.revoked { background: #14141d !important; color: #8a8a9a !important; }
.ph-item .th-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ph-item .th-chip { height: 22px; font-size: 11.5px; }
.ph-item .th-chip svg { width: 12px; height: 12px; }
.ph-item .th-chip b { margin-left: 3px; color: #e6e6ee; font-weight: 600; }
/* Ticket list scrollbar: hidden at rest, shown only while scrolling. */
html:root:not([data-theme="light"]) body #ticket-list:not(.is-scrolling)::-webkit-scrollbar-thumb { background: transparent !important; }
html:root:not([data-theme="light"]) body #ticket-list.is-scrolling::-webkit-scrollbar-thumb { background: #2a2a38 !important; }
@supports not selector(::-webkit-scrollbar) { html:root:not([data-theme="light"]) body #ticket-list { scrollbar-color: transparent transparent; scrollbar-width: thin; } html:root:not([data-theme="light"]) body #ticket-list.is-scrolling { scrollbar-color: #2a2a38 transparent; } }
/* Count pills on every profile button look the same as on Ticket history. */
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts em { margin-left: 0 !important; padding: 1px 7px; border-radius: 999px; background: #1c1c27; color: #c4c5d4; font-size: 11px; font-style: normal; font-weight: 600; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts em.th-ban-count { background: rgba(239, 68, 68, .16) !important; color: #fca5a5 !important; }
/* Chat scrollbar: same as the ticket list, thin and visible only while scrolling. */
html:root:not([data-theme="light"]) body #messages { scrollbar-gutter: stable; }
html:root:not([data-theme="light"]) body #messages::-webkit-scrollbar { width: 4px; }
html:root:not([data-theme="light"]) body #messages::-webkit-scrollbar-track { background: transparent !important; }
html:root:not([data-theme="light"]) body #messages:not(.is-scrolling)::-webkit-scrollbar-thumb { background: transparent !important; }
html:root:not([data-theme="light"]) body #messages.is-scrolling::-webkit-scrollbar-thumb { background: #2a2a38 !important; border-radius: 4px; }
@supports not selector(::-webkit-scrollbar) { html:root:not([data-theme="light"]) body #messages { scrollbar-color: transparent transparent; scrollbar-width: thin; } html:root:not([data-theme="light"]) body #messages.is-scrolling { scrollbar-color: #2a2a38 transparent; } }
/* All panel scrollbars: thin, invisible at rest, shown only while scrolling. */
html:root:not([data-theme="light"]) body *::-webkit-scrollbar { width: 4px; height: 4px; }
html:root:not([data-theme="light"]) body *::-webkit-scrollbar-track { background: transparent !important; }
html:root:not([data-theme="light"]) body *:not(.is-scrolling)::-webkit-scrollbar-thumb { background: transparent !important; }
html:root:not([data-theme="light"]) body .is-scrolling::-webkit-scrollbar-thumb { background: #2a2a38 !important; border-radius: 4px; }
@supports not selector(::-webkit-scrollbar) { html:root:not([data-theme="light"]) body * { scrollbar-width: thin; scrollbar-color: transparent transparent; } html:root:not([data-theme="light"]) body .is-scrolling { scrollbar-color: #2a2a38 transparent; } }
/* Page-level scrollbar (narrow screens): same behaviour as the panel areas. */
html:root:not([data-theme="light"])::-webkit-scrollbar { width: 4px; height: 4px; }
html:root:not([data-theme="light"])::-webkit-scrollbar-track { background: transparent !important; }
html:root:not([data-theme="light"]):not(.is-scrolling)::-webkit-scrollbar-thumb { background: transparent !important; }
html:root:not([data-theme="light"]).is-scrolling::-webkit-scrollbar-thumb { background: #2a2a38 !important; border-radius: 4px; }
@supports not selector(::-webkit-scrollbar) { html:root:not([data-theme="light"]) { scrollbar-width: thin; scrollbar-color: transparent transparent; } html:root:not([data-theme="light"]).is-scrolling { scrollbar-color: #2a2a38 transparent; } }
/* Chat header: the "show profile" arrow sits to the right of Close ticket. */
html:root:not([data-theme="light"]) body .chat-actions #close-btn { order: 1; }
html:root:not([data-theme="light"]) body .chat-actions #info-btn { order: 2; }
/* Inline message edit: compact, sized like the bubble, quiet border, small hint. */
html:root:not([data-theme="light"]) body .inline-edit { width: auto !important; min-width: 220px; max-width: min(520px, 100%); padding: 7px 12px 6px !important; border: 1px solid #2a2a38 !important; border-radius: 14px !important; background: #121219 !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .inline-edit:focus-within { border-color: rgba(123, 124, 246, .55) !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .msg.staff .inline-edit { margin-left: auto; }
html:root:not([data-theme="light"]) body .inline-edit .inline-edit-text { min-height: 20px !important; font-size: 14px !important; line-height: 1.45 !important; }
html:root:not([data-theme="light"]) body .inline-edit .inline-edit-hint { margin-top: 4px !important; padding-top: 0 !important; border-top: 0 !important; color: #5d5e6b !important; font-size: 10.5px !important; }
html:root:not([data-theme="light"]) body .inline-edit .inline-edit-hint button { color: #9a9bf8 !important; }
/* Profile column show/hide: one smooth slide. The content keeps its width while the column
   narrows (no reflow jump) and fades together with the width. */
@media (min-width: 1101px) {
  html:root body:not(.info-open) .layout > #info { transition: width .32s cubic-bezier(.4, 0, .2, 1), min-width .32s cubic-bezier(.4, 0, .2, 1), max-width .32s cubic-bezier(.4, 0, .2, 1), margin-left .32s cubic-bezier(.4, 0, .2, 1), padding .32s cubic-bezier(.4, 0, .2, 1), opacity .28s ease, transform .32s cubic-bezier(.4, 0, .2, 1) !important; }
  html:root body:not(.info-open) .layout > #info > .info-body { width: var(--info-w, 300px) !important; min-width: var(--info-w, 300px) !important; }
  html:root body.info-hidden .layout > #info { transform: translateX(16px) !important; }
  html:root body.layout-resizing .layout > #info { transition: none !important; }
}
@media (min-width: 1101px) { html:root body:not(.info-open) .layout > #info { max-width: 600px !important; } html:root body.info-hidden:not(.info-open) .layout > #info { width: 0 !important; min-width: 0 !important; padding: 0 !important; border-width: 0 !important; opacity: 0 !important; pointer-events: none; } }
/* Stats period picker: plain text with a chevron, no pill around it. */
html:root:not([data-theme="light"]) body .stats-period .styled-select { width: auto !important; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-trigger { display: inline-flex !important; align-items: center; justify-content: flex-start; gap: 6px; width: auto !important; height: 34px !important; padding: 0 4px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; color: #e6e6ee; font-size: 13.5px !important; font-weight: 600 !important; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-trigger:hover { color: #fff; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-trigger:focus, html:root:not([data-theme="light"]) body .stats-period .styled-select-trigger:focus-visible { outline: none !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-arrow { display: inline-grid !important; place-items: center; flex: 0 0 16px; width: 16px !important; height: 16px; margin: 0 !important; position: static !important; color: #8a8a9a; transition: transform .15s ease; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-arrow svg { display: block !important; width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .stats-period .styled-select-trigger[aria-expanded="true"] .styled-select-arrow { transform: rotate(180deg); }
/* Message search lives inside the chat header, between the name and the buttons on the right. */
html:root:not([data-theme="light"]) body .chat-head > .chat-search { position: static !important; display: flex !important; flex: 1 1 auto; align-items: center; gap: 6px; min-width: 0; height: 36px; margin: 0 10px 0 14px; padding: 0 6px 0 12px !important; border: 1px solid #202026 !important; border-radius: 10px !important; background: #0a0a10 !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search:focus-within { border-color: rgba(123, 124, 246, .55) !important; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search input { flex: 1 1 auto; min-width: 0; height: 100% !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; color: #e6e6ee; font-size: 13.5px; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search input::-webkit-search-cancel-button { display: none; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search .chat-search-count { flex: 0 0 auto; color: #6b6c7c; font-size: 12px; white-space: nowrap; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search .chat-search-count:empty { display: none; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search #chat-search-close { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; border: 0 !important; border-radius: 7px !important; background: transparent !important; color: #8a8a9a; font-size: 18px; line-height: 1; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search #chat-search-close:hover { background: rgba(255, 255, 255, .06) !important; color: #fff; }
html:root:not([data-theme="light"]) body .chat-head:has(> .chat-search:not(.hidden)) .chat-actions { margin-left: 0 !important; }
/* Message search: fully rounded pill like the reply box, with a search icon and a round close button. */
html:root:not([data-theme="light"]) body .chat-head > .chat-search { height: 36px; padding: 0 5px 0 14px !important; border-radius: 999px !important; border-color: #24242e !important; background: #0b0b11 !important; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search:focus-within { border-color: rgba(123, 124, 246, .45) !important; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search::before { content: ''; flex: 0 0 14px; width: 14px; height: 14px; margin-right: 2px; background: #6b6c7c; -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.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%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.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") center / contain no-repeat; }
html:root:not([data-theme="light"]) body .chat-head > .chat-search #chat-search-close { flex-basis: 26px; width: 26px; height: 26px; border-radius: 50% !important; }
/* Notes: editing happens in place; the edited note is replaced by the form, the rest stay. */
html:root:not([data-theme="light"]) body .notes-list .note-item.editing { display: none !important; }
html:root:not([data-theme="light"]) body .notes-list > .note-form { margin: 0 !important; }
html:root:not([data-theme="light"]) body .notes-list > .note-form + .note-item, html:root:not([data-theme="light"]) body .notes-list > .note-item + .note-form { margin-top: 8px; }
html:root:not([data-theme="light"]) body .notes-section > .note-form:not(.hidden) + .notes-list { margin-top: 8px; }
/* Message actions: pencil and trash icons instead of the text buttons, same as notes. */
html:root:not([data-theme="light"]) body .msg-actions { gap: 2px; }
html:root:not([data-theme="light"]) body .msg-actions .msg-action.icon { display: inline-grid !important; place-items: center; width: 28px !important; height: 28px !important; padding: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #6b6c7c !important; font-size: 0 !important; }
html:root:not([data-theme="light"]) body .msg-actions .msg-action.icon svg { width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .msg-actions .msg-action.icon:hover { background: rgba(255, 255, 255, .06) !important; color: #e6e6ee !important; }
html:root:not([data-theme="light"]) body .msg-actions .msg-action.icon.delete:hover { color: #f87171 !important; }
/* Ticket list check mark in the panel accent colour instead of green. */
html:root:not([data-theme="light"]) body .ticket-item .ticket-time .ticket-check { color: #7b7cf6 !important; }
/* People filter: show that everyone is selected when no one specific is picked. */
html:root:not([data-theme="light"]) body #people-trigger .people-all-tag { display: none !important; margin-left: -2px; color: #c4c5d4; font-size: 12px; font-weight: 600; }
html:root:not([data-theme="light"]) body #people-trigger.all-people .people-all-tag { display: inline !important; }
html:root:not([data-theme="light"]) body .people-row.people-all .people-all-icon { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: rgba(123, 124, 246, .14); color: #aeb0ff; }
html:root:not([data-theme="light"]) body .people-row.people-all .people-all-icon svg { width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .people-row.people-all .people-check { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; color: #7b7cf6; }
html:root:not([data-theme="light"]) body .people-row.people-all { margin-bottom: 4px; }
html:root:not([data-theme="light"]) body .people-row.people-all:not(.active) .people-check { display: none; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn { white-space: nowrap; min-width: 0; }
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts { flex: 0 0 auto; }
/* Site tickets: Discord line under the SteamID, then the Fear profile link. */
html:root:not([data-theme="light"]) body #fear-links { display: flex; flex-direction: column; align-items: center; gap: 2px; }
html:root:not([data-theme="light"]) body #fear-links .fear-discord-line { margin: 0 !important; }
html:root:not([data-theme="light"]) body #fear-links .fear-discord-line.fear-unlinked { color: #6b6c7c; font-size: 12.5px; line-height: 1.4; }
/* Site ticket without Discord: hide the repeated @username and pull the SteamID up to the name. */
html:root:not([data-theme="light"]) body .info-profile.no-discord .info-username { display: none !important; }
html:root:not([data-theme="light"]) body .info-profile.no-discord .info-name + .info-copy, html:root:not([data-theme="light"]) body .info-profile.no-discord .info-name + .info-id { margin-top: 2px !important; }
html:root:not([data-theme="light"]) body .info-profile.no-discord > .info-copy:not(.fear-discord-line), html:root:not([data-theme="light"]) body .info-profile.no-discord > .info-id:not(.fear-discord-line) { margin-top: 3px !important; }
/* Discord line now sits above the SteamID. */
html:root:not([data-theme="light"]) body .info-profile > .fear-discord-line { display: block; margin: 3px 0 0 !important; text-align: center; }
html:root:not([data-theme="light"]) body .info-profile > .fear-discord-line.fear-unlinked { color: #6b6c7c; font-size: 12.5px; line-height: 1.4; }
html:root:not([data-theme="light"]) body .info-profile > .fear-discord-line + .info-copy, html:root:not([data-theme="light"]) body .info-profile > .fear-discord-line + .info-id { margin-top: 1px !important; }
/* Discord ID sits right under @username. */
html:root:not([data-theme="light"]) body .info-profile > .info-username + .info-copy, html:root:not([data-theme="light"]) body .info-profile > .info-username + .info-id { margin-top: 4px !important; }
/* Staff section: grant-access form opens above the list. */
html:root:not([data-theme="light"]) body #access-form.access-form-card { margin-bottom: 14px; }
/* Grant-access form: compact, same width as the staff list. */
html:root:not([data-theme="light"]) body #access-form.access-form-card { box-sizing: border-box; width: 100%; max-width: 900px; margin: 0 0 12px !important; padding: 14px 16px !important; display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px 12px !important; border-radius: 14px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card:not(.hidden) { display: grid !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card.hidden { display: none !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card > strong { grid-column: 1 / -1; font-size: 14px; }
html:root:not([data-theme="light"]) body #access-form.access-form-card > label { margin: 0 !important; gap: 5px !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card > label input { height: 36px !important; min-height: 36px !important; padding: 0 12px !important; font-size: 13px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-label { display: none !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-choices { grid-column: 1 / -1; display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; margin: 0 !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-choice { width: auto !important; flex: 0 0 auto !important; min-height: 0 !important; height: 32px !important; padding: 0 12px !important; gap: 7px !important; border-radius: 9px !important; font-size: 12.5px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-choice b { font-size: 12.5px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-choice i { width: 13px !important; height: 13px !important; flex: 0 0 13px !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .role-choice.disabled { display: none !important; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .admin-form-note { grid-column: 1; align-self: center; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; color: #6b6c7c !important; font-size: 12px !important; line-height: 1.4; }
html:root:not([data-theme="light"]) body #access-form.access-form-card > .primary-btn { grid-column: 2; justify-self: end; width: auto !important; height: 34px !important; min-height: 34px !important; padding: 0 18px !important; margin: 0 !important; border-radius: 10px !important; font-size: 13px !important; }
/* Staff rows: role, edit and remove pinned to the right edge. */
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row { grid-template-columns: 32px minmax(0, 1fr) 176px 108px 38px !important; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row > .admin-slot, html:root:not([data-theme="light"]) body #admin-staff-list .staff-row > .admin-remove { grid-column: 5; justify-self: end; }
/* Staff rows: direction and title dropdowns instead of role pills and the edit button. */
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row { grid-template-columns: 32px minmax(0, 1fr) 190px 220px 38px !important; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row > .admin-slot, html:root:not([data-theme="light"]) body #admin-staff-list .staff-row > .admin-remove { grid-column: 5; justify-self: end; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .staff-cell { min-width: 0; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select { width: 100%; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-trigger { width: 100%; height: 38px; padding: 0 12px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #1c1c27 !important; border-radius: 10px !important; background: #0a0a10 !important; color: #e6e6ef !important; font-size: 13px; font-weight: 600; cursor: pointer; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-trigger:hover { border-color: #2a2a38 !important; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-trigger[aria-expanded="true"] { border-color: rgba(123, 124, 246, .55) !important; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-arrow { display: inline-flex; color: #8a8b9c; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-arrow svg { width: 14px; height: 14px; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-menu { min-width: 100%; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .staff-fixed { display: flex; align-items: center; height: 38px; padding: 0 14px; color: #8a8b9c; font-size: 13px; font-weight: 600; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .admin-list-main small { color: #6b6c7c; }
/* Grant-access form: direction and title pickers. */
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick-row > span { flex: 0 0 112px; white-space: nowrap; color: #8a8b9c; font-size: 12px; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick { display: flex; flex-wrap: wrap; gap: 6px; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick button { height: 32px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 9px; background: #0a0a10; color: #c4c5d4; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick button:hover { border-color: #2a2a38; }
html:root:not([data-theme="light"]) body #access-form.access-form-card .staff-pick button.selected { border-color: rgba(123, 124, 246, .6); background: rgba(123, 124, 246, .12); color: #fff; }
html:root:not([data-theme="light"]) body #access-form.access-form-card > .primary-btn { grid-column: 1 / -1 !important; justify-self: end; }
/* Staff activity (GitHub-style grid), opened from the stats board. */
html:root:not([data-theme="light"]) body .lb-activity-open { cursor: pointer; border-radius: 8px; }
html:root:not([data-theme="light"]) body .lb-activity-open:hover b { color: #aeb0ff; }
html:root:not([data-theme="light"]) body #act-dialog .modal-card { width: min(860px, calc(100vw - 32px)) !important; max-width: none !important; }
html:root:not([data-theme="light"]) body #act-dialog .act-who { display: flex; align-items: center; gap: 10px; }
html:root:not([data-theme="light"]) body #act-dialog .act-who span { display: flex; flex-direction: column; }
html:root:not([data-theme="light"]) body #act-dialog .act-who b { color: #fff; font-size: 15px; }
html:root:not([data-theme="light"]) body #act-dialog .act-who small { color: #6b6c7c; font-size: 12px; }
html:root:not([data-theme="light"]) body #act-dialog .act-tabs { display: flex; gap: 6px; margin: 14px 0 8px; }
html:root:not([data-theme="light"]) body #act-dialog .act-tabs button { height: 30px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 9px; background: #0a0a10; color: #8a8b9c; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html:root:not([data-theme="light"]) body #act-dialog .act-tabs button.active { border-color: rgba(123, 124, 246, .6); background: rgba(123, 124, 246, .12); color: #fff; }
html:root:not([data-theme="light"]) body #act-dialog .act-total { margin: 14px 0 10px; color: #8a8b9c; font-size: 13px; }
html:root:not([data-theme="light"]) body #act-dialog .act-total b { color: #fff; }
html:root:not([data-theme="light"]) body #act-dialog .act-body { position: relative; }
html:root:not([data-theme="light"]) body #act-dialog .act-scroll { overflow-x: auto; padding: 4px 2px 6px; border: 1px solid #1c1c27; border-radius: 12px; background: #0a0a10; padding: 14px; }
html:root:not([data-theme="light"]) body #act-dialog .act-grid-wrap { width: max-content; }
html:root:not([data-theme="light"]) body #act-dialog .act-months { position: relative; height: 16px; margin-left: 26px; color: #6b6c7c; font-size: 11px; }
html:root:not([data-theme="light"]) body #act-dialog .act-months span { position: absolute; top: 0; }
html:root:not([data-theme="light"]) body #act-dialog .act-grid-row { display: flex; gap: 4px; }
html:root:not([data-theme="light"]) body #act-dialog .act-days { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; width: 22px; color: #6b6c7c; font-size: 10px; line-height: 11px; }
html:root:not([data-theme="light"]) body #act-dialog .act-grid { display: flex; gap: 3px; }
html:root:not([data-theme="light"]) body #act-dialog .act-week { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell { display: block; width: 11px; height: 11px; border-radius: 3px; background: #15151d; outline: 1px solid rgba(255, 255, 255, .03); outline-offset: -1px; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell.act-empty { background: transparent; outline: 0; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell.l1 { background: #2c2d5c; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell.l2 { background: #474899; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell.l3 { background: #6566d6; }
html:root:not([data-theme="light"]) body #act-dialog .act-cell.l4 { background: #9a9bff; }
html:root:not([data-theme="light"]) body #act-dialog .act-grid .act-cell[data-tip]:hover { outline: 1px solid rgba(255, 255, 255, .5); }
html:root:not([data-theme="light"]) body #act-dialog .act-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 8px; color: #6b6c7c; font-size: 11px; }
html:root:not([data-theme="light"]) body #act-dialog .act-legend span { margin: 0 4px; }
html:root:not([data-theme="light"]) body #act-dialog .act-tip { position: absolute; z-index: 5; padding: 5px 9px; border: 1px solid #202026; border-radius: 7px; background: #1a1a24; color: #e6e6ef; font-size: 12px; white-space: nowrap; pointer-events: none; }
/* Activity summary: two small stat blocks instead of one text line. */
html:root:not([data-theme="light"]) body #act-dialog .act-total { display: flex; align-items: stretch; gap: 0; margin: 16px 0 12px !important; }
html:root:not([data-theme="light"]) body #act-dialog .act-stat { display: flex; flex-direction: column; gap: 3px; padding: 0 22px; border-left: 1px solid #1c1c27; }
html:root:not([data-theme="light"]) body #act-dialog .act-stat:first-child { padding-left: 0; border-left: 0; }
html:root:not([data-theme="light"]) body #act-dialog .act-stat b { color: #fff; font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
html:root:not([data-theme="light"]) body #act-dialog .act-stat:first-child b { color: #aeb0ff; }
html:root:not([data-theme="light"]) body #act-dialog .act-stat span { color: #6b6c7c; font-size: 12px; line-height: 1.3; }
/* Activity stats: number centred over its caption. */
html:root:not([data-theme="light"]) body #act-dialog .act-stat { align-items: center; text-align: center; }
/* Profile settings: panel theme, visible input fields. */
html:root:not([data-theme="light"]) body .settings-narrow .settings-profile-card, html:root:not([data-theme="light"]) body #profile-form.settings-card { background: #0a0a10 !important; border: 1px solid #1c1c27 !important; border-radius: 16px !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .settings-narrow .settings-profile-card { padding: 20px 22px !important; align-items: center; }
html:root:not([data-theme="light"]) body .settings-profile-card .profile-avatar-info strong { color: #fff; font-size: 16px; }
html:root:not([data-theme="light"]) body .settings-profile-card .profile-avatar-info span { color: #6b6c7c; font-size: 12.5px; }
html:root:not([data-theme="light"]) body .settings-profile-card .avatar-upload-btn { background: #7b7cf6 !important; color: #fff !important; box-shadow: 0 0 0 3px #0a0a10 !important; }
html:root:not([data-theme="light"]) body #profile-form { gap: 18px !important; padding: 22px !important; }
html:root:not([data-theme="light"]) body #profile-form label { gap: 8px !important; color: #c4c5d4 !important; font-size: 12.5px !important; font-weight: 600 !important; }
html:root:not([data-theme="light"]) body #profile-form input { height: 42px !important; padding: 0 14px !important; border: 1px solid #23232f !important; border-radius: 11px !important; background: #050508 !important; color: #f2f2f7 !important; font-size: 14px !important; outline: none !important; box-shadow: none !important; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
html:root:not([data-theme="light"]) body #profile-form input::placeholder { color: #4d4e5c !important; }
html:root:not([data-theme="light"]) body #profile-form input:hover:not(:disabled) { border-color: #30303f !important; }
html:root:not([data-theme="light"]) body #profile-form input:focus:not(:disabled) { border-color: rgba(123, 124, 246, .7) !important; box-shadow: 0 0 0 3px rgba(123, 124, 246, .16) !important; background: #07070c !important; }
html:root:not([data-theme="light"]) body #profile-form input:disabled { border-style: dashed !important; border-color: #1f1f2a !important; background: transparent !important; color: #6b6c7c !important; cursor: default; -webkit-text-fill-color: #6b6c7c; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-lock { position: relative; display: block; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-lock input { width: 100%; padding-right: 40px !important; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-lock svg { position: absolute; top: 50%; right: 14px; width: 15px; height: 15px; transform: translateY(-50%); color: #4d4e5c; pointer-events: none; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-hint { margin-top: -2px; color: #4d4e5c; font-size: 11.5px; font-weight: 400; }
html:root:not([data-theme="light"]) body #profile-form .primary-btn { align-self: flex-end; width: auto !important; height: 38px !important; min-height: 38px !important; padding: 0 22px !important; margin-top: 2px; border-radius: 10px !important; background: #7b7cf6 !important; font-size: 13.5px !important; }
html:root:not([data-theme="light"]) body #profile-form .primary-btn:hover { background: #8a8bff !important; }
/* Profile settings: compact fields and tighter spacing. */
html:root:not([data-theme="light"]) body .settings-narrow { gap: 12px !important; }
html:root:not([data-theme="light"]) body .settings-narrow .settings-profile-card { padding: 16px 18px !important; }
html:root:not([data-theme="light"]) body #profile-form { gap: 12px !important; padding: 16px 18px !important; }
html:root:not([data-theme="light"]) body #profile-form label { gap: 6px !important; font-size: 12px !important; }
html:root:not([data-theme="light"]) body #profile-form input { height: 36px !important; min-height: 36px !important; padding: 0 12px !important; border-radius: 9px !important; font-size: 13px !important; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-lock input { padding-right: 36px !important; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-lock svg { right: 12px; width: 14px; height: 14px; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-hint { margin-top: -1px; font-size: 11px; }
html:root:not([data-theme="light"]) body #profile-form .primary-btn { height: 34px !important; min-height: 34px !important; padding: 0 18px !important; margin-top: 0; border-radius: 9px !important; font-size: 13px !important; }
/* Profile form: Save button sits beside the Discord ID hint, no empty row above it. */
html:root:not([data-theme="light"]) body #profile-form .primary-btn { margin-top: -38px !important; }
html:root:not([data-theme="light"]) body #profile-form label:has(.profile-field-hint) { padding-right: 0; }
html:root:not([data-theme="light"]) body #profile-form .profile-field-hint { max-width: calc(100% - 140px); min-height: 34px; display: flex; align-items: center; margin-top: 0; }
/* Binds: same look as the profile form; muted red reset button. */
html:root:not([data-theme="light"]) body .settings-stack { gap: 14px !important; }
html:root:not([data-theme="light"]) body .settings-stack section > strong { display: block; margin-bottom: 0; color: #c4c5d4; font-size: 12.5px; font-weight: 600; }
html:root:not([data-theme="light"]) body .bind-row { min-height: 0 !important; padding: 12px 14px !important; gap: 10px !important; background: #0a0a10 !important; border: 1px solid #1c1c27 !important; border-radius: 14px !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .bind-row .bind-capture { height: 36px; padding: 0 12px !important; border: 1px solid #23232f !important; border-radius: 9px !important; background: #050508 !important; color: #f2f2f7 !important; font-size: 13px !important; font-weight: 600; transition: border-color .15s ease, box-shadow .15s ease; }
html:root:not([data-theme="light"]) body .bind-row .bind-capture:hover { border-color: #30303f !important; background: #050508 !important; }
html:root:not([data-theme="light"]) body .bind-row .bind-capture.capturing, html:root:not([data-theme="light"]) body .bind-row .bind-capture:focus-visible { border-color: rgba(123, 124, 246, .7) !important; box-shadow: 0 0 0 3px rgba(123, 124, 246, .16) !important; background: #07070c !important; outline: none; }
html:root:not([data-theme="light"]) body .bind-row .bind-capture.muted-bind { border-style: dashed !important; color: #6b6c7c !important; font-weight: 500; }
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset] { flex: 0 0 auto; height: 36px !important; min-height: 36px !important; padding: 0 16px !important; border: 1px solid rgba(221, 66, 66, .28) !important; border-radius: 9px !important; background: rgba(221, 66, 66, .12) !important; color: #e07a7a !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:hover { background: rgba(221, 66, 66, .2) !important; border-color: rgba(221, 66, 66, .45) !important; color: #f09595 !important; }
html:root:not([data-theme="light"]) body .settings-stack section { gap: 8px !important; }
/* Binds reset: neutral by default, red outline only on hover; no purple focus ring after a click. */
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset] { border: 1px solid #23232f !important; background: transparent !important; color: #8a8b9c !important; outline: none !important; }
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:hover, html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:focus-visible { border-color: rgba(221, 66, 66, .55) !important; background: rgba(221, 66, 66, .1) !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:focus:not(:focus-visible) { box-shadow: none !important; outline: none !important; }
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:active { background: rgba(221, 66, 66, .16) !important; }
/* Binds reset: white label; stays white on hover with the red outline. */
html:root:not([data-theme="light"]) body .bind-row [data-bind-reset], html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:hover, html:root:not([data-theme="light"]) body .bind-row [data-bind-reset]:focus-visible { color: #fff !important; }
/* Panel opacity: main panels and the top bar use the theme background at the chosen opacity. */
html:root:not([data-theme="light"]) body .layout > .panel, html:root:not([data-theme="light"]) body .layout > .sidebar, html:root:not([data-theme="light"]) body .layout > .chat, html:root:not([data-theme="light"]) body .layout > .info, html:root:not([data-theme="light"]) body .panel, html:root:not([data-theme="light"]) body .topbar { background: var(--panel-bg, var(--bg)) !important; background-color: var(--panel-bg, var(--bg)) !important; }
/* Notification sounds: five small cards, click plays and selects. */
html:root:not([data-theme="light"]) body .sound-options { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px !important; }
html:root:not([data-theme="light"]) body .sound-options .sound-choice { display: flex !important; align-items: center; gap: 9px; height: 42px; min-height: 0 !important; padding: 0 14px !important; border: 1px solid #1c1c27 !important; border-radius: 11px !important; background: #0a0a10 !important; color: #c4c5d4 !important; font-size: 13px !important; font-weight: 600; text-align: left; }
html:root:not([data-theme="light"]) body .sound-options .sound-choice svg { flex: 0 0 16px; width: 16px; height: 16px; color: #6b6c7c; }
html:root:not([data-theme="light"]) body .sound-options .sound-choice:hover { border-color: #2a2a38 !important; }
html:root:not([data-theme="light"]) body .sound-options .sound-choice.selected { border-color: rgba(123, 124, 246, .6) !important; background: rgba(123, 124, 246, .12) !important; color: #fff !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .sound-options .sound-choice.selected svg { color: #aeb0ff; }
html:root:not([data-theme="light"]) body .sound-hint { display: block; margin-top: 8px; color: #6b6c7c; font-size: 12px; }
html:root:not([data-theme="light"]) body .customization-save { display: flex; justify-content: flex-end; }
html:root:not([data-theme="light"]) body .customization-save .primary-btn { width: auto !important; height: 36px !important; min-height: 36px !important; padding: 0 20px !important; border-radius: 10px !important; font-size: 13px !important; }
/* Personal replies: panel theme, visible inputs (same as the profile form). */
html:root:not([data-theme="light"]) body .settings-stack > .token-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 14px !important; background: #0a0a10 !important; border: 1px solid #1c1c27 !important; border-radius: 14px !important; color: #8a8b9c !important; font-size: 12.5px; }
html:root:not([data-theme="light"]) body .settings-stack > .token-note code { padding: 2px 7px; border: 1px solid rgba(123, 124, 246, .25); border-radius: 6px; background: rgba(123, 124, 246, .1); color: #aeb0ff; font-size: 11.5px; }
html:root:not([data-theme="light"]) body #personal-form { gap: 10px !important; padding: 16px 18px !important; background: #0a0a10 !important; border: 1px solid #1c1c27 !important; border-radius: 16px !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body #personal-form .settings-form-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px !important; }
html:root:not([data-theme="light"]) body #personal-form input[name=title], html:root:not([data-theme="light"]) body #personal-form textarea, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { box-sizing: border-box; width: 100%; border: 1px solid #23232f !important; border-radius: 9px !important; background: #050508 !important; color: #f2f2f7 !important; font-size: 13px !important; box-shadow: none !important; outline: none !important; transition: border-color .15s ease, box-shadow .15s ease; }
html:root:not([data-theme="light"]) body #personal-form input[name=title], html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { height: 36px !important; min-height: 36px !important; padding: 0 12px !important; }
html:root:not([data-theme="light"]) body #personal-form textarea { min-height: 84px; padding: 10px 12px !important; line-height: 1.45; resize: vertical; }
html:root:not([data-theme="light"]) body #personal-form input::placeholder, html:root:not([data-theme="light"]) body #personal-form textarea::placeholder { color: #4d4e5c !important; }
html:root:not([data-theme="light"]) body #personal-form input[name=title]:hover, html:root:not([data-theme="light"]) body #personal-form textarea:hover, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey:hover { border-color: #30303f !important; }
html:root:not([data-theme="light"]) body #personal-form input[name=title]:focus, html:root:not([data-theme="light"]) body #personal-form textarea:focus, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey.capturing { border-color: rgba(123, 124, 246, .7) !important; box-shadow: 0 0 0 3px rgba(123, 124, 246, .16) !important; background: #07070c !important; }
html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { display: flex; align-items: center; color: #8a8b9c !important; font-weight: 500; text-align: left; border-style: dashed !important; }
html:root:not([data-theme="light"]) body #personal-form .form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
html:root:not([data-theme="light"]) body #personal-form .form-bottom small { color: #4d4e5c; font-size: 11.5px; }
html:root:not([data-theme="light"]) body #personal-form .form-bottom .primary-btn { width: auto !important; height: 34px !important; min-height: 34px !important; padding: 0 18px !important; border-radius: 9px !important; font-size: 13px !important; }
/* Personal replies: "+ Добавить ответ" in the header opens the form. */
html:root:not([data-theme="light"]) body #personal-form.hidden { display: none !important; }
html:root:not([data-theme="light"]) body .personal-add-btn { width: auto !important; height: 34px !important; min-height: 34px !important; padding: 0 16px !important; border-radius: 9px !important; font-size: 13px !important; white-space: nowrap; }
html:root:not([data-theme="light"]) body .personal-add-btn.is-cancel { border: 1px solid #23232f !important; background: transparent !important; color: #c4c5d4 !important; }
html:root:not([data-theme="light"]) body .personal-add-btn.is-cancel:hover { border-color: #30303f !important; color: #fff !important; }
/* Sessions: "Завершить остальные" hover is a soft red tint (like Сбросить in binds); white text stays. */
html:root:not([data-theme="light"]) body #revoke-sessions:hover { background: rgba(221, 66, 66, .14) !important; border: 1px solid rgba(221, 66, 66, .55) !important; color: #fff !important; }
html:root:not([data-theme="light"]) body #revoke-sessions:hover::before { background: #ff6b6b !important; }
html:root:not([data-theme="light"]) body #revoke-sessions:active { background: rgba(221, 66, 66, .2) !important; }
/* Sessions button: same-size border always, solid colours both ways, so hover does not jump or flash. */
html:root:not([data-theme="light"]) body #revoke-sessions { border: 1px solid transparent !important; background: #17171d !important; background-image: none !important; color: #f2f2f7 !important; transition: background-color .15s ease, border-color .15s ease !important; }
html:root:not([data-theme="light"]) body #revoke-sessions:hover { border-color: rgba(221, 66, 66, .55) !important; background: #2a1618 !important; background-image: none !important; color: #fff !important; }
html:root:not([data-theme="light"]) body #revoke-sessions:active { background: #331a1c !important; transform: none !important; }
/* Admin ban form: reason field with the same ready-reasons list as the ticket ban dialog. */
html:root:not([data-theme="light"]) body .ban-form-card .reason-combo { position: relative; min-width: 0; }
html:root:not([data-theme="light"]) body .ban-form-card .reason-combo input[name=reason] { width: 100%; height: 44px !important; box-sizing: border-box; padding: 0 44px 0 14px !important; border: 1px solid #1c1c27 !important; border-radius: 12px !important; background: #0d0d14 !important; color: #f2f2f7 !important; font-size: 14px !important; box-shadow: none !important; outline: none !important; }
html:root:not([data-theme="light"]) body .ban-form-card .reason-combo input[name=reason]::placeholder { color: #8a8a9a; }
html:root:not([data-theme="light"]) body .ban-form-card .reason-combo input[name=reason]:focus, html:root:not([data-theme="light"]) body .ban-form-card .reason-combo.open input[name=reason] { border-color: rgba(123, 124, 246, .55) !important; }
html:root:not([data-theme="light"]) body .ban-form-card .ban-form { grid-template-columns: 1fr 1.75fr .9fr auto; }
@media (max-width: 900px) { html:root:not([data-theme="light"]) body .ban-form-card .ban-form { grid-template-columns: 1fr 1fr; } }
/* Quick replies: the same form adds and edits a template, no browser prompt(). */
html:root:not([data-theme="light"]) body #reply-form .reply-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
html:root:not([data-theme="light"]) body #reply-form .reply-form-actions .hidden { display: none !important; }
html:root:not([data-theme="light"]) body #reply-form .reply-form-actions .ghost-btn { height: 36px; padding: 0 16px; border: 1px solid #23232f; border-radius: 10px; background: transparent; color: #c4c5d4; font-size: 13px; }
html:root:not([data-theme="light"]) body #reply-form .reply-form-actions .ghost-btn:hover { border-color: #30303f; color: #fff; }
/* Quick replies: bind shown in the admin list and in the composer panel. */
html:root:not([data-theme="light"]) body .reply-row .reply-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid #23232f; border-radius: 6px; background: #050508; color: #aeb0ff; font: 600 11px/1 Onest, sans-serif; white-space: nowrap; flex: none; margin-left: auto; margin-right: 10px; }
html:root:not([data-theme="light"]) body .quick-item b { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html:root:not([data-theme="light"]) body .quick-item .quick-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid #23232f; border-radius: 6px; background: #050508; color: #aeb0ff; font: 600 11px/1 Onest, sans-serif; white-space: nowrap; flex: none; }
html:root:not([data-theme="light"]) body #reply-form .reply-title-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 10px; }
html:root:not([data-theme="light"]) body #reply-form .personal-hotkey { display: flex; align-items: center; width: 100%; height: 40px; padding: 0 12px; border: 1px dashed #23232f; border-radius: 10px; background: #050508; color: #8a8b9c; font-size: 13px; text-align: left; }
html:root:not([data-theme="light"]) body #reply-form .personal-hotkey:hover { border-color: #30303f; }
html:root:not([data-theme="light"]) body #reply-form .personal-hotkey.capturing { border-color: rgba(123, 124, 246, .7); color: #fff; }
/* Sessions: panel colours (dark cards, thin borders, violet accent) instead of grey/green. */
html:root:not([data-theme="light"]) body .session-list { display: flex; flex-direction: column; gap: 8px; }
html:root:not([data-theme="light"]) body .session-row { display: flex !important; align-items: center; gap: 14px; padding: 14px 16px !important; border: 1px solid #1c1c27 !important; border-radius: 14px !important; background: #0a0a10 !important; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .session-row > b { display: grid !important; place-items: center; flex: 0 0 40px; width: 40px !important; height: 40px !important; border: 1px solid rgba(123, 124, 246, .22) !important; border-radius: 11px !important; background: rgba(123, 124, 246, .1) !important; color: #aeb0ff !important; }
html:root:not([data-theme="light"]) body .session-row > b svg { width: 18px; height: 18px; }
html:root:not([data-theme="light"]) body .session-row > div:not(.session-actions) { flex: 1; min-width: 0; }
html:root:not([data-theme="light"]) body .session-row strong { color: #f2f2f7 !important; font-size: 14px; font-weight: 600; }
html:root:not([data-theme="light"]) body .session-row span { display: block; margin-top: 3px; color: #6b6c7c !important; font-size: 12px; }
html:root:not([data-theme="light"]) body .session-row em.current { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border: 1px solid rgba(123, 124, 246, .35) !important; border-radius: 8px !important; background: rgba(123, 124, 246, .12) !important; color: #c7c9ff !important; font-size: 12px; font-style: normal; font-weight: 600; box-shadow: none !important; }
html:root:not([data-theme="light"]) body .session-actions em { color: #6b6c7c !important; font-size: 12px; font-style: normal; }
html:root:not([data-theme="light"]) body .session-end { height: 30px; padding: 0 12px; border: 1px solid #23232f !important; border-radius: 8px !important; background: transparent !important; color: #c4c5d4 !important; font-size: 12px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .session-end:hover { border-color: rgba(221, 66, 66, .55) !important; background: #2a1618 !important; color: #fff !important; }
html:root:not([data-theme="light"]) body #revoke-sessions { height: 36px !important; padding: 0 14px 0 11px !important; border: 1px solid #23232f !important; border-radius: 10px !important; background: #0a0a10 !important; font-size: 13px !important; }
html:root:not([data-theme="light"]) body #revoke-sessions::before { width: 16px !important; height: 16px !important; }
html:root:not([data-theme="light"]) body #revoke-sessions:hover { border-color: rgba(221, 66, 66, .55) !important; background: #2a1618 !important; }
/* Quick replies: drag handle, lifted row while dragging, neighbours slide. */
html:root:not([data-theme="light"]) body .reply-order-hint { margin: -4px 0 10px; color: #6b6c7c; font-size: 12.5px; }
html:root:not([data-theme="light"]) body .reply-order-hint span { color: #8a8b9c; letter-spacing: -2px; margin-right: 2px; }
html:root:not([data-theme="light"]) body .replies-list { position: relative; }
html:root:not([data-theme="light"]) body .reply-row { position: relative; gap: 10px; }
html:root:not([data-theme="light"]) body .reply-row .reply-drag { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 34px; margin: 0 -2px 0 -8px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #4d4e5c; cursor: grab; touch-action: none; transition: color .15s ease, background-color .15s ease; }
html:root:not([data-theme="light"]) body .reply-row .reply-drag svg { width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .reply-row:hover .reply-drag { color: #8a8b9c; }
html:root:not([data-theme="light"]) body .reply-row .reply-drag:hover { color: #c7c9ff; background: rgba(123, 124, 246, .1); }
html:root:not([data-theme="light"]) body .replies-list.is-sorting, html:root:not([data-theme="light"]) body .replies-list.is-sorting * { cursor: grabbing !important; user-select: none; }
html:root:not([data-theme="light"]) body .reply-row.is-dragging { z-index: 5; border-color: rgba(123, 124, 246, .55) !important; background: #0f0f18 !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 0 1px rgba(123, 124, 246, .18) !important; }
html:root:not([data-theme="light"]) body .reply-row.is-dragging .reply-drag { color: #c7c9ff; background: rgba(123, 124, 246, .14); }
/* Admin journal. */
html:root:not([data-theme="light"]) body .audit-list { display: flex; flex-direction: column; border: 1px solid #1c1c27; border-radius: 16px; background: #0a0a10; overflow: hidden; }
html:root:not([data-theme="light"]) body .audit-row { display: grid; grid-template-columns: 92px 28px minmax(0, 1fr); align-items: start; gap: 12px; padding: 13px 18px; border-top: 1px solid #16161f; }
html:root:not([data-theme="light"]) body .audit-row:first-child { border-top: 0; }
html:root:not([data-theme="light"]) body .audit-row:hover { background: #0d0d15; }
html:root:not([data-theme="light"]) body .audit-row time { padding-top: 5px; color: #6b6c7c; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
html:root:not([data-theme="light"]) body .audit-main { min-width: 0; }
html:root:not([data-theme="light"]) body .audit-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 3px; font-size: 13.5px; line-height: 1.35; }
html:root:not([data-theme="light"]) body .audit-title b { color: #f2f2f7; font-weight: 600; }
html:root:not([data-theme="light"]) body .audit-action { color: #c4c5d4; }
html:root:not([data-theme="light"]) body .audit-cat { padding: 1px 7px; border: 1px solid #23232f; border-radius: 6px; color: #8a8b9c; font-size: 11px; font-style: normal; }
html:root:not([data-theme="light"]) body .audit-row[data-cat=bans] .audit-cat { border-color: rgba(221, 66, 66, .35); color: #f19a9a; }
html:root:not([data-theme="light"]) body .audit-row[data-cat=staff] .audit-cat, html:root:not([data-theme="light"]) body .audit-row[data-cat=stats] .audit-cat { border-color: rgba(123, 124, 246, .35); color: #aeb0ff; }
html:root:not([data-theme="light"]) body .audit-row[data-cat=messages] .audit-cat { border-color: rgba(226, 170, 80, .3); color: #e3b872; }
html:root:not([data-theme="light"]) body .audit-meta { margin-top: 4px; color: #6b6c7c; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
html:root:not([data-theme="light"]) body .audit-sep { margin: 0 6px; color: #3a3a48; font-style: normal; }
html:root:not([data-theme="light"]) body .audit-list > .admin-empty, html:root:not([data-theme="light"]) body .audit-list > .admin-loading { margin: 0; padding: 32px; border: 0; }
html:root:not([data-theme="light"]) body .audit-more-wrap { display: flex; justify-content: center; margin-top: 12px; }
html:root:not([data-theme="light"]) body .audit-more { height: 36px; padding: 0 18px; border: 1px solid #23232f !important; border-radius: 10px !important; background: transparent !important; color: #c4c5d4 !important; font-size: 13px; }
html:root:not([data-theme="light"]) body .audit-more:hover { border-color: #30303f !important; color: #fff !important; }
html:root:not([data-theme="light"]) body .audit-more.hidden { display: none !important; }
@media (max-width: 720px) { html:root:not([data-theme="light"]) body .audit-row { grid-template-columns: 28px minmax(0, 1fr); } html:root:not([data-theme="light"]) body .audit-row time { grid-column: 1 / -1; padding: 0; } }
/* Journal category picker: arrow on the right, text and options aligned left, panel colours. */
html:root:not([data-theme="light"]) body .sel-audit-category { position: relative; width: 230px; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-trigger { display: flex !important; align-items: center; justify-content: space-between !important; gap: 8px; width: 100%; height: 38px !important; min-height: 38px !important; padding: 0 10px 0 14px !important; border: 1px solid #1c1c27 !important; border-radius: 11px !important; background: #0a0a10 !important; color: #f2f2f7 !important; font-size: 13px !important; font-weight: 600 !important; text-align: left !important; box-shadow: none !important; transition: border-color .15s ease, background-color .15s ease; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-trigger:hover, html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-trigger[aria-expanded=true] { border-color: #2a2a38 !important; background: #0f0f16 !important; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-trigger > span:first-child { display: flex; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-arrow { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; margin: 0 !important; color: #8b8d9b; font-size: 0 !important; transition: transform .18s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-arrow::before, html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-arrow::after { content: none !important; display: none !important; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-arrow svg { display: block !important; width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-trigger[aria-expanded=true] .styled-select-arrow { transform: rotate(180deg); color: #c7c9ff; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: auto; right: 0; min-width: 100%; width: max-content; max-width: 320px; padding: 6px !important; border: 1px solid #1c1c27 !important; border-radius: 14px !important; background: #0f0f16 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .55) !important; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu .styled-select-option { position: relative; display: flex !important; align-items: center; justify-content: flex-start !important; width: 100%; height: 36px !important; min-height: 36px !important; padding: 0 34px 0 12px !important; border: 0; border-radius: 10px !important; background: transparent !important; color: #d7d8e2 !important; font-size: 13px !important; font-weight: 500 !important; text-align: left !important; white-space: nowrap; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu .styled-select-option + .styled-select-option { margin-top: 2px; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu .styled-select-option:hover { background: rgba(255, 255, 255, .05) !important; color: #fff !important; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu .styled-select-option[aria-selected=true] { background: rgba(123, 124, 246, .14) !important; color: #fff !important; font-weight: 600 !important; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu .styled-select-option[aria-selected=true]::after { content: '' !important; display: block !important; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: #aeb0ff; -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
html:root:not([data-theme="light"]) body .sel-audit-category .styled-select-menu { max-height: none !important; overflow: visible !important; }
html:root:not([data-theme="light"]) body #audit-search { height: 38px !important; min-height: 38px !important; border-radius: 11px !important; }
/* Admin: database backup card above the stats. */
html:root:not([data-theme="light"]) body .backup-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 16px 18px; border: 1px solid #1c1c27; border-radius: 16px; background: #0a0a10; }
html:root:not([data-theme="light"]) body .backup-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html:root:not([data-theme="light"]) body .backup-info span { color: #6b6c7c; font-size: 12.5px; }
html:root:not([data-theme="light"]) body .backup-info b { overflow: hidden; color: #f2f2f7; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
html:root:not([data-theme="light"]) body .backup-btn { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: #7b7cf6; color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, opacity .15s ease; }
html:root:not([data-theme="light"]) body .backup-btn:hover:not(:disabled) { background: #8d8ef8; }
html:root:not([data-theme="light"]) body .backup-btn:disabled { cursor: default; opacity: .7; }
html:root:not([data-theme="light"]) body .backup-btn svg { width: 17px; height: 17px; }
html:root:not([data-theme="light"]) body .backup-btn.is-busy svg { animation: backup-pulse 1s ease-in-out infinite; }
@keyframes backup-pulse { 50% { opacity: .35; } }
@media (max-width: 480px) { html:root:not([data-theme="light"]) body .backup-card { flex-wrap: wrap; } html:root:not([data-theme="light"]) body .backup-info b { white-space: normal; } }
/* Admin: backups tab, list of stored backups. */
html:root:not([data-theme="light"]) body .backup-meta { margin: -4px 2px 14px; color: #6b6c7c; font-size: 12.5px; }
html:root:not([data-theme="light"]) body .backup-meta:empty { display: none; }
html:root:not([data-theme="light"]) body .backup-list { display: flex; flex-direction: column; border: 1px solid #1c1c27; border-radius: 16px; background: #0a0a10; overflow: hidden; }
html:root:not([data-theme="light"]) body .backup-list > .admin-empty, html:root:not([data-theme="light"]) body .backup-list > .admin-loading { margin: 0; padding: 28px; border: 0; }
html:root:not([data-theme="light"]) body .backup-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 72px; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid #16161f; }
html:root:not([data-theme="light"]) body .backup-row:first-child { border-top: 0; }
html:root:not([data-theme="light"]) body .backup-row:hover { background: #0d0d15; }
html:root:not([data-theme="light"]) body .backup-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(123, 124, 246, .12); color: #aeb0ff; }
html:root:not([data-theme="light"]) body .backup-ico svg { width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .backup-name { overflow: hidden; color: #e4e5ee; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .backup-name { display: flex; align-items: center; min-width: 0; padding: 2px 0; line-height: 20px; }
html:root:not([data-theme="light"]) body .backup-name em { display: inline-flex; align-items: center; flex: 0 0 auto; height: 20px; box-sizing: border-box; line-height: 1; margin-left: 8px; padding: 0 7px; border: 1px solid #23232f; border-radius: 6px; color: #8a8b9c; font-size: 11px; font-style: normal; font-weight: 500; }
html:root:not([data-theme="light"]) body .backup-row time { color: #8a8b9c; font-size: 12.5px; font-variant-numeric: tabular-nums; }
html:root:not([data-theme="light"]) body .backup-row b { color: #c4c5d4; font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { html:root:not([data-theme="light"]) body .backup-row { grid-template-columns: 32px minmax(0, 1fr) auto; } html:root:not([data-theme="light"]) body .backup-row time { display: none; } }
/* Ticket info: Discord warnings (выговоры). Same look as the punishment history. */
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn.hidden { display: none !important; }
.ph-tabs button em.wn-count-active { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.wn-form { display: flex; gap: 8px; margin: 0 0 12px; }
.wn-form input { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 10px; background: #050508; color: #f2f2f7; font: inherit; font-size: 13px; transition: border-color .15s ease; }
.wn-form input::placeholder { color: #5d5e6d; }
.wn-form input:focus { outline: 0; border-color: rgba(123, 124, 246, .55); }
.wn-form input:disabled { opacity: .6; }
.wn-give { flex: 0 0 auto; height: 36px; padding: 0 16px; border: 1px solid #23232f; border-radius: 10px; background: #0d0d14; color: #f2f2f7; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.wn-give:hover:not(:disabled) { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); color: #fca5a5; }
.wn-give:disabled { opacity: .45; cursor: default; }
.wn-item .th-top .wn-remove { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #6b6c7c; cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.wn-item .th-top .wn-remove svg { width: 13px; height: 13px; }
.wn-item .th-top .wn-remove:hover:not(:disabled) { background: rgba(239, 68, 68, .12); color: #fca5a5; }
.th-status.ph.revoked { background: rgba(255, 255, 255, .06) !important; color: #8a8b9c !important; }
.wn-why { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.wn-clear { align-self: flex-start; margin-top: 10px; padding: 0; border: 0; background: none; color: #8a8b9c; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: color .15s ease; }
.wn-clear:hover:not(:disabled) { color: #fca5a5; }
.wn-clear.hidden { display: none; }
.wn-confirm { display: flex; gap: 6px; margin: 6px 0 8px; }
.wn-confirm input { flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid #1c1c27; border-radius: 9px; background: #050508; color: #f2f2f7; font: inherit; font-size: 12.5px; }
.wn-confirm input:focus { outline: 0; border-color: rgba(123, 124, 246, .55); }
.wn-confirm-ok, .wn-confirm-no { height: 32px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wn-confirm-ok { border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .1); color: #fca5a5; }
.wn-confirm-ok:hover { background: rgba(239, 68, 68, .18); color: #fff; }
.wn-confirm-no { border: 1px solid #23232f; background: transparent; color: #c4c5d4; }
.wn-confirm-no:hover { border-color: #30303f; color: #fff; }
.wn-dialog .fi-title { flex-wrap: wrap; }
.wn-counts { display: inline-flex; gap: 6px; margin-left: 2px; }
.wn-counts em { padding: 2px 8px; border-radius: 999px; background: #1c1c27; color: #c4c5d4; font-size: 11.5px; font-style: normal; font-weight: 600; }
.wn-counts em:empty { display: none; }
.wn-counts em.wn-count-active { background: rgba(239, 68, 68, .16); color: #fca5a5; }
/* Draft mark in the ticket list. */
html:root:not([data-theme="light"]) body .ticket-draft { color: #f87171; font-weight: 600; }
/* Phones: one screen at a time (list, chat, player card), back button in the chat head, larger touch targets. */
html:root:not([data-theme="light"]) body .account-mobile-only { display: none !important; }
@media (max-width: 760px) {
  html:root:not([data-theme="light"]) body .top-nav { display: none !important; }
  html:root:not([data-theme="light"]) body .account-mobile-only:not(.hidden) { display: flex !important; }
  html:root:not([data-theme="light"]) body .chat-head .back-btn { display: inline-flex !important; flex: 0 0 36px; width: 36px; height: 36px; margin-right: 2px; }
  html:root:not([data-theme="light"]) body .chat-head { padding: 0 8px !important; gap: 4px !important; }
  html:root:not([data-theme="light"]) body .messages { padding: 12px 10px !important; }
  html:root:not([data-theme="light"]) body .msg, html:root:not([data-theme="light"]) body .msg.user, html:root:not([data-theme="light"]) body .msg.staff { max-width: 92% !important; }
  html:root:not([data-theme="light"]) body #composer-text { font-size: 16px !important; }
  html:root:not([data-theme="light"]) body .composer { padding: 8px !important; padding-bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  html:root:not([data-theme="light"]) body .ticket-item { min-height: 64px; }
  html:root:not([data-theme="light"]) body dialog.modal:not(.media-dialog) { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; max-height: calc(100dvh - 48px) !important; margin: auto !important; inset: 0 !important; box-sizing: border-box; }
  html:root:not([data-theme="light"]) body dialog.modal .modal-card, html:root:not([data-theme="light"]) body dialog.tx-dialog .modal-card, html:root:not([data-theme="light"]) body #act-dialog .modal-card { width: 100% !important; max-width: 100% !important; max-height: calc(100dvh - 48px) !important; box-sizing: border-box !important; padding: 16px !important; border-radius: 16px !important; }
  html:root:not([data-theme="light"]) body .wn-form { flex-wrap: nowrap; }
  html:root:not([data-theme="light"]) body .th-meta { flex-wrap: wrap; }
  html:root:not([data-theme="light"]) body .ph-item .th-top, html:root:not([data-theme="light"]) body .wn-item .th-top { flex-wrap: wrap; row-gap: 4px; }
  html:root:not([data-theme="light"]) body .ph-item .ph-reason { flex-basis: 100%; order: 3; white-space: normal; }
  html:root:not([data-theme="light"]) body .ph-item .ph-reason::before { content: none; }
  html:root:not([data-theme="light"]) body .admin-nav { display: flex !important; flex-wrap: nowrap !important; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  html:root:not([data-theme="light"]) body .admin-nav::-webkit-scrollbar { display: none; }
  html:root:not([data-theme="light"]) body .admin-nav button { flex: 0 0 auto !important; width: auto !important; white-space: nowrap; }
  html:root:not([data-theme="light"]) body .admin-content { padding: 16px 12px 24px !important; }
  html:root:not([data-theme="light"]) body .admin-page-head { flex-direction: column; align-items: stretch !important; gap: 10px; }
  html:root:not([data-theme="light"]) body .admin-page-actions { flex-wrap: wrap; width: 100%; }
  html:root:not([data-theme="light"]) body .admin-page-actions > * { flex: 1 1 auto; min-width: 0; }
  html:root:not([data-theme="light"]) body #audit-search, html:root:not([data-theme="light"]) body .sel-audit-category { width: 100% !important; }
  html:root:not([data-theme="light"]) body .backup-card { flex-wrap: wrap; }
  html:root:not([data-theme="light"]) body .backup-btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 760px) {
  html:root:not([data-theme="light"]) body .stats-period { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px !important; width: 100%; }
  html:root:not([data-theme="light"]) body .stats-period > .styled-select, html:root:not([data-theme="light"]) body .stats-period > select { grid-column: 1 / -1; width: 100% !important; }
  html:root:not([data-theme="light"]) body .stats-period input[type="date"] { width: 100% !important; min-width: 0 !important; }
  html:root:not([data-theme="light"]) body .stats-period .stats-period-reset { grid-column: 1 / -1; justify-self: start; }
}
/* Phones, round 2: search over the head, assignment menu visible, quick panel below the top bar, scrollable settings. */
@media (max-width: 760px) {
  html:root:not([data-theme="light"]) body .chat-head { overflow: visible !important; }
  html:root:not([data-theme="light"]) body .chat-who .assignment-menu { position: fixed !important; z-index: 90; left: 12px !important; right: 12px !important; width: auto !important; max-width: none !important; margin-top: 6px; }
  html:root:not([data-theme="light"]) body .chat-head:has(> .chat-search:not(.hidden)) .chat-who, html:root:not([data-theme="light"]) body .chat-head:has(> .chat-search:not(.hidden)) .chat-actions > :not(#search-chat-btn), html:root:not([data-theme="light"]) body .chat-head:has(> .chat-search:not(.hidden)) #search-chat-btn { display: none !important; }
  html:root:not([data-theme="light"]) body .chat-head > .chat-search:not(.hidden) { flex: 1 1 auto !important; margin: 0 0 0 4px !important; }
  html:root:not([data-theme="light"]) body .chat-head > .chat-search input { font-size: 16px !important; }
  html:root:not([data-theme="light"]) body .quick-panel { left: 8px !important; right: 8px !important; width: auto !important; min-width: 0 !important; max-width: none !important; }
  html:root:not([data-theme="light"]) body .settings-view { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  html:root:not([data-theme="light"]) body .settings-panel { overflow: visible !important; min-height: 0 !important; height: auto !important; }
  html:root:not([data-theme="light"]) body .settings-body, html:root:not([data-theme="light"]) body .settings-content { overflow: visible !important; height: auto !important; flex: 0 0 auto !important; }
  html:root:not([data-theme="light"]) body #reply-form .reply-title-row { grid-template-columns: minmax(0, 1fr) 104px !important; }
  html:root:not([data-theme="light"]) body #personal-form .settings-form-row { grid-template-columns: minmax(0, 1fr) 104px !important; }
  html:root:not([data-theme="light"]) body #reply-form .bind-capture, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { font-size: 12px !important; padding: 0 10px !important; }
  html:root:not([data-theme="light"]) body #reply-form input[name=title], html:root:not([data-theme="light"]) body #reply-form textarea, html:root:not([data-theme="light"]) body #personal-form input, html:root:not([data-theme="light"]) body #personal-form textarea, html:root:not([data-theme="light"]) body .admin-search, html:root:not([data-theme="light"]) body input[type=search] { font-size: 16px !important; }
  html:root:not([data-theme="light"]) body .ban-toolbar .ban-tools { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; width: 100% !important; margin-left: 0 !important; }
  html:root:not([data-theme="light"]) body .ban-toolbar .ban-tools .admin-search { width: 100% !important; min-width: 0 !important; }
  html:root:not([data-theme="light"]) body .info-actions { display: flex; justify-content: center; width: 100%; padding: 0 !important; }
  html:root:not([data-theme="light"]) body #ban-user { width: 100% !important; margin: 0 !important; }
  html:root:not([data-theme="light"]) body #online-box { position: static !important; }
  html:root:not([data-theme="light"]) body .topbar { position: relative; }
  html:root:not([data-theme="light"]) body .online-pop { left: 8px !important; right: 8px !important; top: calc(100% + 6px) !important; min-width: 0 !important; width: auto !important; }
}
@media (max-width: 760px) {
  html:root:not([data-theme="light"]) body .fz-item .th-top { flex-wrap: wrap; row-gap: 4px; }
  html:root:not([data-theme="light"]) body .fz-item .th-top .fz-reason { flex-basis: 100%; order: 3; white-space: normal !important; }
  html:root:not([data-theme="light"]) body .fz-item .th-top .fz-reason::before { content: none !important; }
  html:root:not([data-theme="light"]) body .fz-item .th-status { margin-left: auto; }
}
@media (max-width: 760px) {
  html:root:not([data-theme="light"]) body #reply-form .bind-capture .personal-hotkey-value, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html:root:not([data-theme="light"]) body #reply-form .bind-capture, html:root:not([data-theme="light"]) body #personal-form .personal-hotkey { font-size: 11.5px !important; padding: 0 8px !important; }
}
/* "Edited" mark sits next to the time under the bubble, not inside it. */
html:root body .msg-time .edited { margin: 0; font-size: inherit; font-style: italic; color: inherit; opacity: .85; }
html:root body .msg-time .edited-dot { margin: 0 5px; opacity: .6; }
html:root body .msg.grp-more > .msg-time:has(.edited) { display: block !important; font-size: 0 !important; }
html:root body .msg.grp-more > .msg-time:has(.edited) .edited { font-size: 11px; }
html:root body .msg.grp-more > .msg-time .edited-dot { display: none; }
/* Touch screens: message actions are hidden and not clickable until the bubble is tapped. */
@media (hover: none) {
  html:root body .msg .msg-actions { opacity: 0 !important; pointer-events: none !important; visibility: hidden; }
  html:root body .msg.actions-open .msg-actions { opacity: 1 !important; pointer-events: auto !important; visibility: visible; }
}
/* Chat search: the whole chat stays, matches are highlighted, arrows step between them. */
html:root body .chat-search .chat-search-nav { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #8a8a9a; }
html:root body .chat-search .chat-search-nav svg { width: 15px; height: 15px; }
html:root body .chat-search .chat-search-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .06) !important; color: #fff; }
html:root body .chat-search .chat-search-nav:disabled { opacity: .35; cursor: default; }
html:root body .msg.search-hit .msg-bubble { box-shadow: 0 0 0 1px rgba(123, 124, 246, .35); }
html:root body .msg.search-current .msg-bubble { box-shadow: 0 0 0 2px #7b7cf6; animation: search-pulse .9s ease-out; }
@keyframes search-pulse { from { box-shadow: 0 0 0 6px rgba(123, 124, 246, .45); } to { box-shadow: 0 0 0 2px #7b7cf6; } }

/* Stats period: menus styled like the journal filter, one tidy row. */
html:root:not([data-theme="light"]) body .sel-stats-preset, html:root:not([data-theme="light"]) body .sel-stats-month { position: relative; width: 230px; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-trigger, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-trigger { display: flex !important; align-items: center; justify-content: space-between !important; gap: 8px; width: 100%; height: 38px !important; min-height: 38px !important; padding: 0 10px 0 14px !important; border: 1px solid #1c1c27 !important; border-radius: 11px !important; background: #0a0a10 !important; color: #f2f2f7 !important; font-size: 13px !important; font-weight: 600 !important; text-align: left !important; box-shadow: none !important; transition: border-color .15s ease, background-color .15s ease; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-trigger:hover, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-trigger:hover, html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-trigger[aria-expanded=true], html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-trigger[aria-expanded=true] { border-color: #2a2a38 !important; background: #0f0f16 !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-trigger > span:first-child, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-trigger > span:first-child { display: flex; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-arrow, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-arrow { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; margin: 0 !important; color: #8b8d9b; font-size: 0 !important; transition: transform .18s ease, color .15s ease; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-arrow::before, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-arrow::before, html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-arrow::after, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-arrow::after { content: none !important; display: none !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-arrow svg, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-arrow svg { display: block !important; width: 16px; height: 16px; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-trigger[aria-expanded=true] .styled-select-arrow, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-trigger[aria-expanded=true] .styled-select-arrow { transform: rotate(180deg); color: #c7c9ff; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: auto; right: 0; min-width: 100%; width: max-content; max-width: 320px; padding: 6px !important; border: 1px solid #1c1c27 !important; border-radius: 14px !important; background: #0f0f16 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .55) !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu .styled-select-option, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu .styled-select-option { position: relative; display: flex !important; align-items: center; justify-content: flex-start !important; width: 100%; height: 36px !important; min-height: 36px !important; padding: 0 34px 0 12px !important; border: 0; border-radius: 10px !important; background: transparent !important; color: #d7d8e2 !important; font-size: 13px !important; font-weight: 500 !important; text-align: left !important; white-space: nowrap; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu .styled-select-option + .styled-select-option, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu .styled-select-option + .styled-select-option { margin-top: 2px; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu .styled-select-option:hover, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu .styled-select-option:hover { background: rgba(255, 255, 255, .05) !important; color: #fff !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu .styled-select-option[aria-selected=true], html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu .styled-select-option[aria-selected=true] { background: rgba(123, 124, 246, .14) !important; color: #fff !important; font-weight: 600 !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu .styled-select-option[aria-selected=true]::after, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu .styled-select-option[aria-selected=true]::after { content: '' !important; display: block !important; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: #aeb0ff; -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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu { max-height: none !important; overflow: visible !important; }
html:root:not([data-theme="light"]) body .sel-stats-preset, html:root:not([data-theme="light"]) body .sel-stats-month { position: relative; min-width: 172px; }
html:root:not([data-theme="light"]) body .sel-stats-preset .styled-select-menu, html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu { left: 0; right: auto; }
html:root:not([data-theme="light"]) body .sel-stats-month .styled-select-menu { max-height: 320px !important; overflow-y: auto !important; }
html:root:not([data-theme="light"]) body .stats-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html:root:not([data-theme="light"]) body .stats-period input[type="date"] { height: 38px; padding: 0 12px; border: 1px solid #1c1c27; border-radius: 11px; background: #0a0a10; color: #f2f2f7; font-size: 13px; color-scheme: dark; }
html:root:not([data-theme="light"]) body .stats-period input[type="date"]:hover { border-color: #2a2a38; }
html:root:not([data-theme="light"]) body .stats-period-dash { color: #5b5c6b; }
/* Custom emojis: inline in messages, a "Fear" group in the picker, an admin section. */
html:root body .msg-bubble .custom-emoji { display: inline-block; width: 22px; height: 22px; margin: 0 1px; vertical-align: -5px; object-fit: contain; }
html:root body .emoji-grid-custom { margin-bottom: 8px; }
html:root body .emoji-grid-custom button { display: inline-grid; place-items: center; }
html:root body .emoji-grid-custom .custom-emoji { width: 24px; height: 24px; object-fit: contain; }
html:root body .emoji-admin-form { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid #1c1c27; border-radius: 14px; background: #0a0a10; }
html:root body .emoji-drop { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border: 1px dashed #2a2a38; border-radius: 12px; background: #050508; color: #6b6c7c; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
html:root body .emoji-drop:hover { border-color: #7b7cf6; color: #c7c9ff; }
html:root body .emoji-preview { display: grid; place-items: center; width: 100%; height: 100%; }
html:root body .emoji-preview svg { width: 20px; height: 20px; }
html:root body .emoji-preview img { width: 40px; height: 40px; object-fit: contain; }
html:root body .emoji-admin-fields { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-width: 0; }
html:root body .emoji-admin-fields small { color: #6b6c7c; font-size: 12px; }
html:root body .emoji-admin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
html:root body .emoji-admin-list > .admin-empty, html:root body .emoji-admin-list > .admin-loading { grid-column: 1 / -1; }
html:root body .emoji-admin-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 8px 8px 12px; border: 1px solid #1c1c27; border-radius: 12px; background: #0a0a10; }
html:root body .emoji-admin-item .custom-emoji { flex: 0 0 28px; width: 28px; height: 28px; object-fit: contain; }
html:root body .emoji-admin-item span { flex: 1 1 auto; min-width: 0; overflow: hidden; color: #d7d8e2; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
html:root body .emoji-admin-item .icon-btn { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: transparent; color: #6b6c7c; }
html:root body .emoji-admin-item .icon-btn:hover { background: rgba(239, 68, 68, .1); color: #f87171; }
html:root body .emoji-admin-item .icon-btn svg { width: 16px; height: 16px; }
@media (max-width: 760px) { html:root body .emoji-admin-form { flex-wrap: wrap; } html:root body .emoji-admin-form .primary-btn { flex: 1 1 100%; } html:root body .emoji-admin-fields input { font-size: 16px; } }
/* Stats edit: set / add / subtract switch in the panel style. */
html:root body .stats-edit-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; padding: 4px; border: 1px solid #1c1c27; border-radius: 12px; background: #050508; }
html:root body .stats-edit-modes button { height: 34px; padding: 0 10px; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #8a8a9a; font-size: 13px; font-weight: 600; transition: background .15s ease, color .15s ease; }
html:root body .stats-edit-modes button:hover { color: #e6e6ee; }
html:root body .stats-edit-modes button.active { background: #1c1c27 !important; color: #fff; }
html:root body .stats-edit-field { margin-top: 4px !important; }
html:root body .stats-edit-dialog .stats-edit-field input { background: #050508; }
html:root body .stats-edit-result { min-height: 18px; margin-top: -4px; color: #6b6c7c; font-size: 12.5px; }
html:root body .stats-edit-result b { color: #d7d8e2; font-weight: 700; }
html:root body .stats-edit-result b.bad { color: #f87171; }
/* Activity dialog: year switch above the grid. */
html:root body .act-years { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; overflow-x: auto; border: 1px solid #1c1c27; border-radius: 12px; background: #050508; scrollbar-width: none; }
html:root body .act-years::-webkit-scrollbar { display: none; }
html:root body .act-years button { flex: 0 0 auto; height: 32px; padding: 0 14px; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #8a8a9a; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s ease, color .15s ease; }
html:root body .act-years button:hover { color: #e6e6ee; }
html:root body .act-years button.active { background: #1c1c27 !important; color: #fff; }
html:root body .act-cell.act-future { opacity: .35; }
/* Bans table: a lifted ban shows who lifted it. */
html:root body .ban-table .ban-revoked { display: inline-flex; flex-direction: column; gap: 2px; color: #c4c5d4; font-size: 13px; }
html:root body .ban-table .ban-revoked b { display: inline; color: #4ade80; font-weight: 700; }
html:root body .ban-table .ban-revoked small { color: #6b6c7c; font-size: 11.5px; }
/* Ban term «Свой срок…»: number + unit + resulting date. */
html:root body .ban-custom { display: grid; grid-template-columns: 110px 150px 1fr; align-items: center; gap: 8px; }
html:root body .ban-custom.hidden { display: none !important; }
html:root body .ban-form-card .ban-form .ban-custom { grid-column: 1 / -1; order: 5; }
html:root body .ban-custom input[name=custom_amount] { height: 44px; box-sizing: border-box; padding: 0 14px; border: 1px solid #1c1c27; border-radius: 12px; background: #0d0d14; color: #fff; font: inherit; font-size: 14px; font-weight: 600; }
html:root body .ban-custom input[name=custom_amount]:focus { outline: none; border-color: rgba(123, 124, 246, .55); }
html:root body .ban-custom .styled-select { width: 100%; }
html:root body .ban-custom .styled-select-trigger { height: 44px; }
html:root body .ban-custom-until { color: #8a8a9a; font-size: 12.5px; white-space: nowrap; }
@media (max-width: 760px) { html:root body .ban-custom { grid-template-columns: 1fr 1fr; } html:root body .ban-custom-until { grid-column: 1 / -1; } html:root body .ban-custom input[name=custom_amount] { font-size: 16px; } }
html:root:not([data-theme="light"]) body .backup-name .backup-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:root body .ban-table .ban-revoked { gap: 4px; }
html:root body .ban-table .ban-revoked-top { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
html:root body .ban-table .ban-revoked-top b { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(74, 222, 128, .12); color: #4ade80; font-size: 11.5px; font-weight: 700; }
html:root body .ban-table .ban-revoked-top span { color: #d7d8e2; font-size: 13px; font-weight: 600; }
/* Stats period: the preset menu hugs its button, so the dates sit right next to it. */
@media (min-width: 761px) {
  html:root:not([data-theme="light"]) body .stats-period .sel-stats-preset, html:root:not([data-theme="light"]) body .stats-period .sel-stats-month { width: auto !important; min-width: 0 !important; flex: 0 0 auto; }
  html:root:not([data-theme="light"]) body .stats-period .sel-stats-preset { margin-right: 4px; }
  html:root:not([data-theme="light"]) body .stats-period .sel-stats-preset .styled-select-menu { min-width: 190px; }
}
/* Confirmation dialogs are short questions: keep the window compact. */
html:root:not([data-theme="light"]) body dialog.confirm-dialog { width: min(400px, calc(100vw - 32px)) !important; max-width: calc(100vw - 32px) !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-card { width: 100% !important; box-sizing: border-box; }
/* Own colors (Кастомизация): fixed dark colors give way to the chosen palette. Default look is untouched. */
html.custom-colors:root:not([data-theme="light"]) body { background: var(--bg) !important; color: var(--text) !important; }
html.custom-colors:root:not([data-theme="light"]) body .topbar,
html.custom-colors:root:not([data-theme="light"]) body #layout > .panel,
html.custom-colors:root:not([data-theme="light"]) body .settings-nav,
html.custom-colors:root:not([data-theme="light"]) body .admin-nav,
html.custom-colors:root:not([data-theme="light"]) body .admin-sidebar,
html.custom-colors:root:not([data-theme="light"]) body .settings-sidebar,
html.custom-colors:root:not([data-theme="light"]) body .composer-box,
html.custom-colors:root:not([data-theme="light"]) body .color-control,
html.custom-colors:root:not([data-theme="light"]) body .admin-card,
html.custom-colors:root:not([data-theme="light"]) body .lb-row,
html.custom-colors:root:not([data-theme="light"]) body .modal-card,
html.custom-colors:root:not([data-theme="light"]) body .msg-day,
html.custom-colors:root:not([data-theme="light"]) body .history-event { background: var(--secondary) !important; }
html.custom-colors:root:not([data-theme="light"]) body .msg.user .msg-bubble,
html.custom-colors:root:not([data-theme="light"]) body .msg.staff.bot .msg-bubble { background: var(--message-incoming-bg) !important; color: var(--message-incoming-text) !important; }
html.custom-colors:root:not([data-theme="light"]) body .msg.staff:not(.bot):not(.deleted) .msg-bubble { background: var(--message-outgoing-bg) !important; border-color: var(--message-outgoing-border) !important; color: var(--message-outgoing-text) !important; }
html.custom-colors:root:not([data-theme="light"]) body .primary-btn,
html.custom-colors:root:not([data-theme="light"]) body .send-btn { background: var(--accent) !important; border-color: var(--accent) !important; }
html.custom-colors:root:not([data-theme="light"]) body .ticket-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent) !important; border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; }
html.custom-colors:root:not([data-theme="light"]) body .ticket-name,
html.custom-colors:root:not([data-theme="light"]) body .msg-author b,
html.custom-colors:root:not([data-theme="light"]) body #close-btn,
html.custom-colors:root:not([data-theme="light"]) body .panel-title,
html.custom-colors:root:not([data-theme="light"]) body .info-name,
html.custom-colors:root:not([data-theme="light"]) body .lb-name,
html.custom-colors:root:not([data-theme="light"]) body h1,
html.custom-colors:root:not([data-theme="light"]) body h2,
html.custom-colors:root:not([data-theme="light"]) body .modal-title,
html.custom-colors:root:not([data-theme="light"]) body .color-control b,
html.custom-colors:root:not([data-theme="light"]) body .settings-stack strong { color: var(--text) !important; }
/* Toast: clearly readable; while a dialog is open it is placed inside it, above the dark backdrop. */
html:root body #toast { position: fixed; inset: auto auto 24px 50%; margin: 0; overflow: visible; width: max-content; max-width: min(460px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 18px; border: 1px solid #2a2a38; border-radius: 12px; background: #14141d; color: #f2f2f7; font-size: 13.5px; font-weight: 600; line-height: 1.35; text-align: center; box-shadow: 0 18px 44px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03); z-index: 2147483000; }
@media (max-width: 760px) { html:root body #toast { bottom: max(16px, env(safe-area-inset-bottom)); } }
/* Reply box (contenteditable): looks and sizes like the old textarea; custom emojis inline. */
html:root body #composer-text.composer-input { flex: 1 1 0%; min-width: 0; min-height: 34px; max-height: 140px; box-sizing: border-box; padding: 8px 0; overflow-y: auto; overflow-x: hidden; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; cursor: text; -webkit-user-modify: read-write-plaintext-only; }
html:root body #composer-text.composer-input:empty::before { content: attr(data-placeholder); color: #5b5b63; pointer-events: none; }
html:root body #composer-text.composer-input[contenteditable="false"] { cursor: default; }
html:root body #composer-text.composer-input .custom-emoji { display: inline-block; width: 22px; height: 22px; margin: 0 1px; vertical-align: -5px; object-fit: contain; }
@media (max-width: 760px) {
  html:root body #composer-text.composer-input { font-size: 16px; }
  html:root body #composer-text.composer-input:empty { height: 40px !important; min-height: 40px; padding-top: 0; padding-bottom: 0; line-height: 40px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
html:root body .emoji-admin-item .emoji-admin-name { flex: 1 1 auto; }
html:root body .emoji-admin-item .emoji-admin-rename { flex: 1 1 auto; min-width: 0; height: 30px; box-sizing: border-box; padding: 0 10px; border: 1px solid rgba(123, 124, 246, .55); border-radius: 8px; background: #050508; color: #f2f2f7; font: inherit; font-size: 13px; outline: none; }
html:root body .emoji-admin-item .emoji-admin-edit:hover { background: rgba(255, 255, 255, .06); color: #e6e6ee; }
html:root body .emoji-admin-item.renaming .emoji-admin-edit { color: #aeb0ff; }
html:root body #composer-text.composer-input:empty::before { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html:root body #composer-text.composer-input:empty { height: 34px; padding-top: 6px; padding-bottom: 6px; }
/* Auto-replies: just the centred text and time, no name tag above. */
html:root body .msg.staff.bot .msg-author { display: none !important; }
html:root body .msg.staff.bot .msg-bubble { margin-top: 0 !important; }
/* Pending attachments above the reply box: tidy square thumbs with the × centred in the corner. */
html:root body .composer .attachment-previews:not(.hidden) { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; padding: 6px 2px 0; overflow: visible; }
html:root body .pending-attachment { position: relative; display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; box-sizing: border-box; overflow: visible; border: 1px solid #23232f; border-radius: 12px; background: #0a0a10; }
html:root body .pending-attachment img { display: block; width: 100%; height: 100%; border-radius: 11px; object-fit: cover; }
html:root body .pending-attachment > span { padding: 0 6px; overflow: hidden; color: #a4a5b2; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
html:root body .pending-attachment button { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 2px solid #000; border-radius: 50%; background: #2a2a38; color: #f2f2f7; font-size: 13px; line-height: 1; cursor: pointer; transition: background .15s ease; }
html:root body .pending-attachment button:hover { background: #ef4444; }
/* Arrow to jump back to the latest messages, bottom-right above the reply box. */
html:root body .composer { position: relative; }
html:root body .messages-to-bottom { position: absolute; right: 18px; bottom: calc(100% + 12px); z-index: 5; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #23232f; border-radius: 50%; background: #0a0a10; color: #d6d6e0; box-shadow: 0 8px 20px rgba(0,0,0,.45); cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
html:root body .messages-to-bottom[hidden] { display: none; }
html:root body .messages-to-bottom:hover { background: #12121a; border-color: #7b7cf6; color: #fff; }
html:root body .messages-to-bottom svg { width: 18px; height: 18px; display: block; }
/* Pending attachment ×: small dark circle inside the corner, no light ring. */
html:root body .composer .pending-attachment { border-color: #1c1c27 !important; overflow: hidden !important; }
html:root body .composer .pending-attachment button { top: 4px !important; right: 4px !important; width: 20px !important; height: 20px !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: rgba(0, 0, 0, .72) !important; color: #e6e6ee !important; font-size: 14px !important; backdrop-filter: blur(4px); }
html:root body .composer .pending-attachment button:hover { background: rgba(239, 68, 68, .9) !important; color: #fff !important; }
/* Sessions: "Активна" badge and "Завершить" share height, radius and border. */
html:root body .session-actions { gap: 8px !important; }
html:root body .session-actions em { box-sizing: border-box; display: inline-flex !important; align-items: center; gap: 7px !important; height: 30px !important; padding: 0 12px !important; border: 1px solid #1c1c27 !important; border-radius: 8px !important; background: #0f0f16 !important; color: #8b8c9c !important; font-size: 12px !important; font-weight: 600; line-height: 1 !important; }
html:root body .session-actions em::before { width: 7px !important; height: 7px !important; margin: 0 !important; border-radius: 50%; background: #34d399 !important; }
html:root body .session-actions .session-end { box-sizing: border-box; display: inline-flex !important; align-items: center; height: 30px !important; line-height: 1 !important; }
/* Status inside the panel: same framed area under the top bar as the admin panel. */
html:root body.status-in-app .status-view { position: fixed; inset: 76px 12px 12px; z-index: 20; min-height: 0; overflow-y: auto; border: 1px solid #202026 !important; border-radius: 16px; background: #000 !important; background-image: none !important; }
html:root body.status-in-app .status-head { display: none; }
@media (max-width: 760px) { html:root body.status-in-app .status-view { inset: 64px 6px 6px; } }
html:root body .composer .pending-attachment img { cursor: zoom-in; transition: opacity .15s ease; }
html:root body .composer .pending-attachment img:hover { opacity: .85; }
/* Profile buttons that can't open (no linked account / no data): visible but dimmed. */
html:root body .fear-tx-btn.is-locked { opacity: .45; cursor: not-allowed !important; }
/* Ticket list: the time sits on the nickname's optical centre (small lowercase "вчера" read lower). */
html:root body .ticket-name-line { align-items: center !important; }
html:root body .ticket-time { padding-top: 0 !important; }
html:root body .ticket-time-text { display: block; height: 16px; line-height: 16px !important; transform: translateY(-1.5px); }
/* Freeze dialog: paid unfreeze bar above the history. */
html:root body .fz-action { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 12px 12px 12px 16px; border: 1px solid rgba(125, 211, 252, .22); border-radius: 14px; background: linear-gradient(90deg, rgba(125, 211, 252, .07), rgba(123, 124, 246, .06)); }
html:root body .fz-action.hidden { display: none; }
html:root body .fz-action-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
html:root body .fz-action-copy b { color: #e6e6ee; font-size: 13.5px; font-weight: 700; }
html:root body .fz-action-copy span { color: #8b8c9c; font-size: 12px; }
html:root body .fz-action-copy em { font-style: normal; font-weight: 700; color: #d6d7e4; }
html:root body .fz-action-copy em.low { color: #f87171; }
html:root body .fz-unfreeze { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: #7b7cf6; color: #fff; font: 700 13px/1 Onest, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(123, 124, 246, .28); transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
html:root body .fz-unfreeze svg { width: 16px; height: 16px; }
html:root body .fz-unfreeze:hover:not(:disabled) { background: #8b8cff; box-shadow: 0 8px 22px rgba(123, 124, 246, .38); }
html:root body .fz-unfreeze:active:not(:disabled) { transform: translateY(1px); }
html:root body .fz-unfreeze:disabled { background: #23232f; color: #6b6c7c; box-shadow: none; cursor: not-allowed; }
html:root body .fz-unfreeze.busy { background: #5b5cc6; color: #e6e6ee; cursor: progress; }
@media (max-width: 520px) { html:root body .fz-action { flex-direction: column; align-items: stretch; } html:root body .fz-unfreeze { justify-content: center; } }
/* Unfreeze: reason when the button is locked; paid tag in the freeze history; SteamID field in staff rows. */
html:root body .fz-action-copy .fz-deny { color: #fca5a5; font-size: 12px; }
html:root body .fz-item .th-chip.fz-paid { border-color: rgba(123, 124, 246, .3); background: rgba(123, 124, 246, .1); color: #b9bbff; }
html:root body .staff-steam { display: block; width: 100%; max-width: 190px; box-sizing: border-box; margin-top: 6px; height: 28px; padding: 0 10px; border: 1px solid #23232f; border-radius: 8px; background: #050508; color: #e6e6ee; font: 500 12px/1 Onest, sans-serif; }
html:root body .staff-steam:focus { outline: none; border-color: #7b7cf6; }
html:root body .staff-steam::placeholder { color: #5b5c6c; }
/* Unfreeze: two buttons, free (outlined) and paid (accent). */
html:root body .fz-buttons { display: flex; gap: 8px; flex: none; }
html:root body .fz-unfreeze.fz-free { background: transparent; border: 1px solid #2a2a38; color: #d6d7e4; box-shadow: none; }
html:root body .fz-unfreeze.fz-free:hover:not(:disabled) { background: #12121a; border-color: #7b7cf6; box-shadow: none; }
html:root body .fz-unfreeze.fz-free:disabled { background: transparent; border-color: #1c1c27; color: #5b5c6c; }
@media (max-width: 520px) { html:root body .fz-buttons { width: 100%; } html:root body .fz-buttons .fz-unfreeze { flex: 1; justify-content: center; } }
/* Ban history: "Снять бан/мут" on active punishments. */
html:root body .ph-item .ph-lift { margin-left: auto; height: 24px; padding: 0 10px; border: 1px solid rgba(248, 113, 113, .4); border-radius: 7px; background: transparent; color: #fca5a5; font: 600 11.5px/1 Onest, sans-serif; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
html:root body .ph-item .ph-lift:hover:not(:disabled) { background: rgba(127, 29, 29, .3); border-color: rgba(248, 113, 113, .7); color: #fff; }
html:root body .ph-item .ph-lift:disabled { border-color: #23232f; color: #5b5c6c; cursor: not-allowed; }
html:root body .ph-item .ph-lift-note { margin-top: 6px; color: #8b8c9c; font-size: 11.5px; }

/* Staff list: compact single-line rows (name · SteamID · access · role · ×). */
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row { padding-top: 10px !important; padding-bottom: 10px !important; min-height: 0 !important; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .styled-select-trigger,
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .staff-fixed { height: 34px !important; font-size: 12.5px; }
html:root:not([data-theme="light"]) body #admin-staff-list .staff-row .admin-remove { width: 34px !important; height: 34px !important; }
html:root body #admin-staff-list .staff-steam { margin-top: 0; max-width: none; height: 34px; }
@container staff-list (min-width: 760px) {
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) { grid-template-columns: 32px minmax(120px, 1fr) 160px 170px 200px 34px !important; }
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) > .admin-slot,
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) > .admin-remove { grid-column: 6; }
}
@container staff-list (max-width: 759.98px) {
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) { display: flex !important; flex-wrap: wrap; gap: 8px 10px; }
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) .admin-list-main { flex: 1 1 140px; }
  html:root:not([data-theme="light"]) body #admin-staff-list .staff-row:has(.staff-steam-cell) .staff-cell { flex: 1 1 150px; }
}
html:root body #admin-staff-list { container: staff-list / inline-size; }

/* Profile panel on ticket switch: one soft fade, no flicker. Buttons still loading look normal
   (they only dim once it is known they can't open). */
@keyframes info-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html:root body #info-body.info-enter > * { animation: info-enter .22s ease-out both; }
html:root body .fear-tx-btn.is-locked[data-lock-reason="Загружаем данные…"] { opacity: 1; cursor: default !important; }
html:root body .fear-tx-btn { transition: opacity .2s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
@media (prefers-reduced-motion: reduce) { html:root body #info-body.info-enter > * { animation: none; } }

/* «Заблокировать» while its status is being checked: looks normal, just not clickable yet. */
html:root body #ban-user.is-checking { pointer-events: none; }

/* Phone/tablet profile panel: content keeps its natural height so the last note scrolls fully into view. */
@media (max-width: 1100px) { html:root body.info-open #info > .info-body { height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important; } }
/* Account button: no leftover focus ring or "stuck hover" after a tap on touch screens. */
html:root body .topbar .account-trigger:focus:not(:focus-visible) { outline: none !important; }
@media (hover: none) { html:root body .topbar .account-trigger:hover:not([aria-expanded="true"]) { background: transparent !important; } }
/* Image viewer: sharp zoom (the picture is resized, not stretched), arrows hide while zoomed;
   on touch screens no arrows / +− — pinch, double-tap and swipe instead. */
html:root .media-dialog #media-image { transition: none !important; will-change: auto !important; image-rendering: auto; }
html:root .media-dialog .media-stage { touch-action: none; }
html:root .media-dialog.is-zoomed .media-nav, html:root .media-dialog.is-zoomed .media-help { display: none !important; }
@media (hover: none) and (pointer: coarse) {
  html:root .media-dialog .media-nav, html:root .media-dialog .media-help, html:root .media-dialog #media-zoom-in, html:root .media-dialog #media-zoom-out, html:root .media-dialog .media-scale { display: none !important; }
  html:root .media-dialog .media-toolbar { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  html:root .media-dialog .media-close { width: 40px !important; height: 40px !important; background: rgba(10, 10, 16, .7) !important; }
  html:root .media-dialog #media-image { max-width: 100vw; max-height: 86dvh; border-radius: 0; }
}
html:root .media-dialog .media-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

/* Warnings: why the staff member can't give/remove (Discord rank rules). */
html:root body .wn-note { margin: -4px 0 10px; color: #8b8c9c; font-size: 12px; line-height: 1.4; }
html:root body .wn-note.hidden { display: none; }
/* SteamID shown as text where the admin can't change it. */
html:root body #admin-staff-list .staff-steam-fixed { color: #8b8c9c; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Ticket list: the check sits on the same line as the last-message text. */
html:root body .ticket-item .ticket-time .ticket-check { transform: translateY(-3px) !important; }

/* Personal replies look like the admin «Ответы» list: dark row, small accent hotkey, quiet delete. */
html:root:not([data-theme="light"]) body .personal-row { background: #0a0a10 !important; border: 1px solid #1c1c27 !important; border-radius: 16px; padding: 14px 18px; min-height: 0; }
html:root:not([data-theme="light"]) body .personal-row strong { font-size: 14px; font-weight: 700; color: #f2f2f7; }
html:root:not([data-theme="light"]) body .personal-row > div > span { color: #8a8a9a; font-size: 13px; }
html:root:not([data-theme="light"]) body .personal-row kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid #23232f; border-radius: 6px; background: #050508; color: #aeb0ff; font: 600 11px/1 Onest, sans-serif; }
html:root:not([data-theme="light"]) body .personal-row .admin-remove { border: 1px solid transparent !important; background: transparent !important; color: #9496a3 !important; }
html:root:not([data-theme="light"]) body .personal-row .admin-remove:hover { background: rgba(127, 29, 29, .3) !important; border-color: rgba(248, 113, 113, .5) !important; color: #ff9a9a !important; }
html:root:not([data-theme="light"]) body .personal-add-btn { height: 38px !important; min-height: 38px !important; border-radius: 12px !important; background: #7b7cf6 !important; background-image: none !important; }
html:root:not([data-theme="light"]) body .personal-add-btn.is-cancel { background: transparent !important; }

/* Notes: regular weight text, compact footer (no tall empty strip under the text). */
html:root:not([data-theme="light"]) body .note-text { font-weight: 400 !important; color: #e6e6ee; }
html:root:not([data-theme="light"]) body .note-item { padding: 10px 12px 8px !important; }
html:root:not([data-theme="light"]) body .note-meta { margin-top: 2px !important; }
html:root:not([data-theme="light"]) body .note-action { width: 26px !important; height: 26px !important; border-radius: 7px !important; }
html:root:not([data-theme="light"]) body .note-action svg { width: 15px !important; height: 15px !important; }
/* Warning removal: paid-unfreeze chip, other reasons as a wrapped line under the chips (never cut off). */
html:root body .wn-item .wn-unfreeze { color: #c4c5ff; }
html:root body .wn-item .wn-unfreeze svg { width: 12px; height: 12px; flex: none; }
html:root body .wn-item .wn-why { max-width: none; margin-top: 6px; overflow: visible; color: #8b8c9c; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }

/* Snowflake without an active freeze: muted grey, no glow; still opens the history. */
html:root:not([data-theme="light"]) body .fear-freeze.is-idle { color: #5d5e6e; }
html:root:not([data-theme="light"]) body .fear-freeze.is-idle svg { filter: none; }
html:root:not([data-theme="light"]) body .fear-freeze.is-idle:hover { background: rgba(255, 255, 255, .06) !important; color: #a1a2b3; }

/* Player nickname, login and IDs in the profile are always selectable. */
html:root body .info-profile .info-name-text, html:root body .info-profile .info-username, html:root body .info-profile .info-id b { -webkit-user-select: text; user-select: text; cursor: text; }

/* Paid unfreeze button: flat, no glow. */
html:root body .fz-unfreeze, html:root body .fz-unfreeze:hover:not(:disabled), html:root body .fz-unfreeze:focus-visible { box-shadow: none !important; }

/* Freeze history: title and reason share one baseline; the separator is a small dot centred on the text. */
html:root body .fz-item .th-top { align-items: baseline; }
html:root body .fz-item .th-top .th-status { align-self: center; }
html:root body .fz-item .th-top .fz-reason::before { content: '' !important; display: inline-block; width: 3px; height: 3px; margin: 0 7px 0 1px; border-radius: 50%; background: #4b4c5a; vertical-align: middle; }
@media (max-width: 760px) { html:root body .fz-item .th-top .fz-reason::before { content: none !important; display: none; } }

/* Confirm dialogs: compact. */
html:root:not([data-theme="light"]) body dialog.confirm-dialog { width: min(340px, calc(100vw - 32px)) !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-card { padding: 16px 18px !important; border-radius: 14px !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-title { font-size: 15px !important; line-height: 1.3; margin: 0 0 6px !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-note { font-size: 12.5px !important; line-height: 1.45; margin: 0 !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-actions { margin-top: 14px !important; gap: 8px !important; }
html:root:not([data-theme="light"]) body dialog.confirm-dialog .modal-actions button { height: 32px !important; min-height: 32px !important; padding: 0 13px !important; border-radius: 9px !important; font-size: 12.5px !important; }

/* Profile counters: grey (total) always first, red second; equal width so they line up in columns. */
html:root:not([data-theme="light"]) body .profile-buttons .fear-tx-btn .th-counts em { min-width: 22px; box-sizing: border-box; text-align: center; }

/* Admin names in ban/mute/freeze history open their Fear profile. */
html:root body .th-chip.th-chip-link { text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease; }
html:root body .th-chip.th-chip-link:hover { background: #1c1c29; color: #d6d7e4; }
html:root body .th-chip.th-chip-link:hover b { color: #c4c5ff; }
