/* ==========================================================================
   Slig / Steam top-up — stylesheet
   Shares design tokens with the main Slig landing page.
   ========================================================================== */

:root{
  --bg: #08090B;
  --card: #11151B;
  --card-hover: #141920;
  --border: #222C36;
  --border-soft: #1A222B;
  --text: #FFFFFF;
  --muted: #94A3B8;
  --muted-dim: #5B6B7C;
  --accent: #2DFF7A;
  --accent-dim: rgba(45, 255, 122, .12);
  --accent-line: rgba(45, 255, 122, .35);
  --danger: #FF5D5D;
  --danger-dim: rgba(255, 93, 93, .12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-eyebrow: clamp(.72rem, .65rem + .3vw, .8rem);
  --fs-body: clamp(1rem, .95rem + .2vw, 1.125rem);
  --fs-lg: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .8vw, 1.6rem);
  --fs-h2: clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --fs-h1: clamp(2.4rem, 1.7rem + 3.6vw, 4.6rem);

  --sp-1: clamp(.5rem, .45rem + .2vw, .75rem);
  --sp-2: clamp(.9rem, .8rem + .4vw, 1.25rem);
  --sp-3: clamp(1.4rem, 1.2rem + .8vw, 2rem);
  --sp-4: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --sp-5: clamp(3rem, 2.2rem + 3vw, 5rem);
  --sp-6: clamp(4rem, 3vw + 3rem, 7rem);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 999px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 200ms;
  --dur-med: 380ms;

  --header-h: 76px;
  --container-w: min(1120px, 92vw);
}

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

html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow-x: hidden;
}

img, svg{ display: block; max-width: 100%; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea{ font: inherit; color: inherit; }

::selection{ background: var(--accent); color: #04120a; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.container{ width: var(--container-w); margin-inline: auto; }
.section{ padding: var(--sp-6) 0; }
.section-tight{ padding: var(--sp-5) 0; }

.glow-field{ position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow{ position: absolute; border-radius: 50%; filter: blur(90px); }
.glow--1{ width: 44vw; height: 44vw; top: -16vw; left: -12vw; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: .16; }
.glow--2{ width: 36vw; height: 36vw; top: 4vw; right: -14vw; background: radial-gradient(circle, #1f6b45, transparent 70%); opacity: .26; }

main, header, footer{ position: relative; z-index: 2; }

/* Header (matches main site) */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  background: rgba(8,9,11,.4);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.site-header.is-scrolled{ background: rgba(8,9,11,.78); border-bottom-color: var(--border-soft); }
.header-inner{ display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.logo{ display: flex; align-items: center; gap: .4rem; font-weight: 800; font-size: 1.25rem; }
.logo span{ color: var(--accent); }
.nav-desktop{ display: none; align-items: center; gap: var(--sp-3); }
.nav-desktop a{ color: var(--muted); font-size: .9rem; font-weight: 500; transition: color var(--dur-fast) var(--ease); }
.nav-desktop a:hover{ color: var(--text); }

@media (min-width: 860px){ .nav-desktop{ display: flex; } }

/* Buttons */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95em 1.7em; border-radius: var(--radius-full);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.btn:active{ transform: scale(.97); }
.btn--primary{ background: var(--accent); color: #04140b; }
.btn--primary:hover:not(:disabled){ transform: translateY(-2px); box-shadow: 0 8px 30px -6px rgba(45,255,122,.55); }
.btn--primary:disabled{ opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost{ background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover{ transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-dim); }
.btn--block{ width: 100%; }

/* Hero + calculator */
.hero{ padding-top: calc(var(--header-h) + var(--sp-5)); padding-bottom: var(--sp-5); }
.hero-grid{ display: grid; grid-template-columns: 1fr; gap: var(--sp-5); align-items: start; }

.eyebrow{
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-mono); font-size: var(--fs-eyebrow);
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--sp-2);
}
.eyebrow::before{ content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.hero h1{ font-size: var(--fs-h1); font-weight: 800; line-height: 1.03; letter-spacing: -.03em; }
.hero h1 em{
  font-style: normal;
  background: linear-gradient(180deg, var(--accent), #17b559);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub{ color: var(--muted); font-size: var(--fs-lg); max-width: 46ch; margin-top: var(--sp-3); line-height: 1.65; }
.hero-sub b{ color: var(--text); font-weight: 600; }

.trust-row{ display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.trust-item{ display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; }
.trust-item svg{ color: var(--accent); flex-shrink: 0; }

/* Calculator card */
.calc-card{
  background: rgba(17,21,27,.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.field{ margin-bottom: var(--sp-3); position: relative; }
.field label{
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--muted); margin-bottom: .5rem;
}
.field .hint{ font-family: var(--font-mono); font-size: .72rem; color: var(--muted-dim); }

.field input{
  width: 100%;
  background: #0d1116;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .95em 1em;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input::placeholder{ color: var(--muted-dim); }
.field input:focus{ border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.field input.is-invalid{ border-color: var(--danger); }
.field input.is-valid{ border-color: var(--accent); }

.field-status{
  display: flex; align-items: center; gap: .4rem;
  margin-top: .5rem; font-size: .8rem; min-height: 1.1em;
}
.field-status.is-checking{ color: var(--muted-dim); }
.field-status.is-valid{ color: var(--accent); }
.field-status.is-invalid{ color: var(--danger); }

.amount-quick{ display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.amount-quick button{
  padding: .4em .9em; border-radius: var(--radius-full);
  border: 1px solid var(--border); color: var(--muted); font-size: .8rem;
  transition: all var(--dur-fast) var(--ease);
}
.amount-quick button:hover, .amount-quick button.is-active{
  border-color: var(--accent-line); color: var(--text); background: var(--accent-dim);
}

.result{ margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-2); background: #0d1116; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); }
.result-row{ display: flex; justify-content: space-between; padding: .45rem 0; color: var(--muted); font-size: .92rem; }
.result-row.total{ border-top: 1px solid var(--border-soft); margin-top: .2rem; padding-top: .7rem; }
.result-row strong{ color: var(--accent); font-family: var(--font-mono); font-weight: 600; }
.result-row.total strong{ font-size: 1.1rem; }

.form-error{
  display: none;
  align-items: center; gap: .5rem;
  background: var(--danger-dim);
  border: 1px solid rgba(255,93,93,.35);
  color: var(--danger);
  padding: .8em 1em;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: var(--sp-2);
}
.form-error.is-visible{ display: flex; }

.calc-legal{ color: var(--muted-dim); font-size: .78rem; margin-top: var(--sp-2); line-height: 1.5; }

/* Spinner */
.spinner{
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(4,20,11,.35); border-top-color: #04140b;
  animation: spin .7s linear infinite; display: none;
}
.is-loading .spinner{ display: inline-block; }
.is-loading .btn-label{ opacity: .85; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* Feature grid */
.feature-grid{
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.feature{ background: var(--bg); padding: var(--sp-3); }
.feature-icon{ width: 36px; height: 36px; color: var(--accent); margin-bottom: var(--sp-1); }
.feature h4{ font-size: 1.05rem; font-weight: 600; margin-bottom: .3rem; }
.feature p{ color: var(--muted); font-size: .9rem; line-height: 1.6; }

@media (min-width: 640px){ .feature-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px){ .feature-grid{ grid-template-columns: repeat(4, 1fr); } }

/* Steps */
.steps{ display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.step{
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--sp-3);
  display: flex; gap: var(--sp-2); align-items: flex-start;
}
.step-num{
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid var(--accent-line); color: var(--accent);
  font-family: var(--font-mono); font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.step h4{ font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.step p{ color: var(--muted); font-size: .88rem; line-height: 1.6; }

@media (min-width: 760px){ .steps{ grid-template-columns: repeat(4, 1fr); } .step{ flex-direction: column; } }

.section-head{ max-width: 620px; margin-bottom: var(--sp-4); }
.section-title{ font-size: var(--fs-h2); font-weight: 700; letter-spacing: -.02em; }
.section-sub{ color: var(--muted); margin-top: var(--sp-1); }

/* Footer */
.site-footer{ border-top: 1px solid var(--border-soft); padding: var(--sp-4) 0; text-align: center; }
.site-footer p{ color: var(--muted-dim); font-size: .85rem; margin-top: .4rem; }
.site-footer .logo{ justify-content: center; }

[data-reveal]{ opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible{ opacity: 1; transform: translateY(0); }

@media (min-width: 960px){
  .hero-grid{ grid-template-columns: 1.1fr .9fr; gap: var(--sp-5); }
  .calc-card{ position: sticky; top: calc(var(--header-h) + var(--sp-3)); }
}

/* ===================== Admin ===================== */
.admin-auth{
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.admin-auth-card{ width: min(400px, 100%); }

.admin-wrap{ padding-top: calc(var(--header-h) + var(--sp-4)); padding-bottom: var(--sp-5); }
.admin-head{ display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.admin-range{ display: flex; align-items: center; gap: .6rem; }
.admin-range label{ color: var(--muted); font-size: .85rem; }
.admin-range select, .orders-filters select, .orders-filters input{
  background: #0d1116; border: 1px solid var(--border); color: var(--text);
  padding: .55em .9em; border-radius: var(--radius-sm); font-size: .9rem; outline: none;
}
.admin-range select:focus, .orders-filters select:focus, .orders-filters input:focus{ border-color: var(--accent-line); }

.stat-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-4); }
@media (min-width: 720px){ .stat-grid{ grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px){ .stat-grid{ grid-template-columns: repeat(7, 1fr); } }
.stat-card{
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-2); display: flex; flex-direction: column; gap: .35rem;
}
.stat-label{ color: var(--muted-dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-value{ color: var(--text); font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; }

.admin-charts{ display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 900px){ .admin-charts{ grid-template-columns: 2fr 1fr; } }
.chart-card{
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--sp-3); position: relative; min-height: 280px;
}
.chart-card h3{ font-size: 1rem; font-weight: 600; margin-bottom: var(--sp-2); }
.chart-card canvas{ max-height: 300px; }

.orders-card{
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--sp-3); margin-top: var(--sp-3);
}
.orders-head{ display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.orders-head h3{ font-size: 1rem; font-weight: 600; }
.orders-filters{ display: flex; gap: .6rem; flex-wrap: wrap; }
.table-scroll{ overflow-x: auto; }
.orders-table{ width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.orders-table th{ text-align: left; color: var(--muted-dim); font-weight: 500; padding: .6rem .7rem; border-bottom: 1px solid var(--border); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.orders-table td{ padding: .7rem .7rem; border-bottom: 1px solid var(--border-soft); color: var(--muted); }
.orders-table tr:hover td{ background: var(--card-hover); }
.orders-table .mono{ font-family: var(--font-mono); font-size: .78rem; color: var(--muted-dim); }
.badge{ display: inline-block; padding: .2em .7em; border-radius: var(--radius-full); border: 1px solid; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
