:root {
  --ink: #1c1915;
  --muted: #6f675d;
  --line: #e4dccf;
  --paper: #f6f1e8;
  --card: #fffdf8;
  --side: #221e19;
  --side-text: #efe7da;
  --copper: #b85c38;
  --copper-deep: #8d4124;
  --moss: #2f6b4f;
  --shadow: 0 18px 40px rgba(40, 28, 16, 0.08);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

body:not(.authed) .app,
body:not(.authed) .drawer { display: none; }
body.authed .gate { display: none; }

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: safe center;
  overflow-y: auto;
  padding: 24px;
  background:
    radial-gradient(circle at top left, #f3e6d4, transparent 42%),
    var(--paper);
}
.gate-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gate-card h1 { font-size: 40px; }
.gate-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.gate-card input {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
}
.gate-error { margin: 0; color: var(--copper-deep); font-size: 14px; }
.gate-ok { margin: 0; color: var(--moss); font-size: 14px; }
.gate-card .btn { margin-top: 6px; }
.gate-card .text-btn { align-self: flex-start; }
.gate-card[hidden] { display: none; }
.id-pop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 18, 28, 0.45);
}
.id-pop[hidden] { display: none; }
.id-pop-card {
  width: min(300px, 100%);
  background: #fffdf8;
  border-radius: 18px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(20, 24, 40, 0.22);
}
.id-pop-card h2 { margin: 0 0 6px; font-size: 26px; color: #1a5674; }
.id-pop-card p { margin: 0; color: #6f675d; font-size: 14px; }
.id-pop-card strong {
  display: block;
  margin: 10px 0 16px;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #1c1915;
}
.id-pop-card button {
  border: 0;
  border-radius: 10px;
  background: #1f6f62;
  color: #f4fff9;
  font-weight: 700;
  min-width: 96px;
  padding: 10px 22px;
}
#loginForm.login-locked label,
#loginForm.login-locked .btn.solid,
#loginForm.login-locked #loginNote { visibility: hidden; }
.promo-pop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 24, 36, 0.55);
}
.promo-pop[hidden] { display: none; }
.promo-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 6px;
  padding: 0 0 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.promo-card img {
  display: block;
  width: 100%;
  max-height: min(70vh, 560px);
  object-fit: contain;
  background: #fff;
}
.promo-card button {
  display: block;
  margin: 12px 14px 0 auto;
  border: 0;
  border-radius: 8px;
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
}
.promo-admin p { color: #6f675d; }
.promo-admin form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.promo-admin button[type="submit"] {
  border: 0;
  border-radius: 8px;
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
}
.promo-list { display: grid; gap: 12px; margin-top: 16px; }
.promo-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
}
.promo-item img { width: 92px; height: 72px; object-fit: cover; border-radius: 8px; background: #f4f6fb; }
.promo-item span { color: #6f675d; font-size: 13px; }
.promo-item button {
  border: 0;
  border-radius: 8px;
  background: #e11d48;
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
}

.gate:has(#signupForm:not([hidden])) {
  background:
    radial-gradient(circle at top left, #b7e8dc, transparent 42%),
    radial-gradient(circle at bottom right, #f6c7a8, transparent 38%),
    #f4f7f2;
}
#signupForm {
  background: linear-gradient(180deg, #e7f7f2 0%, #fffdf8 34%);
  border-color: #9ed4c4;
}
#signupForm .mark { background: #1f6f62; color: #f4fff9; }
#signupForm h1 { color: #1a5674; }
#signupForm label:nth-of-type(1) input { background: #fff1e8; border-color: #f0cbb8; }
#signupForm label:nth-of-type(2) input { background: #e8f6ef; border-color: #b7dfc8; }
#signupForm label:nth-of-type(3) input { background: #e7f3f8; border-color: #b9d7e6; }
#signupForm label:nth-of-type(4) input { background: #f8f1dc; border-color: #e4d09a; }
#signupForm label:nth-of-type(5) input { background: #f6eef8; border-color: #e0c6ea; }
#signupForm .btn.solid {
  background: linear-gradient(90deg, #1f6f62, #1d4e6e);
  border: 0;
  color: #f4fff9;
}

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  width: auto;
  background: var(--side);
  color: var(--side-text);
  padding: 22px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; flex: 0 0 auto; }
.brand strong { display: block; letter-spacing: 0.14em; font-size: 14px; }
.brand small { color: #b7ad9f; }
.mark {
  width: 40px; height: 40px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: #f3e6d4;
  color: var(--copper-deep);
  font-family: var(--serif);
  font-weight: 620;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-label {
  margin: 14px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9c9286;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #ddd4c6;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #b7ab9c;
}
.nav-item.active, .nav-item:hover { background: #322c26; color: white; }
.nav-item.active svg, .nav-item:hover svg { color: #f3e6d4; }
.nav-group { display: flex; flex-direction: column; }
#teamNav::after {
  content: "";
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}
#teamGroup.open #teamNav::after { transform: rotate(-135deg) translate(-1px, -1px); }
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 18px;
  padding-left: 8px;
  border-left: 1px solid #463f37;
}
.nav-sub[hidden] { display: none; }
.nav-subitem {
  border: 0;
  background: transparent;
  color: #ddd4c6;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-subitem.active, .nav-subitem:hover { background: #322c26; color: white; }

.side-card {
  margin-top: auto;
  background: #2c2722;
  border-radius: 16px;
  padding: 14px;
}
.side-card span, .side-card small { color: #b7ad9f; font-size: 12px; }
.side-card strong { display: block; font-family: var(--serif); font-size: 28px; margin: 2px 0 10px; }
.nav-logout {
  flex: 0 0 auto;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: #ff2f86;
  color: #fff;
  font-weight: 650;
  padding: 12px 14px;
}
.meter { height: 6px; background: #463f37; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #e7b56a, var(--copper)); }

.main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  container-type: inline-size;
  container-name: main;
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px 8px;
}
.crumb { display: flex; flex-direction: column; }
.crumb span { font-family: var(--serif); font-size: 22px; }
.crumb small { color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.mp-head h2 { margin: 0; font-size: 18px; }
.mp-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2f80ed;
  color: #fff;
  display: grid;
  place-items: center;
}
.mp-badge svg { width: 20px; height: 20px; }
.mp-card { padding: 18px; }
.mp-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.mp-person .avatar { width: 54px; height: 54px; background: #2f80ed; font-size: 16px; }
.mp-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid #eef1f6;
  color: #2c3348;
}
.mp-row b { justify-self: end; text-align: right; }
.mp-card .mp-row:first-child { border-top: 0; }
.mp-row em { font-style: normal; color: #6b7280; margin-right: 8px; }
.mp-file {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  color: #2c3348;
  font-weight: 650;
}
.mp-submit, .mp-logout {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
}
.mp-submit { margin-top: 16px; background: #5b4dff; color: #fff; }
.mp-logout { margin-top: 10px; background: #fff; color: #e11d48; border: 1px solid #f3c3ce; }
.mp-pass h3 { margin: 4px 0 14px; font-size: 16px; }
.mp-pass label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  color: #2c3348;
  font-size: 14px;
  font-weight: 650;
}
.mp-pass input {
  border: 1px solid #e4dccf;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 460;
  background: #fff;
}
.mp-pass .mp-submit { margin-top: 4px; }
.who strong { display: block; font-size: 14px; }
.who small { color: var(--muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1c1915; color: #f6f1e8; font-size: 13px;
}
.menu-btn { display: none; }

.icon-btn, .btn, .text-btn, .chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
}
.icon-btn { padding: 8px 14px; position: relative; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--copper);
}
.btn { padding: 11px 16px; }
.btn.solid { background: var(--ink); color: #f8f3ea; border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.solid:hover { background: #322c26; }
.text-btn { border: 0; background: transparent; color: var(--copper-deep); padding: 0; }

.view { display: none; padding: 12px 28px 40px; }
.view.active { display: block; }

.dash-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.dash-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.dash-options button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: left;
  font-weight: 560;
  color: var(--ink);
}
.dash-options button:hover { background: #f6f1e8; }
.balance {
  background: linear-gradient(145deg, #1f6f62 0%, #1d4e6e 58%, #c45c26 140%);
  color: #f6f1e8;
  border-radius: 22px;
  padding: 18px 20px;
}
.balance span, .balance small { color: #cbbfae; }
.balance strong { display: block; font-family: var(--serif); font-size: clamp(32px, 5vw, 42px); margin: 6px 0; }
.quick { display: grid; grid-template-columns: 1fr; gap: 8px; }
.quick .btn { width: 100%; border: 0; }
.quick .btn:nth-child(1) { background: #1f6f62; color: #f4fff9; }
.quick .btn:nth-child(2) { background: #c45c26; color: #fff8f3; }
.quick .btn:nth-child(3) { background: #1d4e6e; color: #f3f8fc; }
.eyebrow { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--copper-deep); margin: 0 0 8px; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.15; margin: 0; }
h1 em { font-style: italic; color: var(--copper-deep); }
.lede { color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stat {
  background: #241f1a;
  color: #f6f1e8;
  border-radius: 22px;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-stat span, .hero-stat small { color: #cbbfae; }
.hero-stat strong { font-family: var(--serif); font-size: 42px; margin: 8px 0; }

.stats, .wallet-row, .packs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.stats.slim { grid-template-columns: repeat(4, 1fr); }
.stats article, .wallet-card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.stats article, .wallet-card { padding: 16px 18px; }
.stats article:nth-child(1) { background: #fff1e8; border-color: #f0cbb8; }
.stats article:nth-child(2) { background: #e8f6ef; border-color: #b7dfc8; }
.stats article:nth-child(3) { background: #e7f3f8; border-color: #b9d7e6; }
.stats article:nth-child(4) { background: #f8f1dc; border-color: #e4d09a; }
.stats article:nth-child(1) strong { color: #9a3e1b; }
.stats article:nth-child(2) strong { color: #1d6a45; }
.stats article:nth-child(3) strong { color: #1a5674; }
.stats article:nth-child(4) strong { color: #8a6410; }
.stats span, .wallet-card span, .panel-h span { color: var(--muted); font-size: 13px; }
.stats strong, .wallet-card strong { display: block; font-family: var(--serif); font-size: 28px; margin: 4px 0; }
.stats small, .wallet-card small, .hint { color: var(--muted); }
.wallet-card.muted { background: transparent; }
.wallet-row { grid-template-columns: 1.3fr 1fr 1fr; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { padding: 18px 18px 8px; overflow-x: auto; }
.panel h2, .panel-h h2 { font-size: 16px; margin: 0; font-weight: 560; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.bars { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bars li { display: grid; grid-template-columns: 92px 1fr 80px; gap: 10px; align-items: center; font-size: 14px; }
.bars b { height: 8px; border-radius: 99px; background: #efe6d8; position: relative; }
.bars b::after {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: var(--ink);
}
.bars li:nth-child(1) b::after { background: #c45c26; }
.bars li:nth-child(2) b::after { background: #1f6f62; }
.bars li:nth-child(3) b::after { background: #1d4e6e; }
.bars li:nth-child(4) b::after { background: #c4962a; }
.bars li:nth-child(5) b::after { background: #7a4e8a; }
.bars em { font-style: normal; text-align: right; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 460; font-size: 12px; letter-spacing: 0.04em; }
th, td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.empty { color: var(--muted); text-align: center; padding: 28px 8px; }

#teamIntro[hidden], #teamStats[hidden], #downlinePanel[hidden], #levelCard[hidden] { display: none; }
#view-team.level-mode {
  background: #e8eaf2;
  margin: 0 16px 20px;
  border-radius: 16px;
  padding: 18px;
}
.level-card {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(28, 32, 48, 0.06);
  padding: 8px 18px 14px;
  max-width: 100%;
  overflow: visible;
}
.level-head { border-bottom: 1px solid #eceef3; }
.level-owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #2c3348;
}
.level-owner[hidden] { display: none; }
.level-owner button {
  border: 0;
  background: none;
  padding: 0;
  color: #e11d48;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.level-user {
  border: 0;
  background: none;
  padding: 0;
  color: #e11d48;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.level-pick { position: relative; display: inline-block; }
.level-pick-btn {
  border: 0;
  background: transparent;
  padding: 14px 2px 12px;
  font-size: 15px;
  font-weight: 500;
  color: #2c3348;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.level-pick-btn::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.level-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 4;
  min-width: 168px;
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(28, 32, 48, 0.14);
  padding: 6px;
}
.level-menu[hidden] { display: none; }
.level-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  color: #243044;
}
.level-menu button.on,
.level-menu button:hover { background: #1a73e8; color: #fff; }
.dt-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
  color: #2c3348;
  font-size: 14px;
}
.dt-show, .dt-filter { display: flex; align-items: center; gap: 8px; }
.dt-show select, .dt-filter input {
  border: 1px solid #d9dee8;
  background: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  color: #2c3348;
}
.dt-show select { width: 72px; }
.dt-filter input { width: 210px; }
.dt-filter input::placeholder { color: #9aa3b5; }
.level-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#view-team.level-mode .level-card { overflow: visible; }
.dt { font-size: 14px; width: 100%; min-width: 0; table-layout: fixed; }
.dt th, .dt td { border-bottom: 1px solid #eceef3; color: #2c3348; }
.dt th { padding: 8px 4px 10px; }
.dt th button {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2c3348;
  font-weight: 560;
}
.dt th button::after {
  content: "↕";
  color: #b0b7c6;
  font-size: 12px;
}
.dt th button.sorted[data-dir="asc"]::after { content: "↑"; color: #2c3348; }
.dt th button.sorted[data-dir="desc"]::after { content: "↓"; color: #2c3348; }
.dt td.dt-empty { text-align: center; color: #3d4d6b; padding: 14px 8px 18px; }
.dt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 6px;
  color: #2c3348;
  font-size: 14px;
}
.dt-pager { display: flex; gap: 8px; }
.dt-pager button {
  width: 34px;
  height: 32px;
  border: 1px solid #d5dbe6;
  background: #fff;
  border-radius: 6px;
  color: #2c3348;
}
.dt-pager button:disabled { color: #b0b7c6; }

.page-head h1 { font-size: 36px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.search {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 220px;
}

.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { padding: 8px 14px; }
.chip.on { background: var(--ink); color: #f8f3ea; border-color: var(--ink); }

.tree-wrap { overflow: auto; padding: 28px 12px 36px; }
.tree { display: flex; justify-content: center; min-width: 720px; }
.node { text-align: center; }
.node .person {
  display: inline-flex; flex-direction: column; gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  min-width: 120px;
}
.node .person b { font-weight: 560; }
.node .person span { color: var(--muted); font-size: 12px; }
.node.root .person { background: var(--ink); color: #f6f1e8; }
.node.root .person span { color: #cbbfae; }
.children { display: flex; justify-content: center; gap: 28px; margin-top: 28px; position: relative; }
.children::before {
  content: "";
  position: absolute; top: -16px; left: 18%; right: 18%;
  border-top: 1px solid #cfc4b4;
}
.child { position: relative; }
.child::before {
  content: "";
  position: absolute; top: -16px; left: 50%;
  height: 16px; border-left: 1px solid #cfc4b4;
}

.form { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 18px; }
.page-head .btn { margin-top: 4px; }
.methods {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.methods legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.form label.method {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}
.method:has(input:checked) { border-color: var(--ink); background: #f6f1e8; }
.method input { accent-color: var(--ink); }
.method span { display: flex; flex-direction: column; }
.method b { font-weight: 560; color: var(--ink); }
.method small { color: var(--muted); }
.payto {
  background: #241f1a;
  color: #f6f1e8;
  border-radius: 16px;
  padding: 14px 16px;
}
.payto span, .payto small { color: #cbbfae; }
.payto strong { display: block; font-family: var(--serif); font-size: 28px; margin: 4px 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
}

.timeline { list-style: none; margin: 8px 0 16px; padding: 0; }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: 13px; }
.pill { font-size: 12px; border-radius: 99px; padding: 4px 8px; background: #efe6d8; }
.pill.ok { background: #e5f2ea; color: var(--moss); }
.pill.wait { background: #f8ead8; color: #8a5a12; }

.packs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pack {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.pack.current { outline: 2px solid var(--ink); }
.pack strong { font-family: var(--serif); font-size: 32px; }
.pack ul { margin: 0; padding-left: 18px; color: var(--muted); }
.kyc-badge { display: inline-block; background: #e5f2ea; color: var(--moss); border-radius: 99px; padding: 6px 10px; }
.facts { margin: 12px 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.invite code {
  display: block;
  font-size: 20px;
  padding: 16px 0 8px;
  word-break: break-all;
}

.notice {
  margin: 8px 28px 0;
  background: #241f1a;
  color: #f6f1e8;
  border-radius: 14px;
  padding: 12px 14px;
}
.notice.ok, .notice.bad {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 80;
  transform: translateX(-50%);
  margin: 0;
  min-width: 240px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(20, 24, 40, 0.18);
}
.notice.ok { background: #16a34a; color: #fff; }
.notice.bad { background: #e11d48; color: #fff; }

.drawer { position: fixed; inset: 0; background: rgba(28, 25, 21, 0.28); display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-card { width: min(360px, 100%); background: var(--card); padding: 18px; }
.drawer-card header { display: flex; justify-content: space-between; align-items: center; }
.drawer-card ul { list-style: none; padding: 0; }
.drawer-card li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-card span { display: block; color: var(--muted); font-size: 13px; }

@container main (max-width: 720px) {
  .dash-top, .grid-2, .wallet-row, .lf-top { grid-template-columns: 1fr; }
  .stats, .packs, .dash-options, .lf-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(248px, 86vw);
    z-index: 5;
    transform: translateX(-105%);
    transition: 0.2s ease;
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; }
  .dash-top, .grid-2, .wallet-row, .lf-top { grid-template-columns: 1fr; }
  .stats, .packs, .dash-options, .lf-grid { grid-template-columns: 1fr 1fr; }
  h1, .page-head h1 { font-size: 28px; }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
  .notice { margin-left: 16px; margin-right: 16px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .who div { display: none; }
  .search { min-width: 0; width: 100%; }
  .panel-h { flex-wrap: wrap; gap: 8px; }
  .dt-tools, .dt-foot { flex-wrap: wrap; }
  .dt-filter input { width: min(210px, 100%); }
  .bars li { grid-template-columns: 72px minmax(0, 1fr) 72px; }
}

@media (max-width: 420px) {
  .stats, .packs, .dash-options, .lf-grid, .lf-top, .lf-pair { grid-template-columns: 1fr; }
  .stats strong, .wallet-card strong { font-size: 24px; }
}

#view-dashboard {
  background: #eef1f6;
  border-radius: 18px;
  margin: 4px 16px 28px;
  padding: 16px;
}
.member-news {
  position: relative;
  overflow: hidden;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fff;
  border-left: 4px solid #5b35f5;
}
.member-news[hidden] { display: none; }
.member-news-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 46px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #1e293b;
  font-weight: 650;
  animation: news-ltr 16s linear infinite;
}
@keyframes news-ltr {
  0% { left: 0; transform: translateX(-100%); }
  100% { left: 100%; transform: translateX(0); }
}
.ref-banner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(120deg, #163a5f, #4b3dff);
  color: #fff;
}
.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ref-banner span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #d9e4ff; }
.ref-banner strong { display: block; margin-top: 4px; font-size: 18px; }
.ref-share { display: flex; gap: 8px; }
.ref-share a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}
.ref-share svg { width: 18px; height: 18px; }
.ref-share .fb { background: #1877f2; }
.ref-share .wa { background: #25d366; }
.ref-share .x { background: #111; }
.ref-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
}
.ref-box code {
  flex: 1;
  min-width: 0;
  color: #1d4e6e;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-box button {
  border: 0;
  border-radius: 9px;
  background: #4b3dff;
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
}
.lf-top, .lf-grid {
  display: grid;
  gap: 12px;
}
.lf-top { grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.8fr); }
.lf-grid { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.lf-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(30, 30, 50, 0.04);
}
.lf-row, .lf-between, .lf-sponsor, .lf-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lf-row + .lf-row { margin-top: 14px; }
.lf-p2p { display: flex; align-items: center; gap: 10px; }
.lf-p2p .lf-btn { margin: 0; }
.lf-row span, .lf-card > span, .lf-between span, .lf-pair span {
  display: block;
  color: #8b93a7;
  font-size: 13px;
}
.lf-row b, .lf-card > b, .lf-between b, .lf-pair b {
  font-size: 18px;
  font-weight: 650;
}
.lf-pink { color: #ff2f86 !important; font-weight: 600; }
.lf-green { color: #18a957 !important; font-weight: 600; }
.lf-between small, .lf-card small {
  display: block;
  margin-top: 6px;
  color: #9aa3b5;
  font-size: 13px;
}
.lf-between small b, .lf-card small b { color: #1c1915; font-weight: 650; }
.lf-btn {
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 650;
  padding: 8px 14px;
}
.lf-btn.pink { background: #ff2f86; margin-top: 16px; }
.lf-btn.gold { background: #f5b400; color: #3a2a00; }
.lf-btn.green { background: #22c55e; }
.xfer { position: relative; flex: none; }
.xfer-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 248px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(24, 28, 52, 0.14);
  padding: 6px;
}
.xfer-menu[hidden] { display: none; }
.xfer-opt {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  color: #1c2433;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.xfer-opt + .xfer-opt { margin-top: 2px; }
.xfer-opt:hover { background: #eefbf3; color: #15803d; }
.xfer-choices[hidden], .xfer-form[hidden] { display: none; }
.xfer-form { display: grid; gap: 8px; padding: 8px 8px 6px; }
.xfer-where { margin: 0; color: #1c2433; font-size: 13px; font-weight: 700; }
.xfer-form label { display: grid; gap: 4px; color: #6b7280; font-size: 12px; font-weight: 650; }
.xfer-form input {
  width: 100%;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1c2433;
  font-size: 14px;
}
.xfer-form button {
  border: 0;
  border-radius: 8px;
  background: #22c55e;
  color: #fff;
  font-weight: 700;
  padding: 9px 12px;
}
.xfer-alert {
  margin: 0;
  background: #e11d48;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.xfer-alert[hidden] { display: none; }
.lf-trade { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; min-height: 148px; }
.lf-swap {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #6d4aff;
  color: #fff;
  display: grid;
  place-items: center;
}
.lf-swap svg { width: 20px; height: 20px; }
.lf-request {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.lf-request svg { width: 16px; height: 16px; }
#view-wdreq {
  background: #05070d;
  margin: 0 0 -40px;
  padding: 8px 16px 48px;
  min-height: calc(100vh - 88px);
  color: #e8eef8;
}
.rq-card {
  max-width: 760px;
  margin: 0 auto;
  background: #1c1236;
  border: 1px solid #322656;
  border-radius: 18px;
  padding: 26px 28px 20px;
}
.rq-bal { display: flex; justify-content: space-between; gap: 20px; }
.rq-bal span {
  display: block;
  color: #aeb6c8;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.rq-bal b { display: block; margin-top: 12px; font-size: 28px; font-weight: 500; }
.rq-line { height: 1px; margin: 18px 0 26px; background: #3d355c; }
.rq-go { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rq-go button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: #d01258;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.rq-go small { color: #c5cedd; font-size: 13px; }
.rq-form { max-width: 760px; margin: 22px auto 0; }
.rq-form h2 {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid #243044;
  text-align: center;
  font-size: 16px;
  font-weight: 650;
}
.rq-form label { display: block; margin-top: 18px; font-size: 15px; }
.rq-form input {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 16px;
}
.rq-form input[name="amount"] {
  border: 0;
  border-bottom: 1px solid #2c3a4e;
  background: transparent;
  color: #fff;
  padding: 10px 0;
}
.rq-form input[name="password"] {
  border: 0;
  background: #f4f7ff;
  color: #111827;
  padding: 12px;
}
.rq-form button {
  width: 100%;
  margin-top: 20px;
  border: 0;
  border-radius: 8px;
  background: #00a7e1;
  color: #fff;
  font-weight: 700;
  padding: 12px;
}
.pay-card {
  max-width: 760px;
  margin: 16px auto 0;
  background: #06281f;
  border: 1px solid #0e4a38;
  border-radius: 12px;
  padding: 16px 18px 8px;
  color: #d7efe6;
}
.pay-card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 650; }
.pay-facts { margin: 0; }
.pay-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #0e4a38;
}
.pay-facts dt { color: #d7efe6; }
.pay-facts dd { margin: 0; }
.pay-pending { color: #ff2f86; font-weight: 700; }
.pay-success { color: #22c55e; font-weight: 700; }
.pay-table { padding-bottom: 14px; }
.pay-table .dt-tools, .pay-table .dt-foot { color: #d7efe6; }
.pay-table .dt { width: 100%; border-collapse: collapse; }
.pay-table .dt th, .pay-table .dt td {
  border-bottom: 1px solid #0e4a38;
  padding: 10px 6px;
  text-align: left;
  color: #d7efe6;
}
.pay-table .dt-filter input, .pay-table .dt-show select {
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 4px;
  padding: 6px 8px;
}
.pay-table .dt-pager button {
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
}
.lf-title {
  margin: 18px 0 8px;
  font-size: 18px;
  font-weight: 650;
}
.lf-sponsor strong { display: block; }
.lf-sponsor small { color: #9aa3b5; }
.lf-sponsor > b { font-size: 22px; }
.lf-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8f1ff;
  color: #3b82f6;
  display: grid;
  place-items: center;
  flex: none;
}
.lf-avatar svg { width: 22px; height: 22px; }
.lf-sponsor div { flex: 1; }
.lf-pair { margin-top: 12px; }
.lf-pair div { flex: 1; }
.lf-blank { min-height: 72px; }
.lf-ref code {
  display: block;
  color: #8b93a7;
  font-size: 13px;
  margin-bottom: 12px;
}
.lf-share { display: flex; gap: 8px; }
.lf-share a, .lf-share button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 0;
  text-decoration: none;
  font-weight: 700;
}
.lf-share svg { width: 16px; height: 16px; }
.lf-share .fb { background: #1877f2; }
.lf-share .wa { background: #25d366; }
.lf-share .tg { background: #2aa4e4; }
.lf-share .x { background: #111; }
.lf-share .cp { background: #8b93a7; }

.view.shot {
  background: #eef1f6;
  border-radius: 18px;
  margin: 4px 16px 28px;
}
.shot-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px 8px;
  box-shadow: 0 1px 2px rgba(30, 30, 50, 0.04);
}
#view-support.support-desk {
  background: transparent;
  padding: 0;
}
.desk-hero {
  color: #f6f1e8;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 92, 56, 0.45), transparent 42%),
    #2a241f;
  border-radius: 22px;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.desk-kicker {
  margin: 0 0 4px;
  color: #e7b39a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.desk-hero h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 560;
  letter-spacing: -0.03em;
}
.ticket-card {
  background: #fffdf8;
  border: 1px solid #eadfce;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 16px 30px rgba(34, 24, 16, 0.16);
}
.desk-form { display: grid; gap: 12px; }
.desk-field { display: grid; gap: 6px; }
.desk-field span { color: #6f675d; font-size: 13px; font-weight: 650; }
.desk-field select,
.desk-field textarea {
  width: 100%;
  border: 1px solid #e4dccf;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: #1c1915;
  font-size: 15px;
}
.desk-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #b85c38 50%), linear-gradient(135deg, #b85c38 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.desk-field textarea { min-height: 92px; resize: vertical; }
#ticketMessageLabel[hidden],
#ticketSubmit[hidden] { display: none; }
.ticket-card button {
  justify-self: end;
  min-width: 148px;
  border: 0;
  border-radius: 999px;
  background: #b85c38;
  color: #fffdf8;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
}
#view-support .desk-list {
  margin-top: 14px;
  border: 1px solid #eadfce;
  border-radius: 22px;
  background: #fffdf8;
  overflow: hidden;
}
#view-support .desk-list .dt-tools { padding: 12px 14px 0; }
#view-support .desk-list .dt th { background: #f6f1e8; }
#memSupTable td.desk-status { color: #2f6b4f; font-weight: 700; }
.support-types {
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, #fff7f1 0%, #fffdf8 28%);
  border: 1px solid #eadfce;
}
.support-types .desk-kicker { color: #b85c38; }
.support-types .type-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.support-types .type-row input,
.support-types form input {
  flex: 1;
  border: 1px solid #e4dccf;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}
.support-types button {
  border: 0;
  border-radius: 999px;
  background: #b85c38;
  color: #fff;
  padding: 9px 14px;
  font-weight: 700;
}
.support-types .type-del { background: #ff2f86; }
.support-types form { display: flex; gap: 8px; margin-top: 12px; }
.biz-total { margin: 0 0 12px; color: #2c3348; }
.biz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.biz-grid .shot-card { min-height: 118px; }
.biz-month { margin-top: 12px; }
.shot-cols {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eceef3;
  padding-top: 10px;
  color: #2c3348;
  font-size: 14px;
}
.plain { width: 100%; border-collapse: collapse; }
.plain th, .plain td {
  text-align: left;
  padding: 9px 2px;
  border-bottom: 1px solid #eceef3;
  color: #2c3348;
  font-weight: 500;
}
.plain th:last-child, .plain td:last-child { text-align: right; }
.wd-bal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 16px;
}
.wd-bal span { display: block; color: #6b7280; font-size: 14px; }
.wd-bal b { display: block; margin-top: 8px; font-size: 22px; }
.wd-request {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 0;
}
.wd-request button {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 12px;
  background: #ff2f86;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}
.wd-request small { color: #2c3348; }
.wd-facts { margin: 0; }
.wd-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
}
.wd-facts dt { color: #6b7280; }
.wd-facts dd { margin: 0; }
.wd-red, .wd-link { color: #e11d48; }
.wd-link { border: 0; background: transparent; padding: 0; }
#view-withdraw .level-card { margin-top: 12px; }
.wid-card { padding: 18px 18px 20px; }
.wid-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #3b6fd8;
  font-size: 14px;
}
.wid-card input {
  border: 1px solid #e4e7ef;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: #1c1915;
}
.wid-card button {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: #5b4dff;
  color: #fff;
  padding: 12px 16px;
  font-weight: 650;
}
.tc-card { padding: 8px 0 4px; overflow-x: auto; }
.tc { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.tc th, .tc td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f6;
  color: #2c3348;
  font-weight: 500;
  white-space: nowrap;
}
.tc th { color: #8b93a7; font-weight: 560; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid currentColor;
}
.tag.long { color: #16a34a; }
.tag.short { color: #e11d48; }
.tc .up { color: #16a34a; }
.tc .down { color: #e11d48; }
.tc-date { color: #5b7fd6; font-size: 12px; line-height: 1.45; }

#view-deposit { display: none; }
#view-deposit.active { display: block; }
#depositHome { display: flex; flex-direction: column; gap: 14px; }
#depositHome[hidden], #depositAdd[hidden] { display: none; }
.dep-add { text-align: center; padding: 18px 16px 22px; }
.dep-add h2 { margin: 0 0 18px; font-size: 15px; font-weight: 500; color: #3a4154; }
.dep-add button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #f5a400;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
}
.dep-note { padding: 16px 18px 18px; }
.dep-note p { margin: 0 0 14px; color: #f04438; font-size: 14px; line-height: 1.45; }
.dep-note button {
  border: 0;
  border-radius: 6px;
  background: #f5a400;
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 650;
}
.add-bal {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(30, 30, 50, 0.06);
}
.add-bal-head {
  background: #6f6f6f;
  color: #fff;
  text-align: center;
  padding: 11px 12px;
  font-size: 14px;
}
.add-bal label {
  display: block;
  padding: 16px 16px 0;
  color: #222;
  font-size: 14px;
}
.add-bal input, .add-bal select {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e6e6e6;
  border-radius: 0;
  background: transparent;
  padding: 12px 0 10px;
  margin-top: 4px;
  color: #222;
  font-size: 15px;
  appearance: none;
}
.add-bal input::-webkit-outer-spin-button,
.add-bal input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-bal input { -moz-appearance: textfield; appearance: textfield; }
.add-bal button {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 0;
  background: #5b35f5;
  color: #fff;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 650;
}
.pay-box { padding: 16px 16px 0; text-align: center; color: #222; }
.pay-box p { margin: 8px 0; }
.pay-box img { width: 220px; height: 220px; margin: 12px auto; display: block; }
.pay-addr { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.pay-link {
  display: block;
  margin-top: 12px;
  color: #5b35f5;
  font-weight: 700;
}
#payState { color: #e11d48; font-weight: 650; }
.pay-again {
  border: 0;
  background: transparent;
  color: #5b35f5;
  font-weight: 700;
  cursor: pointer;
}
.user-link {
  border: 0;
  background: none;
  color: #e11d48;
  font-weight: 650;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}
#userList[hidden], #userManage[hidden] { display: none; }
.manage-user {
  background: #0b1224;
  border: 1px solid #1c2740;
  border-radius: 16px;
  padding: 18px 18px 16px;
  color: #fff;
}
.manage-user h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 650;
}
.manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.manage-pass, .manage-info { display: grid; align-content: start; gap: 8px; }
.manage-user label {
  display: grid;
  gap: 6px;
  color: #d7deea;
  font-size: 14px;
}
.manage-user input {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  padding: 8px 0;
  border-radius: 0;
}
.manage-title { margin-top: 8px; }
.manage-pass button, .manage-info button, .manage-block button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
}
.manage-pass button { justify-self: start; margin-top: 10px; background: #00a7e1; }
.manage-info button { justify-self: center; margin-top: 12px; background: #14b86a; min-width: 140px; }
.manage-block {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
#blockUser { background: #ff2f86; }
#unblockUser { background: #14b86a; }
@media (max-width: 800px) {
  .manage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .biz-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .lf-top { grid-template-columns: 1fr; }
  .ref-banner { flex-direction: column; align-items: stretch; }
  .ref-box code { max-width: 100%; }
}
@media (max-width: 420px) {
  .lf-grid, .lf-pair { grid-template-columns: 1fr; }
}

body.admin .gate,
body.admin .app { display: none; }
.admin-app { display: none; }
body.admin .admin-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: #eef1f6;
}
.admin-side {
  background: #f7f8fc;
  color: #2c3348;
  padding: 18px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #e6e9f2;
}
.admin-brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 10px; }
.admin-brand strong { display: block; letter-spacing: 0.14em; font-size: 14px; }
.admin-brand small { color: #8b93a7; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.anav-item {
  border: 0;
  background: transparent;
  color: #3a4158;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 560;
}
.anav-item svg { width: 20px; height: 20px; flex: 0 0 auto; color: #6d7589; }
.anav-item.active, .anav-item:hover { background: #e8ebf4; color: #1c2438; }
.anav-item.active svg { color: #3b4cca; }
.admin-logout {
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: #ff2f86;
  color: #fff;
  font-weight: 700;
  padding: 12px 14px;
}
.admin-main { min-width: 0; }
.aview { display: none; padding: 4px 28px 40px; }
.aview.active { display: block; }
.ad-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
}
.ad-join { display: flex; justify-content: space-between; gap: 16px; }
.ad-join span, .ad-income span { display: block; color: #8b93a7; font-size: 13px; }
.ad-join b, .ad-income b { display: block; margin-top: 8px; font-size: 28px; }
.ad-income { text-align: right; }
.lf-btn.ad-inline { margin-top: 0; }
.ad-ref { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ad-ref code { color: #5b6478; font-size: 14px; word-break: break-all; }
.ad-ref button {
  border: 0;
  border-radius: 8px;
  background: #5b4dff;
  color: #fff;
  padding: 8px 14px;
  font-weight: 650;
}
.level-card h2, .shot-card h2 { margin-top: 8px; }
.ad-table { overflow-x: auto; }
.ad-table .dt { table-layout: auto; min-width: 920px; }
.ad-table .dt th, .ad-table .dt td { white-space: nowrap; padding: 10px 12px; }
.ad-table .dt td.nm { color: #e11d48; font-weight: 560; }
.ad-table .tick { width: 16px; height: 16px; accent-color: #2563eb; }
.del-btn {
  border: 0;
  border-radius: 8px;
  background: #ff2f86;
  color: #fff;
  padding: 6px 16px;
  font-weight: 650;
}
.dt-left { display: flex; align-items: center; gap: 10px; }
.exp-btn {
  border: 0;
  border-radius: 8px;
  background: #9aa3b2;
  color: #fff;
  padding: 7px 16px;
  font-weight: 650;
}
.wd-search { margin-bottom: 12px; padding: 18px 18px 16px; }
.wd-search input, .wd-search select {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
  padding: 12px 2px;
  margin-bottom: 6px;
  color: #2c3348;
}
.wd-search button {
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  background: #12b981;
  color: #fff;
  padding: 8px 18px;
  font-weight: 700;
}
.wd-total { margin: 0 4px 10px; color: #2563eb; font-weight: 750; }
.ad-table .dt td.tx { color: #e11d48; }
.news-form { margin-bottom: 14px; }
.news-form label { display: block; margin-bottom: 16px; color: #2c3348; font-size: 14px; }
.news-form textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
}
.news-form input {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
  padding: 10px 2px;
  color: #2c3348;
}
.date-field { position: relative; display: block; }
.date-field input { cursor: pointer; padding-right: 36px; }
.cal-open {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}
.cal-open svg { width: 20px; height: 20px; display: block; }
.cal-pop {
  position: absolute;
  z-index: 30;
  width: 280px;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 12px;
}
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav strong { font-size: 14px; color: #1e293b; }
.cal-nav button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow span { font-size: 12px; color: #94a3b8; padding: 4px 0; }
.cal-days button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  cursor: pointer;
}
.cal-days button:hover { background: #e0f2fe; }
.cal-days button.on { background: #2563eb; color: #fff; }
.cal-days button:disabled { color: #cbd5e1; background: transparent; cursor: default; }
.news-form button[type="submit"], .wd-search button {
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: #12b981;
  color: #fff;
  padding: 8px 18px;
  font-weight: 700;
}
.pg-num {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
  font-weight: 650;
}
.pen-btn {
  border: 0;
  background: transparent;
  color: #e11d48;
  padding: 0;
  font-size: 16px;
}
#view-buypackage {
  display: none;
  background: #070b14;
  border-radius: 18px;
  margin: 4px 16px 28px;
  padding: 16px;
}
#view-buypackage.active { display: block; }
#buyHome { display: flex; flex-direction: column; gap: 16px; }
#buyHome[hidden], #buyPick[hidden] { display: none; }
.buy-wallet {
  background: linear-gradient(180deg, #3a1d78 0%, #24124f 100%);
  border: 1px solid #5b3d9a;
  border-radius: 16px;
  padding: 22px 22px 26px;
  text-align: center;
  color: #fff;
}
.buy-wallet p {
  margin: 0;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.buy-wallet strong {
  display: block;
  text-align: left;
  margin: 10px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 28px;
  font-weight: 650;
}
.buy-wallet button {
  width: 52px;
  height: 52px;
  margin-top: 22px;
  border: 0;
  border-radius: 12px;
  background: #ff2f86;
  color: #fff;
  display: inline-grid;
  place-items: center;
}
.buy-wallet svg { width: 26px; height: 26px; }
.buy-wallet span { display: block; margin-top: 8px; font-size: 14px; }
.buy-table {
  background: #0c3a34;
  border: 1px solid #1d6a5c;
  border-radius: 16px;
  padding: 8px 16px 12px;
  color: #e8fff8;
}
.buy-table .dt-tools,
.buy-table .dt-foot,
.buy-table .dt th,
.buy-table .dt td,
.buy-table .dt th button { color: #e8fff8; }
.buy-table .dt th, .buy-table .dt td { border-bottom-color: rgba(255, 255, 255, 0.16); }
.buy-table .dt th button::after { color: rgba(255, 255, 255, 0.45); }
.buy-table .dt td.dt-empty { color: #d5efe8; }
.buy-table .dt-show select,
.buy-table .dt-filter input {
  background: #fff;
  color: #1c1915;
}
.buy-table .dt-pager button { color: #1c1915; }
.buy-activate {
  background: #0b1224;
  border: 1px solid #1c2740;
  border-radius: 16px;
  padding: 18px 18px 0;
  color: #fff;
  overflow: hidden;
}
.buy-activate h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 16px;
  font-weight: 560;
}
.buy-activate label {
  display: block;
  margin: 0 4px 18px;
  color: #d7deea;
  font-size: 14px;
}
.buy-activate input,
.buy-activate select {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  padding: 8px 0 10px;
  border-radius: 0;
}
.buy-activate select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9aa6bd 50%), linear-gradient(135deg, #9aa6bd 50%, transparent 50%);
  background-position: calc(100% - 12px) 18px, calc(100% - 6px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.buy-activate button {
  width: calc(100% + 36px);
  margin: 22px -18px 0;
  border: 0;
  background: #00a7e1;
  color: #fff;
  padding: 12px 16px;
  font-weight: 650;
}
@media (max-width: 860px) {
  .admin-app { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 6;
    transform: translateX(-105%);
    transition: 0.2s ease;
    overflow: auto;
  }
  .admin-side.open { transform: none; }
  #adminMenu { display: inline-flex; }
  .ad-stats, .aview .lf-top { grid-template-columns: 1fr; }
  .aview { padding-left: 16px; padding-right: 16px; }
}

.side-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  padding: 0;
  background: rgba(12, 10, 8, 0.48);
}
.side-backdrop[hidden] { display: none; }

.pull-hint {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 80;
  transform: translateX(-50%);
  background: #1c1915;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(20, 24, 40, 0.2);
}
.pull-hint[hidden] { display: none; }

@media (max-width: 860px) {
  html, body {
    height: auto;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
  }
  .gate { overflow: visible; }
  .app, body.admin .admin-app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .app, .admin-app, .main { width: 100%; }
  .main, .admin-main {
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
  }
  .view, .aview, .level-card, .shot-card { min-width: 0; max-width: 100%; }
  .level-card { overflow-x: auto; }
  body.admin .admin-app {
    min-height: 100dvh;
    overflow: visible;
  }
  .admin-main {
    min-height: 0;
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
  }
  .sidebar, .admin-side {
    width: min(300px, 88vw);
    height: 100dvh;
    max-height: 100dvh;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 40;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.28);
  }
  .admin-side {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .admin-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .admin-logout { flex: 0 0 auto; margin-top: 8px; }
  .nav-item, .nav-subitem, .anav-item, .nav-logout, .admin-logout { min-height: 44px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f6f1e8;
    padding: max(10px, env(safe-area-inset-top)) 12px 8px;
  }
  body.admin .topbar { background: #eef1f6; }
  .menu-btn { min-height: 40px; }
  .crumb span { font-size: 20px; }
  .top-actions { width: auto; margin-left: auto; }
  .who div { display: block; }
  #view-dashboard {
    margin: 0 8px 16px;
    padding: 10px;
    border-radius: 14px;
  }
  .view, .aview { padding-left: 10px; padding-right: 10px; }
  .ref-head { flex-wrap: wrap; }
  .ref-banner strong { font-size: 16px; }
  .ref-box {
    flex-wrap: wrap;
    align-items: center;
    padding-left: 10px;
  }
  .ref-box code, .lf-ref code {
    flex: 1 1 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
  }
  .ref-box button { margin-left: auto; }
  .lf-between, .lf-row, .lf-pair { flex-wrap: wrap; }
  .lf-request { white-space: normal; text-align: left; max-width: 100%; }
  .lf-card:has(.xfer) { position: relative; overflow: visible; }
  .xfer { position: static; }
  .xfer-menu {
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .xfer-opt { white-space: normal; }
  .panel, .pay-table, .ad-table, .tc-card, .tree-wrap, .buy-table {
    max-width: 100%;
    overflow-x: auto;
  }
  input, select, textarea { max-width: 100%; }
  .buy-activate button { width: 100%; margin: 16px 0 0; }
  .gate { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .notice.ok, .notice.bad { width: min(320px, calc(100vw - 24px)); min-width: 0; }
}

@media (max-width: 640px) {
  .lf-grid, .stats, .packs, .dash-options, .ad-stats { grid-template-columns: 1fr; }
  .lf-card { padding: 14px; }
}

@media (max-width: 380px) {
  .who div { display: none; }
  .crumb span { font-size: 18px; }
  .ref-box button { padding: 9px 12px; }
}

@media (max-width: 860px) {
  .stats.slim { grid-template-columns: 1fr 1fr; }
  .stats.slim article { min-width: 0; }
  .stats.slim strong { font-size: 26px; overflow-wrap: anywhere; }
  .stats.slim span, .stats.slim small { overflow-wrap: anywhere; }
  .crumb { min-width: 0; flex: 1 1 auto; }
  .crumb span, .crumb small, .who strong, .who small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .who strong, .who small { max-width: 28vw; }
  .panel, .level-card, .pay-table, .desk-list, .ad-table, .tc-card {
    -webkit-overflow-scrolling: touch;
  }
  #teamTable, .dt { min-width: 620px; table-layout: auto; }
  #teamTable:has(td.empty), .dt:has(td.dt-empty), .dt:has(td.empty) { min-width: 0; }
  #teamTable th, #teamTable td { padding: 10px 4px; }
  .plain, .wd-facts, .pay-facts { min-width: 0; }
  .plain { width: 100%; }
  input, select, textarea { font-size: 16px; }
  .mp-row b, .wd-facts dd, .pay-facts dd { overflow-wrap: anywhere; }
  .ticket-card button { justify-self: stretch; width: 100%; }
  .gate-card h1 { font-size: 32px; }
  .gate-card { padding: 22px 18px; }
}

@media (max-width: 720px) {
  .tc-card { overflow: visible; padding: 4px 10px 10px; }
  .tc { min-width: 0; }
  .tc thead { display: none; }
  .tc, .tc tbody { display: block; }
  .tc tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 14px 4px;
    border-bottom: 1px solid #eef1f6;
  }
  .tc td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: auto;
    border: 0;
    padding: 0;
    white-space: normal;
  }
  .tc td:first-child {
    grid-column: 1 / -1;
    font-size: 16px;
    font-weight: 700;
  }
  .tc td:nth-child(6) { grid-column: 1 / -1; }
  .tc td:nth-child(n + 2)::before {
    color: #8b93a7;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .tc td:nth-child(2)::before { content: "Limit"; }
  .tc td:nth-child(3)::before { content: "Entry"; }
  .tc td:nth-child(4)::before { content: "Latest"; }
  .tc td:nth-child(5)::before { content: "Live"; }
  .tc td:nth-child(6)::before { content: "Date"; }
}

@media (max-width: 520px) {
  .promo-item { grid-template-columns: 72px minmax(0, 1fr); }
  .promo-item button { grid-column: 1 / -1; justify-self: start; }
  .methods { grid-template-columns: 1fr; }
  .mp-row { grid-template-columns: minmax(108px, 42%) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .panel, .pay-table, .ad-table, .level-card, .desk-list {
    overflow-x: visible;
  }
  #teamTable, #incomeTable, .dt, .ad-table .dt {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }
  #teamTable thead, #incomeTable thead, .dt thead { display: none; }
  #teamTable tbody, #incomeTable tbody, .dt tbody { display: block; }
  #teamTable tr, #incomeTable tr, .dt tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0 0 10px;
    padding: 12px 12px 14px;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
  }
  #teamTable td, #incomeTable td, .dt td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: auto;
    min-width: 0;
    border: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #teamTable td:first-child, #incomeTable td:first-child, .dt td:first-child {
    grid-column: 1 / -1;
    font-size: 16px;
    font-weight: 700;
  }
  #teamTable td[data-label]::before,
  #incomeTable td[data-label]::before,
  .dt td[data-label]::before {
    content: attr(data-label);
    color: #8b93a7;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  #teamTable td:first-child::before,
  #incomeTable td:first-child::before,
  .dt td:first-child::before {
    font-size: 11px;
    font-weight: 650;
  }
  #teamTable td:has(button), #incomeTable td:has(button), .dt td:has(button) {
    grid-column: 1 / -1;
  }
  #teamTable td:has(button) button,
  #incomeTable td:has(button) button,
  .dt td:has(button) button {
    width: 100%;
  }
  #teamTable tr:has(td[colspan]),
  #incomeTable tr:has(td[colspan]),
  .dt tr:has(td[colspan]) {
    display: block;
    background: transparent;
    border: 0;
    padding: 8px 4px 12px;
  }
  #teamTable td[colspan], #incomeTable td[colspan], .dt td[colspan],
  #teamTable td.empty, #incomeTable td.empty, .dt td.empty, .dt td.dt-empty {
    display: block;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
  }
  .tree { min-width: 0; width: max-content; }
  .tree-wrap { max-width: 100%; }

  #view-team.level-mode {
    background: #fff;
    margin: 0;
    padding: 0 8px 16px;
    border-radius: 0;
  }
  #view-team.level-mode .level-card {
    overflow: visible;
    background: #fff;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  #view-team.level-mode .level-head { border-bottom: 0; }
  #view-team.level-mode .level-pick-btn { padding: 2px 2px 8px; font-size: 14px; }
  #view-team.level-mode .level-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #view-team.level-mode .dt-tools {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
    font-size: 15px;
  }
  #view-team.level-mode .dt-filter { order: 1; flex: 1 1 auto; min-width: 0; }
  #view-team.level-mode .dt-show { order: 2; flex: 0 0 auto; }
  #view-team.level-mode .dt-filter input {
    width: 100%;
    min-width: 0;
    border-radius: 4px;
    padding: 6px 8px;
  }
  #view-team.level-mode .dt-show select { width: 62px; }
  #levelTable {
    display: table;
    width: max-content;
    min-width: 720px;
    table-layout: auto;
  }
  #levelTable thead { display: table-header-group; }
  #levelTable tbody { display: table-row-group; }
  #levelTable tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    gap: 0;
  }
  #levelTable th,
  #levelTable td {
    display: table-cell;
    width: auto;
    border-bottom: 1px solid #e6e8ef;
    padding: 10px 12px;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
  }
  #levelTable th { font-weight: 650; color: #2c3348; }
  #levelTable th button { gap: 0; font-size: 14px; font-weight: 650; }
  #levelTable th button::after { content: none; }
  #levelTable td::before { content: none; }
  #levelTable td button,
  #levelTable .level-user { width: auto; color: #1c1915; text-decoration: none; font-size: 14px; }
  #view-team.level-mode .dt-foot { font-size: 12px; padding-top: 10px; }
}
