/* ===== Tokens =====
   Background:  #05070f (near-black)
   Panel:       #0b1020
   Panel-2:     #101830
   Border:      #1e2a4a
   Accent:      #3b6cff (electric blue)
   Accent-2:    #6d3bff (nebula violet, used sparingly)
   Text:        #e8ecf7
   Muted:       #8b93ab
   Font: system stack only - kept plain on purpose, no display webfont.
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #05070f;
  --panel: #0b1020;
  --panel-2: #101830;
  --border: #1e2a4a;
  --accent: #3b6cff;
  --accent-2: #6d3bff;
  --text: #e8ecf7;
  --muted: #8b93ab;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#nebula-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(ellipse at 20% 0%, #101c3f 0%, #05070f 55%),
              radial-gradient(ellipse at 85% 30%, #170f3a 0%, transparent 55%);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 0 rgba(59,108,255,0);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(59,108,255,0.35); }
.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; margin-top: 1rem; }

/* ===== Nav ===== */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4vw;
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(5,7,15,0.75);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.brand-name { font-weight: 800; letter-spacing: 0.03em; font-size: 1.15rem; }
.accent { color: var(--accent); }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { color: var(--muted); font-size: 0.92rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.7rem; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 7rem 5vw 4rem;
  max-width: 900px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
  background: rgba(59,108,255,0.06);
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: 1.4rem; color: var(--accent); }
.hero-stats span { color: var(--muted); font-size: 0.85rem; }

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  padding: 2rem 5vw 5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

/* ===== Plans ===== */
.plans-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5vw;
  scroll-margin-top: 5rem;
}
.plans-section h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.section-sub { color: var(--muted); margin-bottom: 2rem; max-width: 640px; }

.cpu-toggle {
  display: inline-flex;
  padding: 0.3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 2rem;
}
.cpu-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.cpu-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.15s, transform 0.15s;
}
.plan-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.plan-card h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 0.4rem; }
.plan-card .price { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.9rem; }
.plan-card .price span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.plan-card ul li {
  font-size: 0.87rem;
  color: var(--text);
  padding: 0.3rem 0;
  border-top: 1px dashed var(--border);
}
.plan-card ul li:first-child { border-top: none; }
.plan-note { color: var(--muted); font-size: 0.85rem; margin-top: 1.8rem; }

/* ===== Testimonials ===== */
.testimonials { padding: 3rem 0 5rem; overflow: hidden; }
.testimonials h2 { text-align: center; margin-bottom: 2rem; font-size: 1.8rem; }
.testimonial-track {
  display: flex;
  gap: 1.2rem;
  padding: 0 5vw;
  animation: scroll-track 28s linear infinite;
  width: max-content;
}
.testimonial-track:hover { animation-play-state: paused; }
.testimonial-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  width: 320px;
  flex-shrink: 0;
}
.testimonial-card p { font-size: 0.92rem; margin-bottom: 0.8rem; }
.testimonial-card span { color: var(--muted); font-size: 0.8rem; }
@keyframes scroll-track {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Refund ===== */
.refund { max-width: 1200px; margin: 0 auto; padding: 2rem 5vw 5rem; }
.refund h2 { font-size: 1.8rem; margin-bottom: 2rem; }
.refund-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 1.5rem; }
.refund-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.refund-card h3 { margin-bottom: 0.5rem; font-size: 1rem; color: var(--accent); }
.refund-card p { color: var(--muted); font-size: 0.9rem; }

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding: 5rem 5vw;
  background: linear-gradient(180deg, transparent, rgba(59,108,255,0.06));
  border-top: 1px solid var(--border);
}
.cta h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.cta p { color: var(--muted); margin-bottom: 2rem; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 5vw 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto 2rem; }
.footer-brand { margin-bottom: 0.6rem; }
.footer-grid h4 { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid a { display: block; color: var(--text); font-size: 0.88rem; padding: 0.25rem 0; opacity: 0.85; }
.footer-grid a:hover { opacity: 1; color: var(--accent); }
.footer-bottom { text-align: center; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--border); padding-top: 1.2rem; max-width: 1200px; margin: 0 auto; }

/* ===== Auth / Panel forms ===== */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 5vw;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.auth-card .muted { margin-bottom: 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.field input, .field select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}
.form-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.4);
  color: #86efac;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}
.auth-switch { margin-top: 1.4rem; font-size: 0.88rem; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ===== Dashboard / panel pages ===== */
.panel-wrap { max-width: 1100px; margin: 0 auto; padding: 3rem 5vw 6rem; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.panel-header h1 { font-size: 1.6rem; }
.panel-section { margin-bottom: 2.5rem; }
.panel-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 0.8rem 1rem; text-align: left; font-size: 0.87rem; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--muted); font-weight: 600; background: var(--panel-2); }
.data-table tr:last-child td { border-bottom: none; }
.badge { padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-pending { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-active { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-suspended { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-rejected, .badge-deleted { background: rgba(148,163,184,0.15); color: #94a3b8; }
.empty-state { color: var(--muted); font-size: 0.9rem; padding: 2rem; text-align: center; background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.summary-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 6rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; border-bottom: 1px dashed var(--border); }
.summary-row:last-child { border-bottom: none; }
.summary-total { font-size: 1.3rem; font-weight: 800; margin-top: 0.6rem; }
.qr-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 1.2rem; text-align: center; margin: 1.2rem 0; }
.qr-box img { margin: 0 auto 0.8rem; border-radius: 8px; }
.cycle-toggle { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.cycle-btn { flex: 1; min-width: 100px; padding: 0.6rem; text-align: center; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--panel-2); font-size: 0.85rem; }
.cycle-btn.active { border-color: var(--accent); background: rgba(59,108,255,0.12); color: var(--accent); font-weight: 700; }
.promo-row { display: flex; gap: 0.6rem; }
.promo-row input { flex: 1; }
.promo-msg { font-size: 0.82rem; margin-top: 0.4rem; }

/* Admin */
.admin-wrap { max-width: 1300px; margin: 0 auto; padding: 3rem 5vw 6rem; }
.action-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.action-btns button { border: none; padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.78rem; cursor: pointer; font-weight: 600; }
.btn-approve { background: rgba(34,197,94,0.18); color: #4ade80; }
.btn-reject { background: rgba(239,68,68,0.18); color: #f87171; }
.btn-suspend { background: rgba(251,191,36,0.18); color: #fbbf24; }
.btn-delete { background: rgba(148,163,184,0.18); color: #cbd5e1; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-grid { grid-template-columns: 1fr; }
  .refund-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .features { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 5rem 6vw 3rem; }
  .hero-stats { gap: 1.6rem; }
  .site-nav { padding: 1rem 5vw; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .testimonial-track { animation: none; }
  .btn { transition: none; }
}
