
@theme {
    --color-apt-gold: #e0a82e;
    --color-apt-gold-bright: #fcd535;
    --color-apt-gold-deep: #f0b90b;
    --color-apt-ink: #eaecef;
    --color-apt-muted: #848e9c;
    --color-apt-bg: #0b0e11;
    --color-apt-surface: #1e2329;
  }

/* APTOS — Binance-style yellow / dark theme */
:root {
  --gold: #e0a82e;
  --gold-bright: #fcd535;
  --gold-deep: #f0b90b;
  --ink: #eaecef;
  --muted: #848e9c;
  --bg: #0b0e11;
  --surface: #1e2329;
  --surface-2: #2b3139;
  --line: #2b3139;
  --ok: #0ecb81;
  --warn: #e0a82e;
  --err: #f6465d;
  --on-gold: #181a20;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  --glow: 0 0 24px rgba(252, 213, 53, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

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

.sidebar {
  background: #0b0e11;
  color: #fff;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  margin: 4px 8px 28px;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(252, 213, 53, 0.4));
  transition: transform 0.35s var(--ease);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

.nav-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  margin: 2px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #b8ae95;
  cursor: pointer;
  font-size: 13.5px;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
}

.nav-ico {
  width: 1.15em;
  text-align: center;
  font-size: 0.95em;
  color: var(--gold);
  opacity: 0.85;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav:hover .nav-ico,
.nav.active .nav-ico {
  color: var(--gold-bright);
  opacity: 1;
}

.nav:hover .nav-ico {
  transform: scale(1.08);
}

.feature-ico {
  margin-right: 6px;
  color: var(--gold-bright);
}

#refreshBtn i,
#connectBtn i,
#connectScreenBtn i,
#registerBtn i,
#heroCta i,
#stakeBtn i,
#sellBtn i,
#claimBtn i,
#pauseBtn i,
button.primary i {
  margin-right: 6px;
}

.nav:hover {
  background: rgba(252, 213, 53, 0.08);
  color: var(--gold-bright);
  border-color: rgba(252, 213, 53, 0.22);
  transform: translateX(2px);
}

.nav.active {
  background: var(--surface-2);
  color: var(--gold-bright);
  border-color: transparent;
  box-shadow: none;
}

.nav[hidden] {
  display: none !important;
}

.support {
  margin-top: 28px;
  padding: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

main {
  padding: 22px;
  min-width: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 35, 41, 0.95);
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 18px;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.menu-toggle:hover {
  background: rgba(252, 213, 53, 0.1);
  border-color: rgba(252, 213, 53, 0.35);
}

.nav-backdrop {
  display: none;
}

.mobile-footer {
  display: none;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top h1 {
  margin: 0 0 5px;
  font-size: 25px;
  color: #eaecef;
}

.pill {
  border: 1px solid var(--line);
  background: rgba(30, 35, 41, 0.95);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
}

.pill .status {
  font-weight: 700;
}
.pill .status.on {
  color: var(--ok);
}
.pill .status.off {
  color: var(--err);
}
.pill .status.warn {
  color: var(--warn);
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin: 0;
  padding: 18px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  min-height: 128px;
  border: 1px solid var(--line);
  font: inherit;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease),
    filter 0.28s var(--ease);
}

.stats.will-animate .stat {
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.stats.is-in .stat {
  animation: stat-in 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 35%,
    rgba(255, 255, 255, 0.16) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.65s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.stat .stat-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120px 90px at var(--mx, 50%) var(--my, 40%),
    rgba(255, 255, 255, 0.18),
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.25s var(--ease);
}

.stat:hover .stat-glow,
.stat:focus-visible .stat-glow {
  opacity: 1;
}

.stat > * {
  position: relative;
  z-index: 1;
}

.stat:hover,
.stat:focus-visible {
  transform: translateY(-3px);
  border-color: #474d57;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  filter: none;
  outline: none;
}

.stat:hover::before,
.stat:focus-visible::before {
  transform: translateX(120%);
}

.stat:hover::after,
.stat:focus-visible::after {
  transform: scale(1.35) translate(-8px, -8px);
  opacity: 0.9;
}

.stat:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    var(--glow),
    0 0 0 2px rgba(252, 213, 53, 0.55),
    0 14px 28px rgba(0, 0, 0, 0.28);
}

.stat:active {
  transform: translateY(-2px) scale(0.985);
  filter: brightness(0.98);
  transition-duration: 0.1s;
}

.stat.is-hot {
  box-shadow: var(--glow), 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.stat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  border-radius: 9px;
  background: rgba(43, 49, 57, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  transition: transform 0.28s var(--ease), background 0.28s var(--ease);
}

.stat:hover .stat-ico,
.stat:focus-visible .stat-ico {
  transform: scale(1.06);
}

.stat small {
  color: var(--muted);
  opacity: 1;
  line-height: 1.25;
}

.stat strong {
  display: block;
  font-size: 22px;
  margin: 10px 0 4px;
  word-break: break-all;
  letter-spacing: -0.02em;
  color: var(--gold-bright);
  transition: transform 0.25s var(--ease);
}

.stat strong.stat-pulse {
  animation: stat-pulse 0.55s var(--ease);
}

.stat-hint {
  margin-top: auto;
  padding-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  color: var(--gold-bright);
}

.stat-hint i {
  margin-left: 4px;
  font-size: 10px;
}

.stat:hover .stat-hint,
.stat:focus-visible .stat-hint {
  opacity: 0.95;
  transform: translateY(0);
}

@keyframes stat-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes stat-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat,
  .stats.is-in .stat,
  .stat strong.stat-pulse,
  .stat::before {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
  .stat-hint {
    opacity: 0.75;
    transform: none;
  }
}

.purple,
.green,
.blue,
.orange,
.teal,
.stat.sc-gold,
.stat.sc-emerald,
.stat.sc-ink,
.stat.sc-mint,
.stat.sc-amber,
.stat.sc-copper,
.stat.sc-lime,
.stat.sc-steel,
.stat.sc-rose,
.stat.sc-champagne {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.stat.sc-gold .stat-ico,
.purple .stat-ico {
  color: var(--gold-bright);
  border-color: rgba(252, 213, 53, 0.28);
  background: rgba(252, 213, 53, 0.1);
}
.stat.sc-emerald .stat-ico,
.green .stat-ico {
  color: #0ecb81;
  border-color: rgba(14, 203, 129, 0.28);
  background: rgba(14, 203, 129, 0.1);
}
.stat.sc-ink .stat-ico,
.blue .stat-ico {
  color: var(--gold-deep);
  border-color: rgba(240, 185, 11, 0.28);
  background: rgba(240, 185, 11, 0.1);
}
.stat.sc-mint .stat-ico,
.teal .stat-ico {
  color: #2dbdb6;
  border-color: rgba(45, 189, 182, 0.28);
  background: rgba(45, 189, 182, 0.1);
}
.stat.sc-amber .stat-ico,
.orange .stat-ico {
  color: #e0a82e;
  border-color: rgba(224, 168, 46, 0.28);
  background: rgba(224, 168, 46, 0.1);
}
.stat.sc-copper .stat-ico {
  color: #f0b90b;
  border-color: rgba(240, 185, 11, 0.28);
  background: rgba(240, 185, 11, 0.1);
}
.stat.sc-lime .stat-ico {
  color: #0ecb81;
  border-color: rgba(14, 203, 129, 0.28);
  background: rgba(14, 203, 129, 0.1);
}
.stat.sc-steel .stat-ico {
  color: #929aa5;
  border-color: rgba(146, 154, 165, 0.28);
  background: rgba(146, 154, 165, 0.1);
}
.stat.sc-rose .stat-ico {
  color: #f6465d;
  border-color: rgba(246, 70, 93, 0.28);
  background: rgba(246, 70, 93, 0.1);
}
.stat.sc-champagne .stat-ico {
  color: var(--gold-bright);
  border-color: rgba(252, 213, 53, 0.28);
  background: rgba(252, 213, 53, 0.1);
}

.stat.sc-champagne small,
.stat.sc-champagne .stat-hint {
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
  width: 100%;
}

.hero-stack {
  grid-template-columns: 1fr;
}

.hero {
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 26px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-full {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 168px;
  padding: 28px 32px;
}

.hero-full-body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-full .hero-full-body p {
  max-width: 560px;
}

.hero-full-actions {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(252, 213, 53, 0.16), transparent 70%);
  pointer-events: none;
}

.hero h2 {
  font-size: 27px;
  margin: 0 0 12px;
  color: #eaecef;
}
.hero p {
  color: #848e9c;
  line-height: 1.5;
  max-width: 440px;
}

.hero button,
.primary,
button.primary {
  background: var(--gold-bright);
  color: var(--on-gold);
  border: 0;
  border-radius: 6px;
  padding: 12px 17px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
  box-shadow: none;
}

.hero button:hover:not(:disabled),
.primary:hover:not(:disabled),
button.primary:hover:not(:disabled) {
  background: var(--gold-deep);
  transform: translateY(-1px);
  box-shadow: none;
  filter: none;
}

.chart,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 19px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.panel:hover,
.chart:hover {
  border-color: #474d57;
  box-shadow: none;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.chart h3,
.panel h2 {
  margin: 0 0 10px;
  color: #eaecef;
}

.price {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-bright);
}

.chart svg {
  width: 100%;
  height: 130px;
  margin-top: 15px;
}

/* ---- Market card · BTC-linked reference ---- */
.market-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  width: 100%;
}

.market-full {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1.15fr);
  grid-template-areas:
    "head head"
    "price chart"
    "count chart"
    "slots chart"
    "sim chart"
    "kv kv"
    "rules rules";
  gap: 12px 20px;
  align-items: start;
}

.market-full .chart-head {
  grid-area: head;
}

.market-full .market-price-row {
  grid-area: price;
}

.market-full .market-countdown {
  grid-area: count;
}

.market-full .market-slots {
  grid-area: slots;
}

.market-full .market-sim {
  grid-area: sim;
}

.market-full .mchart {
  grid-area: chart;
  margin-top: 0;
  min-height: 280px;
  height: 100%;
  align-self: stretch;
}

.market-full .mchart-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 220px;
}

.market-full .market-kv {
  grid-area: kv;
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, auto) minmax(0, 1fr));
  gap: 10px 18px;
  align-items: baseline;
}

.market-full .market-rules {
  grid-area: rules;
}

.market-card .chart-head h3 {
  margin-bottom: 2px;
}

.market-sub {
  margin: 0;
  letter-spacing: 0.04em;
}

.market-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.market-delta {
  text-align: right;
  flex-shrink: 0;
}

.market-delta-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(252, 213, 53, 0.12);
  border: 1px solid var(--line);
  color: var(--gold-bright);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.market-delta.is-up .market-delta-badge {
  background: rgba(62, 207, 142, 0.14);
  border-color: rgba(62, 207, 142, 0.35);
  color: var(--ok);
}

.market-delta.is-down .market-delta-badge {
  background: rgba(232, 93, 108, 0.14);
  border-color: rgba(232, 93, 108, 0.35);
  color: var(--err);
}

.market-delta-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.market-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b0e11;
  border: 1px solid var(--line);
}

.market-countdown-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.market-countdown-ring svg {
  width: 52px;
  height: 52px;
  margin: 0;
  transform: rotate(-90deg);
}

.mcr-bg,
.mcr-fg {
  fill: none;
  stroke-width: 3;
}

.mcr-bg {
  stroke: rgba(252, 213, 53, 0.12);
}

.mcr-fg {
  stroke: var(--gold-bright);
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 0.6s var(--ease), stroke 0.3s ease;
}

.market-countdown-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--gold-bright);
}

.market-countdown-meta .eyebrow {
  margin-bottom: 2px;
}

.market-countdown-meta strong {
  display: block;
  font-size: 14px;
  color: #eaecef;
}

.market-countdown-meta .muted {
  font-size: 12px;
  margin-top: 2px;
}

.market-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.market-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0b0e11;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.market-slot span {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: inherit;
}

.market-slot small {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.market-slot:hover {
  border-color: rgba(252, 213, 53, 0.35);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

.market-slot.is-past {
  opacity: 0.55;
}

.market-slot.is-active {
  border-color: rgba(240, 185, 11, 0.55);
  background: rgba(252, 213, 53, 0.1);
  color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(252, 213, 53, 0.16);
}

.market-slot.is-next {
  border-color: rgba(62, 207, 142, 0.45);
  color: var(--ok);
  animation: market-pulse 1.8s var(--ease) infinite;
}

.market-slot.is-selected {
  outline: 1px solid var(--gold-bright);
  outline-offset: 1px;
}

@keyframes market-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.25);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(62, 207, 142, 0);
  }
}

.market-sim .eyebrow {
  margin-bottom: 8px;
}

.market-sim-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.market-sim-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #0b0e11;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.market-sim-btn strong {
  font-size: 15px;
  font-family: var(--mono);
}

.market-sim-btn.green {
  border-color: rgba(62, 207, 142, 0.28);
}

.market-sim-btn.green i,
.market-sim-btn.green strong {
  color: var(--ok);
}

.market-sim-btn.red {
  border-color: rgba(232, 93, 108, 0.28);
}

.market-sim-btn.red i,
.market-sim-btn.red strong {
  color: var(--err);
}

.market-sim-btn:hover {
  transform: translateY(-1px);
}

.market-sim-btn.green:hover,
.market-sim-btn.green.is-active {
  background: rgba(62, 207, 142, 0.1);
  border-color: rgba(62, 207, 142, 0.55);
}

.market-sim-btn.red:hover,
.market-sim-btn.red.is-active {
  background: rgba(232, 93, 108, 0.1);
  border-color: rgba(232, 93, 108, 0.55);
}

.market-sim-result {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  min-height: 2.6em;
}

.market-sim-result b {
  color: var(--ink);
}

/* ---- Binance-style APT candle chart ---- */
.mchart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b0e11;
  overflow: hidden;
}

.mchart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 0;
}

.mchart-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #eaecef;
}

.mchart-pair img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.mchart-tf-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.22);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.04em;
}

.mchart-tfs {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 2px;
}

.mchart-tf {
  border: 0;
  background: transparent;
  color: #848e9c;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mchart-tf:hover {
  color: #eaecef;
}

.mchart-tf.is-active {
  background: rgba(240, 185, 11, 0.14);
  color: #f0b90b;
}

.mchart-ohlc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 2px 10px 0;
  font-size: 11px;
  font-family: var(--mono);
  color: #848e9c;
}

.mchart-ohlc b {
  color: #eaecef;
  font-weight: 600;
}

.mchart-ohlc.is-up b,
.mchart-ohlc.is-up .mchart-chg {
  color: #0ecb81;
}

.mchart-ohlc.is-down b,
.mchart-ohlc.is-down .mchart-chg {
  color: #f6465d;
}

.mchart-chg {
  font-weight: 700;
}

.mchart-stage {
  position: relative;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
}

.mchart-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mchart-tip {
  position: absolute;
  z-index: 3;
  min-width: 128px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(30, 35, 41, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-family: var(--mono);
  color: #848e9c;
  pointer-events: none;
  line-height: 1.55;
}

.mchart-tip b {
  color: #eaecef;
  font-weight: 600;
}

.mchart-tip .tip-time {
  color: #eaecef;
  font-weight: 700;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mchart-tip .tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.mchart-tip.is-up b.tip-c {
  color: #0ecb81;
}

.mchart-tip.is-down b.tip-c {
  color: #f6465d;
}

.mchart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 0 10px 8px;
  font-size: 10px;
  color: #848e9c;
}

.mchart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mchart-legend i {
  display: inline-block;
  width: 8px;
  height: 10px;
  border-radius: 1px;
}

.mchart-legend .up i {
  background: #0ecb81;
}

.mchart-legend .down i {
  background: #f6465d;
}

.mchart-legend .proj i {
  background: transparent;
  border: 1px dashed #f0b90b;
}

.market-kv {
  margin: 2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.market-rules {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.market-rules summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-bright);
  user-select: none;
}

.market-rules summary::-webkit-details-marker {
  display: none;
}

.market-rules summary i {
  opacity: 0.85;
}

.market-rules ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.market-rules li + li {
  margin-top: 4px;
}

.market-rules b {
  color: var(--ink);
  font-weight: 600;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  transition:
    transform 0.25s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
}

.feature:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.4);
  box-shadow: var(--glow);
}

.feature b {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-bright);
}
.feature p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  margin-bottom: 14px;
}
.panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---- Dashboard · My Staking + Account ---- */
.dash-side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(252, 213, 53, 0.05), transparent 40%),
    var(--surface);
}

.dash-side-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(252, 213, 53, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

.dash-side-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.dash-side-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-side-ico {
  color: var(--gold-bright);
  font-size: 0.9em;
}

.dash-side-sub {
  margin: 4px 0 0;
}

.dash-side-pill {
  flex-shrink: 0;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(252, 213, 53, 0.35);
  background: rgba(252, 213, 53, 0.1);
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition:
    transform 0.25s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.dash-side-pill.has-stakes {
  background: rgba(14, 203, 129, 0.12);
  border-color: rgba(14, 203, 129, 0.35);
  color: var(--ok);
  animation: dashPillPop 0.4s var(--ease) both;
}

@keyframes dashPillPop {
  from {
    transform: scale(0.85);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.dash-stake-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  position: relative;
}

.dash-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 22px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(11, 14, 17, 0.25);
  animation: dashFadeUp 0.4s var(--ease) both;
}

.dash-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.dash-empty p {
  margin: 0;
}

.dash-empty-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: var(--gold);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.2);
}

.dash-stake-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
  animation: dashFadeUp 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}

.dash-stake-card:hover,
.dash-stake-card:focus-visible {
  border-color: rgba(240, 185, 11, 0.55);
  background: rgba(252, 213, 53, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  outline: none;
}

.dash-stake-card:active {
  transform: translateY(0);
}

.dash-stake-idx {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
}

.dash-stake-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-stake-meta strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.dash-stake-meta small {
  color: var(--muted);
  font-size: 12px;
}

.dash-stake-plan {
  color: var(--gold);
  font-weight: 700;
}

.dash-stake-card .tag {
  justify-self: end;
}

.dash-acct {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  min-height: 148px;
}

.dash-acct-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: dashFadeUp 0.4s var(--ease) both;
  transition: border-color 0.2s var(--ease);
}

.dash-acct-hero:not(.is-offline):hover {
  border-color: rgba(240, 185, 11, 0.45);
}

.dash-acct-hero.is-offline {
  opacity: 0.85;
}

.dash-acct-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 20px rgba(252, 213, 53, 0.2);
  transition: transform 0.3s var(--ease);
}

.dash-acct-hero:hover .dash-acct-avatar {
  transform: rotate(-6deg) scale(1.05);
}

.dash-acct-wallet {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-acct-wallet small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-acct-wallet strong {
  color: var(--gold-bright);
  font-size: 15px;
  word-break: break-all;
}

.dash-acct-wallet strong a {
  color: inherit;
  text-decoration: none;
}

.dash-acct-wallet strong a:hover {
  text-decoration: underline;
}

.dash-acct-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dash-acct-tile {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.28);
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.15s var(--ease);
  animation: dashFadeUp 0.4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.dash-acct-tile:hover {
  border-color: #474d57;
  background: rgba(252, 213, 53, 0.05);
  transform: translateY(-1px);
}

.dash-acct-tile small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-acct-tile strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  word-break: break-all;
  line-height: 1.35;
}

.dash-side-actions {
  margin-top: auto;
  position: relative;
}

.dash-side-actions .primary i {
  margin-left: 6px;
  font-size: 0.85em;
  transition: transform 0.2s var(--ease);
}

.dash-side-actions .primary:hover i {
  transform: translateX(3px);
}

@keyframes dashFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.packages,
.plans,
.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.select-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
}

.select-card:hover {
  border-color: rgba(240, 185, 11, 0.5);
  transform: translateY(-1px);
}

.select-card.selected {
  border-color: var(--gold);
  background: rgba(252, 213, 53, 0.1);
  color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold), var(--glow);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 14px 0 7px;
  color: #929aa5;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: #0b0e11;
  font-family: inherit;
  color: var(--ink);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(252, 213, 53, 0.14);
}

input.mono {
  font-family: var(--mono);
  font-size: 13px;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  padding: 10px 14px;
  transition:
    filter 0.15s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
  border-color: rgba(252, 213, 53, 0.4);
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sm {
  padding: 6px 10px;
  font-size: 12px;
}

.row-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

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

.summary {
  background: rgba(252, 213, 53, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
}

.row strong {
  color: #eaecef;
}

.success {
  color: var(--ok);
}
.danger {
  color: var(--err);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  color: #e8e0cc;
}

td.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.tag {
  background: rgba(62, 207, 142, 0.15);
  color: var(--ok);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid rgba(62, 207, 142, 0.25);
}

.tag.warn {
  background: rgba(252, 213, 53, 0.12);
  color: var(--warn);
  border-color: rgba(252, 213, 53, 0.28);
}

.tag.off {
  background: rgba(232, 93, 108, 0.12);
  color: var(--err);
  border-color: rgba(232, 93, 108, 0.25);
}

.hidden {
  display: none !important;
}

.notice {
  padding: 12px;
  background: rgba(62, 207, 142, 0.12);
  color: var(--ok);
  border: 1px solid rgba(62, 207, 142, 0.25);
  border-radius: 9px;
  margin-bottom: 14px;
  font-size: 13px;
}

.notice.err {
  background: rgba(232, 93, 108, 0.12);
  color: var(--err);
  border-color: rgba(232, 93, 108, 0.25);
}

.notice.warn {
  background: rgba(252, 213, 53, 0.1);
  color: var(--warn);
  border-color: rgba(252, 213, 53, 0.28);
}

.wide {
  width: 100%;
}

.field-err {
  color: var(--err);
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}

.kv {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 8px 14px;
  font-size: 13px;
  margin: 0;
}

.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  word-break: break-all;
  color: #efe7d2;
}
.kv dd.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ---- My Profile ---- */
.panel-profile {
  overflow: hidden;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.profile-head h2 {
  margin-bottom: 4px;
}

.profile-sub {
  margin: 0;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin: 14px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: profileIn 0.45s var(--ease) both;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
}

.profile-wallet-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-wallet {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
  word-break: break-all;
}

.profile-wallet a {
  color: inherit;
  font-weight: inherit;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
  font-size: 12px;
  color: var(--ink);
}

.profile-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(252, 213, 53, 0.55);
}

.profile-sponsor {
  text-align: right;
  min-width: 120px;
}

.profile-sponsor .muted {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.profile-sponsor strong {
  color: #eaecef;
  font-size: 13px;
  word-break: break-all;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.profile-stat {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(30, 35, 41, 0.85);
  transition:
    transform 0.25s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
  animation: profileIn 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.05s);
}

.profile-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.4);
  box-shadow: var(--glow);
}

.profile-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.profile-stat-label i {
  color: var(--gold);
  font-size: 12px;
}

.profile-stat strong {
  display: block;
  font-size: 18px;
  color: #eaecef;
  word-break: break-word;
}

.profile-cap {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(252, 213, 53, 0.04);
  margin: 14px 0;
}

.profile-cap-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 10px;
}

.profile-cap-head strong {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.profile-cap-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line);
}

.profile-cap-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  box-shadow: 0 0 12px rgba(252, 213, 53, 0.45);
  transition: width 0.7s var(--ease);
}

.profile-cap-hint {
  margin: 8px 0 0;
}

.profile-ref {
  margin: 16px 0;
}

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

.profile-ref-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.profile-ref-row input {
  flex: 1;
  min-width: 0;
}

.profile-section-title {
  margin: 8px 0 12px;
  font-size: 14px;
  color: #eaecef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-section-title i {
  color: var(--gold);
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contract-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.contract-card:hover {
  border-color: rgba(252, 213, 53, 0.35);
  transform: translateY(-1px);
}

.contract-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contract-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(30, 35, 41, 0.95);
  color: var(--gold-bright);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s var(--ease),
    border-color 0.15s var(--ease),
    transform 0.15s var(--ease);
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(252, 213, 53, 0.1);
  border-color: rgba(240, 185, 11, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffe08a;
}

.icon-btn.copied {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.45);
}

@keyframes profileIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: #ffe08a;
  text-decoration: underline;
}

#toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 32px));
}

.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  word-break: break-word;
  animation: toast-in 0.28s var(--ease);
}

.toast.ok {
  border-left-color: var(--ok);
}
.toast.err {
  border-left-color: var(--err);
}
.toast.info {
  border-left-color: var(--gold);
}
.toast.warn {
  border-left-color: var(--warn);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-gate {
  padding: 18px;
  border: 1px dashed rgba(252, 213, 53, 0.45);
  border-radius: 12px;
  background: rgba(252, 213, 53, 0.04);
  margin: 12px 0;
}

.auth-gate h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--gold-bright);
}

.gate-screen {
  max-width: 480px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), var(--glow);
  animation: gate-in 0.45s var(--ease);
}

@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gate-screen .gate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 22px;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.gate-screen .gate-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(240, 185, 11, 0.5));
  animation: coin-spin 8s linear infinite;
}

@keyframes coin-spin {
  0%,
  92%,
  100% {
    transform: rotateY(0deg);
  }
  96% {
    transform: rotateY(180deg);
  }
}

.gate-screen h2 {
  margin: 0 0 10px;
  font-size: 26px;
  color: #eaecef;
}
.gate-screen p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
}
.gate-screen .gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.gate-screen .gate-form {
  text-align: left;
  margin-top: 8px;
}

/* ---- Login gate (interactive) ---- */
.login-gate {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  max-width: 440px;
  padding: 40px 34px 32px;
  border: 1px solid rgba(252, 213, 53, 0.22);
  background:
    linear-gradient(165deg, rgba(30, 35, 41, 0.98) 0%, rgba(11, 14, 17, 0.99) 100%);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(252, 213, 53, 0.06) inset,
    0 0 40px rgba(252, 213, 53, 0.1);
  transition:
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.login-gate:hover {
  border-color: rgba(252, 213, 53, 0.45);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(252, 213, 53, 0.1) inset,
    0 0 56px rgba(252, 213, 53, 0.18);
  transform: translateY(-2px);
}

.login-gate-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(252, 213, 53, 0.18),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: login-glow-pulse 4.5s ease-in-out infinite;
}

.login-gate-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(252, 213, 53, 0.07) 48%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: login-card-shine 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.login-gate > *:not(.login-gate-glow):not(.login-gate-shine) {
  position: relative;
  z-index: 1;
}

@keyframes login-glow-pulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes login-card-shine {
  0%,
  100% {
    background-position: 120% 0;
  }
  50% {
    background-position: -20% 0;
  }
}

.login-brand {
  margin-bottom: 18px;
  animation: login-rise 0.5s var(--ease) both;
}

.login-logo-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(252, 213, 53, 0.35),
    rgba(240, 185, 11, 0.12) 55%,
    transparent 70%
  );
  box-shadow:
    0 0 0 1px rgba(252, 213, 53, 0.3),
    0 0 22px rgba(252, 213, 53, 0.3);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.login-gate:hover .login-logo-ring {
  box-shadow:
    0 0 0 1px rgba(252, 213, 53, 0.55),
    0 0 32px rgba(240, 185, 11, 0.5);
  transform: scale(1.04);
}

.login-logo-ring img {
  width: 48px !important;
  height: 48px !important;
}

.login-eyebrow {
  margin-bottom: 10px;
  letter-spacing: 0.16em;
  font-size: 11px;
  animation: login-rise 0.5s var(--ease) 0.06s both;
}

.login-title {
  animation: login-rise 0.5s var(--ease) 0.12s both;
}

.login-copy {
  animation: login-rise 0.5s var(--ease) 0.18s both;
}

.login-meta {
  margin: 4px 0 22px;
  padding: 14px 16px;
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  animation: login-rise 0.5s var(--ease) 0.24s both;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.login-meta:hover {
  border-color: rgba(240, 185, 11, 0.28);
  background: rgba(252, 213, 53, 0.04);
}

.login-kv {
  margin: 0;
  gap: 12px 16px;
}

.login-kv dt {
  font-size: 12.5px;
  align-self: center;
}

.login-kv dd {
  font-size: 13.5px;
  text-align: right;
  align-self: center;
}

.login-kv dd a,
.login-kv dd .mono {
  color: var(--gold-bright);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  transition: color 0.2s var(--ease);
}

.login-kv dd a:hover {
  color: #ffe9a8;
  text-decoration: underline;
}

.login-kv .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 0 12px rgba(62, 207, 142, 0.2);
  animation: login-tag-pulse 2.4s ease-in-out infinite;
}

.login-kv .tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}

@keyframes login-tag-pulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(62, 207, 142, 0.18);
  }
  50% {
    box-shadow: 0 0 18px rgba(62, 207, 142, 0.35);
  }
}

.login-actions {
  animation: login-rise 0.5s var(--ease) 0.3s both;
}

.login-btn {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 12px;
  box-shadow:
    0 8px 24px rgba(252, 213, 53, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.login-btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.login-btn:hover:not(:disabled) .login-btn-shine {
  animation: login-btn-sweep 0.7s var(--ease);
}

.login-btn:hover:not(:disabled) {
  box-shadow:
    0 12px 32px rgba(240, 185, 11, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.login-btn.is-loading {
  pointer-events: none;
  opacity: 0.88;
}

.login-btn.is-loading .login-btn-label::after {
  content: "…";
  animation: login-dots 1s steps(3, end) infinite;
}

.login-btn.is-loading i {
  animation: spin 0.7s linear infinite;
}

@keyframes login-btn-sweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes login-dots {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "…";
  }
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Auth gates: hide dashboard chrome */
.app.locked,
.app.locked-register,
.app.locked-login {
  display: block;
  min-height: 100vh;
  background: var(--bg);
}

.app.locked .sidebar,
.app.locked-register .sidebar,
.app.locked-login .sidebar,
.app.locked .top,
.app.locked-register .top,
.app.locked-login .top,
.app.locked #footerNet,
.app.locked-register #footerNet,
.app.locked-login #footerNet,
.app.locked .mobile-footer,
.app.locked-register .mobile-footer,
.app.locked-login .mobile-footer,
.app.locked .menu-toggle,
.app.locked-register .menu-toggle,
.app.locked-login .menu-toggle,
.app.locked .nav-backdrop,
.app.locked-register .nav-backdrop,
.app.locked-login .nav-backdrop {
  display: none !important;
}

.app.locked main,
.app.locked-register main,
.app.locked-login main {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app.locked main > #notice,
.app.locked-register main > #notice,
.app.locked-login main > #notice {
  width: 100%;
  max-width: 480px;
  margin-bottom: 14px;
}

.app.locked main > #connect,
.app.locked-register main > #register,
.app.locked-login main > #login {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Page enter + loading */
main > section:not(.hidden) {
  animation: page-in 0.3s var(--ease);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.app.is-refreshing #refreshBtn {
  pointer-events: none;
}

.app.is-refreshing #refreshBtn i {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.logo-mark {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
  object-fit: contain;
}

@media (max-width: 950px) {
  .app:not(.locked):not(.locked-register):not(.locked-login) {
    grid-template-columns: 175px 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid,
  .hero-stack {
    grid-template-columns: 1fr;
  }
  .hero-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
  }
  .hero-full-actions {
    width: 100%;
  }
  .market-full {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "price"
      "count"
      "slots"
      "sim"
      "chart"
      "kv"
      "rules";
  }
  .market-full .mchart {
    min-height: 240px;
  }
  .market-full .mchart-stage {
    min-height: 180px;
  }
  .market-full .market-kv {
    grid-template-columns: repeat(2, minmax(88px, auto) minmax(0, 1fr));
  }
  .market-sim-btns {
    grid-template-columns: 1fr 1fr;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .lower {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: relative;
  }
  .profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profile-hero {
    grid-template-columns: auto 1fr;
  }
  .profile-sponsor {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 4px;
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 951px) and (max-width: 1200px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app:not(.locked):not(.locked-register):not(.locked-login) {
    display: block;
  }

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

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(11, 14, 17, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }

  .app.menu-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app.menu-open .nav-backdrop[hidden] {
    display: block !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: min(288px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding: 18px 14px 90px;
    overflow: auto;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  .app.menu-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    margin: 4px 8px 20px;
  }

  .nav-wrap {
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 2px;
  }

  .nav {
    white-space: normal;
    width: 100%;
    margin: 2px 0;
  }

  .support {
    display: block;
  }

  main {
    padding: 13px 13px 88px;
  }

  .app.locked main,
  .app.locked-register main,
  .app.locked-login main {
    padding: 20px 14px;
  }

  .mobile-footer {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, #1e2329 0%, #0b0e11 100%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  }

  .m-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 8px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #848e9c;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition:
      color 0.2s var(--ease),
      background 0.2s var(--ease);
  }

  .m-nav i {
    font-size: 16px;
    color: var(--gold);
    opacity: 0.8;
  }

  .m-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-nav:hover,
  .m-nav.active {
    color: var(--gold-bright);
    background: rgba(252, 213, 53, 0.08);
  }

  .m-nav:hover i,
  .m-nav.active i {
    color: var(--gold-bright);
    opacity: 1;
  }

  .m-nav[hidden] {
    display: none !important;
  }

  .m-nav-more {
    color: var(--gold-bright);
  }

  .app.menu-open .m-nav-more {
    background: rgba(252, 213, 53, 0.12);
  }

  .stats {
    gap: 8px;
  }
  .stat {
    padding: 13px;
    min-height: 118px;
  }
  .stat strong {
    font-size: 18px;
  }
  .stat-hint {
    font-size: 10px;
  }
  .packages,
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    padding: 20px;
  }
  .hero-full {
    padding: 20px;
    min-height: 0;
  }
  .hero h2 {
    font-size: 23px;
  }
  .market-full .market-kv {
    grid-template-columns: minmax(100px, auto) 1fr;
  }
  .market-full .mchart-stage {
    min-height: 160px;
    height: 160px;
  }
  .market-slots {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contract-grid {
    grid-template-columns: 1fr;
  }
  .profile-ref-row {
    flex-direction: column;
  }
  .profile-ref-row button {
    width: 100%;
  }
}

/* Congratulations modal */
.congrats-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

.congrats-modal.hidden {
  display: none;
}

.congrats-modal:not(.hidden) {
  pointer-events: auto;
}

.congrats-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 17, 0.78);
  backdrop-filter: blur(4px);
}

.congrats-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.congrats-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  max-width: 100%;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(252, 213, 53, 0.12), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), var(--glow);
  animation: congrats-in 0.35s var(--ease);
}

.congrats-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.congrats-close:hover {
  color: var(--ink);
  border-color: rgba(252, 213, 53, 0.4);
}

.congrats-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(62, 207, 142, 0.12);
  color: var(--ok);
  font-size: 34px;
  box-shadow: 0 0 28px rgba(62, 207, 142, 0.2);
  animation: congrats-pop 0.55s var(--ease);
}

.congrats-modal:not(.hidden) .congrats-card h3 {
  animation: congrats-shine 1.2s var(--ease) 0.15s both;
}

.congrats-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.congrats-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

body.congrats-open {
  overflow: hidden;
}

@keyframes congrats-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes congrats-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes congrats-shine {
  0% {
    opacity: 0;
    letter-spacing: 0.12em;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    letter-spacing: 0.02em;
    transform: none;
  }
}

@media (max-width: 480px) {
  .congrats-modal {
    padding: 16px;
    align-items: flex-end;
  }

  .congrats-card {
    width: 100%;
    padding: 28px 20px 22px;
    border-radius: 16px 16px 12px 12px;
  }

  .congrats-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
}

/* ---- Weekly Bonus ---- */
.panel-weekly {
  overflow: hidden;
}

.weekly-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.weekly-head h2 {
  margin-bottom: 4px;
}

.weekly-head-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.weekly-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
  animation: weeklyPulse 2.8s ease-in-out infinite;
}

.weekly-sub {
  margin: 0;
  max-width: 36ch;
}

.weekly-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
  color: var(--muted);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.weekly-status-pill.is-open {
  color: var(--warn);
  border-color: rgba(252, 213, 53, 0.3);
  background: rgba(252, 213, 53, 0.1);
}

.weekly-status-pill.is-closed {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.12);
}

.weekly-status-pill.is-claimed {
  color: var(--gold-bright);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(252, 213, 53, 0.1);
  box-shadow: 0 0 16px rgba(252, 213, 53, 0.1);
}

.weekly-status-pill.is-error {
  color: var(--err);
  border-color: rgba(232, 93, 108, 0.35);
  background: rgba(232, 93, 108, 0.12);
}

.weekly-picker {
  margin: 16px 0 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: weeklyIn 0.4s var(--ease) both;
}

.weekly-picker label {
  margin-bottom: 2px;
}

.weekly-picker-hint {
  margin: 0 0 10px;
}

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

.weekly-picker-row input {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--mono);
  color: var(--gold-bright);
}

.weekly-nav-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  flex-shrink: 0;
  transition:
    transform 0.15s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.weekly-nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: rgba(252, 213, 53, 0.1);
  color: var(--gold-bright);
}

.weekly-nav-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}

.weekly-claim-hero {
  margin: 16px 0;
  padding: 20px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
  animation: weeklyIn 0.45s var(--ease) 0.05s both;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.weekly-claim-hero.has-reward {
  border-color: rgba(252, 213, 53, 0.55);
  box-shadow: 0 0 28px rgba(252, 213, 53, 0.22);
}

.weekly-claim-hero.is-claimed {
  border-color: rgba(62, 207, 142, 0.35);
  box-shadow: 0 0 20px rgba(62, 207, 142, 0.12);
}

.weekly-claim-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.weekly-claim-amount {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  line-height: 1.15;
  text-shadow: 0 0 24px rgba(252, 213, 53, 0.22);
  transition: transform 0.35s var(--ease);
}

.weekly-claim-hero.has-reward .weekly-claim-amount {
  animation: weeklyAmountPop 0.45s var(--ease);
}

.weekly-claim-note {
  margin: 10px 0 0;
}

.weekly-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.weekly-stat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.85);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  animation: weeklyIn 0.4s var(--ease) both;
}

.weekly-stat:nth-child(1) {
  animation-delay: 0.08s;
}
.weekly-stat:nth-child(2) {
  animation-delay: 0.12s;
}
.weekly-stat:nth-child(3) {
  animation-delay: 0.16s;
}
.weekly-stat:nth-child(4) {
  animation-delay: 0.2s;
}

.weekly-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.weekly-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.weekly-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.weekly-stat-val {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #eaecef;
  word-break: break-word;
  line-height: 1.35;
}

.weekly-actions {
  margin: 0 0 16px;
}

.weekly-claim-btn {
  min-height: 48px;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.18);
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.weekly-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(240, 185, 11, 0.28);
}

.weekly-claim-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.weekly-claim-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.weekly-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.weekly-rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.35);
  animation: weeklyIn 0.4s var(--ease) 0.22s both;
}

.weekly-rule-full {
  grid-column: 1 / -1;
}

.weekly-rule p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.weekly-rule-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

@keyframes weeklyIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes weeklyPulse {
  0%,
  100% {
    box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
  }
  50% {
    box-shadow: 0 8px 28px rgba(252, 213, 53, 0.4);
  }
}

@keyframes weeklyAmountPop {
  from {
    transform: scale(0.92);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .weekly-stats,
  .weekly-rules {
    grid-template-columns: 1fr;
  }

  .weekly-rule-full {
    grid-column: auto;
  }

  .weekly-picker-row {
    flex-wrap: wrap;
  }

  .weekly-picker-row input {
    order: -1;
    flex: 1 1 100%;
  }
}

/* ---- Withdraw Rewards ---- */
.panel-withdraw {
  overflow: hidden;
}

.withdraw-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.withdraw-head h2 {
  margin-bottom: 4px;
}

.withdraw-head-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.withdraw-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
  animation: weeklyPulse 2.8s ease-in-out infinite;
}

.withdraw-sub {
  margin: 0;
  max-width: 40ch;
}

.withdraw-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
  color: var(--muted);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.withdraw-status-pill.has-balance {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.12);
  box-shadow: 0 0 16px rgba(62, 207, 142, 0.1);
}

.withdraw-status-pill.is-empty {
  color: var(--muted);
}

.withdraw-sync {
  margin: 16px 0 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: weeklyIn 0.4s var(--ease) both;
}

.withdraw-sync-hint {
  margin: 0 0 10px;
}

.withdraw-sync-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.withdraw-sync-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.4);
  color: var(--ink);
  transition:
    transform 0.18s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.withdraw-sync-btn i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.withdraw-sync-btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.withdraw-sync-btn strong {
  font-size: 13px;
  font-weight: 700;
  color: #eaecef;
}

.withdraw-sync-btn em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.withdraw-sync-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.4);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  color: var(--ink);
}

.withdraw-sync-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.withdraw-hero {
  margin: 16px 0;
  padding: 20px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
  animation: weeklyIn 0.45s var(--ease) 0.05s both;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.withdraw-hero.has-balance {
  border-color: rgba(252, 213, 53, 0.55);
  box-shadow: 0 0 28px rgba(252, 213, 53, 0.22);
}

.withdraw-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.withdraw-hero-amount {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  line-height: 1.15;
  text-shadow: 0 0 24px rgba(252, 213, 53, 0.22);
  transition: transform 0.35s var(--ease);
}

.withdraw-hero.has-balance .withdraw-hero-amount {
  animation: weeklyAmountPop 0.45s var(--ease);
}

.withdraw-hero-note {
  margin: 10px 0 0;
}

.withdraw-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.withdraw-stat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.85);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  animation: weeklyIn 0.4s var(--ease) both;
}

.withdraw-stat:nth-child(1) {
  animation-delay: 0.08s;
}
.withdraw-stat:nth-child(2) {
  animation-delay: 0.12s;
}
.withdraw-stat:nth-child(3) {
  animation-delay: 0.16s;
}

.withdraw-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.withdraw-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.withdraw-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.withdraw-stat-val {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #eaecef;
  word-break: break-word;
  line-height: 1.35;
}

.withdraw-section-head {
  margin-bottom: 10px;
}

.withdraw-section-head h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: #eaecef;
}

.withdraw-section-head .muted {
  margin: 0;
}

.withdraw-income {
  margin-bottom: 16px;
  animation: weeklyIn 0.4s var(--ease) 0.1s both;
}

.withdraw-income-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.withdraw-income-empty {
  grid-column: 1 / -1;
  padding: 18px;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed #474d57;
  background: rgba(11, 14, 17, 0.3);
}

.withdraw-income-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.85);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.withdraw-income-card:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.withdraw-income-card.has-claim {
  border-color: rgba(252, 213, 53, 0.32);
  background: var(--surface);
}

.withdraw-income-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.withdraw-income-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.withdraw-income-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #eaecef;
  margin-bottom: 2px;
}

.withdraw-income-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
}

.withdraw-income-meta span {
  color: var(--muted);
}

.withdraw-income-meta strong {
  color: #efe7d2;
  font-weight: 700;
}

.withdraw-income-card.has-claim .withdraw-income-unclaimed strong {
  color: var(--gold-bright);
}

.withdraw-income-actions {
  margin-top: auto;
}

.withdraw-income-actions .sm {
  width: 100%;
  min-height: 34px;
  font-weight: 700;
}

.withdraw-income-actions .sm:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--on-gold);
  border-color: transparent;
}

.withdraw-income-actions .sm:not(:disabled):hover {
  filter: brightness(1.06);
}

.withdraw-income-week {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(11, 14, 17, 0.35);
  border: 1px solid var(--line);
}

.withdraw-rank {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.65);
  animation: weeklyIn 0.4s var(--ease) 0.14s both;
}

.withdraw-rank:empty,
.withdraw-rank:has(#rankWise:empty) {
  display: none;
}

.withdraw-rank-kv {
  margin-top: 4px;
}

.withdraw-form {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(252, 213, 53, 0.22);
  background: var(--surface);
  animation: weeklyIn 0.4s var(--ease) 0.16s both;
}

.withdraw-form label {
  margin-bottom: 6px;
}

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

.withdraw-form-row input {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.withdraw-max-btn {
  min-height: 42px;
  min-width: 64px;
  font-weight: 700;
}

.withdraw-preview {
  margin: 8px 0 12px;
}

.withdraw-claim-btn {
  min-height: 48px;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.18);
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.withdraw-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(240, 185, 11, 0.28);
}

.withdraw-claim-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.withdraw-claim-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.withdraw-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.withdraw-rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.35);
  animation: weeklyIn 0.4s var(--ease) 0.2s both;
}

.withdraw-rule-full {
  grid-column: 1 / -1;
}

.withdraw-rule p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.withdraw-rule-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

@media (max-width: 720px) {
  .withdraw-stats {
    grid-template-columns: 1fr;
  }

  .withdraw-sync-row,
  .withdraw-income-grid,
  .withdraw-rules {
    grid-template-columns: 1fr;
  }

  .withdraw-rule-full {
    grid-column: auto;
  }
}

/* ---- Referral & Team ---- */
.panel-team {
  overflow: hidden;
}

.team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.team-head h2 {
  margin-bottom: 4px;
}

.team-head-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.team-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
  animation: weeklyPulse 2.8s ease-in-out infinite;
}

.team-sub {
  margin: 0;
  max-width: 40ch;
}

.team-directs-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
  color: var(--muted);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.team-directs-pill.has-directs {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.12);
}

.team-ref-card {
  margin: 16px 0 4px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  animation: weeklyIn 0.4s var(--ease) both;
}

.team-ref-top {
  margin-bottom: 12px;
}

.team-ref-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.team-ref-hint {
  margin: 6px 0 0;
}

.team-ref-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.team-ref-row input {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 13px;
  color: var(--gold-bright);
}

.team-ref-row .primary,
.team-ref-row .sm {
  flex-shrink: 0;
  min-height: 42px;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
}

.team-ref-row .primary:hover:not(:disabled),
.team-ref-row .sm:hover:not(:disabled) {
  transform: translateY(-1px);
}

.team-ref-row .primary.copied,
.team-ref-row .sm.copied {
  border-color: rgba(62, 207, 142, 0.45);
  color: var(--ok);
}

.team-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.team-stat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.85);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  animation: weeklyIn 0.4s var(--ease) both;
}

.team-stat:nth-child(1) {
  animation-delay: 0.06s;
}
.team-stat:nth-child(2) {
  animation-delay: 0.1s;
}
.team-stat:nth-child(3) {
  animation-delay: 0.14s;
}

.team-stat-wide {
  grid-column: 1 / -1;
}

.team-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.team-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.team-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.team-stat-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #eaecef;
  word-break: break-word;
  line-height: 1.35;
}

.team-stat-val.mono {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-bright);
}

.team-directs-card {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: weeklyIn 0.45s var(--ease) 0.12s both;
}

.team-directs-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.team-directs-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.35);
}

.team-table {
  margin: 0;
}

.team-table th {
  position: sticky;
  top: 0;
  background: rgba(30, 35, 41, 0.95);
}

.team-direct-row {
  transition: background 0.2s var(--ease);
}

.team-direct-row:hover {
  background: rgba(252, 213, 53, 0.06);
}

.team-direct-row[data-top="1"] td:first-child {
  position: relative;
}

.team-direct-row[data-top="1"] td:first-child::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  margin-right: 8px;
  box-shadow: 0 0 8px rgba(252, 213, 53, 0.7);
  vertical-align: middle;
}

.team-rank-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.team-leg {
  color: var(--gold-bright);
  font-weight: 800;
}

.team-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 12px;
  text-align: center;
}

.team-empty i {
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 4px;
}

.team-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.team-settle {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.75);
  animation: weeklyIn 0.45s var(--ease) 0.18s both;
}

.team-settle-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-settle-head p {
  margin: 0 0 12px;
}

.team-settle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.team-settle-grid .primary {
  min-height: 42px;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.2s var(--ease);
}

.team-settle-grid .primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(252, 213, 53, 0.22);
}

@media (max-width: 720px) {
  .team-stats {
    grid-template-columns: 1fr;
  }

  .team-stat-wide {
    grid-column: auto;
  }

  .team-settle-grid {
    grid-template-columns: 1fr;
  }

  .team-settle-grid .primary {
    width: 100%;
  }
}

/* ---- Admin Panel ---- */
.panel-admin {
  overflow: hidden;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.admin-head h2 {
  margin-bottom: 4px;
}

.admin-head-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.admin-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--on-gold);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 8px 22px rgba(252, 213, 53, 0.22);
  animation: weeklyPulse 2.8s ease-in-out infinite;
}

.admin-sub {
  margin: 0;
  max-width: 40ch;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
  color: var(--muted);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.admin-status-pill i {
  font-size: 8px;
}

.admin-status-pill.is-live {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.12);
}

.admin-status-pill.is-live i {
  animation: adminBlink 1.6s ease-in-out infinite;
}

.admin-status-pill.is-paused {
  color: var(--warn);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(252, 213, 53, 0.12);
  box-shadow: 0 0 16px rgba(252, 213, 53, 0.1);
}

.admin-hero {
  margin: 16px 0;
  padding: 20px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
  animation: weeklyIn 0.45s var(--ease) both;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.admin-hero.is-paused {
  border-color: rgba(252, 213, 53, 0.4);
  box-shadow: 0 0 24px rgba(252, 213, 53, 0.12);
}

.admin-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.admin-hero-amount {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  line-height: 1.15;
  text-shadow: 0 0 24px rgba(252, 213, 53, 0.22);
  transition: transform 0.35s var(--ease);
}

.admin-hero-amount.pop {
  animation: weeklyAmountPop 0.45s var(--ease);
}

.admin-hero-note {
  margin: 10px 0 0;
}

.admin-band {
  margin-top: 18px;
  text-align: left;
}

.admin-band-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(232, 93, 108, 0.35),
    rgba(252, 213, 53, 0.4) 50%,
    rgba(62, 207, 142, 0.4)
  );
  border: 1px solid rgba(252, 213, 53, 0.22);
  overflow: visible;
}

.admin-band-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  border-radius: 999px;
  background: rgba(255, 248, 231, 0.18);
  transition: width 0.35s var(--ease);
}

.admin-band-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eaecef, var(--gold-bright));
  border: 2px solid #1a1408;
  box-shadow: 0 0 12px rgba(252, 213, 53, 0.55);
  transition: left 0.35s var(--ease);
  z-index: 1;
}

.admin-band-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.admin-stat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(43, 49, 57, 0.85);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  animation: weeklyIn 0.4s var(--ease) both;
}

.admin-stat:nth-child(1) {
  animation-delay: 0.06s;
}
.admin-stat:nth-child(2) {
  animation-delay: 0.1s;
}
.admin-stat:nth-child(3) {
  animation-delay: 0.14s;
}
.admin-stat:nth-child(4) {
  animation-delay: 0.18s;
}

.admin-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 213, 53, 0.35);
  background: rgba(43, 49, 57, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.admin-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
  border: 1px solid rgba(252, 213, 53, 0.18);
}

.admin-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-stat-val {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #eaecef;
  word-break: break-word;
  line-height: 1.35;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(252, 213, 53, 0.06), transparent 55%),
    rgba(43, 49, 57, 0.88);
  animation: weeklyIn 0.45s var(--ease) 0.12s both;
  transition:
    opacity 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease);
}

.admin-card:hover {
  border-color: rgba(252, 213, 53, 0.3);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.admin-card.is-locked {
  opacity: 0.55;
  filter: grayscale(0.15);
}

.admin-card-danger {
  background:
    linear-gradient(145deg, rgba(252, 213, 53, 0.06), transparent 55%),
    rgba(43, 49, 57, 0.88);
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-card-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-card-head p {
  margin: 0;
  font-size: 12.5px;
}

.admin-role-chip {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.admin-role-chip.is-off {
  color: var(--muted);
  background: rgba(154, 145, 124, 0.16);
  border: 1px solid rgba(154, 145, 124, 0.25);
}

.admin-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.admin-preset {
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.4);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.admin-preset:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(252, 213, 53, 0.1);
}

.admin-preset:active:not(:disabled) {
  transform: scale(0.96);
}

.admin-preset.is-active {
  border-color: rgba(240, 185, 11, 0.55);
  background: rgba(252, 213, 53, 0.14);
  color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(252, 213, 53, 0.14);
}

.admin-preset:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-price-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.admin-price-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.admin-price-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 700;
  pointer-events: none;
}

.admin-price-input-wrap input {
  width: 100%;
  padding-left: 28px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--gold-bright);
}

.admin-action-btn {
  min-height: 44px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(252, 213, 53, 0.14);
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.2s var(--ease);
}

.admin-action-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(252, 213, 53, 0.28);
}

.admin-action-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.admin-price-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.35);
  color: var(--muted);
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.admin-price-feedback.is-ok {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.1);
}

.admin-price-feedback.is-warn {
  color: var(--warn);
  border-color: rgba(252, 213, 53, 0.3);
  background: rgba(252, 213, 53, 0.08);
}

.admin-price-feedback.is-err {
  color: var(--err);
  border-color: rgba(232, 93, 108, 0.35);
  background: rgba(232, 93, 108, 0.1);
}

.admin-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.admin-pause-visual {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(62, 207, 142, 0.28);
  background: rgba(62, 207, 142, 0.08);
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.admin-pause-visual.is-paused {
  border-color: rgba(252, 213, 53, 0.3);
  background: rgba(252, 213, 53, 0.08);
}

.admin-pause-visual strong {
  display: block;
  margin-bottom: 4px;
  color: #eaecef;
}

.admin-pause-visual p {
  margin: 0;
  font-size: 12.5px;
}

.admin-pause-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ok);
  background: rgba(62, 207, 142, 0.14);
  border: 1px solid rgba(62, 207, 142, 0.28);
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.admin-pause-visual.is-paused .admin-pause-ico {
  color: var(--warn);
  background: rgba(252, 213, 53, 0.12);
  border-color: rgba(252, 213, 53, 0.28);
}

.admin-pause-btn.is-resume {
  background: linear-gradient(135deg, #3ecf8e, #2a9f6a);
  color: #06140e;
  border-color: transparent;
}

.admin-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.35);
  animation: weeklyIn 0.4s var(--ease) 0.22s both;
}

.admin-rule-full {
  grid-column: 1 / -1;
}

.admin-rule p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-rule-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

@keyframes adminBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-stats,
  .admin-rules {
    grid-template-columns: 1fr;
  }

  .admin-rule-full {
    grid-column: auto;
  }

  .admin-price-row {
    flex-direction: column;
  }

  .admin-action-btn {
    width: 100%;
  }

  .admin-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-preset {
    min-width: 0;
  }
}

