/* ── BoneHost dark theme ─────────────────────────────────────────── */
:root {
  --bg: #0a0c10;
  --bg-alt: #0e1117;
  --surface: #131722;
  --surface-2: #1a1f2e;
  --border: #232a3b;
  --text: #e7eaf2;
  --text-dim: #9aa3b5;
  --accent: #4f8dff;
  --accent-2: #2563eb;
  --accent-dim: rgba(79, 141, 255, 0.12);
  --steam: #1b2838;
  --steam-hi: #2a475e;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.center { text-align: center; margin-top: 2rem; }
.note { color: var(--text-dim); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: #061021;
  padding: 0.5rem 1rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.62rem 1.25rem; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 4px 24px rgba(79, 141, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79, 141, 255, 0.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-steam { background: linear-gradient(135deg, var(--steam-hi), var(--steam)); color: #dfe9f2; border-color: #35597a; }
.btn-steam:hover { transform: translateY(-2px); border-color: #66c0f4; color: #fff; }

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 12, 16, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-nav.scrolled {
  background: rgba(10, 12, 16, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.brand em { color: var(--accent); font-style: normal; }
/* Blue "planet" orb with a slow rotating light sheen; the bone spins gently
   about the screen's z axis inside it, staying fully crisp at every frame
   (a flat glyph rotated on Y would collapse edge-on and look broken). */
.brand-orb {
  position: relative; overflow: hidden;
  width: 2.2em; height: 2.2em; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 34% 30%, rgba(138, 180, 255, 0.40), transparent 55%),
    radial-gradient(circle at 72% 78%, rgba(37, 99, 235, 0.45), transparent 60%),
    rgba(79, 141, 255, 0.12);
  border: 1px solid rgba(79, 141, 255, 0.40);
  box-shadow: 0 0 18px rgba(79, 141, 255, 0.28), inset 0 0 12px rgba(79, 141, 255, 0.15);
}
.brand-orb::before {
  content: ''; position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 44%, rgba(190, 215, 255, 0.28) 52%, transparent 60% 100%);
  animation: orb-spin 12s linear infinite;
}
.brand-icon {
  position: relative; z-index: 1;
  width: 1.5em; height: 1.5em; color: var(--accent);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
  animation: bone-spin 16s linear infinite;
}
@keyframes bone-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orb-spin { to { transform: rotate(1turn); } }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; }
.btn-user { padding: 0.4rem 0.9rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; border-radius: 2px; }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; padding: 7rem 0 5rem; }
.hero-glow {
  position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 35% at 30% 20%, rgba(79, 141, 255, 0.16), transparent 65%),
    radial-gradient(ellipse 35% 30% at 75% 30%, rgba(37, 99, 235, 0.13), transparent 60%);
  animation: glow-drift 16s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) scale(1.08); }
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(138, 180, 255, 0.10) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; text-align: center; z-index: 1; }
.pill {
  display: inline-block; padding: 0.35rem 0.95rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--text-dim); font-size: 0.85rem; margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.grad {
  background: linear-gradient(110deg, var(--accent), #8ab4ff, var(--accent-2), var(--accent));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-sheen 7s ease-in-out infinite;
}
@keyframes grad-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-sub { max-width: 620px; margin: 1.3rem auto 2.2rem; color: var(--text-dim); font-size: 1.15rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  max-width: 760px; margin: 3.5rem auto 0;
}
.hero-stats div { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 0.5rem; background: rgba(19, 23, 34, 0.6); }
.hero-stats dt { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.hero-stats dd { color: var(--text-dim); font-size: 0.85rem; }

/* ── Sections ── */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2, .page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; font-weight: 800; }
.section-head p { color: var(--text-dim); margin-top: 0.5rem; font-size: 1.05rem; }
.page-head { padding-bottom: 0; text-align: center; }
.page-head p { color: var(--text-dim); margin-top: 0.6rem; font-size: 1.1rem; }

.grid { display: grid; gap: 1.3rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover, a.card:hover { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); }

/* ── Features ── */
.feature-card:hover { border-color: #31507a; transform: translateY(-3px); }
.feature-card h3 { margin: 0.9rem 0 0.4rem; font-size: 1.15rem; }
.feature-card p { color: var(--text-dim); font-size: 0.95rem; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, rgba(79, 141, 255, 0.18), rgba(37, 99, 235, 0.07));
  border: 1px solid rgba(79, 141, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon .ic { width: 22px; height: 22px; color: var(--accent); }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn .ic { width: 1.05em; height: 1.05em; }
.feature-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 3rem; }
.feature-detail h2 { font-size: 1.2rem; margin-bottom: 0.6rem; color: var(--accent); }
.feature-detail p { color: var(--text-dim); font-size: 0.95rem; }

/* ── Games ── */
.game-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--text); }
a.game-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.game-card.is-soon { opacity: 0.75; }
.game-art { position: relative; aspect-ratio: 460 / 215; overflow: hidden; background: var(--surface-2); }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
a.game-card:hover .game-art img { transform: scale(1.04); }
.game-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 12, 16, 0.65));
}
.badge {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 1;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.22rem 0.6rem; border-radius: 999px;
  background: rgba(10, 12, 16, 0.75); color: var(--text-dim); border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.badge-live { color: #8ab4ff; border-color: rgba(79, 141, 255, 0.5); background: rgba(37, 99, 235, 0.25); }
.game-meta { padding: 1rem 1.1rem 1.2rem; }
.game-meta h3 { font-size: 1.02rem; }
.game-meta p { color: var(--text-dim); font-size: 0.82rem; margin: 0.2rem 0 0.6rem; }
.game-price { color: var(--accent); font-weight: 700; font-size: 0.9rem; }

/* ── Plans ── */
.plan-card { position: relative; display: flex; flex-direction: column; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 42px rgba(79, 141, 255, 0.12); }
.plan-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.9rem; border-radius: 999px;
}
.plan-card h3 { font-size: 1.3rem; }
.plan-blurb { color: var(--text-dim); font-size: 0.9rem; margin: 0.3rem 0 1rem; min-height: 2.6em; }
.plan-price { font-size: 2.4rem; font-weight: 800; margin-bottom: 1rem; }
.plan-price span { font-size: 1rem; color: var(--text-dim); font-weight: 500; }
.plan-card ul { list-style: none; margin-bottom: 1.5rem; flex: 1; }
.plan-card li { padding: 0.42rem 0; color: var(--text-dim); font-size: 0.92rem; border-bottom: 1px solid var(--border); }
.plan-card li::before { content: '✔'; color: var(--accent); margin-right: 0.6rem; font-size: 0.8rem; }

/* ── CTA band / FAQ / prose ── */
.cta-band { text-align: center; padding-block: 1rem; }
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.cta-band p { color: var(--text-dim); margin: 0.6rem 0 1.6rem; }
.faq { max-width: 760px; margin: 4rem auto 0; }
.faq h2 { text-align: center; margin-bottom: 1.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.3rem; margin-bottom: 0.8rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--text-dim); padding-top: 0.7rem; }
.prose .card { max-width: 860px; margin: 0 auto; padding: 2.2rem; }
.prose h2 { margin: 1.6rem 0 0.6rem; font-size: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { margin: 0.6rem 0 0.6rem 1.3rem; }
.prose code { background: var(--surface-2); padding: 0.15em 0.45em; border-radius: 6px; font-size: 0.9em; }

/* ── Auth ── */
.auth-wrap { min-height: calc(100vh - 66px - 300px); display: flex; align-items: center; justify-content: center; padding: 4rem 1rem; }
.auth-card { width: min(440px, 100%); padding: 2.5rem; text-align: center; }
.auth-orb { width: 64px; height: 64px; margin: 0 auto 1rem; font-size: 1.9rem; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-card h1 em { color: var(--accent); font-style: normal; }
.auth-sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 1.6rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.check { display: flex; align-items: center; justify-content: center; gap: 0.55rem; color: var(--text-dim); font-size: 0.95rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
.auth-fine { color: var(--text-dim); font-size: 0.8rem; margin-top: 1.2rem; }
.alert { background: rgba(255, 99, 71, 0.1); border: 1px solid rgba(255, 99, 71, 0.4); color: #ff9c8a; border-radius: 10px; padding: 0.7rem 1rem; font-size: 0.9rem; margin-bottom: 1.2rem; }

/* ── Dashboard ── */
.dash { padding: 2rem 0 4rem; }
/* The panel uses the whole viewport: control surfaces want room, not a
   reading-width column. Marketing pages keep the 1140px container. */
.dash > .container { width: min(100% - 3rem, 1920px); }
.dash-grid { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dash-side { position: sticky; top: 82px; padding: 1.1rem; }
.dash-nav-sep { height: 1px; background: var(--border); margin: 0.35rem 0.6rem; }
.server-ident-text { min-width: 0; }
.server-ident-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.server-ident .dash-steamid { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-note { margin-top: 0.5rem; }
/* Segmented control for sections within one tab. */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.seg a { padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); border-right: 1px solid var(--border); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a.active { background: var(--accent-dim); color: var(--accent); }
.seg a:hover:not(.active) { color: var(--text); background: var(--surface-2); }
.ov-sub { margin-top: 1.1rem; }
.stack { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--text-dim); }
label.mod-locked { cursor: default; opacity: 0.9; }
label.mod-locked:hover { border-color: var(--border); }
.dash-user { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.dash-avatar { width: 46px; height: 46px; border-radius: 12px; }
.dash-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 1.4rem; }
.dash-user strong { display: block; line-height: 1.2; }
.dash-steamid { color: var(--text-dim); font-size: 0.72rem; }
.dash-nav { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.2rem; }
.dash-nav a { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.75rem; border-radius: 9px; color: var(--text-dim); font-weight: 500; font-size: 0.92rem; }
.dash-nav a.active { background: var(--accent-dim); color: var(--accent); }
.dash-nav a:hover:not(.active) { background: var(--surface-2); color: var(--text); }
.dash-nav a em { margin-left: auto; font-style: normal; font-size: 0.65rem; background: var(--surface-2); border: 1px solid var(--border); padding: 0.1rem 0.5rem; border-radius: 999px; }
.dash-head h1 { font-size: 1.7rem; letter-spacing: -0.02em; }
.dash-head p { color: var(--text-dim); margin-bottom: 1.3rem; font-size: 0.95rem; }
.dash-stats { margin-bottom: 1.5rem; }
.stat-card { text-align: center; padding: 1.3rem; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--text-dim); font-size: 0.85rem; }
.empty-state { text-align: center; padding: 3.5rem 2rem; }
.empty-art { font-size: 3rem; margin-bottom: 0.8rem; }
.empty-state h2 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-dim); max-width: 480px; margin: 0 auto 1.6rem; }

/* ── Panel: servers, console, forms, tables ── */
.grid-2 { grid-template-columns: repeat(2, 1fr); display: grid; gap: 1.3rem; margin-bottom: 1.5rem; }
/* One vertical rhythm for every panel page: any card sitting directly in the
   main column owns the gap below it. Cards nested in a grid or .form-flow get
   their spacing from that container's gap instead, so they opt back out —
   otherwise gap and margin stack into a double-height gutter. */
.dash-main > .card { margin-bottom: 1.5rem; }
.dash-main > .card:last-child { margin-bottom: 0; }
.grid > .card, .form-flow > .card { margin-bottom: 0; }
.dash-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.card-title { font-size: 1.05rem; margin-bottom: 0.9rem; }
.card-title .muted { font-weight: 400; font-size: 0.85rem; }
/* Pane header: title left, the controls that act on the whole pane hard right.
   The title's own bottom margin belongs to the header row here, not the h2. */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.card-head .card-title, .card-head form { margin: 0; }
/* Controls that close out a pane, spaced off whatever they follow. */
.pane-actions { margin-top: 0.9rem; }
/* Two-column key/value block, for panes with enough rows that a single column
   reads as a straggling list. Every row keeps its rule — including the last —
   so both columns end on the same straight edge. */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.6rem; }
.kv-grid .kv:last-of-type { border-bottom: 1px solid var(--border); }
/* An odd number of rows would leave the final one half-underlined; let it take
   the full width so the block still ends on a straight edge. */
.kv-grid .kv:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 720px) { .kv-grid { grid-template-columns: 1fr; } }
.muted { color: var(--text-dim); }
.small { font-size: 0.8rem; }
/* Button rows mix plain buttons, small buttons and (in admin tables) text
   inputs. Without align-items they default to `stretch`, which top-aligns
   every button against the tallest control and silently stretches small
   buttons to full height. */
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; min-height: 32px; }

/* Inputs sitting INLINE with small buttons. The global 42px input height is
   sized for stacked form fields and towers over .btn-sm in a button row;
   these match it instead. Widths stay per-field (inline style). */
.btn-row input[type="text"], .btn-row input[type="number"], .btn-row select,
.inline-form input[type="text"], .inline-form input[type="number"], .inline-form select,
.restore-form input[type="text"], .restore-form input[type="number"], .restore-form select {
  height: 32px; padding: 0.25rem 0.6rem; font-size: 0.85rem; width: auto;
}
.btn-danger { background: rgba(255, 99, 71, 0.12); color: #ff9c8a; border-color: rgba(255, 99, 71, 0.4); }
.btn-danger:hover { background: rgba(255, 99, 71, 0.22); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #5a6478; flex: none; }
.status-dot.on { background: var(--accent); box-shadow: 0 0 8px rgba(79, 141, 255, 0.8); }
.status-dot.off { background: #f87171; }

.server-list { display: flex; flex-direction: column; gap: 0.8rem; }
.server-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.3rem; color: var(--text); }
.server-row:hover { border-color: var(--accent); }
.server-row-main { display: flex; flex-direction: column; min-width: 180px; }
.server-row-sub { color: var(--text-dim); font-size: 0.82rem; font-family: ui-monospace, monospace; }
.server-row-meta { color: var(--text-dim); font-size: 0.85rem; flex: 1; }
.server-row-state { font-size: 0.78rem; padding: 0.15rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
.server-row-state.running, .server-row-state.active, .server-row-state.paid { color: var(--accent); border-color: rgba(79, 141, 255, 0.45); }
.server-row-state.unpaid { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }

.tag { font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
.tag-open { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.tag-answered, .tag-active { color: var(--accent); border-color: rgba(79, 141, 255, 0.45); }
.tag-closed, .tag-cancelled { color: var(--text-dim); }
.tag-paused, .tag-pending_cancel { color: #fb923c; border-color: rgba(251, 146, 60, 0.4); }
.tag-unpaid { color: #f87171; border-color: rgba(248, 113, 113, 0.4); }

.kv { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--text-dim); }
.kv code { background: var(--surface-2); padding: 0.2em 0.55em; border-radius: 6px; font-size: 0.85em; word-break: break-all; }
.blur-reveal { filter: blur(5px); cursor: pointer; transition: filter 0.15s; }
.blur-reveal:hover, .blur-reveal:focus { filter: none; }

.console-card { margin-bottom: 1.5rem; }
.console {
  background: #05070b; border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; height: 320px; overflow-y: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem; line-height: 1.5; color: #b7c0d4; white-space: pre-wrap; word-break: break-word;
}
.console-input { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.console-input input { flex: 1; }
/* Map switcher: filter + picker + go. The select carries the long map
   names, so it takes the slack while the filter stays compact. */
.map-switch { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.map-switch input { flex: 0 1 200px; }
.map-switch select { flex: 1 1 260px; min-width: 0; }
.map-switch .btn { flex: none; }

.form-card { margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; align-items: start; }
.form-card > label { margin-bottom: 1.1rem; }
.form-card label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--text); }
/* Helper text sits under the field, so every field's title stays one line and
   inputs across a row line up. */
.form-card label small { font-size: 0.78rem; font-weight: 400; color: var(--text-dim); line-height: 1.45; }
.form-card label small a { color: var(--accent); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.95rem; width: 100%;
  line-height: 1.3; height: 42px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 141, 255, 0.15); }
.input-suffix { display: flex; align-items: center; gap: 0.4rem; }
.input-suffix input { flex: 1 1 auto; min-width: 0; width: auto; }
.input-suffix em { color: var(--text-dim); font-style: normal; white-space: nowrap; }
.addons-set { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.addons-set legend { padding: 0 0.5rem; color: var(--text-dim); font-size: 0.85rem; }
.check-left { justify-content: flex-start; text-align: left; padding: 0.35rem 0; }
.alert-ok { background: rgba(79, 141, 255, 0.1); border-color: rgba(79, 141, 255, 0.4); color: #8ab4ff; }
.danger-card { border-color: rgba(255, 99, 71, 0.35); }

/* Lead copy that sits between the page heading and the first pane; it owns the
   gap below it the same way a card does. */
.backup-note { margin-bottom: 1.5rem; }
.table-card { margin-bottom: 1.5rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
th, td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: middle; }

/* ── Pricing (flat monthly) ── */
.pricing-hiw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 2rem; margin-bottom: 2.5rem; }
.hiw-step h3 { margin: 0.8rem 0 0.3rem; font-size: 1.05rem; }
.hiw-step p { color: var(--text-dim); font-size: 0.9rem; }
.price-grid { margin-bottom: 2.5rem; }
.price-tag { font-size: 1.7rem; font-weight: 800; margin: 0.3rem 0 0.9rem; }
.price-tag span { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; }
.included { padding: 2rem; margin-bottom: 1rem; }
.included-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem 1.5rem; }
.included-list li { display: flex; align-items: center; gap: 0.6rem; color: var(--text-dim); font-size: 0.92rem; }
.included-list .ic { color: var(--accent); }

.price-strip { display: flex; align-items: center; gap: 2.5rem; padding: 2rem 2.5rem; flex-wrap: wrap; }
.price-strip-amount { display: block; font-size: 2.4rem; font-weight: 800; line-height: 1.1; }
.price-strip-amount em { font-style: normal; font-size: 1rem; color: var(--text-dim); font-weight: 500; }
.price-strip-label { color: var(--text-dim); font-size: 0.9rem; }
.price-strip-list { list-style: none; flex: 1; min-width: 260px; }
.price-strip-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; color: var(--text-dim); font-size: 0.95rem; }
.price-strip-list .ic { color: var(--accent); }

.pill-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 0.35rem; box-shadow: 0 0 6px rgba(79, 141, 255, 0.9); animation: dot-pulse 2.4s ease-in-out infinite; }
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(79, 141, 255, 0.6); }
  50% { box-shadow: 0 0 12px rgba(79, 141, 255, 1); }
}

/* ── Scroll reveal + page motion ── */
body { animation: page-in 0.45s ease-out both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1); transition-delay: var(--rvd, 0ms); will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Create-server flow ── */
.form-flow { display: flex; flex-direction: column; gap: 1.2rem; }
.step-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.step-head h2 { font-size: 1.1rem; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent); font-weight: 800; font-size: 0.95rem;
  border: 1px solid rgba(79, 141, 255, 0.35);
}
.game-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; margin-bottom: 1.2rem; }
.game-option { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid var(--border); display: block; }
.game-option input { position: absolute; opacity: 0; }
.game-option img { width: 100%; display: block; aspect-ratio: 460 / 215; object-fit: cover; }
.game-option-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9rem 0.7rem 0.4rem;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 11, 0.9)); font-size: 0.85rem; font-weight: 700;
}
.game-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 18px rgba(79, 141, 255, 0.35); }
.addon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1.2rem; }
.addon-option { display: block; cursor: pointer; }
.addon-option input { position: absolute; opacity: 0; }
.addon-box {
  display: block; border: 2px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem;
  transition: border-color 0.15s ease;
}
.addon-box strong { display: block; margin-bottom: 0.2rem; }
.addon-box span { color: var(--text-dim); font-size: 0.82rem; }
.addon-option:has(input:checked) .addon-box { border-color: var(--accent); background: var(--accent-dim); }
.deploy-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.deploy-bar strong { font-size: 1.4rem; display: block; }

/* ── Billing / tickets ── */
.pay-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-color: rgba(251, 191, 36, 0.45); margin-bottom: 1.5rem; }
/* Let the copy take the free space and wrap as a unit, so the pay buttons
   sit hard right instead of being pushed around by the text length. */
.pay-card-info { flex: 1 1 320px; }
.pay-card .card-title { display: flex; align-items: center; gap: 0.5rem; }
.billing-actions { margin-top: 0.8rem; }
/* Gap matters: these forms hold an input NEXT TO a button (set RCON
   password, transfer owner) and without it the two controls touch. */
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; }
/* Standing on its own in a pane (rather than packed into a table cell), the
   pair should use the pane's full width instead of leaving the input stubbed. */
.card > .inline-form { display: flex; }
.card > .inline-form input { flex: 1 1 auto; min-width: 0; }
.admin-log { background: #05070b; border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem; font-size: 0.75rem; color: #b7c0d4; white-space: pre-wrap; margin: 0.6rem 0; max-height: 160px; overflow-y: auto; }
textarea {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.95rem; width: 100%; resize: vertical; font-family: inherit;
}
textarea:focus { outline: none; border-color: var(--accent); }
/* Overrides .form-row's grid + align-items:start, which top-aligned the
   input against the button instead of centering the pair. */
.form-row-inline { display: flex; gap: 0.6rem; align-items: center; }
.form-row-inline input { flex: 1; }
.ticket-thread { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.3rem; }
.ticket-msg p { white-space: pre-wrap; color: var(--text-dim); }
.ticket-msg-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.ticket-msg.from-admin { border-color: rgba(79, 141, 255, 0.4); }
.ticket-msg.from-admin .ticket-msg-head strong { color: var(--accent); }
/* ── Server pages ── */
.back-link { display: flex; align-items: center; gap: 0.5rem; color: var(--text-dim); font-size: 0.85rem; padding-bottom: 0.9rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.back-link:hover { color: var(--accent); }
.server-ident { align-items: center; }
.side-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.console-tall { height: 460px; }
.code-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem;
  background: #05070b; color: #b7c0d4; line-height: 1.55; tab-size: 4; white-space: pre;
}
.crumbs a { color: var(--accent); }
.restore-form { display: inline-flex; align-items: center; gap: 0.6rem; }
.check-inline { font-size: 0.78rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.check-inline input { accent-color: var(--accent); }
.copyable { cursor: pointer; position: relative; }
.copyable.copied { border-color: var(--accent); }
.copy-tip {
  position: absolute; top: -1.7rem; right: 0; background: var(--accent); color: #fff;
  font-size: 0.68rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 6px;
  filter: none; pointer-events: none; white-space: nowrap;
}
.blur-reveal.copyable:hover { filter: none; }

.chart-scroll { overflow-x: auto; }
.stat-chart { width: 100%; min-width: 560px; height: 220px; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-label { fill: var(--text-dim); font-size: 11px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart-area { fill: rgba(79, 141, 255, 0.14); stroke: none; }
.map-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.map-bar-row { display: grid; grid-template-columns: 160px 1fr 70px; gap: 0.8rem; align-items: center; }
.map-bar-name { font-family: ui-monospace, monospace; font-size: 0.82rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-bar-track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; }
.map-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; }
.map-bar-val { font-size: 0.8rem; color: var(--text-dim); text-align: right; }

.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff; font-size: 0.68rem;
  font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.alert-link { display: block; text-decoration: none; margin-bottom: 1.2rem; }
.ticket-user-group { margin: 1.2rem 0 0.4rem; color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.empty-icon { margin: 0 auto 1rem; width: 56px; height: 56px; }
.empty-icon .ic { width: 26px; height: 26px; }
.dash-bottom { margin-top: 1.5rem; }

@media (max-width: 720px) {
  .grid-2, .form-row { grid-template-columns: 1fr; }
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.8rem; max-width: 280px; }
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.9rem; }
.site-footer a { display: block; color: var(--text-dim); padding: 0.22rem 0; font-size: 0.95rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { font-size: 1.2rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem;
  color: var(--text-dim); font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .dash > .container { width: min(100% - 1.5rem, 1920px); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .feature-detail { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 1rem 4%; gap: 0.4rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0; }
  .nav-toggle { display: flex; }
  .hero { padding: 4.5rem 0 3.5rem; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── Maps tab ── */
.ms-pane-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 0.8rem; align-items: end; }
.ms-pane-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--text-dim); min-width: 0; }
.ms-pane-actions { display: flex; gap: 0.5rem; padding-bottom: 0.15rem; }
.ms-pane .muted { margin-top: 0.7rem; }

.ms-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.ms-source { display: block; cursor: pointer; position: relative; }
.ms-source input { position: absolute; opacity: 0; }
.ms-source-box {
  display: flex; flex-direction: column; gap: 0.25rem; height: 100%;
  padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-alt); transition: border-color 0.15s, background 0.15s;
}
.ms-source-desc { color: var(--text-dim); font-size: 0.8rem; }
.ms-source-count { color: var(--text-dim); font-size: 0.75rem; margin-top: auto; padding-top: 0.35rem; }
.ms-source:has(input:checked) .ms-source-box { border-color: var(--accent); background: var(--accent-dim); }
.ms-source:has(input:checked) .ms-source-count { color: var(--accent); }
.ms-source:hover .ms-source-box { border-color: var(--accent); }

.dash-main > .card.ms-section { margin-bottom: 1.1rem; }
.ms-sec-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ms-sec-head .card-title { margin: 0; }
.ms-sec-spacer { flex: 1; }
.ms-sec-tag { font-size: 0.72rem; }
.ms-chevron {
  width: 26px; height: 26px; flex: none; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: 7px; position: relative;
}
.ms-chevron::before {
  content: ''; position: absolute; left: 8px; top: 7px; width: 7px; height: 7px;
  border-right: 1.6px solid var(--text-dim); border-bottom: 1.6px solid var(--text-dim);
  transform: rotate(45deg); transition: transform 0.15s;
}
.ms-collapsed .ms-chevron::before { transform: rotate(-45deg) translate(-1px, 1px); }
.ms-sec-body { margin-top: 0.8rem; }
.ms-collapsed .ms-sec-body { display: none; }
.ms-excluded { opacity: 0.65; }
.ms-excluded .ms-tile { filter: saturate(0.4); }

.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 0.4rem; }
.ms-tile {
  display: flex; align-items: center; gap: 0.45rem; min-width: 0;
  padding: 0.28rem 0.4rem; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 8px;
}
.ms-tile-off { opacity: 0.62; }
.ms-tile-off .ms-thumb { filter: grayscale(0.9); }
.ms-locked { opacity: 0.55; }
.ms-new { animation: msTileIn 0.35s ease both; }
@keyframes msTileIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }
.ms-thumb {
  width: 44px; height: 25px; object-fit: cover; border-radius: 5px;
  background: var(--bg); border: 1px solid var(--border); flex: none;
}
.ms-info { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.ms-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-sub { font-size: 0.65rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-edit {
  min-height: 0 !important; padding: 0.05rem 0.25rem !important; font-size: 0.78rem !important;
  background: transparent !important; border: 1px solid transparent !important; border-radius: 6px !important;
  width: 100%;
}
.ms-edit:hover, .ms-edit:focus { border-color: var(--border) !important; background: var(--bg) !important; }
.ms-edit-id { font-size: 0.72rem !important; color: var(--text-dim); }
.ms-tile-actions { display: flex; align-items: center; gap: 0.35rem; flex: none; }
.ms-link {
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 7px; color: var(--text-dim); font-size: 0.8rem;
}
.ms-link:hover { color: var(--accent); border-color: var(--accent); }
.ms-del {
  width: 20px; height: 20px; cursor: pointer; line-height: 1;
  background: transparent; border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-dim); font-size: 0.95rem;
}
.ms-del:hover { color: #ff9c8a; border-color: rgba(255, 99, 71, 0.5); }
.ms-switch { position: relative; display: inline-block; width: 30px; height: 18px; flex: none; cursor: pointer; }
.ms-switch input { position: absolute; opacity: 0; }
.ms-switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--border); transition: background 0.15s, border-color 0.15s;
}
.ms-switch i::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--text-dim); transition: transform 0.15s, background 0.15s;
}
.ms-switch input:checked + i { background: var(--accent-dim); border-color: var(--accent); }
.ms-switch input:checked + i::after { transform: translateX(12px); background: var(--accent); }
.ms-switch input:disabled + i { opacity: 0.4; }

.ms-add { display: flex; gap: 0.6rem; }
.ms-add input { flex: 1; min-width: 0; }
.ms-add .btn { flex: none; align-self: stretch; }
.ms-add-note { margin: 0.4rem 0 0.8rem; min-height: 1em; }
.ms-err { color: #ff9c8a !important; }
.ms-dupes { margin-top: 0.8rem; border-top: 1px dashed var(--border); padding-top: 0.6rem; }
.ms-dupes summary { cursor: pointer; color: var(--text-dim); font-size: 0.82rem; }
.ms-dupes .ms-grid { margin-top: 0.6rem; }
.ms-coll-empty { margin: 0; }

.ms-savebar {
  position: sticky; bottom: 0.8rem; z-index: 5;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 1rem; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
@media (max-width: 960px) {
  .ms-pane-grid { grid-template-columns: 1fr 1fr; }
  .ms-sources { grid-template-columns: 1fr; }
  .ms-grid { grid-template-columns: 1fr; }
}

/* ── Overview ops pane + Configure / Mods panes ── */
.ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.ops-col { min-width: 0; }
/* A rule between the columns: the two halves hold unrelated controls, and
   without it the map switcher reads as part of the connect details. */
.ops-col + .ops-col { border-left: 1px solid var(--border); padding-left: 1.6rem; }

/* Configure's settings pane. A 12-column track lets each field take the width
   its content actually needs (a server name is not a slot count) while every
   row still ends flush, with no half-empty trailing row. */
.cfg-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.9rem; }
.cfg-grid label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--text-dim); min-width: 0; }
/* Titles keep a fixed line box whether or not they carry a tag, and controls
   are pushed to the bottom of their cell — so inputs line up across a row even
   when one title wraps. */
.cfg-label { display: flex; align-items: center; gap: 0.45rem; min-height: 1.5rem; flex-wrap: wrap; }
.cfg-grid label > input, .cfg-grid label > select, .cfg-grid label > .input-suffix { margin-top: auto; }
.cfg-col-3 { grid-column: span 3; }
.cfg-col-4 { grid-column: span 4; }
.cfg-col-5 { grid-column: span 5; }
.cfg-col-6 { grid-column: span 6; }

/* Toggles as boxes rather than bare checkboxes: they carry a sentence of
   explanation each, which a single inline row cannot hold without wrapping
   into its neighbour. */
.cfg-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1rem; }
/* Qualified with `label` on purpose: these sit inside a .form-card, whose
   `.form-card label` rule stacks every label into a column and outranks a bare
   class selector. Same for .mod-row below. */
label.cfg-check {
  display: flex; flex-direction: row; align-items: flex-start; gap: 0.6rem; min-width: 0; cursor: pointer;
  padding: 0.7rem 0.85rem; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.cfg-check:hover { border-color: var(--accent); }
.cfg-check:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.cfg-check input { flex: none; margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: var(--accent); }
.cfg-check-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.cfg-check-body strong { color: var(--text); font-weight: 600; font-size: 0.88rem; }
.cfg-check-body span { color: var(--text-dim); font-weight: 400; font-size: 0.78rem; line-height: 1.45; }
.cfg-card .muted.small { margin-top: 0.9rem; }
/* The save bar follows you down the page — the settings pane and the config
   table together are taller than a screen. */
.cfg-savebar { position: sticky; bottom: 0.8rem; z-index: 5; padding: 0.9rem 1.2rem; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); }

/* Pack-in plugins: checkbox on the left, name and description stacked to its
   right. The description used to be a hover tooltip, which hid it from touch
   devices and from anyone scanning the list. */
.mod-list { display: flex; flex-direction: column; gap: 0.45rem; }
label.mod-row {
  display: flex; flex-direction: row; align-items: flex-start; gap: 0.65rem;
  min-width: 0; cursor: pointer; padding: 0.7rem 0.85rem;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.mod-row:hover { border-color: var(--accent); }
.mod-row:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.mod-row input { flex: none; margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: var(--accent); }
.mod-body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.mod-head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; min-width: 0; }
.mod-name { font-size: 0.88rem; font-weight: 600; color: var(--text); min-width: 0; }
.mod-desc { font-size: 0.78rem; font-weight: 400; color: var(--text-dim); line-height: 1.45; }
.mod-row .tag { flex: none; font-size: 0.66rem; padding: 0.1rem 0.45rem; }
/* Version column: deployed version + its state, right-aligned and never
   wrapping into the description. */
.mod-ver { flex: none; display: flex; align-items: center; gap: 0.4rem; margin-left: auto; padding-left: 0.8rem; white-space: nowrap; font-size: 0.78rem; color: var(--text-dim); }
.mod-ver code { background: var(--surface-2); padding: 0.12em 0.5em; border-radius: 6px; font-size: 0.78rem; }
@media (max-width: 720px) {
  label.mod-row { flex-wrap: wrap; }
  .mod-ver { margin-left: 1.65rem; padding-left: 0; width: 100%; }
}

/* Access: what a shared admin may and may not do, as two readable columns. */
.perm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.perm-col h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.perm-can h3 { color: var(--accent); }
.perm-cannot h3 { color: #fb923c; }
.perm-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.22rem; }
.perm-col li { color: var(--text-dim); font-size: 0.82rem; padding-left: 0.9rem; position: relative; }
.perm-col li::before { content: '·'; position: absolute; left: 0.2rem; }

@media (max-width: 960px) {
  .ops-grid { grid-template-columns: 1fr; }
  .ops-col + .ops-col { border-left: 0; padding-left: 0; padding-top: 1.4rem; border-top: 1px solid var(--border); }
  .cfg-grid { grid-template-columns: repeat(6, 1fr); }
  .cfg-col-3, .cfg-col-4, .cfg-col-5, .cfg-col-6 { grid-column: span 3; }
}
@media (max-width: 720px) {
  .cfg-grid { grid-template-columns: 1fr; }
  .cfg-col-3, .cfg-col-4, .cfg-col-5, .cfg-col-6 { grid-column: span 1; }
  .cfg-checks, .perm-cols { grid-template-columns: 1fr; }
}

/* Card internals: the global margin reset leaves explanatory copy and follow-up
   forms flush against the controls above them. Space them where they meet. */
.card .kv + p, .card .btn-row + p, .card form + p, .card p + form, .card p + p,
.card .kv + form, .card .table-scroll + p, .card .kv-grid + p, .card .kv-grid + form { margin-top: 0.75rem; }
.card .mod-list + p, .card .cfg-checks + p, .card .perm-cols + p { margin-top: 0.9rem; }
/* .grid-2 carries a bottom margin for stacking whole panes; nested inside one
   it would push the card's own closing copy a full gutter away. */
.card .grid-2 { margin-bottom: 0; }
/* .alert already owns its bottom gap; the anchor wrapper must not add a second. */
.alert-link .alert { margin-bottom: 0; }

/* ── Scoreboard tab (in-game replica) ── */
.sb-card { background: linear-gradient(180deg, rgba(13, 17, 24, 0.6), transparent 30%), var(--surface); }
.sb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.sb-score { display: flex; align-items: center; gap: 0.7rem; font-size: 2.6rem; font-weight: 800; line-height: 1; }
.sb-team-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--text-dim); }
.sb-ct-score { color: #7ab2e8; }
.sb-t-score { color: #e8c15a; flex-direction: row-reverse; }
.sb-mid { text-align: center; min-width: 0; }
.sb-map { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
.sb-round { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.sb-team { margin-bottom: 1.1rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sb-ct { border-color: rgba(122, 178, 232, 0.35); }
.sb-t { border-color: rgba(232, 193, 90, 0.35); }
.sb-team-head {
  display: flex; align-items: baseline; gap: 0.7rem; padding: 0.5rem 0.9rem;
  font-weight: 700; letter-spacing: 0.06em; font-size: 0.85rem; text-transform: uppercase;
}
.sb-ct .sb-team-head { background: rgba(122, 178, 232, 0.10); color: #7ab2e8; }
.sb-t .sb-team-head { background: rgba(232, 193, 90, 0.10); color: #e8c15a; }
.sb-spec .sb-team-head { background: var(--bg-alt); color: var(--text-dim); }
.sb-team-score { font-size: 1rem; }
.sb-team-count { margin-left: auto; font-weight: 400; font-size: 0.72rem; color: var(--text-dim); text-transform: none; letter-spacing: 0; }
.sb-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sb-table th {
  text-align: right; padding: 0.3rem 0.7rem; font-size: 0.66rem; font-weight: 600;
  color: var(--text-dim); letter-spacing: 0.1em; border-bottom: 1px solid var(--border);
}
.sb-table td { text-align: right; padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.sb-table tr:last-child td { border-bottom: none; }
.sb-table .sb-col-player { text-align: left; width: 34%; min-width: 220px; }
.sb-dead td { color: var(--text-dim); }
.sb-dead .sb-avatar { filter: grayscale(1); opacity: 0.55; }
.sb-dead .sb-name { color: var(--text-dim); }
.sb-player { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); min-width: 0; }
a.sb-player:hover .sb-name { color: var(--accent); text-decoration: underline; }
.sb-avatar { width: 28px; height: 28px; border-radius: 6px; overflow: hidden; flex: none; background: var(--bg-alt); border: 1px solid var(--border); }
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-avatar-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--text-dim); }
.sb-name-wrap { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.sb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.sb-bot { font-size: 0.6rem; padding: 0.05rem 0.35rem; }
.sb-skull { color: var(--text-dim); font-size: 0.85rem; }
.sb-hp { position: relative; width: 42px; height: 5px; border-radius: 3px; background: var(--bg); border: 1px solid var(--border); flex: none; }
.sb-hp i { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(90deg, #4caf6d, #7dd89b); display: block; }
.sb-dead .sb-hp { display: none; }
.sb-foot { margin-top: 0.4rem; }
@media (max-width: 720px) {
  .sb-score { font-size: 1.8rem; }
  .sb-table .sb-col-player { min-width: 150px; }
}

/* ── Players tab: actions ── */
.pl-me { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.pl-me .tag { font-size: 0.68rem; }
.sb-table .sb-col-act { width: 1%; white-space: nowrap; text-align: right; }
.pl-kebab {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); cursor: pointer; font-size: 1rem; line-height: 1; vertical-align: middle;
}
.pl-kebab:hover, .pl-kebab[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.pl-menu {
  position: absolute; z-index: 40; min-width: 230px; max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.4rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
.pl-menu h4 { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); padding: 0.45rem 0.6rem 0.2rem; }
.pl-menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 0.42rem 0.6rem; border-radius: 8px; font-size: 0.85rem; cursor: pointer; }
.pl-menu button:hover { background: var(--surface-2); }
.pl-menu button.danger { color: #ff9c8a; }
.pl-menu .muted { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
/* The global `* { margin: 0 }` reset outranks the UA stylesheet's
   `dialog { margin: auto }`, which is what centres a modal inside its
   inset:0 box — without it the dialog pins to the top-left corner. */
dialog.pl-dialog {
  position: fixed; inset: 0; margin: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.3rem 1.4rem; width: min(460px, calc(100% - 2rem));
  max-height: calc(100dvh - 3rem); overflow-y: auto; box-shadow: var(--shadow);
}
dialog.pl-dialog::backdrop { background: rgba(5, 7, 11, 0.7); backdrop-filter: blur(3px); }
.pl-dialog h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.pl-dialog .pl-target { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.9rem; }
.pl-dialog label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.pl-dialog .btn-row { justify-content: flex-end; margin-top: 0.4rem; }
.pl-out { background: #05070b; border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.8rem; font-family: ui-monospace, monospace; font-size: 0.75rem; color: #b7c0d4; white-space: pre-wrap; max-height: 200px; overflow-y: auto; margin-top: 0.6rem; }
.pl-toast {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.85rem; box-shadow: var(--shadow);
  animation: msTileIn 0.2s ease both;
}
.pl-toast.err { border-left-color: #f87171; }
.pl-toast pre { font-family: ui-monospace, monospace; font-size: 0.72rem; color: var(--text-dim); white-space: pre-wrap; margin-top: 0.3rem; max-height: 120px; overflow-y: auto; }
.pl-quick { display: grid; grid-template-columns: 1fr; gap: 0.55rem; }
.pl-quick-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.pl-quick-row input[type="text"] { flex: 1 1 200px; min-width: 0; }
.pl-quick-row select { flex: 0 0 auto; width: auto; }
.pl-log td { font-size: 0.82rem; }
.pl-log thead th:last-child { width: 1%; }
.pl-server-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.4rem; align-items: start; }
.pl-col-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 0.2rem; }
.pl-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.8rem; }
@media (max-width: 720px) { .pl-server-cols { grid-template-columns: 1fr; } }
/* Admin: game tabs + sortable tables */
.adm-tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.adm-tabs button { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.adm-tabs button.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.adm-tabs button:hover:not(.active) { color: var(--text); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: ' ↕'; opacity: 0.35; }
th.sortable.asc::after { content: ' ↑'; opacity: 1; color: var(--accent); }
th.sortable.desc::after { content: ' ↓'; opacity: 1; color: var(--accent); }
.pl-log .muted { font-size: 0.75rem; }
.pl-conn { color: var(--text-dim); font-size: 0.7rem; }

/* ── Slot-tier pricing ── */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 1.4rem; }
.tier-card { position: relative; text-align: center; padding: 1.6rem 1.2rem 1.4rem; }
.tier-card .price-tag { margin: 0.5rem 0 0.15rem; }
.tier-featured { border-color: var(--accent); box-shadow: 0 0 42px rgba(79, 141, 255, 0.12); }
.tier-flag {
  position: absolute; top: -0.7rem; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.8rem; border-radius: 999px; white-space: nowrap;
}
.tier-name { font-size: 1.5rem; letter-spacing: -0.01em; }
.tier-seats { color: var(--text-dim); font-size: 0.9rem; }
.tier-yearly { margin-bottom: 1rem; }

/* Home page tier strip */
.tier-strip { display: flex; flex-direction: column; gap: 1.2rem; padding: 1.6rem; align-items: center; }
.tier-strip-row { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; }
.tier-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.7rem 1.1rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-alt); color: var(--text); min-width: 92px;
  transition: border-color 0.15s, transform 0.15s;
}
.tier-chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.tier-chip strong { font-size: 1.05rem; }
.tier-chip-slots { color: var(--text-dim); font-size: 0.72rem; }
.tier-chip-price { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.tier-chip-price em { color: var(--text-dim); font-style: normal; font-weight: 400; font-size: 0.72rem; }

/* Creation form tier picker */
.tier-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem; }
.tier-option { display: block; cursor: pointer; position: relative; }
.tier-option input { position: absolute; opacity: 0; }
.tier-box {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.85rem 0.6rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-alt); transition: border-color 0.15s, background 0.15s;
}
.tier-option:hover .tier-box { border-color: var(--accent); }
.tier-option:has(input:checked) .tier-box { border-color: var(--accent); background: var(--accent-dim); }
.tier-box .tier-label { font-size: 1.15rem; }
.tier-box .tier-slots { color: var(--text-dim); font-size: 0.75rem; }
.tier-box .tier-price { color: var(--accent); font-weight: 700; font-size: 0.95rem; }
.tier-box .tier-price em { color: var(--text-dim); font-style: normal; font-weight: 400; font-size: 0.72rem; }

@media (max-width: 960px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tier-grid { grid-template-columns: 1fr; } }

/* ── Admin view switch + billing email emphasis ── */
.view-switch { display: inline-flex; }
.view-switch-btn { white-space: nowrap; }
.view-as-user {
  background: rgba(251, 191, 36, 0.14); color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.5);
}
.view-as-user:hover { background: rgba(251, 191, 36, 0.24); color: #fcd34d; }
.billing-email-missing { border-color: rgba(248, 113, 113, 0.55); box-shadow: 0 0 32px rgba(248, 113, 113, 0.10); }

/* ── Admin: sub-navigation, attention list, tiles, row actions ── */
.adm-subnav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin: -0.4rem 0 1.4rem; border-bottom: 1px solid var(--border); }
.adm-subnav a { padding: 0.55rem 0.9rem; color: var(--text-dim); font-weight: 600; font-size: 0.9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.adm-subnav a:hover { color: var(--text); }
.adm-subnav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.adm-tiles .stat-card { padding: 1rem 1.1rem; text-align: left; }
.adm-tiles .stat-num { font-size: 1.6rem; }
.stat-sub { font-size: 0.95rem; color: var(--text-dim); font-weight: 600; margin-left: 0.1rem; }
.stat-bad { color: #f87171 !important; }
.adm-ok { color: #4ade80; }
.adm-attention { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.adm-attention li { padding: 0.5rem 0.8rem 0.5rem 1rem; border-radius: 9px; background: var(--surface-2); border-left: 3px solid var(--border); font-size: 0.9rem; }
.adm-attention li a { color: inherit; display: block; }
.adm-attention .lvl-bad { border-left-color: #f87171; color: #ffb4a8; }
.adm-attention .lvl-warn { border-left-color: #fbbf24; color: #fde68a; }
.adm-attention .lvl-info { border-left-color: var(--accent); color: var(--text); }
.adm-servers td { vertical-align: top; }
.adm-actions summary { list-style: none; cursor: pointer; display: inline-flex; }
.adm-actions summary::-webkit-details-marker { display: none; }
.adm-actions-panel { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; padding: 0.7rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; min-width: 320px; }
.adm-actions-panel .inline-form { display: flex; gap: 0.4rem; }
.adm-actions-panel .inline-form input { flex: 1 1 auto; min-width: 0; }

/* ── Network command centre ── */
.nm-host { margin-bottom: 1.5rem; }
.nm-alerts { margin: 0.6rem 0 0.9rem; }
.nm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin: 0.9rem 0 1.2rem; }
.nm-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.1rem; }
.nm-val { font-size: 1.15rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.nm-lbl { font-size: 0.72rem; color: var(--text-dim); }
.nm-h3 { font-size: 0.95rem; margin: 0.4rem 0 0.5rem; }
.nm-h3 .muted { font-weight: 400; font-size: 0.8rem; }
.nm-charts { margin-bottom: 0.8rem; }
.nm-charts .stat-chart { min-width: 420px; }
.net-chart .line-rx { stroke: var(--accent); }
.net-chart .line-tx { stroke: #fb923c; }
.net-chart .line-inet { stroke: var(--accent); }
.net-chart .line-gw { stroke: #4ade80; }
.net-chart .chart-mark { stroke: rgba(248, 113, 113, 0.55); stroke-width: 2; }
.chart-legend { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-dim); margin-top: 0.3rem; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 0.4rem; vertical-align: middle; background: var(--accent); }
.chart-legend i.line-tx { background: #fb923c; }
.chart-legend i.line-gw { background: #4ade80; }
.nm-servers td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nm-servers tr.nm-focus td { background: var(--accent-dim); }
.nm-detail { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.nm-report summary { list-style: none; cursor: pointer; display: inline-flex; }
.nm-report summary::-webkit-details-marker { display: none; }
.nm-report-panel { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; width: min(100%, 720px); }
.nm-report-panel textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 0.78rem; background: #05070b; color: #b7c0d4; border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem; resize: vertical; }
@media (max-width: 900px) { .grid-4.adm-tiles { grid-template-columns: repeat(2, 1fr); } .nm-charts { grid-template-columns: 1fr; } }
