/* FLUX FINANCE — light / white design system */

:root {
  --fx-bg: #ffffff;
  --fx-surface: #f8fafc;
  --fx-surface-2: #f1f5f9;
  --fx-ink: #0f172a;
  --fx-muted: #64748b;
  --fx-line: #e2e8f0;
  --fx-line-strong: #cbd5e1;
  --fx-primary: #2563eb;
  --fx-primary-deep: #1d4ed8;
  --fx-accent: #0ea5e9;
  --fx-success: #059669;
  --fx-gold: #b45309;
  --fx-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --fx-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08);
  --fx-font: "DM Sans", "Outfit", system-ui, sans-serif;
  --fx-display: "Plus Jakarta Sans", "Syne", system-ui, sans-serif;
  --fx-radius: 16px;
  --fx-radius-lg: 22px;
}

html {
  background: var(--fx-bg);
}

body.tff-dash,
body.tff-body,
body.tff-page--info,
body.tff-page--login,
body.has-tff-dock,
body.nv-error-page {
  font-family: var(--fx-font);
  color: var(--fx-ink);
  background: var(--fx-bg) !important;
}

body.tff-dash::before,
body.tff-dash::after,
body.tff-body::before,
body.tff-body::after {
  display: none !important;
  content: none !important;
}

body.tff-page--info {
  background: var(--fx-bg) !important;
}

.tff-phone,
.tff-stage,
#haAppMain {
  background: transparent;
}

.dash,
.dash * {
  text-shadow: none !important;
}

.dash {
  color: var(--fx-ink);
}

.dash-head {
  margin-bottom: 16px;
  padding: 4px 2px 0;
}

.dash-logo,
.tff-wal-head__logo {
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: 14px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  box-shadow: var(--fx-shadow);
  filter: none;
  object-fit: cover;
}

.dash-head__name,
.tff-wal-head__title {
  font-family: var(--fx-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fx-ink);
  text-transform: none;
}

.dash-head__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  box-shadow: var(--fx-shadow);
}

.dash-head__icon img {
  filter: none;
}

.dash-wallet {
  display: block !important;
  margin: 0 0 18px;
  padding: 20px 18px 18px !important;
  border-radius: var(--fx-radius-lg) !important;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 48%, #ffffff 100%) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: var(--fx-shadow-lg) !important;
  overflow: hidden;
}

.dash-wallet::before {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 68%) !important;
}

.dash-wallet__kicker {
  color: var(--fx-primary) !important;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.dash-wallet__bal {
  font-family: var(--fx-display);
  font-size: clamp(28px, 8vw, 36px) !important;
  font-weight: 800;
  color: var(--fx-ink) !important;
  letter-spacing: -0.03em;
}

.dash-wallet__tag,
.tff-tag {
  color: var(--fx-muted) !important;
  font-weight: 600;
  letter-spacing: 0;
}

.dash-wallet__cow,
.dash-wallet__cow.dash-emblem {
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.12));
  background-color: var(--fx-surface) !important;
}

.dash-actions {
  gap: 10px;
  margin-bottom: 20px;
}

.dash-act {
  padding: 14px 8px 12px !important;
  border-radius: var(--fx-radius) !important;
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: var(--fx-shadow) !important;
}

.dash-act__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--fx-ink);
}

.dash-plans {
  padding: 16px 14px 10px !important;
  border-radius: var(--fx-radius-lg) !important;
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: none !important;
}

.dash-plans__title {
  font-family: var(--fx-display);
  font-weight: 800;
  color: var(--fx-ink);
  letter-spacing: -0.03em;
}

.dash-plans__sub {
  color: var(--fx-muted);
  font-weight: 600;
}

.cow-card {
  padding: 14px !important;
  border-radius: var(--fx-radius) !important;
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: var(--fx-shadow) !important;
}

.cow-card__name {
  color: var(--fx-ink) !important;
  font-weight: 800;
}

.cow-card__price {
  color: var(--fx-primary) !important;
  font-weight: 800;
}

.cow-card__badge {
  color: var(--fx-accent) !important;
}

.cow-row span:first-child {
  color: var(--fx-muted) !important;
}

.cow-row span:last-child {
  color: var(--fx-ink);
  font-weight: 700;
}

.cow-row--total span {
  color: var(--fx-success) !important;
  font-weight: 800;
}

.cow-empty {
  color: var(--fx-muted);
}

.cow-buy,
body.tff-body button.tff-btn,
.tff-btn {
  border-radius: 14px !important;
  color: #fff !important;
  text-shadow: none !important;
  background: linear-gradient(180deg, #3b82f6 0%, var(--fx-primary) 55%, var(--fx-primary-deep) 100%) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28) !important;
  border: 0 !important;
}

body.tff-body a.tff-ghost,
.cow-buy--muted,
.cow-buy:disabled {
  color: var(--fx-primary) !important;
  background: var(--fx-bg) !important;
  border: 2px solid var(--fx-line-strong) !important;
  box-shadow: none !important;
}

.tff {
  padding-top: calc(18px + var(--safe-top, env(safe-area-inset-top, 0px)));
}

.tff-hero {
  padding: 8px 0 4px;
}

.tff-logo {
  border-radius: 24px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  box-shadow: var(--fx-shadow-lg);
}

.flux-brand {
  font-family: var(--fx-display);
  color: var(--fx-ink) !important;
  letter-spacing: 0.06em;
}

.flux-brand span {
  color: var(--fx-primary) !important;
  letter-spacing: 0.28em;
}

.tff-sheet,
.tff-sheet--login {
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: var(--fx-shadow-lg) !important;
}

.tff-title {
  font-family: var(--fx-display);
  color: var(--fx-ink);
}

.tff-title span {
  color: var(--fx-primary);
}

.tff-sub,
.tff-switch {
  color: var(--fx-muted) !important;
}

.tff-field {
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line-strong) !important;
  color: var(--fx-ink);
}

.tff-field input {
  color: var(--fx-ink);
  -webkit-text-fill-color: var(--fx-ink);
}

body.tff-body .tff-title,
body.tff-body .tff-dial,
body.tff-body .tff-field {
  color: var(--fx-ink);
}

.tff-field svg {
  color: var(--fx-muted);
}

.my-earn,
.team-stat,
.team-hero,
.my-menu__link,
.tff-spin-card,
.tff-hist-card,
.tff-info__article,
.fx-pulse {
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  border-radius: var(--fx-radius) !important;
  box-shadow: var(--fx-shadow) !important;
}

.fx-pulse__kicker {
  color: var(--fx-primary) !important;
}

.fx-pulse__pay {
  color: var(--fx-ink) !important;
}

.fx-pulse__sub {
  color: var(--fx-muted) !important;
}

.my-menu__link,
.tff-info__back,
.tff-wal-back,
.tff-wal-side {
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line) !important;
  color: var(--fx-ink) !important;
  box-shadow: var(--fx-shadow) !important;
}

.tff-wal-back svg,
.tff-wal-side svg {
  filter: none !important;
  color: var(--fx-ink);
}

.tff--wallet .tff-wal-head__title,
.tff--wallet .tff-wal-amt-input,
.tff--wallet .tff-wal-method,
.tff--wallet label {
  color: var(--fx-ink) !important;
  text-shadow: none !important;
}

.my-section-title,
.team-hero__title {
  font-family: var(--fx-display);
  color: var(--fx-ink);
}

.tff-hist-filter.is-active,
.tff-hist-filter[aria-current="page"] {
  background: var(--fx-primary) !important;
  color: #fff !important;
}

.tff-info {
  color: var(--fx-ink);
}

.tff-info__lead {
  color: var(--fx-primary);
}

.herd-card__bar {
  background: var(--fx-surface-2) !important;
}

.herd-card__fill {
  background: linear-gradient(90deg, var(--fx-primary), var(--fx-accent)) !important;
}

.herd-card__meta {
  color: var(--fx-muted) !important;
}

.dash-emblem,
.dash-wallet__cow.dash-emblem {
  background-color: var(--fx-surface) !important;
}

.feed-stage,
.feed-cow,
.feed-pellet,
.feed-stage__barn {
  display: none !important;
}

/* Error pages */
body.nv-error-page {
  background: var(--fx-bg) !important;
}

.nv-err {
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nv-err__mark {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--fx-line);
  box-shadow: var(--fx-shadow);
}

.nv-err__brand {
  margin: 14px 0 0;
  font-family: var(--fx-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--fx-muted);
  font-size: 12px;
}

.nv-err__code {
  margin: 8px 0;
  font-family: var(--fx-display);
  font-size: 64px;
  line-height: 1;
  color: var(--fx-ink);
}

.nv-err__text {
  color: var(--fx-muted);
  font-weight: 600;
}

.nv-err__btn {
  margin-top: 16px;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3b82f6, var(--fx-primary-deep));
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/* Wallet / recharge / withdraw pages */
body.tff-body.tff-page--wallet,
.tff--wallet {
  color: var(--fx-ink);
  background: var(--fx-bg);
}

.tff-wal-head__sub,
.tff-wal-label,
.tff-wal-hint,
.tff-wal-amt,
.tff-wal-card,
.tff-wal-chip,
.tff-wal-panel {
  color: var(--fx-ink) !important;
}

.tff-wal-card,
.tff-wal-panel,
.tff-wal-chip {
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  box-shadow: var(--fx-shadow) !important;
}

/* Team page */
.team-page .team-hero,
.team-page .team-stat,
.team-page .team-card,
.team-page .team-ticket,
.team-page .team-lvl {
  background: var(--fx-bg) !important;
  border: 1px solid var(--fx-line) !important;
  color: var(--fx-ink) !important;
  box-shadow: var(--fx-shadow) !important;
}

.team-page,
.team-page p,
.team-page span,
.team-page h2,
.team-page h3 {
  color: var(--fx-ink);
  text-shadow: none !important;
}

/* My profile */
.my-page,
.my-head,
.my-earn__val,
.my-menu__lbl {
  color: var(--fx-ink) !important;
  text-shadow: none !important;
}

/* Spin / checkin / gift standalone pages */
body.tff-body.tff-page--spin,
body.tff-body.tff-page--checkin,
body.tff-body.tff-page--gift {
  background: var(--fx-bg) !important;
  color: var(--fx-ink);
}

.tff-spin-wrap,
.tff-checkin-wrap,
.tff-gift-wrap {
  color: var(--fx-ink);
}
