:root{
  --bg: #f8fbff;
  --text: #0b1220;
  --muted: #6b7a90;

  --border: #dbe7f3;
  --soft: #eef5ff;

  --primary: #3b82f6;        /* main blue */
  --primary-soft: #e6f0ff;   /* light blue backgrounds */
  --primary-dark: #1e40af;

  --shadow: 0 12px 30px rgba(30, 64, 175, 0.12);
  --radius: 18px;

  --btn: var(--primary);
  --btnText: #ffffff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

a{ color: inherit; text-decoration: none; }
p{ margin: 0; }
h1,h2,h3{ margin: 0; letter-spacing: -0.02em; }

/* ✅ Make HTML hidden attribute always work */
[hidden] {
  display: none !important;
}

.site-header{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231,235,240,0.8);
  z-index: 10;
}

.nav{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
  font-weight: 700;
}

.brand-text{
  display: grid;
  line-height: 1.05;
}
.brand-name{ font-weight: 700; }
.brand-sub{ font-size: 12px; color: var(--muted); }

.nav-actions{
  display: flex;
  gap: 10px;
}

/* Navbar auth state */
#navAuth{
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-signedout:not([hidden]),
.nav-signedin:not([hidden]){
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user{
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
}

.page{
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 18px 24px;
}

.hero{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
  padding: 22px 0 40px;
}

.kicker{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-left h1{
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.02;
  margin-bottom: 16px;
}

.muted{
  color: #029ef8;
}

.lead{
  max-width: 560px;
  color: #344050;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.cta-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.microcopy{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.bullets{
  padding-left: 18px;
  color: #344050;
  line-height: 1.8;
  margin: 0;
}

.btn{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  border-color: var(--primary);
  color: var(--btnText);
}

.btn-ghost{
  background: transparent;
}
.btn-outline{
  background: #fff;
  border-color: #d8dee8;
}
.btn-lg{
  padding: 12px 18px;
  font-size: 14px;
}

.hero{
  position: relative;
}

.hero::before{
  content: "";
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 600px;
  background: radial-gradient(
    circle at top left,
    rgba(20, 93, 209, 0.12),
    transparent 60%
  );
  z-index: -1;
}

.card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, var(--soft));
  box-shadow: var(--shadow);
}

.preview{
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.preview-top{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.preview-title{
  font-size: 16px;
  font-weight: 700;
}
.preview-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.chip{
  font-size: 12px;
  color: #334155;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.chev{ opacity: 0.7; }

.menu{
  position: absolute;
  right: 0;
  top: 46px;
  width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
}
.menu.open{ display: block; }
.menu-item{
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}
.menu-item:hover{
  background: var(--soft);
}

.metrics{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.metric{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
}
.metric-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.metric-value{
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section{
  margin-top: 16px;
}
.section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section h3{
  font-size: 13px;
  color: #0b0f17;
}

.campaign-list{
  display: grid;
  gap: 10px;
}

.campaign{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

/* --- Better keyboard focus (accessibility) --- */
.btn:focus-visible,
.chip:focus-visible,
.menu-item:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.4);
  outline-offset: 2px;
}

/* --- Nice hover states (optional polish) --- */
.btn:hover { border-color: #cfd6e1; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline:hover { background: var(--soft); }
.btn-ghost:hover { background: var(--soft); }

.campaign-name{
  font-size: 13px;
  font-weight: 650;
}
.campaign-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-green{
  background: var(--primary-soft);
  border-color: #bfdbfe;
  color: var(--primary-dark);
}
.badge-amber{ background: #fffbeb; border-color: #fde68a; color: #92400e; }
.badge-gray{ background: #f1f5f9; border-color: #e2e8f0; color: #334155; }

.tiny{
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.footer{
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 18px 40px;
  border-top: 1px solid rgba(231,235,240,0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links{
  display: flex;
  gap: 16px;
}
.footer a:hover{ text-decoration: underline; }

/* Responsive */
@media (max-width: 900px){
  .hero{
    grid-template-columns: 1fr;
  }
  .hero-right{
    order: -1;
  }
  .metrics{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px){
  .metrics{
    grid-template-columns: 1fr;
  }
  .nav-actions .btn-ghost{ display: none; }
}


/* ===============================
   Info + Benefits Sections
================================ */

.info,
.benefits {
  padding: 60px 0 20px;
}

.info-header,
.benefits-header {
  max-width: 640px;
  margin-bottom: 28px;
}

.info-header h2,
.benefits-header h2 {
  font-size: 28px;
  line-height: 1.2;
  margin-top: 6px;
}

.info-points {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.info-point {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

.info-point h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.info-point p {
  font-size: 13px;
  color: #344050;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.benefit-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
}

.benefit-card h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.benefit-card p {
  font-size: 13px;
  color: #344050;
}

/* Responsive */
@media (max-width: 900px) {
  .info-points {
    grid-template-columns: 1fr 1fr;
  }

  .benefit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .info-points,
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Auth Pages (signup / signin)
================================ */

.auth-wrap{
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 18px;
  align-items: start;
  padding: 24px 0 60px;
}

.auth-card{
  padding: 22px;
}

.auth-head h1{
  font-size: 28px;
  line-height: 1.2;
  margin-top: 6px;
}

.auth-sub{
  margin-top: 8px;
  color: #344050;
  font-size: 14px;
  line-height: 1.5;
}

.auth-form{
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.field label{
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
}

.field input,
.field select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  outline: none;
}

/* Custom dropdown (rounded menu) */
.dd{ position: relative; }

.dd-btn{
  width: 100%;
  padding: 12px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.dd-btn:focus{
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
  outline: none;
}

.dd-chev{ opacity: 0.7; }

.dd-menu{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px; /* ✅ rounded menu */
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 50;
}

.dd.open .dd-menu{ display: block; }

.dd-item{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
}

.dd-item:hover{
  background: var(--soft);
}

.field input:focus,
.field select:focus{
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.auth-submit{
  width: 100%;
  justify-content: center;
}

.auth-msg{
  min-height: 18px;
  font-size: 13px;
  margin-top: 4px;
}

.auth-msg[data-type="error"]{ color: #b91c1c; }
.auth-msg[data-type="success"]{ color: #1e40af; }

.auth-foot{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.link{
  color: var(--primary, #3b82f6);
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

.auth-aside .aside-card{
  padding: 22px;
}

.aside-card h2{
  font-size: 16px;
  margin-bottom: 10px;
}

.aside-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: #344050;
}

.dot{
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary, #3b82f6), #60a5fa);
  margin-right: 10px;
  transform: translateY(1px);
}

.aside-mini{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
}

@media (max-width: 900px){
  .auth-wrap{
    grid-template-columns: 1fr;
  }
}


/* ===============================
   Legal Pages
================================ */
.legal{
  padding: 24px 0 60px;
}

.legal h1{
  font-size: 34px;
  line-height: 1.15;
  margin-top: 6px;
}

.legal-lead{
  margin-top: 12px;
  max-width: 720px;
}

.legal-card{
  padding: 18px;
  margin-top: 16px;
}

.legal-card h2{
  font-size: 15px;
  margin-bottom: 10px;
}

.legal-card ul{
  margin: 0;
  padding-left: 18px;
  color: #344050;
  line-height: 1.8;
}

.legal-card li{
  margin: 6px 0;
}

.legal-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px){
  .legal-grid{
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Support Page
================================ */
.support{
  padding: 24px 0 60px;
}

.support-lead{
  max-width: 640px;
  margin-top: 12px;
}

.support-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.support-card{
  padding: 18px;
}

.support-card h3{
  font-size: 15px;
  margin-bottom: 6px;
}

.support-contact{
  margin-top: 24px;
  padding: 22px;
}

.support-email{
  font-size: 16px;
  margin-top: 8px;
}

@media (max-width: 900px){
  .support-grid{
    grid-template-columns: 1fr;
  }
}

.back-home{
  display: flex;
  justify-content: center;
  margin-top: 50px;
  color: #029ef8;
}

.dash { padding: 24px 0 60px; }
.dash-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:16px; margin-bottom: 18px;
}
.dash-card{ padding: 18px; margin-top: 16px; }
.dash-status{ padding: 14px 16px; min-width: 180px; }
.status-pill{
  margin-top: 6px;
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--soft);
  font-weight: 650;
}
.size-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.embed-box{ margin-top: 14px; }
.code{
  margin: 8px 0 14px;
  padding: 12px;
  border-radius: 14px;
  background: #0b1220;
  color: #e5e7eb;
  overflow:auto;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 900px){
  .dash-head{ flex-direction: column; }
}

.nav-badge{
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2, 158, 248, 0.35);
  background: rgba(2, 158, 248, 0.10);
  color: #0277c2;
}


/* ===============================
   Centered single-card auth (admin login)
================================ */

.centered-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.centered-auth .auth-card {
  box-shadow: 0 20px 45px rgba(30, 64, 175, 0.15);
}

.centered-auth .page {
  flex: 1;
  display: flex;
  align-items: center;   /* vertical center */
  justify-content: center; /* horizontal center */
}

.centered-auth .auth-wrap {
  grid-template-columns: 1fr; /* force single column */
  padding: 0;
  width: 100%;
  max-width: 760px;
}

.centered-auth .field input {
  padding: 14px 14px;
  font-size: 15px;
}

.centered-auth .btn-lg {
  padding: 14px 20px;
  font-size: 15px;
}


.select{
  padding:10px 12px;
  border:1px solid rgba(231,235,240,0.9);
  border-radius:12px;
  background:#fff;
  font: inherit;
}

.overview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.metrics-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

@media (min-width: 720px){
  .metrics-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.metric-card{
  border:1px solid rgba(231,235,240,0.9);
  border-radius:14px;
  padding:14px;
  background: rgba(246,248,251,0.8);
}

.metric-value{
  margin:6px 0 0;
  font-size:20px;
  font-weight:800;
}

/* ===============================
   Withdraw UI
================================ */
#withdrawBox{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(231,235,240,0.8);
}

.withdraw-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.withdraw-balance{
  min-width: 260px;
  flex: 1;
}

.amount{
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 6px 0;
}

.withdraw-actions{
  display: grid;
  gap: 10px;
  min-width: 320px;
}

.field-inline{
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.btn-sm{
  padding: 9px 12px;
  font-size: 13px;
}
