:root {
  --primary: #0f3460;
  --accent: #16a34a;
  --accent-dark: #128a3e;
  --bg: #f7f9fc;
  --text: #1a1a2e;
  --muted: #6b7280;
  --danger: #dc2626;
  --warn: #d97706;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .logo {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  font-weight: 400;
  line-height: 1.1;
}

a { color: var(--primary); }
main { flex: 1; width: 100%; max-width: 1020px; margin: 0 auto; padding: 20px 16px 48px; }

/* ---------- nav ---------- */
.nav {
  background: var(--primary);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}
.nav-inner {
  max-width: 1020px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { font-size: 28px; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo svg { width: 26px; height: 26px; color: var(--accent); }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: #dbeafe; text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 8px;
}
.nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 12px 22px; border-radius: 10px; font-size: 16px; font-weight: 600;
  text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.secondary { background: var(--primary); }
.btn.secondary:hover { background: #0a2445; }
.btn.ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn.ghost:hover { background: #e8eef7; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { background: #cbd5e1 !important; color: #64748b !important; cursor: not-allowed; border-color: #cbd5e1 !important; }

/* ---------- cards / layout ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.big-number { font-family: 'Bebas Neue', sans-serif; font-size: 44px; color: var(--primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 44px 12px 30px; }
.hero h1 { font-size: clamp(38px, 7vw, 64px); color: var(--primary); max-width: 760px; margin: 0 auto 10px; }
.hero .tagline { font-size: 19px; color: var(--muted); margin-bottom: 24px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; text-align: center; }
.step .icon-wrap {
  width: 54px; height: 54px; border-radius: 50%; background: #e7f6ee; color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.step .icon-wrap svg { width: 26px; height: 26px; }
.step h3 { font-size: 22px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }
.step .step-num { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #eef2f8; color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:hover td { background: #f9fbfd; }

/* ---------- forms ---------- */
.form { max-width: 440px; margin: 0 auto; }
.field { margin-bottom: 16px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="tel"], input[type="number"], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 16px; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--primary); }
input[readonly] { background: #f1f5f9; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 16px; }
.check input { width: 18px; height: 18px; margin-top: 2px; }

/* ---------- notices ---------- */
.notice { padding: 13px 16px; border-radius: 10px; font-size: 14.5px; margin: 12px 0; display: none; }
.notice.show { display: block; }
.notice.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.notice.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.banner {
  background: #fef3c7; border: 1px solid #fcd34d; color: #92400e;
  padding: 14px 16px; border-radius: 10px; font-size: 15px; margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start;
}
.banner svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }

/* ---------- referral box ---------- */
.ref-box { background: linear-gradient(135deg, #0f3460, #1b4f86); color: #fff; border: none; }
.ref-box .code {
  font-family: 'Bebas Neue', sans-serif; font-size: 40px; letter-spacing: 3px;
  background: rgba(255,255,255,.1); border: 1.5px dashed rgba(255,255,255,.5);
  padding: 8px 18px; border-radius: 10px; display: inline-block; margin: 8px 0 14px;
}
.ref-box .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.ref-box .btn.ghost:hover { background: rgba(255,255,255,.12); }
.ref-progress { height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; margin-top: 12px; }
.ref-progress > div { height: 100%; background: var(--accent); }

/* ---------- survey ---------- */
.q-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.q-block .q-text { font-weight: 600; margin-bottom: 12px; font-size: 16px; }
.q-block .q-text .req { color: var(--danger); }
.opt { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 9px; margin-bottom: 8px; cursor: pointer; font-size: 15px; }
.opt:hover { border-color: var(--primary); background: #f4f8fd; }
.opt input { width: 17px; height: 17px; accent-color: var(--accent); }
.q-block .invalid { border-color: var(--danger); }

/* ---------- ad slots ---------- */
.ad-slot {
  min-height: 90px; border: 1.5px dashed #cbd5e1; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  margin: 16px 0; background: #fbfdff;
}
.ad-side { min-height: 250px; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.tab {
  background: none; border: none; padding: 10px 16px; font-size: 15px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab.active { color: var(--primary); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input, .toolbar select { max-width: 260px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.active, .badge.paid { background: #dcfce7; color: #166534; }
.badge.frozen { background: #fef3c7; color: #92400e; }
.badge.banned, .badge.rejected { background: #fee2e2; color: #991b1b; }
.badge.pending { background: #e0e7ff; color: #3730a3; }
.drop-zone {
  border: 2px dashed var(--primary); border-radius: var(--radius); padding: 30px;
  text-align: center; background: #f2f7fd; cursor: pointer;
}
.drop-zone.drag { background: #e3efff; border-color: var(--accent); }
.errors-box { background: #fee2e2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px 16px; font-size: 14px; display: none; }
.errors-box.show { display: block; }
.errors-box ul { margin: 6px 0 0 18px; }

/* ---------- footer ---------- */
footer {
  background: var(--primary); color: #cbd5e1; text-align: center;
  padding: 18px 16px; font-size: 14px;
}
footer a { color: #fff; text-decoration: underline; }

/* ---------- misc ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }
.points-table td:nth-child(2) { color: var(--accent); font-weight: 700; }
ul.rules { list-style: none; }
ul.rules li { padding: 7px 0; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
ul.rules li svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }

@media (max-width: 640px) {
  .big-number { font-size: 36px; }
  .nav-inner { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 40px; }
}
