:root {
  --gold: #FFD000;
  --gold-deep: #F5C400;
  --gold-soft: #FFF3C4;
  --cream: #FFF8E8;
  --cream-2: #FFFDF5;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --card: #ffffff;
  --line: #F0E6C8;
  --green: #16A34A;
  --amber: #D97706;
  --red: #DC2626;
  --shadow: 0 8px 24px rgba(180, 140, 20, 0.10);
  --radius: 24px;
}

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

html, body {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF3D4 100%);
  color: var(--ink);
  min-height: 100%;
}

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #FFFDF6;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.08);
  padding-bottom: 108px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img, .brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

.brand h1 {
  font-size: 22px;
  letter-spacing: -0.4px;
  font-weight: 800;
}

.wa-btn {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255,253,246,.88);
  border-bottom: 1px solid #f3ead0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

.back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #eee;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.page-head h2 { font-size: 17px; font-weight: 800; }

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.content { padding: 8px 16px 20px; display: grid; gap: 12px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8);
}

.balance {
  background: linear-gradient(135deg, #FFE24A 0%, #FFC400 55%, #F5B800 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
  color: #1a1400;
}

.balance::after {
  content: "";
  position: absolute;
  right: -10px;
  top: -8px;
  width: 150px;
  height: 150px;
  background: url("../img/logo.png") center/contain no-repeat;
  opacity: .18;
  pointer-events: none;
}

.balance .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  opacity: .75;
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance .amount { font-size: 34px; font-weight: 900; margin: 4px 0 2px; }
.balance .sub { font-size: 12px; font-weight: 600; }

.row-btns { display: flex; gap: 8px; margin-top: 14px; }

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  font-weight: 800;
  padding: 10px 14px;
  font-size: 12px;
}

.btn-white { background: #fff; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.btn-ghost { background: rgba(255,255,255,.28); color: #111; }
.btn-gold { background: var(--gold); color: #111; box-shadow: 0 6px 16px rgba(245, 196, 0, .35); }
.btn-dark { background: #111; color: #fff; }
.btn-full { width: 100%; padding: 13px; font-size: 14px; border-radius: 16px; }
.btn:active { transform: scale(.98); }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 14px 10px 12px;
  text-align: center;
}

.menu-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.menu-item span { font-size: 10px; font-weight: 700; color: #333; line-height: 1.15; }

.icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #F3F4F6;
}

.icon.active, .icon.gold {
  background: var(--gold);
  box-shadow: 0 6px 14px rgba(245,196,0,.28);
}

.icon svg { width: 20px; height: 20px; }

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.link-row .left { display: flex; align-items: center; gap: 12px; }
.link-row h4 { font-size: 13px; font-weight: 800; }
.link-row p { font-size: 11px; color: var(--muted); }

.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status .num { font-size: 20px; font-weight: 900; }
.status small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .4px; color: #9CA3AF; text-transform: uppercase; }

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
}

.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid #f0f0f0;
  border-radius: 28px 28px 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 8px 8px 14px;
  z-index: 50;
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}

.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  padding-bottom: 4px;
}

.nav a.active { color: #111; }
.nav .fab {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--gold);
  display: grid;
  place-items: center;
  margin-top: -28px;
  box-shadow: 0 10px 20px rgba(245,196,0,.4);
  border: 5px solid #fff;
  color: #111;
}

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.tab {
  white-space: nowrap;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.tab.on { background: var(--gold); color: #111; border-color: transparent; }

.item { padding: 14px; }
.item .top { display: flex; justify-content: space-between; gap: 8px; }
.item .mail { font-size: 13px; font-weight: 800; margin-top: 2px; }
.item .date { font-size: 10px; color: #9CA3AF; font-weight: 700; }
.item .foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f6f6f6; font-size: 12px; }

.pill {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.ok { background: #ECFDF3; color: #15803D; }
.wait { background: #FFFBEB; color: #B45309; }
.fail { background: #FEF2F2; color: #B91C1C; }

.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #F5C400;
  background: #fff;
}
.input-wrap { position: relative; }
.input-wrap .lead {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}
.input-wrap input { padding-left: 38px; }

.note {
  background: #FFF8DC;
  border: 1px solid #F5E6A3;
  color: #7A5B00;
  border-radius: 18px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
}

.stat-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-box { text-align: center; padding: 12px 8px; }
.stat-box small { font-size: 10px; color: #9CA3AF; font-weight: 800; text-transform: uppercase; }
.stat-box b { display: block; margin-top: 4px; font-size: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 80;
  max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 28px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.auth-logo { width: 86px; height: 86px; margin: 0 auto 12px; border-radius: 50%; }

.list-user { display: grid; gap: 10px; }
.user-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; gap: 8px; }
.user-row h4 { font-size: 13px; }
.user-row p { font-size: 11px; color: var(--muted); }

.settings-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid #f3f3f3;
  font-size: 13px;
  font-weight: 700;
}

.switch {
  width: 42px;
  height: 24px;
  background: #E5E7EB;
  border-radius: 999px;
  position: relative;
}
.switch.on { background: var(--gold); }
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch.on i { left: 21px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid #f3f3f3; }
th { color: #9CA3AF; font-size: 10px; text-transform: uppercase; }

.hidden { display: none !important; }

body.ad-locked .app {
  filter: blur(2px);
}

.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 17, 17, .62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  animation: adFade .25s ease;
}

.ad-modal {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 28px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  position: relative;
  text-align: center;
  animation: adUp .28s ease;
}

.ad-modal img.ad-brand {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 10px;
}

.ad-modal h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}

.ad-modal p {
  font-size: 13px;
  line-height: 1.6;
  color: #4B5563;
  margin-bottom: 16px;
}

.ad-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #F3F4F6;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

@keyframes adFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes adUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lock-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lock-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.08);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.lock-btn svg { width: 16px; height: 16px; }

.secret.locked {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.info-locked-box {
  background: #F9FAFB;
  border: 1px dashed #E5E7EB;
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  font-size: 13px;
  color: #6B7280;
}

.payout-row {
  background: #fff;
  border: 1px solid #E8EEF5;
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(20, 40, 80, .04);
}
.payout-row .pay-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.payout-row .pay-top input[name="pname"] {
  flex: 1;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}
.payout-row .pay-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}
.payout-row .pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.payout-row .field label {
  color: #94A3B8;
  font-size: 11px;
}

.cache-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f3f3;
}

@media (min-width: 900px) {
  body {
    padding: 0;
    background: #F6F0DC;
  }
  .app {
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 24px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    background: #FFFDF8;
  }
  .header, .page-head {
    grid-column: 1 / -1;
    padding: 18px 28px;
  }
  .content {
    grid-column: 2;
    padding: 8px 28px 32px;
    gap: 16px;
  }
  .nav {
    position: sticky;
    top: 88px;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 220px;
    max-width: 220px;
    height: calc(100vh - 110px);
    margin: 12px 12px 0 16px;
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    border-radius: 24px;
    border: 1px solid #F0E6C8;
    padding: 14px 10px;
    box-shadow: none;
  }
  .nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .nav a.active { background: #FFF3C4; color: #111; }
  .nav .fab {
    width: 36px;
    height: 36px;
    margin: 0;
    border-width: 0;
    box-shadow: none;
  }
  .menu-grid { grid-template-columns: repeat(5, 1fr); }
  .balance { padding: 22px; }
  .balance .amount { font-size: 40px; }
  table { font-size: 13px; }
  th, td { padding: 10px 8px; }
  .auth-wrap { padding: 48px 20px; }
  .auth-card { max-width: 440px; }
}

@media (max-width: 899px) {
  .app { max-width: 430px; }
}
