* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

:root {
  --bg-0: #060d1b;
  --bg-1: #091428;
  --bg-2: #0f1b36;
  --panel: rgba(8, 15, 31, 0.94);
  --panel-2: rgba(13, 22, 42, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(247, 211, 77, 0.22);
  --text: #edf2ff;
  --muted: #c8d2ef;
  --gold: #f5cb4d;
  --gold-deep: #c99311;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

html, body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(247, 211, 77, 0.16), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(80, 128, 255, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 44%, var(--bg-2) 100%);
  color: var(--text);
  padding: 22px 22px 94px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.08) 40%, rgba(0,0,0,0));
}

.page-layout {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
  background: rgba(7, 13, 27, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.hero,
.panel,
.card,
.form-card {
  background: linear-gradient(180deg, rgba(14, 23, 45, 0.98) 0%, rgba(8, 15, 31, 0.98) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  animation: premiumFloatSway 10s ease-in-out infinite;
}

.hero {
  padding: 34px;
  animation-duration: 12.5s;
  animation-delay: -1.2s;
}

.card,
.panel,
.form-card {
  padding: 28px;
  margin-bottom: 22px;
  animation-duration: 10.5s;
}

.panel-title,
.card h2,
.hero h2 {
  font-size: 1.58rem;
  margin-bottom: 18px;
  color: var(--gold);
  letter-spacing: 0.1px;
}

.hero p,
.card p,
.panel p,
.card li,
.panel li,
.form-card p {
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 15px;
}

.hero::before,
.card::before,
.panel::before,
.form-card::before,
.metric-card::before,
.plan-card::before,
.graph-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 34%, rgba(247,211,77,0.05));
  opacity: 0.75;
  pointer-events: none;
}

.hero > *,
.card > *,
.panel > *,
.form-card > *,
.metric-card > *,
.plan-card > *,
.graph-card > * {
  position: relative;
  z-index: 1;
}

.button-row,
.dashboard-actions,
.stats-grid,
.plan-grid,
.graph-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.btn,
button,
.btn-primary,
.btn-secondary,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-primary,
.btn {
  background: linear-gradient(180deg, #ffe081 0%, var(--gold) 46%, var(--gold-deep) 100%);
  color: #111;
  box-shadow: 0 10px 24px rgba(201, 147, 17, 0.25);
}

.btn-secondary,
.btn2,
.action-button.gray {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn:hover,
.btn2:hover,
button:hover,
.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.alert {
  padding: 16px 18px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-weight: 600;
  white-space: pre-line;
}

.alert.success {
  background: rgba(46, 125, 50, 0.16);
  color: #c7f5d1;
}

.alert.error {
  background: rgba(229, 57, 53, 0.18);
  color: #ffb5b5;
}

.alert.sponsor {
  display: grid;
  gap: 4px;
  background: rgba(247, 211, 77, 0.12);
  color: var(--gold);
}

.legal-check {
  margin-bottom: 16px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.upload-grid label {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.preview-grid img,
.admin-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(247, 211, 77, 0.18);
}

.platform-hero {
  background-size: cover;
  background-position: center;
  border-color: rgba(247, 211, 77, 0.14);
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 2px;
}

.legal-footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe081 0%, #f5cb4d 50%, #c99311 100%);
  color: #111;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 8px 16px rgba(201,147,17,0.22);
}

.legal-text {
  line-height: 1.8;
}

.legal-copy {
  display: grid;
  gap: 16px;
  color: var(--muted);
}

.legal-copy p {
  margin: 0;
}

.legal-copy p + p {
  margin-top: 2px;
}

input[type=text],
input[type=tel],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(247, 211, 77, 0.9);
  box-shadow: 0 0 0 4px rgba(247, 211, 77, 0.12);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 16px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

.table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.metric-card,
.plan-card,
.graph-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
  animation: premiumFloatSway 8.5s ease-in-out infinite;
}

.metric-card strong,
.plan-card strong {
  display: block;
  margin-bottom: 10px;
  color: #b9c4e6;
  font-size: 0.98rem;
}

.metric-card p,
.plan-card p {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
}

.graph-card { min-height: 220px; position: relative; }
.graph-card canvas { width:100% !important; height:170px !important; }

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff05 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 18px 40px rgba(2,6,23,0.42);
  animation-duration: 10.5s;
  animation-delay: -0.7s;
}

.stats-grid > .metric-card:nth-child(3n + 1),
.plan-grid > .plan-card:nth-child(3n + 1),
.graph-row > .graph-card:nth-child(2n + 1) {
  animation-name: premiumFloatWide;
  animation-duration: 11.5s;
}

.stats-grid > .metric-card:nth-child(3n + 2),
.plan-grid > .plan-card:nth-child(3n + 2),
.graph-row > .graph-card:nth-child(2n + 2) {
  animation-name: premiumFloatSoft;
  animation-duration: 9.5s;
  animation-delay: -1.1s;
}

.stats-grid > .metric-card:nth-child(3n + 3),
.plan-grid > .plan-card:nth-child(3n + 3) {
  animation-name: premiumFloatSway;
  animation-duration: 13s;
  animation-delay: -2s;
}

.plan-banner {
  min-height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

.plan-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(5,9,20,0.45));
}

.plan-card h3 {
  margin-bottom: 12px;
  color: var(--gold);
}

.plan-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.plan-detail {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef2ff;
  font-size: 0.96rem;
}

.plan-card ul {
  margin-bottom: 18px;
}

.plan-card ul li {
  margin-bottom: 10px;
}

.metric-card:hover,
.plan-card:hover,
.graph-card:hover,
.card:hover,
.panel:hover,
.form-card:hover,
.hero:hover {
  transform: translateY(-6px) scale(1.008);
  border-color: var(--line-strong);
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(247, 211, 77, 0.08) inset;
}

.metric-card:hover,
.plan-card:hover,
.graph-card:hover {
  background: rgba(255, 255, 255, 0.055);
}

@keyframes premiumFloatSway {
  0%, 100% { transform: translate3d(-6px, 0px, 0); }
  20% { transform: translate3d(-3px, -4px, 0); }
  40% { transform: translate3d(5px, -7px, 0); }
  60% { transform: translate3d(7px, -3px, 0); }
  80% { transform: translate3d(2px, -5px, 0); }
}

@keyframes premiumFloatWide {
  0%, 100% { transform: translate3d(-9px, 0px, 0); }
  25% { transform: translate3d(-4px, -6px, 0); }
  50% { transform: translate3d(8px, -9px, 0); }
  75% { transform: translate3d(5px, -4px, 0); }
}

@keyframes premiumFloatSoft {
  0%, 100% { transform: translate3d(-3px, 0px, 0); }
  33% { transform: translate3d(2px, -3px, 0); }
  66% { transform: translate3d(-5px, -5px, 0); }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.status-pill.pending { background: rgba(255, 229, 143, 0.18); color: #f7d34d; }
.status-pill.needs_resubmission { background: rgba(255, 176, 88, 0.18); color: #ffbd73; }
.status-pill.approved { background: rgba(129, 199, 132, 0.18); color: #7fc276; }
.status-pill.declined { background: rgba(244, 143, 177, 0.18); color: #f48fb1; }
.status-pill.blocked { background: rgba(244, 67, 54, 0.18); color: #ff8a80; }

.amount-presets,
.support-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.deposit-proof-step {
  display: none;
}

.deposit-proof-step.is-visible {
  display: block;
}

.deposit-overlay[hidden] {
  display: none;
}

.deposit-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.deposit-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.deposit-overlay__card {
  position: relative;
  width: min(460px, 100%);
  padding: 24px;
  border-radius: 16px;
  background: #151515;
  border: 1px solid rgba(247, 211, 77, 0.22);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.deposit-overlay__card h2 {
  margin-top: 0;
}

.deposit-overlay__card p {
  color: var(--muted);
}

.deposit-overlay__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.deposit-payment-summary {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 10px 14px;
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.deposit-payment-summary span {
  color: var(--muted);
}

.deposit-payment-summary strong {
  overflow-wrap: anywhere;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  gap: 5px;
  flex-direction: column;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
}

.table-wrap {
  overflow-x: auto;
}

details {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--gold);
}

.bottom-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, minmax(52px, 1fr));
  gap: 8px;
  width: min(100%, 760px);
  padding: 10px;
  background: rgba(7, 13, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px 18px 0 0;
}

.bottom-menu a {
  color: #eef2ff;
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  display: grid;
  gap: 3px;
  justify-items: center;
}

.bottom-menu a span {
  font-size: 1.25rem;
  color: var(--gold);
}

.bottom-menu a small {
  font-size: .72rem;
}

.wheel-board {
  position: relative;
  width: min(82vw, 420px);
  aspect-ratio: 1;
  margin: 28px auto;
  border-radius: 50%;
  background: conic-gradient(#f5cb4d 0 12.5%, #142443 12.5% 25%, #d6a522 25% 37.5%, #172845 37.5% 50%, #f5cb4d 50% 62.5%, #142443 62.5% 75%, #d6a522 75% 87.5%, #172845 87.5% 100%);
  border: 12px solid rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.25), 0 28px 70px rgba(0,0,0,.35);
}

.wheel-board span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 34px;
  margin: -17px 0 0 -43px;
  transform: rotate(var(--angle)) translateY(-145px) rotate(calc(-1 * var(--angle)));
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(5, 9, 20, .82);
  color: #fff;
  font-weight: 900;
  font-size: .86rem;
}

.wheel-board strong {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #050914;
  color: var(--gold);
  border: 4px solid rgba(247,211,77,.65);
}

.phone-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: start;
}

.phone-row span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 16px;
  background: rgba(247, 211, 77, .12);
  color: var(--gold);
  font-weight: 900;
}

.message-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.support-ticket-head {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.support-ticket-head strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-actions a {
  text-decoration: none;
}

.support-composer {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(247, 211, 77, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  margin: 14px 0 22px;
}

.support-composer h3 {
  margin-bottom: 2px;
  color: var(--gold);
}

.support-composer .composer-hint {
  margin-bottom: 0;
  color: #9aa7cb;
}

.support-composer textarea {
  min-height: 150px;
  resize: vertical;
}

.support-composer .support-file {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(247, 211, 77, 0.22);
}

.support-composer .composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.support-compose-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.support-compose-title .nav-badge {
  min-width: 24px;
  height: 24px;
  font-size: 0.8rem;
}

.link-card {
  color: inherit;
  text-decoration: none;
}

.bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffe389, #d6a522);
}

.graph-card small {
  color: #9ea7c0;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
  margin: 14px 0 18px;
}

.permission-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 8px 0;
}

.permission-grid label,
.form-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  line-height: 1.35;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.small-muted {
  color: #9aa7cb;
}

.page-layout > .hero:first-of-type,
.page-layout > .card:first-of-type,
.page-layout > .panel:first-of-type {
  border-top: 1px solid rgba(247, 211, 77, 0.08);
}

@media (max-width: 820px) {
  .header,
  .button-row,
  .dashboard-actions,
  .stats-grid,
  .plan-grid,
  .graph-row {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .user-nav {
    display: none;
    width: 100%;
  }

  .menu-open .user-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wheel-board span {
    transform: rotate(var(--angle)) translateY(-31vw) rotate(calc(-1 * var(--angle)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .panel,
  .card,
  .form-card,
  .metric-card,
  .plan-card,
  .graph-card {
    animation: none;
  }

  .metric-card:hover,
  .plan-card:hover,
  .graph-card:hover,
  .card:hover,
  .panel:hover,
  .form-card:hover,
  .hero:hover {
    transform: none;
  }
}
