:root {
  color-scheme: dark;
  --bg: #080a11;
  --bg-soft: #0c0f19;
  --surface: rgba(17, 20, 33, 0.9);
  --surface-strong: #141829;
  --surface-hover: #1a1f35;
  --border: rgba(154, 163, 194, 0.14);
  --border-bright: rgba(147, 124, 255, 0.38);
  --text: #f5f7ff;
  --muted: #969eb9;
  --muted-2: #6f7791;
  --violet: #8b7cff;
  --violet-2: #6c63ff;
  --cyan: #22d3ee;
  --green: #32d583;
  --yellow: #fdb022;
  --red: #f97066;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -8%, rgba(108, 99, 255, 0.16), transparent 35%),
    radial-gradient(circle at 98% 15%, rgba(34, 211, 238, 0.08), transparent 28%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

a {
  color: inherit;
}

.line-icon {
  display: block;
  flex: 0 0 auto;
  shape-rendering: geometricPrecision;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
}

.boot-mark {
  width: 84px;
  height: 84px;
  animation: float 2.4s ease-in-out infinite;
}

.boot-mark img {
  width: 100%;
  height: 100%;
}

.boot-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.boot-copy strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.boot-copy span {
  color: var(--muted);
  font-size: 14px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(30px, 5vw, 72px);
  overflow: hidden;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(9, 11, 20, 0.4), rgba(9, 11, 20, 0.92)),
    radial-gradient(circle at 28% 34%, rgba(139, 124, 255, 0.28), transparent 33%),
    radial-gradient(circle at 62% 58%, rgba(34, 211, 238, 0.13), transparent 34%),
    #0b0e18;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(139, 124, 255, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 620px;
  height: 620px;
  right: -250px;
  top: -220px;
}

.auth-visual::after {
  width: 380px;
  height: 380px;
  left: -170px;
  bottom: -160px;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
}

.brand-lockup img {
  width: 42px;
  height: 42px;
}

.brand-lockup small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: auto 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #b8b1ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--violet);
}

.auth-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(46px, 6.5vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, #c3bbff, #8b7cff 48%, #48dff4);
  background-clip: text;
  -webkit-background-clip: text;
}

.auth-copy p {
  max-width: 610px;
  margin: 28px 0 0;
  color: #a8afc6;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.65;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.feature-pill {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #c7cbda;
  background: rgba(16, 19, 32, 0.62);
  font-size: 13px;
}

.auth-foot {
  position: relative;
  z-index: 1;
  color: var(--muted-2);
  font-size: 12px;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  background: rgba(8, 10, 17, 0.78);
  backdrop-filter: blur(22px);
}

.login-card {
  width: min(100%, 460px);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(23, 27, 45, 0.96), rgba(14, 17, 29, 0.98));
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.login-card > p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.discord-button,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  color: white;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease, border-color 150ms ease;
}

.discord-button {
  width: 100%;
  min-height: 52px;
  background: #5865f2;
}

.sidebar-invite {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  min-height: 42px;
  padding: 0 10px;
  font-size: 13px;
}

.discord-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.primary-button {
  background: linear-gradient(135deg, var(--violet-2), #8c65f6);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.22);
}

.secondary-button {
  border: 1px solid var(--border-bright);
  background: rgba(108, 99, 255, 0.12);
  color: #ddd9ff;
}

.ghost-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd0e0;
}

.danger-button {
  border: 1px solid rgba(249, 112, 102, 0.3);
  background: rgba(249, 112, 102, 0.1);
  color: #ffb4ae;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
}

.login-invite { width: 100%; margin-top: 10px; text-decoration: none; }

.login-safety {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
  font-size: 12px;
  line-height: 1.5;
}

.setup-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(253, 176, 34, 0.28);
  border-radius: 12px;
  background: rgba(253, 176, 34, 0.07);
}

.setup-box strong {
  color: #ffd178;
}

.setup-box code {
  display: block;
  margin-top: 10px;
  padding: 10px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  color: #d8dcf0;
  background: rgba(0, 0, 0, 0.28);
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 264px;
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  border-right: 1px solid var(--border);
  background: rgba(10, 12, 21, 0.92);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 124, 255, 0.35) transparent;
}

.sidebar .brand-lockup {
  padding: 3px 8px 22px;
}

.server-picker {
  margin-bottom: 20px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.server-picker label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.server-picker select {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-strong);
}

.nav-label {
  margin: 14px 10px 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 650;
}

.nav-item:hover {
  color: #e3e6f2;
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  border-color: rgba(139, 124, 255, 0.18);
  color: white;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.18), rgba(108, 99, 255, 0.04));
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #bcb5ff;
  background: rgba(139, 124, 255, 0.09);
  font-size: 13px;
}

.sidebar-spacer {
  flex: 1;
}

.user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  object-fit: cover;
  font-weight: 800;
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  font-size: 13px;
}

.user-meta span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}

.logout-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.logout-button:hover {
  color: var(--red);
  background: rgba(249, 112, 102, 0.08);
}

.main-area {
  grid-column: 2;
  min-width: 0;
  padding: 28px clamp(22px, 4vw, 58px) 72px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-title small {
  display: block;
  margin-bottom: 7px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.052em;
}

.page-title p {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #b8bfd3;
  background: rgba(15, 18, 30, 0.8);
  font-size: 12px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(111, 119, 145, 0.1);
}

.dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(50, 213, 131, 0.11), 0 0 14px rgba(50, 213, 131, 0.4);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card,
.panel {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(20, 24, 41, 0.91), rgba(13, 16, 27, 0.93));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

.metric-card {
  position: relative;
  min-height: 126px;
  padding: 18px;
  overflow: hidden;
  border-radius: 15px;
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -40px;
  bottom: -50px;
  border-radius: 50%;
  background: var(--metric-glow, rgba(139, 124, 255, 0.14));
  filter: blur(4px);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric-value {
  display: block;
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-foot {
  display: block;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}

.panel-body {
  padding: 22px;
}

.status-list,
.record-list {
  display: grid;
  gap: 10px;
}

.status-row,
.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(154, 163, 194, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.status-name,
.record-main {
  min-width: 0;
}

.status-name strong,
.record-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.status-name span,
.record-main span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(150, 158, 185, 0.08);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.success { color: #8af0bc; background: rgba(50, 213, 131, 0.1); }
.badge.warning { color: #ffd178; background: rgba(253, 176, 34, 0.1); }
.badge.danger { color: #ffaaa3; background: rgba(249, 112, 102, 0.1); }
.badge.violet { color: #c9c3ff; background: rgba(139, 124, 255, 0.11); }

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

.quick-action {
  display: grid;
  gap: 13px;
  min-height: 110px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.quick-action:hover {
  border-color: var(--border-bright);
  background: rgba(139, 124, 255, 0.06);
}

.quick-action span {
  color: var(--violet);
  font-size: 20px;
}

.quick-action strong {
  align-self: end;
  font-size: 12px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #c4c9da;
  font-size: 12px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: rgba(7, 9, 16, 0.66);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input,
.field select {
  min-height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.1);
  outline: none;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.section-note {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 11px;
  color: #a9cfd5;
  background: rgba(34, 211, 238, 0.045);
  font-size: 12px;
  line-height: 1.55;
}

.split-line {
  grid-column: 1 / -1;
  height: 1px;
  margin: 3px 0;
  background: var(--border);
}

.subheading {
  grid-column: 1 / -1;
  margin: 3px 0 -3px;
  font-size: 14px;
  letter-spacing: -0.015em;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.diagnostic-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.diagnostic-banner.success {
  border-color: rgba(50, 213, 131, 0.25);
  color: #8af0bc;
  background: rgba(50, 213, 131, 0.055);
}

.diagnostic-banner.warning {
  border-color: rgba(253, 176, 34, 0.28);
  color: #ffd178;
  background: rgba(253, 176, 34, 0.055);
}

.diagnostic-banner strong,
.diagnostic-banner span {
  display: block;
}

.diagnostic-banner strong {
  font-size: 12px;
}

.diagnostic-banner span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.toggle-row {
  align-content: center;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.toggle-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}

.field .toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(154, 163, 194, 0.25);
  border-radius: 999px;
  background: #181d2e;
  transition: background 150ms ease, border-color 150ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #8189a4;
  transition: transform 150ms ease, background 150ms ease;
}

.toggle-control input:checked + .toggle-track {
  border-color: rgba(139, 124, 255, 0.65);
  background: rgba(108, 99, 255, 0.45);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: white;
}

.toggle-control input:focus-visible + .toggle-track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.toggle-control > span:last-child {
  min-width: 0;
}

.toggle-control strong,
.toggle-control small {
  display: block;
}

.toggle-control strong {
  color: #d7dbea;
  font-size: 12px;
}

.toggle-control small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.record-main small {
  display: block;
  max-width: 620px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-record {
  align-items: flex-start;
}

.leaderboard {
  display: grid;
  gap: 9px;
}

.leader-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.leader-position {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 124, 255, 0.3);
  border-radius: 9px;
  color: #c9c3ff;
  background: rgba(139, 124, 255, 0.08);
  font-size: 11px;
  font-weight: 850;
}

.leader-row strong,
.leader-row small {
  display: block;
}

.leader-row strong {
  font-size: 12px;
}

.leader-row small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10px;
}

.prefix-input {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
}

.prefix-input > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  color: var(--violet);
  background: rgba(139, 124, 255, 0.08);
  font-weight: 850;
}

.prefix-input input {
  border-radius: 0 10px 10px 0;
}

.compact-form {
  align-items: end;
}

.modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 11, 0.78);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  background: linear-gradient(145deg, #171b2d, #0e111d);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.modal-head small {
  color: var(--violet);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.modal-head h2 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.modal-close .line-icon {
  transform: rotate(45deg);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 28px;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--violet);
  background: rgba(139, 124, 255, 0.06);
  font-size: 21px;
}

.empty-state strong {
  font-size: 14px;
}

.empty-state p {
  max-width: 420px;
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
}

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

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

.permission-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
}

.permission-item .check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #07140e;
  background: var(--green);
  font-weight: 900;
}

.permission-item.missing .check {
  color: white;
  background: var(--red);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  width: min(390px, calc(100vw - 40px));
  display: grid;
  gap: 10px;
}

.toast {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(18, 22, 36, 0.98);
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
}

.toast.success { border-color: rgba(50, 213, 131, 0.25); }
.toast.error { border-color: rgba(249, 112, 102, 0.3); }
.toast-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: rgba(50, 213, 131, 0.09);
}
.toast.error .toast-icon { color: var(--red); background: rgba(249, 112, 102, 0.09); }
.toast strong { display: block; font-size: 12px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 12, 0.68);
  backdrop-filter: blur(5px);
}

.loading-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.server-hero {
  position: relative;
  min-height: 255px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  margin-bottom: 18px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(80, 230, 255, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(rgba(107, 99, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 99, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 78% 30%, rgba(34, 211, 238, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(18, 23, 45, 0.98), rgba(8, 11, 21, 0.96));
  background-size: 48px 48px, 48px 48px, auto, auto;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 28px 80px rgba(0, 0, 0, 0.2);
}

.server-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -170px;
  top: -210px;
  border: 1px solid rgba(80, 230, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(139, 124, 255, 0.025), 0 0 0 116px rgba(34, 211, 238, 0.018);
}

.server-hero > * { position: relative; z-index: 1; }
.server-hero h2 { margin: 12px 0 14px; font-size: clamp(34px, 4.3vw, 58px); line-height: 0.98; letter-spacing: -0.06em; }
.server-hero p { max-width: 660px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.server-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(84px, 1fr)); gap: 8px; }
.server-hero-stats div { min-width: 94px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: rgba(8, 11, 21, 0.68); backdrop-filter: blur(14px); }
.server-hero-stats strong, .server-hero-stats span { display: block; }
.server-hero-stats strong { color: #dffbff; font-size: 19px; letter-spacing: -0.04em; }
.server-hero-stats span { margin-top: 4px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; }
.server-table-panel { margin-bottom: 18px; }
.server-record { display: grid; grid-template-columns: 42px minmax(180px, 1fr) auto auto minmax(260px, auto); }
.server-type-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(80, 230, 255, 0.22); border-radius: 11px; color: var(--cyan); background: rgba(34, 211, 238, 0.07); font-size: 9px; font-weight: 900; letter-spacing: 0.06em; }
.server-snapshot { min-width: 80px; text-align: right; }
.server-snapshot strong, .server-snapshot span { display: block; }
.server-snapshot strong { font-size: 15px; }
.server-snapshot strong small { color: var(--muted-2); font-size: 9px; }
.server-snapshot span { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.rcon-ready { color: #8af0bc; border-color: rgba(50, 213, 131, 0.25); background: rgba(50, 213, 131, 0.055); }
.server-create-grid { grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr); }
.security-stack { display: grid; gap: 11px; }
.security-line { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.018); }
.security-line > .line-icon { width: 38px; height: 38px; padding: 9px; border: 1px solid rgba(139, 124, 255, 0.24); border-radius: 10px; color: #b9b0ff; background: rgba(139, 124, 255, 0.07); }
.security-line strong, .security-line span { display: block; }
.security-line strong { font-size: 12px; }
.security-line span { margin-top: 4px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.rcon-modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.history-modal { width: min(860px, 100%); }
.history-chart { width: 100%; height: 230px; display: block; margin-top: 20px; overflow: visible; }
.chart-grid { fill: none; stroke: rgba(154, 163, 194, 0.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.history-metrics span { padding: 13px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted-2); background: rgba(255, 255, 255, 0.02); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; }
.history-metrics strong { display: block; margin-bottom: 5px; overflow: hidden; color: var(--text); font-size: 17px; letter-spacing: -0.03em; text-transform: none; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1900px) {
  .app-shell { grid-template-columns: 310px minmax(0, 1fr); }
  .sidebar { width: 310px; padding: 28px 22px; }
  .main-area { padding-inline: clamp(58px, 5vw, 112px); }
  .panel-header { padding: 24px 28px; }
  .panel-body { padding: 28px; }
  .metric-card { min-height: 148px; padding: 23px; }
  .metric-value { font-size: 36px; }
  .server-record { min-height: 72px; }
}

@keyframes spin { to { transform: rotate(360deg); } }

.mobile-bar {
  display: none;
}

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .server-hero { grid-template-columns: 1fr; align-items: start; }
  .server-hero-stats { max-width: 460px; }
  .server-record { grid-template-columns: 42px minmax(0, 1fr) auto auto; }
  .server-record .record-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 52vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-panel { min-height: 48vh; }
  .auth-copy h1 { font-size: clamp(43px, 11vw, 70px); }
  .app-shell { display: block; }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 70px;
    display: block;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    border-right: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .sidebar > .brand-lockup,
  .server-picker,
  .nav-label,
  .sidebar-spacer,
  .user-card { display: none; }
  .nav-list { display: flex; width: max-content; min-width: 100%; gap: 3px; }
  .nav-item { width: 76px; min-width: 76px; min-height: 52px; padding: 3px; justify-content: center; gap: 2px; flex-direction: column; font-size: 9px; }
  .nav-icon { width: 23px; height: 23px; background: transparent; }
  .owner-nav { display: none; }
  .main-area { padding: 78px 16px 96px; }
  .mobile-bar {
    position: fixed;
    z-index: 19;
    inset: 0 0 auto;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 12, 21, 0.94);
    backdrop-filter: blur(20px);
  }
  .mobile-bar .brand-lockup { font-size: 15px; }
  .mobile-bar .brand-lockup img { width: 34px; height: 34px; }
  .mobile-server-select { max-width: 48vw; min-height: 36px; border: 1px solid var(--border); border-radius: 9px; color: white; background: var(--surface-strong); }
  .topbar { margin-bottom: 22px; }
  .connection-pill { display: none; }
  .two-panels { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-visual { min-height: 55vh; padding: 26px 22px; }
  .auth-panel { padding: 20px; }
  .login-card { padding: 26px 22px; }
  .feature-pills { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 112px; padding: 15px; }
  .metric-value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
  .panel-header, .panel-body { padding: 17px; }
  .record-row { align-items: flex-start; flex-direction: column; }
  .record-actions { width: 100%; justify-content: flex-start; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .nav-item[data-view="system"] { display: none; }
  .permission-grid { grid-template-columns: 1fr; }
  .server-hero { min-height: auto; padding: 28px 20px; }
  .server-hero-stats { grid-template-columns: repeat(3, 1fr); width: 100%; }
  .server-hero-stats div { min-width: 0; padding: 11px 9px; }
  .server-record { display: flex; }
  .server-snapshot { text-align: left; }
  .history-metrics { grid-template-columns: 1fr; }
  .history-chart { height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* WolfBot 4.3 Script Studio additions */
.file-list-details { grid-column: 1 / -1; margin: 8px 0 0; color: var(--text-secondary, #a8adbf); font-size: 13px; }
.file-list-details summary { cursor: pointer; user-select: none; padding: 6px 0; }
.file-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; padding-top: 8px; }
.file-list code { overflow-wrap: anywhere; border: 1px solid var(--border, rgba(255,255,255,.1)); background: rgba(255,255,255,.035); border-radius: 7px; padding: 7px 9px; }
#moderationMemberSearchResults:empty { display: none; }
#moderationMemberSearchResults:not(:empty) { margin-top: 14px; }
