:root {
  --bg: #0b0914;
  --card: #161226;
  --ink: #f6f3ff;
  --muted: #c8bfd8;
  --line: rgba(255, 255, 255, .08);
  --green: #34d399;
  --green-dark: #6d28d9;
  --gold: #c4b5fd;
  --gold-soft: rgba(139, 92, 246, .18);
  --red: #fb7185;
  --sidebar: #0c0a16;
  --side-text: #ddd6fe;
  --shadow: 0 16px 40px rgba(0, 0, 0, .28);
  --phone: 430px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #05040c; color-scheme: dark; }
body {
  font-family: "Nirmala UI", "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
body.public, body.app {
  width: min(var(--phone), 100%);
  margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  overflow-x: hidden;
  background:
    radial-gradient(520px 240px at 50% -40px, rgba(124, 58, 237, .35), transparent 70%),
    var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #c4b5fd, #7c3aed); color: #fff; flex: 0 0 auto;
}
.mark svg { display: block; }
.price, .bal, .stat strong { font-family: "Nirmala UI", "Segoe UI", sans-serif; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 16px;
  background: linear-gradient(180deg, #b794f6, #7c3aed); color: #fff; text-decoration: none;
  cursor: pointer; font-weight: 600;
  box-shadow: 0 8px 18px rgba(124, 58, 237, .28);
}
.btn:hover { filter: brightness(1.08); }
.btn.gold { background: linear-gradient(180deg, #d8b4fe, #7c3aed); color: #fff; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(255, 255, 255, .14); box-shadow: none; }
.btn.danger { background: #e11d48; box-shadow: none; }
.btn.small { padding: 8px 12px; }
.btn.block { width: 100%; }
.btn[hidden] { display: none !important; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #c4b5fd; outline-offset: 2px;
}

.site-header, .site-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; gap: 12px;
}
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(11, 9, 20, .92); backdrop-filter: blur(8px); }
.site-nav, .site-nav a { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; }
.site-foot { color: var(--muted); justify-content: center; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 40px; }

.hero {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  align-items: center; padding: 18px 0 10px;
}
.hero h1 { font-size: 32px; line-height: 1.25; margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.hero-card, .card, .auth-card, .ad-card, .plan, .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.hero-card { padding: 18px; }
.hero-card ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grid-3, .grid-4, .ad-grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
.ad-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.plan, .stat, .card { padding: 16px; }
.plan h3, .stat strong, .card h2, .card h3 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.price { font-size: 28px; font-weight: 700; margin: 8px 0; }
.section-title { margin: 28px 0 12px; }

.auth-card { width: min(440px, 100%); margin: 24px auto; padding: 22px; }
.auth-card h1 { margin: 0 0 6px; font-size: 28px; }
body.auth { background: #07060f; }
body.auth .auth-bar {
  display: grid; grid-template-columns: 42px 1fr 42px; align-items: center;
  padding: 14px 8px 6px;
}
body.auth .auth-back {
  width: 44px; height: 44px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, #c4b5fd, #7c3aed);
  border: 0;
  box-shadow: 0 8px 18px rgba(124, 58, 237, .45);
  font-size: 15px;
}
body.auth .auth-bar-side { width: 42px; height: 42px; }
body.auth .auth-brand {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 18px; text-decoration: none;
}
body.auth .auth-main { padding: 8px 16px 28px; }
body.auth .auth-intro { text-align: center; margin: 18px 0 18px; }
body.auth .auth-intro h1 { margin: 0 0 8px; font-size: 34px; font-weight: 700; letter-spacing: 0; }
body.auth .auth-intro p { margin: 0 auto; max-width: 32ch; color: #b7b3c9; font-size: 15px; line-height: 1.6; }
body.auth .auth-card {
  margin: 0; padding: 16px 14px 14px; border-radius: 22px;
  background: #141824; border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
body.auth .auth-card form { gap: 14px; }
body.auth .auth-card label { gap: 8px; color: #eeeaf8; font-size: 14px; font-weight: 600; }
body.auth .auth-input { position: relative; display: block; }
body.auth .auth-input > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #8d93a8; width: 18px; text-align: center; pointer-events: none;
}
body.auth .auth-input input {
  min-height: 52px; padding: 12px 44px; border-radius: 14px;
  background: #1b2030; border: 1px solid rgba(255,255,255,.05); color: #f4f7ff;
  font-size: 15px;
}
body.auth .auth-input input::placeholder { color: #8b93a7; font-weight: 500; }
body.auth .auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: #9aa3b8; cursor: pointer;
}
body.auth .auth-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; font-weight: 600;
}
body.auth .auth-check {
  display: flex; align-items: center; gap: 8px; font-weight: 600; color: #d9d6e6;
}
body.auth .auth-check input { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: #7c3aed; }
body.auth .auth-row a, body.auth .auth-switch a { color: #67e8f9; text-decoration: none; }
body.auth .auth-go {
  min-height: 52px; width: 100%; border: 0; border-radius: 14px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  background: linear-gradient(90deg, #38bdf8, #7c3aed 55%, #d946ef);
  box-shadow: 0 10px 28px rgba(56, 189, 248, .28);
}
body.auth .auth-or {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  margin: 16px 0 8px; color: #8d86a3; font-size: 13px;
}
body.auth .auth-or::before, body.auth .auth-or::after {
  content: ""; height: 1px; background: rgba(255,255,255,.08);
}
body.auth .auth-switch { margin: 0; text-align: center; color: #c9c4d8; font-size: 14px; }
body.auth .auth-legal, body.auth .auth-demo, body.auth .auth-note {
  margin: 16px 8px 0; text-align: center; color: #8d86a3; font-size: 13px; line-height: 1.55;
}
body.auth .auth-bonus { margin: 0; color: #67e8f9; font-size: 13px; font-weight: 600; }
body.auth .auth-note { margin: 0 0 14px; text-align: left; color: #ddd6fe; font-size: 15px; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input, select {
  width: 100%; border: 1px solid var(--line); background: #120e22; color: var(--ink); border-radius: 12px; padding: 12px;
}
.inline-error { color: var(--red); margin: 0; }
.notice-admin textarea {
  width: 100%; min-height: 88px; resize: vertical;
  border: 1px solid var(--line); background: #120e22; color: var(--ink);
  border-radius: 12px; padding: 12px; font: inherit; font-weight: 500; line-height: 1.55;
}
.notice-admin .notice-row { display: grid; gap: 8px; padding-top: 4px; }
.notice-admin .notice-thumb { width: 140px; height: 84px; object-fit: cover; border-radius: 10px; }
.notice-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.notice-toggle input { width: auto; }

.shell { display: block; min-height: 100vh; }
.sidebar { display: none; }
.sidebar .brand { color: white; }
.sidebar .mark { background: linear-gradient(160deg, #c4b5fd, #7c3aed); color: #fff; }
.who { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 8px; }
.side-nav { display: grid; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 10px 12px; border-radius: 12px; color: inherit;
}
.sidebar .nav-link:hover, .sidebar .nav-link.is-on { background: rgba(255,255,255,.08); }
.sidebar .nav-link.is-on { color: #c4b5fd; }
.logout { margin-top: auto; }
.logout-form { margin-top: auto; }
.logout-form button.nav-link {
  width: 100%; border: 0; background: transparent; color: inherit;
  font: inherit; cursor: pointer; text-align: left;
}
.inline-form { display: inline; }
.bal-row { display: flex; align-items: center; gap: 8px; }
.logout-mini { display: inline; }
.main { min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 0; gap: 12px;
}
.topbar h1 { margin: 0; font-size: 22px; }
.bal {
  background: linear-gradient(180deg, #b794f6, #7c3aed); color: white; border-radius: 999px;
  padding: 8px 14px; font-weight: 700;
}
.content { padding: 16px 16px 96px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.stat span, .plan p { color: var(--muted); }
.stat span { display: block; font-size: 13px; line-height: 1.3; }
.stat strong { display: block; margin: 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.progress { height: 10px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress b { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #e879f9); }

.no-plan {
  margin-top: 28px; padding: 28px 18px 22px; border-radius: 22px; text-align: center;
  background: #161226; border: 1px solid rgba(196, 181, 253, .28);
}
.no-plan-lock {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; color: #fff; font-size: 26px;
  background: linear-gradient(160deg, #e9d5ff, #7c3aed);
}
.no-plan h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.no-plan p { margin: 0 0 16px; color: #ddd6fe; font-size: 15px; line-height: 1.6; }
.no-plan .btn { min-height: 48px; border-radius: 14px; font-size: 16px; }
.ad-card { padding: 14px; display: grid; gap: 8px; }
.ad-card i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(139, 92, 246, .2); color: #ddd6fe; }
.ad-card.is-done { opacity: .7; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: rgba(139, 92, 246, .22); color: #ddd6fe; }
.badge.pending { background: rgba(120, 53, 15, .55); color: #fde68a; }
.badge.approved, .badge.active { background: rgba(16, 80, 52, .7); color: #86efac; }
.badge.rejected, .badge.banned, .badge.out { background: rgba(127, 29, 29, .65); color: #fecaca; }
.badge.in { background: rgba(16, 80, 52, .7); color: #86efac; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.flash.ok { background: #14532d; color: #d1fae5; }
.flash.err { background: #7f1d1d; color: #fee2e2; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-form input, .row-form select { width: auto; min-width: 110px; padding: 8px; }
.split { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.copy-line { display: flex; gap: 8px; }
.copy-line input { flex: 1; }
.prize-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.prize-list span { background: var(--gold-soft); border-radius: 999px; padding: 6px 10px; }

.viewer[hidden] { display: none !important; }
.viewer {
  position: fixed;
  top: 0; bottom: 0;
  left: max(0px, calc(50% - (var(--phone) / 2)));
  right: max(0px, calc(50% - (var(--phone) / 2)));
  z-index: 40;
  background: rgba(16, 20, 18, .62);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.viewer-card { width: min(460px, 100%); background: var(--card); border-radius: 18px; padding: 16px; position: relative; }
.icon-x { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; font-size: 26px; cursor: pointer; }
.fake-ad {
  border-radius: 14px; min-height: 180px; padding: 18px;
  background: linear-gradient(160deg, #3b2a86, #7c3aed 55%, #e879f9);
  color: white; display: grid; align-content: end; gap: 6px;
}
.fake-ad span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.count { font-size: 20px; font-weight: 700; }
.viewer .count {
  margin: 10px 0 4px;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: #c4b5fd;
}
.tabbar {
  display: flex;
  position: fixed;
  bottom: 0;
  z-index: 20;
  left: max(0px, calc(50% - (var(--phone) / 2)));
  right: max(0px, calc(50% - (var(--phone) / 2)));
  background: rgba(12, 10, 22, .96);
  color: #8d86a3;
  border-top: 1px solid rgba(255, 255, 255, .06);
  overflow-x: auto;
  gap: 4px;
  padding: 6px;
}
.tabbar .nav-link { flex: 0 0 auto; flex-direction: column; font-size: 13px; gap: 4px; min-width: 72px; line-height: 1.3; }
.tabbar .nav-link.is-on { color: #c4b5fd; }
.profile { display: grid; gap: 14px; }
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(232, 121, 249, .32), transparent 48%),
    linear-gradient(160deg, #3b2a86 0%, #241454 55%, #161026 100%);
  border: 1px solid rgba(196, 181, 253, .28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24);
}
.profile-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(160deg, #e9d5ff, #7c3aed);
  color: #2e1065;
  font-size: 28px;
  font-weight: 600;
}
.profile-hero h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.profile-hero .muted { margin: 6px 0 0; font-size: 12px; }
.profile-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.profile-stats article {
  min-width: 0;
  padding: 12px 10px;
  border-radius: 16px;
  background: #161226;
  border: 1px solid rgba(255, 255, 255, .08);
}
.profile-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.profile-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-form {
  padding: 16px;
  border-radius: 22px;
  background: #161226;
  border: 1px solid rgba(255, 255, 255, .08);
}
.profile-form h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.profile-form h3 i { color: #c4b5fd; }
.profile-form h3 + .pf-field { margin-top: 2px; }
.pf-field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: #ddd6fe; }
.pf-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  min-height: 48px;
  border-radius: 14px;
  background: #120e22;
  border: 1px solid rgba(255, 255, 255, .1);
}
.pf-input i { width: 16px; text-align: center; color: #c4b5fd; font-size: 14px; }
.pf-input input {
  border: 0;
  background: transparent;
  padding: 12px 0;
  border-radius: 0;
  font-weight: 500;
}
.pf-input input::placeholder { color: #8d86a3; font-weight: 400; }
.profile-form .btn { margin-top: 4px; min-height: 48px; border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
