:root {
  --bg: #0b1428;
  --bg-2: #101936;
  --panel: rgba(18, 30, 56, 0.76);
  --panel-2: rgba(13, 22, 43, 0.88);
  --line: rgba(115, 149, 207, 0.14);
  --line-2: rgba(115, 149, 207, 0.24);
  --text: #ffffff;
  --muted: #98a6c2;
  --muted-2: #687896;
  --blue: #08c7ff;
  --blue-2: #1668ff;
  --purple: #8c45ff;
  --green: #00eb84;
  --red: #ff5570;
  --warning: #ffbf3d;
  --radius: 18px;
  --shadow-blue: 0 0 34px rgba(8, 199, 255, 0.42);
  --shadow-purple: 0 0 34px rgba(140, 69, 255, 0.28);
  --shadow-green: 0 0 34px rgba(0, 235, 132, 0.36);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 16% 22%, rgba(8, 199, 255, 0.10), transparent 28%),
    radial-gradient(circle at 75% 20%, rgba(140, 69, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #0b1428, #101936 62%, #111534);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  bottom: -24px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.7;
  animation: moveUp linear infinite;
  box-shadow: 0 0 14px rgba(8, 199, 255, 0.75);
}

.particle.small {
  width: 3px;
  height: 3px;
}

.particle.green {
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 235, 132, 0.65);
}

.particle.purple {
  background: var(--purple);
  box-shadow: 0 0 14px rgba(140, 69, 255, 0.65);
}

@keyframes moveUp {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  15% { opacity: 0.8; }
  100% { transform: translate3d(0, -112vh, 0); opacity: 0; }
}

.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 10px 26px;
}

.dashboard-page {
  max-width: 100%;
}

.center-page {
  max-width: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 18px;
}

.topbar {
  height: 54px;
  margin: -12px -10px 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 21, 40, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(135deg, #10d5ff, #1769ff);
  box-shadow: 0 8px 18px rgba(20, 89, 255, 0.28);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 45%, rgba(6, 15, 31, 0.72) 46%, rgba(6, 15, 31, 0.72) 54%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(6, 15, 31, 0.72) 46%, rgba(6, 15, 31, 0.72) 54%, transparent 55%);
}

.brand-mark::after {
  transform: rotate(45deg);
}

.brand-text {
  font-weight: 900;
  letter-spacing: 0.5px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 25, 47, 0.84);
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.btn {
  border: 0;
  min-height: 44px;
  border-radius: 13px;
  padding: 0 16px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.btn-small {
  min-height: 34px;
  border-radius: 9px;
  padding: 0 12px;
  background: var(--blue-2);
  font-size: 13px;
}

.btn-main {
  width: 100%;
  min-height: 56px;
  color: #170f2d;
  background: linear-gradient(90deg, #12c6f6, #8c45ff 51%, #00eb84);
  box-shadow: var(--shadow-blue), var(--shadow-green);
}

.btn-dark {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 14, 30, 0.80);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.10);
}

.hero-card {
  min-height: 226px;
  padding: 20px 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 12px;
}

.earning-center {
  text-align: center;
  margin: 0 auto;
}

.live-title {
  margin: 0 0 18px;
  color: var(--blue);
  font-weight: 900;
  font-size: 15px;
}

.live-title span {
  color: var(--purple);
}

.balance-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 7px;
}

.live-balance {
  margin: 0 0 18px;
  color: var(--purple);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(24px, 7vw, 38px);
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(140, 69, 255, 0.34);
}

.cycle-box {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 31, 58, 0.82);
  color: var(--muted);
  font-size: 12px;
}

.cycle-time {
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 900;
}

.hero-card .btn-main {
  margin-top: 24px;
}

.ref-card {
  min-height: 62px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ref-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.icon-square {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(140, 69, 255, 0.22);
  color: var(--purple);
}

.ref-title {
  margin: 0 0 4px;
  font-weight: 900;
  font-size: 13px;
}

.ref-link {
  margin: 0;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ref-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(8, 199, 255, 0.42);
  border-radius: 10px;
  background: rgba(8, 199, 255, 0.12);
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
}

.action-icon.green {
  border-color: rgba(0, 235, 132, 0.42);
  background: rgba(0, 235, 132, 0.12);
  color: var(--green);
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-stat {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(16, 27, 52, 0.72);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-stat span:first-child {
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mini-stat strong {
  font-size: 13px;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.big-action {
  min-height: 98px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.big-action .action-icon-box {
  width: 38px;
  height: 38px;
  margin: 0 auto 9px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
  font-size: 19px;
}

.big-action strong {
  display: block;
  font-size: 14px;
}

.big-action span {
  display: block;
  margin-top: 3px;
  opacity: 0.86;
  font-size: 12px;
}

.big-action.deposit {
  background: linear-gradient(135deg, #10c9ff, #09a7d8);
  box-shadow: var(--shadow-blue);
}

.big-action.invest {
  background: linear-gradient(135deg, #7c2aff, #b05cff);
  box-shadow: var(--shadow-purple);
}

.big-action.withdraw {
  background: linear-gradient(135deg, #00e878, #00c78b);
  box-shadow: var(--shadow-green);
}

.section-card {
  overflow: hidden;
  margin-bottom: 12px;
}

.section-title {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.quick-list {
  display: grid;
}

.quick-row {
  min-height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(115, 149, 207, 0.09);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-row:last-child {
  border-bottom: 0;
}

.quick-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
}

.quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(8, 199, 255, 0.12);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.quick-row:nth-child(2) .quick-icon,
.quick-row:nth-child(4) .quick-icon,
.quick-row:nth-child(5) .quick-icon {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

.chev {
  color: var(--blue);
  font-size: 20px;
}

.auth-card {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.auth-title,
.page-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.7px;
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.form-group {
  margin-bottom: 14px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: #dce7f7;
  font-size: 13px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: rgba(5, 14, 30, 0.72);
  outline: none;
}

.textarea {
  min-height: 90px;
  padding-top: 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(8, 199, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(8, 199, 255, 0.08);
}

.form-note {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.form-note a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.alert {
  padding: 12px 13px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(8, 199, 255, 0.24);
  background: rgba(8, 199, 255, 0.08);
  color: #d8f7ff;
  font-size: 13px;
}

.alert.error {
  border-color: rgba(255, 85, 112, 0.28);
  background: rgba(255, 85, 112, 0.10);
  color: #ffd8df;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-card {
  padding: 14px;
  text-decoration: none;
}

.admin-card strong {
  display: block;
  font-size: 14px;
}

.admin-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  font-weight: 900;
}

.detail-card {
  padding: 14px;
}

.detail-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-value {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  word-break: break-word;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 14px;
  text-decoration: none;
}

.list-item-title {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 900;
}

.list-item-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.status {
  display: inline-flex;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--green);
  background: rgba(0, 235, 132, 0.12);
}

.status.pending {
  color: var(--warning);
  background: rgba(255, 191, 61, 0.12);
}

.status.red {
  color: var(--red);
  background: rgba(255, 85, 112, 0.12);
}

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

.simple-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.simple-table th,
.simple-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.simple-table th {
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 760px) {
  .page {
    padding: 12px 18px 28px;
  }

  .topbar {
    margin-left: -18px;
    margin-right: -18px;
  }

  .mini-stats {
    grid-template-columns: 1fr 1fr;
  }

  .cta-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .hero-card {
    min-height: 245px;
  }
}
