:root {
  --bg-deep: #000000;
  --bg-card: #0F0F12;
  --bg-card-hover: #18181C;
  --gold: #F5C542;
  --gold-light: #FFD966;
  --gold-dark: #B8860B;
  --gold-gradient: linear-gradient(135deg,#FFE27A 0%,#F5C542 25%,#D4A017 60%,#AA7C00 100%);
  --gold-gradient-soft: linear-gradient(135deg,#F5C542 0%,#D4A017 100%);
  --titanium: #A8A29E;
  --text-1: #FFFFFF;
  --text-2: rgba(255,255,255,0.65);
  --text-3: rgba(255,255,255,0.4);
  --success: #30D158;
  --danger: #FF453A;
  --divider: rgba(255,255,255,0.06);
  --gold-border: rgba(245,197,66,0.18);
  --gold-shadow: 0 4px 20px rgba(245,197,66,0.35);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --tabbar-h: calc(62px + var(--safe-bottom));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg-deep);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { border: none; background: none; color: inherit; font: inherit; cursor: pointer; }
input { border: none; outline: none; background: none; color: inherit; font: inherit; -webkit-appearance: none; appearance: none; }
input::placeholder { color: var(--text-3); }
svg { display: block; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 0; height: 0; display: none; }

.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.amount-gold {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.section-block {
  padding: var(--s6) var(--s4) 0;
}
.section-head {
  margin-bottom: var(--s4);
}
.section-head h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.section-head p {
  font-size: 13px;
  color: var(--text-3);
}
.section-head a {
  font-size: 13px;
  color: var(--gold);
  position: absolute;
  right: 0; top: 4px;
}
.section-head { position: relative; padding-right: 60px; }

.success { color: var(--success); }
.danger { color: var(--danger); }
.up { color: var(--success); display: inline-flex; align-items: center; gap: 2px; }
.up-pct { color: var(--success); margin-left: 6px; font-size: 13px; }

#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-deep);
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.22,1,0.36,1), transform 320ms cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  padding-top: var(--safe-top);
  padding-bottom: 0;
}
.screen.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  display: block;
  z-index: 1;
}
.screen.screen-loading,
.screen.screen-auth { padding-bottom: 0; }
.screen.screen-home,
.screen.screen-dashboard,
.screen.screen-wallet,
.screen.screen-invite,
.screen.screen-profile { padding-bottom: var(--tabbar-h); }

.tab-bottom-space { height: var(--s8); }
.home-bottom-space { height: 160px; }

.hidden { display: none !important; }
.hide { display: none !important; }

@media (max-width: 360px) {
  body { font-size: 16px; }
  .section-head h2 { font-size: 18px; }
}

.screen-loading {
  background: radial-gradient(ellipse at 50% 40%, #18101d 0%, #000 65%);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px var(--s5);
  overflow: hidden;
}
.loading-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.loading-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 64px;
}
.loading-logo {
  width: 96px; height: 96px;
  color: #fff;
  margin-bottom: 24px;
  animation: logoGlow 2.4s ease-in-out infinite;
}
@keyframes logoGlow {
  0%,100% { color: #fff; filter: drop-shadow(0 0 0 rgba(245,197,66,0)); transform: scale(1); }
  50%     { color: var(--gold); filter: drop-shadow(0 0 18px rgba(245,197,66,0.55)); transform: scale(1.04); }
}
.loading-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: fadeUp 500ms ease 200ms forwards;
}
.loading-subtitle {
  font-size: 14px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 500ms ease 400ms forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.loading-progress-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  opacity: 0;
  animation: fadeUp 500ms ease 600ms forwards;
}
.loading-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.loading-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.loading-progress-inner {
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  border-radius: 999px;
  transition: width 240ms cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 0 12px rgba(245,197,66,0.6);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-md);
  transition: transform 120ms ease, box-shadow 200ms ease, opacity 200ms ease, background 200ms ease;
  white-space: nowrap;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-gold {
  background: var(--gold-gradient);
  color: #1a1200;
  box-shadow: var(--gold-shadow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-gold:active { box-shadow: 0 2px 10px rgba(245,197,66,0.25), inset 0 1px 0 rgba(255,255,255,0.1); }

.btn-outline {
  background: var(--bg-card);
  color: var(--text-1);
  border: 0.5px solid var(--gold-border);
}
.btn-outline:active { background: var(--bg-card-hover); }

.btn-lg { padding: 16px 24px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 10px 16px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.btn-pulse {
  position: relative;
  animation: btnPulse 2.2s ease-in-out infinite;
}
@keyframes btnPulse {
  0%,100% { box-shadow: var(--gold-shadow), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 0 rgba(245,197,66,0.4); }
  50%     { box-shadow: var(--gold-shadow), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 14px rgba(245,197,66,0); }
}

.card {
  background: var(--bg-card);
  border: 0.5px solid var(--gold-border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}

.form-row {
  display: block;
  margin-bottom: var(--s5);
}
.form-row label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
  font-weight: 500;
}
.form-row label small {
  color: var(--text-3);
  font-weight: 400;
  margin-left: 4px;
}
.form-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 14px;
  background: var(--bg-card);
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  position: relative;
}
.form-input:focus-within {
  border-color: var(--gold);
  background: rgba(245,197,66,0.04);
  box-shadow: 0 0 0 4px rgba(245,197,66,0.1);
}
.form-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 16px;
  color: var(--text-1);
}
.form-input .placeholder {
  flex: 1;
  color: var(--text-3);
  font-size: 16px;
}
.form-input .caret {
  color: var(--text-3);
  flex-shrink: 0;
}
.form-input .caret-sm {
  color: var(--text-2);
  flex-shrink: 0;
}
.form-input .area-code {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid var(--divider);
  font-size: 15px;
  color: var(--text-1);
  height: 24px;
}
.form-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.input-suffix {
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.input-suffix:active { background: rgba(245,197,66,0.1); }

.btn-code {
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(245,197,66,0.08);
  border-radius: 8px;
  transition: opacity 180ms ease;
}
.btn-code:disabled {
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
}

#toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 140px;
  max-width: 80vw;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(15,15,18,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.1);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 280ms cubic-bezier(0.22,1,0.36,1), transform 280ms cubic-bezier(0.22,1,0.36,1);
  animation: toastIn 280ms cubic-bezier(0.22,1,0.36,1) forwards;
}
.toast.toast-success { border-color: rgba(48,209,88,0.3); }
.toast.toast-danger  { border-color: rgba(255,69,58,0.3); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.leaving { animation: toastOut 240ms ease forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-12px); }
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-h);
  padding-bottom: var(--safe-bottom);
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid var(--divider);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  transition: color 180ms ease, transform 120ms ease;
  padding-top: 4px;
}
.tab-item span { font-size: 11px; font-weight: 500; }
.tab-item.active { color: var(--gold); }
.tab-item.active svg { filter: drop-shadow(0 0 6px rgba(245,197,66,0.4)); }
.tab-item:active { transform: scale(0.95); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-2);
  position: relative;
  transition: background 160ms ease;
}
.icon-btn:active { background: rgba(255,255,255,0.06); color: var(--text-1); }
.icon-btn .dot-red {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
  border: 1.5px solid var(--bg-deep);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg-card);
  border: 0.5px solid var(--divider);
  transition: all 160ms ease;
}
.chip.active {
  color: #1a1200;
  background: var(--gold-gradient);
  border-color: transparent;
  font-weight: 600;
}

.back-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  border-radius: 50%;
  transition: background 160ms ease;
}
.back-btn:active { background: rgba(255,255,255,0.08); }

.divider {
  height: 1px;
  background: var(--divider);
  margin: 0 var(--s4);
}

.avatar-gold {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #1a1200;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(245,197,66,0.2);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid var(--divider);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease;
}
.lang-btn:active { background: rgba(255,255,255,0.1); }
.lang-btn .lg-flag { font-size: 14px; line-height: 1; }
.lang-btn .lg-name { max-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lang-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease;
}
.lang-mask.show { opacity: 1; pointer-events: auto; }
.lang-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #0e0e0e;
  border: 0.5px solid var(--divider);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.22,1,0.36,1);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 78vh; overflow-y: auto;
}
.lang-mask.show .lang-panel { transform: translateY(0); }
.lang-handle {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  margin: 8px auto 12px;
}
.lang-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 2px 14px;
}
.lang-head-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.lang-head-close {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.lang-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.lang-cell {
  padding: 14px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 0.5px solid var(--divider);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  transition: all 180ms ease;
}
.lang-cell:active { background: rgba(255,255,255,0.06); }
.lang-cell.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(245,197,66,0.14), rgba(245,197,66,0.02));
}
.lang-cell .lc-flag { font-size: 26px; line-height: 1; }
.lang-cell .lc-name { font-size: 12px; color: var(--text-1); font-weight: 600; }
.lang-cell .lc-check {
  position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold-gradient);
  color: #1a1200;
  font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
}
.lang-cell.active .lc-check { opacity: 1; }
.lang-auto-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245,197,66,0.06);
  border: 0.5px solid var(--gold-border);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

html[dir="rtl"] .app-root, html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .auth-topbar, html[dir="rtl"] .dash-topbar, html[dir="rtl"] .wallet-topbar, html[dir="rtl"] .invite-topbar { direction: rtl; }
html[dir="rtl"] .chip, html[dir="rtl"] .lang-btn { direction: rtl; }

.hint-sub {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}

.coin-actions-single {
  justify-content: flex-end !important;
}
.coin-actions-single .coin-btn { min-width: 104px; }

.pwd-mask {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pwd-mask.hide { opacity: 0; pointer-events: none; }
.pwd-mask:not(.hide) { opacity: 1; pointer-events: auto; transition: opacity 220ms ease; }
.pwd-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); }
.pwd-panel {
  position: relative; width: 100%; max-width: 420px;
  background: linear-gradient(165deg, rgba(28,22,8,0.96) 0%, rgba(8,8,10,0.98) 100%);
  border: 0.5px solid var(--gold-border);
  border-radius: 20px;
  padding: 22px 18px 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(245,197,66,0.08) inset, 0 0 32px rgba(245,197,66,0.08);
  transform: translateY(8px);
  animation: pwdPanelIn 220ms ease forwards;
}
@keyframes pwdPanelIn { to { transform: translateY(0); } }
.pwd-head { margin-bottom: 14px; }
.pwd-title { font-size: 18px; font-weight: 800; letter-spacing: 0.02em; }
.pwd-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.55; }
.pwd-avatar-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(245,197,66,0.06); border: 0.5px solid rgba(245,197,66,0.18); border-radius: 14px; margin-bottom: 14px; }
.pwd-user { font-size: 15px; font-weight: 700; color: var(--text-1); }
.pwd-user-sub { font-size: 11px; margin-top: 2px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.pwd-forgot { font-size: 11px; color: var(--text-3); margin: 2px 2px 10px; line-height: 1.5; }

.tab-bar .tab-item[data-tab="profile"] .ti-ico { width: 22px; height: 22px; }

.profile-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 8px;
}
.profile-topbar .profile-title { font-size: 22px; font-weight: 800; color: var(--text-1); letter-spacing: 0.01em; }
.profile-topbar .profile-actions { display: flex; align-items: center; gap: 8px; }
.profile-topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.07);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 160ms ease;
}
.profile-topbar .icon-btn:active {
  background: rgba(245,197,66,0.12); color: var(--gold);
  border-color: var(--gold-border);
}
.profile-body { display: flex; flex-direction: column; }

.profile-header {
  margin: 6px 16px 14px;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(245,197,66,0.26) 0%, rgba(245,197,66,0) 55%),
    linear-gradient(150deg, rgba(30,24,10,0.96) 0%, rgba(10,10,12,0.98) 100%);
  border: 0.5px solid var(--gold-border);
  box-shadow: 0 14px 44px rgba(0,0,0,0.48), 0 0 0 0.5px rgba(245,197,66,0.08) inset;
  position: relative; overflow: hidden;
}
.profile-header::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  background: radial-gradient(closest-side, rgba(245,197,66,0.32), rgba(245,197,66,0) 70%);
  filter: blur(2px);
}
.profile-header .ph-main { display: flex; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.profile-header .ph-main .avatar-gold { width: 64px; height: 64px; font-size: 26px; flex-shrink: 0; }
.profile-header .ph-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-header .ph-uname { font-size: 20px; font-weight: 800; color: var(--text-1); letter-spacing: 0.005em; }
.profile-header .ph-uid { font-size: 12px; color: var(--text-2); margin-top: 2px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.01em; }
.profile-header .ph-badge-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile-header .ph-vip { padding: 4px 10px; border-radius: 999px; background: rgba(245,197,66,0.16); color: var(--gold); border: 0.5px solid var(--gold-border); font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em; }
.profile-header .ph-days { font-size: 11.5px; color: var(--text-2); }

.profile-header .ph-meta {
  margin-top: 16px; padding-top: 14px;
  border-top: 0.5px solid rgba(245,197,66,0.14);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  position: relative; z-index: 1;
}
.profile-header .ph-meta .pm-item { display: flex; flex-direction: column; gap: 4px; }
.profile-header .ph-meta .pm-label { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: 0.02em; opacity: .9; }
.profile-header .ph-meta .pm-value { font-size: 13.5px; font-weight: 700; color: var(--text-1); letter-spacing: 0.005em; }
.profile-header .ph-meta .pm-value.success { color: var(--success); }

.profile-card {
  margin: 12px 16px; border-radius: 20px;
  background: rgba(20,20,24,0.72);
  border: 0.5px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  overflow: hidden;
  opacity: 0; transform: translateY(18px);
}
.profile-card.show { opacity: 1; transform: translateY(0); transition: opacity 320ms ease, transform 320ms cubic-bezier(0.2,0.9,0.3,1.2); }
.profile-card.card-frosted { background: rgba(20,20,24,0.72); }

.profile-card .pc-section { padding: 16px 18px; }
.profile-card .pc-section + .pc-section { padding-top: 4px; padding-bottom: 16px; }

.profile-card .pc-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; color: var(--text-1);
  margin-bottom: 12px; letter-spacing: 0.01em;
}
.profile-card .pc-section-title::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(245,197,66,0.4) 100%);
  box-shadow: 0 0 10px rgba(245,197,66,0.35);
}

.profile-card .pc-menu { display: flex; flex-direction: column; }
.profile-card .pc-menu .pc-menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 2px;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.profile-card .pc-menu .pc-menu-item:last-child { border-bottom: none; }
.profile-card .pc-menu .pc-menu-item:active { background: rgba(255,255,255,0.04); transform: scale(0.992); }

.profile-card .pmi-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.profile-card .pmi-ico {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.07);
  font-size: 17px;
}
.profile-card .pmi-text-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-card .pmi-text { font-size: 14px; font-weight: 700; color: var(--text-1); letter-spacing: 0.005em; }
.profile-card .pmi-sub { font-size: 11px; color: var(--text-3); }
.profile-card .pmi-right {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  flex-shrink: 0;
}
.profile-card .pmi-count {
  font-size: 10.5px; font-weight: 700; color: var(--gold);
  background: rgba(245,197,66,0.12); border: 0.5px solid var(--gold-border);
  padding: 2px 8px; border-radius: 999px;
}
.profile-card .pmi-arrow { color: var(--text-3); opacity: .65; flex-shrink: 0; }
.profile-card .pill-coming {
  margin-left: 8px; padding: 2px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.06); color: var(--text-2);
  border: 0.5px solid rgba(255,255,255,0.08);
}

.profile-card .pmi-switch {
  width: 40px; height: 24px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.1);
  position: relative; display: inline-flex; align-items: center;
  flex-shrink: 0;
  transition: background 200ms ease, border-color 200ms ease;
}
.profile-card .pmi-switch .sw-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  transition: all 220ms cubic-bezier(0.4,0,0.2,1);
}
.profile-card .pmi-switch.active {
  background: rgba(245,197,66,0.24);
  border-color: var(--gold-border);
}
.profile-card .pmi-switch.active .sw-dot {
  left: calc(100% - 20px);
  background: linear-gradient(145deg, #f5c542, #e0ab24);
  box-shadow: 0 0 0 2px rgba(245,197,66,0.2), 0 2px 6px rgba(0,0,0,0.25);
}

.profile-card .pc-boost {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px; border-radius: 14px;
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(245,197,66,0.16) 0%, rgba(245,197,66,0) 60%),
    rgba(255,255,255,0.03);
  border: 0.5px solid rgba(245,197,66,0.22);
}
.profile-card .pc-boost-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.profile-card .pbc-tier { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.profile-card .pbc-tier b { font-size: 18px; font-weight: 800; letter-spacing: 0.01em; }
.profile-card .pbc-tier small { font-size: 11px; color: var(--text-3); }
.profile-card .pbc-assets { font-size: 12px; color: var(--text-2); font-weight: 600; margin-top: 2px; }

.profile-footer {
  margin-top: 16px; padding: 8px 16px 24px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.profile-footer .pf-logo { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.profile-footer .pf-sub { font-size: 10.5px; color: var(--text-3); opacity: .7; letter-spacing: 0.03em; }

.pc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.pc-title { font-size: 14px; font-weight: 700; color: var(--text-1); }
.pc-body { padding: 4px 8px 10px; }
.pc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px; border-radius: 12px; cursor: pointer;
  transition: background 160ms ease;
}
.pc-row:active { background: rgba(255,255,255,0.05); }
.pc-row .pc-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pc-row .pc-ico { width: 28px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.pc-row .pc-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-1); }
.pc-row .pc-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.pc-row .pc-right { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.pc-badge { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(245,197,66,0.12); color: var(--gold); border: 0.5px solid var(--gold-border); }
.pc-chevron { color: var(--text-3); opacity: 0.7; }

.profile-logout-wrap { padding: 20px 16px 0; }

html[dir="rtl"] .profile-header .ph-meta .pm-item,
html[dir="rtl"] .profile-card .pmi-text-wrap,
html[dir="rtl"] .profile-card .pc-boost-left,
html[dir="rtl"] .profile-footer { align-items: flex-end; }
html[dir="rtl"] .profile-card .pmi-switch .sw-dot { left: auto; right: 2px; }
html[dir="rtl"] .profile-card .pmi-switch.active .sw-dot { left: auto; right: calc(100% - 20px); }

.sub-page { padding: 0 16px 120px; }
.sub-page-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 12px; }
.sub-page-title { font-size: 16px; font-weight: 800; color: var(--text-1); }
.sp-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.05); color: var(--text-1); font-size: 12px; font-weight: 600; border: 0.5px solid rgba(255,255,255,0.07); }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-select, .filter-date-select { appearance: none; -webkit-appearance: none; background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.08); color: var(--text-1); padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; outline: none; }
.btn-outline-sm { padding: 7px 12px; border-radius: 10px; border: 0.5px solid var(--gold-border); background: rgba(245,197,66,0.06); color: var(--gold); font-size: 12px; font-weight: 700; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; background: rgba(20,20,24,0.6); border-radius: 14px; overflow: hidden; border: 0.5px solid rgba(255,255,255,0.06); }
.data-table thead th { background: rgba(245,197,66,0.08); color: var(--gold); padding: 10px 10px; text-align: left; font-weight: 700; font-size: 11px; letter-spacing: 0.02em; }
.data-table tbody td { padding: 10px; color: var(--text-1); border-top: 0.5px solid rgba(255,255,255,0.05); vertical-align: middle; }
.data-table tbody tr:nth-child(odd) td { background: rgba(255,255,255,0.015); }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.status-pending { background: rgba(245,197,66,0.12); color: var(--gold); border: 0.5px solid rgba(245,197,66,0.25); }
.status-done { background: rgba(80,200,120,0.12); color: #69e29a; border: 0.5px solid rgba(80,200,120,0.28); }
.status-rejected { background: rgba(255,90,90,0.1); color: #ff8383; border: 0.5px solid rgba(255,90,90,0.28); }
.status-paid { background: rgba(100,180,255,0.1); color: #86bfff; border: 0.5px solid rgba(100,180,255,0.28); }
.status-void { background: rgba(255,255,255,0.06); color: var(--text-3); border: 0.5px solid rgba(255,255,255,0.1); }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 0; font-size: 12px; color: var(--text-2); }
.pagination button { padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); color: var(--text-1); border: 0.5px solid rgba(255,255,255,0.08); font-size: 12px; font-weight: 600; }
.pagination button:disabled { opacity: 0.35; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13px; }

body[data-theme="light"] { --c-bg: #FAFAFA; --c-surface: #FFFFFF; background: #F5F3EF; color: #1a1a1a; }
body[data-theme="light"] .app-root { background: linear-gradient(180deg, #FBF9F3 0%, #EFEBE0 100%); }
body[data-theme="light"] .screen { background: transparent; }
body[data-theme="light"] .pwd-panel, body[data-theme="light"] .profile-card, body[data-theme="light"] .data-table { background: rgba(255,255,255,0.96); }
