:root {
  color-scheme: dark;
  --bg: #020807;
  --panel: rgba(9, 18, 16, .9);
  --panel-2: rgba(13, 29, 25, .94);
  --line: rgba(0, 214, 150, .18);
  --text: #f5fbf9;
  --muted: #92a7a1;
  --green: #00d696;
  --green-2: #15f4b5;
  --danger: #ff5b6b;
  --warn: #ffc857;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 16% -8%, rgba(0, 214, 150, .22), transparent 34%),
    radial-gradient(ellipse at 86% 10%, rgba(21, 244, 181, .10), transparent 28%),
    linear-gradient(155deg, #010404 0%, var(--bg) 58%, #04110f);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 214, 150, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 214, 150, .018) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 72%);
}

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

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(3, 8, 7, .86);
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 30px; }
.brand img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.brand h1 { font-size: 18px; line-height: 1.1; margin: 0; letter-spacing: 0; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.nav { display: grid; gap: 8px; }
.nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 12px;
  border-radius: 8px;
}
.nav button.active, .nav button:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-2);
}

.main { padding: 28px; max-width: 1180px; width: 100%; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.topbar h2 { margin: 0; font-size: 26px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-box {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  border: 1px solid rgba(0, 214, 150, .23);
  background: linear-gradient(145deg, rgba(8, 18, 16, .96), rgba(2, 5, 5, .98));
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 1px 0 rgba(255,255,255,.04) inset;
}
.auth-art {
  min-height: 560px;
  background:
    radial-gradient(circle at 50% 42%, rgba(0,214,150,.20), transparent 48%),
    #020303;
  display: grid;
  place-items: center;
  padding: 42px;
}
.auth-art { position: relative; overflow: hidden; }
.auth-art img { width: min(420px, 100%); filter: drop-shadow(0 24px 50px rgba(0, 214, 150, .18)); }
.shine-line {
  position: absolute;
  right: 10%;
  bottom: 18%;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(21,244,181,.86));
  box-shadow: 0 -22px rgba(21,244,181,.12), 0 22px rgba(21,244,181,.08);
}
.auth-form { padding: 34px; display: grid; align-content: center; gap: 16px; }
.auth-form h1 { margin: 0; font-size: 30px; }
.auth-form p { color: var(--muted); margin: 0 0 8px; }
.clean-login {
  width: min(430px, 100%);
  display: block;
  border-radius: 8px;
}
.clean-login .auth-form {
  padding: 28px;
  align-content: initial;
}
.login-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 2px;
}
.login-brand img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 0 34px rgba(0, 214, 150, .18);
}
.login-brand h1 {
  font-size: 30px;
  line-height: 1.05;
  background: linear-gradient(120deg, #fff 20%, var(--green-2) 58%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-brand p, .login-copy {
  color: var(--muted);
  text-align: center;
}
.login-copy {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 4px !important;
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
}

.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 13px; }
.input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #070b0a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { min-height: 150px; resize: vertical; }

.btn {
  border: 1px solid rgba(0, 214, 150, .45);
  background: linear-gradient(135deg, var(--green), #09a978);
  color: #001512;
  font-weight: 800;
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: 0 14px 34px rgba(0, 214, 150, .16);
}
.btn.secondary { background: rgba(8, 18, 16, .72); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(255, 91, 107, .45); }
.btn:disabled { opacity: .55; cursor: wait; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 16px 44px rgba(0,0,0,.24), 0 1px 0 rgba(255,255,255,.035) inset;
}
.hero-card {
  min-height: 178px;
  border: 1px solid rgba(21, 244, 181, .32);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
  background:
    linear-gradient(118deg, rgba(0, 119, 84, .98), rgba(0, 214, 150, .92) 58%, rgba(115, 255, 214, .84)),
    #063227;
  color: #001512;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-card:after {
  content: "";
  position: absolute;
  right: -58px;
  top: -88px;
  width: 250px;
  height: 250px;
  border: 44px solid rgba(255,255,255,.12);
  transform: rotate(24deg);
}
.hero-card span, .hero-card p { font-weight: 850; opacity: .82; }
.hero-card h2 { font-size: 34px; line-height: 1.06; margin: 0; }
.hero-card.admin-hero {
  background: linear-gradient(125deg, #07100e, #063b2e 58%, #008e66);
  color: var(--text);
}
.hero-card.pending-hero {
  border-color: rgba(255, 200, 87, .55);
  background:
    linear-gradient(118deg, rgba(92, 52, 8, .98), rgba(255, 181, 45, .90) 58%, rgba(255, 231, 145, .84)),
    #3a2207;
  color: #1a0e02;
}
.hero-card.pending-hero span {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(26, 14, 2, .16);
  color: #1a0e02;
}
.panel h3, .card h3 { margin: 0 0 12px; }
.metric { font-size: 30px; font-weight: 900; }
.muted { color: var(--muted); }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.status.created { color: var(--warn); border-color: rgba(255, 200, 87, .4); }
.status.payment_done { color: var(--green-2); border-color: rgba(21, 244, 181, .42); }
.status.approved { color: var(--green); border-color: rgba(0, 214, 150, .42); }
.status.rejected { color: var(--danger); border-color: rgba(255, 91, 107, .42); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list { display: grid; gap: 12px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px; font-size: 14px; }
.kv span:nth-child(odd) { color: var(--muted); }
.activation-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 214, 150, .06);
}
.activation-box.pending-box {
  border-color: rgba(255, 200, 87, .58);
  background: linear-gradient(145deg, rgba(255, 200, 87, .12), rgba(9, 18, 16, .82));
  box-shadow: 0 0 0 1px rgba(255, 200, 87, .12) inset, 0 18px 46px rgba(255, 154, 20, .08);
}
.pending-callout {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 200, 87, .44);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 200, 87, .10);
}
.pending-callout strong { color: var(--warn); }
.pending-callout span { color: var(--muted); font-size: 13px; }
.progress {
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(2, 8, 7, .86);
}
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--green-2));
}
.user-list { margin-top: 16px; }
.user-card { display: grid; gap: 14px; }
.stat-row div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 8, 7, .58);
}
.stat-row span { color: var(--muted); font-size: 12px; font-weight: 800; }
.stat-row strong { color: var(--green-2); font-size: 20px; overflow-wrap: anywhere; }
.user-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.switch { position: relative; width: 58px; height: 32px; flex: 0 0 auto; }
.switch input { display: none; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #064e3b;
  border: 1px solid rgba(255,255,255,.12);
}
.switch span:after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 4px;
  transition: .16s ease;
}
.switch input:checked + span { background: #8a1f2b; }
.switch input:checked + span:after { transform: translateX(25px); }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  background: #0c1412;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 18px; }
  .auth-box { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; padding: 24px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}

/* PayNovaX mobile app style */
:root {
  --bg: #050008;
  --panel: rgba(14, 7, 22, .94);
  --panel-2: rgba(28, 11, 43, .94);
  --line: rgba(206, 129, 255, .22);
  --text: #fff8ff;
  --muted: #b8a8c6;
  --green: #a022ff;
  --green-2: #e187ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

body {
  background:
    linear-gradient(rgba(150, 70, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 70, 255, .028) 1px, transparent 1px),
    radial-gradient(ellipse at 75% 8%, rgba(151, 30, 255, .28), transparent 36%),
    linear-gradient(180deg, #08000d 0%, #030005 100%);
  background-size: 72px 72px, 72px 72px, auto, auto;
}

.shell {
  display: block;
  min-height: 100vh;
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 28px 118px;
}

.sidebar { display: none; }

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(206, 129, 255, .15);
}

.brand.mini {
  margin: 0;
}

.brand.mini img {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #050008;
}

.brand.mini h1 {
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.brand.mini p {
  font-size: 18px;
  color: var(--muted);
}

.logout-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(32, 10, 50, .78);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  border-radius: 24px;
  padding: 16px 24px;
  box-shadow: 0 12px 38px rgba(146, 48, 255, .18);
}

.bottom-nav {
  position: fixed;
  left: max(16px, calc((100vw - 1180px) / 2 + 16px));
  right: max(16px, calc((100vw - 1180px) / 2 + 16px));
  bottom: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 3, 15, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
}

.bottom-nav button,
.quick-grid button,
.service-card button {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  font-weight: 900;
}

.bottom-nav button {
  min-width: 0;
  min-height: 70px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px 6px;
}

.bottom-nav span,
.quick-grid span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 10, 32, .92);
}

.bottom-nav b {
  display: block;
  font-size: 13px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.bottom-nav button.active {
  color: var(--text);
  border-color: rgba(206, 129, 255, .42);
  background: linear-gradient(145deg, rgba(92, 25, 139, .76), rgba(31, 10, 50, .9));
}

.bottom-nav button.active span,
.quick-grid span {
  background: linear-gradient(145deg, #7d14e8, #d566ff);
  color: #fff;
}

.panel,
.card,
.auth-box {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(16, 7, 24, .96), rgba(8, 2, 13, .96));
  border-radius: 8px;
}

.hero-card {
  border-radius: 8px;
  border-color: rgba(217, 128, 255, .45);
  background:
    linear-gradient(105deg, rgba(31, 6, 47, .92), rgba(112, 20, 174, .92) 58%, rgba(169, 42, 255, .92)),
    #300d49;
  color: var(--text);
}

.hero-card.pending-hero {
  color: var(--text);
  background:
    linear-gradient(105deg, rgba(39, 24, 7, .95), rgba(130, 76, 13, .9) 58%, rgba(255, 191, 64, .88)),
    #281605;
}

.hero-card h2 { font-size: clamp(28px, 7vw, 46px); }

.earn-card,
.profile-card {
  border: 1px solid rgba(206, 129, 255, .28);
  border-radius: 8px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(54, 12, 82, .96), rgba(87, 18, 131, .96) 66%, rgba(109, 22, 158, .94));
  box-shadow: var(--shadow), 0 1px 0 rgba(255,255,255,.06) inset;
}

.earn-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.earn-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.earn-card h2 {
  margin: 0;
  font-size: clamp(34px, 10vw, 56px);
  line-height: 1.05;
  color: #efc8ff;
}

.earn-card i {
  display: block;
  height: 1px;
  margin: 12px 0;
  background: rgba(255,255,255,.22);
}

.profile-screen {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(180deg, rgba(18, 7, 27, .96), rgba(9, 3, 14, .96));
}

.profile-card > div {
  min-width: 0;
  max-width: 100%;
}

.profile-card img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
}

.profile-card h2 {
  margin: 0;
  font-size: clamp(34px, 9vw, 56px);
  line-height: .95;
  overflow-wrap: anywhere;
}

.profile-card p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 28px;
  overflow-wrap: anywhere;
}

.profile-card strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--green-2);
  font-size: 26px;
  overflow-wrap: anywhere;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-grid button {
  min-height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 14px 8px;
  color: var(--text);
  background: rgba(12, 7, 13, .86);
  border-color: rgba(206, 129, 255, .2);
}

.quick-grid span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 22px;
}

.quick-grid b {
  font-size: 17px;
  line-height: 1.1;
}

.service-card,
.notifications {
  padding: 26px;
}

.service-card h2,
.notifications h2 {
  margin: 0 0 18px;
  font-size: 34px;
}

.service-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(206, 129, 255, .18);
  color: var(--text);
  font-size: 22px;
}

.service-card button b {
  color: var(--green-2);
  font-size: 22px;
}

.notice,
.empty-note {
  border: 1px dashed rgba(206, 129, 255, .25);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.notice.warn {
  border-style: solid;
  border-color: rgba(255, 200, 87, .44);
  color: #ffd675;
}

@media (max-width: 850px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body { min-width: 0; }
  .main {
    width: 100%;
    max-width: 100%;
    padding: 16px 14px 112px;
    overflow-x: hidden;
  }
  .panel,
  .card,
  .profile-card,
  .earn-card,
  .quick-grid,
  .service-card,
  .notifications,
  .profile-stats {
    min-width: 0;
    max-width: 100%;
  }
  .app-header {
    padding-top: 4px;
    margin-bottom: 14px;
  }
  .brand.mini {
    gap: 12px;
    min-width: 0;
  }
  .brand.mini img {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }
  .brand.mini h1 {
    font-size: clamp(30px, 10vw, 42px);
  }
  .brand.mini p {
    font-size: 17px;
    overflow-wrap: anywhere;
  }
  .logout-btn {
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 18px;
  }
  .topbar {
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .topbar h2 { font-size: 26px; }
  .topbar .btn { width: auto; padding: 10px 12px; }
  .hero-card {
    min-height: 164px;
    padding: 24px;
  }
  .grid.two,
  .grid.three,
  .profile-stats {
    grid-template-columns: 1fr;
  }
  .bottom-nav {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }
  .bottom-nav button {
    min-height: 66px;
    padding: 8px 4px;
  }
  .bottom-nav span {
    width: 34px;
    height: 34px;
    border-radius: 13px;
  }
  .bottom-nav b {
    font-size: 12px;
  }
  .bottom-nav button:nth-child(5) {
    grid-column: span 4;
    min-height: 54px;
    grid-template-columns: auto auto;
    justify-content: center;
  }
  .profile-card {
    padding: 20px;
    gap: 16px;
  }
  .profile-card img {
    width: 96px;
    height: 96px;
  }
  .profile-card p {
    font-size: 22px;
  }
  .profile-card strong {
    font-size: 17px;
  }
  .earn-card {
    padding: 22px;
  }
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .quick-grid button {
    min-height: 104px;
    padding: 10px 5px;
  }
  .quick-grid span {
    width: 48px;
    height: 48px;
  }
  .quick-grid b {
    font-size: 14px;
  }
  .service-card h2,
  .notifications h2 {
    font-size: 30px;
  }
  .service-card button,
  .service-card button b {
    font-size: 19px;
  }
  .kv {
    grid-template-columns: 1fr;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .brand.mini img { width: 54px; height: 54px; }
  .logout-btn { padding: 11px 12px; font-size: 16px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { left: 8px; right: 8px; }
  .profile-card { align-items: flex-start; }
  .profile-card img { width: 76px; height: 76px; }
}
