:root {
  --bg: #E9F1EF;
  --surface: #FFFFFF;
  --deep: #0F4C4A;
  --ink: #142226;
  --muted: #56676B;
  --line: #CFDDDA;
  --gold: #E9A80F;
  --gold-dark: #9A6A00;
  --error: #B3261E;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

a { color: var(--deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .8rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }

/* ===== Top bar ===== */
.topbar {
  background: var(--deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.coin {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 0 0 3px #F7C94B;
}
.topbar nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar nav a, .link-btn { color: #fff; text-decoration: none; font-size: .95rem; }
.topbar nav a:hover, .link-btn:hover { text-decoration: underline; }
.balance-pill {
  background: var(--gold); color: var(--ink);
  font-weight: 700; font-size: .85rem;
  padding: .25rem .7rem; border-radius: 999px;
}
.inline { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--gold); color: var(--ink);
  border: 0; border-radius: 10px;
  padding: .8rem 1.4rem;
  font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #F5B92A; }
.btn-small { padding: .4rem .9rem; font-size: .9rem; color: var(--ink) !important; }
.btn-big { padding: 1rem 1.8rem; font-size: 1.05rem; margin-top: .6rem; }

/* ===== Home ===== */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0 1rem;
}
.hero-coin {
  justify-self: center;
  width: min(260px, 70vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD86B, var(--gold) 55%, #C98D00);
  box-shadow: inset 0 0 0 12px rgba(255,255,255,.35), 0 18px 40px rgba(15,76,74,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink);
}
.hero-coin span { font-size: 3.6rem; font-weight: 700; line-height: 1; }
.hero-coin small { font-size: 1rem; font-weight: 600; margin-top: .3rem; }

.steps ol { padding-left: 1.3rem; max-width: 60ch; }
.steps li { margin-bottom: .7rem; }

/* ===== Forms ===== */
.form-wrap {
  max-width: 440px; margin: 1rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
}
form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 1rem; }
form input {
  display: block; width: 100%;
  margin-top: .35rem; padding: .7rem .8rem;
  font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 8px;
  background: #FBFDFC;
}
form input:focus { border-color: var(--deep); outline: none; box-shadow: 0 0 0 3px rgba(15,76,74,.18); }
.form-wrap .btn { width: 100%; margin-top: .4rem; }
.switch { text-align: center; color: var(--muted); font-size: .92rem; margin: 1.2rem 0 0; }

.alert {
  border-left: 4px solid var(--error);
  background: #FCEDEC; color: var(--error);
  padding: .6rem .9rem; border-radius: 6px; margin-bottom: 1rem;
  font-size: .92rem;
}
.alert p { margin: .2rem 0; }

/* ===== Dashboard ===== */
.balance-card {
  background: var(--deep); color: #fff;
  border-radius: var(--radius);
  padding: 1.6rem;
  max-width: 520px;
}
.balance-label { margin: 0; opacity: .8; font-size: .95rem; }
.balance-points { margin: .2rem 0 0; font-size: 2.6rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.balance-points span { font-size: 1rem; color: #fff; font-weight: 400; }
.balance-usd { margin: .2rem 0 1rem; opacity: .9; }
.progress { height: 10px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); }
.progress-text { margin: .6rem 0 0; font-size: .88rem; opacity: .85; }

.empty { color: var(--muted); }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; }
.status { font-weight: 600; font-size: .82rem; padding: .15rem .55rem; border-radius: 999px; }
.status-pending  { background: #FFF3D6; color: var(--gold-dark); }
.status-credited { background: #DDF2EA; color: #0E6B47; }
.status-reversed { background: #FCEDEC; color: var(--error); }

.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-coin { order: -1; width: 180px; }
  .hero-coin span { font-size: 2.6rem; }
}

/* ===== Step 2: Earn page ===== */
.balance-pending { margin: -.6rem 0 1rem; font-size: .88rem; color: #F7C94B; }

.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0 .8rem; }
.tabs a {
  padding: .45rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; font-weight: 600; font-size: .92rem;
}
.tabs a.active { background: var(--deep); border-color: var(--deep); color: #fff; }

.wall-frame {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.wall-frame iframe { display: block; width: 100%; height: 80vh; min-height: 520px; border: 0; }

.test-box {
  margin-top: 2rem; padding: 1.4rem 1.5rem;
  border: 2px dashed var(--gold); border-radius: var(--radius);
  background: #FFF9EA; max-width: 560px;
}
.test-box h2 { margin-top: 0; }
.test-box p { margin: .4rem 0 1rem; }
.test-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .7rem; }
.test-form label { margin: 0; flex: 1 1 200px; }
.btn-ghost { background: transparent; border: 1px solid var(--gold-dark); color: var(--gold-dark); }
.btn-ghost:hover { background: #FFF0C7; }
.flash { background: #DDF2EA; color: #0E6B47; padding: .55rem .8rem; border-radius: 8px; font-weight: 600; }
.hint { color: var(--muted); font-size: .88rem; }

/* ===== Step 3: Withdraw ===== */
.on-dark { color: var(--gold); font-weight: 700; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem; max-width: 560px;
}
.methods { border: 0; padding: 0; margin: 0 0 1.2rem; }
.methods legend { font-weight: 600; font-size: .92rem; margin-bottom: .6rem; }
.method {
  display: flex; gap: .8rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem .9rem; margin-bottom: .5rem; cursor: pointer; font-weight: 400;
}
.method:has(input:checked) { border-color: var(--deep); background: #F1F7F6; box-shadow: inset 0 0 0 1px var(--deep); }
.method input { width: auto; margin: .3rem 0 0; accent-color: var(--deep); }
.method span { display: flex; flex-direction: column; }
.method small { color: var(--muted); font-size: .85rem; }
.panel .btn { width: 100%; }
.panel .hint { margin: .8rem 0 0; }
.notice {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  padding: .8rem 1rem; border-radius: 8px; max-width: 560px;
}
.mono-wallet { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.status-paid     { background: #DDF2EA; color: #0E6B47; }
.status-rejected { background: #FCEDEC; color: var(--error); }

/* ===== Step 4: Admin ===== */
.admin-link { background: rgba(255,255,255,.12); padding: .2rem .65rem; border-radius: 6px; }
main:has(.admin) { max-width: 1180px; }
.sub-filter { display: flex; gap: 1rem; margin: 0 0 1rem; }
.sub-filter a { text-decoration: none; color: var(--muted); font-weight: 600; padding-bottom: .2rem; }
.sub-filter a.on { color: var(--deep); border-bottom: 2px solid var(--deep); }
.admin td { vertical-align: top; }
.admin td small { color: var(--muted); }
.admin td .inline { display: inline-block; margin: 0 .3rem .3rem 0; }
.admin small.warn, .warn { color: var(--error); font-weight: 600; }
code.wallet {
  display: inline-block; margin-top: .2rem; font-size: .82rem;
  background: #F1F7F6; padding: .15rem .4rem; border-radius: 4px;
  user-select: all; white-space: nowrap;
}
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #8F1E17; }
.search { display: flex; gap: .6rem; max-width: 520px; margin-bottom: 1rem; }
.search input {
  flex: 1; padding: .55rem .8rem; font: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat p { margin: 0; color: var(--muted); font-size: .9rem; }
.stat strong { display: block; font-size: 1.6rem; margin-top: .2rem; }
.stat small { color: var(--muted); font-size: .8rem; }
.stat-main { background: var(--deep); border-color: var(--deep); color: #fff; }
.stat-main p, .stat-main small { color: rgba(255,255,255,.8); }
.stat-main strong { color: var(--gold); font-size: 2rem; }

/* ===== Step 5: Info pages ===== */
.doc { max-width: 68ch; }
.doc h2 { font-size: 1.15rem; margin-top: 1.8rem; }
.doc p, .doc li { color: #26363B; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .4rem; }
.updated { color: var(--muted); font-size: .9rem; margin-top: -.2rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: .5rem;
}
.faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0; padding: .9rem 1.1rem; }
.contact-mail { font-size: 1.3rem; font-weight: 700; }
.footer-links { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .5rem; }
.footer-links a { color: var(--muted); }
form label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
form label.check input { width: auto; margin: .3rem 0 0; accent-color: var(--deep); }
