:root {
  --bg: #050505;
  --bg-elevated: #0c0c14;
  --bg-card: #111119;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #2563eb;
  --accent-hover: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.4);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 9999px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Saira", "DM Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; font-weight: 600; font-size: 1rem;
  border-radius: var(--radius); transition: background .2s, transform .2s, box-shadow .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 10px 28px -8px var(--accent-glow); }
.btn-ghost { border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: rgba(255,255,255,.18); color: var(--text); }
.btn-sm { padding: .55rem 1.15rem; font-size: .9rem; }
.btn-danger { border: 1px solid rgba(239,68,68,.35); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,.12); }
.btn-ok { background: rgba(34,197,94,.15); color: var(--ok); border: 1px solid rgba(34,197,94,.3); }
.btn-ok:hover { background: rgba(34,197,94,.25); }

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.5rem; background: rgba(5,5,5,.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand b { color: var(--accent); }
.nav-links { display: none; gap: 1.75rem; }
.nav-links a { font-size: .9rem; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.menu-btn { display: grid; place-items: center; width: 44px; height: 44px; color: var(--text-muted); border-radius: 10px; }
.menu-btn:hover { background: var(--bg-card); color: var(--text); }
.mobile-nav { display: none; flex-direction: column; gap: .25rem; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: .85rem .75rem; color: var(--text-muted); border-radius: 10px; }
.mobile-nav a:hover { background: var(--bg-card); color: var(--text); }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

.hero {
  position: relative; min-height: calc(100svh - 72px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3rem 1.5rem 7rem; overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0 0 auto; height: 55%;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(37,99,235,.18), transparent 70%);
  pointer-events: none;
}
.hero-logo { width: clamp(88px, 18vw, 130px); height: auto; margin-bottom: 1.5rem; position: relative; }
.eyebrow {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.15rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 {
  position: relative; font-size: clamp(2.5rem, 6.5vw, 4.6rem); font-weight: 600;
  line-height: 1.05; letter-spacing: -.03em; max-width: 16ch; margin-bottom: 1.15rem;
}
.hero h1 .grad { color: var(--accent); }
.hero .lead {
  position: relative; max-width: 34rem; color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem); margin-bottom: 1.75rem;
}
.hero-cta { position: relative; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-bottom: .75rem; }
.trust {
  position: relative; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: center;
  margin-top: 1.25rem; font-size: .88rem; color: var(--text-dim);
}
.trust span { display: inline-flex; align-items: center; gap: .35rem; }
.trust svg { color: var(--ok); }
.wave {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%;
  height: clamp(90px, 16vw, 160px); pointer-events: none;
}

.section { padding: clamp(4rem, 10vw, 7rem) 0; }
.section-head { max-width: 36rem; margin-bottom: 2.5rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-label {
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; letter-spacing: -.02em;
  line-height: 1.15; margin-bottom: .75rem;
}
.section-head h2 .grad { color: var(--accent); }
.section-head p { color: var(--text-muted); }
.band { background: var(--bg-elevated); border-block: 1px solid var(--border); }

.feature-grid {
  display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .feature-grid { grid-template-columns: 1fr 1fr 1fr; } }
.feature { background: var(--bg); padding: 1.5rem 1.35rem; }
.feature h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .4rem; }
.feature p { font-size: .92rem; color: var(--text-muted); line-height: 1.55; }

.steps { display: grid; gap: 1.75rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step-n { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); margin-bottom: .6rem; }
.step h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.step p { font-size: .92rem; color: var(--text-muted); }

.stats { display: grid; gap: 1rem; margin: 2rem 0; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat {
  text-align: center; padding: 1.5rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-card);
}
.stat b { display: block; font-size: 2rem; color: var(--accent); letter-spacing: -.03em; }
.stat span { font-size: .85rem; color: var(--text-muted); }

.panel-teaser { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .panel-teaser { grid-template-columns: 1fr 1.05fr; } }
.panel-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.panel-list li { display: flex; gap: .75rem; font-size: .95rem; color: var(--text-muted); }
.panel-list strong { color: var(--text); display: block; }
.check { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }

.console-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(37,99,235,.45);
}
.console-bar {
  display: flex; align-items: center; gap: .45rem; padding: .85rem 1rem;
  border-bottom: 1px solid var(--border); font-size: .75rem; color: var(--text-dim); font-family: var(--font-mono);
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.console-bar i:nth-child(1) { background: #ff5f57; }
.console-bar i:nth-child(2) { background: #febc2e; }
.console-bar i:nth-child(3) { background: #28c840; }
.console-bar span { margin-left: .5rem; flex: 1; }
.console-bar .status { color: var(--ok); font-weight: 600; }
.console-body {
  padding: 1rem 1.1rem; min-height: 9rem; font-family: var(--font-mono);
  font-size: .82rem; line-height: 1.7; color: var(--text-muted);
}
.console-body .ok { color: var(--ok); }
.console-body .blue { color: #60a5fa; }
.console-meters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
  padding: .85rem 1rem 1rem; border-top: 1px solid var(--border);
}
.meter {
  text-align: center; padding: .55rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-card);
}
.meter b { display: block; font-size: .95rem; }
.meter span { font-size: .7rem; color: var(--text-dim); }

.games { display: grid; gap: 1rem; }
@media (min-width: 640px) { .games { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .games { grid-template-columns: repeat(4, 1fr); } }
.game-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem; background: var(--bg-card);
}
.game-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.game-card p { font-size: .88rem; color: var(--text-muted); }

.faq { max-width: 40rem; margin-inline: auto; }
.faq-list { max-width: 640px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--text-dim); font-size: 1.25rem; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 0 1.15rem; color: var(--text-muted); font-size: .95rem; }

.cta-band {
  text-align: center; padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem;
  border: 1px solid rgba(37,99,235,.35); border-radius: 28px; background: rgba(37,99,235,.08);
}
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .75rem; }
.cta-band p { color: var(--text-muted); max-width: 28rem; margin: 0 auto 1.75rem; }

.footer {
  border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: .9rem; color: var(--text-dim);
}
.footer .container { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; }
.footer a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Auth */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 2rem 1.25rem 3rem; }
.auth-card { width: min(420px, 100%); }
.auth-card .logo-center { width: 64px; height: 64px; margin: 0 auto 1.25rem; object-fit: contain; }
.auth-card h1 { text-align: center; font-size: 1.55rem; font-weight: 600; margin-bottom: .4rem; }
.auth-card .hint { text-align: center; font-size: .9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.field { margin-bottom: .85rem; }
.field label { display: block; font-size: .85rem; color: var(--text-dim); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.auth-error { color: #fca5a5; font-size: .9rem; margin-bottom: .75rem; }
.auth-note {
  margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  font-size: .82rem; color: var(--text-dim); line-height: 1.5;
}

/* Dashboard – Pterodactyl style */
.dash {
  display: grid; min-height: 100vh;
}
@media (min-width: 960px) {
  .dash { grid-template-columns: 240px 1fr; }
}
.dash-side {
  background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: 1.15rem .9rem;
}
@media (min-width: 960px) {
  .dash-side { border-bottom: none; border-right: 1px solid var(--border); min-height: 100vh; }
}
.dash-side .brand { margin-bottom: 1.5rem; padding: 0 .4rem; }
.side-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; color: var(--text-dim);
  padding: 0 .5rem; margin: 1rem 0 .4rem;
}
.server-list { display: grid; gap: .2rem; }
.server-item {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; text-align: left; padding: .7rem .7rem; border-radius: 10px;
  font-size: .88rem; color: var(--text-muted);
}
.server-item:hover, .server-item.active { background: var(--bg-card); color: var(--text); }
.server-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }
.server-item .dot.on { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.5); }
.side-nav a {
  display: block; padding: .6rem .7rem; border-radius: 10px; font-size: .88rem; color: var(--text-muted);
}
.side-nav a:hover, .side-nav a.active { background: var(--bg-card); color: var(--text); }

.dash-main { padding: 1.35rem 1.15rem 2.5rem; }
@media (min-width: 960px) { .dash-main { padding: 1.5rem 1.75rem 2.5rem; } }
.dash-top {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.dash-top h1 { font-size: 1.3rem; font-weight: 600; }
.dash-top .meta { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }
.power-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem; }

.tabs {
  display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem;
}
.tab {
  padding: .7rem 1rem; font-size: .88rem; color: var(--text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.15rem; margin-bottom: 1rem;
}
.card h3 { font-size: 1rem; margin-bottom: .75rem; }
.meters-grid {
  display: grid; gap: .75rem;
}
@media (min-width: 640px) { .meters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .meters-grid { grid-template-columns: repeat(4, 1fr); } }
.meter-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 1rem;
}
.meter-box span { font-size: .75rem; color: var(--text-dim); }
.meter-box b { display: block; font-size: 1.15rem; margin: .25rem 0 .5rem; }
.bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.console-box {
  background: #0a0a0f; border: 1px solid var(--border); border-radius: 12px;
  min-height: 280px; max-height: 420px; overflow: auto;
  font-family: var(--font-mono); font-size: .8rem; line-height: 1.65;
  padding: 1rem; color: var(--text-muted); white-space: pre-wrap;
}
.console-input-row {
  display: flex; gap: .5rem; margin-top: .75rem;
}
.console-input-row input {
  flex: 1; padding: .7rem .9rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; outline: none; font-family: var(--font-mono); font-size: .85rem;
}
.console-input-row input:focus { border-color: var(--accent); }

.file-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.file-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.file-table th {
  text-align: left; padding: .55rem .65rem; color: var(--text-dim); font-weight: 500;
  border-bottom: 1px solid var(--border); font-size: .78rem;
}
.file-table td {
  padding: .65rem; border-bottom: 1px solid var(--border); color: var(--text-muted);
}
.file-table tr:hover td { background: rgba(255,255,255,.02); color: var(--text); }
.file-table .name { color: var(--text); font-weight: 500; }

.startup-list { display: grid; gap: .75rem; }
.startup-item {
  display: grid; gap: .35rem; padding: .9rem 1rem; border: 1px solid var(--border);
  border-radius: 12px; background: var(--bg);
}
.startup-item label { font-size: .8rem; color: var(--text-dim); }
.startup-item code {
  font-family: var(--font-mono); font-size: .85rem; color: var(--text);
  word-break: break-all;
}

.sftp-grid { display: grid; gap: .75rem; }
@media (min-width: 640px) { .sftp-grid { grid-template-columns: 1fr 1fr; } }
.sftp-grid .field { margin: 0; }

.empty-state {
  padding: 2.5rem 1rem; text-align: center; color: var(--text-dim);
  border: 1px dashed var(--border); border-radius: var(--radius-md);
}

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: .75rem 1.25rem; border-radius: var(--radius); font-size: .9rem; z-index: 100;
  transition: transform .25s ease; box-shadow: 0 12px 40px -12px rgba(0,0,0,.6);
}
.toast.show { transform: translateX(-50%) translateY(0); }

.connect-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .85rem 1rem; margin-bottom: 1.25rem; border-radius: 12px;
  border: 1px solid rgba(37,99,235,.35); background: rgba(37,99,235,.08);
  font-size: .88rem; color: var(--text-muted);
}
.connect-banner strong { color: var(--text); }

/* ========== Auth ========== */
.auth-page { min-height: 100vh; }
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.25rem 4rem; min-height: calc(100vh - 72px);
}
.auth-card {
  width: min(420px, 100%); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; box-shadow: 0 24px 60px -30px rgba(0,0,0,.7);
}
.auth-card .logo-center { width: 56px; height: 56px; margin: 0 auto 1.25rem; object-fit: contain; }
.auth-card h1 { font-size: 1.45rem; font-weight: 600; text-align: center; letter-spacing: -.02em; margin-bottom: .4rem; }
.auth-card .hint { color: var(--text-muted); font-size: .9rem; text-align: center; margin-bottom: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .9rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field-hint { font-size: .75rem; color: var(--text-dim); margin-top: .3rem; }
.auth-error { color: #fca5a5; font-size: .85rem; margin-bottom: .75rem; }
.auth-note {
  margin-top: 1.25rem; padding: .9rem 1rem; font-size: .8rem; color: var(--text-muted);
  background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2); border-radius: 12px; line-height: 1.5;
}

/* ========== Dashboard layout ========== */
.dashboard-body { overflow: hidden; height: 100vh; }
.dash-layout { display: flex; height: 100vh; }
.dash-side {
  width: 260px; flex-shrink: 0; background: var(--bg-elevated);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 1rem .85rem; overflow-y: auto;
}
.dash-side .brand { margin-bottom: 1rem; padding: 0 .35rem; }
.side-meta { display: flex; gap: .4rem; margin-bottom: 1rem; padding: 0 .35rem; flex-wrap: wrap; }
.live-pill {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3);
}
.live-pill.live { background: rgba(34,197,94,.15); color: #4ade80; border-color: rgba(34,197,94,.3); }
.role-badge {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(37,99,235,.15); color: #93c5fd; border: 1px solid rgba(37,99,235,.3);
}
.side-label {
  font-size: .65rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); margin: .75rem .35rem .4rem;
}
.server-list { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .5rem; }
.server-item {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.server-item:hover { background: var(--bg-card); }
.server-item.active { background: rgba(37,99,235,.12); border-color: rgba(37,99,235,.35); }
.server-item .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-dim);
}
.server-item .dot.on { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.5); }
.server-item .dot.off { background: var(--danger); }
.server-item .meta { min-width: 0; }
.server-item .meta b { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-item .meta span { font-size: .72rem; color: var(--text-dim); }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-nav button {
  text-align: left; padding: .6rem .75rem; border-radius: 10px;
  color: var(--text-muted); font-size: .9rem; transition: background .15s, color .15s;
}
.side-nav button:hover { background: var(--bg-card); color: var(--text); }
.side-nav button.active { background: rgba(37,99,235,.15); color: #93c5fd; }
.side-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .25rem .35rem; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0;
}

.dash-main { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem 2rem; background: var(--bg); }
.dash-top {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.dash-top h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.dash-sub { font-size: .85rem; color: var(--text-muted); }
.power-btns { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.dash-banner {
  margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 12px; font-size: .85rem;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: #fcd34d;
}
.dash-banner.live { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); color: #86efac; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}
.stat-card b { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.stat-card span { font-size: .75rem; color: var(--text-dim); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem; margin-bottom: 1rem;
}
.card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.card .sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }

.bars { display: flex; flex-direction: column; gap: .85rem; margin-top: 1rem; }
.bar-row { display: grid; grid-template-columns: 48px 1fr auto; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-row span { color: var(--text-muted); }
.bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #22d3ee); border-radius: 999px; transition: width .4s; }
.bar-row b { font-size: .8rem; color: var(--text-muted); font-weight: 500; min-width: 110px; text-align: right; }

.owner-form { display: grid; gap: .75rem; max-width: 360px; }

/* Console full */
.console-card.full { margin: 0; }
.console-card.full .console-body {
  height: min(52vh, 480px); overflow-y: auto; font-family: var(--font-mono);
  font-size: .82rem; line-height: 1.55; padding: 1rem 1.1rem;
  background: #0a0a10;
}
.console-card.full .console-body .blue { color: #60a5fa; }
.console-card.full .console-body .ok { color: #4ade80; }
.console-card.full .console-body .err { color: #f87171; }
.console-card.full .console-body .dim { color: #64748b; }
.console-input {
  display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); background: var(--bg-elevated);
}
.console-input input {
  flex: 1; padding: .6rem .85rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; font-family: var(--font-mono); font-size: .85rem; outline: none;
}
.console-input input:focus { border-color: var(--accent); }

/* Files */
.files-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; min-height: 420px; }
@media (max-width: 800px) { .files-layout { grid-template-columns: 1fr; } }
.files-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.file-list { display: flex; flex-direction: column; gap: .15rem; max-height: 400px; overflow-y: auto; }
.file-item {
  display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem;
  border-radius: 8px; cursor: pointer; font-size: .85rem; color: var(--text-muted);
}
.file-item:hover, .file-item.active { background: rgba(37,99,235,.12); color: var(--text); }
.file-item .icon { opacity: .7; font-size: .9rem; }
.files-editor textarea {
  width: 100%; min-height: 360px; background: #0a0a10; border: 1px solid var(--border);
  border-radius: 10px; padding: .85rem; font-family: var(--font-mono); font-size: .82rem;
  line-height: 1.5; resize: vertical; outline: none; color: #e2e8f0;
}
.files-editor textarea:focus { border-color: var(--accent); }

.vars { display: flex; flex-direction: column; gap: .6rem; }
.var-row { display: grid; grid-template-columns: 120px 1fr; gap: .75rem; align-items: center; }
.var-row label { font-size: .8rem; color: var(--text-muted); }
.var-row input {
  padding: .55rem .75rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; outline: none; font-family: var(--font-mono); font-size: .85rem;
}

@media (max-width: 900px) {
  .dash-side {
    position: fixed; inset: 0 auto 0 0; z-index: 40; transform: translateX(-100%);
    transition: transform .25s; width: 280px;
  }
  .dash-side.open { transform: translateX(0); }
  .dash-main { padding: 1rem; }
  .power-btns { width: 100%; margin-left: 0; }
}

/* Existing console-card (landing) keep working */
.console-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 20px 50px -25px rgba(0,0,0,.6);
}
.console-bar {
  display: flex; align-items: center; gap: .4rem; padding: .65rem 1rem;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border); font-size: .8rem;
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.console-bar i:nth-child(1) { background: #ef4444; }
.console-bar i:nth-child(2) { background: #f59e0b; }
.console-bar i:nth-child(3) { background: #22c55e; }
.console-bar span { margin-left: .5rem; color: var(--text-muted); flex: 1; }
.console-bar .status { font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: rgba(34,197,94,.15); color: #4ade80; }
.console-body { padding: 1rem 1.1rem; font-family: var(--font-mono); font-size: .82rem; line-height: 1.55; min-height: 140px; }
.console-body .blue { color: #60a5fa; }
.console-body .ok { color: #4ade80; }
.console-meters { display: flex; gap: 1.25rem; padding: .75rem 1.1rem; border-top: 1px solid var(--border); background: var(--bg-elevated); }
.meter b { display: block; font-size: .95rem; }
.meter span { font-size: .7rem; color: var(--text-dim); }

/* Landing extras already present – ensure footer etc */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { font-size: .85rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: .85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.cta-section { padding-bottom: 4rem; }
.center { text-align: center; }

/* Extra aliases for dashboard v2 */
.console-input-row {
  display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); background: var(--bg-elevated);
}
.console-input-row input {
  flex: 1; padding: .6rem .85rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; font-family: var(--font-mono); font-size: .85rem; outline: none;
}
.console-input-row input:focus { border-color: var(--accent); }
.file-tree h2, .file-editor h2 { font-size: 1rem; margin-bottom: .75rem; }
.file-editor-top {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem;
}
.file-editor-top span { font-family: var(--font-mono); font-size: .85rem; color: var(--text-muted); }
.file-editor textarea {
  width: 100%; min-height: 360px; background: #0a0a10; border: 1px solid var(--border);
  border-radius: 10px; padding: .85rem; font-family: var(--font-mono); font-size: .82rem;
  line-height: 1.5; resize: vertical; outline: none; color: #e2e8f0;
}
.file-editor textarea:focus { border-color: var(--accent); }
.file-toast {
  margin-top: .5rem; font-size: .8rem; color: var(--ok);
}
.owner-form { display: grid; gap: .85rem; max-width: 360px; margin-top: 1rem; }
.owner-form .field label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .3rem; }
.owner-form input, .owner-form select {
  width: 100%; padding: .55rem .75rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; outline: none;
}
.owner-form input:focus, .owner-form select:focus { border-color: var(--accent); }
.side-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.live-pill {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(100,116,139,.2); color: var(--text-dim);
}
.live-pill.live { background: rgba(34,197,94,.15); color: #4ade80; }
.role-badge {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(37,99,235,.15); color: #93c5fd;
}
.dash-banner {
  margin-bottom: 1.25rem; padding: .75rem 1rem; border-radius: 12px;
  background: rgba(100,116,139,.12); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted);
}
.dash-banner.live {
  background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.25); color: #86efac;
}
.power-btns { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem; text-align: center;
}
.stat-card b { display: block; font-size: 1.25rem; font-weight: 600; }
.stat-card span { font-size: .75rem; color: var(--text-dim); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem;
}
.card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: .35rem; }
.card .sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.bars { display: grid; gap: .85rem; }
.bar-row { display: grid; grid-template-columns: 48px 1fr auto; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-row span { color: var(--text-muted); }
.bar { height: 8px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #22d3ee); border-radius: 999px; transition: width .4s; }
.bar-row b { font-size: .8rem; color: var(--text-muted); min-width: 7rem; text-align: right; }
.server-item {
  display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem;
  border-radius: 10px; cursor: pointer; margin-bottom: .25rem;
}
.server-item:hover { background: rgba(255,255,255,.04); }
.server-item.active { background: rgba(37,99,235,.15); }
.server-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.server-item .dot.on { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.5); }
.server-item .dot.off { background: #64748b; }
.server-item .meta b { display: block; font-size: .85rem; }
.server-item .meta span { font-size: .72rem; color: var(--text-dim); }
.side-label {
  font-size: .65rem; font-weight: 600; letter-spacing: .08em; color: var(--text-dim);
  margin: 1.25rem 0 .4rem; padding: 0 .25rem;
}
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-nav button {
  text-align: left; padding: .6rem .75rem; border-radius: 10px;
  font-size: .9rem; color: var(--text-muted);
}
.side-nav button:hover { background: rgba(255,255,255,.04); color: var(--text); }
.side-nav button.active { background: rgba(37,99,235,.15); color: #93c5fd; }
.side-footer { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.dash-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.dash-side {
  background: var(--bg-elevated); border-right: 1px solid var(--border);
  padding: 1.25rem 1rem; display: flex; flex-direction: column;
}
.dash-main { padding: 1.25rem 1.5rem; }
.dash-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
}
.dash-top h1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.dash-sub { font-size: .85rem; color: var(--text-muted); }
.dashboard-body { overflow-x: hidden; }
.tab-panel[hidden] { display: none !important; }

/* ===== Hunari-style footer ===== */
.footer-mega {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 0;
  position: relative;
  overflow: hidden;
}
.footer-mega::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 280px;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(37,99,235,.08), transparent 70%);
  pointer-events: none;
}
.footer-mega-grid {
  display: grid;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .footer-mega-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}
.footer-brand-col p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
  margin: 1rem 0 1.25rem;
  max-width: 22rem;
}
.footer-cta-stack { display: flex; flex-direction: column; gap: .55rem; max-width: 16rem; }
.footer-cta-stack .btn { justify-content: center; }
.footer-contact-chips { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.25rem; max-width: 16rem; }
.footer-chip {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .85rem;
  color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.footer-chip:hover { border-color: rgba(37,99,235,.4); color: var(--text); }
.footer-chip svg { flex-shrink: 0; opacity: .7; }
.footer-col h4 {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: .45rem; }
.footer-col a {
  font-size: .9rem;
  color: var(--text-muted);
  transition: color .15s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 3rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.15rem;
  font-size: .8rem;
}
.footer-legal a { color: var(--text-dim); }
.footer-legal a:hover { color: var(--text-muted); }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  font-size: .8rem;
  color: var(--text-dim);
}
.perf-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid rgba(37,99,235,.45);
  background: rgba(37,99,235,.1);
  color: #93c5fd;
  border-radius: 8px;
  transition: background .2s, color .2s, border-color .2s;
}
.perf-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.perf-toggle[data-state="on"] {
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.1);
  color: #86efac;
}
.perf-toggle[data-state="off"] {
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
}

/* Reduce motion globally when performance mode is on */
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
html.reduce-motion .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ===== Site animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.25); }
  50% { box-shadow: 0 0 28px 2px rgba(37,99,235,.2); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.anim-hero > * {
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}
.anim-hero > *:nth-child(1) { animation-delay: .05s; }
.anim-hero > *:nth-child(2) { animation-delay: .15s; }
.anim-hero > *:nth-child(3) { animation-delay: .25s; }
.anim-hero > *:nth-child(4) { animation-delay: .35s; }
.anim-hero > *:nth-child(5) { animation-delay: .45s; }

.float-card { animation: floatY 5s ease-in-out infinite; }
.glow-pulse { animation: pulseGlow 3.5s ease-in-out infinite; }

.pillar, .process-step, .status-card, .console-card {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.pillar:hover, .process-step:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 16px 40px -24px rgba(37,99,235,.35);
}

html.reduce-motion .anim-hero > *,
html.reduce-motion .float-card,
html.reduce-motion .glow-pulse {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Shared legal / subpage layout */
.page-hero {
  padding: 2.5rem 0 1rem;
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: .4rem;
}
.page-hero .sub {
  color: var(--text-muted);
  font-size: 1rem;
}
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  margin-bottom: 1rem;
  transition: border-color .2s, transform .2s;
}
.legal-card:hover { border-color: rgba(37,99,235,.25); }
.legal-card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .75rem;
}
.legal-card p, .legal-card li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
}
.legal-card ul { padding-left: 1.1rem; }
.legal-card li { list-style: disc; margin-bottom: .35rem; }
.legal-card a { color: var(--accent); }

/* Auth page polish */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(37,99,235,.14), transparent 55%),
    var(--bg);
}
.auth-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.65);
  animation: fadeUp .55s ease both;
}
.auth-card .logo-center {
  width: 64px; height: 64px; margin: 0 auto 1.25rem; object-fit: contain;
}
.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .5rem;
}
.auth-card .hint {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.auth-note {
  margin-top: 1.25rem;
  padding: .9rem 1rem;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.2);
  border-radius: 12px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.field input {
  width: 100%;
  padding: .7rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: var(--accent); }
.auth-error {
  color: #fca5a5;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.section-label-row {
  display: flex; align-items: center; gap: .65rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.section-label-row::before {
  content: ""; width: 20px; height: 2px; background: var(--accent);
}


/* Hunari-matched fonts */
html, body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-weight: 600;
  letter-spacing: -0.05em;
}
h2, h3 {
  font-family: "Saira", "DM Sans", system-ui, sans-serif !important;
  font-weight: 800;
  letter-spacing: -0.03em;
}
h2 { font-weight: 900; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: "Saira", "DM Sans", system-ui, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  font-size: 1.05rem;
}
.brand img { width: 28px; height: 28px; object-fit: contain; margin-right: 0.1rem; }
.brand b { font-weight: 800 !important; margin-left: 0; letter-spacing: -0.04em; }
