/* ── Design tokens ─────────────────────────────────────── */
:root {
  --bg:      #0a0b0d;
  --panel:   #0c0d10;
  --border:  #15181e;
  --red:     #ff3b3b;
  --green:   #35d07f;
  --dim:     #565c66;
  --muted:   #6b7079;
  --text:    #aab0ba;
  --white:   #e6e8ec;
  --mono:    'JetBrains Mono', monospace;
  --sans:    'Space Grotesk', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #22262e; }
::-webkit-scrollbar-thumb:hover { background: #2c313a; }
::selection { background: rgba(255,59,59,.28); color: #fff; }

/* ── Animations ────────────────────────────────────────── */
@keyframes thpulse  { 0%,100%{opacity:.35} 50%{opacity:1} }
@keyframes thblink  { 0%,49%{opacity:1} 50%,100%{opacity:0} }
@keyframes thscan   { 0%{transform:translateY(-100%)} 100%{transform:translateY(2400%)} }
@keyframes thgrid   { from{background-position:0 0,0 0} to{background-position:46px 46px,46px 46px} }
@keyframes thglow   { 0%,100%{box-shadow:0 0 14px rgba(255,59,59,.45)} 50%{box-shadow:0 0 28px rgba(255,59,59,.85)} }
@keyframes thfadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes thfadeIn { from{opacity:0} to{opacity:1} }
@keyframes thfill   { from{transform:scaleX(0)} to{transform:scaleX(1)} }
@keyframes thsweep  { 0%{left:-30%} 100%{left:130%} }
@media (prefers-reduced-motion:reduce){*{animation:none!important}}

/* ── STATUS TICKER ─────────────────────────────────────── */
.ticker {
  display: flex; align-items: center; gap: 18px; height: 30px; padding: 0 24px;
  background: #070809; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  overflow: hidden; white-space: nowrap;
}
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: thpulse 1.6s infinite; }
.ticker-sep { color: #2a2e36; }

/* ── NAV ───────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 62px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,11,13,.86);
  backdrop-filter: blur(12px);
  gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: #fff;
  cursor: pointer; background: none; border: none; padding: 0; flex-shrink: 0;
}
.nav-logo-icon {
  position: relative; width: 22px; height: 22px; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  animation: thglow 3s ease-in-out infinite; flex-shrink: 0;
}
.nav-logo-icon::after {
  content: ''; width: 8px; height: 8px; background: var(--bg);
}
.nav-logo span { color: var(--red); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: #7c828c;
  cursor: pointer; transition: color .15s; letter-spacing: .02em;
  border-bottom: 2px solid transparent; padding: 8px 0; white-space: nowrap;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); border-bottom-color: var(--red); }
.nav-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.nav-user-badge {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #23272f; color: var(--muted);
  font-size: 13px; font-weight: 500; padding: 8px 14px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.nav-user-badge:hover { border-color: #33373f; color: #fff; }
.nav-user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
@media(max-width:640px){
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
}
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; font-size: 13px; font-weight: 600; transition: all .15s;
  font-family: var(--sans);
}
.btn-ghost { border: 1px solid #23272f; color: var(--text); }
.btn-ghost:hover { border-color: #33373f; color: var(--white); }
.btn-red { background: var(--red); border: 1px solid var(--red); color: #fff; box-shadow: 0 0 18px rgba(255,59,59,.3); }
.btn-red:hover { background: #ff5050; }
.btn-green { background: var(--green); color: var(--bg); }
.btn-green:hover { filter: brightness(1.1); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: #0e0a0b; border: 1px solid #2a1416; color: #ff7a7a; }
.btn-danger:hover { border-color: #3a1c1f; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(1100px 560px at 72% -8%, rgba(255,59,59,.12), transparent 58%), var(--bg);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#ffffff09 1px,transparent 1px), linear-gradient(90deg,#ffffff09 1px,transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(900px 500px at 70% 0, #000, transparent 75%);
  animation: thgrid 9s linear infinite;
}
.hero-scan {
  position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg, rgba(255,59,59,.10), transparent);
  animation: thscan 7s linear infinite;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 96px 24px 104px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid #2a1416; background: #140d0e;
  padding: 6px 13px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; color: #ff7a7a; margin-bottom: 30px;
}
.hero-badge-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; animation: thpulse 1.6s infinite; }
.hero h1 {
  margin: 0; font-size: clamp(36px,5vw,66px); line-height: 1.02;
  font-weight: 700; letter-spacing: -.025em; max-width: 780px;
  color: var(--white);
}
.hero h1 em { color: var(--red); font-style: normal; text-shadow: 0 0 40px rgba(255,59,59,.35); }
.hero-sub {
  margin: 26px 0 0; max-width: 540px; font-size: 18px; line-height: 1.6; color: #9aa0aa;
}
.hero-ctas { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 34px; margin-top: 54px; flex-wrap: wrap;
}
.hero-stat-val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.hero-stat-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-top: 5px; }

/* ── FEATURES ──────────────────────────────────────────── */
.section { padding: 84px 24px; max-width: 1180px; margin: 0 auto; }
.section-label { font-family: var(--mono); font-size: 12px; color: #ff5c5c; letter-spacing: .14em; margin-bottom: 14px; }
.section-title { font-size: clamp(26px,3vw,36px); font-weight: 700; color: var(--white); letter-spacing: -.02em; max-width: 620px; }
.section-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 46px; flex-wrap: wrap; }
.feature-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  margin-top: 50px;
}
@media(max-width:700px){ .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: #0c0d10; padding: 30px 28px; min-height: 188px;
  position: relative; transition: background .2s, transform .2s;
}
.feature-card:hover { background: #0f1115; transform: translateY(-3px); }
.feature-tag { font-family: var(--mono); font-size: 11px; color: #ff5c5c; margin-bottom: 18px; }
.feature-card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--white); }
.feature-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #878d97; }

/* ── PLANS ─────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media(max-width:860px){ .plans-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px){ .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
  position: relative; background: #0c0d10; border: 1px solid #16191f;
  padding: 26px 24px; overflow: hidden;
  transition: transform .2s, border-color .2s; cursor: pointer;
}
.plan-card:hover { transform: translateY(-4px); border-color: #33373f; }
.plan-card.featured { background: #0e0a0b; border-color: #2a1416; }
.plan-card.selected { border-color: var(--red); box-shadow: 0 0 22px rgba(255,59,59,.18); }
.plan-featured-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--red); box-shadow: 0 0 16px rgba(255,59,59,.6);
}
.plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.plan-name { font-size: 18px; font-weight: 600; color: var(--white); }
.plan-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  border: 1px solid #23272f; padding: 3px 7px; color: var(--muted);
}
.plan-card.featured .plan-tag { color: #ff7a7a; border-color: #2a1416; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 22px; }
.plan-price-val { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.plan-price-per { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.plan-specs {
  display: flex; flex-direction: column; gap: 11px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  border-top: 1px solid #16191f; padding-top: 18px;
}
.plan-spec-row { display: flex; align-items: center; gap: 6px; }
.plan-spec-row span:first-child { color: #ff5c5c; }
.plan-btn {
  display: block; width: 100%; margin-top: 22px;
  border: 1px solid #23272f; color: #fff;
  font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 11px; cursor: pointer;
  transition: all .15s;
}
.plan-card.featured .plan-btn { background: var(--red); border-color: var(--red); box-shadow: 0 0 18px rgba(255,59,59,.3); }
.plan-card.featured .plan-btn:hover { background: #ff5050; }
.plan-btn:not(.plan-card .featured .plan-btn):hover { border-color: #33373f; }

/* ── CTA SECTION ───────────────────────────────────────── */
.cta-section {
  border-top: 1px solid var(--border); position: relative; overflow: hidden;
  background: radial-gradient(700px 340px at 50% 120%, rgba(255,59,59,.14), transparent 60%), var(--bg);
}
.cta-inner { max-width: 760px; margin: 0 auto; padding: 96px 24px; text-align: center; }
.cta-inner h2 { font-size: clamp(28px,4vw,42px); font-weight: 700; letter-spacing: -.025em; color: var(--white); }
.cta-inner p { margin: 20px auto 36px; max-width: 480px; font-size: 17px; color: #9aa0aa; line-height: 1.6; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-wrap { max-width: 880px; margin: 0 auto; padding: 74px 24px 100px; }
.faq-list { border: 1px solid #16191f; }
.faq-item { border-bottom: 1px solid #16191f; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; background: none; border: none; cursor: pointer; text-align: left;
  padding: 22px 24px; color: var(--white); font-family: var(--sans); font-size: 16.5px; font-weight: 500;
  transition: background .15s;
}
.faq-q:hover { background: #0d0f12; }
.faq-sign { font-family: var(--mono); font-size: 20px; color: #ff5c5c; line-height: 1; flex-shrink: 0; }
.faq-a { padding: 0 24px 24px; font-size: 15px; line-height: 1.7; color: #9aa0aa; max-width: 680px; }

/* ── STATIC PAGES ──────────────────────────────────────── */
.prose { max-width: 820px; margin: 0 auto; padding: 74px 24px 100px; }
.prose .page-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: #ff5c5c; margin-bottom: 14px; }
.prose h1 { font-size: 44px; font-weight: 700; letter-spacing: -.025em; color: var(--white); margin-bottom: 12px; }
.prose .meta { font-family: var(--mono); font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.prose h2 { font-size: 18px; font-weight: 600; color: var(--white); margin: 36px 0 10px; }
.prose p, .prose li { font-size: 15px; color: #9aa0aa; line-height: 1.75; margin-bottom: 12px; }
.prose ul { padding-left: 20px; }
.prose li { list-style: disc; }
.prose strong { color: var(--text); }

/* Rules boxes */
.rules-box { border: 1px solid var(--border); background: #0c0d10; padding: 22px 24px; margin-bottom: 14px; }
.rules-box.allowed { }
.rules-box.prohibited { border-color: #2a1416; background: #0e0a0b; }
.rules-box-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rules-box-dot { width: 8px; height: 8px; }
.rules-box h3 { margin: 0; font-size: 18px; font-weight: 600; }
.rules-box.allowed h3 { color: var(--green); }
.rules-box.prohibited h3 { color: #ff5c5c; }
.rules-row { display: flex; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--text); line-height: 1.5; }
.rules-row .prefix { font-family: var(--mono); }
.rules-box.allowed .prefix { color: var(--green); }
.rules-box.prohibited .prefix { color: #ff5c5c; }

/* Terms sections */
.terms-section { margin-bottom: 30px; }
.terms-section h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--white); display: flex; gap: 12px; align-items: baseline; }
.terms-num { font-family: var(--mono); font-size: 13px; color: #ff5c5c; }
.terms-body { margin: 0; font-size: 15px; line-height: 1.75; color: #9aa0aa; padding-left: 34px; }

/* ── AUTH ──────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: relative; overflow: hidden; }
.auth-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#ffffff09 1px,transparent 1px),linear-gradient(90deg,#ffffff09 1px,transparent 1px);
  background-size: 46px 46px;
}
.auth-box { background: var(--panel); border: 1px solid var(--border); padding: 36px 32px; width: 380px; position: relative; animation: thfadeUp .3s ease; }
.auth-logo { font-family: var(--sans); font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.auth-logo span { color: var(--red); }
.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

/* ── FOOTER ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); background: #08090b; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-logo { display: flex; align-items: center; gap: 11px; }
.footer-logo-icon { width: 18px; height: 18px; background: var(--red); display: flex; align-items: center; justify-content: center; }
.footer-logo-icon::after { content: ''; width: 7px; height: 7px; background: var(--bg); }
.footer-brand { font-weight: 600; font-size: 14px; color: var(--white); }
.footer-brand span { color: var(--red); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: 8px; }
.footer-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 12px; }
.footer-links button { background: none; border: none; color: #878d97; cursor: pointer; font-family: inherit; font-size: inherit; transition: color .15s; }
.footer-links button:hover { color: #fff; }
.footer-status { color: var(--green); }

/* ── DASHBOARD LAYOUT ──────────────────────────────────── */
.dash { display: flex; flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; min-height: calc(100vh - 62px); }
.sidebar {
  width: 236px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 26px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto;
}
.sidebar-section { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--dim); padding: 0 14px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; font-size: 14px; font-weight: 500;
  color: #888e98; cursor: pointer; transition: all .12s;
  border-left: 2px solid transparent; border: none; width: 100%; text-align: left;
  background: transparent;
}
.nav-item:hover { color: var(--white); }
.nav-item.active { color: var(--white); background: #15181e; border-left: 2px solid var(--red); }
.nav-item .num { font-family: var(--mono); font-size: 11px; color: #ff5c5c; }
.sidebar-bottom { margin-top: auto; }
.user-card { border: 1px solid #16191f; background: #0c0d10; padding: 14px; border-radius: 6px; }
.user-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: thpulse 1.8s infinite; }
.user-name  { font-size: 13px; font-weight: 600; color: var(--white); }
.user-meta  { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.6; }
.dash-content { flex: 1; min-width: 0; padding: 32px 36px; }
@media(max-width:700px){ .dash { flex-direction: column; } .sidebar { position: static; width: 100%; height: auto; } .dash-content { padding: 20px; } }
.page-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: #ff5c5c; margin-bottom: 10px; }
.page-title { font-size: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--white); margin-bottom: 6px; }
.page-sub   { font-size: 15px; color: #878d97; margin-bottom: 34px; }

/* ── INSTANCES (dashboard) ─────────────────────────────── */
.instances-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.instances-grid { display: flex; flex-direction: column; gap: 10px; }
.instance-card {
  border: 1px solid var(--border); background: var(--panel); padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; cursor: pointer;
  transition: border-color .15s;
}
.instance-card:hover { border-color: #33373f; }
.instance-card.selected { border-color: var(--red); }
.inst-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.inst-status.running { background: var(--green); box-shadow: 0 0 8px rgba(53,208,127,.6); animation: thpulse 2s infinite; }
.inst-status.off, .inst-status.stopped { background: var(--dim); }
.inst-status.initializing, .inst-status.migrating { background: #f59e0b; animation: thpulse 1s infinite; }
.inst-info { flex: 1; min-width: 0; }
.inst-name { font-size: 14px; font-weight: 600; color: var(--white); }
.inst-meta { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.inst-ip   { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.inst-metrics { display: flex; gap: 20px; text-align: right; }
.metric-val { font-size: 14px; font-weight: 600; color: var(--white); font-family: var(--mono); }
.metric-lbl { font-size: 11px; color: var(--muted); }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.empty-sub   { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* ── BUY PAGE ──────────────────────────────────────────── */
.buy-section-label { font-size: 14px; font-family: var(--mono); letter-spacing: .1em; color: var(--text); margin: 0 0 16px; }
.builder-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
@media(max-width:860px){ .builder-wrap { grid-template-columns: 1fr; } }
.builder-panel { border: 1px solid #16191f; background: #0c0d10; padding: 28px; }
.builder-row { margin-bottom: 30px; }
.builder-label { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 14px; font-weight: 500; color: var(--white); }
.builder-val { font-family: var(--mono); font-size: 14px; color: #ff5c5c; }
.slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 0; background: #22262e; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; background: var(--red);
  border: 2px solid var(--bg); cursor: pointer; box-shadow: 0 0 0 1px var(--red);
}
.slider::-moz-range-thumb { width: 16px; height: 16px; background: var(--red); border: 2px solid var(--bg); cursor: pointer; border-radius: 0; }
.select-field { width: 100%; background: var(--bg); border: 1px solid #23272f; color: var(--white); padding: 10px 12px; font-family: var(--sans); font-size: 14px; cursor: pointer; }
.select-field:focus { outline: 1px solid #33373f; }
.builder-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.builder-sub-label { font-size: 13px; color: #878d97; margin-bottom: 8px; font-family: var(--mono); }

/* Order summary */
.summary-panel { border: 1px solid #2a1416; background: #0c0d10; padding: 26px; position: sticky; top: 84px; }
.summary-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #ff5c5c; margin-bottom: 18px; }
.summary-lines { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; color: var(--text); font-family: var(--mono); border-bottom: 1px solid #16191f; padding-bottom: 18px; margin-bottom: 18px; }
.summary-line { display: flex; justify-content: space-between; }
.summary-line .val { color: #fff; }
.billing-toggle { display: flex; gap: 0; border: 1px solid #23272f; margin-bottom: 18px; }
.billing-btn { flex: 1; background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 10px; color: #878d97; transition: all .15s; }
.billing-btn.active { background: var(--red); color: #fff; }
.summary-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.summary-total .lbl { font-size: 14px; color: #878d97; }
.summary-total .price { font-size: 32px; font-weight: 700; color: #fff; }
.summary-total .per { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pay-label { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.pay-btn {
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; padding: 12px;
  font-family: var(--sans); color: var(--white); align-items: flex-start;
  border: 1px solid #23272f; background: var(--bg); transition: all .15s;
}
.pay-btn.active { border-color: var(--red); background: #0e0a0b; }
.pay-btn .name { font-weight: 600; font-size: 14px; }
.pay-btn .sub { font-size: 11px; font-family: var(--mono); color: var(--muted); }
.summary-provision { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 12px; }

/* ── SERVER CONFIG ─────────────────────────────────────── */
.instance-switcher { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #16191f; }
.switcher-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--dim); margin-right: 6px; }
.instance-pill {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 8px 14px; border: 1px solid #23272f; color: #9aa0aa;
  background: transparent; transition: border-color .15s, color .15s, background .15s;
}
.instance-pill.active { background: #15181e; border-color: var(--red); color: #fff; }
.instance-pill:hover { border-color: #33373f; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-dot.on { background: var(--green); }
.pill-dot.off { background: var(--red); }
.new-pill {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 8px 14px; color: #fff; background: transparent;
  border: 1px dashed #33373f; transition: border-color .15s, color .15s;
}
.new-pill:hover { border-color: var(--red); color: #ff7a7a; }
.config-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.config-name { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--white); display: flex; align-items: center; gap: 14px; }
.power-badge { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 4px 11px; border: 1px solid; }
.power-badge.on { border-color: #16321f; color: var(--green); }
.power-badge.off { border-color: #2a1416; color: #ff7a7a; }
.power-dot { width: 7px; height: 7px; border-radius: 50%; }
.power-dot.on { background: var(--green); animation: thpulse 1.8s infinite; }
.power-dot.off { background: var(--red); }
.config-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.config-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.config-tabs { display: flex; gap: 4px; border-bottom: 1px solid #16191f; margin-bottom: 26px; }
.config-tab {
  background: none; border: none; cursor: pointer; font-family: var(--sans);
  font-size: 14px; font-weight: 500; padding: 12px 18px; color: #7c828c;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .12s;
}
.config-tab:hover { color: var(--text); }
.config-tab.active { color: var(--white); border-bottom-color: var(--red); }

/* Usage cards */
.usage-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
@media(max-width:700px){ .usage-grid { grid-template-columns: repeat(2,1fr); } }
.usage-card { border: 1px solid #16191f; background: #0c0d10; padding: 18px 20px; }
.usage-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.usage-lbl { font-family: var(--mono); font-size: 11px; color: #878d97; letter-spacing: .06em; }
.usage-val { font-size: 20px; font-weight: 700; color: #fff; }
.usage-bar { height: 6px; background: #16191f; overflow: hidden; }
.usage-fill { height: 100%; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.usage-sub { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 9px; }
.specs-panel { border: 1px solid #16191f; background: #0c0d10; padding: 22px 24px; }
.specs-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #ff5c5c; margin-bottom: 16px; }
.specs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.spec-item { display: flex; flex-direction: column; gap: 5px; }
.spec-k { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.spec-v { font-size: 15px; font-weight: 500; color: var(--white); }

/* Console */
.console-wrap { border: 1px solid #16191f; background: #070809; overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid #16191f; background: #0c0d10; }
.console-dot { width: 10px; height: 10px; border-radius: 50%; }
.console-title { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.console-body { padding: 20px; font-family: var(--mono); font-size: 13px; line-height: 1.8; min-height: 300px; }
.console-line { }
.console-cursor { display: inline-block; width: 8px; height: 15px; background: var(--red); vertical-align: middle; animation: thblink 1s steps(1) infinite; }

/* Network table */
.net-table-wrap { border: 1px solid #16191f; background: #0c0d10; }
.net-table-head { display: grid; grid-template-columns: 90px 1fr 1fr 120px; padding: 13px 22px; border-bottom: 1px solid #16191f; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.net-table-row { display: grid; grid-template-columns: 90px 1fr 1fr 120px; padding: 15px 22px; border-bottom: 1px solid #101318; font-family: var(--mono); font-size: 13px; color: var(--text); align-items: center; }
.net-table-row:last-of-type { border-bottom: none; }
.net-table-actions { padding: 16px 22px; display: flex; gap: 10px; }

/* Settings rows */
.settings-rows { display: flex; flex-direction: column; gap: 14px; }
.settings-row { border: 1px solid #16191f; background: #0c0d10; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-row .info .ttl { font-size: 15px; font-weight: 500; color: var(--white); margin-bottom: 5px; }
.settings-row .info .desc { font-size: 13px; color: #878d97; }

/* ── PROFILE ───────────────────────────────────────────── */
.profile-banner { display: flex; align-items: center; gap: 20px; border: 1px solid #16191f; background: #0c0d10; padding: 24px; margin-bottom: 22px; }
.profile-avatar { width: 64px; height: 64px; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: var(--bg); box-shadow: 0 0 24px rgba(255,59,59,.4); flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-handle { font-size: 20px; font-weight: 600; color: var(--white); }
.profile-email  { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 4px; }
.profile-plan-badge { display: inline-flex; align-items: center; border: 1px solid #2a1416; background: #140d0e; padding: 7px 13px; font-family: var(--mono); font-size: 11px; color: #ff7a7a; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
@media(max-width:600px){ .profile-grid { grid-template-columns: 1fr; } }
.profile-card { border: 1px solid #16191f; background: #0c0d10; padding: 22px 24px; }
.profile-card-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #ff5c5c; margin-bottom: 18px; }
.billing-lines { display: flex; flex-direction: column; gap: 14px; }
.billing-line { display: flex; justify-content: space-between; align-items: center; }
.billing-line .lbl { font-size: 14px; color: #9aa0aa; }
.billing-line .val { font-family: var(--mono); font-size: 13px; color: #fff; }
.billing-methods { display: flex; gap: 10px; margin-top: 20px; }
.billing-method { display: flex; align-items: center; gap: 7px; border: 1px solid #23272f; padding: 7px 12px; font-size: 12px; color: var(--text); }
.security-rows { display: flex; flex-direction: column; gap: 14px; }
.security-row { display: flex; justify-content: space-between; align-items: center; }
.security-row .info .ttl { font-size: 14px; color: var(--white); }
.security-row .info .sub { font-size: 12px; color: var(--muted); }
.instances-list { border: 1px solid #16191f; background: #0c0d10; padding: 22px 24px; }
.instances-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.instances-list-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #ff5c5c; }
.instance-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #101318; }
.instance-row:last-child { border-bottom: none; }
.instance-row-left { display: flex; align-items: center; gap: 14px; }
.instance-row-dot { width: 9px; height: 9px; border-radius: 50%; }
.instance-row .name { font-size: 15px; font-weight: 500; color: var(--white); }
.instance-row .spec { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.instance-row-right { display: flex; align-items: center; gap: 14px; }

/* ── TOAST ─────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--panel); border: 1px solid var(--border); padding: 12px 18px; font-size: 14px; color: var(--text); animation: thfadeUp .25s ease; max-width: 320px; pointer-events: auto; }
.toast.success { border-color: rgba(53,208,127,.4); }
.toast.error   { border-color: rgba(255,59,59,.4); color: var(--red); }

/* ── MODAL ─────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--border); padding: 28px; max-width: 440px; width: 100%; }
.modal h3 { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.modal p  { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.input-field { width: 100%; background: var(--bg); border: 1px solid #23272f; color: var(--white); padding: 9px 12px; font-size: 14px; margin-bottom: 14px; }
.input-field:focus { outline: 1px solid #33373f; }
.api-key-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); padding: 10px 14px; margin-top: 14px; }
.api-key-val { flex: 1; font-family: var(--mono); font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
