:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-2: #0b1017;
  --panel: rgba(15, 20, 28, 0.78);
  --panel-strong: rgba(18, 24, 34, 0.94);
  --glass: blur(18px) saturate(130%);
  --ink: #f7f8fb;
  --muted: #9aa7b7;
  --soft: #657386;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --white-soft: rgba(255, 255, 255, 0.08);
  --white-hover: rgba(255, 255, 255, 0.13);
  --accent: #e9edf5;
  --success: #3ddc97;
  --success-soft: rgba(61, 220, 151, 0.13);
  --cyan: #55dff7;
  --cyan-soft: rgba(85, 223, 247, 0.13);
  --blue: #7aa7ff;
  --blue-soft: rgba(122, 167, 255, 0.13);
  --server-gold: #ffc83d;
  --server-gold-soft: rgba(255, 200, 61, 0.14);
  --purple: #bb76ff;
  --purple-soft: rgba(187, 118, 255, 0.13);
  --warning: #ffbd6b;
  --danger: #ff5f77;
  --danger-soft: rgba(255, 95, 119, 0.13);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.26);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-ui: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", "Manrope", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

@font-face {
  font-family: "Minecraft";
  src: url("/fonts/Minecraft.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Minecraftia";
  src: url("/fonts/Minecraftia-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "MinecraftBold";
  src: url("/fonts/minecraft_bold.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.09), transparent 24%),
    radial-gradient(circle at 82% 0%, rgba(122, 149, 184, 0.16), transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #0a0d13 0%, #07090d 48%, #050609 100%);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

i[data-lucide],
.lucide {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2.15;
}

.app-shell {
  position: relative;
  z-index: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.05), transparent 34%),
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.045), transparent 28%);
}

.stage-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  animation: stageIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-view {
  perspective: 1200px;
}

.login-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-orbit span {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.5;
}

.login-orbit span:nth-child(1) {
  top: 10%;
  left: 12%;
}

.login-orbit span:nth-child(2) {
  right: 10%;
  bottom: 8%;
  width: 540px;
  height: 540px;
  border-color: rgba(85, 223, 247, 0.1);
}

.login-orbit span:nth-child(3) {
  top: 48%;
  left: 50%;
  width: 720px;
  height: 720px;
  border-color: rgba(61, 220, 151, 0.08);
  transform: translate(-50%, -50%);
}

.login-card {
  position: relative;
  width: min(860px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(340px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 22px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 8% 0%, rgba(85, 223, 247, 0.11), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), transparent 36%),
    rgba(12, 16, 24, 0.88);
  transform-style: preserve-3d;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transform: translateX(-120%);
}

.login-visual,
.login-brand,
.login-field,
.login-button,
.login-card .auth-box {
  position: relative;
  z-index: 1;
}

.login-visual {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(85, 223, 247, 0.12), transparent 22%),
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    rgba(5, 8, 13, 0.72);
  background-size: auto, 34px 34px, 34px 34px, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.075),
    inset 0 28px 80px rgba(255, 255, 255, 0.035);
}

.moderation-scope {
  position: relative;
  width: 280px;
  height: 280px;
  display: grid;
  place-items: center;
}

.scope-ring,
.scope-scan,
.scope-ping {
  position: absolute;
  border-radius: 999px;
}

.scope-ring {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ring-two {
  inset: 42px;
  border-color: rgba(85, 223, 247, 0.24);
}

.ring-three {
  inset: 88px;
  border-color: rgba(61, 220, 151, 0.22);
}

.scope-ring::before,
.scope-ring::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
}

.scope-ring::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.scope-ring::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.scope-scan {
  inset: 0;
  background: conic-gradient(from 0deg, rgba(85, 223, 247, 0.34), rgba(61, 220, 151, 0.1), transparent 34%);
  opacity: 0.85;
  mask: radial-gradient(circle, transparent 0 14%, #000 15% 100%);
}

.scope-ping {
  width: 10px;
  height: 10px;
  background: #55dff7;
  box-shadow: 0 0 24px rgba(85, 223, 247, 0.76);
}

.ping-one {
  top: 42px;
  right: 74px;
}

.ping-two {
  bottom: 68px;
  left: 68px;
  background: #3ddc97;
  box-shadow: 0 0 24px rgba(61, 220, 151, 0.66);
}

.ping-three {
  right: 45px;
  bottom: 105px;
  background: #ffbd6b;
  box-shadow: 0 0 24px rgba(255, 189, 107, 0.56);
}

.moderation-line {
  position: absolute;
  height: 1px;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(85, 223, 247, 0.76), transparent);
  opacity: 0.4;
}

.line-a {
  top: 28%;
  left: 8%;
}

.line-b {
  right: 8%;
  bottom: 24%;
  background: linear-gradient(90deg, transparent, rgba(61, 220, 151, 0.62), transparent);
}

.console-symbol {
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 22px 42px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 24px rgba(255, 255, 255, 0.08));
}

.hero-mark {
  width: 118px;
  height: 118px;
}

.console-symbol.large {
  width: 54px;
  height: 54px;
}

.brand-console-mark {
  width: 46px;
  height: 46px;
}

.console-wordmark {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: 0.42em;
}

.console-wordmark::after {
  content: "";
  display: inline-block;
  width: 0.34em;
}

.login-brand {
  display: grid;
  gap: 18px;
  padding: 0 6px;
}

.login-brand p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand h1 {
  max-width: 420px;
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 0.96;
}

.login-brand .console-wordmark {
  max-width: none;
  margin-top: 4px;
  line-height: 1;
  letter-spacing: 0;
}

.login-field,
.wide-field {
  width: 100%;
}

.login-card .login-field,
.login-card .login-button,
.login-card .auth-box {
  grid-column: 2;
}

.login-card .login-field,
.login-card .login-button,
.login-card .auth-box,
.login-brand {
  width: min(460px, 100%);
  justify-self: center;
}

.login-button {
  min-height: 54px;
  font-size: 15px;
}

body[data-stage="login"] .login-view {
  display: grid;
}

body[data-stage="login"] .floating-nav,
body[data-stage="login"] .topbar,
body[data-stage="login"] .workspace {
  display: none;
}

body[data-stage="server"] .floating-nav,
body[data-stage="server"] .topbar,
body[data-stage="server"] #monitorPanel {
  display: none;
}

body[data-stage="server"] .workspace {
  display: grid;
  place-items: center;
  padding: 26px;
  overflow-y: auto;
}

body[data-stage="server"] #sessionPanel {
  position: relative;
  inset: auto;
  z-index: 1;
  width: min(880px, 100%);
  max-height: none;
  opacity: 1;
  transform: none;
  animation: stageIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body[data-stage="server"] .connect-panel {
  padding: 16px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.15), transparent 30%),
    linear-gradient(145deg, rgba(22, 28, 38, 0.94), rgba(9, 12, 18, 0.94));
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body[data-stage="server"] .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-stage="server"] .drawer-close {
  display: grid;
}

body[data-stage="console"] .login-view {
  display: none;
}

body[data-stage="workflow"] .login-view,
body[data-stage="workflow"] .topbar,
body[data-stage="workflow"] #monitorPanel {
  display: none;
}

body[data-stage="workflow"] .workspace {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

body[data-stage="workflow"] #workflowPage {
  display: grid !important;
}

body[data-stage="archives"] .login-view,
body[data-stage="archives"] #monitorPanel,
body[data-stage="archives"] #workflowPage {
  display: none !important;
}

body[data-stage="archives"] .workspace {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

body[data-stage="archives"] #archivesPage {
  display: grid !important;
}

body[data-stage="server"] .drawer-heading {
  position: relative;
  min-height: 78px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

body[data-stage="server"] .drawer-heading::after {
  content: "Escolha onde o monitor vai entrar";
  position: absolute;
  right: 70px;
  bottom: 18px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

body[data-stage="server"] .heading-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #9ba7b8);
  box-shadow: 0 18px 36px rgba(255, 255, 255, 0.08);
}

body[data-stage="server"] .heading-icon i {
  width: 21px;
  height: 21px;
}

body[data-stage="server"] .panel-heading h2 {
  font-size: 22px;
}

body[data-stage="server"] .panel-heading p {
  font-size: 14px;
}

body[data-stage="server"] .drawer-close {
  width: 42px;
  height: 42px;
}

body[data-stage="server"] .connect-form {
  gap: 10px;
}

body[data-stage="server"] label {
  gap: 9px;
}

body[data-stage="server"] label span {
  padding-left: 2px;
  color: #aab5c5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body[data-stage="server"] input,
body[data-stage="server"] select {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(2, 5, 10, 0.62);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

body[data-stage="server"] input:focus,
body[data-stage="server"] select:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

body[data-stage="server"] .wide-field,
body[data-stage="server"] .form-grid,
body[data-stage="server"] .mode-picker,
body[data-stage="server"] .actions {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

body[data-stage="server"] .wide-field {
  padding: 10px 12px 12px;
}

body[data-stage="server"] .form-grid {
  gap: 10px;
}

body[data-stage="server"] .mode-picker {
  gap: 14px;
}

body[data-stage="server"] .mode-picker-heading {
  padding: 0 2px;
}

body[data-stage="server"] .mode-picker-heading strong {
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #05070a;
  background: #f7f8fb;
  font-weight: 900;
}

body[data-stage="server"] .mode-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-stage="server"] .mode-button {
  position: relative;
  min-height: 42px;
  overflow: hidden;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #dfe7f0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(11, 15, 22, 0.74);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-stage="server"] .mode-button > span,
body[data-stage="server"] .mode-button > img {
  position: relative;
  z-index: 1;
}

body[data-stage="server"] .mode-button::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 56%);
  transition: opacity 160ms ease;
}

body[data-stage="server"] .mode-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.095);
}

body[data-stage="server"] .mode-button:hover::before,
body[data-stage="server"] .mode-button.active::before {
  opacity: 1;
}

body[data-stage="server"] .mode-button.active {
  color: #05070a;
  border-color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, #ffffff, #c9d1dc);
  box-shadow:
    0 18px 38px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-stage="server"] .actions {
  grid-template-columns: 1.2fr 1fr 54px;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

body[data-stage="server"] .primary-button,
body[data-stage="server"] .secondary-button,
body[data-stage="server"] .icon-button {
  min-height: 44px;
  font-size: 14px;
}

body[data-stage="server"] .primary-button {
  background: linear-gradient(135deg, #ffffff, #d6dce6);
  box-shadow:
    0 24px 46px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 #ffffff;
}

body[data-stage="server"] .secondary-button,
body[data-stage="server"] .icon-button {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

body[data-stage="server"] .primary-button:hover,
body[data-stage="server"] .secondary-button:hover,
body[data-stage="server"] .icon-button:hover {
  transform: translateY(-2px);
}

.glass-panel,
.floating-nav,
.server-chip,
.status-pill,
.connect-panel,
.monitor-header,
.event.system,
.empty-state,
.auth-box {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.floating-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 80;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.86);
}

.nav-item {
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--white-soft);
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 12px 26px rgba(0, 0, 0, 0.24);
}

.nav-item.muted {
  color: var(--soft);
  opacity: 0.72;
}

.nav-item.muted:hover {
  color: var(--ink);
  opacity: 1;
}

.nav-item.nav-danger {
  color: #ff9aaa;
}

.nav-item.nav-danger:hover:not(:disabled) {
  color: #ffdbe1;
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.22), rgba(255, 95, 119, 0.1)),
    #251820;
  box-shadow:
    inset 0 0 0 1px rgba(255, 95, 119, 0.32),
    0 14px 32px rgba(255, 95, 119, 0.12);
}

.nav-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(85, 255, 255, 0.42);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #031012;
  background: #55ffff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(85, 255, 255, 0.18);
}

.nav-badge.hidden {
  display: none;
}

.nav-tooltip {
  position: absolute;
  left: 50%;
  bottom: -35px;
  transform: translateX(-50%) translateY(-2px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 6px 9px;
  border: 1px solid #343c49;
  border-radius: 9px;
  color: #f6f8fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    #11151c;
  font-size: 11px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 32px rgba(0, 0, 0, 0.34);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-item:hover .nav-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

.system-tooltip {
  position: fixed;
  z-index: 260;
  max-width: min(340px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid #343c49;
  border-radius: 9px;
  color: #f6f8fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    #11151c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px) scale(0.98);
  transform-origin: center bottom;
  transition: opacity 120ms ease, transform 120ms ease;
  font: 800 12px/1.25 var(--font-ui);
  text-align: center;
  white-space: normal;
}

.system-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.system-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid #343c49;
  border-bottom: 1px solid #343c49;
  background: #11151c;
  transform: translateX(-50%) rotate(45deg);
}

.system-tooltip[data-placement="top"]::after {
  bottom: -5px;
}

.system-tooltip[data-placement="bottom"] {
  transform-origin: center top;
}

.system-tooltip[data-placement="bottom"]::after {
  top: -5px;
  border: 0;
  border-left: 1px solid #343c49;
  border-top: 1px solid #343c49;
}

.topbar {
  min-height: 106px;
  padding: 86px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-block,
.topbar-meta,
.server-chip,
.status-group,
.panel-heading,
.metric,
label span,
.auth-box span,
.event-kind,
.event-identity,
.event-prefixes,
.mode-picker-heading span {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #aeb8c6);
  box-shadow: 0 18px 42px rgba(255, 255, 255, 0.08);
}

.brand-mark {
  background:
    linear-gradient(135deg, #ffffff, #c9d1dc);
}

.brand-mark i {
  color: #10151e;
}

.brand-mark i {
  width: 22px;
  height: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  line-height: 1;
}

.topbar p,
.panel-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.topbar-meta {
  gap: 12px;
}

.server-chip {
  min-width: 238px;
  max-width: 340px;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: none;
}

.server-identity-chip {
  min-width: 278px;
  align-items: center;
  color: inherit;
  font: inherit;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 58%),
    rgba(15, 20, 28, 0.78);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.server-identity-chip:hover,
.server-identity-chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 58%),
    rgba(18, 23, 32, 0.9);
}

.server-identity-chip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.server-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
  border-radius: 11px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.42));
}

.server-identity-chip > i {
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.server-chip span,
.metric span,
label span,
.auth-box span {
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.server-chip strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.server-identity-chip strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f7f8fb;
  background: rgba(255, 255, 255, 0.08);
  text-shadow: none;
}

.server-ip {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.user-profile-chip {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 58%),
    rgba(15, 20, 28, 0.78);
}

.user-profile-chip {
  min-width: 176px;
}

.user-profile-chip img,
.account-avatar {
  image-rendering: pixelated;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.user-profile-chip img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.system-tag {
  --tag-color: #ffffff;
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--tag-color);
  background: color-mix(in srgb, var(--tag-color) 14%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tag-color) 28%, transparent),
    0 0 18px color-mix(in srgb, var(--tag-color) 14%, transparent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-group {
  gap: 10px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--soft);
  box-shadow: 0 0 16px rgba(101, 115, 134, 0.35);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 22px rgba(61, 220, 151, 0.55);
}

.status-dot.connecting,
.status-dot.reconnecting {
  background: var(--warning);
  box-shadow: 0 0 22px rgba(255, 189, 107, 0.42);
}

.status-dot.error,
.status-dot.kicked {
  background: var(--danger);
  box-shadow: 0 0 24px rgba(255, 95, 119, 0.48);
}

.status-pill {
  min-width: 94px;
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  color: var(--muted);
  background: rgba(16, 21, 29, 0.72);
  font-size: 13px;
  box-shadow: none;
}

.status-group:has(.status-dot.connected) .status-pill {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(16, 21, 29, 0.72);
}

.status-group:has(.status-dot.connecting) .status-pill,
.status-group:has(.status-dot.reconnecting) .status-pill {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(16, 21, 29, 0.72);
}

.status-group:has(.status-dot.error) .status-pill,
.status-group:has(.status-dot.kicked) .status-pill {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(16, 21, 29, 0.72);
}

.workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.monitor-panel {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%),
    rgba(7, 10, 15, 0.5);
}

.monitor-header {
  min-height: 50px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(8, 11, 17, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 48px rgba(0, 0, 0, 0.18);
}

.metric {
  width: auto;
  min-width: 74px;
  min-height: 34px;
  gap: 8px;
  padding: 7px 11px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  font: 800 13px/1 var(--font-ui);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.metric:nth-child(1) {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
}

.metric:nth-child(2) {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
}

.metric:nth-child(3) {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
}

.metric:first-child {
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
}

.metric i {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.metric > i {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric:nth-child(1) > i,
.metric:nth-child(1) strong {
  color: var(--ink);
}

.metric:nth-child(1) > i {
  background: transparent;
  box-shadow: none;
}

.metric:nth-child(2) > i,
.metric:nth-child(2) strong {
  color: var(--ink);
}

.metric:nth-child(2) > i {
  background: transparent;
  box-shadow: none;
}

.metric:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 56%),
    rgba(255, 255, 255, 0.052);
}

.metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
}

.metric span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.metric.danger i,
.metric.danger strong {
  color: var(--danger);
}

.metric.danger > i {
  background: transparent;
  box-shadow: none;
}

.system-error-metric {
  margin-left: auto;
}

.account-tabs-toggle {
  width: 82px;
  min-height: 34px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.account-tabs-toggle:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 56%),
    rgba(255, 255, 255, 0.052);
}

.account-tabs-toggle i {
  width: 18px;
  height: 18px;
}

.account-tabs-toggle + .system-error-metric {
  margin-left: 0;
}

.system-error-metric i,
.system-error-metric strong {
  color: #ff9aaa;
}

.feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 116px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  scroll-behavior: smooth;
}

.chat-composer {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  z-index: 15;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(130px, max-content) minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(13, 17, 25, 0.92);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chat-composer > div {
  min-width: 0;
  padding: 0 8px;
}

.chat-composer span,
.chat-composer small {
  display: block;
}

.chat-composer span {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  font-size: 13px;
}

.chat-composer small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-composer input {
  min-height: 42px;
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.76);
}

.chat-composer button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #cbd3df);
}

.chat-composer button:last-child {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
}

.account-tabs {
  margin: 12px 24px 0;
  padding: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-radius: 22px;
  max-height: 72px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 180ms ease,
    margin 180ms ease,
    padding 180ms ease,
    opacity 140ms ease,
    transform 180ms ease;
}

.monitor-panel.account-tabs-collapsed .account-tabs {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.account-tab-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  will-change: transform;
}

.account-tab[draggable="true"] {
  cursor: grab;
}

.account-tab-group.dragging .account-tab[draggable="true"] {
  cursor: grabbing;
}

.account-tab-group.dragging {
  cursor: grabbing;
  opacity: 0.55;
  transform: scale(0.98);
}

.account-tab-group:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
}

.account-tab-group.active {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.11);
}

.account-tab-group:has(.account-avatar) {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.account-tab-group:has(.account-avatar).active {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: none;
}

.account-tab-group.muted-account {
  opacity: 0.62;
}

.account-tab-group.muted-account .account-tab::after {
  content: "mutado";
  padding: 3px 6px;
  border-radius: 999px;
  color: #c9d1dc;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 900;
}

.account-tab,
.account-tab-action,
.account-tab-power,
.account-tab-lobby,
.account-add-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: 800 13px/1 var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.account-tab {
  gap: 8px;
  padding: 8px 12px;
}

.account-tab-action,
.account-tab-power,
.account-tab-lobby {
  width: 42px;
  padding: 0;
}

.account-add-button {
  width: 45px;
  height: 45px;
  min-height: 45px;
  padding: 0;
  border: none;
  border-radius: 50%;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  color: #05070a;
  background-color: #ffffff;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  will-change: transform;
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.16s ease;
}

.account-add-button:hover {
  color: #05070a;
  width: 125px;
  border-radius: 40px;
  background-color: #ffffff;
}

.account-add-button:active {
  transform: translate(2px, 2px);
}

.account-add-button .sign {
  width: 100%;
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    padding-left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-add-button .sign i {
  width: 18px;
  height: 18px;
  color: #05070a;
}

.account-add-button .text {
  position: absolute;
  right: 0;
  width: 0;
  opacity: 0;
  color: #05070a;
  font-size: 0.95em;
  font-weight: 900;
  white-space: nowrap;
  transition:
    opacity 0.45s ease,
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    padding-right 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-add-button:hover .sign {
  width: 30%;
  padding-left: 20px;
}

.account-add-button:hover .text {
  opacity: 1;
  width: 70%;
  padding-right: 10px;
}

.account-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.account-tab-group.active .account-tab {
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #d9e2f1);
}

.account-tab-group:has(.account-avatar).active .account-tab {
  background: linear-gradient(135deg, #ffffff, #cbd3df);
}

.account-tab-action:hover,
.account-tab-power:hover,
.account-tab-lobby:hover {
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #cbd3df);
}

.account-tab-power.danger:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f77, #d73652);
  box-shadow: 0 12px 26px rgba(255, 95, 119, 0.2);
}

.account-tab i,
.account-tab-action i,
.account-tab-power i,
.account-tab-lobby i,
.account-add-button i {
  width: 16px;
  height: 16px;
}

.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.account-tab small {
  color: inherit;
  opacity: 0.64;
  font-size: 11px;
}

.account-context-menu,
.console-context-menu,
.image-download-menu {
  position: fixed;
  z-index: 120;
  width: 188px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(14, 18, 26, 0.94);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.account-context-menu,
.console-context-menu,
.chat-picker-menu {
  transform-origin: top left;
}

.account-context-menu.menu-opening,
.console-context-menu.menu-opening,
.chat-picker-menu.menu-opening {
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
}

.account-context-menu.menu-open,
.console-context-menu.menu-open,
.chat-picker-menu.menu-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 130ms ease,
    transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.account-context-menu.menu-closing,
.console-context-menu.menu-closing,
.chat-picker-menu.menu-closing {
  opacity: 0;
  transform: translateY(-3px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 140ms ease;
}

.console-context-menu {
  z-index: 126;
  width: 250px;
}

.account-context-menu {
  width: 220px;
}

.image-download-menu {
  z-index: 170;
  width: 182px;
}

.account-context-menu button,
.console-context-menu button,
.image-download-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font: 800 13px/1 var(--font-ui);
  text-align: left;
}

.account-context-menu button:hover,
.console-context-menu button:hover,
.image-download-menu button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.account-context-menu button.danger {
  color: #ff9aa9;
}

.split-filter-context-menu button.danger {
  color: #ff9aa9;
}

.account-context-menu button.danger:hover {
  color: #ffd8de;
  background: rgba(255, 95, 119, 0.14);
}

.split-filter-context-menu button.danger:hover {
  color: #ffd8de !important;
  background: rgba(255, 95, 119, 0.14) !important;
}

.account-context-menu button:disabled,
.console-context-menu button:disabled,
.image-download-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.account-lobby-menu,
.server-address-menu {
  position: fixed;
  z-index: 125;
  width: 232px;
  max-height: min(360px, calc(100vh - 24px));
  padding: 8px;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
  background: rgba(14, 18, 26, 0.96);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.server-address-menu {
  z-index: 127;
  width: 238px;
}

.account-lobby-menu-title,
.server-address-menu-title {
  padding: 8px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-lobby-menu-empty {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-lobby-menu-item,
.server-address-menu-item {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: #d9e2ef;
  background: transparent;
  font: 900 13px/1 var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.account-lobby-menu-item:hover,
.account-lobby-menu-item.active,
.server-address-menu-item:hover,
.server-address-menu-item.active {
  color: #05070a;
  background: linear-gradient(135deg, #ffffff, #cbd3df);
}

.account-lobby-menu-item:disabled,
.server-address-menu-item:disabled {
  cursor: wait;
  opacity: 0.6;
}

.account-lobby-menu-item img,
.account-lobby-menu-item i,
.server-address-menu-item i {
  width: 20px;
  height: 20px;
}

.account-lobby-menu-item img {
  image-rendering: pixelated;
}

.account-lobby-menu-item span,
.server-address-menu-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed::-webkit-scrollbar,
.connect-panel::-webkit-scrollbar {
  width: 10px;
}

.feed::-webkit-scrollbar-thumb,
.connect-panel::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  background-clip: content-box;
}

.empty-state {
  width: min(420px, 100%);
  margin: auto;
  padding: 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted);
}

.empty-state i {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
}

.empty-state span {
  margin-top: 8px;
  font-size: 14px;
}

.empty-state .loader {
  width: 118px;
  height: 118px;
  margin: 0 auto 18px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: #090a0d;
  box-shadow:
    0 0 30px 4px rgba(0, 0, 0, 0.5) inset,
    0 5px 12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.empty-state .loader::before,
.empty-state .loader::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 45%;
  top: -40%;
  left: 0;
  background-color: #2e2e2e;
  animation: wave 5s linear infinite;
}

.empty-state .loader::before {
  border-radius: 30%;
  background: rgba(122, 122, 122, 0.4);
}

@keyframes wave {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

.event {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  animation: riseIn 160ms ease both;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.event.chat,
.event.alert {
  cursor: pointer;
}

.event.chat:hover {
  background: rgba(255, 255, 255, 0.055);
}

.event.alert {
  color: #ffe7eb;
}

.event.alert.ignored-alert {
  color: var(--ink);
}

.event.alert.ignored-alert .event-kind,
.event.alert.ignored-alert .event-filter {
  color: var(--muted);
}

.event.alert.ignored-alert .event-user,
.event.alert.ignored-alert .event-message {
  color: #f3f7fb;
}

.event.alert:hover,
.event.alert:focus-visible {
  outline: none;
  background: rgba(255, 95, 119, 0.13);
  box-shadow: inset 3px 0 0 var(--danger);
}

.event.alert.ignored-alert:hover,
.event.alert.ignored-alert:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

.event.event-jump {
  background: rgba(139, 216, 255, 0.16);
  box-shadow: inset 3px 0 0 #8bd8ff;
}

.event.system {
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: #dce5ee;
  background: rgba(15, 20, 28, 0.72);
  box-shadow: none;
}

.event.system-danger {
  color: #ff9aaa;
  border-color: rgba(255, 95, 119, 0.24);
  background: rgba(58, 16, 24, 0.46);
}

.event.system-success {
  color: #8df3c2;
  border-color: rgba(61, 220, 151, 0.24);
  background: rgba(16, 58, 40, 0.42);
}

.event.system-send {
  color: #8bd8ff;
  border-color: rgba(85, 223, 247, 0.2);
  background: rgba(15, 42, 58, 0.42);
}

.event.system .event-kind {
  color: #d9e2ef;
}

.event.system .event-user {
  color: #8bd8ff;
}

.event.system-danger .event-kind,
.event.system-danger .event-user,
.event.system-danger .event-message {
  color: #ff9aaa;
}

.event.system-success .event-kind,
.event.system-success .event-user,
.event.system-success .event-message {
  color: #8df3c2;
}

.event.system-send .event-kind,
.event.system-send .event-user,
.event.system-send .event-message {
  color: #8bd8ff;
}

.system-bot-name {
  font-weight: 900;
}

.event-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.event-kind {
  gap: 6px;
  color: #d9e2ef;
  font-weight: 800;
}

.event-kind i {
  width: 15px;
  height: 15px;
}

.event.alert .event-kind,
.event-filter {
  color: var(--warning);
  font-weight: 800;
}

.event:not(.system) {
  display: grid;
  grid-template-columns: auto auto auto minmax(132px, max-content) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  row-gap: 2px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.72);
}

.event:not(.system) .event-topline,
.event:not(.system) .event-body {
  display: contents;
}

.event:not(.system) .event-kind {
  grid-column: 1;
}

.event:not(.system) .event-time {
  grid-column: 2;
}

.event:not(.system) .event-lobby {
  grid-column: 3;
}

.event:not(.system) .event-identity {
  grid-column: 4;
}

.event:not(.system) .event-message {
  grid-column: 5;
}

.event:not(.system) .event-filter {
  grid-column: 5;
  grid-row: 2;
}

.event.raw-event:not(.system) .event-identity {
  display: none;
}

.event.raw-event:not(.system) .event-message {
  grid-column: 4 / -1;
}

.event.raw-event:not(.system) .event-filter {
  grid-column: 4 / -1;
}

.event-body {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.event-identity {
  gap: 8px;
  min-width: 0;
}

.event-prefixes {
  gap: 4px;
  flex-wrap: wrap;
}

.event-prefix {
  --prefix-ink: #f2f6f9;
  --prefix-border: rgba(226, 234, 242, 0.18);
  --prefix-glow: rgba(226, 234, 242, 0.08);
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--prefix-border);
  border-radius: 5px;
  color: var(--prefix-ink);
  background: var(--prefix-glow);
  font-size: 11px;
  line-height: 1;
}

.event-prefix.badge {
  color: #ffe07e;
  border-color: rgba(255, 224, 126, 0.28);
  background: rgba(255, 224, 126, 0.08);
}

.event-prefix.medal {
  color: #a6dcff;
  border-color: rgba(166, 220, 255, 0.25);
  background: rgba(166, 220, 255, 0.08);
}

.event-user {
  overflow: hidden;
  color: #8bd8ff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.event:not(.system) .event-user::after {
  content: ":";
  color: var(--soft);
}

.event-message {
  margin: 0;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.event-message .minecraft-bold {
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  text-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.72),
    0.6px 0 0 currentColor;
}

.event-message .minecraft-icon {
  display: inline-block;
  font-size: 1.32em;
  line-height: 1;
  vertical-align: -0.04em;
}

.event:not(.system) .event-message {
  color: #f3f7fb;
}

.event.alert .event-user {
  color: var(--danger);
}

.event.alert .event-message {
  color: #ffe7eb;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 220ms ease, backdrop-filter 220ms ease;
}

.drawer-backdrop.open {
  opacity: 1;
  backdrop-filter: blur(7px);
}

.system-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 22px;
}

.system-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(7px);
  opacity: 0;
}

.system-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100vw - 28px));
  max-height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: center;
}

.system-modal.is-opening .system-modal-backdrop {
  animation: modalBackdropIn 180ms ease both;
}

.system-modal.is-opening .system-modal-panel {
  animation: modalPanelIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.system-modal.is-closing .system-modal-backdrop {
  animation: modalBackdropOut 170ms ease both;
}

.system-modal.is-closing .system-modal-panel {
  animation: modalPanelOut 180ms ease both;
}

.system-modal-header {
  min-height: 70px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.system-modal-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.system-modal-header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.modal-view {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.workflow-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  place-items: center;
  padding: 22px;
}

.workflow-picker-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(5, 5, 6, 0.70);
  backdrop-filter: blur(8px);
}

.workflow-picker-panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 28px));
  max-height: min(680px, calc(100dvh - 28px));
  border: 1px solid #292a30;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%),
    #0c0d0f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 28px 80px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(18px) scale(0.965);
}

.workflow-picker-modal.is-open .workflow-picker-backdrop {
  animation: modalBackdropIn 180ms ease both;
}

.workflow-picker-modal.is-open .workflow-picker-panel {
  animation: modalPanelIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workflow-picker-modal.is-closing .workflow-picker-backdrop {
  animation: modalBackdropOut 170ms ease both;
}

.workflow-picker-modal.is-closing .workflow-picker-panel {
  animation: modalPanelOut 180ms ease both;
}

.workflow-picker-header,
.workflow-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-picker-header {
  min-height: 74px;
  padding: 16px 18px;
  border-bottom: 1px solid #25262b;
}

.workflow-picker-header span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-picker-header h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font: 950 20px/1.1 var(--font-display);
}

.workflow-picker-list {
  min-height: 240px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow-y: auto;
}

.workflow-access-panel {
  width: min(460px, calc(100vw - 28px));
}

.workflow-access-form {
  width: 100%;
  padding: 18px;
}

.workflow-access-form .workflow-picker-actions {
  padding: 0;
  border: 0;
}

.workflow-picker-item {
  width: 100%;
  min-height: 82px;
  padding: 0;
  border: 1px solid #26272d;
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  color: #f4f4f5;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 58%),
    #101113;
  cursor: pointer;
  overflow: hidden;
  animation: workflowPickerItemIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--workflow-delay, 0ms);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.workflow-picker-open {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.workflow-picker-delete {
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
  cursor: pointer;
}

.workflow-picker-delete:hover,
.workflow-picker-delete:focus-visible {
  border-color: rgba(248, 113, 113, 0.42);
  color: #ffffff;
  background: rgba(248, 113, 113, 0.16);
  outline: none;
}

.workflow-picker-delete i {
  width: 16px;
  height: 16px;
}

.workflow-picker-item:hover,
.workflow-picker-item:focus-visible,
.workflow-picker-item.active {
  border-color: #3f3f46;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.072), transparent 58%),
    #151518;
  outline: none;
}

.workflow-picker-item:hover,
.workflow-picker-item:focus-within {
  transform: translateY(-1px);
}

.workflow-picker-item:active {
  transform: translateY(0) scale(0.99);
}

.workflow-picker-item.active {
  box-shadow: inset 3px 0 0 #d4d4d8;
}

.workflow-picker-item.unsaved {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.12), transparent 58%),
    #12110d;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.workflow-picker-item.unsaved .workflow-picker-mark {
  border-color: rgba(245, 158, 11, 0.36);
  color: #fbbf24;
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.035)),
    #18150d;
}

.workflow-picker-mark {
  width: 44px;
  height: 44px;
  border: 1px solid #34353c;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012)),
    #18181b;
}

.workflow-picker-mark i {
  width: 20px;
  height: 20px;
}

.workflow-picker-copy,
.workflow-picker-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.workflow-picker-copy strong,
.workflow-picker-copy small,
.workflow-picker-meta b,
.workflow-picker-meta em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-picker-copy strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.workflow-picker-copy small {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 800;
}

.workflow-picker-meta {
  justify-items: end;
  text-align: right;
}

.workflow-picker-meta b {
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 950;
}

.workflow-picker-meta em {
  color: #71717a;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-picker-state {
  min-height: 240px;
  padding: 24px;
  border: 1px dashed #303138;
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.025);
}

.workflow-picker-state span {
  width: 46px;
  height: 46px;
  border: 1px solid #34353c;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #d4d4d8;
  background: #151518;
}

.workflow-picker-state strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.workflow-picker-state p {
  margin: 0;
  max-width: 42ch;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.workflow-picker-state.error {
  border-color: rgba(251, 113, 133, 0.35);
}

.workflow-picker-skeleton {
  height: 82px;
  border: 1px solid #25262b;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent),
    #101113;
  background-size: 220% 100%;
  animation: workflowPickerSkeleton 1100ms ease-in-out infinite;
}

.workflow-picker-actions {
  padding: 12px 18px 18px;
  border-top: 1px solid #25262b;
}

.workflow-picker-actions .secondary-button,
.workflow-picker-actions .primary-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

@keyframes workflowPickerItemIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workflowPickerSkeleton {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@media (max-width: 640px) {
  .workflow-picker-modal {
    padding: 12px;
  }

  .workflow-picker-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .workflow-picker-header,
  .workflow-picker-actions {
    padding-inline: 14px;
  }

  .workflow-picker-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .workflow-picker-actions .secondary-button,
  .workflow-picker-actions .primary-button {
    width: 100%;
  }

  .workflow-picker-item {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .workflow-picker-open {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .workflow-picker-meta {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

.bots-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.bot-card {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.bot-card.online {
  border-color: rgba(61, 220, 151, 0.24);
}

.bot-card.offline {
  border-color: rgba(255, 95, 119, 0.2);
}

.bot-skin-frame {
  min-height: 142px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(5, 8, 13, 0.62);
}

.bot-skin-frame img {
  max-height: 146px;
  image-rendering: pixelated;
}

.bot-card-info {
  display: grid;
  gap: 5px;
}

.bot-card-info strong {
  color: var(--ink);
  font-size: 15px;
}

.bot-card-info span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.bot-status {
  width: max-content;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #05070a;
  background: #8df3c2;
  font-weight: 900;
}

.bot-card.offline .bot-status {
  color: #ffe7eb;
  background: rgba(255, 95, 119, 0.22);
}

.filter-editor {
  display: grid;
  gap: 14px;
}

.filter-add-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.filter-field span {
  color: #aeb7c5;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #2b333f;
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(7, 10, 15, 0.82);
  font: 800 14px/1 var(--font-ui);
  outline: none;
}

.filter-field input:focus {
  border-color: rgba(139, 216, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(139, 216, 255, 0.1);
}

.filter-add-form .primary-button {
  min-height: 42px;
  border: 1px solid #2b333f;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    #151a22;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.filter-add-form .primary-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    #1a2029;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.filter-add-form .primary-button:active {
  transform: translateY(0) scale(0.98);
}

.filters-list,
.alerts-list {
  display: grid;
  gap: 8px;
}

.filters-list-head {
  min-height: 24px;
  padding: 0 52px 0 14px;
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr) 0;
  gap: 12px;
  align-items: end;
  color: #8c96a5;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.filter-item,
.alert-jump-item {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.filter-item {
  padding: 8px 8px 8px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.filter-item.editing {
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr) 34px 34px;
  padding-left: 8px;
}

.filter-text-button {
  width: auto;
  height: auto;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: text;
}

.filter-category-chip,
.filter-phrase-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.filter-category-chip {
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(139, 216, 255, 0.22);
  border-radius: 10px;
  color: #c8ecff;
  background: rgba(139, 216, 255, 0.08);
  font-size: 12px;
  font-weight: 950;
}

.filter-phrase-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
}

.filter-text-button:hover,
.filter-text-button:focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.filter-edit-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #2b333f;
  border-radius: 11px;
  padding: 0 11px;
  color: var(--ink);
  background: rgba(7, 10, 15, 0.76);
  font: 800 14px/1 var(--font-ui);
  outline: none;
}

.filter-edit-input:focus {
  border-color: rgba(139, 216, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(139, 216, 255, 0.1);
}

.filter-remove-button,
.filter-confirm-button,
.filter-cancel-edit-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ff9aaa;
  background: rgba(255, 95, 119, 0.12);
}

.filter-confirm-button {
  color: #8df3c2;
  background: rgba(61, 220, 151, 0.12);
}

.filter-cancel-edit-button {
  color: #d9e2ef;
  background: rgba(255, 255, 255, 0.08);
}

.filter-remove-button i,
.filter-confirm-button i,
.filter-cancel-edit-button i {
  width: 15px;
  height: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.alert-jump-item {
  padding: 10px 12px;
  display: grid;
  gap: 5px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.alert-jump-item:hover {
  border-color: rgba(139, 216, 255, 0.28);
  background: rgba(139, 216, 255, 0.1);
}

.alert-jump-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.alert-jump-item strong {
  color: #ffbd6b;
  font-size: 12px;
}

.alert-jump-item p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffe7eb;
}

.message-preview-frame {
  padding: 12px;
  border: 1px solid #2b333f;
  border-radius: 18px;
  background: #080a0f;
}

.message-preview-canvas,
.message-preview-image {
  width: 100%;
  max-height: calc(100vh - 230px);
  height: auto;
  display: block;
  border-radius: 12px;
  image-rendering: auto;
}

.message-preview-image {
  -webkit-touch-callout: default;
  user-select: auto;
}

.message-media-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.message-media-modal.hidden {
  display: none !important;
}

.message-media-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 3, 6, 0.88);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.message-media-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.message-media-close {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: 8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #f8fafc;
  background: rgba(12, 14, 20, 0.82);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

.message-media-close i {
  width: 20px;
  height: 20px;
}

.message-media-image {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border-radius: 16px;
  display: block;
  object-fit: contain;
  background: #050608;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.message-media-modal.is-open .message-media-backdrop {
  animation: modalBackdropIn 160ms ease both;
}

.message-media-modal.is-open .message-media-image {
  animation: messageMediaZoomIn 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.message-media-modal.is-closing .message-media-backdrop {
  animation: modalBackdropOut 160ms ease both;
}

.message-media-modal.is-closing .message-media-image {
  animation: messageMediaZoomOut 150ms ease both;
}

body.message-media-open {
  overflow: hidden;
}

@keyframes messageMediaZoomIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes messageMediaZoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

.mute-command-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.mute-command-input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #2b333f;
  border-radius: 999px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #edf1f7;
  background: rgba(34, 39, 48, 0.42);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 900;
  outline: none;
}

.mute-command-input:focus {
  border-color: rgba(125, 211, 252, 0.72);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.14);
}

.mute-command-row .primary-button,
.mute-command-row .secondary-button {
  min-height: 42px;
  border-radius: 999px;
  white-space: nowrap;
}

.system-account-form {
  width: min(620px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.system-account-profile {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.system-account-head {
  width: 82px;
  height: 82px;
  border: 1px solid #2b333f;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #080a0f;
}

.system-account-head img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  image-rendering: pixelated;
}

.system-account-form label {
  gap: 8px;
}

.system-account-form label span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.system-account-form label span i {
  width: 16px;
  height: 16px;
}

.system-account-form input,
.system-account-form select {
  min-height: 48px;
  border-radius: 16px;
  background: rgba(7, 10, 15, 0.78);
}

.console-server-panel {
  width: min(520px, calc(100vw - 28px));
}

.console-server-form {
  width: 100%;
}

.console-server-form .modal-actions {
  padding-top: 4px;
}

.temporary-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.temporary-password-row .secondary-button {
  min-height: 48px;
  border-radius: 16px;
  white-space: nowrap;
}

.supervision-box {
  margin: 0;
  padding: 18px 20px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.supervision-box legend {
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.supervision-box legend i {
  width: 16px;
  height: 16px;
}

.supervision-tags {
  width: min(420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  justify-items: center;
  gap: 14px 18px;
}

.supervision-tag {
  min-height: 38px;
  min-width: 94px;
  display: grid;
  grid-template-rows: var(--size) 38px;
  justify-items: center;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.supervision-tag span {
  height: 100%;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #2b333f;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9e2ef;
  background: rgba(7, 10, 15, 0.72);
  font-weight: 900;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.supervision-tag:hover .checkmark,
.settings-toggle:hover .checkmark {
  transform: scale(1.1);
}

.supervision-tag input:checked ~ span {
  color: #05070a;
  border-color: transparent;
  background: #f7f8fb;
}

.form-feedback {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 800;
}

.form-feedback.error {
  color: #ff9aaa;
  border-color: rgba(255, 95, 119, 0.24);
  background: rgba(58, 16, 24, 0.42);
}

.form-feedback.success {
  color: #8df3c2;
  border-color: rgba(61, 220, 151, 0.24);
  background: rgba(16, 58, 40, 0.42);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  align-items: start;
}

.settings-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid #292f3a;
  border-radius: 18px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(8, 10, 14, 0.78);
}

.settings-section-head {
  display: grid;
  gap: 3px;
}

.settings-section-head span {
  color: #8f9bab;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-section h3,
.settings-section-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.settings-profile-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid #2b333f;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  background: rgba(7, 10, 15, 0.64);
}

.settings-profile-card img {
  width: 64px;
  height: 64px;
  border: 1px solid #303847;
  border-radius: 16px;
  image-rendering: pixelated;
  background: #080a0f;
}

.settings-profile-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.settings-profile-card small {
  display: block;
  margin: 3px 0 8px;
  color: #98a3b3;
  font-size: 12px;
  font-weight: 800;
}

.settings-tags,
.settings-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.settings-tags span,
.settings-permissions span {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #2b333f;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #d9e2ef;
  background: rgba(7, 10, 15, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.settings-toggle {
  --size: 1.85rem;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #2b333f;
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--size);
  gap: 14px;
  align-items: center;
  color: var(--ink);
  background: rgba(7, 10, 15, 0.58);
  font-weight: 900;
}

.settings-toggle > span {
  justify-self: start;
  text-align: left;
}

.settings-toggle > span strong,
.settings-toggle > span small {
  display: block;
}

.settings-toggle > span strong {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 950;
}

.settings-toggle > span small {
  margin-top: 4px;
  color: #9aa5b5;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.settings-toggle .checkmark {
  justify-self: end;
}

.checkbox-container {
  --size: 2.2rem;
  --active-color: #ffffff;
  --idle-color: #e2e8f0;
  cursor: pointer;
  user-select: none;
}

.settings-toggle.checkbox-container {
  --size: 1.85rem;
}

.settings-range-wrap {
  padding: 14px;
  border: 1px solid #2b333f;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  background: rgba(7, 10, 15, 0.58);
}

.settings-range-wrap.is-disabled {
  opacity: 0.58;
}

.settings-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-range-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-range-head strong {
  min-width: 56px;
  text-align: right;
  font-size: 18px;
  color: var(--ink);
}

.settings-range {
  width: 100%;
  accent-color: #9db0ff;
  cursor: pointer;
}

.settings-range:disabled {
  cursor: not-allowed;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkbox-container .checkmark {
  position: relative;
  flex: 0 0 var(--size);
  width: var(--size);
  height: var(--size);
  border: 3px solid var(--idle-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #05070a;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
  border-color: var(--active-color);
  background-color: var(--active-color);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.26);
}

.checkbox-container input[type="checkbox"]:focus-visible ~ .checkmark {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
}

.checkbox-container .checkmark svg {
  width: 65%;
  height: 65%;
  fill: none;
  stroke: #05070a;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.3s ease 0.1s;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark svg {
  stroke-dashoffset: 0;
}

.checkbox-container input[type="checkbox"]:active ~ .checkmark {
  transform: scale(0.85);
}

.settings-accounts-section {
  grid-column: 1 / -1;
}

.settings-accounts {
  display: grid;
  gap: 9px;
}

.settings-account {
  min-height: 58px;
  padding: 11px;
  border: 1px solid #2b333f;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  background: rgba(7, 10, 15, 0.58);
}

.settings-account img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: #080a0f;
}

.settings-account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-account div span {
  display: block;
  margin-top: 2px;
  color: #8f9bab;
  font-size: 11px;
  font-weight: 800;
  text-transform: lowercase;
}

.settings-account small {
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #303847;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
}

.settings-account.online small {
  color: #8df3c2;
  border-color: rgba(61, 220, 151, 0.22);
  background: rgba(61, 220, 151, 0.08);
}

.settings-account .secondary-button {
  min-height: 34px;
  padding: 0 10px;
}

.settings-account .secondary-button.danger {
  color: #ff9aaa;
  background: rgba(255, 95, 119, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 95, 119, 0.18);
}

.settings-account .secondary-button.danger:hover {
  color: #ffdbe1;
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.22), rgba(255, 95, 119, 0.1)),
    #251820;
  box-shadow:
    inset 0 0 0 1px rgba(255, 95, 119, 0.32),
    0 14px 32px rgba(255, 95, 119, 0.12);
}

.settings-system-users {
  display: grid;
  gap: 9px;
}

.settings-system-users-title {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-system-user {
  min-height: 58px;
  padding: 10px;
  border: 1px solid #2b333f;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  background: rgba(7, 10, 15, 0.58);
}

.settings-system-user img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: #080a0f;
}

.settings-system-user strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.settings-system-user small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-system-user.online small {
  color: #8df3c2;
}

.settings-system-user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.settings-system-user-tags span {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #2b333f;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #d9e2ef;
  background: rgba(255, 255, 255, 0.045);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-system-user .secondary-button {
  min-height: 34px;
  padding: 0 10px;
}

.settings-system-user .secondary-button.danger {
  color: #ff9aaa;
  background: rgba(255, 95, 119, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 95, 119, 0.18);
}

.settings-system-user .secondary-button.danger:hover {
  color: #ffdbe1;
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.22), rgba(255, 95, 119, 0.1)),
    #251820;
}

.modal-empty {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.drawer-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 40;
  width: min(680px, calc(100vw - 36px));
  max-height: min(690px, calc(100vh - 72px));
  overflow-y: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.96);
  transform-origin: center;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-panel.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.connect-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel-strong);
}

.panel-heading {
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.heading-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--white-soft);
}

.panel-heading h2 {
  font-size: 17px;
  line-height: 1.1;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #c4ccd8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    #171c25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.drawer-close:hover {
  color: #ffdbe1;
  border-color: rgba(255, 95, 119, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.16), rgba(255, 95, 119, 0.06)),
    #211720;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 26px rgba(255, 95, 119, 0.1);
  transform: translateY(-1px);
}

.connect-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  outline: none;
  color: var(--ink);
  background: rgba(7, 10, 15, 0.58);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(7, 10, 15, 0.76);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07);
}

input:disabled {
  color: var(--muted);
}

.mode-picker {
  display: grid;
  gap: 10px;
}

.mode-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mode-picker-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.mode-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.mode-button > span,
.mode-button > img {
  position: relative;
  z-index: 1;
}

.mode-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

.mode-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.mode-button.active {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 40px;
  gap: 8px;
}

.session-compact.drawer-panel {
  width: min(430px, calc(100vw - 36px));
  max-height: min(430px, calc(100vh - 72px));
}

.session-compact.connect-panel {
  gap: 12px;
}

.session-compact .mode-picker-heading {
  display: none;
}

.session-compact .mode-buttons,
body[data-stage="server"] .session-compact .mode-buttons {
  grid-template-columns: 1fr;
}

.session-compact .mode-button,
body[data-stage="server"] .session-compact .mode-button {
  min-height: 44px;
}

.session-compact .actions,
body[data-stage="server"] .session-compact .actions {
  grid-template-columns: 1fr 1fr;
}

body[data-stage="server"] #sessionPanel.session-compact {
  width: min(460px, 100%);
}

.primary-button,
.secondary-button,
.icon-button,
.auth-box a {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  color: #05070a;
  background: #f7f8fb;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.08);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.secondary-button,
.icon-button,
.auth-box a {
  color: var(--ink);
  background: var(--white-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.secondary-button:hover,
.icon-button:hover,
.auth-box a:hover {
  background: var(--white-hover);
}

.icon-button {
  padding: 0;
}

.icon-button:has(i[data-lucide="x"]),
.drawer-close,
.chat-composer button:last-child,
.filter-cancel-edit-button {
  border-radius: 12px;
  color: #c4ccd8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    #171c25;
  box-shadow: inset 0 0 0 1px #2b333f, inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-button:has(i[data-lucide="x"]) i,
.drawer-close i,
.chat-composer button:last-child i,
.filter-cancel-edit-button i {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.icon-button:has(i[data-lucide="x"]):hover,
.drawer-close:hover,
.chat-composer button:last-child:hover,
.filter-cancel-edit-button:hover {
  color: #ffdbe1;
  border-color: rgba(255, 95, 119, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.16), rgba(255, 95, 119, 0.06)),
    #211720;
  box-shadow:
    inset 0 0 0 1px rgba(255, 95, 119, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 26px rgba(255, 95, 119, 0.1);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-box {
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  gap: 10px;
  background: rgba(58, 39, 16, 0.5);
}

.auth-box strong {
  color: var(--warning);
  font-size: 30px;
  line-height: 1;
}

.notification-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 220;
  width: min(390px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.console-toast {
  position: relative;
  min-height: 86px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    #12161d;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: auto;
  cursor: pointer;
  animation: toastIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.console-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #8bd8ff;
}

.console-toast.alert::before {
  background: var(--danger);
}

.console-toast.warning::before {
  background: var(--warning);
}

.console-toast.success::before {
  background: var(--success);
}

.console-toast.leaving {
  animation: toastOut 170ms ease both;
}

.console-toast-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #8bd8ff;
  background: rgba(139, 216, 255, 0.1);
}

.console-toast.alert .console-toast-icon {
  color: #ff9aaa;
  background: rgba(255, 95, 119, 0.12);
}

.console-toast.warning .console-toast-icon {
  color: #ffcf92;
  background: rgba(255, 189, 107, 0.12);
}

.console-toast.success .console-toast-icon {
  color: #8df3c2;
  background: rgba(61, 220, 151, 0.12);
}

.console-toast-icon i {
  width: 22px;
  height: 22px;
}

.console-toast-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.console-toast-body span {
  overflow: hidden;
  color: #9aa7b7;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.console-toast-body strong {
  overflow: hidden;
  color: #f8fafc;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.console-toast-body p {
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.3;
}

.console-toast button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #c4ccd8;
  background: rgba(255, 255, 255, 0.055);
}

.console-toast button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.blocked {
  color: #ff9aaa;
}

/* Matte, Grok-like surface pass: flat dark panels, no glass blur. */
.glass-panel,
.floating-nav,
.server-chip,
.status-pill,
.connect-panel,
.monitor-header,
.event.system,
.empty-state,
.auth-box,
.account-tabs,
.account-context-menu,
.image-download-menu,
.system-modal-panel,
.chat-composer {
  background: rgba(16, 19, 25, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #07090d;
  background-size: 42px 42px, 42px 42px, auto;
}

.app-shell::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 180px);
}

.topbar,
.monitor-header,
.account-tabs {
  background: rgba(12, 15, 20, 0.98);
}

.floating-nav,
.server-chip,
.status-pill,
.metric,
.account-tab-group,
.account-context-menu,
.image-download-menu,
.system-modal-panel,
.drawer-panel {
  background: #11151c;
  border-color: #252b35;
}

.metric,
.metric:nth-child(1),
.metric:nth-child(2),
.metric:nth-child(3),
.account-tabs-toggle,
.account-tab-group,
.account-tab-group:has(.account-avatar),
.account-tab-group.active,
.account-tab-group:has(.account-avatar).active {
  background: #151922;
  border-color: #2a303a;
}

.metric:hover,
.account-tabs-toggle:hover,
.account-tab-group:hover,
.account-tab:hover {
  background: #1a202b;
  border-color: #353c49;
}

/* Unified Grok-like hover language: dark surface, quiet border, subtle lift. */
.primary-button,
body[data-stage="server"] .primary-button {
  border: 1px solid #2b333f;
  color: #f4f7fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    #151a22;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.22);
}

.primary-button:hover,
body[data-stage="server"] .primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.auth-box a:hover,
.drawer-close:hover,
.nav-item:hover,
.server-identity-chip:hover,
.metric:hover,
.account-tab-group:hover,
.account-tab:hover,
.account-context-menu button:hover,
.console-context-menu button:hover,
.image-download-menu button:hover,
.account-lobby-menu-item:hover,
.server-address-menu-item:hover,
.alert-jump-item:hover,
.mode-button:hover,
body[data-stage="server"] .mode-button:hover {
  color: #f8fafc;
  border-color: #3a4351;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.04)),
    #1b222d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.26);
}

.primary-button:hover,
body[data-stage="server"] .primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.auth-box a:hover,
.nav-item:hover,
.mode-button:hover,
body[data-stage="server"] .mode-button:hover {
  transform: translateY(-1px);
}

.account-tab-action:hover,
.account-tab-power:hover,
.account-tab-lobby:hover {
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.04)),
    #1b222d;
  box-shadow: inset 0 0 0 1px #3a4351;
}

.account-tab-power.danger:hover,
.account-context-menu button.danger:hover {
  color: #ffdbe1;
  background:
    linear-gradient(180deg, rgba(255, 95, 119, 0.22), rgba(255, 95, 119, 0.1)),
    #251820;
  box-shadow:
    inset 0 0 0 1px rgba(255, 95, 119, 0.32),
    0 14px 32px rgba(255, 95, 119, 0.12);
}

.account-lobby-menu-item:hover,
.account-lobby-menu-item.active,
.server-address-menu-item:hover,
.server-address-menu-item.active {
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.04)),
    #1b222d;
}

.account-add-button {
  border: 1px solid #2b333f;
  color: #f4f7fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    #151a22;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.22);
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 0.16s ease;
}

.account-add-button:hover {
  width: 125px;
  border-color: #3a4351;
  border-radius: 40px;
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    #1b222d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.account-add-button .sign i,
.account-add-button .text {
  color: currentColor;
}

.filter-add-form .primary-button,
body[data-stage="server"] .filter-add-form .primary-button {
  min-height: 42px;
  border-color: #2b333f;
  color: #f4f7fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028)),
    #151a22;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.22);
}

.filter-add-form .primary-button:hover,
body[data-stage="server"] .filter-add-form .primary-button:hover {
  border-color: #3a4351;
  color: #f8fafc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    #1b222d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.account-tab-group.active .account-tab,
.account-tab-group:has(.account-avatar).active .account-tab {
  color: #f5f7fb;
  background: #232a35;
}

.chat-composer {
  background: rgba(18, 22, 29, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.chat-composer input {
  color: #edf1f7;
  background: rgba(34, 39, 48, 0.42);
  border: 1px solid rgba(190, 200, 214, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.chat-composer input::placeholder {
  color: rgba(226, 232, 240, 0.46);
}

.chat-composer input:focus {
  background: rgba(38, 44, 54, 0.52);
  border-color: rgba(226, 232, 240, 0.28);
  box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.055);
}

.input-group {
  position: relative;
  min-width: 0;
}

.chat-input-group {
  height: 52px;
}

.chat-composer .input {
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: solid 1.5px #9e9e9e;
  border-radius: 1rem;
  padding: 1rem;
  outline: none;
  color: #f5f5f5;
  background: none;
  font-size: 1rem;
  box-shadow: none;
  transition: border 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-composer .user-label {
  position: absolute;
  left: 15px;
  top: 0;
  color: #e8e8e8;
  pointer-events: none;
  transform: translateY(1rem);
  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-composer .input:focus,
.chat-composer .input:valid {
  border: 1.5px solid #ffffff;
  background: none;
  box-shadow: none;
}

.chat-composer .input:focus ~ .user-label,
.chat-composer .input:valid ~ .user-label {
  padding: 0 0.2em;
  color: #ffffff;
  background-color: #12161d;
  transform: translateY(-50%) scale(0.8);
}

.chat-composer button:last-child,
.secondary-button,
.icon-button,
.auth-box a {
  background: #1a2029;
  box-shadow: inset 0 0 0 1px #2b333f;
}

.drawer-backdrop,
.system-modal-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(0, 0, 0, 0.68);
}

.drawer-backdrop.open {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hidden {
  display: none !important;
}

@keyframes riseIn {
  from {
    transform: translateY(5px);
    opacity: 0.72;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(14px) scale(0.98);
  }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalBackdropOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalPanelOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
  }

  body,
  .app-shell {
    min-height: 100vh;
    height: auto;
  }

  .app-shell {
    overflow: visible;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .workspace {
    overflow: visible;
  }

  .drawer-panel {
    position: fixed;
    top: 50%;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
    transform: translateY(-46%) scale(0.96);
  }

  .drawer-panel.open {
    transform: translateY(-50%) scale(1);
  }

  body[data-stage="server"] .drawer-panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(760px, 100%);
  }

  .login-card {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .login-visual {
    min-height: 260px;
  }

  .moderation-scope {
    width: 220px;
    height: 220px;
  }

  .login-brand,
  .login-card .login-field,
  .login-card .login-button,
  .login-card .auth-box {
    grid-column: 1;
  }

  .login-brand {
    padding: 0;
  }
}

@media (max-width: 660px) {
  .floating-nav {
    top: 12px;
    width: calc(100% - 20px);
    justify-content: center;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 46px;
  }

  .topbar {
    padding: 86px 14px 14px;
  }

  .server-chip,
  .status-pill {
    width: 100%;
    max-width: none;
  }

  .topbar-meta,
  .status-group {
    width: 100%;
  }

  .topbar-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .monitor-header,
  .form-grid,
  .mode-buttons,
  .actions,
  .event-body {
    grid-template-columns: 1fr;
  }

  .feed {
    padding: 14px 14px 112px;
  }

  .event:not(.system) {
    grid-template-columns: auto auto minmax(74px, max-content) minmax(0, 1fr);
  }

  .event:not(.system) .event-lobby {
    display: none;
  }

  .event:not(.system) .event-identity {
    grid-column: 3;
  }

  .event:not(.system) .event-message,
  .event:not(.system) .event-filter {
    grid-column: 4;
  }

  .stage-view {
    padding: 12px;
  }

  .login-card {
    gap: 18px;
    padding: 16px;
    border-radius: 28px;
  }

  .login-visual {
    min-height: 210px;
    border-radius: 22px;
  }

  .moderation-scope {
    width: 180px;
    height: 180px;
  }

  .ring-two {
    inset: 32px;
  }

  .ring-three {
    inset: 68px;
  }

  .hero-mark {
    width: 70px;
    height: 70px;
  }

  .login-brand h1 {
    font-size: 34px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body,
  .app-shell {
    min-height: 100dvh;
    height: 100dvh;
  }

  .app-shell,
  .workspace {
    overflow: hidden;
  }

  .floating-nav {
    top: auto;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    transform: none;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
  }

  .nav-item {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .nav-tooltip {
    display: none;
  }

  .topbar {
    min-height: auto;
    padding: max(12px, env(safe-area-inset-top)) 12px 10px;
    gap: 10px;
  }

  .brand-block {
    width: 100%;
    gap: 10px;
  }

  .brand-console-mark {
    width: 38px;
    height: 38px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar p {
    max-width: calc(100vw - 76px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .topbar-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .server-chip {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .server-identity-chip {
    min-width: 0;
  }

  .server-chip span,
  .server-ip {
    font-size: 10px;
  }

  .server-chip strong {
    font-size: 12px;
  }

  .user-profile-chip img,
  .server-logo {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .status-group {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .status-pill {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 12px;
  }

  .monitor-panel {
    height: 100%;
  }

  .monitor-header {
    min-height: 48px;
    padding: 7px 12px;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .monitor-header::-webkit-scrollbar,
  .account-tabs::-webkit-scrollbar {
    display: none;
  }

  .metric {
    min-width: 66px;
    min-height: 34px;
    flex: 0 0 auto;
    padding: 7px 10px;
  }

  .account-tabs-toggle {
    width: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    margin-left: auto;
  }

  .system-error-metric {
    margin-left: 0;
  }

  .account-tabs {
    margin: 8px 12px 0;
    padding: 7px;
    gap: 6px;
    border-radius: 16px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }

  .account-tab-group,
  .account-add-button {
    scroll-snap-align: start;
  }

  .account-tab,
  .account-tab-action,
  .account-tab-power,
  .account-tab-lobby {
    min-height: 38px;
  }

  .account-tab {
    max-width: 190px;
    padding: 7px 10px;
  }

  .account-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .account-tab small {
    display: none;
  }

  .account-tab-action,
  .account-tab-power,
  .account-tab-lobby {
    width: 38px;
  }

  .account-add-button,
  .account-add-button:hover {
    width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: 50%;
  }

  .account-add-button .text,
  .account-add-button:hover .text {
    display: none;
  }

  .account-add-button .sign,
  .account-add-button:hover .sign {
    width: 100%;
    padding-left: 0;
  }

  .feed {
    padding: 12px 10px calc(96px + env(safe-area-inset-bottom));
    gap: 6px;
    font-size: 12px;
  }

  .event {
    padding: 8px 9px;
  }

  .event:not(.system) {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 8px;
  }

  .event:not(.system) .event-kind,
  .event:not(.system) .event-time,
  .event:not(.system) .event-identity,
  .event:not(.system) .event-message,
  .event:not(.system) .event-filter,
  .event.raw-event:not(.system) .event-message,
  .event.raw-event:not(.system) .event-filter {
    grid-column: auto;
  }

  .event:not(.system) .event-kind {
    grid-column: 1;
  }

  .event:not(.system) .event-time {
    grid-column: 2;
  }

  .event:not(.system) .event-lobby {
    display: none;
  }

  .event:not(.system) .event-identity {
    grid-column: 1 / -1;
  }

  .event:not(.system) .event-message,
  .event:not(.system) .event-filter,
  .event.raw-event:not(.system) .event-message,
  .event.raw-event:not(.system) .event-filter {
    grid-column: 1 / -1;
  }

  .event-user {
    max-width: 100%;
  }

  .chat-composer {
    left: 10px;
    right: 10px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
  }

  .chat-composer > div:first-child {
    grid-column: 1 / -1;
    padding: 0 2px;
  }

  .chat-composer .chat-input-group {
    height: 46px;
  }

  .chat-composer .input {
    height: 46px;
    min-height: 46px;
    padding: 0.9rem 0.85rem;
    font-size: 16px;
  }

  .chat-composer button {
    width: 42px;
    height: 42px;
  }

  .drawer-panel {
    top: auto;
    right: 8px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: min(78dvh, 720px);
    border-radius: 22px;
    transform: translateY(18px) scale(0.98);
  }

  .drawer-panel.open {
    transform: translateY(0) scale(1);
  }

  .connect-panel {
    padding: 12px;
    gap: 10px;
  }

  .drawer-heading {
    min-height: 58px;
    padding-bottom: 10px;
  }

  body[data-stage="server"] .workspace {
    display: block;
    padding: 10px;
    overflow: auto;
  }

  body[data-stage="server"] #sessionPanel,
  body[data-stage="server"] .drawer-panel {
    width: 100%;
    max-height: none;
    margin: 0;
  }

  body[data-stage="server"] .connect-panel {
    border-radius: 22px;
  }

  body[data-stage="server"] .drawer-heading::after {
    display: none;
  }

  .form-grid,
  body[data-stage="server"] .form-grid,
  .actions,
  body[data-stage="server"] .actions {
    grid-template-columns: 1fr;
  }

  .mode-buttons,
  body[data-stage="server"] .mode-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-picker-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  input,
  select,
  .primary-button,
  .secondary-button,
  .icon-button,
  .auth-box a {
    min-height: 44px;
  }

  .system-modal {
    align-items: end;
    padding: 8px;
  }

  .system-modal-panel {
    width: 100%;
    max-height: min(86dvh, calc(100dvh - 18px));
    border-radius: 22px 22px 16px 16px;
  }

  .system-modal-header {
    min-height: 62px;
    padding: 12px 14px;
  }

  .modal-view {
    padding: 12px;
  }

  .filter-add-form,
  .mute-command-row,
  .temporary-password-row,
  .settings-grid,
  .settings-account,
  .settings-system-user,
  .system-account-profile {
    grid-template-columns: 1fr;
  }

  .filters-list-head {
    display: none;
  }

  .filter-text-button,
  .filter-item.editing {
    grid-template-columns: 1fr;
  }

  .filter-item {
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: start;
  }

  .filter-item.editing {
    grid-template-columns: 1fr 34px 34px;
  }

  .filter-item.editing .filter-edit-input.phrase {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .settings-account,
  .settings-system-user {
    align-items: start;
  }

  .settings-account img,
  .settings-system-user img {
    grid-row: span 2;
  }

  .settings-account .secondary-button,
  .settings-system-user .secondary-button {
    width: 100%;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .system-account-head {
    width: 76px;
    height: 76px;
  }

  .supervision-tags {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .supervision-tag {
    min-width: 0;
    grid-template-columns: var(--size) minmax(0, 1fr);
    grid-template-rows: none;
    justify-items: start;
  }

  .supervision-tag span {
    width: 100%;
  }

  .account-context-menu,
  .console-context-menu,
  .image-download-menu,
  .account-lobby-menu,
  .server-address-menu {
    max-width: calc(100vw - 16px);
  }

  .notification-stack {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    left: 10px;
    width: auto;
  }

  .console-toast {
    min-height: 78px;
    grid-template-columns: 40px minmax(0, 1fr) 34px;
    gap: 10px;
    border-radius: 16px;
  }

  .console-toast-icon {
    width: 40px;
    height: 40px;
  }

  .console-toast-body strong {
    font-size: 13px;
  }

  .console-toast-body p {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .topbar-meta {
    grid-template-columns: 1fr;
  }

  .user-profile-chip,
  .server-identity-chip {
    width: 100%;
  }

  .mode-buttons,
  body[data-stage="server"] .mode-buttons {
    grid-template-columns: 1fr;
  }

  .login-card {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .login-brand h1,
  .login-brand .console-wordmark {
    font-size: 30px;
  }
}

/* Grok skin: flat black surfaces, quiet borders, no glass mode. */
:root {
  --bg: #000000;
  --bg-2: #050505;
  --panel: #101113;
  --panel-strong: #141518;
  --glass: none;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --soft: #71717a;
  --line: #27272a;
  --line-strong: #3f3f46;
  --white-soft: #1f1f23;
  --white-hover: #27272a;
  --accent: #ffffff;
  --success: #22c55e;
  --success-soft: #102016;
  --cyan: #e4e4e7;
  --cyan-soft: #18181b;
  --blue: #e4e4e7;
  --blue-soft: #18181b;
  --server-gold: #eab308;
  --server-gold-soft: #211b07;
  --purple: #d4d4d8;
  --purple-soft: #18181b;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-soft: #260d0d;
  --shadow: none;
  --shadow-soft: none;
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --font-ui: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  color: var(--ink);
  background: #000000 !important;
  background-image: none !important;
}

.app-shell::before,
.login-orbit,
.scope-ring,
.scope-ping,
.scope-scan,
.moderation-line,
.mode-button::before,
.drawer-heading::after,
body[data-stage="server"] .drawer-heading::after {
  display: none !important;
}

.login-card {
  width: min(480px, calc(100vw - 32px));
  grid-template-columns: 1fr !important;
  gap: 24px;
}

.login-visual {
  display: none !important;
}

.console-symbol,
.hero-mark,
.server-logo,
.account-avatar,
.mode-icon {
  filter: none !important;
  box-shadow: none !important;
}

.glass-panel,
.login-card,
.floating-nav,
.topbar,
.monitor-header,
.monitor-panel,
.account-tabs,
.drawer-panel,
.connect-panel,
.server-chip,
.status-pill,
.server-identity-chip,
.user-profile-chip,
.metric,
.event,
.event.system,
.empty-state,
.auth-box,
.account-tab-group,
.account-context-menu,
.console-context-menu,
.account-lobby-menu,
.server-address-menu,
.image-download-menu,
.system-modal-panel,
.chat-composer,
.console-toast,
.filter-profile-card,
.settings-profile-card,
.settings-account,
.profile-overview-card,
.supervision-card {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.topbar,
.monitor-header,
.account-tabs {
  background: #050505 !important;
}

.monitor-panel,
.workspace,
.feed,
.login-view {
  background: #000000 !important;
  background-image: none !important;
}

.drawer-backdrop,
.system-modal-backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.floating-nav,
.account-tabs,
.metric,
.server-identity-chip,
.user-profile-chip,
.account-tab-group,
.account-tab,
.account-tab-action,
.account-tab-power,
.account-tab-lobby,
.account-add-button,
.nav-item,
.primary-button,
.secondary-button,
.icon-button,
.auth-box a,
.drawer-close,
.mode-button,
.account-context-menu button,
.console-context-menu button,
.account-lobby-menu-item,
.server-address-menu-item,
.alert-jump-item,
.image-download-menu button,
input,
select,
textarea,
.chat-composer .input,
.console-toast,
.system-modal-panel,
.connect-panel,
.login-card {
  border-radius: 8px !important;
}

input,
select,
textarea,
.chat-composer input,
.chat-composer .input {
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  background: #050505 !important;
  background-image: none !important;
  box-shadow: none !important;
}

input:hover,
select:hover,
textarea:hover,
.chat-composer input:hover,
.chat-composer .input:hover {
  border-color: var(--line-strong) !important;
}

input:focus,
select:focus,
textarea:focus,
.chat-composer input:focus,
.chat-composer .input:focus {
  border-color: #f4f4f5 !important;
  background: #000000 !important;
  box-shadow: none !important;
}

.primary-button,
body[data-stage="server"] .primary-button {
  color: #000000 !important;
  border: 1px solid #f4f4f5 !important;
  background: #f4f4f5 !important;
  background-image: none !important;
  box-shadow: none !important;
}

.primary-button:hover,
body[data-stage="server"] .primary-button:hover {
  color: #000000 !important;
  border-color: #ffffff !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.secondary-button,
.icon-button,
.auth-box a,
.drawer-close,
.nav-item,
.mode-button,
.account-tab,
.account-tab-action,
.account-tab-power,
.account-tab-lobby,
.account-context-menu button,
.console-context-menu button,
.account-lobby-menu-item,
.server-address-menu-item,
.alert-jump-item,
.image-download-menu button {
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  background: #101113 !important;
  background-image: none !important;
  box-shadow: none !important;
}

.secondary-button:hover,
.icon-button:hover,
.auth-box a:hover,
.drawer-close:hover,
.nav-item:hover,
.mode-button:hover,
body[data-stage="server"] .mode-button:hover,
.account-tab:hover,
.account-tab-action:hover,
.account-tab-power:hover,
.account-tab-lobby:hover,
.account-context-menu button:hover,
.console-context-menu button:hover,
.account-lobby-menu-item:hover,
.server-address-menu-item:hover,
.alert-jump-item:hover,
.image-download-menu button:hover,
.metric:hover,
.account-tab-group:hover,
.server-identity-chip:hover,
.user-profile-chip:hover {
  color: #ffffff !important;
  border-color: var(--line-strong) !important;
  background: #18181b !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.nav-item.active,
.mode-button.active,
.account-tab-group.active,
.account-tab-group:has(.account-avatar).active,
.account-lobby-menu-item.active,
.server-address-menu-item.active {
  color: #ffffff !important;
  border-color: #52525b !important;
  background: #27272a !important;
  background-image: none !important;
  box-shadow: none !important;
}

.account-tab-group.active .account-tab,
.account-tab-group:has(.account-avatar).active .account-tab {
  color: #ffffff !important;
  background: #27272a !important;
  background-image: none !important;
}

.account-add-button,
.account-add-button:hover {
  color: #000000 !important;
  border: 1px solid #f4f4f5 !important;
  background: #f4f4f5 !important;
  background-image: none !important;
  box-shadow: none !important;
}

.account-add-button .sign i,
.account-add-button .text {
  color: #000000 !important;
}

.nav-item.nav-danger,
.account-tab-power.danger,
.secondary-button.danger,
.account-context-menu button.danger {
  color: #fca5a5 !important;
}

.nav-item.nav-danger:hover:not(:disabled),
.account-tab-power.danger:hover,
.secondary-button.danger:hover,
.account-context-menu button.danger:hover {
  color: #fecaca !important;
  border-color: #7f1d1d !important;
  background: #1f0b0b !important;
  background-image: none !important;
  box-shadow: none !important;
}

.status-dot,
.status-dot.connected,
.status-dot.connecting,
.status-dot.reconnecting,
.status-dot.kicked {
  box-shadow: none !important;
}

.status-pill,
.status-group:has(.status-dot.connected) .status-pill,
.status-group:has(.status-dot.reconnecting) .status-pill,
.status-group:has(.status-dot.kicked) .status-pill {
  color: var(--muted) !important;
  border-color: var(--line) !important;
  background: #101113 !important;
}

.event {
  border-bottom: 1px solid var(--line) !important;
}

.event.alert,
.event.warn,
.event.error,
.console-toast.danger {
  border-color: #3f1d1d !important;
  background: #120707 !important;
}

.event.system,
.console-toast.success {
  border-color: var(--line) !important;
  background: #101113 !important;
}

.notification-stack .console-toast {
  background: #101113 !important;
}

/* Rounded Grok correction: keep the matte colors, bring back the softer app shape. */
.floating-nav {
  gap: 6px !important;
  padding: 7px !important;
  border-radius: 999px !important;
  background: #101113 !important;
  border: 1px solid #27272a !important;
}

.nav-item {
  width: 46px !important;
  height: 46px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.nav-item:hover {
  background: #202124 !important;
}

.nav-item.active {
  background: #27272a !important;
}

.login-card,
.connect-panel,
.drawer-panel,
.system-modal-panel,
.account-context-menu,
.console-context-menu,
.account-lobby-menu,
.server-address-menu,
.image-download-menu,
.console-toast {
  border-radius: 22px !important;
}

.monitor-header,
.account-tabs,
.chat-composer,
.empty-state,
.event.system,
.auth-box,
.filter-profile-card,
.settings-profile-card,
.settings-account,
.profile-overview-card,
.supervision-card {
  border-radius: 16px !important;
}

.metric,
.server-chip,
.status-pill,
.server-identity-chip,
.user-profile-chip,
.account-tab-group,
.account-tab,
.account-tab-action,
.account-tab-power,
.account-tab-lobby,
.account-add-button,
.primary-button,
.secondary-button,
.icon-button,
.auth-box a,
.mode-button,
.account-context-menu button,
.console-context-menu button,
.account-lobby-menu-item,
.server-address-menu-item,
.alert-jump-item,
.image-download-menu button {
  border-radius: 999px !important;
}

input,
select,
textarea,
.chat-composer input,
.chat-composer .input {
  border-radius: 14px !important;
}

.drawer-close {
  border-radius: 14px !important;
}

.icon-button:has(i[data-lucide="refresh-cw"]),
.icon-button:has(i[data-lucide="trash-2"]),
.icon-button:has(i[data-lucide="x"]),
.icon-button:has(.lucide-refresh-cw),
.icon-button:has(.lucide-trash-2),
.icon-button:has(.lucide-x),
.workflow-canvas-toolbar .icon-button,
.drawer-close,
.chat-composer button:last-child,
.filter-remove-button,
.filter-cancel-edit-button,
.console-toast button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #d4d4d8 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.icon-button:has(i[data-lucide="refresh-cw"]):hover,
.icon-button:has(i[data-lucide="trash-2"]):hover,
.icon-button:has(i[data-lucide="x"]):hover,
.icon-button:has(.lucide-refresh-cw):hover,
.icon-button:has(.lucide-trash-2):hover,
.icon-button:has(.lucide-x):hover,
.workflow-canvas-toolbar .icon-button:hover,
.drawer-close:hover,
.chat-composer button:last-child:hover,
.filter-remove-button:hover,
.filter-cancel-edit-button:hover,
.console-toast button:hover {
  color: #ffffff !important;
  border-color: transparent !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Topbar chips should feel Grok-like, not pill-shaped. */
.server-chip,
.server-identity-chip,
.user-profile-chip {
  border-radius: 18px !important;
}

.server-logo,
.server-fallback-icon,
.system-avatar,
.user-profile-chip img {
  border-radius: 12px !important;
}

.status-pill {
  border-radius: 14px !important;
}

/* Bot context menu: text rows instead of boxed buttons. */
.account-context-menu button {
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.account-context-menu button:hover {
  border: 0 !important;
  background: #18181b !important;
  box-shadow: none !important;
}

.account-context-menu button:disabled {
  background: transparent !important;
  box-shadow: none !important;
}

.account-context-menu {
  border: 1px solid #2f3035 !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) !important;
}

.account-lobby-menu {
  border: 1px solid #2f3035 !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.account-lobby-menu::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

.account-lobby-menu-item {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.account-lobby-menu-item:hover,
.account-lobby-menu-item.active {
  border: 0 !important;
  background: #18181b !important;
  box-shadow: none !important;
}

/* Modern topbar pass: richer Grok-style identity chips without glass. */
.topbar {
  min-height: 112px !important;
  padding: 84px 22px 14px !important;
  gap: 18px !important;
  border-bottom: 1px solid #1f1f23 !important;
  background: #000000 !important;
}

.topbar-meta {
  gap: 12px !important;
}

.server-chip,
.server-identity-chip,
.user-profile-chip {
  position: relative;
  min-height: 84px !important;
  padding: 14px 18px 14px 16px !important;
  gap: 14px !important;
  border: 1px solid #2b2c31 !important;
  border-radius: 18px !important;
  background: #0d0e11 !important;
  overflow: hidden;
}

.server-chip::before,
.server-identity-chip::before,
.user-profile-chip::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: #f4f4f5;
  opacity: 0.34;
}

.server-chip:hover,
.server-identity-chip:hover,
.user-profile-chip:hover {
  border-color: #3f4046 !important;
  background: #121317 !important;
}

.user-profile-chip {
  min-width: 176px !important;
}

.server-identity-chip {
  min-width: 278px !important;
}

.user-profile-chip img,
.server-logo,
.server-identity-chip > i {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
  border: 1px solid #303136 !important;
  border-radius: 14px !important;
  padding: 4px !important;
  background: #18191d !important;
}

.server-identity-chip > i {
  padding: 11px !important;
  color: #f4f4f5 !important;
}

.server-chip span {
  color: #a1a1aa !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

.server-chip strong {
  margin-top: 3px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.server-chip small,
.server-ip {
  margin-top: 5px !important;
  color: #c4c4cc !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.system-tag {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 7px !important;
  padding: 3px 8px !important;
  border: 1px solid #34346a !important;
  border-radius: 999px !important;
  color: #c7c7ff !important;
  background: #151538 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.system-tag.hidden {
  display: none !important;
}

/* Grok-style tagged system card: tag color as a restrained accent. */
.user-profile-chip {
  --tag-color: #ffffff;
  border-color: color-mix(in srgb, var(--tag-color) 26%, #2a2b30 74%) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tag-color) 12%, transparent), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #101113 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 3px 0 0 color-mix(in srgb, var(--tag-color) 52%, transparent),
    0 0 26px color-mix(in srgb, var(--tag-color) 10%, transparent) !important;
}

.user-profile-chip img {
  border: 1px solid color-mix(in srgb, var(--tag-color) 34%, #3f3f46 66%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px color-mix(in srgb, var(--tag-color) 14%, transparent) !important;
}

.user-profile-chip .system-tag {
  min-height: 18px !important;
  margin-top: 5px !important;
  padding: 2px 7px !important;
  border: 1px solid color-mix(in srgb, var(--tag-color) 34%, #3f3f46 66%) !important;
  border-radius: 7px !important;
  color: color-mix(in srgb, var(--tag-color) 76%, #ffffff 24%) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tag-color) 10%, transparent), transparent),
    #111216 !important;
  box-shadow: none !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: 0.05em !important;
  text-shadow: none !important;
}

/* Responses modal placeholder. */
.responses-metric i,
.responses-metric strong {
  color: #d4d4d8 !important;
}

.staff-chat-command-button {
  min-width: 112px;
}

.staff-chat-command-button i,
.staff-chat-command-button strong {
  color: #8ec5ff !important;
}

.staff-chat-command-button:hover,
.staff-chat-command-button:focus-visible {
  border-color: rgba(96, 165, 250, 0.3);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.13), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.staff-chat-command-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.responses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.response-option-button {
  min-height: 118px;
  padding: 18px;
  border: 1px solid #2a2b30;
  border-radius: 20px;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    #141518;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 16px 34px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  font-weight: 950;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.response-option-button:hover {
  border-color: #4a4b52;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), transparent),
    #1a1c21;
  transform: translateY(-1px);
}

.response-option-button i {
  width: 28px;
  height: 28px;
  color: #f4f4f5;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.system-modal.is-responses-modal .system-modal-backdrop {
  background: rgba(0, 0, 0, 0.58) !important;
  backdrop-filter: blur(16px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.18) !important;
}

.system-modal.is-responses-modal .system-modal-panel {
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.105), transparent 34%),
    linear-gradient(180deg, rgba(22, 24, 29, 0.88), rgba(13, 14, 17, 0.82)) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 36px 100px rgba(0, 0, 0, 0.64) !important;
}

.system-modal.is-responses-modal .system-modal-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(18, 19, 23, 0.62) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.system-modal.is-responses-modal .response-option-button {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    rgba(18, 19, 23, 0.58);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

.system-modal.is-responses-modal .response-option-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.145), rgba(255, 255, 255, 0.04)),
    rgba(26, 28, 33, 0.7);
}

.liquid-response-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(12, 13, 16, 0.58) !important;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.liquid-button-bg {
  position: absolute;
  inset: -1px;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0.76;
}

.liquid-button-blob,
.liquid-button-bridge {
  position: absolute;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(244, 244, 245, 0.22), rgba(113, 113, 122, 0.14)),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 14px 30px rgba(0, 0, 0, 0.24);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease, opacity 420ms ease;
}

.liquid-button-blob-1 {
  width: 42%;
  height: 100%;
  left: -4%;
  top: 0;
  animation: searchBlobFloat 7s infinite alternate ease-in-out;
}

.liquid-button-blob-2 {
  width: 38%;
  height: 100%;
  right: -4%;
  top: 0;
  animation: searchBlobFloat 8s infinite alternate-reverse ease-in-out;
}

.liquid-button-bridge {
  width: 72%;
  height: 52%;
  left: 14%;
  top: 24%;
  opacity: 0.7;
}

.liquid-button-content {
  position: relative;
  z-index: 1;
  width: calc(100% - 28px);
  min-height: 82px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  display: grid;
  place-items: center;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(7, 8, 10, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 30px rgba(0, 0, 0, 0.24);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background 220ms ease;
}

.liquid-response-button:hover,
.liquid-response-button:focus-visible {
  transform: translateY(-2px);
}

.liquid-response-button:hover .liquid-button-content,
.liquid-response-button:focus-visible .liquid-button-content {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.038)),
    rgba(11, 12, 15, 0.78);
}

.liquid-response-button:hover .liquid-button-blob-1,
.liquid-response-button:focus-visible .liquid-button-blob-1 {
  transform: scale(1.1) translateX(-12px);
  filter: brightness(1.18);
}

.liquid-response-button:hover .liquid-button-blob-2,
.liquid-response-button:focus-visible .liquid-button-blob-2 {
  transform: scale(1.1) translateX(12px);
  filter: brightness(1.18);
}

.liquid-response-button .liquid-button-content i {
  width: 28px;
  height: 28px;
  color: #f4f4f5;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.36));
}

.liquid-response-button .liquid-button-content span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.responses-detail {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.responses-detail-enter {
  animation: responsesPanelIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.responses-detail-enter .responses-detail-head,
.responses-detail-enter .responses-search {
  animation: responsesControlIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.responses-detail-enter .responses-search {
  animation-delay: 45ms;
}

.responses-detail-exit {
  animation: responsesPanelOut 180ms ease both;
}

.responses-detail-exit .response-template-card,
.responses-detail-exit .responses-detail-head,
.responses-detail-exit .responses-search {
  animation: responsesControlOut 160ms ease both;
}

.responses-home-enter .liquid-response-button {
  animation: responseHomeButtonIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.responses-home-enter .liquid-response-button:nth-child(2) {
  animation-delay: 55ms;
}

.responses-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.responses-detail-head .secondary-button {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.responses-detail-head .secondary-button i {
  width: 16px;
  height: 16px;
}

.responses-detail-head > span {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.responses-search {
  --search-accent: #f4f4f5;
  position: relative;
  width: min(520px, 100%);
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  background: transparent;
  isolation: isolate;
}

.responses-search-row {
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.responses-search-row .responses-search {
  width: 100%;
}

.response-create-trigger {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(7, 8, 10, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 34px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.response-create-trigger i {
  width: 18px;
  height: 18px;
}

.response-create-trigger:hover,
.response-create-trigger:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(10, 11, 14, 0.82);
}

.responses-search:focus-within {
  border-color: transparent;
  background: transparent;
}

.responses-search .gooey-background-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0.76;
  filter: blur(0.2px);
}

.responses-search .blob,
.responses-search .blob-bridge {
  position: absolute;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(244, 244, 245, 0.26), rgba(113, 113, 122, 0.18)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease, opacity 420ms ease;
}

.responses-search .blob-1 {
  width: 34%;
  height: 100%;
  left: 0;
  top: 0;
  animation: searchBlobFloat 6s infinite alternate ease-in-out;
}

.responses-search .blob-2 {
  width: 30%;
  height: 100%;
  right: 0;
  top: 0;
  animation: searchBlobFloat 8s infinite alternate-reverse ease-in-out;
}

.responses-search .blob-3 {
  width: 52%;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  opacity: 0.72;
}

.responses-search .blob-bridge {
  width: 82%;
  height: 38px;
  left: 9%;
  top: 14px;
  opacity: 0.82;
}

.responses-search .input-overlay {
  position: relative;
  z-index: 1;
  width: calc(100% - 34px);
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(7, 8, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 34px rgba(0, 0, 0, 0.32);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, background 220ms ease;
}

.responses-search .search-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f4f5;
  opacity: 0.92;
}

.responses-search .search-icon-wrapper i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.responses-search input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

.responses-search input::placeholder {
  color: #71717a !important;
}

.responses-search input:hover,
.responses-search input:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.responses-search .focus-indicator {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.5);
  transition: width 260ms ease;
}

.responses-search:focus-within .input-overlay {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(10, 11, 14, 0.82);
}

.responses-search:focus-within .focus-indicator {
  width: 38%;
}

.responses-search:focus-within .blob-1 {
  transform: scale(1.08) translateX(-10px);
  filter: brightness(1.18);
}

.responses-search:focus-within .blob-2 {
  transform: scale(1.08) translateX(10px);
  filter: brightness(1.18);
}

.responses-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px;
  max-height: min(58dvh, 560px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.responses-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.response-template-card {
  min-height: 170px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px;
  background:
    linear-gradient(145deg, rgba(255, 35, 35, 0.1), transparent 42%),
    rgba(18, 19, 23, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 18px 36px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.response-template-badge {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(255, 80, 80, 0.28);
  border-radius: 999px;
  color: #ff7878;
  background: rgba(255, 0, 0, 0.1);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.response-template-status {
  color: #ff3b3b;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.response-template-card p {
  margin: 0;
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: normal;
}

.response-copy-hint {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 900;
  opacity: 0.64;
  transform: translateY(2px);
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease, background 160ms ease;
}

.response-copy-hint i {
  width: 15px;
  height: 15px;
}

.response-template-card:hover,
.response-template-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 35, 35, 0.15), transparent 44%),
    rgba(24, 25, 30, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 22px 44px rgba(0, 0, 0, 0.3);
}

.response-template-card:hover .response-copy-hint,
.response-template-card:focus-visible .response-copy-hint {
  opacity: 1;
  transform: translateY(0);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.105);
}

.response-template-card.copied {
  animation: responseCopiedPulse 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  border-color: rgba(134, 239, 172, 0.56) !important;
}

.response-template-card.copied .response-copy-hint {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.32);
  background: rgba(34, 197, 94, 0.12);
  opacity: 1;
}

.response-template-card.copied .response-copy-hint span {
  font-size: 0;
}

.response-template-card.copied .response-copy-hint span::after {
  content: "Copiado";
  font-size: 12px;
}

.responses-list .response-template-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "badge hint"
    "status hint"
    "message hint" !important;
  align-items: center !important;
  column-gap: 18px !important;
  row-gap: 8px !important;
  min-height: 112px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.responses-detail-enter .responses-list .response-template-card {
  animation: responseCardIn 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--response-index, 0) * 34ms + 70ms);
}

.responses-list .response-template-badge {
  grid-area: badge !important;
}

.responses-list .response-template-status {
  grid-area: status !important;
}

.responses-list .response-template-card p {
  grid-area: message !important;
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

.responses-list .response-copy-hint {
  grid-area: hint !important;
  align-self: center !important;
  justify-self: end !important;
}

.responses-list[data-response-category="atendimento"] .response-template-card {
  background:
    linear-gradient(145deg, rgba(20, 145, 78, 0.18), transparent 44%),
    rgba(18, 19, 23, 0.58);
}

.responses-list[data-response-category="atendimento"] .response-template-badge {
  border-color: rgba(74, 222, 128, 0.34);
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.responses-list[data-response-category="atendimento"] .response-template-status {
  color: #4ade80;
}

.responses-list[data-response-category="atendimento"] .response-template-card:hover,
.responses-list[data-response-category="atendimento"] .response-template-card:focus-visible {
  background:
    linear-gradient(145deg, rgba(22, 163, 74, 0.22), transparent 46%),
    rgba(24, 25, 30, 0.76);
}

.response-template-card.response-template-custom-color {
  background:
    linear-gradient(145deg, rgba(var(--response-custom-rgb, 255, 35, 35), 0.22), transparent 46%),
    rgba(18, 19, 23, 0.58) !important;
}

.response-template-card.response-template-custom-color .response-template-badge {
  border-color: rgba(var(--response-custom-rgb, 255, 35, 35), 0.5) !important;
  color: var(--response-custom-color, #ff7878) !important;
  background: rgba(var(--response-custom-rgb, 255, 35, 35), 0.16) !important;
}

.response-template-card.response-template-custom-color .response-template-status {
  color: var(--response-custom-color, #ff3b3b) !important;
}

.response-template-card.response-template-custom-color:hover,
.response-template-card.response-template-custom-color:focus-visible {
  background:
    linear-gradient(145deg, rgba(var(--response-custom-rgb, 255, 35, 35), 0.3), transparent 48%),
    rgba(24, 25, 30, 0.76) !important;
}

.responses-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  font-size: 14px;
  font-weight: 850;
}

.response-full-view {
  display: grid;
  gap: 14px;
}

.response-create-form {
  display: grid;
  gap: 12px;
}

.response-create-form label {
  display: grid;
  gap: 6px;
}

.response-create-form label > span,
.response-color-picker > span {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.response-create-form input,
.response-create-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 11px 12px;
  color: #ffffff;
  background: rgba(8, 10, 14, 0.7);
  font: 700 14px/1.4 var(--font-ui);
}

.response-create-form textarea {
  min-height: 170px;
  resize: vertical;
}

.response-import-field {
  display: grid;
  gap: 6px;
}

.response-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.response-import-row .secondary-button {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.response-create-form input:focus,
.response-create-form textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.response-color-picker {
  display: grid;
  gap: 8px;
}

.container-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.item-color {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  outline: none;
  border-radius: 7px;
  background: transparent;
  transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
  cursor: pointer;
}

.item-color::after {
  position: absolute;
  content: "";
  inset: 0;
  border-radius: 7px;
  background-color: var(--color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 14px rgba(0, 0, 0, 0.26);
  transform: scale(1);
  transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.item-color::before {
  position: absolute;
  content: attr(data-color);
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 6px;
  color: #18181b;
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.item-color:hover {
  transform: scale(1.2);
  z-index: 9;
}

.item-color:hover::before,
.item-color:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.item-color:hover + .item-color {
  transform: scale(1.1);
}

.item-color.is-selected::after {
  transform: scale(1.08);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.88),
    0 7px 18px rgba(0, 0, 0, 0.34);
}

.response-full-body {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 35, 35, 0.1), transparent 42%),
    rgba(18, 19, 23, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.response-full-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #f4f4f5;
  font: 750 14px/1.42 var(--font-ui);
}

.response-full-text strong {
  font-weight: 900;
  color: #ffffff;
}

.response-inline-color {
  font-weight: 900;
}

.response-template-context-menu {
  z-index: 260 !important;
  width: 220px;
}

#responseFullModalContent.response-full-enter .response-full-view {
  animation: responseFullIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#responseFullModalContent.response-full-exit .response-full-view {
  animation: responseFullOut 180ms ease both;
}

#responseCreateModalContent.response-create-enter .response-create-form {
  animation: responseCreateIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#responseCreateModalContent.response-create-exit .response-create-form {
  animation: responseCreateOut 180ms ease both;
}

@keyframes responseFullIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes responseFullOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

@keyframes responseCreateIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes responseCreateOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

@keyframes responsesPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes responsesControlIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes responsesPanelOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    filter: blur(4px);
  }
}

@keyframes responsesControlOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes responseHomeButtonIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes responseCopiedPulse {
  0% {
    transform: translateY(-2px) scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.11),
      0 22px 44px rgba(0, 0, 0, 0.3);
  }

  45% {
    transform: translateY(-3px) scale(1.012);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 1px rgba(134, 239, 172, 0.26),
      0 24px 52px rgba(34, 197, 94, 0.12);
  }

  100% {
    transform: translateY(-2px) scale(1);
  }
}

@keyframes responseCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    border-color: rgba(255, 80, 80, 0.28);
  }

  62% {
    border-color: rgba(255, 80, 80, 0.38);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes searchBlobFloat {
  0% {
    border-radius: 38% 62% 68% 32% / 44% 48% 58% 52%;
    translate: 0 0;
  }

  50% {
    border-radius: 62% 38% 52% 48% / 34% 62% 42% 66%;
    translate: 4px -3px;
  }

  100% {
    border-radius: 48% 52% 34% 66% / 62% 40% 60% 38%;
    translate: -4px 3px;
  }
}

@media (max-width: 760px) {
  .responses-grid {
    grid-template-columns: 1fr;
  }

  .responses-list {
    max-height: 62dvh;
  }

  .responses-list .response-template-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "badge"
      "status"
      "message"
      "hint" !important;
  }

  .responses-list .response-copy-hint {
    justify-self: end !important;
    margin-top: 6px !important;
  }
}

.status-group {
  gap: 10px !important;
  padding-left: 2px !important;
}

.status-dot {
  width: 10px !important;
  height: 10px !important;
  border: 2px solid #000000 !important;
  outline: 1px solid #3f3f46 !important;
}

.status-pill,
.status-group:has(.status-dot.connected) .status-pill,
.status-group:has(.status-dot.connecting) .status-pill,
.status-group:has(.status-dot.reconnecting) .status-pill,
.status-group:has(.status-dot.error) .status-pill,
.status-group:has(.status-dot.kicked) .status-pill {
  min-width: 96px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2b2c31 !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #d4d4d8 !important;
  background: #0d0e11 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.status-group:has(.status-dot.connected) .status-pill {
  color: #bbf7d0 !important;
  border-color: #22402d !important;
  background: #07140c !important;
}

.status-group:has(.status-dot.connecting) .status-pill,
.status-group:has(.status-dot.reconnecting) .status-pill {
  color: #fde68a !important;
  border-color: #493817 !important;
  background: #171203 !important;
}

.status-group:has(.status-dot.error) .status-pill,
.status-group:has(.status-dot.kicked) .status-pill {
  color: #fecaca !important;
  border-color: #4b1d1d !important;
  background: #190707 !important;
}

/* Topbar polish: lighter density, cleaner hierarchy. */
.topbar {
  min-height: 102px !important;
  padding: 80px 24px 12px !important;
  align-items: center !important;
  border-bottom-color: #18191d !important;
}

.topbar-meta {
  gap: 10px !important;
}

.server-chip,
.server-identity-chip,
.user-profile-chip {
  min-height: 72px !important;
  padding: 11px 14px !important;
  gap: 12px !important;
  border-color: #24252a !important;
  border-radius: 16px !important;
  background: #0b0c0f !important;
}

.server-chip::before,
.server-identity-chip::before,
.user-profile-chip::before {
  inset: 14px auto 14px 0 !important;
  width: 2px !important;
  opacity: 0.22 !important;
}

.server-chip:hover,
.server-identity-chip:hover,
.user-profile-chip:hover {
  border-color: #34353b !important;
  background: #101114 !important;
}

.user-profile-chip {
  min-width: 174px !important;
}

.server-identity-chip {
  min-width: 280px !important;
}

.user-profile-chip img,
.server-logo,
.server-identity-chip > i {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-color: #2a2b30 !important;
  border-radius: 13px !important;
  background: #15161a !important;
}

.server-identity-chip > i {
  padding: 10px !important;
}

.server-chip span {
  color: #8f929c !important;
  font-size: 10px !important;
}

.server-chip strong {
  margin-top: 2px !important;
  font-size: 16px !important;
  letter-spacing: 0 !important;
}

.server-chip small,
.server-ip {
  margin-top: 4px !important;
  color: #d3d6de !important;
  font-size: 12px !important;
}

.system-tag {
  margin-top: 6px !important;
  padding: 2px 7px !important;
  border-color: #30305f !important;
  background: #10102f !important;
  font-size: 10px !important;
}

.status-group {
  position: relative;
  gap: 8px !important;
  padding-left: 8px !important;
}

.status-dot {
  width: 8px !important;
  height: 8px !important;
  border: 0 !important;
  outline: 1px solid rgba(34, 197, 94, 0.42) !important;
}

.status-pill,
.status-group:has(.status-dot.connected) .status-pill,
.status-group:has(.status-dot.connecting) .status-pill,
.status-group:has(.status-dot.reconnecting) .status-pill,
.status-group:has(.status-dot.error) .status-pill,
.status-group:has(.status-dot.kicked) .status-pill {
  min-width: 100px !important;
  min-height: 42px !important;
  padding: 0 19px !important;
  border-radius: 15px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.status-group:has(.status-dot.connected) .status-pill {
  color: #d8ffe5 !important;
  border-color: #1f7a3a !important;
  background: #07190d !important;
}

/* Connected bots get a calm green online treatment. */
.account-tab-group.connected-account {
  border-color: #1f7a3a !important;
  background: #06140b !important;
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.12),
    0 0 22px rgba(34, 197, 94, 0.08) !important;
}

.account-tab-group.connected-account:hover,
.account-tab-group.connected-account.active {
  border-color: #22c55e !important;
  background: #08200f !important;
}

.account-tab-group.connected-account .account-tab {
  color: #dcfce7 !important;
}

.account-tab-group.connected-account .account-tab small {
  color: #86efac !important;
  opacity: 1 !important;
}

.account-tab-group.connected-account .account-avatar {
  border: 1px solid #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12) !important;
}

.account-tab-group.connected-account .account-tab-action,
.account-tab-group.connected-account .account-tab-lobby {
  color: #bbf7d0 !important;
  border-color: #1f7a3a !important;
  background: #0b1f11 !important;
}

.account-tab-group.connected-account .account-tab-action:hover,
.account-tab-group.connected-account .account-tab-lobby:hover {
  color: #ffffff !important;
  border-color: #22c55e !important;
  background: #12331c !important;
}

/* Modern GSAP login composition. */
body[data-stage="login"] .login-view {
  display: grid !important;
  place-items: center !important;
  padding: 32px !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.045), transparent 24%),
    #000000 !important;
}

.login-card {
  width: min(850px, calc(100vw - 48px)) !important;
  min-height: 430px !important;
  padding: 28px !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 360px) !important;
  grid-template-rows: auto auto auto 1fr !important;
  column-gap: 34px !important;
  row-gap: 16px !important;
  align-items: center !important;
  border: 1px solid #25262b !important;
  border-radius: 22px !important;
  background: #101113 !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46) !important;
  overflow: hidden !important;
}

.login-card::before {
  display: block !important;
  inset: 1px !important;
  border: 1px solid rgba(255, 255, 255, 0.035) !important;
  border-radius: 21px !important;
  background: none !important;
}

.login-card::after {
  display: none !important;
}

.login-visual {
  grid-column: 1 !important;
  grid-row: 1 / 5 !important;
  position: relative !important;
  min-height: 374px !important;
  height: 100% !important;
  padding: 24px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #232429 !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 126, 164, 0.12), transparent 26%),
    radial-gradient(circle at 28% 65%, rgba(165, 36, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #151116, #08090c 72%) !important;
  background-size: auto, auto, 22px 22px, auto !important;
  overflow: hidden !important;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
}

.login-visual::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 170, 194, 0.72), rgba(189, 79, 255, 0.82), transparent);
  opacity: 0.5;
}

.moderation-scope {
  width: min(260px, 72%) !important;
  aspect-ratio: 1 !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 80px rgba(167, 58, 255, 0.18) !important;
}

.japan-moon,
.samurai-crest,
.katana,
.sakura-petal {
  position: absolute;
  pointer-events: none;
}

.japan-moon {
  inset: 34px !important;
  border-radius: 999px;
  background:
    radial-gradient(circle at 60% 36%, rgba(255, 218, 228, 0.22), transparent 0 5px),
    radial-gradient(circle at 36% 36%, rgba(255, 255, 255, 0.17), rgba(255, 204, 221, 0.06) 42%, transparent 68%);
  box-shadow: inset 0 0 0 1px rgba(255, 223, 232, 0.1);
}

.samurai-crest {
  width: 148px;
  height: 92px;
  top: 52px;
  left: 50%;
  opacity: 0.28;
  transform: translateX(-50%);
  border-radius: 90px 90px 18px 18px;
  border: 1px solid rgba(255, 214, 226, 0.24);
  border-bottom: 0;
}

.samurai-crest::before,
.samurai-crest::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 62px;
  height: 44px;
  border-top: 2px solid rgba(255, 161, 190, 0.5);
}

.samurai-crest::before {
  left: -36px;
  transform: rotate(-28deg);
  border-radius: 100% 0 0 0;
}

.samurai-crest::after {
  right: -36px;
  transform: rotate(28deg);
  border-radius: 0 100% 0 0;
}

.katana {
  left: 50%;
  top: 50%;
  width: 210px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 241, 0.75), rgba(255, 156, 188, 0.18));
  transform-origin: center;
  opacity: 0.42;
}

.katana::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -3px;
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(86, 43, 66, 0.5), rgba(232, 179, 89, 0.68));
}

.katana-one {
  transform: translate(-50%, -50%) rotate(-32deg);
}

.katana-two {
  transform: translate(-50%, -50%) rotate(34deg);
  opacity: 0.24;
}

.sakura-petal {
  width: 14px;
  height: 9px;
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(135deg, #ffd1dc, #ff6f9d 72%, #f8eef2);
  box-shadow: 0 0 16px rgba(255, 107, 157, 0.34);
}

.petal-one {
  top: 50px;
  left: 42px;
  transform: rotate(-22deg);
}

.petal-two {
  right: 44px;
  top: 72px;
  transform: rotate(34deg) scale(0.82);
}

.petal-three {
  left: 54px;
  bottom: 70px;
  transform: rotate(38deg) scale(0.9);
}

.petal-four {
  right: 70px;
  bottom: 54px;
  transform: rotate(-18deg) scale(0.72);
}

.scope-ring,
.scope-ping,
.scope-scan,
.moderation-line {
  display: block !important;
}

.scope-ring {
  border-color: rgba(255, 196, 214, 0.16) !important;
}

.scope-scan {
  display: none !important;
}

.scope-ping {
  background: #ffb8c9 !important;
  box-shadow: 0 0 20px rgba(255, 111, 157, 0.52) !important;
}

.moderation-line {
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent) !important;
}

.hero-mark {
  width: min(96px, 38%) !important;
  opacity: 0.86 !important;
  filter: saturate(0.9) brightness(0.92) drop-shadow(0 0 18px rgba(181, 77, 255, 0.28)) !important;
  z-index: 2 !important;
}

.login-brand {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  padding: 0 !important;
  justify-self: stretch !important;
}

.login-brand .large {
  display: none !important;
}

.login-brand p {
  width: fit-content !important;
  color: #ffd98f !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.26em !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 18px rgba(255, 122, 169, 0.28) !important;
}

.login-brand .console-wordmark {
  margin-top: 6px !important;
  color: #ffffff !important;
  font-size: clamp(36px, 4.2vw, 48px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-shadow:
    0 0 28px rgba(181, 77, 255, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.login-card .login-field,
.login-card .login-button,
.login-card .auth-box {
  grid-column: 2 !important;
  width: 100% !important;
  justify-self: stretch !important;
}

.login-field {
  gap: 8px !important;
}

.login-field span {
  color: #d2cfda !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.login-field span i {
  color: #ffabc5 !important;
  filter: drop-shadow(0 0 10px rgba(255, 111, 157, 0.32)) !important;
}

.login-field input {
  min-height: 48px !important;
  border-radius: 16px !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #030303 !important;
  font-weight: 800 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 32px rgba(0, 0, 0, 0.18) !important;
}

.login-field input:focus {
  border-color: #ff8fb5 !important;
  outline: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 3px rgba(255, 111, 157, 0.2),
    0 0 34px rgba(173, 54, 255, 0.22) !important;
}

.login-button {
  min-height: 48px !important;
  margin-top: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 999px !important;
  background: #f4f4f5 !important;
  color: #030303 !important;
  font-weight: 900 !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    0 0 22px rgba(255, 255, 255, 0.08) !important;
}

.login-button:hover {
  transform: translateY(-1px) !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(255, 255, 255, 0.12) !important;
}

.login-button:focus-visible {
  outline: none !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(255, 255, 255, 0.22),
    0 0 0 6px rgba(255, 111, 157, 0.22) !important;
}

.login-button:active {
  transform: translateY(0) !important;
}

.login-card .auth-box {
  border-radius: 16px !important;
}

@media (max-width: 760px) {
  body[data-stage="login"] .login-view {
    align-items: start !important;
    padding: 18px 14px !important;
    overflow-y: auto !important;
  }

  .login-card {
    width: min(480px, calc(100vw - 28px)) !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    align-items: stretch !important;
    row-gap: 14px !important;
    padding: 22px !important;
    overflow: visible !important;
  }

  .login-visual {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-height: 154px !important;
    padding: 16px !important;
  }

  .login-brand,
  .login-card .login-field,
  .login-card .login-button,
  .login-card .auth-box {
    grid-column: 1 !important;
  }

  .login-brand {
    grid-row: 1 !important;
    gap: 0 !important;
  }

  .login-brand .large {
    width: 36px !important;
    height: 36px !important;
  }

  .login-brand .console-wordmark {
    font-size: clamp(30px, 9vw, 40px) !important;
    letter-spacing: 0 !important;
  }

  .login-field input,
  .login-button {
    min-height: 46px !important;
  }
}

/* Mobile console fix: compact header mode and no document scroll. */
@media (max-width: 760px) {
  body[data-stage="console"] {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body[data-stage="console"] .app-shell {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .topbar {
    max-height: 250px !important;
    padding: max(8px, env(safe-area-inset-top)) 8px 8px !important;
    transition:
      max-height 180ms ease,
      padding 180ms ease,
      opacity 140ms ease !important;
  }

  body[data-stage="console"].mobile-console-compact .topbar {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .topbar-meta {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  body[data-stage="console"] .user-profile-chip,
  body[data-stage="console"] .server-identity-chip,
  body[data-stage="console"] .status-pill {
    min-height: 46px !important;
    border-radius: 16px !important;
  }

  body[data-stage="console"] .status-group {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body[data-stage="console"] .workspace,
  body[data-stage="console"] .monitor-panel {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .monitor-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  body[data-stage="console"] .monitor-header {
    flex: 0 0 auto !important;
    min-height: 48px !important;
    padding: 6px 8px !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  body[data-stage="console"] .monitor-header::-webkit-scrollbar {
    display: none !important;
  }

  body[data-stage="console"] .metric {
    min-width: 64px !important;
    min-height: 38px !important;
    flex: 0 0 auto !important;
    padding: 7px 10px !important;
    border-radius: 16px !important;
  }

  body[data-stage="console"] .account-tabs-toggle {
    width: 64px !important;
    min-width: 64px !important;
    min-height: 38px !important;
    flex: 0 0 64px !important;
  }

  body[data-stage="console"] .account-tabs {
    flex: 0 0 auto !important;
    min-height: 50px !important;
    max-height: 62px !important;
    margin: 6px 8px 0 !important;
    padding: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body[data-stage="console"] .monitor-panel.account-tabs-collapsed .account-tabs {
    max-height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body[data-stage="console"] .feed {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 8px calc(92px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body[data-stage="console"] .floating-nav {
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 54px !important;
    padding: 6px !important;
  }

  body[data-stage="console"] .nav-item {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }

  body[data-stage="console"] .chat-composer {
    right: 8px !important;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Server-colored rank tag on the system profile chip. */
.system-tag {
  --tag-color: #ffffff;
  position: relative !important;
  min-height: 20px !important;
  margin-top: 6px !important;
  padding: 3px 9px !important;
  border: 1px solid color-mix(in srgb, var(--tag-color) 48%, #ffffff 8%) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  color: color-mix(in srgb, var(--tag-color) 82%, #ffffff 18%) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tag-color) 22%, transparent), transparent),
    color-mix(in srgb, var(--tag-color) 15%, #050505 85%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px color-mix(in srgb, var(--tag-color) 18%, transparent),
    0 0 18px color-mix(in srgb, var(--tag-color) 22%, transparent) !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0.035em !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 12px color-mix(in srgb, var(--tag-color) 36%, transparent) !important;
}

.system-tag.hidden {
  display: none !important;
}

/* Console context menu: bordered shell, clean actions. */
.console-context-menu {
  padding: 8px !important;
  border: 1px solid #2a2b30 !important;
  border-radius: 18px !important;
  background: #101113 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 20px 50px rgba(0, 0, 0, 0.42) !important;
}

.console-context-menu button,
.console-context-menu button:hover {
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.console-context-menu button:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

.console-context-menu button[data-console-action="ignore"],
.console-context-menu button[data-console-action="ignore-player"],
.console-context-menu button[data-console-action="disable-filter-player"] {
  color: #ff8f9d !important;
}

.console-context-menu button[data-console-action="ignore"]:hover,
.console-context-menu button[data-console-action="ignore-player"]:hover,
.console-context-menu button[data-console-action="disable-filter-player"]:hover {
  color: #ffd0d7 !important;
  background: rgba(255, 95, 119, 0.12) !important;
}

/* Stronger filter emphasis in the console feed. */
.event:not(.system) .event-filter.filter-visible,
.event.raw-event:not(.system) .event-filter.filter-visible {
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 3px !important;
  padding: 3px 9px !important;
  border: 1px solid rgba(255, 189, 107, 0.34) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #ffd166 !important;
  background: rgba(255, 189, 107, 0.1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(255, 189, 107, 0.08) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  text-shadow: none !important;
}

.event:not(.system) .event-filter:not(.filter-visible),
.event.raw-event:not(.system) .event-filter:not(.filter-visible),
.event:not(.system) .event-filter:empty,
.event.raw-event:not(.system) .event-filter:empty,
.event:not(.system) .event-filter[hidden],
.event.raw-event:not(.system) .event-filter[hidden] {
  display: none !important;
}

.event:not(.system) .event-filter.filter-visible::before,
.event.raw-event:not(.system) .event-filter.filter-visible::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffbd6b;
  box-shadow: 0 0 12px rgba(255, 189, 107, 0.65);
}

.event.alert {
  background:
    linear-gradient(90deg, rgba(255, 189, 107, 0.08), transparent 22%),
    #100f0b !important;
}

/* Modal panel polish, especially for filter/system alert views. */
.system-modal-panel {
  border: 1px solid #2b2c32 !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.07), transparent 32%),
    #101113 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 34px 90px rgba(0, 0, 0, 0.56) !important;
}

.system-modal-header {
  min-height: 82px !important;
  padding: 18px 20px !important;
  border-bottom: 1px solid #292a30 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    #121316 !important;
}

.system-modal-header span {
  color: #a1a1aa !important;
  letter-spacing: 0.04em !important;
}

.system-modal-header h2 {
  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 950 !important;
}

.system-modal-panel .modal-view {
  padding: 20px !important;
}

.system-modal.is-settings-modal .system-modal-panel {
  width: min(1080px, calc(100vw - 28px)) !important;
}

.system-modal.is-settings-modal .system-modal-header {
  min-height: 78px !important;
}

.system-modal.is-settings-modal .modal-view {
  padding: 18px !important;
}

#settingsAdminSection {
  grid-column: 1 / -1;
}

.alerts-list {
  gap: 10px !important;
}

.alerts-list .alert-jump-item {
  position: relative !important;
  min-height: 78px !important;
  padding: 14px 16px 14px 18px !important;
  border: 1px solid #303138 !important;
  border-left: 3px solid #ffbd6b !important;
  border-radius: 18px !important;
  background:
    linear-gradient(90deg, rgba(255, 189, 107, 0.095), transparent 34%),
    #15161a !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 34px rgba(0, 0, 0, 0.18) !important;
}

.alerts-list .alert-jump-item:hover {
  border-color: #3a3b42 !important;
  border-left-color: #ffd166 !important;
  background:
    linear-gradient(90deg, rgba(255, 189, 107, 0.15), transparent 40%),
    #191a1f !important;
}

.alerts-list .alert-jump-item span {
  color: #a1a1aa !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

.alerts-list .alert-jump-item strong {
  width: fit-content !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  color: #ffd166 !important;
  background: rgba(255, 189, 107, 0.11) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
}

.alerts-list .alert-jump-item p {
  color: #f4f4f5 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.alerts-list .alert-jump-item.notification-highlight {
  border-color: rgba(255, 209, 102, 0.72) !important;
  border-left-color: #ffd166 !important;
  background:
    linear-gradient(90deg, rgba(255, 189, 107, 0.22), transparent 46%),
    #1b1710 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(255, 189, 107, 0.13),
    0 0 34px rgba(255, 189, 107, 0.18) !important;
  animation: alertNotificationPulse 1.15s ease-in-out infinite alternate;
}

@keyframes alertNotificationPulse {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-1px);
  }
}

/* Final mobile stability layer: overrides older mobile rules that fight each other. */
@media (max-width: 760px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  body,
  .app-shell {
    min-width: 0 !important;
  }

  .app-shell {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body[data-stage="login"] .app-shell {
    display: block !important;
    overflow-y: auto !important;
  }

  body[data-stage="login"] .login-view {
    width: 100% !important;
    min-height: 100dvh !important;
    padding: 14px !important;
    display: grid !important;
    place-items: start center !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body[data-stage="login"] .login-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: min(360px, calc(100vw - 28px)) !important;
    max-width: min(360px, calc(100vw - 28px)) !important;
    margin: 0 auto !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow: hidden !important;
  }

  body[data-stage="login"] .login-visual {
    min-height: 118px !important;
    max-height: 118px !important;
  }

  body[data-stage="console"] .topbar {
    width: 100% !important;
    min-height: 0 !important;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .brand-block {
    display: none !important;
  }

  body[data-stage="console"] .topbar-meta {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) !important;
    gap: 8px !important;
  }

  body[data-stage="console"] .user-profile-chip,
  body[data-stage="console"] .server-identity-chip {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 8px 9px !important;
    border-radius: 16px !important;
  }

  body[data-stage="console"] .server-logo,
  body[data-stage="console"] .user-profile-chip img {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
  }

  body[data-stage="console"] .server-chip strong,
  body[data-stage="console"] .user-profile-chip strong {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  body[data-stage="console"] .server-chip span,
  body[data-stage="console"] .server-ip,
  body[data-stage="console"] .system-tag {
    font-size: 9px !important;
  }

  body[data-stage="console"] .status-group {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
  }

  body[data-stage="console"] .status-pill {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 7px 10px !important;
    border-radius: 14px !important;
  }

  body[data-stage="console"] .workspace,
  body[data-stage="console"] .monitor-panel {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .monitor-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  body[data-stage="console"] .monitor-header {
    min-height: 44px !important;
    padding: 6px 10px !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  body[data-stage="console"] .monitor-header::-webkit-scrollbar,
  body[data-stage="console"] .account-tabs::-webkit-scrollbar {
    display: none !important;
  }

  body[data-stage="console"] .metric {
    min-width: 46px !important;
    min-height: 34px !important;
    flex: 0 0 auto !important;
    padding: 7px 10px !important;
  }

  body[data-stage="console"] .account-tabs {
    width: auto !important;
    min-height: 52px !important;
    margin: 6px 10px 0 !important;
    padding: 6px !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-radius: 16px !important;
    scrollbar-width: none !important;
  }

  body[data-stage="console"] .account-tab-group {
    flex: 0 0 auto !important;
    max-width: min(260px, calc(100vw - 72px)) !important;
  }

  body[data-stage="console"] .account-tab {
    max-width: 128px !important;
    min-height: 38px !important;
    padding: 6px 9px !important;
  }

  body[data-stage="console"] .account-tab span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-stage="console"] .account-tab small {
    display: none !important;
  }

  body[data-stage="console"] .account-tab-action,
  body[data-stage="console"] .account-tab-power,
  body[data-stage="console"] .account-tab-lobby {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  body[data-stage="console"] .feed {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 10px 8px calc(116px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    font-size: 12px !important;
  }

  body[data-stage="console"] .event {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  body[data-stage="console"] .event:not(.system) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 3px 7px !important;
  }

  body[data-stage="console"] .event:not(.system) .event-kind {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body[data-stage="console"] .event:not(.system) .event-time {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-stage="console"] .event:not(.system) .event-lobby {
    display: none !important;
  }

  body[data-stage="console"] .event:not(.system) .event-identity,
  body[data-stage="console"] .event:not(.system) .event-message,
  body[data-stage="console"] .event:not(.system) .event-filter {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  body[data-stage="console"] .event-message,
  body[data-stage="console"] .event-user {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  body[data-stage="console"] .chat-composer {
    right: 8px !important;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 8px !important;
    grid-template-columns: minmax(0, 1fr) 42px 42px !important;
    gap: 7px !important;
    border-radius: 18px !important;
  }

  body[data-stage="console"] .chat-composer > div:first-child {
    grid-column: 1 / -1 !important;
  }

  body[data-stage="console"] .chat-composer .input,
  body[data-stage="console"] .chat-composer .chat-input-group {
    height: 44px !important;
    min-height: 44px !important;
  }

  body[data-stage="console"] .floating-nav {
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  body[data-stage="console"] .floating-nav::-webkit-scrollbar {
    display: none !important;
  }

  .system-modal {
    padding: 8px !important;
    align-items: end !important;
  }

  .system-modal-panel {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 22px 22px 16px 16px !important;
  }

  .system-modal-header {
    min-height: 62px !important;
    padding: 12px 14px !important;
  }

  .system-modal-header h2 {
    font-size: 18px !important;
  }

  .modal-view {
    max-height: calc(100dvh - 92px) !important;
    padding: 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .bots-list {
    grid-template-columns: 1fr !important;
  }

  .bot-card {
    min-height: 210px !important;
  }

  #messageModalContent .message-preview-frame {
    padding: 6px !important;
    border-radius: 16px !important;
  }

  .mute-command-row,
  .filter-add-form,
  .temporary-password-row,
  .settings-grid,
  .settings-account,
  .settings-system-user,
  .system-account-profile {
    grid-template-columns: 1fr !important;
  }

  .account-context-menu,
  .console-context-menu,
  .image-download-menu,
  .account-lobby-menu,
  .server-address-menu {
    max-width: calc(100vw - 16px) !important;
  }
}

@media (max-width: 420px) {
  body[data-stage="console"] .topbar-meta {
    grid-template-columns: 1fr !important;
  }

  body[data-stage="console"] .user-profile-chip,
  body[data-stage="console"] .server-identity-chip {
    min-height: 48px !important;
  }

  body[data-stage="console"] .account-tab {
    max-width: 108px !important;
  }

  body[data-stage="login"] .login-card {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  body[data-stage="login"] .login-brand .console-wordmark {
    font-size: 32px !important;
  }
}

@media (max-width: 760px) {
  .empty-state .loader {
    width: 92px !important;
    height: 92px !important;
    margin-bottom: 14px !important;
  }
}

/* Stable bot tabs hover: no size changes, no hover jitter. */
.account-tab-group,
.account-tab-group:hover,
.account-tab-group.connected-account,
.account-tab-group.connected-account:hover {
  transform: none !important;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease !important;
}

.account-add-button,
.account-add-button:hover,
.account-add-button:focus-visible {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  justify-content: center !important;
  overflow: hidden !important;
  transform: none !important;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease !important;
}

.account-add-button .sign,
.account-add-button:hover .sign,
.account-add-button:focus-visible .sign {
  width: 100% !important;
  padding-left: 0 !important;
  flex: 0 0 100% !important;
  justify-content: center !important;
  transition: none !important;
}

.account-add-button .text,
.account-add-button:hover .text,
.account-add-button:focus-visible .text {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  transition: none !important;
}

/* Chat composer account/shortcut controls. */
.chat-composer-tools {
  min-width: 184px !important;
  min-height: 46px !important;
  padding: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg, rgba(31, 35, 43, 0.96), rgba(8, 10, 14, 0.98)) !important;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.42) !important;
}

.chat-tool-button {
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex: 0 1 auto !important;
  color: #f8fafc !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  transition:
    transform 180ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease !important;
}

.chat-tool-button:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18) !important;
  transform: translateY(-1px) scale(1.03) !important;
}

.chat-tool-button#chatShortcutButton:hover {
  transform: rotate(2deg) scale(1.03) !important;
}

.chat-tool-button:focus-visible {
  outline: 2px solid rgba(101, 202, 255, 0.42) !important;
  outline-offset: 2px !important;
}

.chat-tool-button i {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 auto !important;
  color: #aeb7c6 !important;
}

.chat-composer-head {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 auto !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 8px !important;
  image-rendering: pixelated;
}

.chat-tool-button span {
  min-width: 0 !important;
  max-width: clamp(46px, 8vw, 128px) !important;
  overflow: hidden !important;
  color: #f8fafc !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.chat-tool-button:hover span,
.chat-tool-button:hover i {
  color: #ffffff !important;
}

/* Polished account tabs toggle. */
.account-tabs-toggle {
  width: 82px !important;
  min-width: 82px !important;
  min-height: 36px !important;
  border: 1px solid #303138 !important;
  border-radius: 999px !important;
  color: #f4f4f5 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), transparent),
    #15181f !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.2) !important;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease !important;
}

.account-tabs-toggle:hover,
.account-tabs-toggle:focus-visible {
  border-color: #4a4b52 !important;
  color: #ffffff !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    #1b1f27 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 28px rgba(0, 0, 0, 0.26) !important;
  outline: none !important;
}

.account-tabs-toggle i {
  width: 17px !important;
  height: 17px !important;
  transition: transform 180ms ease !important;
}

.account-tabs-toggle:hover i {
  transform: translateY(-1px) !important;
}

.account-tabs-toggle.collapsed i {
  transform: rotate(180deg) !important;
}

.chat-picker-menu {
  position: fixed;
  z-index: 135;
  width: 230px;
  max-height: 292px;
  padding: 8px;
  border: 1px solid #2a2b30;
  border-radius: 18px;
  overflow-y: auto;
  background: #101113;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 20px 50px rgba(0, 0, 0, 0.42);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-picker-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.chat-picker-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #f4f4f5;
  background: transparent;
  font: 900 13px/1 var(--font-ui);
  text-align: left;
}

.chat-picker-menu button:hover {
  background: rgba(255, 255, 255, 0.065);
}

.chat-picker-menu button.active {
  color: #dcfce7;
  background: #08200f;
  box-shadow: inset 0 0 0 1px #22c55e;
}

.chat-shortcut-menu button.active {
  color: #dcfce7 !important;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.06)),
    #08200f !important;
  box-shadow: inset 0 0 0 1px #22c55e !important;
}

.chat-shortcut-menu button.active i,
.chat-shortcut-menu button.active span,
.chat-shortcut-menu button.active small {
  color: #86efac !important;
}

.chat-shortcut-menu button:not(.active) {
  color: #f4f4f5;
  background: transparent;
  box-shadow: none;
}

.chat-shortcut-menu button:not(.active) small {
  color: #a1a1aa !important;
}

.chat-picker-menu img {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  image-rendering: pixelated;
}

.chat-picker-menu small {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 900;
}

.chat-picker-menu button.online small {
  color: #86efac;
}

.chat-shortcut-menu {
  width: 190px;
}

.chat-shortcut-menu button {
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

@media (max-width: 760px) {
  .chat-composer-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .chat-tool-button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .chat-tool-button span {
    max-width: 100% !important;
  }
}

/* Console text feed: no borders around chat lines. */
.feed .event,
.feed .event.chat,
.feed .event.alert,
.feed .event.raw-event {
  border: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.feed .event.chat:hover,
.feed .event.alert:hover,
.feed .event:focus-visible {
  background: rgba(255, 255, 255, 0.035) !important;
  box-shadow: none !important;
}

/* Modern bots modal cards. */
.bots-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}

.bot-card {
  position: relative;
  min-height: 250px !important;
  padding: 14px !important;
  border: 1px solid #2a2b30 !important;
  border-radius: 22px !important;
  display: grid !important;
  grid-template-rows: 1fr auto !important;
  gap: 14px !important;
  background: #101113 !important;
  overflow: hidden !important;
  transform-origin: center;
}

.bot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.8;
}

.bot-card.online {
  border-color: #1f7a3a !important;
  background: #0b130e !important;
}

.bot-card.offline {
  border-color: #3a2025 !important;
}

.bot-skin-frame {
  position: relative;
  min-height: 156px !important;
  border: 1px solid #24252a !important;
  border-radius: 18px !important;
  display: grid !important;
  place-items: center !important;
  background:
    linear-gradient(180deg, #090a0d, #050506) !important;
  overflow: hidden !important;
}

.bot-skin-frame::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
}

.bot-skin-glow {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(18px);
}

.bot-card.online .bot-skin-glow {
  background: rgba(34, 197, 94, 0.18);
}

.bot-card.offline .bot-skin-glow {
  background: rgba(239, 68, 68, 0.11);
}

.bot-skin-frame img {
  position: relative;
  z-index: 1;
  max-height: 150px !important;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.44)) !important;
  transform-origin: center bottom;
}

.bot-card-info {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 12px !important;
}

.bot-card-info strong {
  display: block;
  overflow: hidden;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-card-info span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #9ca3af !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-status {
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid #34353b !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #d4d4d8 !important;
  background: #17181c !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.bot-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.bot-card.online .bot-status {
  color: #bbf7d0 !important;
  border-color: #1f7a3a !important;
  background: #07190d !important;
}

.bot-card.offline .bot-status {
  color: #fecaca !important;
  border-color: #4b1d1d !important;
  background: #190707 !important;
}

/* Message preview frame: polished border without changing the generated canvas. */
#messageModalContent .message-preview-frame {
  position: relative !important;
  padding: 10px !important;
  border: 1px solid rgba(140, 165, 205, 0.34) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(#080a0f, #080a0f) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(121, 160, 235, 0.32) 38%, rgba(255, 255, 255, 0.08)) border-box !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.035) !important;
  overflow: hidden !important;
}

#messageModalContent .message-preview-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0.42;
  transform: translateX(-65%);
  animation: messageFrameSweep 5.5s ease-in-out infinite;
}

#messageModalContent .message-preview-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  pointer-events: none;
}

#messageModalContent .message-preview-image,
#messageModalContent .message-preview-canvas {
  position: relative !important;
  z-index: 1 !important;
  border-radius: 12px !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.42) !important;
}

@keyframes messageFrameSweep {
  0%,
  38% {
    transform: translateX(-75%);
  }

  72%,
  100% {
    transform: translateX(75%);
  }
}

/* Split filter console. */
.console-split {
  --main-console-size: 1fr;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.monitor-panel > .account-tabs {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  margin-bottom: 6px;
}

.console-split.split-active {
  grid-template-columns: minmax(260px, var(--main-console-size)) 12px minmax(260px, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.console-pane-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-split .feed {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 14px;
}

.filter-resize-handle {
  position: relative;
  width: 12px;
  height: 100%;
  padding: 0;
  border: 0;
  display: block;
  cursor: col-resize;
  background: transparent;
}

.filter-resize-handle::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 5px;
  width: 2px;
  border-radius: 999px;
  background: #2f3744;
}

.filter-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 8px;
  height: 54px;
  border-radius: 999px;
  background: #151a22;
  box-shadow: inset 0 0 0 1px #343c49;
  transform: translateY(-50%);
}

.filter-split-panel {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 0;
  border-left: 1px solid #252b35;
  background: rgba(8, 11, 16, 0.74);
}

.console-chat-composer {
  position: static !important;
  flex: 0 0 auto;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  min-height: 58px;
  margin: 8px 10px 10px;
  padding: 8px;
  grid-template-columns: minmax(184px, 236px) minmax(0, 1fr) 42px 42px;
  column-gap: 8px;
  border-radius: 16px !important;
  background: #050505 !important;
  box-shadow: inset 0 0 0 1px #252b35 !important;
}

.console-chat-composer .chat-composer-tools {
  min-width: 0 !important;
  width: 100% !important;
}

.console-chat-composer .chat-tool-button {
  min-width: 0 !important;
  max-width: none;
}

.console-chat-composer .chat-composer-tools .chat-tool-button:first-child {
  flex: 1 1 auto !important;
  justify-content: flex-start !important;
}

.console-chat-composer .chat-composer-tools .chat-tool-button:last-child {
  flex: 0 0 40px !important;
  width: 40px !important;
  padding: 0 !important;
}

.console-chat-composer .chat-composer-tools .chat-tool-button:last-child span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.console-chat-composer .chat-input-group,
.console-chat-composer .input {
  height: 44px !important;
  min-height: 44px !important;
}

.console-chat-composer > button {
  width: 42px !important;
  height: 42px !important;
}

.filtered-chat-composer {
  margin-top: 8px;
}

.filtered-chat-restore {
  align-self: flex-end;
  width: 46px;
  height: 46px;
  margin: 8px 14px 12px auto;
  border: 1px solid #2a303a;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #dcfce7;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.035)),
    #0b1118;
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.filtered-chat-restore:hover,
.filtered-chat-restore:focus-visible {
  color: #ffffff;
  border-color: #22c55e;
  background: #08200f;
  outline: none;
  transform: translateY(-1px);
}

.filtered-chat-restore i {
  width: 20px;
  height: 20px;
}

.filter-split-header {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #252b35;
  background: rgba(12, 15, 20, 0.96);
}

.filter-split-title {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f4f7fb;
  font: 900 12px/1 var(--font-ui);
}

.filter-split-title i {
  width: 16px;
  height: 16px;
}

.filter-split-title strong {
  min-width: 24px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #bbf7d0;
  background: #08200f;
  box-shadow: inset 0 0 0 1px #1f7a3a;
}

.filter-split-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-split-controls::-webkit-scrollbar {
  display: none;
}

.system-modal.is-split-filter-modal .system-modal-panel {
  width: min(620px, calc(100vw - 28px)) !important;
}

/* Archived filter evidence. */
.nav-count-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid #0d0e11;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111318;
  background: #f4f4f5;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.archives-page {
  min-height: 0;
  height: 100%;
  padding: 18px 20px 86px;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  background: #090a0d;
  animation: archivesPageIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.archives-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27282d;
}

.archives-title {
  display: grid;
  gap: 5px;
}

.archives-title > span,
.archive-item-category {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archives-title h2 {
  margin: 0;
  color: #fafafa;
  font: 950 28px/1 var(--font-display);
  letter-spacing: -0.04em;
}

.archives-title p {
  margin: 0;
  color: #92939b;
  font-size: 12px;
}

.archives-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.archives-clear-button {
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.14);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.archives-clear-button:hover,
.archives-clear-button:focus-visible {
  outline: none;
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.28);
}

.archives-clear-button:active {
  transform: translateY(1px);
}

.archives-clear-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.archives-clear-button i {
  width: 15px;
  height: 15px;
}

.archives-search {
  width: min(360px, 42vw);
  height: 42px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid #2a2b30;
  border-radius: 13px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 9px;
  background: #111216;
}

.archives-search:focus-within {
  border-color: #55565e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.archives-search i {
  width: 16px;
  color: #71717a;
}

.archives-search input {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: #f4f4f5 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  appearance: none;
  font: 800 12px/1 var(--font-ui) !important;
}

.archives-search input:hover,
.archives-search input:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.archives-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #8f9098;
  font-size: 11px;
}

.archives-summary strong {
  color: #f4f4f5;
  font: 950 18px/1 var(--font-mono);
}

.archives-list {
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid #222329;
  scrollbar-width: thin;
  scrollbar-color: #34353b transparent;
}

.archive-item {
  position: relative;
  width: 100%;
  min-height: 92px;
  border-bottom: 1px solid #222329;
  background: transparent;
  transition: background 160ms ease;
}

.archive-item-open {
  width: 100%;
  min-height: 91px;
  padding: 15px 58px 15px 12px;
  border: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(280px, 1.4fr) auto;
  align-items: center;
  gap: 22px;
  color: #f4f4f5;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease;
}

.archive-item:hover,
.archive-item:focus-within {
  outline: none;
  background: rgba(255, 255, 255, 0.045);
}

.archive-item.is-pinned {
  border-color: rgba(245, 184, 67, 0.3);
  background:
    linear-gradient(135deg, rgba(245, 184, 67, 0.09), transparent 42%),
    #111216;
}

.archive-item-open:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.42);
  outline-offset: -2px;
}

.archive-item-open:active {
  transform: translateY(1px);
}

.archive-delete-button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #303138;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8f9098;
  background: #141519;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.archive-delete-button:hover,
.archive-delete-button:focus-visible {
  outline: none;
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.24);
}

.archive-delete-button:active {
  transform: translateY(-50%) scale(0.96);
}

.archive-delete-button i {
  width: 15px;
  height: 15px;
}

.archive-context-menu {
  position: fixed;
  z-index: 128;
  width: 190px;
  padding: 7px;
  border: 1px solid #2a2b30;
  border-radius: 15px;
  display: grid;
  gap: 3px;
  background: #101113;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 20px 50px rgba(0, 0, 0, 0.42);
  transform-origin: top left;
}

.archive-context-menu.menu-opening {
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
}

.archive-context-menu.menu-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 130ms ease, transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-context-menu.menu-closing {
  opacity: 0;
  transform: translateY(-3px) scale(0.97);
  pointer-events: none;
  transition: opacity 120ms ease, transform 140ms ease;
}

.archive-context-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f4f4f5;
  background: transparent;
  font: 900 12px/1 var(--font-ui);
  text-align: left;
}

.archive-context-menu button:hover,
.archive-context-menu button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.07);
}

.archive-context-menu button.danger {
  color: #fca5a5;
}

.archive-context-menu button.danger:hover,
.archive-context-menu button.danger:focus-visible {
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.24);
}

.archive-context-menu button i {
  width: 15px;
  height: 15px;
}

.archive-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 20px;
}

.archive-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 7, 0.74);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 150ms ease;
}

.archive-confirm-panel {
  position: relative;
  width: min(420px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid #303138;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 15px;
  color: #f4f4f5;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 48%),
    #111216;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 80px rgba(0, 0, 0, 0.56);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-confirm-modal.is-open .archive-confirm-backdrop,
.archive-confirm-modal.is-open .archive-confirm-panel {
  opacity: 1;
}

.archive-confirm-modal.is-open .archive-confirm-panel {
  transform: translateY(0) scale(1);
}

.archive-confirm-modal.is-closing .archive-confirm-backdrop,
.archive-confirm-modal.is-closing .archive-confirm-panel {
  opacity: 0;
}

.archive-confirm-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.22);
}

.archive-confirm-icon i {
  width: 19px;
  height: 19px;
}

.archive-confirm-copy > span {
  display: block;
  margin-bottom: 5px;
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-confirm-copy h2 {
  margin: 0;
  font: 900 18px/1.2 var(--font-ui);
}

.archive-confirm-copy p {
  margin: 9px 0 0;
  color: #b8bac2;
  font-size: 13px;
  line-height: 1.55;
}

.archive-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.archive-confirm-actions button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 11px;
  font: 850 12px/1 var(--font-ui);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.archive-confirm-actions button:hover,
.archive-confirm-actions button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.archive-confirm-cancel {
  border: 1px solid #33343b;
  color: #d4d4d8;
  background: #191a1f;
}

.archive-confirm-submit {
  border: 1px solid rgba(248, 113, 113, 0.34);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff1f2;
  background: linear-gradient(180deg, #b93648, #922c3b);
  box-shadow: 0 10px 24px rgba(146, 44, 59, 0.24);
}

.archive-confirm-submit:hover,
.archive-confirm-submit:focus-visible {
  border-color: rgba(254, 202, 202, 0.52);
  background: linear-gradient(180deg, #ca4053, #a43042);
}

.archive-confirm-submit i {
  width: 15px;
  height: 15px;
}

.staff-chat-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 242;
  display: grid;
  place-items: center;
  padding: 20px;
}

.staff-chat-notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 7, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 150ms ease;
}

.staff-chat-notice-panel {
  position: relative;
  width: min(420px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid #303743;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 15px;
  color: #f4f4f5;
  background:
    linear-gradient(145deg, rgba(96, 165, 250, 0.08), transparent 48%),
    #111216;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 80px rgba(0, 0, 0, 0.56);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.staff-chat-notice-modal.is-open .staff-chat-notice-backdrop,
.staff-chat-notice-modal.is-open .staff-chat-notice-panel {
  opacity: 1;
}

.staff-chat-notice-modal.is-open .staff-chat-notice-panel {
  transform: translateY(0) scale(1);
}

.staff-chat-notice-modal.is-closing .staff-chat-notice-backdrop,
.staff-chat-notice-modal.is-closing .staff-chat-notice-panel {
  opacity: 0;
}

.staff-chat-notice-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.2);
}

.staff-chat-notice-icon i {
  width: 20px;
  height: 20px;
}

.staff-chat-notice-copy > span {
  display: block;
  margin-bottom: 5px;
  color: #93c5fd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.staff-chat-notice-copy h2 {
  margin: 0;
  font: 900 18px/1.2 var(--font-ui);
}

.staff-chat-notice-copy p {
  margin: 9px 0 0;
  color: #b8bac2;
  font-size: 13px;
  line-height: 1.55;
}

.staff-chat-notice-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

.staff-chat-notice-actions button {
  min-width: 82px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 11px;
  color: #eff6ff;
  background: linear-gradient(180deg, #2563a9, #1e4f8a);
  box-shadow: 0 10px 24px rgba(30, 79, 138, 0.24);
  font: 850 12px/1 var(--font-ui);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.staff-chat-notice-actions button:hover,
.staff-chat-notice-actions button:focus-visible {
  outline: none;
  border-color: rgba(191, 219, 254, 0.58);
  background: linear-gradient(180deg, #2d72bd, #245b99);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .archive-confirm-backdrop,
  .archive-confirm-panel,
  .staff-chat-notice-backdrop,
  .staff-chat-notice-panel {
    transition: none;
  }
}

.archive-item-labels {
  display: flex;
  align-items: center;
  gap: 7px;
}

.archive-pinned-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f6c65b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.archive-pinned-tag i {
  width: 13px;
  height: 13px;
}

.archive-new-tag {
  padding: 5px 8px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #111318;
  background: #ffffff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.archive-new-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #111318;
  animation: archiveNewDot 900ms ease-in-out infinite;
}

.archive-item-player,
.archive-item-message,
.archive-item-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.archive-item-player strong,
.archive-item-message strong {
  overflow: hidden;
  color: #fafafa;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-item-player small,
.archive-item-message span,
.archive-item-meta span {
  overflow: hidden;
  color: #8f9098;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-item-meta {
  justify-items: end;
  text-align: right;
}

.archive-context-count {
  color: #d4d4d8 !important;
  font-family: var(--font-mono);
}

.archive-collecting {
  color: #d4d4d8 !important;
}

.archive-collecting::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  display: inline-block;
  background: #d4d4d8;
  animation: archiveCollectingPulse 1s ease-in-out infinite;
}

.archives-empty-state,
.archives-error-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #777881;
  text-align: center;
}

.archives-skeleton {
  height: 92px;
  border-bottom: 1px solid #222329;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.055) 42%, transparent 64%);
  background-size: 240% 100%;
  animation: archivesSkeleton 1.25s ease-in-out infinite;
}

.archives-empty-state i,
.archives-error-state i {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
}

.archives-empty-state strong,
.archives-error-state strong {
  color: #e4e4e7;
  font-size: 13px;
}

.archives-empty-state span,
.archives-error-state span {
  max-width: 380px;
  font-size: 11px;
}

@keyframes archivesPageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes archiveCollectingPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes archivesSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes archiveNewDot {
  0%, 100% { opacity: 0.35; transform: scale(0.72); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 760px) {
  .archives-page {
    padding: 12px 10px 84px;
  }

  .archives-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .archives-tools,
  .archives-search {
    width: 100%;
  }

  .archive-item-open {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
  }

  .archive-item-message {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archives-page,
  .archive-collecting::before,
  .archive-new-tag::before,
  .archives-skeleton {
    animation: none !important;
  }
}

/* Workflow page. */
.workflow-page {
  min-height: 0;
  height: 100%;
  padding: 6px 8px 10px;
  overflow: hidden;
  animation: workflowPageIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workflow-panel {
  min-height: 0;
  height: 100%;
  border: 1px solid #252b35;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 34%),
    #050506;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 22px 60px rgba(0, 0, 0, 0.34);
}

.workflow-sidebar {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #292a30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    #0d0e10;
}

.workflow-sidebar-head {
  display: grid;
  gap: 4px;
}

.workflow-sidebar-head span,
.workflow-toolbar span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-sidebar-head strong,
.workflow-toolbar strong {
  color: #ffffff;
  font: 950 18px/1.1 var(--font-display);
}

.workflow-search {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #2a2b30;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #a1a1aa;
  background: #101113;
}

.workflow-search i {
  width: 17px;
  height: 17px;
}

.workflow-search input {
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #f4f4f5 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: 800 13px/1 var(--font-ui);
}

.workflow-search input::placeholder {
  color: #71717a;
}

.workflow-node-palette {
  display: grid;
  gap: 10px;
}

.workflow-palette-item {
  min-height: 74px;
  padding: 12px;
  border: 1px solid #2a2b30;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #f4f4f5;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 54%),
    #111113;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms ease, background 160ms ease;
}

.workflow-palette-item:hover,
.workflow-palette-item:focus-visible {
  border-color: #3a3b42;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 54%),
    #171719;
  outline: none;
  transform: translateY(-1px);
}

.workflow-palette-item:active {
  cursor: grabbing;
  transform: scale(0.985);
}

.workflow-palette-item strong,
.workflow-palette-item small {
  display: block;
  min-width: 0;
}

.workflow-palette-copy {
  min-width: 0;
  overflow: hidden;
}

.workflow-palette-item strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
}

.workflow-palette-item small {
  margin-top: 4px;
  display: grid;
  gap: 1px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.18;
}

.workflow-palette-item small span,
.workflow-palette-item small em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.workflow-palette-item small span {
  text-transform: lowercase;
}

.workflow-palette-item small em {
  color: #c4c4cc;
}

.workflow-node-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #f4f4f5;
  background: #18181b;
}

.workflow-node-icon i {
  width: 19px;
  height: 19px;
}

.workflow-node-icon.trigger,
.workflow-node-icon.condition,
.workflow-node-icon.action {
  color: #f4f4f5;
  border-color: #303138;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.012)),
    #151518;
}

.workflow-canvas-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.workflow-toolbar {
  min-height: 74px;
  padding: 16px 18px;
  border-bottom: 1px solid #292a30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    #0f1012;
}

.workflow-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.workflow-toolbar-actions .primary-button,
.workflow-toolbar-actions .secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.workflow-canvas {
  position: relative;
  min-height: 520px;
  overflow: auto;
  background-color: #050506;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 28px 28px;
}

.workflow-grid-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(5, 5, 6, 0.72));
}

.workflow-node {
  position: absolute;
  z-index: 2;
  width: 250px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid #303138;
  border-radius: 18px;
  color: #f4f4f5;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 52%),
    #101012;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 42px rgba(0, 0, 0, 0.32);
}

.workflow-node:hover {
  border-color: #484a53;
  transform: translateY(-1px);
}

.workflow-node header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.workflow-node small,
.workflow-node strong,
.workflow-node p {
  display: block;
  min-width: 0;
}

.workflow-node small {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-node strong {
  margin-top: 3px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.workflow-node p {
  margin: 12px 0 0;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.workflow-node-note {
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--node-color, #d4d4d8) 24%, #2a2b30);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: #d4d4d8;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--node-color, #d4d4d8) 8%, transparent), transparent 64%),
    rgba(255, 255, 255, 0.035);
}

.workflow-node-note i {
  width: 15px;
  height: 15px;
  color: var(--node-color, #d4d4d8);
}

.workflow-node-note span {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-node-trigger {
  left: 54px;
  top: 84px;
}

.workflow-node-condition {
  left: 388px;
  top: 214px;
}

.workflow-node-action {
  left: 720px;
  top: 118px;
}

.workflow-port {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #08090c;
  border-radius: 999px;
  background: #71717a;
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px #3f3f46;
}

.workflow-port.input {
  left: -7px;
}

.workflow-port.output {
  right: -7px;
  background: #d4d4d8;
  box-shadow: 0 0 0 1px rgba(212, 212, 216, 0.64), 0 0 16px rgba(255, 255, 255, 0.1);
}

.workflow-connector {
  position: absolute;
  z-index: 1;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(161, 161, 170, 0), rgba(212, 212, 216, 0.8), rgba(161, 161, 170, 0));
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
  transform-origin: left center;
}

.workflow-connector::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d4d4d8;
  transform: translateY(-50%);
}

.connector-one {
  left: 300px;
  top: 190px;
  width: 124px;
  transform: rotate(21deg);
}

.connector-two {
  left: 638px;
  top: 276px;
  width: 120px;
  transform: rotate(-21deg);
}

@keyframes workflowPageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .workflow-panel {
    grid-template-columns: 1fr;
  }

  .workflow-sidebar {
    border-right: 0;
    border-bottom: 1px solid #292a30;
  }

  .workflow-node-palette {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-palette-item {
    min-height: 96px;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .workflow-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-canvas {
    min-height: 440px;
  }
}

@media (max-width: 660px) {
  .workflow-panel {
    min-height: calc(100dvh - 92px);
  }

  .workflow-sidebar,
  .workflow-toolbar {
    padding: 12px;
  }

  .workflow-node-palette {
    grid-template-columns: 1fr;
  }

  .workflow-toolbar-actions {
    width: 100%;
  }

  .workflow-toolbar-actions .primary-button,
  .workflow-toolbar-actions .secondary-button {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .workflow-canvas {
    min-height: 520px;
  }

  .workflow-node {
    width: min(236px, calc(100vw - 78px));
  }

  .workflow-node-trigger {
    left: 26px;
    top: 36px;
  }

  .workflow-node-condition {
    left: 72px;
    top: 210px;
  }

  .workflow-node-action {
    left: 26px;
    top: 384px;
  }

  .workflow-connector {
    display: none;
  }
}

.split-filter-builder {
  display: grid;
  gap: 16px;
}

.split-filter-hero {
  min-height: 92px;
  padding: 0;
  border: 1px solid rgba(34, 197, 94, 0.22) !important;
  border-radius: 18px;
  display: block;
}

.split-filter-hero .liquid-button-bg {
  opacity: 0.82;
}

.split-filter-hero .liquid-button-blob,
.split-filter-hero .liquid-button-bridge {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.26), rgba(134, 239, 172, 0.12)),
    rgba(34, 197, 94, 0.055);
}

.split-filter-hero .liquid-button-content {
  width: calc(100% - 18px);
  min-height: 82px;
  margin: 9px;
  padding: 12px 16px;
  place-items: stretch;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025)),
    rgba(8, 15, 12, 0.76);
}

.split-filter-mark {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.11);
}

.split-filter-mark i {
  width: 26px;
  height: 26px;
}

.split-filter-hero .split-filter-hero-copy > span,
.split-filter-preview > span,
.split-filter-fields label > span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.split-filter-hero strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.split-filter-hero:hover .split-filter-mark {
  border-color: rgba(134, 239, 172, 0.48);
  background: rgba(34, 197, 94, 0.16);
}

.split-filter-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 12px;
}

.split-filter-fields label {
  display: grid;
  gap: 8px;
}

.split-filter-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #343c49;
  border-radius: 14px;
  color: #ffffff;
  background: #080a0f;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.split-filter-fields input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.split-filter-preview {
  padding: 13px;
  border: 1px solid #252b35;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0b0f15;
}

.split-filter-preview .split-filter-chip {
  cursor: default;
}

.split-filter-chip,
.account-filter-button {
  border: 1px solid #2a303a;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4d8df;
  background: #151922;
  font: 900 12px/1 var(--font-ui);
  cursor: pointer;
}

.split-filter-chip {
  min-height: 32px;
  gap: 7px;
  padding: 0 10px;
  white-space: nowrap;
}

.split-filter-chip small {
  color: #8b949e;
  font-size: 10px;
}

.split-filter-chip.active {
  color: #dcfce7;
  border-color: #22c55e;
  background: #08200f;
}

.split-filter-chip.active small {
  color: #86efac;
}

.split-filter-chip.add {
  color: #f4f7fb;
}

.split-filter-chip i {
  width: 15px;
  height: 15px;
}

.filtered-feed {
  flex: 1 1 auto;
  padding-top: 12px;
  background: rgba(5, 8, 13, 0.46);
}

.filtered-feed .event:not(.system) {
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) !important;
  gap: 2px 8px !important;
}

.filtered-feed .event:not(.system) .event-topline {
  display: none !important;
}

.filtered-feed .event:not(.system) .event-body {
  display: contents !important;
}

.filtered-feed .event:not(.system) .event-identity {
  grid-column: 1 !important;
  min-width: 0 !important;
}

.filtered-feed .event:not(.system) .event-message {
  grid-column: 2 !important;
  min-width: 0 !important;
}

.filtered-feed .event.raw-event:not(.system) .event-message {
  grid-column: 1 / -1 !important;
}

.filter-empty-state {
  width: min(440px, calc(100% - 24px));
}

.account-filter-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  margin-left: auto;
  gap: 0;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #0f141b;
  box-shadow: -14px 0 18px rgba(12, 15, 20, 0.88);
}

.account-filter-button i {
  width: 17px;
  height: 17px;
}

.account-filter-button span {
  position: absolute;
  right: 5px;
  top: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #bbf7d0;
  background: #08200f;
  font-size: 9px;
  line-height: 1;
}

.account-filter-button.active {
  color: #dcfce7;
  border-color: #22c55e;
  background: #08200f;
}

.account-filter-button:hover,
.account-filter-button:focus-visible,
.split-filter-chip:hover,
.split-filter-chip:focus-visible {
  color: #ffffff !important;
  border-color: #3a4351 !important;
  background: #1b222d !important;
  outline: none !important;
}

@media (max-width: 760px) {
  body[data-stage="console"] .console-split {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: grid !important;
  }

  body[data-stage="console"] .console-split.split-active {
    grid-template-columns: minmax(190px, var(--main-console-size)) 12px minmax(190px, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }

  body[data-stage="console"] .console-split .feed {
    width: 100% !important;
    min-height: 0 !important;
    padding-bottom: 10px !important;
  }

  body[data-stage="console"] .console-chat-composer {
    margin: 7px 8px 8px !important;
    padding: 7px !important;
    grid-template-columns: minmax(0, 1fr) 40px 40px !important;
    gap: 6px !important;
  }

  body[data-stage="console"] .console-chat-composer .chat-composer-tools {
    grid-column: 1 / -1 !important;
  }

  .filter-split-header {
    padding: 7px 10px;
    gap: 8px;
  }

  .split-filter-fields,
  .split-filter-hero {
    grid-template-columns: 1fr;
  }

  .split-filter-preview {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-split-title span {
    display: none;
  }

  .split-filter-chip {
    min-height: 30px;
    padding: 0 9px;
  }

  .split-filter-chip small {
    display: none;
  }

  body[data-stage="console"] .account-filter-button {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
  }
}

/* Mobile login sanity pass: keep the whole login usable above the fold. */
@media (max-width: 760px) {
  body[data-stage="login"] .login-view {
    width: 100vw !important;
    max-width: 100vw !important;
    min-height: 100dvh !important;
    place-items: start center !important;
    padding: 16px 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body[data-stage="login"] .login-card {
    box-sizing: border-box !important;
    position: fixed !important;
    top: 18px !important;
    left: 16px !important;
    right: auto !important;
    width: min(300px, calc(100vw - 88px)) !important;
    max-width: 300px !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-inline: auto !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    border-radius: 20px !important;
    overflow: visible !important;
  }

  body[data-stage="login"] .login-card *,
  body[data-stage="login"] .login-card *::before,
  body[data-stage="login"] .login-card *::after {
    box-sizing: border-box !important;
  }

  body[data-stage="login"] .login-brand {
    order: 1 !important;
    width: 100% !important;
    gap: 0 !important;
  }

  body[data-stage="login"] .login-brand .large {
    width: 34px !important;
    height: 34px !important;
    padding: 7px !important;
  }

  body[data-stage="login"] .login-brand .console-wordmark {
    font-size: 32px !important;
    letter-spacing: 0 !important;
  }

  body[data-stage="login"] .login-visual {
    order: 2 !important;
    width: 100% !important;
    min-height: 118px !important;
    max-height: 118px !important;
    padding: 12px !important;
    border-radius: 16px !important;
  }

  body[data-stage="login"] .moderation-scope {
    width: 106px !important;
    height: 106px !important;
  }

  body[data-stage="login"] .hero-mark {
    width: 44px !important;
    height: 44px !important;
  }

  body[data-stage="login"] .login-field,
  body[data-stage="login"] .login-button,
  body[data-stage="login"] .auth-box {
    width: 100% !important;
  }

  body[data-stage="login"] .login-card .login-field:nth-of-type(1) {
    order: 3 !important;
  }

  body[data-stage="login"] .login-card .login-field:nth-of-type(2) {
    order: 4 !important;
  }

  body[data-stage="login"] .login-button {
    order: 5 !important;
  }

  body[data-stage="login"] .auth-box {
    order: 6 !important;
  }

  body[data-stage="login"] .login-field {
    gap: 6px !important;
  }

  body[data-stage="login"] .login-field input,
  body[data-stage="login"] .login-button {
    min-height: 44px !important;
    border-radius: 14px !important;
  }
}

/* Keep the console panes below the account tab rail. */
body[data-stage="console"] .monitor-panel > .account-tabs {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 30 !important;
  margin-bottom: 6px !important;
}

body[data-stage="console"] .monitor-panel.account-tabs-collapsed > .account-tabs {
  margin-bottom: 0 !important;
}

body[data-stage="console"] .monitor-panel > .console-split {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
}

/* Full workflow editor. */
.workflow-app {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  overflow: hidden;
}

.workflow-app .workflow-sidebar,
.workflow-inspector {
  min-height: 0;
  overflow: hidden;
}

.workflow-category-picker {
  position: relative;
  z-index: 18;
}

.workflow-category-button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #2a2b30;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  color: #d4d4d8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #101113;
  font: 950 12px/1 var(--font-ui);
  text-align: left;
  cursor: pointer;
  text-transform: uppercase;
}

.workflow-category-button i {
  width: 16px;
  height: 16px;
}

.workflow-category-button:hover,
.workflow-category-button.active {
  color: #ffffff;
  border-color: #3f3f46;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    #151518;
}

.workflow-category-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: 250px;
  padding: 8px;
  border: 1px solid #2b2c33;
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(14, 15, 18, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 42px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: workflowNodeMenuIn 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workflow-category-menu button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #2a2b30;
  border-radius: 999px;
  color: #a1a1aa;
  background: #111113;
  font: 900 10px/1 var(--font-ui);
  cursor: pointer;
  text-transform: uppercase;
}

.workflow-category-menu button.active,
.workflow-category-menu button:hover {
  color: #ffffff;
  border-color: #52525b;
  background: #1a1a1d;
}

.workflow-node-palette {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px 10px 10px;
  border: 1px solid #25262b;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 42%),
    #0b0c0e;
}

.workflow-palette-item {
  width: 100%;
  max-width: 100%;
}

.workflow-bot-manager {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #25262b;
  display: grid;
  gap: 10px;
}

.workflow-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workflow-add-bot-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #30313a;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012)),
    #18181b;
  font: 950 10px/1 var(--font-ui);
  text-transform: uppercase;
  cursor: pointer;
}

.workflow-add-bot-button i {
  width: 15px;
  height: 15px;
  color: #fde68a;
}

.workflow-add-bot-button:hover,
.workflow-add-bot-button:focus-visible {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.10);
  outline: none;
}

.workflow-section-title span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-section-title small {
  min-width: 0;
  color: #71717a;
  font-size: 11px;
  font-weight: 800;
}

.workflow-bot-cards {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.workflow-bot-card {
  min-height: 76px;
  padding: 10px;
  border: 1px solid #26272d;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.046), transparent 58%),
    #101113;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.workflow-bot-card:hover {
  border-color: color-mix(in srgb, var(--node-color, #facc15) 28%, #33343a);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--node-color, #facc15) 10%, transparent), transparent 62%),
    #121316;
  transform: translateY(-1px);
}

.workflow-bot-card:active {
  cursor: grabbing;
  transform: translateY(0);
}

.workflow-bot-card.online {
  border-color: color-mix(in srgb, #3ddc97 34%, #303138);
  background:
    linear-gradient(145deg, rgba(61, 220, 151, 0.08), transparent 62%),
    #121416;
}

.workflow-bot-empty-action,
.workflow-bot-empty-state {
  min-height: 74px;
  padding: 12px;
  border: 1px dashed #32333a;
  border-radius: 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #d4d4d8;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 58%),
    rgba(16, 17, 19, 0.68);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.workflow-bot-empty-action:hover,
.workflow-bot-empty-action:focus-visible {
  border-color: rgba(250, 204, 21, 0.42);
  background:
    linear-gradient(145deg, rgba(250, 204, 21, 0.08), transparent 62%),
    #121316;
  outline: none;
  transform: translateY(-1px);
}

.workflow-bot-empty-action span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
}

.workflow-bot-empty-action strong,
.workflow-bot-empty-state strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.workflow-bot-empty-action small,
.workflow-bot-empty-state small {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 800;
}

.workflow-bot-empty-state {
  cursor: default;
  transform: none;
}

.workflow-bot-head {
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--node-color, #facc15) 32%, #303138);
  border-radius: 10px;
  object-fit: cover;
  background: #151518;
  image-rendering: pixelated;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.workflow-bot-card-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.workflow-bot-card-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.workflow-bot-card strong,
.workflow-bot-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-bot-card strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
}

.workflow-bot-card small {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.workflow-bot-status {
  max-width: 78px;
  padding: 3px 6px;
  border: 1px solid #2a2b30;
  border-radius: 999px;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.035);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-bot-status.online {
  color: #b7f7d2;
  border-color: rgba(61, 220, 151, 0.28);
  background: rgba(61, 220, 151, 0.10);
}

.workflow-editor {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.workflow-title-stack {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workflow-title-stack input {
  width: min(520px, 100%);
  min-height: 34px;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  font: 950 20px/1 var(--font-display);
  outline: none;
}

.workflow-save-state {
  width: fit-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid rgba(161, 161, 170, 0.18);
  border-radius: 999px;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.045);
  font: 800 11px/1 var(--font-ui);
}

.workflow-save-state.is-unsaved {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.10);
}

.workflow-save-state.is-saved {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.08);
}

.workflow-canvas-wrap {
  position: relative;
  min-height: 0;
}

.workflow-action-dock {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 24;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    rgba(14, 15, 18, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 14px 20px rgba(0, 0, 0, 0.20),
    0 30px 72px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: workflowDockFloat 4.8s ease-in-out infinite;
  transform: translateX(-50%);
}

.workflow-action-dock::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 54%);
  opacity: 0.72;
}

.workflow-dock-button {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #a1a1aa;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition:
    color 190ms ease,
    background 190ms ease,
    box-shadow 190ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.workflow-dock-button i {
  width: 20px;
  height: 20px;
  stroke-width: 2.15;
}

.workflow-dock-button:hover,
.workflow-dock-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 12px 26px rgba(0, 0, 0, 0.26);
  outline: none;
  transform: translateY(-4px) scale(1.08);
}

.workflow-dock-button:active,
.workflow-dock-button.is-pressing {
  transform: translateY(-1px) scale(0.94);
}

.workflow-dock-button.primary {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.055)),
    #1d1f24;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.11),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.workflow-dock-button.primary:hover,
.workflow-dock-button.primary:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.075)),
    #25272d;
}

.workflow-dock-button.danger {
  color: #fda4af;
}

.workflow-dock-button.danger.is-active {
  color: #ffe4e6;
  background:
    linear-gradient(180deg, rgba(251, 113, 133, 0.18), rgba(127, 29, 29, 0.16)),
    rgba(63, 13, 22, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(251, 113, 133, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.26);
}

.workflow-dock-button.danger.is-stopping i {
  animation: workflowStopPulse 760ms ease-in-out infinite;
}

.workflow-dock-button:disabled {
  transform: none;
  box-shadow: none;
}

.workflow-dock-button.has-errors {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
}

.workflow-console-badge {
  position: absolute;
  right: -1px;
  top: -3px;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(254, 202, 202, 0.62);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff1f2;
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.96), rgba(159, 18, 57, 0.96));
  box-shadow:
    0 0 0 3px rgba(15, 16, 18, 0.86),
    0 10px 22px rgba(127, 29, 29, 0.36);
  font: 950 10px/1 var(--font-ui);
  animation: workflowConsoleBadgeIn 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workflow-console-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: end center;
  padding: 24px;
}

.workflow-console-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(3, 4, 6, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 140ms ease;
}

.workflow-console-panel {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: min(660px, calc(100dvh - 84px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  overflow: hidden;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(12, 13, 16, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 28px 86px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.workflow-console-modal.is-open .workflow-console-backdrop {
  opacity: 1;
}

.workflow-console-modal.is-open .workflow-console-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.workflow-console-header {
  min-height: 76px;
  padding: 18px 20px;
  border-bottom: 1px solid #272832;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(16, 17, 20, 0.78);
}

.workflow-console-header span,
.workflow-console-header small {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.workflow-console-header h2 {
  margin: 5px 0 0;
  color: #ffffff;
  font: 950 22px/1.05 var(--font-display);
}

.workflow-console-list {
  max-height: min(560px, calc(100dvh - 178px));
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.workflow-console-entry {
  padding: 12px;
  border: 1px solid #272832;
  border-left: 4px solid #71717a;
  border-radius: 14px;
  display: grid;
  gap: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 56%),
    rgba(13, 14, 17, 0.86);
}

.workflow-console-entry.error {
  border-left-color: #fb7185;
  background:
    linear-gradient(145deg, rgba(251, 113, 133, 0.105), transparent 58%),
    rgba(17, 14, 17, 0.9);
}

.workflow-console-entry.success {
  border-left-color: #a1a1aa;
}

.workflow-console-entry.warning {
  border-left-color: #fbbf24;
}

.workflow-console-entry-top,
.workflow-console-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.workflow-console-entry-top span,
.workflow-console-entry-top strong,
.workflow-console-entry-top em,
.workflow-console-context span {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #30313a;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.035);
  font: 900 10px/1 var(--font-ui);
  text-transform: uppercase;
}

.workflow-console-entry-top strong {
  color: #f4f4f5;
}

.workflow-console-entry.error .workflow-console-entry-top strong {
  color: #fecaca;
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(127, 29, 29, 0.24);
}

.workflow-console-entry p {
  margin: 0;
  color: #e4e4e7;
  font: 800 13px/1.45 var(--font-ui);
  overflow-wrap: anywhere;
}

.workflow-console-entry pre {
  max-height: 180px;
  margin: 0;
  padding: 10px;
  border: 1px solid #272832;
  border-radius: 12px;
  overflow: auto;
  color: #d4d4d8;
  background: rgba(5, 5, 6, 0.64);
  font: 750 11px/1.45 var(--font-mono);
}

.workflow-console-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #a1a1aa;
  text-align: center;
}

.workflow-console-empty i {
  width: 32px;
  height: 32px;
}

.workflow-console-empty strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
}

.workflow-console-empty p {
  max-width: 340px;
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.workflow-bot-modal {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: grid;
  place-items: center;
  padding: 22px;
}

.workflow-bot-modal-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(3, 4, 6, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 140ms ease;
}

.workflow-bot-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.018)),
    rgba(13, 14, 17, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 26px 74px rgba(0, 0, 0, 0.54);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.workflow-bot-modal.is-open .workflow-bot-modal-backdrop {
  opacity: 1;
}

.workflow-bot-modal.is-open .workflow-bot-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.workflow-bot-modal-header {
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid #272832;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workflow-bot-modal-header span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.workflow-bot-modal-header h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font: 950 20px/1.05 var(--font-display);
}

.workflow-bot-form {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.workflow-bot-auth-box {
  padding: 12px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  background: rgba(250, 204, 21, 0.07);
}

.workflow-bot-auth-box span,
.workflow-bot-status-line {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 850;
}

.workflow-bot-auth-box strong {
  color: #ffffff;
  font: 950 22px/1 var(--font-display);
  letter-spacing: 0.08em;
}

.workflow-bot-auth-box a {
  color: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

.workflow-bot-status-line {
  min-height: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}

@keyframes workflowConsoleBadgeIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workflowStopPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.88);
  }
}

@keyframes workflowDockFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

.workflow-canvas-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  padding: 6px;
  border: 1px solid #28292f;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 16, 18, 0.94);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.workflow-canvas-toolbar strong {
  min-width: 48px;
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.workflow-canvas {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  cursor: default;
  background-color: #050506;
  background-image:
    radial-gradient(circle, rgba(244, 244, 245, 0.13) 0 1.15px, transparent 1.45px),
    radial-gradient(circle, rgba(161, 161, 170, 0.08) 0 0.9px, transparent 1.2px),
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.035), transparent 26%),
    radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.026), transparent 28%);
  background-position:
    0 0,
    17px 17px,
    0 0,
    0 0;
  background-size:
    34px 34px,
    34px 34px,
    100% 100%,
    100% 100%;
}

.workflow-dot-grid {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 7600px;
  height: 5200px;
  opacity: 0.92;
  pointer-events: none;
  transform-origin: 0 0;
  background-image:
    radial-gradient(circle, rgba(244, 244, 245, 0.20) 0 1.45px, transparent 1.7px),
    radial-gradient(circle, rgba(161, 161, 170, 0.12) 0 1px, transparent 1.25px);
  background-position: 0 0, 17px 17px;
  background-size: 34px 34px;
}

.workflow-grid-fade {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 7600px;
  height: 5200px;
  pointer-events: none;
  display: block;
  background:
    linear-gradient(180deg, rgba(5, 5, 6, 0.1), transparent 22%, rgba(5, 5, 6, 0.34)),
    radial-gradient(circle at 50% 50%, transparent, rgba(5, 5, 6, 0.42) 72%);
}

.workflow-canvas.is-panning,
body.workflow-is-panning .workflow-canvas,
body.workflow-is-panning .workflow-node,
body.workflow-is-panning .workflow-node-drag {
  cursor: grabbing !important;
  user-select: none;
}

.workflow-canvas.is-drop-target {
  box-shadow:
    inset 0 0 0 1px rgba(244, 244, 245, 0.18),
    inset 0 0 42px rgba(244, 244, 245, 0.035);
}

body.workflow-selecting,
body.workflow-selecting * {
  cursor: crosshair !important;
  user-select: none !important;
}

.workflow-selection-box {
  position: absolute;
  z-index: 20;
  border: 1px solid rgba(244, 244, 245, 0.62);
  border-radius: 12px;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(244, 244, 245, 0.105), rgba(244, 244, 245, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.2);
}

body.workflow-palette-dragging,
body.workflow-palette-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.workflow-drag-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 270px;
  min-height: 74px;
  pointer-events: none;
  opacity: 0.94;
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 34%, #303138) !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--node-color, #d4d4d8) 12%, transparent), transparent 58%),
    #141416 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.34);
  transform: translate3d(-999px, -999px, 0) scale(0.98);
  will-change: transform;
}

.workflow-drag-preview .workflow-node-icon {
  color: var(--node-color, #f4f4f5);
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 40%, #303138);
}

.workflow-canvas-space,
.workflow-connections {
  position: absolute;
  left: 0;
  top: 0;
  width: 7600px;
  height: 5200px;
  transform-origin: 0 0;
}

.workflow-connections {
  z-index: 1;
  pointer-events: auto;
}

.workflow-canvas-space {
  z-index: 2;
}

.workflow-link {
  fill: none;
  stroke: var(--link-color, #d4d4d8);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.84;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--link-color, #d4d4d8) 26%, transparent));
}

.workflow-link.is-deleting {
  pointer-events: none;
  stroke-dasharray: 8 8;
  animation: workflowLinkDelete 240ms ease-out both;
}

.workflow-link-draft {
  stroke-width: 4;
  opacity: 0.96;
  stroke-dasharray: 10 8;
  animation: workflowWireDash 780ms linear infinite;
}

.workflow-node {
  width: 250px;
  min-height: 126px;
  cursor: default;
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 34%, #303138);
  overflow: visible;
  transform-origin: center;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.workflow-node.is-deleting {
  z-index: 8;
  pointer-events: none;
  will-change: transform, opacity, filter;
  animation: workflowNodeDelete 260ms cubic-bezier(0.32, 0, 0.67, 0) both;
}

.workflow-node.is-deleting .workflow-node-actions {
  display: none;
}

.workflow-node.is-deleting::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid color-mix(in srgb, var(--node-color, #d4d4d8) 46%, transparent);
  border-radius: 24px;
  pointer-events: none;
  animation: workflowNodeDeleteRing 260ms ease-out both;
}

.workflow-node-actions {
  position: absolute;
  left: 50%;
  top: -46px;
  z-index: 7;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--node-color, #d4d4d8) 24%, #303138);
  border-radius: 999px;
  display: flex;
  gap: 4px;
  background: rgba(15, 16, 18, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 32px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%);
  animation: workflowNodeActionsIn 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.workflow-node-dragging .workflow-node-actions {
  display: none;
}

.workflow-node-actions button,
.workflow-node-context-menu button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #f4f4f5;
  background: transparent;
  font: 900 11px/1 var(--font-ui);
  cursor: pointer;
}

.workflow-node-actions button {
  padding: 0 10px;
}

.workflow-node-actions button i,
.workflow-node-context-menu button i {
  width: 15px;
  height: 15px;
}

.workflow-node-actions button:hover,
.workflow-node-context-menu button:hover {
  background: rgba(255, 255, 255, 0.075);
}

.workflow-node-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.workflow-node-context-menu button:disabled:hover {
  background: transparent;
}

.workflow-node-actions button.danger,
.workflow-node-context-menu button.danger {
  color: #fca5a5;
}

.workflow-node-actions button.danger:hover,
.workflow-node-context-menu button.danger:hover {
  color: #fecaca;
  background: rgba(255, 95, 119, 0.12);
}

.workflow-node-context-menu {
  position: fixed;
  z-index: 280;
  width: 226px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--node-color, #d4d4d8) 22%, #303138);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  background: #101113;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 50px rgba(0, 0, 0, 0.38);
  animation: workflowNodeMenuIn 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.workflow-node-context-title {
  padding: 7px 9px 8px;
  display: grid;
  gap: 3px;
}

.workflow-node-context-title strong,
.workflow-node-context-title small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-node-context-title strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.workflow-node-context-title small {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-node-context-menu button {
  width: 100%;
  padding: 0 10px;
  justify-content: flex-start;
  border-radius: 10px;
}

/* Primary account: outgoing chat/commands stay locked to this bot. */
.account-tab-group.primary-account,
.account-tab-group.primary-account:hover,
.account-tab-group.primary-account.active,
.account-tab-group.primary-account.connected-account,
.account-tab-group.primary-account.connected-account:hover {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  padding: 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.account-tab-group.primary-account::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 180%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.32) 62%,
    #ffffff 74%,
    #ffffff 80%,
    rgba(255, 255, 255, 0.32) 92%,
    rgba(255, 255, 255, 0.32) 100%
  );
  transform: translate(-50%, -50%) rotate(0deg);
  will-change: transform;
  animation: primaryAccountBorder 0.8s linear infinite;
}

.account-tab-group.primary-account::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background: #111318;
}

.account-tab-group.primary-account.active::after {
  background: #181b22;
}

.account-tab-group.primary-account > * {
  position: relative;
  z-index: 1;
}

.account-context-menu button.primary-active,
.account-context-menu button.primary-active:hover {
  color: #fff2cf !important;
  background: rgba(238, 165, 103, 0.11) !important;
}

.chat-tool-button.primary-locked {
  color: #fff2cf !important;
  border-color: rgba(238, 165, 103, 0.38) !important;
  background: rgba(238, 165, 103, 0.08) !important;
}

.chat-picker-menu button.primary-option small {
  color: #f6c979 !important;
}

.chat-picker-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

@keyframes primaryAccountBorder {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-tab-group.primary-account::before {
    animation: none;
  }
}

.workflow-config-modal {
  z-index: 290;
}

.workflow-note-modal {
  z-index: 292;
}

.workflow-note-modal.is-open .system-modal-backdrop,
.workflow-config-modal.is-open .system-modal-backdrop {
  opacity: 1;
}

.workflow-note-modal.is-open .system-modal-panel,
.workflow-config-modal.is-open .system-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.workflow-config-modal-panel {
  width: min(720px, calc(100vw - 28px)) !important;
}

.workflow-creative-modal-panel {
  width: min(1320px, calc(100vw - 24px)) !important;
}

.workflow-note-modal-panel {
  width: min(560px, calc(100vw - 28px)) !important;
}

.workflow-config-modal-panel .system-modal-header {
  border-bottom-color: color-mix(in srgb, var(--node-color, #d4d4d8) 18%, #292a30) !important;
}

.workflow-note-modal-panel .system-modal-header {
  border-bottom-color: color-mix(in srgb, var(--node-color, #d4d4d8) 18%, #292a30) !important;
}

.workflow-config-modal-body {
  max-height: min(720px, calc(100dvh - 128px));
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.workflow-creative-modal .workflow-config-modal-body {
  max-height: min(820px, calc(100dvh - 112px));
  overflow: hidden;
}

.workflow-note-modal-body {
  display: grid;
  gap: 12px;
}

.workflow-node::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 4px;
  border-radius: 999px;
  background: var(--node-color, #d4d4d8);
  box-shadow: 0 0 18px color-mix(in srgb, var(--node-color, #d4d4d8) 34%, transparent);
}

.workflow-node .workflow-node-icon,
.workflow-palette-item .workflow-node-icon,
.workflow-node-summary .workflow-node-icon {
  color: var(--node-color, #f4f4f5);
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 40%, #303138);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--node-color, #d4d4d8) 18%, transparent), rgba(255, 255, 255, 0.012)),
    #151518;
}

.workflow-node .workflow-port.output {
  background: var(--node-color, #d4d4d8);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--node-color, #d4d4d8) 70%, #ffffff),
    0 0 16px color-mix(in srgb, var(--node-color, #d4d4d8) 32%, transparent);
}

.workflow-palette-item {
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 16%, rgba(255, 255, 255, 0.08));
}

.workflow-node.selected {
  border-color: var(--node-color, #f4f4f5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px color-mix(in srgb, var(--node-color, #f4f4f5) 48%, transparent),
    0 0 28px color-mix(in srgb, var(--node-color, #f4f4f5) 20%, transparent),
    0 20px 44px rgba(0, 0, 0, 0.36);
}

.workflow-node.status-running {
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 70%, #ffffff);
}

.workflow-node.status-error {
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 36%, #fb7185);
}

.workflow-node.status-success {
  border-color: color-mix(in srgb, var(--node-color, #d4d4d8) 64%, #e4e4e7);
}

.workflow-node-drag {
  cursor: grab;
}

.workflow-node-drag:active {
  cursor: grabbing;
}

.workflow-node .workflow-port {
  border: 0;
  cursor: crosshair;
  touch-action: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.workflow-node .workflow-port:hover {
  transform: translateY(-50%) scale(1.18);
}

body.workflow-connecting .workflow-node .workflow-port.input {
  box-shadow:
    0 0 0 1px rgba(244, 244, 245, 0.42),
    0 0 18px rgba(244, 244, 245, 0.12);
}

.workflow-node .workflow-port.is-wire-target {
  background: #f4f4f5;
  transform: translateY(-50%) scale(1.32);
  box-shadow:
    0 0 0 3px rgba(244, 244, 245, 0.16),
    0 0 24px rgba(244, 244, 245, 0.18) !important;
}

@keyframes workflowWireDash {
  to {
    stroke-dashoffset: -18;
  }
}

@keyframes workflowNodeDelete {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  46% {
    opacity: 0.92;
    filter: blur(0);
    transform: translateY(-5px) scale(0.985);
  }
  100% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(14px) scale(0.86);
  }
}

@keyframes workflowNodeDeleteRing {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  40% {
    opacity: 0.74;
  }
  100% {
    opacity: 0;
    transform: scale(1.11);
  }
}

@keyframes workflowLinkDelete {
  to {
    opacity: 0;
    stroke-dashoffset: -18;
    filter: none;
  }
}

.workflow-inspector {
  padding: 18px;
  border-left: 1px solid #292a30;
  display: grid;
  grid-template-rows: auto 150px minmax(0, 1fr);
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), transparent 42%),
    #0d0e10;
}

.workflow-inspector-card {
  min-height: 0;
  padding: 12px;
  border: 1px solid #26272d;
  border-radius: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 54%),
    #111113;
}

.workflow-inspector-fields {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.workflow-inspector-fields label,
.workflow-config-modal-body label,
.workflow-note-field {
  display: grid;
  gap: 6px;
}

.workflow-inspector-fields label span,
.workflow-config-modal-body label span,
.workflow-note-field span {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-inspector-fields input,
.workflow-inspector-fields select,
.workflow-config-modal-body input,
.workflow-config-modal-body select,
.workflow-note-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #2a2b30;
  border-radius: 11px;
  color: #f4f4f5;
  background: #0c0d0f;
  font: 800 13px/1 var(--font-ui);
}

.workflow-note-field textarea {
  min-height: 144px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.workflow-inspector-fields input:focus,
.workflow-inspector-fields select:focus,
.workflow-config-modal-body input:focus,
.workflow-config-modal-body select:focus,
.workflow-note-field textarea:focus {
  outline: none;
  border-color: #52525b;
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.06);
}

.workflow-creative-editor {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.workflow-creative-tools,
.workflow-creative-board {
  min-height: 0;
  border: 1px solid #25262b;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.042), transparent 58%),
    #0d0e10;
}

.workflow-creative-tools {
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.workflow-creative-dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.workflow-creative-inventory-head {
  display: grid;
  gap: 10px;
}

.workflow-creative-search input {
  min-height: 36px;
}

.workflow-creative-selected {
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: rgba(250, 204, 21, 0.055);
}

.workflow-creative-selected > img,
.workflow-creative-selected > i,
.workflow-creative-materials img,
.workflow-creative-cell img,
.workflow-creative-block img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.workflow-creative-selected > i {
  padding: 8px;
  color: #fde68a;
}

.workflow-creative-selected strong,
.workflow-creative-selected small,
.workflow-creative-block strong,
.workflow-creative-block small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-creative-selected strong {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.workflow-creative-selected small {
  display: block;
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 800;
}

.workflow-creative-blocks {
  height: min(510px, calc(100dvh - 348px));
  margin-top: 10px;
  padding-right: 3px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
}

.workflow-creative-block {
  min-height: 82px;
  padding: 8px 6px;
  border: 1px solid #28292f;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 42px minmax(0, auto);
  justify-items: center;
  align-content: center;
  gap: 6px;
  color: #f4f4f5;
  background: #111215;
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.workflow-creative-block:hover,
.workflow-creative-block.selected {
  border-color: rgba(250, 204, 21, 0.46);
  background:
    linear-gradient(145deg, rgba(250, 204, 21, 0.09), transparent 62%),
    #131417;
}

.workflow-creative-block:active {
  transform: translateY(1px);
}

.workflow-creative-block img,
.workflow-creative-block > span {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #18191d;
}

.workflow-creative-block strong {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-creative-load {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
}

.workflow-creative-empty {
  min-height: 96px;
  padding: 14px;
  border: 1px dashed #32333a;
  border-radius: 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #a1a1aa;
  text-align: center;
}

.workflow-creative-empty strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.workflow-creative-empty small {
  font-size: 11px;
  font-weight: 800;
}

.workflow-creative-board {
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
}

.workflow-creative-board-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-creative-board-toolbar strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.workflow-creative-board-toolbar small {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 800;
}

.workflow-creative-board-actions {
  display: flex;
  gap: 7px;
}

.workflow-creative-canvas-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid #2d2e34;
  border-radius: 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #f6f6f4;
}

.workflow-creative-canvas-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.workflow-creative-canvas {
  width: max(100%, calc(max(100%, calc(var(--creative-cols) * 18px)) * var(--creative-view-zoom, 1)));
  min-width: 100%;
  min-height: 100%;
  aspect-ratio: var(--creative-cols) / var(--creative-rows);
  display: grid;
  grid-template-columns: repeat(var(--creative-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--creative-rows), minmax(0, 1fr));
  background: #fafaf8;
}

.workflow-creative-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(17, 18, 20, 0.2);
  border-bottom: 1px solid rgba(17, 18, 20, 0.2);
  display: grid;
  place-items: center;
  background: transparent;
  box-sizing: border-box;
  cursor: crosshair;
}

.workflow-creative-cell.major-col {
  border-left: 2px solid rgba(17, 18, 20, 0.84);
}

.workflow-creative-cell.major-row {
  border-top: 2px solid rgba(17, 18, 20, 0.84);
}

.workflow-creative-cell.painted {
  background: color-mix(in srgb, var(--creative-cell-color, #8a8f98) 18%, transparent);
}

.workflow-creative-cell:hover {
  z-index: 1;
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.78);
}

.workflow-creative-cell img {
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  pointer-events: none;
}

.workflow-creative-cell span {
  color: #111113;
  font-size: 9px;
  font-weight: 950;
}

.workflow-creative-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.workflow-creative-stats span {
  min-height: 48px;
  padding: 8px;
  border: 1px solid #26272d;
  border-radius: 12px;
  display: grid;
  align-content: center;
  gap: 2px;
  background: #111215;
}

.workflow-creative-stats strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.workflow-creative-stats small {
  color: #8f9098;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-creative-materials {
  min-height: 42px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.workflow-creative-materials span {
  min-width: 132px;
  padding: 6px;
  border: 1px solid #26272d;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  background: #101114;
}

.workflow-creative-materials img {
  width: 26px;
  height: 26px;
}

.workflow-creative-materials strong {
  min-width: 0;
  overflow: hidden;
  color: #f4f4f5;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-creative-materials small {
  color: #fde68a;
  font-size: 10px;
  font-weight: 950;
}

.workflow-creative-materials p {
  margin: 0;
  color: #8f9098;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 960px) {
  .workflow-creative-modal .workflow-config-modal-body {
    overflow-y: auto;
  }

  .workflow-creative-editor {
    grid-template-columns: 1fr;
  }

  .workflow-creative-tools {
    grid-template-rows: auto auto;
  }

  .workflow-creative-blocks {
    height: 240px;
  }

  .workflow-creative-board {
    min-height: 620px;
  }
}

.workflow-config-field small,
.workflow-node-description,
.workflow-node-examples li {
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.workflow-node-description {
  margin: 0;
  padding: 10px;
  border: 1px solid #25262b;
  border-radius: 12px;
  background: #0d0e10;
}

.workflow-node-examples {
  padding: 10px;
  border: 1px solid #25262b;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  background: #0c0d0f;
}

.workflow-node-examples > span {
  color: #f4f4f5;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.workflow-node-examples ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

.workflow-inspector-card.is-config-focus {
  border-color: #52525b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(244, 244, 245, 0.08);
}

.workflow-config-modal-actions {
  position: sticky;
  bottom: -20px;
  margin: 4px -20px -20px;
  padding: 14px 20px 20px;
  border-top: 1px solid #292a30;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(16, 17, 19, 0.68), #101113 42%),
    #101113;
}

@keyframes workflowNodeActionsIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes workflowNodeMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.workflow-node-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.workflow-node-summary strong,
.workflow-node-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-node-summary strong {
  color: #ffffff;
  font-weight: 950;
}

.workflow-node-summary small {
  margin-top: 3px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 800;
}

.workflow-minimap {
  position: relative;
  min-height: 86px;
  border: 1px solid #24252a;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #08090a;
  background-size: 12px 12px;
}

.workflow-minimap span {
  position: absolute;
  width: 8px;
  height: 6px;
  border-radius: 2px;
  background: var(--node-color, #71717a);
}

.workflow-minimap span.active {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 12px color-mix(in srgb, var(--node-color, #f4f4f5) 42%, transparent);
}

.workflow-logs-card {
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.workflow-logs {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
}

.workflow-logs > .workflow-empty-copy {
  margin-top: 2px;
  align-self: start;
}

.workflow-log {
  padding: 8px;
  border: 1px solid #25262b;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  align-items: start;
  background: #0d0e10;
}

.workflow-log-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-log span,
.workflow-log strong,
.workflow-log em {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.workflow-log em {
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid #2a2b30;
  border-radius: 999px;
  overflow: hidden;
  color: #d4d4d8;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.035);
}

.workflow-log p {
  margin: 0;
  min-width: 0;
  color: #e4e4e7;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.workflow-log.error {
  border-color: #3f3f46;
}

.workflow-log.success {
  border-color: #52525b;
}

.workflow-log.warning {
  border-color: #3f3f46;
}

.workflow-empty-copy {
  margin: 0;
  color: #71717a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(161, 161, 170, 0.44) transparent;
}

*::-webkit-scrollbar,
.feed::-webkit-scrollbar,
.connect-panel::-webkit-scrollbar,
.workflow-node-palette::-webkit-scrollbar,
.workflow-bot-cards::-webkit-scrollbar,
.workflow-inspector-fields::-webkit-scrollbar,
.workflow-logs::-webkit-scrollbar,
.workflow-config-modal-body::-webkit-scrollbar,
.modal-view::-webkit-scrollbar,
.account-lobby-menu::-webkit-scrollbar,
.chat-picker-menu::-webkit-scrollbar,
.responses-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track,
.feed::-webkit-scrollbar-track,
.connect-panel::-webkit-scrollbar-track,
.workflow-node-palette::-webkit-scrollbar-track,
.workflow-bot-cards::-webkit-scrollbar-track,
.workflow-inspector-fields::-webkit-scrollbar-track,
.workflow-logs::-webkit-scrollbar-track,
.workflow-config-modal-body::-webkit-scrollbar-track,
.modal-view::-webkit-scrollbar-track,
.account-lobby-menu::-webkit-scrollbar-track,
.chat-picker-menu::-webkit-scrollbar-track,
.responses-list::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb,
.feed::-webkit-scrollbar-thumb,
.connect-panel::-webkit-scrollbar-thumb,
.workflow-node-palette::-webkit-scrollbar-thumb,
.workflow-bot-cards::-webkit-scrollbar-thumb,
.workflow-inspector-fields::-webkit-scrollbar-thumb,
.workflow-logs::-webkit-scrollbar-thumb,
.workflow-config-modal-body::-webkit-scrollbar-thumb,
.modal-view::-webkit-scrollbar-thumb,
.account-lobby-menu::-webkit-scrollbar-thumb,
.chat-picker-menu::-webkit-scrollbar-thumb,
.responses-list::-webkit-scrollbar-thumb {
  min-height: 34px;
  border: 1px solid rgba(5, 5, 6, 0.54);
  border-radius: 999px;
  background: rgba(161, 161, 170, 0.36);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover,
.feed::-webkit-scrollbar-thumb:hover,
.connect-panel::-webkit-scrollbar-thumb:hover,
.workflow-node-palette::-webkit-scrollbar-thumb:hover,
.workflow-bot-cards::-webkit-scrollbar-thumb:hover,
.workflow-inspector-fields::-webkit-scrollbar-thumb:hover,
.workflow-logs::-webkit-scrollbar-thumb:hover,
.workflow-config-modal-body::-webkit-scrollbar-thumb:hover,
.modal-view::-webkit-scrollbar-thumb:hover,
.account-lobby-menu::-webkit-scrollbar-thumb:hover,
.chat-picker-menu::-webkit-scrollbar-thumb:hover,
.responses-list::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 212, 216, 0.56);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

@media (max-width: 1180px) {
  .workflow-app {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .workflow-inspector {
    display: none;
  }
}

@media (max-width: 760px) {
  .workflow-page {
    padding: 8px;
  }

  .workflow-app {
    grid-template-columns: 1fr;
  }

  .workflow-sidebar {
    display: none;
  }

  .workflow-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-toolbar-actions {
    width: 100%;
  }

  .workflow-action-dock {
    bottom: 12px;
    min-height: 56px;
    padding: 6px;
  }

  .workflow-dock-button {
    width: 44px;
    height: 44px;
  }
}

/* Mobile console cleanup: keep the chat readable and move bot actions to long-press. */
@media (max-width: 760px) {
  body[data-stage="console"] #workflowButton,
  body[data-stage="console"] .monitor-header {
    display: none !important;
  }


  body[data-stage="console"] .workspace,
  body[data-stage="console"] .monitor-panel,
  body[data-stage="console"] .console-split,
  body[data-stage="console"] .console-pane-shell {
    min-height: 0 !important;
  }

  body[data-stage="console"] .account-tabs {
    min-height: 48px !important;
    max-height: 58px !important;
    margin: 6px 8px 4px !important;
    padding: 5px !important;
    gap: 6px !important;
  }

  body[data-stage="console"] .account-tab-group:not(.all-console-group) .account-tab-action,
  body[data-stage="console"] .account-tab-group:not(.all-console-group) .account-tab-lobby {
    display: none !important;
  }

  body[data-stage="console"] .account-tab {
    max-width: min(178px, calc(100vw - 96px)) !important;
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  body[data-stage="console"] .account-tab-group.long-press-open {
    border-color: rgba(34, 197, 94, 0.72) !important;
    background: rgba(34, 197, 94, 0.12) !important;
  }

  body[data-stage="console"] .console-split .feed,
  body[data-stage="console"] .feed {
    padding: 10px 10px calc(96px + env(safe-area-inset-bottom)) !important;
    gap: 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body[data-stage="console"] .feed .event,
  body[data-stage="console"] .event {
    min-height: auto !important;
    overflow: visible !important;
  }

  body[data-stage="console"] .event-topline,
  body[data-stage="console"] .event-body,
  body[data-stage="console"] .event-identity,
  body[data-stage="console"] .event-user,
  body[data-stage="console"] .event-message,
  body[data-stage="console"] .event-filter {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body[data-stage="console"] .floating-nav {
    min-height: 54px !important;
    padding: 6px !important;
  }

  .account-context-menu.mobile-account-sheet {
    width: auto !important;
    max-height: min(68dvh, calc(100dvh - 104px)) !important;
    padding: 8px !important;
    overflow-y: auto !important;
    border-radius: 22px !important;
    z-index: 180 !important;
    scrollbar-width: none !important;
  }

  .account-context-menu.mobile-account-sheet::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }

  .account-context-menu.mobile-account-sheet button {
    min-height: 42px !important;
    border-radius: 12px !important;
  }

  .account-mobile-lobby-section {
    margin: 6px 0;
    padding: 8px 0;
    border-top: 1px solid #27272a;
    border-bottom: 1px solid #27272a;
    display: grid;
    gap: 4px;
  }

  .account-mobile-lobby-section strong {
    padding: 4px 10px 6px;
    color: var(--muted);
    font: 900 11px/1 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .account-mobile-lobby-section p {
    margin: 0;
    padding: 8px 10px;
    color: var(--muted);
    font: 800 12px/1.35 var(--font-ui);
  }

  .account-mobile-lobby-section button.active {
    color: #ffffff !important;
    background: #18181b !important;
  }
}

/* Mobile console top dock: replace the large identity cards with the action dock. */
@media (max-width: 760px) {
  body[data-stage="console"] .topbar,
  body[data-stage="console"].mobile-console-compact .topbar {
    width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: calc(max(8px, env(safe-area-inset-top)) + 62px) 8px 8px !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  body[data-stage="console"] .brand-block,
  body[data-stage="console"] .user-profile-chip,
  body[data-stage="console"] .server-identity-chip,
  body[data-stage="console"] #workflowButton {
    display: none !important;
  }

  body[data-stage="console"] .topbar-meta {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  body[data-stage="console"] .status-group {
    width: 100% !important;
    padding-left: 0 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body[data-stage="console"] .status-pill {
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 14px !important;
  }

  body[data-stage="console"] .floating-nav {
    top: max(8px, env(safe-area-inset-top)) !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 54px !important;
    padding: 6px !important;
    transform: none !important;
    justify-content: space-around !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  body[data-stage="console"] .floating-nav::-webkit-scrollbar {
    display: none !important;
  }

  body[data-stage="console"] .console-split .feed,
  body[data-stage="console"] .feed {
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }

  body[data-stage="console"] .chat-composer {
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }
}

/* Mobile: remove the white chat account/shortcut strip. */
@media (max-width: 760px) {
  body[data-stage="console"] .console-chat-composer .chat-composer-tools,
  body[data-stage="console"] .chat-composer .chat-composer-tools {
    display: none !important;
  }

  body[data-stage="console"] .console-chat-composer,
  body[data-stage="console"] .chat-composer {
    grid-template-columns: minmax(0, 1fr) 40px 40px !important;
  }

#messageModalContent .message-preview-image {
    cursor: zoom-in;
    touch-action: manipulation;
  }
}

/* Admin chat log manager. */
.settings-chat-logs-button {
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #303138;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.settings-chat-logs-button:hover,
.settings-chat-logs-button:focus-visible {
  outline: none;
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-1px);
}

.settings-chat-logs-button > i:first-child {
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 10px;
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.2);
}

.settings-chat-logs-button > i:last-child {
  width: 17px;
  height: 17px;
  color: #71717a;
}

.settings-chat-logs-button span,
.settings-chat-logs-button strong,
.settings-chat-logs-button small {
  display: block;
}

.settings-chat-logs-button strong {
  font-size: 13px;
}

.settings-chat-logs-button small {
  margin-top: 4px;
  color: #8f9098;
  font-size: 11px;
}

.settings-chat-logs-button + .primary-button {
  margin-top: 10px;
}

.chat-logs-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: 20px;
}

.chat-logs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 7, 0.76);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 160ms ease;
}

.chat-logs-panel {
  position: relative;
  width: min(720px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 36px));
  border: 1px solid #303138;
  border-radius: 20px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  color: #f4f4f5;
  background: #101115;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 90px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 160ms ease, transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-logs-modal.is-open .chat-logs-backdrop,
.chat-logs-modal.is-open .chat-logs-panel {
  opacity: 1;
}

.chat-logs-modal.is-open .chat-logs-panel {
  transform: translateY(0) scale(1);
}

.chat-logs-modal.is-closing .chat-logs-backdrop,
.chat-logs-modal.is-closing .chat-logs-panel {
  opacity: 0;
}

.chat-logs-header {
  padding: 20px 22px;
  border-bottom: 1px solid #25262c;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.chat-logs-header span {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chat-logs-header h2 {
  margin: 5px 0 0;
  font: 900 20px/1.2 var(--font-ui);
}

.chat-logs-header p {
  margin: 7px 0 0;
  color: #8f9098;
  font-size: 12px;
}

.chat-logs-toolbar {
  padding: 11px 16px;
  border-bottom: 1px solid #25262c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a1a1aa;
  font-size: 12px;
  background: #141519;
}

.chat-logs-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-logs-summary span + span {
  padding-left: 16px;
  border-left: 1px solid #303138;
}

.chat-logs-summary strong {
  color: #e4e4e7;
}

.chat-logs-toolbar button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #303138;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d4d4d8;
  background: #191a1f;
  font: 800 11px/1 var(--font-ui);
  cursor: pointer;
}

.chat-logs-toolbar button:hover,
.chat-logs-toolbar button:focus-visible {
  outline: none;
  border-color: rgba(96, 165, 250, 0.35);
  color: #eff6ff;
}

.chat-logs-toolbar button i {
  width: 14px;
  height: 14px;
}

.chat-logs-list {
  min-height: 240px;
  padding: 8px;
  overflow-y: auto;
}

.chat-log-item {
  min-height: 68px;
  padding: 11px 12px;
  border-bottom: 1px solid #24252b;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  transition: background 140ms ease;
}

.chat-log-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.chat-log-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.18);
}

.chat-log-file-icon i {
  width: 18px;
  height: 18px;
}

.chat-log-file-copy {
  min-width: 0;
}

.chat-log-file-copy strong,
.chat-log-file-copy span {
  display: block;
}

.chat-log-file-copy strong {
  overflow: hidden;
  color: #ededf0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-log-file-copy span {
  margin-top: 5px;
  color: #85868e;
  font-size: 11px;
}

.chat-log-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chat-log-item [data-chat-log-download],
.chat-log-item [data-chat-log-delete] {
  width: 36px;
  height: 36px;
  border: 1px solid #303138;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #9a9ba3;
  background: #18191d;
  cursor: pointer;
}

.chat-log-item [data-chat-log-download]:hover,
.chat-log-item [data-chat-log-download]:focus-visible {
  outline: none;
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.22);
}

.chat-log-item [data-chat-log-delete]:hover,
.chat-log-item [data-chat-log-delete]:focus-visible {
  outline: none;
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

.chat-log-item [data-chat-log-download] i,
.chat-log-item [data-chat-log-delete] i {
  width: 15px;
  height: 15px;
}

.chat-log-item [data-chat-log-download]:disabled {
  cursor: wait;
  opacity: 0.55;
}

.chat-logs-state {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #898a92;
  text-align: center;
}

.chat-logs-state i {
  width: 26px;
  height: 26px;
}

.chat-logs-state strong {
  color: #d4d4d8;
  font-size: 13px;
}

.chat-logs-state span {
  font-size: 11px;
}

.chat-logs-state.is-loading i {
  animation: spin 900ms linear infinite;
}

@media (max-width: 640px) {
  .chat-logs-modal {
    padding: 10px;
  }

  .chat-logs-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .chat-logs-header {
    padding: 17px;
  }

  .chat-logs-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .chat-logs-summary span + span {
    padding-left: 0;
    border-left: 0;
  }
}

/* ==========================================================================
   Punish HUD & Minecraft Container/Chest GUI Modal
   ========================================================================== */

.punish-gui-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms;
}

.punish-gui-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.punish-gui-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.punish-gui-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(880px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 95, 119, 0.08), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(85, 223, 247, 0.08), transparent 30%),
    linear-gradient(175deg, rgba(22, 28, 40, 0.96) 0%, rgba(10, 14, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transform: scale(1) translateY(0);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.punish-gui-modal.hidden .punish-gui-panel {
  transform: scale(0.95) translateY(12px);
}

/* Header */
.punish-gui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}

.punish-gui-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.punish-gui-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 95, 119, 0.22), rgba(187, 118, 255, 0.18));
  border: 1px solid rgba(255, 95, 119, 0.35);
  color: #ff8597;
  box-shadow: 0 0 20px rgba(255, 95, 119, 0.25);
}

.punish-gui-icon-badge i {
  width: 22px;
  height: 22px;
}

.punish-gui-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--soft);
  margin-bottom: 2px;
}

.punish-gui-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.punish-gui-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.punish-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(61, 220, 151, 0.12);
  border: 1px solid rgba(61, 220, 151, 0.28);
  font-size: 11px;
  font-weight: 700;
  color: #3ddc97;
}

.punish-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 10px #3ddc97;
  animation: punishPulse 1.8s infinite;
}

@keyframes punishPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.punish-gui-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.punish-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 180ms ease;
}

.punish-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.punish-tab.active {
  background: linear-gradient(135deg, rgba(85, 223, 247, 0.16), rgba(122, 167, 255, 0.16));
  border-color: rgba(85, 223, 247, 0.32);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.punish-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(85, 223, 247, 0.25);
  color: #55dff7;
}

.punish-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.punish-close-btn:hover {
  background: rgba(255, 95, 119, 0.18);
  border-color: rgba(255, 95, 119, 0.4);
  color: #ff5f77;
}

/* Metric Button */
.punish-metric-button i {
  color: #ff8597;
}

.punish-metric-button:hover i {
  color: #ff5f77;
}

/* Home Options Grid (estilo container de respostas) */
.punish-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 8px 0;
}

.punish-home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 24px 20px;
  border-radius: 20px !important;
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.punish-home-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.punish-home-card .liquid-button-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
}

.punish-home-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.punish-home-icon-wrap i {
  width: 24px;
  height: 24px;
}

.punish-home-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.punish-home-tagline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.punish-home-tagline strong {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.punish-home-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--soft);
}

.punish-home-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.punish-home-badge.live {
  background: rgba(255, 200, 61, 0.16);
  border: 1px solid rgba(255, 200, 61, 0.35);
  color: #ffc83d;
}

.punish-home-badge.online {
  background: rgba(85, 223, 247, 0.16);
  border: 1px solid rgba(85, 223, 247, 0.35);
  color: #55dff7;
}

.punish-home-badge.fast {
  background: rgba(255, 95, 119, 0.16);
  border: 1px solid rgba(255, 95, 119, 0.35);
  color: #ff8597;
}

/* Detail Head */
.punish-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.punish-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.punish-detail-head small {
  margin-left: auto;
  font-size: 12px;
  color: var(--soft);
}

/* Views Body */
.punish-view {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.punish-view.hidden {
  display: none !important;
}

/* View 1: Server Chest GUI Frame */
.punish-server-gui-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.punish-chest-frame {
  width: 100%;
  max-width: 860px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #1b212c 0%, #131720 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 16px 40px rgba(0, 0, 0, 0.4);
}

.punish-chest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
  gap: 8px;
}

.punish-chest-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Minecraftia", "Minecraft", monospace;
  font-size: 14px;
  color: #f7f8fb;
}

.punish-chest-title-wrap i {
  color: #ffc83d;
}

.punish-chest-header small {
  font-size: 11px;
  color: var(--soft);
}

/* Minecraft 9xN Slot Grid */
.punish-chest-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(7, 9, 14, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.punish-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(30, 37, 50, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 2px 2px 0 rgba(0, 0, 0, 0.45),
    inset -2px -2px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.punish-slot.empty {
  cursor: default;
  background: rgba(18, 22, 30, 0.6);
}

.punish-slot:not(.empty):hover {
  background: rgba(48, 60, 82, 0.95);
  box-shadow:
    inset 0 0 0 2px #55dff7,
    0 0 16px rgba(85, 223, 247, 0.35);
  transform: translateY(-2px);
  z-index: 2;
}

.punish-slot:not(.empty):active {
  transform: scale(0.92);
}

.punish-slot-head {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.punish-item-head-img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.punish-slot:hover .punish-item-head-img {
  transform: scale(1.14);
}

.punish-item-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  user-select: none;
}

.mc-item-svg {
  display: block;
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.punish-slot:hover .mc-item-svg {
  transform: scale(1.15);
}

@keyframes mcEnchantedGlint {
  0% { filter: drop-shadow(0 0 4px #c084fc) drop-shadow(0 3px 6px rgba(0,0,0,0.45)); }
  50% { filter: drop-shadow(0 0 10px #e879f9) drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
  100% { filter: drop-shadow(0 0 4px #c084fc) drop-shadow(0 3px 6px rgba(0,0,0,0.45)); }
}

.mc-enchanted-glint {
  animation: mcEnchantedGlint 2s infinite ease-in-out;
}

.punish-slot-count {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-family: "Minecraftia", "Minecraft", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000000, -1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000;
  pointer-events: none;
}

.punish-chest-footer {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 12px;
}

.punish-bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.punish-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.punish-bot-info strong {
  color: #ffffff;
}

.punish-chest-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.punish-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
}

/* View 2: Quick Nick Dispatch Form & Sync Banner */
.punish-send-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.punish-input-wrap {
  position: relative;
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 180ms ease;
}

.punish-input-wrap:focus-within {
  border-color: #55dff7;
  background: rgba(85, 223, 247, 0.06);
  box-shadow: 0 0 0 3px rgba(85, 223, 247, 0.15);
}

.punish-input-head {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  image-rendering: pixelated;
  flex: 0 0 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.punish-nick-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.punish-nick-input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.punish-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px !important;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff5f77 0%, #bb76ff 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(255, 95, 119, 0.4) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 180ms ease;
}

.punish-submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 8px 26px rgba(255, 95, 119, 0.55) !important;
}

.punish-submit-btn:active {
  transform: translateY(0);
}

.punish-sync-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(85, 223, 247, 0.12);
  border: 1px solid rgba(85, 223, 247, 0.35);
  color: #8be9fd;
  font-size: 13px;
  font-weight: 700;
  animation: punishFadeIn 200ms ease;
}

.punish-sync-banner.hidden {
  display: none !important;
}

.punish-sync-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #55dff7;
  box-shadow: 0 0 12px #55dff7;
  animation: punishPulse 1.2s infinite;
}

/* View 2: Players Search & Heads Grid */
.punish-search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.punish-search-box {
  position: relative;
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  transition: border-color 160ms, box-shadow 160ms;
}

.punish-search-box:focus-within {
  border-color: rgba(85, 223, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(85, 223, 247, 0.15);
}

.punish-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 13px;
}

.punish-selected-player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(85, 223, 247, 0.14);
  border: 1px solid rgba(85, 223, 247, 0.3);
  font-size: 12px;
  color: var(--ink);
}

.punish-selected-player-chip img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.punish-chip-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 4px;
}

.punish-chip-remove:hover {
  color: #ff5f77;
}

.punish-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.punish-section-title i {
  color: #55dff7;
}

.punish-section-title small {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--soft);
}

.punish-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.punish-player-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 180ms ease;
  user-select: none;
}

.punish-player-card:hover {
  background: rgba(85, 223, 247, 0.09);
  border-color: rgba(85, 223, 247, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.punish-player-card.selected {
  background: rgba(85, 223, 247, 0.16);
  border-color: #55dff7;
  box-shadow: 0 0 16px rgba(85, 223, 247, 0.3);
}

.punish-player-card-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.punish-player-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.punish-player-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.punish-player-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.punish-player-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #9ad3ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* View 3: Quick Categories Grid */
.punish-target-bar {
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.punish-target-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.punish-target-info > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
}

.punish-target-player-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.punish-target-player-card img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.punish-target-player-card div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.punish-target-input {
  width: 100%;
  max-width: 380px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.punish-target-input:focus {
  border-color: #55dff7;
  box-shadow: 0 0 0 3px rgba(85, 223, 247, 0.15);
}

.punish-target-player-card small {
  font-size: 11px;
  color: var(--soft);
}

.punish-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.punish-category-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 180ms ease;
  user-select: none;
}

.punish-category-card:hover {
  background: rgba(255, 95, 119, 0.08);
  border-color: rgba(255, 95, 119, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.punish-category-card.selected {
  background: rgba(255, 95, 119, 0.16);
  border-color: #ff5f77;
  box-shadow: 0 0 16px rgba(255, 95, 119, 0.3);
}

.punish-category-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffbd6b;
}

.punish-category-card:hover .punish-category-icon {
  background: rgba(255, 95, 119, 0.2);
  color: #ff5f77;
  border-color: rgba(255, 95, 119, 0.4);
}

.punish-category-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.punish-category-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-transform: capitalize;
}

.punish-category-desc {
  font-size: 11px;
  color: var(--soft);
}

.punish-custom-command-box {
  margin-top: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.punish-custom-command-box label > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft);
  margin-bottom: 8px;
}

.punish-command-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.punish-command-input {
  flex: 1;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #55dff7;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.punish-command-input:focus {
  border-color: #55dff7;
  box-shadow: 0 0 0 3px rgba(85, 223, 247, 0.15);
}

.punish-exec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff5f77 0%, #bb76ff 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 95, 119, 0.35);
  white-space: nowrap;
}

.punish-exec-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 24px rgba(255, 95, 119, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   Floating Minecraft Tooltip
   ========================================================================== */

.minecraft-tooltip {
  position: fixed;
  z-index: 1500;
  pointer-events: none;
  max-width: 360px;
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid #28005b;
  box-shadow:
    inset 0 0 0 1px #5000ff,
    0 10px 30px rgba(0, 0, 0, 0.85);
  font-family: "Minecraftia", "Minecraft", monospace;
  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
  transition: opacity 80ms ease;
}

.minecraft-tooltip.hidden {
  opacity: 0;
  visibility: hidden;
}

.minecraft-tooltip-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.minecraft-tooltip-lore {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.minecraft-tooltip-lore span {
  display: block;
}

@media (max-width: 768px) {
  .punish-gui-panel {
    max-height: calc(100vh - 20px);
  }

  .punish-gui-header {
    padding: 14px 16px;
  }

  .punish-view {
    padding: 16px;
  }

  .punish-chest-grid {
    grid-template-columns: repeat(9, minmax(32px, 1fr));
    gap: 4px;
    padding: 8px;
  }

  .punish-slot {
    min-height: 38px;
  }

  .punish-item-head-img {
    width: 26px;
    height: 26px;
  }

  .punish-item-icon {
    width: 24px;
    height: 24px;
    font-size: 15px;
  }

  .punish-slot-count {
    font-size: 10px;
  }
}

