/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #090a10;
  --surface:     rgba(21, 24, 34, 0.68);
  --surface2:    rgba(30, 36, 50, 0.58);
  --surface3:    rgba(255, 255, 255, 0.055);
  --border:      rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --bg-2:        #0f1119;
  --nav-bg:      rgba(12, 14, 22, 0.72);
  --sidebar-bg:  rgba(10, 11, 18, 0.97);
  --accent:      #63a4ff;
  --accent-strong: #4b7df2;
  --accent-dim:  rgba(99, 164, 255, 0.16);
  --accent-wash: rgba(99, 164, 255, 0.11);
  --secondary-wash: rgba(55, 196, 106, 0.075);
  --accent-green: #37c46a;
  --accent-cyan: #4bb6ff;
  --text:        #f2f5fb;
  --muted:       #9aa6b8;
  --success:     #32d97b;
  --danger:      #ef4444;
  --radius:      10px;
  --glass-blur:  blur(18px) saturate(150%);
  --shadow:      0 18px 50px rgba(0, 0, 0, 0.28);
  --sidebar-width: 240px;
  --topbar-height: 56px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    linear-gradient(140deg, var(--accent-wash) 0%, transparent 34%),
    linear-gradient(210deg, var(--secondary-wash) 0%, transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 48%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  height: var(--topbar-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.has-sidebar .nav {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding-left: 1.5rem;
  padding-right: 1.75rem;
}

.nav-brand { display: flex; align-items: center; gap: 0.75rem; }

.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); opacity: 0.85; }

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
  padding-left: 1.25rem;
}
.nav-bc-sep { color: var(--muted); opacity: 0.5; font-size: 0.8rem; }
.nav-bc-link {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-bc-link:hover { color: var(--text); text-decoration: none; }
.nav-bc-cur {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.nav-right { display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; }

.nav-user {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.625rem;
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover { color: var(--text); background: var(--surface3); transform: translateY(-1px); }

.nav-link--active { color: var(--text); background: var(--surface3); }

.nav-theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-theme-btn:hover,
.nav-theme-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.theme-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 180;
}

.theme-panel-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.theme-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  padding: 1.15rem;
  background: linear-gradient(180deg, var(--surface), rgba(8, 10, 16, 0.94));
  border-left: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.34);
  transform: translateX(104%);
  transition: transform 0.24s ease;
  z-index: 190;
  overflow-y: auto;
}

.theme-panel.is-open { transform: translateX(0); }

.theme-panel-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.theme-panel-kicker {
  color: var(--accent);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.theme-panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}

.theme-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.theme-panel-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

.theme-fields {
  display: grid;
  gap: 0.75rem;
}

.theme-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.theme-field span {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.theme-field strong {
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 650;
}

.theme-field small {
  color: var(--muted);
  font-size: 0.72rem;
}

.theme-field input[type="color"] {
  width: 42px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.theme-field input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }

.theme-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.theme-presets button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  padding: 0.55rem 0.45rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.theme-presets button:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

.theme-reset-btn {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 10px 22px var(--accent-dim);
}
.btn-primary:hover { opacity: 0.94; box-shadow: 0 14px 28px var(--accent-dim); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  border: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.07); transform: translateY(-1px); }

.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; box-shadow: none; }

.btn-full { width: 100%; justify-content: center; padding: 0.6875rem 1rem; font-size: 0.875rem; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ─── Dashboard layout ───────────────────────────────────────────────────── */
.dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
}

.page-header { margin-bottom: 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-header h1 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.3px; }
.page-header p { color: var(--muted); font-size: 0.8125rem; margin-top: 0.25rem; }

/* ─── Stat cards ─────────────────────────────────────────────────────────── */
/* Ads */
.ad-slot {
  position: relative;
  min-height: 112px;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}

.ad-slot::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 32%, transparent 68%, rgba(255, 255, 255, 0.045));
}

.ad-slot::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -20%;
  width: 34%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.085), transparent);
  transform: rotate(18deg);
  animation: adGloss 8s ease-in-out infinite;
  pointer-events: none;
}

.ad-slot-label {
  position: absolute;
  top: 0.55rem;
  left: 0.65rem;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.74;
}

.ad-slot ins.adsbygoogle {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 92px;
}

.ad-slot--leaderboard { min-height: 96px; }
.ad-slot--inline { min-height: 118px; }

.ad-placeholder {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
}

.ad-placeholder-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(99, 164, 255, 0.28);
  flex-shrink: 0;
}

.ad-placeholder span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.ad-placeholder strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.ad-placeholder small {
  color: var(--muted);
  font-size: 0.72rem;
}

@keyframes adGloss {
  0%, 58% { transform: translateX(-150%) rotate(18deg); opacity: 0; }
  68% { opacity: 1; }
  86%, 100% { transform: translateX(470%) rotate(18deg); opacity: 0; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

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

@media (max-width: 640px) {
  .ad-slot {
    min-height: 104px;
    padding: 1.6rem 1rem 1rem;
  }

  .ad-placeholder {
    width: 100%;
    justify-content: center;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-value--online { color: var(--success); }

.stat-sub {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.375rem;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
  margin-bottom: 1.25rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.36), transparent);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.125rem;
}

.card-header h2 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) { .grid-two { grid-template-columns: 1fr; } }

/* ─── Chart ──────────────────────────────────────────────────────────────── */
.chart-card-hd {
  flex-wrap: wrap;
  gap: 0.625rem;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chart-ctrl-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.chart-ctrl-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: inherit;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.5;
}

.chart-ctrl-btn:last-child { border-right: none; }

.chart-ctrl-btn.is-active {
  background: rgba(99, 164, 255, 0.14);
  color: var(--accent);
}

.chart-ctrl-btn:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.chart-ctrl-sep {
  width: 1px;
  height: 1.25rem;
  background: var(--border);
  flex-shrink: 0;
}

.chart-hours-input {
  width: 52px;
  padding: 0.25rem 0.45rem;
  font-size: 0.75rem;
  font-family: inherit;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-align: center;
  appearance: textfield;
}

.chart-hours-input::-webkit-outer-spin-button,
.chart-hours-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.chart-hours-input::placeholder { color: var(--muted); }

.chart-hours-input:focus {
  outline: none;
  border-color: rgba(99, 164, 255, 0.45);
}

.chart-warning {
  margin: 0 1.375rem 0.875rem;
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(239, 68, 68, 0.07));
  color: #fecaca;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chart-warning--below {
  margin-top: 0.875rem;
  margin-bottom: 1.125rem;
}

.chart-warning summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.875rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.chart-warning summary::-webkit-details-marker { display: none; }

.chart-warning-icon {
  display: inline-flex;
  color: #fb7185;
  flex-shrink: 0;
}

.chart-warning-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.chart-warning p {
  padding: 0 0.875rem 0.8rem 2.55rem;
  color: rgba(254, 202, 202, 0.86);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ─── Pin list ───────────────────────────────────────────────────────────── */
.chart-pin-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.375rem 0.625rem;
  flex-wrap: wrap;
}

.chart-pin-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

.chart-pin-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.3rem 0.18rem 0.22rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  font-size: 0.75rem;
}

.chart-pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chart-pin-badge--server  { background: rgba(79,142,247,0.2);  color: #4f8ef7; }
.chart-pin-badge--network { background: rgba(74,222,128,0.2);  color: #4ade80; }
.chart-pin-badge--folder  { background: rgba(245,158,11,0.2);  color: #f59e0b; }

.chart-pin-name {
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-pin-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.1rem;
  flex-shrink: 0;
}

.chart-pin-remove:hover { color: var(--danger); }

.chart-pin-clear {
  padding: 0.22rem 0.55rem;
  font-size: 0.7rem;
  font-family: inherit;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.chart-pin-clear:hover { color: var(--danger); border-color: rgba(239,68,68,0.35); }

/* ─── Chart drop zone ────────────────────────────────────────────────────── */
.chart-wrap {
  height: 240px;
  position: relative;
}

.chart-drag-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  background: rgba(99,164,255,0.05);
  border: 2px dashed rgba(99,164,255,0.4);
  border-radius: 6px;
}

.chart-drag-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.chart-drag-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  max-width: 340px;
  overflow: hidden;
}

.chart-drag-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem 0.15rem 0.25rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
}

.chart-drag-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.05rem 0.22rem;
  border-radius: 2px;
  line-height: 1.5;
  flex-shrink: 0;
}

.chart-drag-badge--server  { background: rgba(99,164,255,0.25); color: #4f8ef7; }
.chart-drag-badge--network { background: rgba(74,222,128,0.2);  color: #4ade80; }
.chart-drag-badge--folder  { background: rgba(245,158,11,0.2);  color: #f59e0b; }

.chart-drag-more {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
  align-self: center;
}

.chart-drag-hint {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: left;
  line-height: 1.7;
}

.chart-srv-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 1.375rem 0.875rem;
  min-height: 0;
}

.chart-srv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.chart-srv-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}

/* ─── Activity table ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.activity-table {
  width: 100%;
  border-collapse: collapse;
}

.activity-table th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 0 0.75rem 0.625rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.activity-table td {
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.activity-table tbody tr:last-child td { border-bottom: none; }
.activity-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.player-name { font-weight: 500; }
.time-cell { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-join  { background: rgba(34, 197, 94, 0.12); color: var(--success); }
.badge-join .badge-dot { background: var(--success); }
.badge-leave { background: rgba(239, 68, 68, 0.1);  color: var(--danger); }
.badge-leave .badge-dot { background: var(--danger); }

/* ─── Server Manager ─────────────────────────────────────────────────────── */
.sm-card { padding: 0; overflow: hidden; }

.sm-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.sm-hd-left { display: flex; align-items: center; gap: 0.625rem; }
.sm-hd-left h2 { font-size: 0.875rem; font-weight: 600; }
.sm-hd-right { display: flex; gap: 0.5rem; }

.sm-count-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* Inline forms */
.sm-form-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.sm-form-input { flex: 1; max-width: 320px; }

/* Body */
.sm-body { padding: 1.25rem 1.375rem; min-height: 180px; }

/* Empty state */
.sm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 0.875rem;
  text-align: center;
}

.sm-empty-icon { color: rgba(255,255,255,0.12); }

.sm-empty-label {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Ungrouped zone */
.sm-ungrouped {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Zone hint */
.sm-zone-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  padding: 0.75rem 0;
  text-align: center;
  pointer-events: none;
}

/* Drop zone highlight */
.sm-drop-zone { transition: background 0.12s, box-shadow 0.12s; border-radius: 8px; }
.sm-drop-zone.sm-drop-over {
  background: rgba(79, 142, 247, 0.07);
  box-shadow: inset 0 0 0 2px rgba(79, 142, 247, 0.35);
}

/* Server item */
.sm-server-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s, opacity 0.15s;
}

.sm-server-item:hover { border-color: rgba(255,255,255,0.13); }
.sm-server-item:active { cursor: grabbing; }
.sm-server-item.dragging { opacity: 0.35; }

.sm-server-item.sm-excluded { opacity: 0.45; }
.sm-server-item.sm-excluded .sm-server-name { text-decoration: line-through; color: var(--muted); }

.sm-drag-handle {
  color: rgba(255,255,255,0.2);
  cursor: grab;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.sm-drag-handle:hover { color: var(--muted); }

.sm-server-icon { color: var(--muted); flex-shrink: 0; display: flex; }

.sm-server-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sm-server-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-api-key {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.675rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.sm-api-key:hover { color: var(--text); }

/* Server action buttons */
.sm-server-btns { display: flex; gap: 0.375rem; flex-shrink: 0; }

.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

/* Red exclude button (—) */
.sm-exclude-btn {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.sm-exclude-btn:hover { background: rgba(239, 68, 68, 0.18); }
.sm-exclude-btn.is-excluded {
  color: var(--muted);
  background: transparent;
  border-color: var(--border);
}
.sm-exclude-btn.is-excluded:hover { background: rgba(255,255,255,0.05); }

/* Red delete button (×) */
.sm-delete-btn {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.sm-delete-btn:hover { background: rgba(239, 68, 68, 0.22); }

/* Blue group collapse button (—) */
.sm-collapse-btn {
  color: var(--accent);
  border: 1px solid rgba(79, 142, 247, 0.25);
  background: rgba(79, 142, 247, 0.08);
  transition: background 0.15s, transform 0.2s;
}
.sm-collapse-btn:hover { background: rgba(79, 142, 247, 0.18); }
.sm-collapse-btn.is-collapsed { transform: rotate(-90deg); }

/* Red group delete (×) */
.sm-btn-danger {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.sm-btn-danger:hover { background: rgba(239, 68, 68, 0.22); }

/* Group */
.sm-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.sm-group-hd {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  background: rgba(79, 142, 247, 0.05);
  border-bottom: 1px solid var(--border);
}

.sm-group-folder-icon { color: var(--accent); display: flex; flex-shrink: 0; }

.sm-group-name {
  font-size: 0.875rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-group-cnt {
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
}

.sm-group-bd {
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 52px;
  transition: padding 0.2s;
}

.sm-group-bd.collapsed {
  display: none;
}

/* Confirmation modal */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.confirm-modal {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}

.confirm-modal h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.confirm-modal p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.confirm-actions { display: flex; gap: 0.625rem; justify-content: flex-end; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-danger:hover { opacity: 0.85; }

/* ─── Input ──────────────────────────────────────────────────────────────── */
.input {
  display: block;
  width: 100%;
  background: rgba(8, 10, 16, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  backdrop-filter: var(--glass-blur);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.input:focus {
  border-color: rgba(99, 164, 255, 0.72);
  background: rgba(10, 13, 22, 0.76);
  box-shadow: 0 0 0 3px rgba(99, 164, 255, 0.12);
}
.input::placeholder { color: var(--muted); }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ─── Auth split-panel pages ─────────────────────────────────────────────── */
@keyframes livePulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.6); opacity: 0; }
}

.auth-root {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.auth-bg-base {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 10, 16, 0.92) 0%, rgba(9, 10, 16, 0.72) 42%, rgba(9, 10, 16, 0.32) 100%),
    url('/images/auth-background.png') center / cover no-repeat,
    var(--bg);
  z-index: 0;
}

.auth-bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 25% 55%, rgba(79, 142, 247, 0.11) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 75% 30%, rgba(79, 142, 247, 0.06) 0%, transparent 60%);
  z-index: 0;
}

.auth-bg-noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
}

.auth-page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

/* ── Left panel ── */
.auth-panel-left {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 2.5rem;
  background: rgba(19, 19, 31, 0.82);
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  backdrop-filter: var(--glass-blur);
  box-shadow: 18px 0 52px rgba(0, 0, 0, 0.28);
}

.auth-panel-inner {
  width: 100%;
  max-width: 360px;
}

.auth-logo-mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  margin-bottom: 2rem;
}

.auth-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

.auth-heading-group { margin-bottom: 1.875rem; }

.auth-heading-main {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 0.3rem;
}

.auth-heading-sub {
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-form-stack { display: flex; flex-direction: column; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.auth-field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.auth-field input:focus {
  border-color: rgba(79, 142, 247, 0.5);
  background: rgba(79, 142, 247, 0.04);
}
.auth-field input::placeholder { color: var(--muted); }
.auth-field input:disabled { opacity: 0.4; cursor: not-allowed; }

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6875rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 1.25rem;
}
.auth-submit-btn:hover { opacity: 0.88; }
.auth-submit-btn:active { transform: scale(0.99); }
.auth-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.auth-btn-arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s;
}
.auth-submit-btn:hover .auth-btn-arrow { transform: translateX(3px); }

.auth-back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: center;
  padding: 0.5rem 0 0;
  width: 100%;
  transition: color 0.15s;
}
.auth-back-btn:hover { color: var(--text); }

.auth-switch-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
}
.auth-switch-link { color: var(--accent); text-decoration: none; }
.auth-switch-link:hover { text-decoration: underline; }

.auth-step-error {
  font-size: 0.8125rem;
  color: #f87171;
  margin: 0.5rem 0 0;
}

/* ── Password requirements ── */
.pw-req-list {
  list-style: none;
  padding: 0;
  margin: 0.625rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pw-req-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.2s;
}

.pw-req-list li.met { color: #4ade80; }

.pw-req-icon {
  font-size: 0.65rem;
  font-weight: 700;
  width: 14px;
  text-align: center;
}

.pw-match-hint {
  font-size: 0.7rem;
  color: #f87171;
  margin-top: 4px;
  display: block;
}

/* ── Right panel ── */
.auth-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
}

/* ── Preview card ── */
.preview-card {
  width: 100%;
  max-width: 400px;
  background: rgba(19, 19, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(79, 142, 247, 0.06),
    0 32px 64px rgba(0, 0, 0, 0.4);
}

.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.preview-brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.preview-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}

.preview-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.preview-stat-icon {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.preview-stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
}

.preview-stat-label {
  font-size: 0.6875rem;
  color: var(--muted);
}

.preview-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.preview-section { }

.preview-section-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.preview-bar-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.preview-bar-label {
  font-size: 0.75rem;
  color: var(--text);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.preview-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(79, 142, 247, 0.6));
  border-radius: 999px;
}

.preview-bar-pct {
  font-size: 0.7rem;
  color: var(--muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.preview-recent { }

.preview-recent-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.preview-recent-item:last-child { border-bottom: none; }

.preview-player {
  font-size: 0.8125rem;
  font-weight: 500;
  flex: 1;
}

.preview-time {
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Responsive: hide right panel on small screens ── */
@media (max-width: 768px) {
  .auth-page-wrapper {
    align-items: stretch;
    padding: 1rem;
  }

  .auth-panel-left {
    width: 100%;
    min-height: calc(100vh - 2rem);
    border-radius: 8px;
    border: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .auth-panel-right { display: none; }
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.auth-dashboard-preview {
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-topbar {
  height: 44px;
  padding: 0 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.preview-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.preview-page-header h2 {
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.preview-page-header p {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.preview-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.preview-stat-card,
.auth-dashboard-preview .preview-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.preview-stat-card {
  min-width: 0;
  padding: 0.95rem 1rem;
  overflow: hidden;
}

.preview-stat-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-stat-value {
  margin-top: 0.28rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
}

.preview-stat-value--online { color: var(--success); }

.preview-stat-sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.69rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-dashboard-preview .preview-card {
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.preview-card-header,
.preview-server-head {
  min-height: 48px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-card-header h3,
.preview-server-head h3 {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
}

.preview-chart-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.preview-chart-controls span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.45rem;
}

.preview-chart {
  height: 176px;
  padding: 0.8rem 1rem 0.35rem;
}

.preview-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.preview-chart-grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.preview-chart-area { fill: url(#previewAreaA); }

.preview-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-chart-line--main {
  stroke: url(#previewLineA);
  stroke-width: 4;
  filter: drop-shadow(0 0 10px var(--accent-dim));
}

.preview-chart-line--muted {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2.4;
}

.preview-warning {
  margin: 0 1rem 1rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

.preview-warning summary {
  list-style: none;
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.preview-warning summary::-webkit-details-marker { display: none; }

.preview-server-card { padding-bottom: 0.75rem !important; }

.preview-server-head span {
  display: inline-flex;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.preview-server-head button {
  border: none;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.42rem 0.7rem;
}

.preview-folder,
.preview-network {
  margin: 0.75rem 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  overflow: hidden;
}

.preview-folder-head,
.preview-network-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 0.75rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.preview-folder-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-dim);
  flex-shrink: 0;
}

.preview-folder-head em,
.preview-network-head em {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
}

.preview-network-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.preview-network-head span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-dim);
}

.preview-server-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.58rem;
  padding: 0.52rem 0.75rem 0.52rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.preview-server-row:last-child { border-bottom: none; }

.preview-server-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(154, 166, 184, 0.55);
}

.preview-server-dot.is-online {
  background: var(--success);
  box-shadow: 0 0 12px rgba(50, 217, 123, 0.38);
}

.preview-server-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
}

.preview-server-row span:last-child {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

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

.alert {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  margin-bottom: 1.125rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* ─── Servers page ───────────────────────────────────────────────────────── */
.sv-section { margin-bottom: 2rem; }

.sv-section-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.sv-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sv-section-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.sv-section-cnt {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.sv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sv-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.sv-card--excluded { opacity: 0.55; }

.sv-card-hd {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1rem 0.875rem;
}

.sv-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.sv-status--online {
  background: #4ade80;
  opacity: 1;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.55);
}

.sv-status--pending {
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 10px rgba(99, 164, 255, 0.65);
}

.sv-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-excluded-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.sv-stats {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1rem;
}

.sv-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.sv-stat-divider {
  width: 1px;
  background: var(--border);
  margin: 0 0.25rem;
  align-self: stretch;
}

.sv-stat-val {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.sv-stat-val--online { color: #4ade80; }

.sv-stat-label {
  font-size: 0.6875rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.sv-card-ft {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  background: var(--surface2);
}

.sv-api-key {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s;
}

.sv-api-key:hover { color: var(--text); }

.sv-empty {
  text-align: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.sv-empty svg { opacity: 0.35; }
.sv-empty a { color: var(--accent); text-decoration: none; }
.sv-empty a:hover { text-decoration: underline; }

.sv-group-empty {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.25rem 0;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s;
}

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

.breadcrumb-sep { color: var(--muted); opacity: 0.5; }

.breadcrumb-cur { color: var(--text); font-weight: 500; }

/* ─── Dashboard: network sections & server rows ──────────────────────────── */
.sm-network-section { margin-bottom: 0.875rem; }

.sm-network-hd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(99, 164, 255, 0.1), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border);
  border-left: 2px solid rgba(99, 164, 255, 0.45);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.sm-network-hd:hover {
  background: linear-gradient(135deg, rgba(99, 164, 255, 0.16), rgba(255, 255, 255, 0.065));
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: rgba(99, 164, 255, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}


.sm-network-folder-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.8;
}

.sm-network-info { flex: 1; min-width: 0; }

.sm-network-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-network-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.18rem;
}

.sm-network-servers {
  padding: 0.5rem 0 0 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
}

.sm-network-servers .sm-server-row {
  position: relative;
}

/* Vertical bar — extends into the flex gap on both sides so consecutive rows join up */
.sm-network-servers .sm-server-row::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: -0.1875rem;
  bottom: -0.1875rem;
  width: 0;
  border-left: 1.5px solid var(--border);
  pointer-events: none;
}

/* Last row: bar ends at the row centre so nothing trails below */
.sm-network-servers .sm-server-row:last-child::before {
  bottom: 50%;
}

/* Horizontal arm pointing right to the row */
.sm-network-servers .sm-server-row::after {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 0.875rem;
  height: 0;
  border-top: 1.5px solid var(--border);
  pointer-events: none;
}

.sm-network-empty {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.5rem 0.875rem;
}

.sm-server-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.65rem 0.875rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  backdrop-filter: var(--glass-blur);
  transition: border-color 0.18s ease, border-left-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.sm-server-row:hover {
  border-color: rgba(255,255,255,0.14);
  border-left-color: rgba(99, 164, 255, 0.45);
  background: rgba(255,255,255,0.055);
}

.sm-server-row:focus-visible {
  outline: 2px solid rgba(99, 164, 255, 0.65);
  outline-offset: 2px;
}

.sm-server-row.is-dragging {
  opacity: 0.45;
  transform: scale(0.995);
}

.sm-row-icon { color: var(--muted); display: flex; flex-shrink: 0; }

.sm-row-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-row-online {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}

.sm-row-online.is-online { color: #4ade80; font-weight: 500; }
.sm-row-offline { color: #f87171 !important; font-weight: 600; font-size: 0.7rem; letter-spacing: 0.04em; }
.sm-row-pending {
  color: var(--accent) !important;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sm-row-pending::before {
  content: "";
  width: 28px;
  height: 10px;
  flex-shrink: 0;
  background: currentColor;
  clip-path: polygon(0 52%, 27% 52%, 34% 24%, 43% 82%, 54% 12%, 66% 52%, 100% 52%, 100% 68%, 64% 68%, 55% 32%, 43% 100%, 33% 44%, 28% 68%, 0 68%);
  opacity: 0.85;
  animation: pendingHeartbeatLine 1.9s ease-in-out infinite;
}

.sm-row-chevron {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.18s ease;
}

/* ─── Collapse states ─────────────────────────────────────────────────────── */
.sm-network-section.is-collapsed .sm-network-servers { display: none; }

.sm-network-section.is-collapsed .sm-network-hd .sm-row-chevron,
.sm-folder-section.is-collapsed   .sm-folder-hd   .sm-row-chevron {
  transform: rotate(-90deg);
}

.sm-folder-section.is-collapsed .sm-folder-body { display: none; }

.sm-row-delete {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.07);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sm-server-row:hover .sm-row-delete {
  opacity: 0.7;
}

.sm-row-delete:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.38);
  transform: translateY(-1px);
}

.sm-net-delete-btn,
.sm-folder-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.07);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.sm-net-delete-btn:hover,
.sm-folder-delete-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.38);
  transform: translateY(-1px);
}
.sm-network-hd:hover .sm-net-delete-btn,
.sm-folder-hd:hover .sm-folder-delete-btn {
  opacity: 0.7;
}

/* LEGACY badge */
.sm-legacy-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.1em 0.45em;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 3px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f87171;
  vertical-align: middle;
  line-height: 1.5;
}

/* Folder sections */
.sm-folder-section {
  margin-bottom: 0.5rem;
}

.sm-folder-hd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.875rem;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(99, 164, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--border);
  border-left: 2px solid rgba(99, 164, 255, 0.55);
  border-radius: 3px;
  margin-bottom: 0.375rem;
}

.sm-folder-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.sm-folder-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

.sm-folder-hd.sm-drop-over {
  border-color: rgba(99, 164, 255, 0.55);
  background: linear-gradient(135deg, rgba(99, 164, 255, 0.18), rgba(255, 255, 255, 0.06));
}

.sm-folder-body {
  padding-left: 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
}

.sm-folder-body > .sm-network-section {
  position: relative;
}

/* Curved └ connector — targets header centre (28 px) regardless of server list height */
.sm-folder-body > .sm-network-section::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: -0.625rem;
  height: calc(1.75rem + 0.625rem);
  width: 0.875rem;
  border-left: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  border-bottom-left-radius: 6px;
  pointer-events: none;
}

/* Vertical continuation from header centre down to next section */
.sm-folder-body > .sm-network-section:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 1.75rem;
  bottom: -0.625rem;
  width: 0;
  border-left: 1.5px solid var(--border);
  pointer-events: none;
}

.sm-ungrouped-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0 0.375rem;
}

/* Network folder-assign button */
.sm-net-folder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sm-net-folder-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border);
  color: var(--text);
}

/* Folder picker dropdown */
.sm-folder-picker {
  position: absolute;
  z-index: 400;
  width: 180px;
  background: #1a1d2e;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sm-folder-picker-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.sm-folder-picker-item:hover { background: rgba(255,255,255,0.07); }
.sm-folder-picker-item.is-current {
  color: var(--accent);
  background: rgba(99,164,255,0.08);
}
.sm-folder-picker-empty {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Server page — fixed full-height sidebar ────────────────────────────── */
.sp-sidebar-fixed {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  backdrop-filter: var(--glass-blur);
  z-index: 110;
  overflow-y: auto;
  padding: 0 0.625rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sp-sidebar-logo {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  margin: 0 -0.625rem 1rem;
}
.sp-sidebar-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  text-decoration: none;
}
.sp-sidebar-logo-text:hover { opacity: 0.8; text-decoration: none; }

.has-sidebar .nav-brand { display: none; }

.sp-has-sidebar {
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  margin-left: var(--sidebar-width);
  margin-right: 0;
}

.sp-nav-section {
  padding: 0.875rem 0.875rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.sp-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.575rem 0.875rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.sp-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.sp-nav-item.is-active {
  background: rgba(99,164,255,0.13);
  color: var(--accent);
}
.sp-nav-sub {
  padding-left: 1.375rem;
  font-size: 0.875rem;
}

.sp-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sp-panel > * { margin-bottom: 0; }

/* Players table */
.sp-table-wrap { overflow-x: auto; }

.sp-players-table {
  width: 100%;
  border-collapse: collapse;
}
.sp-players-table th {
  padding: 0.6rem 1.25rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sp-players-table td {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--muted);
}
.sp-players-table tbody tr:last-child td { border-bottom: none; }
.sp-players-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

.sp-player-name { font-weight: 500; color: var(--text); margin-bottom: 0.1rem; }
.sp-player-uuid { font-size: 0.68rem; color: var(--muted); font-family: 'Courier New', monospace; opacity: 0.6; }
.sp-player-joins { color: var(--text); font-weight: 500; }

/* ── Player profile cards ──────────────────────────────────────────────────── */

.pp-toolbar-btns {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.pp-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.pp-tool-btn:hover {
  border-color: rgba(99,164,255,0.4);
  background: var(--surface3);
}

.pp-tool-btn.is-active {
  border-color: rgba(99,164,255,0.6);
  color: #4f8ef7;
}

.pp-dropdown {
  position: relative;
}

.pp-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem;
  min-width: 190px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  backdrop-filter: var(--glass-blur);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.pp-dropdown-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0s;
}

.pp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pp-filter-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pp-chips {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.pp-chip {
  padding: 0.2rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pp-chip:hover {
  color: var(--text);
  border-color: rgba(99,164,255,0.4);
}

.pp-chip.is-active {
  background: rgba(79,142,247,0.15);
  border-color: rgba(79,142,247,0.5);
  color: #4f8ef7;
}

.pp-sort-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pp-sort-opt:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.pp-sort-opt.is-active {
  color: #4f8ef7;
  font-weight: 500;
}

.pp-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.pp-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.pp-search {
  width: 100%;
  padding: 0.55rem 0.875rem 0.55rem 2.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.pp-search::placeholder { color: var(--muted); }
.pp-search:focus { border-color: rgba(99,164,255,0.5); }

.pp-no-results {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.5rem 0;
}

.pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.75rem;
}

.pp-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.35;
  pointer-events: none;
}

.pp-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.pp-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pp-avatar {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  flex-shrink: 0;
  image-rendering: pixelated;
  background: rgba(255,255,255,0.04);
}

.pp-identity {
  flex: 1;
  min-width: 0;
}

.pp-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.3rem;
  min-width: 0;
}

.pp-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pp-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.pp-badge--java {
  background: rgba(79,142,247,0.14);
  color: #4f8ef7;
  border: 1px solid rgba(79,142,247,0.28);
}

.pp-badge--bedrock {
  background: rgba(74,222,128,0.1);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.24);
}

.pp-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.pp-ip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pp-meta-dot { opacity: 0.35; flex-shrink: 0; }

.pp-card-stats {
  display: flex;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.pp-kv {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.625rem;
  border-right: 1px solid var(--border);
}

.pp-kv:first-child { padding-left: 0; }
.pp-kv:last-child  { padding-right: 0; border-right: none; }

.pp-kv-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  opacity: 0.75;
}

.pp-kv-val {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
}

.pp-dir-btn .sort-arrow-up   { opacity: 0.3; transition: opacity 0.15s ease; }
.pp-dir-btn .sort-arrow-down { opacity: 1;   transition: opacity 0.15s ease; }
.pp-dir-btn.is-asc .sort-arrow-up   { opacity: 1; }
.pp-dir-btn.is-asc .sort-arrow-down { opacity: 0.3; }

.pp-card { cursor: pointer; }

/* ── Player profile page ─────────────────────────────────────────────────── */

.plr-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.375rem;
}

.plr-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.plr-hero-body { flex: 1; min-width: 0; }

.plr-hero-top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.plr-hero-name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.plr-version-tag {
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.plr-hero-uuid {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}

/* Quick stats bar */
.plr-qs-bar {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}

.plr-qs {
  flex: 1;
  padding: 0.875rem 1.25rem;
}

.plr-qs-div {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.plr-qs-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.plr-qs-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Two-column layout */
.plr-2col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

@media (max-width: 820px) { .plr-2col { grid-template-columns: 1fr; } }

.plr-right-col { display: flex; flex-direction: column; gap: 1.25rem; }

/* Origin rows */
.plr-origin-rows { display: flex; flex-direction: column; }

.plr-origin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.plr-origin-label { font-size: 0.8125rem; color: var(--muted); }
.plr-origin-value { font-size: 0.8125rem; font-weight: 500; color: var(--text); }

/* Mini stat grid — 3 columns */
.plr-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-self: start;
}

.plr-mini-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.plr-mini-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.4;
}

.plr-mini-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.plr-mini-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}


/* Modal */
.plr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.plr-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.plr-modal-panel {
  background: var(--bg-2, #0f1119);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 1.75rem;
  transform: scale(0.96) translateY(14px);
  transition: transform 0.22s ease;
  box-shadow: 0 28px 80px rgba(0,0,0,0.65);
}

.plr-modal-overlay.is-open .plr-modal-panel {
  transform: scale(1) translateY(0);
}

.plr-modal-close {
  position: sticky;
  top: 0;
  float: right;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  z-index: 10;
  margin-bottom: 0.5rem;
  transition: all 0.15s ease;
}

.plr-modal-close:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.plr-modal-loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Inside modal, strip extra bottom margin from last card */
#playerModalBody .card:last-child { margin-bottom: 0; }

/* Sessions list */
.plr-session {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.plr-session:last-child { border-bottom: none; padding-bottom: 0; }

.plr-session-date {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.plr-session-tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.plr-stag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.plr-stag--server { color: var(--text); font-weight: 500; }
.plr-stag--dur    { color: var(--accent); font-weight: 600; border-color: rgba(79,142,247,0.25); background: rgba(79,142,247,0.08); }

/* Placeholder panels */
.sp-placeholder { display: flex; flex-direction: column; align-items: center; padding: 3.5rem 2rem; text-align: center; }
.sp-placeholder-icon { color: var(--muted); opacity: 0.25; margin-bottom: 1rem; }
.sp-placeholder-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); margin-bottom: 0.375rem; }
.sp-placeholder-sub { font-size: 0.875rem; color: var(--muted); }

@media (max-width: 900px) {
  .sp-sidebar-fixed { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; top: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 0.4rem; gap: 0.2rem; z-index: 40; }
  .sp-sidebar-logo { display: none; }
  .sp-nav-section { display: none; }
  .sp-nav-item { width: auto; flex: none; font-size: 0.8rem; padding: 0.375rem 0.625rem; }
  .sp-nav-sub { padding-left: 0.625rem; }
  .sp-has-sidebar { width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; }
  .has-sidebar .nav { margin-left: 0; width: 100%; padding-left: 1.75rem; }
  .has-sidebar .nav-brand { display: flex; }
}

/* ─── Server page ────────────────────────────────────────────────────────── */
.sp-title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) { .sp-row { grid-template-columns: 1fr; } }

.sp-card { margin-bottom: 0; padding: 0; }
.sp-card .card-header { padding: 1rem 1.25rem; margin-bottom: 0; border-bottom: 1px solid var(--border); }

.sp-key-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sp-key {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text);
  word-break: break-all;
}

.sp-key-hint {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.75rem 1.25rem;
}

.sp-key-hint code {
  background: var(--surface2);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.sp-plugin-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.625rem;
}

.sp-network-body {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sp-network-select { flex: 1; }

.sp-events {
  display: flex;
  flex-direction: column;
}

.sp-event {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.sp-event:last-child { border-bottom: none; }

.sp-event-type {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.sp-event-type--join {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.sp-event-type--leave {
  color: var(--muted);
  background: var(--surface2);
}

.sp-event-name { flex: 1; font-weight: 500; }

.sp-event-time { color: var(--muted); font-size: 0.75rem; flex-shrink: 0; }

.sp-no-events {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.5rem 1.25rem;
}

/* ─── Service Limited bar ────────────────────────────────────────────────── */
.sv-limited-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 6px;
  color: #f87171;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.sv-limited-bar--card {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  margin-top: 0;
}

/* ─── Danger zone (shared by server and network pages) ───────────────────── */
.sp-danger-card { border-color: rgba(239, 68, 68, 0.15); padding: 0; }
.sp-danger-card .card-header { padding: 1rem 1.25rem; margin-bottom: 0; border-bottom: 1px solid var(--border); }

.sp-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.sp-danger-divider { height: 1px; background: var(--border); margin: 0 1.25rem; }

.sp-danger-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.sp-danger-label--red { color: #f87171; }

.sp-danger-desc { font-size: 0.8125rem; color: var(--muted); }

.sp-stat-offline {
  font-size: 1rem;
  font-weight: 700;
  color: #f87171;
  letter-spacing: 0.04em;
}

.sp-stat-limited {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sp-offline-text { color: #f87171; font-size: 0.8125rem; margin-top: 0.25rem; }

.sp-wait-card {
  padding: 1.75rem;
}

.sp-wait-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.sp-wait-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
}

.sp-wait-sub {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.heartbeat-line {
  position: relative;
  width: min(330px, 100%);
  height: 44px;
  margin: -0.2rem auto 0;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(79, 142, 247, 0.02), rgba(79, 142, 247, 0.08), rgba(79, 142, 247, 0.02));
}

.heartbeat-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(79, 142, 247, 0.2), transparent);
  transform: translateX(-105%);
  animation: heartbeatSweep 2.4s linear infinite;
}

.heartbeat-line svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.heartbeat-line-track,
.heartbeat-line-pulse {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.heartbeat-line-track {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.heartbeat-line-pulse {
  stroke: var(--accent);
  stroke-width: 2.8;
  stroke-dasharray: 74 300;
  stroke-dashoffset: 320;
  animation: heartbeatTrace 2.4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(79, 142, 247, 0.6));
}

.heartbeat-line.is-success::after {
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.24), transparent);
}

.heartbeat-line.is-success .heartbeat-line-pulse {
  stroke: #4ade80;
  stroke-dasharray: 360;
  stroke-dashoffset: 0;
  animation: heartbeatTraceSuccess 0.75s ease-out both;
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.55));
}

.heartbeat-status {
  margin-top: -0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.sp-wait-card.is-heartbeat-found .ob-hb-core {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
}

.sp-wait-card.is-heartbeat-found .ob-hb-core svg {
  stroke: #4ade80;
}

.sp-wait-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.sp-wait-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.sp-wait-key-body {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.58);
}

.sp-wait-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

@media (max-width: 720px) {
  .sp-wait-grid { grid-template-columns: 1fr; }
  .sp-wait-card { padding: 1.25rem; }
}

@keyframes heartbeatTrace {
  0%   { stroke-dashoffset: 340; opacity: 0.28; }
  12%  { opacity: 1; }
  52%  { opacity: 1; }
  100% { stroke-dashoffset: -220; opacity: 0.32; }
}

@keyframes heartbeatTraceSuccess {
  0%   { stroke-dasharray: 74 300; stroke-dashoffset: 160; opacity: 0.55; }
  100% { stroke-dasharray: 360; stroke-dashoffset: 0; opacity: 1; }
}

@keyframes heartbeatSweep {
  0%   { transform: translateX(-105%); }
  100% { transform: translateX(105%); }
}

@keyframes pendingHeartbeatLine {
  0%, 100% { transform: translateX(-1px) scaleY(0.85); opacity: 0.55; }
  45%      { transform: translateX(1px) scaleY(1.18); opacity: 1; }
  62%      { transform: translateX(0) scaleY(0.95); opacity: 0.76; }
}

/* ─── Onboarding wizard ──────────────────────────────────────────────────── */

@keyframes obPulseRing {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

@keyframes obInputShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

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

@keyframes obSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Overlay */
.ob-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.7);
  backdrop-filter: blur(12px) saturate(135%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  padding: 1rem;
}

/* Modal */
.ob-modal {
  background: linear-gradient(160deg, rgba(26, 31, 44, 0.78), rgba(12, 15, 24, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  width: 100%;
  max-width: min(640px, calc(100vw - 2rem));
  padding: 1.75rem 2rem 1.75rem;
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  backdrop-filter: var(--glass-blur);
  animation: obModalIn 0.28s ease both;
  transition: max-width 0.28s ease, padding 0.28s ease;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  scrollbar-width: thin;
}

.ob-modal::-webkit-scrollbar { width: 8px; height: 8px; }
.ob-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.ob-modal[data-step="4"] {
  max-width: min(760px, calc(100vw - 2rem));
  padding: 1.25rem 1.5rem;
}

#obSlide4 { gap: 0.625rem; }

.ob-modal::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent);
  pointer-events: none;
}

/* Close button */
.ob-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: var(--glass-blur);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.ob-close-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); transform: translateY(-1px); }

/* Step indicators */
.ob-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.ob-modal[data-step="4"] .ob-steps { margin-bottom: 0.75rem; }

.ob-step {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: width 0.24s ease, background 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease;
}

.ob-step--active {
  width: 22px;
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 18px rgba(99, 164, 255, 0.45);
}

.ob-step--done {
  background: rgba(79, 142, 247, 0.45);
}

/* Slide base */
.ob-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ob-slide--active { display: flex; animation: obSlideIn 0.24s ease both; }

/* Slide title */
.ob-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  margin-bottom: 0.125rem;
}

.ob-description {
  max-width: 520px;
  margin-top: -0.45rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: center;
}

/* Continue button */
.ob-continue-btn {
  width: 100%;
  justify-content: center;
  padding: 0.6875rem 1rem;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── Slide 1: Game selection ── */
.ob-game-grid {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.ob-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(160deg, rgba(99, 164, 255, 0.14), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(99, 164, 255, 0.32);
  border-radius: 10px;
  cursor: default;
  user-select: none;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: var(--glass-blur);
}

/* CSS grass block */
.ob-mc-block {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: #7d5a3c;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset -4px -4px 0 rgba(0,0,0,0.2),
    inset 4px 4px 0 rgba(255,255,255,0.08);
}

.ob-mc-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 16px;
  background: #5b9e1f;
  border-bottom: 2px solid rgba(0,0,0,0.18);
}

.ob-mc-side {
  position: absolute;
  top: 16px; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.04) 0px,
    rgba(0,0,0,0.04) 2px,
    transparent 2px,
    transparent 6px
  );
}

.ob-game-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Slide 2: Gamemode chips ── */
.ob-gm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  width: 100%;
}

.ob-gm-chip {
  min-height: 58px;
  padding: 0.65rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  backdrop-filter: var(--glass-blur);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-gm-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

.ob-gm-chip.is-selected {
  background: rgba(99, 164, 255, 0.18);
  border-color: rgba(99, 164, 255, 0.58);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(79, 142, 247, 0.2);
}

.ob-option-icon,
.ob-net-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ob-option-label,
.ob-net-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 560px) { .ob-gm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .ob-gm-grid { grid-template-columns: 1fr; } }

.ob-custom-gm {
  width: 100%;
  margin-top: -0.25rem;
}

/* ── Slide 3: Name form ── */
.ob-name-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ob-input-error {
  border-color: rgba(239, 68, 68, 0.55) !important;
  animation: obInputShake 0.4s ease;
}

/* Tracking mode toggle */
.ob-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}

.ob-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ob-mode-btn--active {
  border-color: rgba(99, 164, 255, 0.48);
  background: rgba(99, 164, 255, 0.1);
  color: var(--text);
}

.ob-mode-name { font-size: 0.8125rem; font-weight: 600; }
.ob-mode-tag  { font-size: 0.65rem; color: #4ade80; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.ob-mode-sub  { font-size: 0.65rem; color: var(--muted); }

.ob-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.25rem;
  display: block;
}

.ob-legacy-ip-wrap { display: flex; flex-direction: column; width: 100%; }

/* Legacy confirm panel in slide 4 */
.ob-legacy-confirm {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(79, 142, 247, 0.07);
  border: 1px solid rgba(79, 142, 247, 0.25);
  border-radius: 8px;
  text-align: center;
}

.ob-legacy-confirm-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid rgba(79, 142, 247, 0.3);
  display: flex; align-items: center; justify-content: center;
}

.ob-legacy-confirm-text { font-size: 0.8125rem; color: var(--text); line-height: 1.55; margin: 0; }
.ob-legacy-confirm-sub  { font-size: 0.75rem; color: var(--muted); margin: 0; }

.ob-net-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.ob-net-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.5rem;
}

.ob-net-pill {
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  backdrop-filter: var(--glass-blur);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ob-net-pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  transform: translateY(-2px);
}

.ob-net-pill.is-selected {
  background: rgba(99, 164, 255, 0.16);
  border-color: rgba(99, 164, 255, 0.52);
  color: var(--accent);
  font-weight: 600;
}

/* ── Slide 4: Server created ── */
.ob-created-hd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.ob-check-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid rgba(74, 222, 128, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-install-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.625rem;
  width: 100%;
  min-width: 0;
}

@media (max-width: 560px) { .ob-install-cols { grid-template-columns: minmax(0, 1fr); } }

.ob-install-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  min-width: 0;
}

.ob-side-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ob-dl-btns {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ob-plugin-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.5rem 0.7rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  min-width: 0;
}

.ob-plugin-card:hover {
  text-decoration: none;
  transform: translateY(-3px) scale(1.01);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-strong);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
}

.ob-plugin-card--paper:hover { border-color: rgba(55, 196, 106, 0.5); }
.ob-plugin-card--velocity:hover { border-color: rgba(75, 182, 255, 0.5); }

.ob-plugin-card--soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.ob-plugin-soon-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
  margin-left: auto;
}

.ob-plugin-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.ob-plugin-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ob-plugin-fallback {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.ob-plugin-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.ob-plugin-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-plugin-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.ob-plugin-action {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.ob-plugin-card:hover .ob-plugin-action {
  color: var(--text);
  transform: translateY(1px);
}

.ob-cmd-block {
  background: rgba(8, 10, 16, 0.58);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.625rem;
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  overflow: hidden;
  margin-top: auto;
  min-width: 0;
}

.ob-cmd-prefix { color: var(--muted); flex-shrink: 0; white-space: nowrap; }

.ob-cmd-key {
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ob-key-block {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  background: rgba(8, 10, 16, 0.58);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  flex: 1;
  min-height: 0;
  min-width: 0;
  justify-content: center;
}

.ob-key-block:hover {
  border-color: rgba(99, 164, 255, 0.48);
  background: rgba(12, 16, 26, 0.72);
  transform: translateY(-2px);
}

.ob-key-text {
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: 0.675rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.6;
}

.ob-key-hint {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Slide 5: Heartbeat ── */
.ob-hb-icon {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-hb-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(79, 142, 247, 0.4);
  animation: obPulseRing 2.4s ease-out infinite;
}

.ob-hb-ring--2 { animation-delay: 1.2s; }

.ob-hb-core {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(79, 142, 247, 0.1);
  border: 1.5px solid rgba(79, 142, 247, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ob-hb-success { display: flex; align-items: center; justify-content: center; }

.ob-check-ring--lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid rgba(74, 222, 128, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-hb-sub {
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.ob-heartbeat-line {
  width: min(280px, 100%);
  height: 38px;
  margin-top: -0.25rem;
}

.ob-skip-btn {
  font-size: 0.8125rem;
  color: var(--muted);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.25rem;
  transition: color 0.12s;
}
.ob-skip-btn:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .ad-slot::after,
  .heartbeat-line::after,
  .heartbeat-line-pulse,
  .sm-row-pending::before {
    animation: none;
  }

  .heartbeat-line-pulse {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}

/* Front page */
.front-body { overflow-x: hidden; }

.front-page {
  min-height: 100vh;
  color: var(--text);
}

.front-hero {
  position: relative;
  min-height: 84svh;
  display: flex;
  align-items: center;
  padding: 7rem clamp(1.25rem, 5vw, 5.5rem) 4rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 10, 16, 0.95) 0%, rgba(9, 10, 16, 0.8) 36%, rgba(9, 10, 16, 0.38) 72%, rgba(9, 10, 16, 0.74) 100%),
    url('/images/auth-background.png') center / cover no-repeat,
    var(--bg);
}

.front-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(9, 10, 16, 0.08) 72%, var(--bg) 100%),
    linear-gradient(140deg, var(--accent-wash) 0%, transparent 42%);
  pointer-events: none;
}

.front-nav {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 66px;
  padding: 0 clamp(1.25rem, 5vw, 5.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 10, 16, 0.34);
  backdrop-filter: var(--glass-blur);
}

.front-brand,
.front-nav-actions {
  display: inline-flex;
  align-items: center;
}

.front-brand {
  gap: 0.65rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.front-brand:hover { text-decoration: none; color: var(--text); }

.front-brand img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 18px var(--accent-dim));
}

.front-nav-actions { gap: 0.65rem; }

.front-link,
.front-btn,
.front-primary,
.front-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.front-link,
.front-secondary {
  color: var(--muted);
  border: 1px solid transparent;
  padding: 0 0.55rem;
}

.front-link:hover,
.front-secondary:hover {
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

.front-btn,
.front-primary {
  color: #fff;
  padding: 0 0.9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 30px var(--accent-dim);
}

.front-btn:hover,
.front-primary:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px var(--accent-dim);
}

.front-secondary {
  padding: 0 0.9rem;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: var(--glass-blur);
}

.front-hero-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 100%);
}

.front-hero-copy h1 {
  font-size: clamp(4rem, 10vw, 9.5rem);
  line-height: 0.88;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 1.35rem;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

.front-hero-copy p {
  width: min(560px, 100%);
  color: rgba(242, 245, 251, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.front-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.front-primary,
.front-secondary {
  min-height: 44px;
  padding-inline: 1.15rem;
}

.front-dashboard-bg {
  position: absolute;
  z-index: 1;
  right: clamp(1rem, 4vw, 5rem);
  bottom: 5.5rem;
  width: min(600px, 46vw);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 15, 24, 0.54);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.4);
  opacity: 0.82;
}

.front-preview-top {
  height: 34px;
  border-bottom: 1px solid var(--border);
  margin: -1rem -1rem 1rem;
  background: rgba(255, 255, 255, 0.035);
}

.front-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.front-preview-stats span,
.front-preview-list span {
  display: block;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.front-preview-stats span { height: 58px; }

.front-preview-chart {
  height: 170px;
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  padding: 1rem;
}

.front-preview-chart svg {
  width: 100%;
  height: 100%;
}

.front-preview-chart path {
  fill: none;
  stroke-linecap: round;
}

.front-preview-chart path:first-child {
  stroke: var(--accent);
  stroke-width: 4;
}

.front-preview-chart path:last-child {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2.4;
}

.front-preview-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.front-preview-list span { height: 34px; }

.front-proof,
.front-section {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.front-proof {
  padding: 0 clamp(1.25rem, 5vw, 5.5rem) 2.5rem;
}

.front-proof-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
  box-shadow: var(--shadow);
}

.front-metric {
  min-height: 132px;
  padding: 1.35rem;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
}

.front-metric span {
  display: block;
  color: var(--text);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 800;
}

.front-metric p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.front-section {
  padding: 3.5rem clamp(1.25rem, 5vw, 5.5rem) 5rem;
}

.front-section-head {
  max-width: 760px;
  margin: 0 auto 1.35rem;
  text-align: center;
}

.front-section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.front-section-head p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.front-feature-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.front-feature {
  min-height: 210px;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.front-feature img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.front-feature h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.front-feature p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .front-hero { min-height: 82svh; }

  .front-dashboard-bg {
    right: -8rem;
    width: 560px;
    opacity: 0.38;
  }

  .front-proof-inner,
  .front-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .front-nav {
    height: 58px;
    padding-inline: 1rem;
  }

  .front-link { display: none; }

  .front-hero {
    min-height: 84svh;
    padding: 6rem 1rem 3rem;
  }

  .front-hero-copy h1 { font-size: 4rem; }

  .front-dashboard-bg {
    right: -14rem;
    bottom: 2rem;
    width: 520px;
  }

  .front-proof,
  .front-section {
    padding-inline: 1rem;
  }
}
