﻿:root {
  --bg: #0a0a0d;
  --sidebar: #0e0e12;
  --surface: #141419;
  --surface-raised: #1a1a20;
  --surface-soft: #111116;
  --border: #292930;
  --border-strong: #3b2a2e;
  --text: #f4f1f2;
  --muted: #a6a1a4;
  --accent: #c92a35;
  --accent-bright: #e13b47;
  --accent-soft: rgba(201, 42, 53, 0.13);
  --danger: #a91928;
  --success: #5fc58d;
  --warning: #e4ae52;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0;
  letter-spacing: 0;
  line-height: 1.2;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.sidebar-close {
  display: none;
}

.brand-block {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #e34b56;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-block h1 {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 4px;
  color: #d27880;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.support-text,
.muted,
.timeline-item small,
.user-card span,
.inline-note {
  color: var(--muted);
}

.support-text {
  margin: 5px 0 0;
  font-size: 12px;
}

.user-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 0 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.user-card img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.user-card div {
  min-width: 0;
}

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

.user-card span {
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  margin-top: 14px;
}

.sidebar-nav a {
  position: relative;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
  transition: color 150ms ease, background 150ms ease;
}

.sidebar-nav a::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.sidebar-nav a:hover {
  color: var(--text);
  background: #18181e;
}

.sidebar-nav a.active {
  color: white;
  background: var(--accent-soft);
}

.sidebar-nav a.active::before {
  background: var(--accent-bright);
}

.guild-list {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.guild-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  transition: 150ms ease;
}

.guild-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-chip:hover,
.guild-chip.selected {
  border-color: var(--border-strong);
  color: var(--text);
  background: #181419;
}

.guild-chip small {
  color: #d27880;
}

.guild-submenu {
  display: grid;
  gap: 2px;
  margin: 2px 0 10px 12px;
  padding-left: 10px;
  border-left: 1px solid #4d282e;
  animation: submenu-in 180ms ease both;
}

.guild-submenu a {
  padding: 7px 9px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.guild-submenu a:hover,
.guild-submenu a.active {
  color: var(--text);
  background: var(--accent-soft);
}

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

.logout-form {
  margin-top: auto;
  padding-top: 18px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.legal-links a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: 150ms ease;
}

.legal-links a:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: #181419;
}

.content-shell {
  min-width: 0;
  padding: 26px 30px 42px;
}

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

.topbar-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.menu-button {
  display: none;
}

.topbar h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.page-body {
  display: grid;
  gap: 18px;
}

.page-body > * {
  animation: section-in 280ms ease both;
}

.page-body > *:nth-child(2) {
  animation-delay: 50ms;
}

.page-body > *:nth-child(3) {
  animation-delay: 100ms;
}

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

.stats-grid,
.panel-grid,
.hero-grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-grid.two-columns,
.hero-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.panel-card,
.mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  position: relative;
  min-height: 124px;
  padding: 18px;
  overflow: hidden;
}

.stat-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  content: "";
}

.stat-card strong {
  display: block;
  margin-top: 20px;
  overflow: hidden;
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.panel-card {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.panel-head h3 {
  font-size: 18px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

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

.button-primary {
  border-color: #e24b56;
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  background: var(--accent-bright);
}

.button-danger {
  border-color: #cf3040;
  background: #77141f;
  color: #fff1f2;
}

.button-danger:hover {
  background: var(--danger);
}

.button-ghost {
  border-color: var(--border);
  background: #1b1b21;
  color: var(--text);
}

.button-ghost:hover {
  border-color: #554047;
  background: #222127;
}

.button-full {
  width: 100%;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label > span {
  color: #c7c1c4;
  font-size: 13px;
  font-weight: 650;
}

.span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #34343c;
  border-radius: 6px;
  background: #0f0f13;
  color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #494950;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.checkbox-row {
  display: flex !important;
  flex-direction: row;
  gap: 9px !important;
  align-items: center;
  min-height: 42px;
}

.checkbox-row input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.list-card {
  display: grid;
  border-top: 1px solid var(--border);
}

.list-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}

.list-row strong {
  text-align: right;
}

.table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #101015;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(201, 42, 53, 0.045);
}

.amount-in {
  color: var(--success);
}

.amount-out {
  color: #f17a84;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  padding: 2px 0 16px 18px;
  border-left: 1px solid #403136;
}

.timeline-item::before {
  position: absolute;
  top: 4px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.timeline-item p {
  margin: 4px 0 1px;
  color: var(--muted);
}

.list-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 150ms ease;
}

.list-link-card:hover {
  border-color: #5d353b;
  background: #181419;
  transform: translateY(-1px);
}

.list-link-card small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.card-list {
  display: grid;
  gap: 10px;
}

.auth-shell {
  display: grid;
  gap: 14px;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #0a0a0d;
}

.hero-card {
  position: relative;
  width: min(720px, 100%);
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #111116;
  box-shadow: var(--shadow);
}

.hero-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--accent);
  content: "";
}

.hero-card h1 {
  max-width: 620px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 6vw, 48px);
}

.hero-card > p:not(.eyebrow) {
  max-width: 560px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
}

.hero-card.narrow {
  width: min(540px, 100%);
}

.hero-grid {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.mini-card {
  padding: 14px;
  box-shadow: none;
}

.mini-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 6px;
  background: var(--surface-raised);
  transition: opacity 300ms ease, transform 300ms ease;
}

.flash p {
  margin: 2px 0 0;
  color: var(--muted);
}

.flash-success {
  border-left-color: var(--success);
}

.flash-warning {
  border-left-color: var(--warning);
}

.flash-danger {
  border-left-color: var(--accent-bright);
}

.flash-hidden {
  opacity: 0;
  transform: translateY(-4px);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-warning {
  border-color: rgba(228, 174, 82, 0.35);
  background: rgba(228, 174, 82, 0.1);
  color: #f0c879;
}

.pill-success {
  border-color: rgba(95, 197, 141, 0.35);
  background: rgba(95, 197, 141, 0.1);
  color: #82d9a8;
}

.status-good {
  color: var(--success);
}

.status-bad {
  color: #f17a84;
}

.balance-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #543139;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.balance-card span,
.balance-card strong {
  display: block;
}

.balance-card span {
  color: #d5b9bd;
  font-size: 13px;
}

.balance-card strong {
  margin-top: 5px;
  font-size: clamp(26px, 5vw, 38px);
  font-variant-numeric: tabular-nums;
}

.stack-grid {
  display: grid;
  gap: 14px;
}

.soft-panel {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.soft-panel:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.split-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.compact-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.compact-list li + li {
  margin-top: 6px;
}

.danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #4a252c;
}

.empty-state {
  padding: 28px 16px;
  border: 1px dashed #3b3437;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.server-settings-intro,
.settings-section-head,
.settings-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.server-settings-intro {
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--border);
}

.server-settings-intro h3 {
  margin-bottom: 7px;
  font-size: 21px;
}

.server-settings-intro p:last-child,
.settings-actions p {
  margin-bottom: 0;
}

.server-settings-layout {
  display: grid;
  gap: 18px;
}

.settings-section {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-section-head {
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.settings-section-head h3 {
  font-size: 18px;
}

.settings-count {
  color: var(--muted);
  font-size: 12px;
}

.message-setting {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 24px;
  align-items: center;
  padding: 18px 2px;
  border-bottom: 1px solid var(--border);
}

.message-setting:last-child,
.message-setting.single {
  border-bottom: 0;
}

.setting-toggle {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.setting-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 23px;
  margin-top: 1px;
  border: 1px solid #414149;
  border-radius: 999px;
  background: #202027;
  transition: 160ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #8e8990;
  content: "";
  transition: 160ms ease;
}

.setting-toggle input:checked + .toggle-track {
  border-color: #df4652;
  background: var(--accent);
}

.setting-toggle input:checked + .toggle-track::after {
  left: 22px;
  background: white;
}

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

.setting-toggle input:disabled + .toggle-track {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.setting-toggle small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

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

.channel-field > span {
  color: #c7c1c4;
  font-size: 13px;
  font-weight: 650;
}

.settings-actions {
  padding: 4px 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #55515a;
  box-shadow: 0 0 0 4px rgba(85, 81, 90, 0.12);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(95, 197, 141, 0.12);
}

.message-status {
  color: var(--muted);
  font-size: 13px;
}

.message-status::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #5d5961;
  content: "";
}

.message-status.ready {
  color: var(--text);
}

.message-status.ready::before {
  background: var(--success);
}

.sidebar-backdrop {
  display: none;
}

@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;
  }
}

@media (max-width: 1120px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    width: min(300px, calc(100vw - 44px));
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-raised);
    color: var(--text);
    cursor: pointer;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.68);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .menu-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .content-shell {
    padding: 18px 18px 34px;
  }

  .hero-grid,
  .split-box,
  .message-setting {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .content-shell {
    padding-inline: 12px;
  }

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

  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

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

  .panel-head .button-row,
  .panel-head form,
  .panel-head .button {
    width: 100%;
  }

  .list-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .list-row strong {
    text-align: left;
  }

  .list-link-card {
    grid-template-columns: 1fr;
  }

  .list-link-card small {
    grid-column: auto;
  }

  .hero-card {
    padding: 26px 22px;
  }

  .server-settings-intro,
  .settings-section-head,
  .settings-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .diagnostic-summary,
  .diagnostic-faction-head {
    grid-template-columns: 1fr;
  }

  .settings-actions .button,
  .settings-section-head form,
  .settings-section-head form .button {
    width: 100%;
  }
}

.quick-link {
  color: inherit;
  text-decoration: none;
}

.quick-link p {
  margin: 0.35rem 0 0;
}

.diagnostic-hero {
  gap: 1.25rem;
}

.diagnostic-summary {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.diagnostic-summary article {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.diagnostic-summary strong {
  display: block;
  font-size: 1.5rem;
}

.diagnostic-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.diagnostic-grid {
  display: grid;
  gap: 1rem;
}

.diagnostic-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.diagnostic-card strong,
.check-item strong {
  display: block;
  margin: 0 0 0.35rem;
}

.diagnostic-card p,
.check-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.diagnostic-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-success {
  border-color: rgba(103, 213, 164, 0.45);
  background: rgba(103, 213, 164, 0.14);
  color: #8ef0bf;
}

.status-warning {
  border-color: rgba(228, 174, 82, 0.45);
  background: rgba(228, 174, 82, 0.14);
  color: #ffd38a;
}

.status-error {
  border-color: rgba(232, 78, 97, 0.45);
  background: rgba(232, 78, 97, 0.14);
  color: #ff9cab;
}

.faction-check-grid {
  display: grid;
  gap: 1rem;
}

.diagnostic-faction {
  display: grid;
  gap: 1rem;
}

.diagnostic-faction.compact {
  align-content: start;
}

.diagnostic-faction-head {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto;
  align-items: start;
}

.diagnostic-faction-head p {
  margin: 0.35rem 0 0;
}

.check-list {
  display: grid;
  gap: 0.75rem;
}

.check-list.compact {
  gap: 0.6rem;
}

.check-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.setup-assistant-form {
  display: grid;
  gap: 1rem;
}

.wizard-step {
  margin: 0;
}

.legal-copy {
  color: var(--muted);
  line-height: 1.8;
}

.legal-stack {
  margin: 1.4rem 0 0;
}

.legal-panel {
  display: grid;
  gap: 0.55rem;
}

.legal-panel h3 {
  margin: 0;
}

.legal-panel p {
  margin: 0;
}

.section-headline {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.section-headline p {
  margin: 0;
}

.text-link {
  color: #d27880;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.text-link:hover {
  color: var(--text);
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.overview-hero {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(201, 42, 53, 0.2), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--surface);
}

.overview-hero-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.overview-hero-main h3 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.08;
}

.overview-hero-main > div:first-child {
  min-width: 0;
}

.overview-hero-main .muted {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.7;
}

.overview-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-mini-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

.hero-mini-card strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
  line-height: 1.2;
}

.hero-mini-card p {
  margin: 8px 0 0;
}

.stats-grid-extended {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.notice-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice-card > div:first-child {
  min-width: 0;
}

.notice-card h3 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.notice-card p:last-child {
  margin-bottom: 0;
}

.notice-warning {
  border-color: #583036;
  background:
    linear-gradient(135deg, rgba(201, 42, 53, 0.12), rgba(201, 42, 53, 0.03)),
    var(--surface);
}

.server-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.server-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.server-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
}

.server-card:hover {
  border-color: #4d3136;
  background: linear-gradient(180deg, rgba(201, 42, 53, 0.07), rgba(255, 255, 255, 0)), #19171c;
  transform: translateY(-2px);
}

.server-card.is-selected {
  border-color: #7a3038;
  background: linear-gradient(180deg, rgba(201, 42, 53, 0.09), rgba(255, 255, 255, 0)), #1a171c;
}

.server-card.is-ready::after {
  background: var(--success);
}

.server-card.is-missing::after {
  background: var(--warning);
}

.server-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.server-card-head h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.server-card-head .diagnostic-status {
  flex-shrink: 0;
}

.server-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(201, 42, 53, 0.2);
  border-radius: 999px;
  background: rgba(201, 42, 53, 0.08);
  color: #efc1c6;
  font-size: 12px;
  font-weight: 700;
}

.server-card-copy {
  min-height: 70px;
  margin: 0;
}

.server-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.server-card-stats article {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.server-card-stats strong,
.server-card-stats span {
  display: block;
}

.server-card-stats strong {
  font-size: 18px;
  line-height: 1.2;
}

.server-card-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.compact-empty-state {
  padding: 18px 20px;
  text-align: left;
}

.compact-empty-state strong {
  display: block;
  margin-bottom: 6px;
}

.hint-list {
  display: grid;
  gap: 10px;
}

.hint-item {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  line-height: 1.6;
}

.section-note {
  margin-top: 12px;
}

.quick-link {
  transition: color 150ms ease, transform 150ms ease;
}

.quick-link:hover {
  color: var(--text);
  transform: translateX(2px);
}

@media (max-width: 1120px) {
  .stats-grid-extended {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .overview-hero-main,
  .notice-card,
  .section-headline {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .overview-hero {
    padding: 20px 18px;
  }

  .stats-grid-extended,
  .server-card-stats {
    grid-template-columns: 1fr;
  }

  .server-card-head {
    flex-direction: column;
  }

  .overview-hero-main .button-row,
  .notice-card .button-row,
  .server-card .button-row {
    width: 100%;
  }

  .overview-hero-main .button,
  .notice-card .button,
  .server-card .button {
    width: 100%;
  }
}
